[antlr-interest] REAL or int or Range

Alexander Gängel alexander at gaengel.de
Wed Jan 9 16:17:19 PST 2008


It's still not working for me now I get


The Grammar is just an Test, cause it´s not working in a bigger Grammar
so I tried an Simpler one just with my Problem.

What I think is odd is that it works for Fırat Küçük.

Alexander

Gavin Lambert schrieb:
> At 05:55 10/01/2008, Alexander Gängel wrote:
>
>> I have a Problem in My grammar
>>
>> I try to decide if I got in Integer an Real or an Range like 0..9
>>
>> It works for Int and Real but if I input 0..9 in Antlrworks in the
>> Input frame is only 9
> [...]
>> start    :
>>     uint_or_real
>>     |(uint_or_real RANGE uint_or_real)+;
>
> Try changing this to:
>
> start : statement EOF;
>
> statement
>   :  uint_or_real
>   |  (uint_or_real RANGE uint_or_real)+
>   ;
>
> (That's a really odd grammar, by the way.  Why do you support multiple
> ranges but not multiple numbers?)
>   
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080110/9b8b6f98/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Export.png
Type: image/png
Size: 2142 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080110/9b8b6f98/attachment.png 


More information about the antlr-interest mailing list