[antlr-interest] always missing some charactor when using ANTLR to generate lexer and parser

lin cyrix cyrixlin at yahoo.com
Thu Jan 18 01:14:26 PST 2007


I encountered a problem when using ANTLR to generate
lexer or parser java files. for example :

1, missing '('
throw new NoViableAltExceptionLT(1), getFilename());
should be :
throw new NoViableAltException(LT(1), getFilename());

2, missing 's' of 'result'
reult.value = new Double(Math.atan(
((Double)a.value).doubleValue() ));
should be :
result.value = new Double(Math.atan(
((Double)a.value).doubleValue() ));

3, missing 't' of '_ttype'
_token = makeToken(_type);
should be :
_token = makeToken(_ttype);

Why? Each time when I use ANTLR to compile calc.g,
there are always several this kind of missings. Can
anyone tell me the probable reason ?

Thanks in advance
Cyrix Lin


 
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: calc.g
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20070118/6f80451f/attachment.pl 


More information about the antlr-interest mailing list