[antlr-interest] C# target doesn't do numbers
Vaclav Barta
vbar at comp.cz
Wed Jun 27 03:34:04 PDT 2007
Wincent Colaiuta wrote:
> El 27/6/2007, a las 11:19, Vaclav Barta escribió:
>> Digit : '0'..'9' ;
>>
>> Integer : ( Digit )+ ;
...
>> line 1:0 no viable alternative at input '1'
> Have you tried making Digit a fragment rule? seeing as it is not
> referenced by any parser rule.
Err, what is a fragment rule and how do I make it? My ANTLR knowledge is
rather dismal... What I tried was removing Digit altogether (it was used
in another place in the full grammar, but that could be worked around), and
Integer : ( '0'..'9' )+ ;
does work - but still, it would be nice to understand why... :-)
Bye
Vasek
More information about the antlr-interest
mailing list