[antlr-interest] how to match '.' ?
fhaupt at informatik.uni-wuerzburg.de
fhaupt at informatik.uni-wuerzburg.de
Sun Dec 17 02:04:20 PST 2006
Hi,
I have tried to copy the complete grammar peacewise to a new one till the problem occurs.
but it doesn't .. maybe it was the order, or i don't now. in the old file the problem remains, in the new one it isn't
there...
strange
if one wants to have a look at both files, tell me.i'll mail them directly. So the mailinglist doesnt get spammed :)
greets and thanks
fab
On Sat, Dec 16, 2006 at 10:49:09AM -0500, John B. Brodie wrote:
> >Hi there,
>
> Hi!
>
> >i have the following rules:
> >
> >test : STRING ' ' PUNKTUATION ' ' STRING;
> >
> >PUNKTUATION
> > : '.'|','|'!'|'?'|':'|'\\'|'/'|'$'|';'|'"'|')'|'(';
> >
> >STRING : ('a'..'z'|'A'..'Z'|'0'..'9'|'\.'|'-')+;
> >
> >
> >
> >this matches=20
> >'hallo ( test', 'hallo ? test', 'hallo : test', etc ..
> >
> >but noch anything like=20
> >'hallo . test' (or !,\,/," instead of . )=20
>
> a grammar file containing just those 3 rules above works just fine for me.
>
> maybe post the smallest *complete* example of your problem?
>
> -jbb
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20061217/a685f850/attachment.bin
More information about the antlr-interest
mailing list