At 4:58 PM +0200 5/7/04, Leopold Toetsch wrote: >Dan Sugalski <[EMAIL PROTECTED]> wrote: >> Apparently it's not happy with things of the form > >> foo = bar * .95 > >> where the RHS of the binary operation is a floating point constant >> with no integer portion. Changing it to 0.95 works, so I assume the >> grammar just needs a tweak. > >Yep. The lexer (imcc.l) is missing this case. > >Patches welcome,
It'd help if I could actually rebuild this so it could be tested... This is the patch. It should work but the version of flex I have installed doesn't play nice with the rest of the source, so I can't build and test. --- imcc/imcc.l~ 2004-04-23 05:20:30.000000000 -0400 +++ imcc/imcc.l 2004-05-07 14:02:07.000000000 -0400 @@ -84,7 +84,7 @@ BIN 0b[01]+ DOT [.] SIGN [-+] -FLOATNUM {SIGN}?{DIGITS}{DOT}{DIGIT}*([eE]{SIGN}?{DIGITS})? +FLOATNUM {SIGN}?({DIGITS}{DOT}{DIGIT}*|{DOT}{DIGITS})([eE]{SIGN}?{DIGITS})? LETTERDIGIT [a-zA-Z0-9_] LABELLETTERDIGIT ([EMAIL PROTECTED]|"::") ID {LETTER}{LABELLETTERDIGIT}* -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk