Re: Request: COBOL grammar in ANTLR (Mike Von Foerster)
Tue, 21 Sep 1993 19:08:48 GMT

          From comp.compilers

Related articles
Request: COBOL grammar in ANTLR (1993-09-09)
Re: Request: COBOL grammar in ANTLR (1993-09-21)
Re: Request: COBOL grammar in ANTLR (1993-09-21)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Mike Von Foerster)
Keywords: Cobol, comment
Organization: Data General Corp., Research Triangle Park, NC
References: 93-09-048
Date: Tue, 21 Sep 1993 19:08:48 GMT (Jay K. Joiner) writes:
|> Request pointers for a grammar for COBOL (full language) for the
|> ANTLR compiler-compiler of the Purdue Compiler Construction Tool Set?
|> It is needed for a software maintenance project.

|> [Don't hold your breath. Many requests for a free Cobol grammar in yacc
|> have never turned one up. I'd think it'd be straightforward but tedious to
|> create one. The enormous set of reserved words blows away a lot of parser
|> generators. -John]

A full COBOL parser can be (and has been) generated with lex and yacc. A
few modifications are needed for the lex & yacc table sizes and John is
write about the complexity of the parser. The parser is rather large
though.... very large if the full 85 standard is supported and with
Intrinsic functions added in now...and Object-Oriented coming

The one gotcha is the AT END/NOT AT END phrases with the I/O statements
can be a little tricky. Semantic checking is where much of the difficulty

Now that I've said this, let me add that the parser I'm referring to is
not free nor can it be purchased. Sorry.
Michael von Foerster Internet:
DG/UX Core Development UUCP: {world}!mcnc!rti!dg-rtp!foerster
Data General Corporation
62 T.W. Alexander Drive
RTP, NC 27709 Phone: 919-248-6327
[There's a Cobol-85 parser provided with the commercial Abraxas pcyacc. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.