[antlr-interest] 3.0 final will require t.g has t in it
Terence Parr
parrt at cs.usfca.edu
Tue Jul 11 12:54:28 PDT 2006
On Jul 11, 2006, at 2:49 AM, Anthony Youngman wrote:
> Well, I'm not an experienced user of Antlr, but in my attempts to
> get it
> working I have one source file (BASIC.g), which contains three
> consecutive grammar definitions, namely BASICLexer, BASICParser and
> BASICTreeParser.
Well, v3 doesn't allow multiple 'grammar' defs per file.
> [snip]
>
> Forcing the file name to match the root of a bunch of grammar classes,
> however, is sensible and I'd go along with that no problem...
So I think people are proposing C.g generating CParser.java if
parser, CLexer.java if lexer grammar, CTreeParser.java if tree
grammar. If combined then CParser.java *and* CLexer.java.
In the future if you need to reference a grammar, you'd use it's name
like C, which must be in C.g. The type would not be specified just
like you don't differentiate in java between class and interface and
enum.
Makes sense?
Ter
More information about the antlr-interest
mailing list