New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
floats aren't parsed correctly. #75
Comments
In the parser the definition of digits does not allow for non-integers? DIGITS: ('+'|'-') ? ('0'..'9')+; Some additional tests for things like 1 + 2.3 might be interesting, but I looked at all the usages of DIGITS and I don't see anywhere in the parser that allows for decimals at all. I'm pretty new to the parser however, so I could be missing something obvious... |
You are right. The grammars parsing of floats is not correct. |
The decimal is what makes the floats tricky because the . is also the statement terminator. I tried fixing this once but I'm not very good with antlr. |
I kind of remember that a lex rule wont cut it and we need a parser rule. Guess Ill be reading that ANTLR book a.s.a.p On Sat, Dec 24, 2011 at 3:40 PM, Robert Roland <
|
Ditto. I broke more than I fixed, I had floats working but I introduced lots of other issues. I also need time to read the ANTLR book. |
fixed with new compiler. |
Sees
1.1 + 1 = 2.1.
as
1 + 1 = 2.
The text was updated successfully, but these errors were encountered: