[antlr-interest] stuff I don't like about ANTLR 2.x
Ric Klaren
klaren at cs.utwente.nl
Wed Mar 10 04:25:47 PST 2004
On Sat, Mar 06, 2004 at 12:05:24PM -0800, Terence Parr wrote:
> Feel free to send in your pet peeves to me or to this list. I will try
> to add to this file.
Part 2:
- Clear semantics for things like:
( { x < 4 }? myRule )*
( { x < 4 }? myRule )+
- Clear documented semantics for the scope of a variable defined in actions:
( { int somevar; }
)*
Or:
( { int somevar; } :
)*
Or dirty stuff like:
( { if( i > 10 ) break; } :
someRule
)*
( { if( i > 10 ) throw ....; } :
someRule
)*
Or a statement like 'You're on your own!'.
- Consistent importVocab/exportVocab behaviour when the lexer/parser are in
the same file and in the separate files cases.
- it would be nice if ANTLR would examine dependent grammars and remake them
if needed. Would probably require some extra options for specifying the
search path for grammars/vocabs. (we definitely need more control for
this as someone else pointed out as well)
- It would be nice if ANTLR3 was designed from the outset for heterogeneous
AST and Token support. In antlr2 this was not the case and it shows.
- I would love a shorthand syntax for:
( stuff ) ( DELIMITER stuff )*
Where delimiter is usual a single token or a set of tokens. The advantage
is that the action code for stuff can be the same. In the current
implementation you have to keep some near identical bits of code
synchronized with the occasional copy paste error resulting from that.
ell used a syntax like ( stuff || DELIMITER )* or something along those
lines.
- It would be nice if antlr would warn for common mistakes like
rule* in stead of ( rule )*
Cheers,
Ric
--
-----+++++*****************************************************+++++++++-------
---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722 ----
-----+++++*****************************************************+++++++++-------
"I think we better split up."
"Good idea. We can do more damage that way."
--- Ghostbusters
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list