[comp.compilers] yacc grammar for cobol

dylan@ibmpcug.CO.UK (Matthew Farwell) (09/25/90)

I may have missed it, but did anyone actually post a yacc grammar for Cobol?

Dylan.
-- 
Matthew J Farwell                 | Email: dylan@ibmpcug.co.uk
The IBM PC User Group, PO Box 360,|        ...!uunet!ukc!ibmpcug!dylan
Harrow HA1 4LQ England
Phone: +44 81-863-1191
[Not that I've seen. -John]
-- 
Send compilers articles to compilers@esegue.segue.boston.ma.us
{ima | spdcc | world}!esegue.  Meta-mail to compilers-request@esegue.

hassey@dg-rtp.dg.com (John Hassey) (01/25/91)

    Yes it is possible to write a yacc parser for Cobol.  We did
    just that for a re-implementation of Interactive Cobol for
    our AViiON systems.  The original compiler contained a simple
    top-down recursive parser.

    The main problems we ran into were not in creating a LALR 
    grammar, but with yacc limitations.  The number of terminals, and
    parser states had to be expanded.  We also used lex, but replaced
    the standard input() routines so that we could deal with continuation
    lines and such.

    I've requested permission to release our grammar, but so far
    no luck.


John Hassey		hassey@dg-rtp.DG.COM or ...!mcnc!rti!xyzzy!hassey
Data General Corp.	Research Triangle Park	NC, 27709
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.