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

Terence Parr parrt at cs.usfca.edu
Tue Dec 16 11:31:01 PST 2003


Yep, was thinking of trying to fix for 2.7.3.

Ter

On Tuesday, December 16, 2003, at 02:34 AM, Ric Klaren wrote:

> 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)
>
> Ric
>
> 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
>
>
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com pure link sharing




 

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