[antlr-interest] Newbie question - parsing decimal numbers

david.silberberg at jhuapl.edu david.silberberg at jhuapl.edu
Fri Oct 26 06:57:20 PDT 2001


I'm creating a parser that reads expressions like:

  a>3.5
  b < 4.57
  etc.

I'm using the example Java.g to read NUM_INTs. 
The token returned for the example (a>3.5) does indeed
return 3.5. However, the token returned for the second
example (b < 4.57) returns only 4 and ignores the '.57' .
It seems that the white space makes a difference to the
parser and I can't figure out why. Does any know how 
to fix this?

Thank you,
David Silberberg
david.silberberg at jhuapl.edu



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list