[antlr-interest] Simple Parser Problem?
fridi
fridi70 at gmx.de
Fri Feb 5 12:00:33 PST 2010
Hi Timm,
I tested your grammar in ANTLR IDE and ANTLR Works as well and it works
as expected!
cheers, Fridi
Timm Meyer schrieb:
> Hi there,
>
> I hope this is not a too simple problem, but I am searching for hours
> for a solution.
>
> The grammar is:
>
> headerword
> : (HEADERWORDCHAR | WORDCHAR)
> (DIGIT | HEADERWORDCHAR | WORDCHAR)*;
>
>
> DIGIT : '0'..'9' ;
> WORDCHAR : ('a'..'z' | 'A'..'Z');
> HEADERWORDCHAR : ( '$' | '&' | '(' | ')' | ',' | '.' | '+' | '[' | ']' |
> '\'');
>
> And everey time I try to match
> (137394948)
> or
> (137394948)7
>
> I get a NoViableAltException.
>
> Could anyone explain to me what I am doing wrong here?
>
> Cheers, Timm
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Timm.jpg
Type: image/jpeg
Size: 8542 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20100205/84d8e335/attachment.jpg
More information about the antlr-interest
mailing list