[antlr-interest] RES: COBOL grammar

Ron Burk ronburk at gmail.com
Mon Jul 11 15:24:12 PDT 2011


> What else am I missing?

Are you certain you mean the '.' at the end of the command
to be optional? An initial scan seems to indicate only one
optional '.' in the tinyCobol grammar, in procedure declarations.

Likewise, an uneducated glance at another COBOL grammar:
    http://www.cs.vu.nl/grammarware/browsable/cobol/#EBNF
seemed to indicate the "." is rarely optional.

Or put another way, at the end of a command, what are
the precise rules for deciding whether a '.' belongs to
the current command or to the enclosing paragraph?
If you can state an unambiguous rule for making that decision,
you can probably force ANTLR to do it.


More information about the antlr-interest mailing list