[antlr-interest] Bad Token-type to AST-Class map in 2.7.2 Java; broken release

Ric Klaren klaren at cs.utwente.nl
Tue Dec 16 02:34:52 PST 2003

Hi Terence,

You've seen this one ?

Thomas a question: where do you have these token sections? lexer or parser?
Parser and lexer in one file or multiple, token section with the lexer or
with the parser ? A small example grammar would be practical.

Don't think I will fix it for 2.7.3 in C++ mode it touches too many icky
parts. (Although in C++ mode it's probably something else going wrong as in
Java mode)


On Sat, Dec 06, 2003 at 07:34:53AM -0000, random_uv wrote:
> just diagnosed 2.7.2 as problematic and gone back to 2.7.0.
> Problem is tokens declared with string literal:
> IMPORT_ON_DEMAND          <AST=persist.qtree.Node>;
> THIS = "this"             <AST=persist.qtree.ThisExpr>;
> ASCENDING = "ascending"   <AST=persist.qtree.AscendingOrderingExpr>;
> Generates a broken TokenType to AST ClassMap.
> tokenTypeToASTClassMap.put(new Integer(IMPORT_ON_DEMAND),
>   persist.qtree.Node.class);
> tokenTypeToASTClassMap.put(new Integer("this"),
>   persist.qtree.ThisExpr.class);
> tokenTypeToASTClassMap.put(new Integer("ascending"),
>   persist.qtree.AscendingOrderingExpr.class);
> Note that tokens without string (literals?) assigned are OK as they 
> are mapping by integer constants; but tokens with strings are 
> generated broken with the strings as map IDs.
> Proceeding with 2.7.0 for now. Anyone else seen this problem?
> Regards,
> Thomas
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
  "Good judgement comes from experience.
     Experience comes from bad judgement." --- Unknown


Yahoo! Groups Links

To visit your group on the web, go to:

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

Your use of Yahoo! Groups is subject to:

More information about the antlr-interest mailing list