On Sat, Apr 24, 2010 at 4:25 AM, Rick Mann <[email protected]> wrote:
> float returns [float val]
> : { $val = Float.parseFloat($FLOAT.text); }
> ;
>
Note that you never use your 'float' rule.
On Sat, Apr 24, 2010 at 4:25 AM, Rick Mann <[email protected]> wrote:
> INT : '0'..'9'+
> ;
>
> FLOAT
> : ('0'..'9')+ '.' ('0'..'9')* EXPONENT?
> | '.' ('0'..'9')+ EXPONENT?
> | ('0'..'9')+ EXPONENT
> ;
>
Try placing FLOAT before INT in your grammar.
Regards,
Bart.
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.