[antlr-interest] how to match '.' ?
fhaupt at informatik.uni-wuerzburg.de
fhaupt at informatik.uni-wuerzburg.de
Sat Dec 16 06:42:14 PST 2006
Hi there,
i have the following rules:
test : STRING ' ' PUNKTUATION ' ' STRING;
PUNKTUATION
: '.'|','|'!'|'?'|':'|'\\'|'/'|'$'|';'|'"'|')'|'(';
STRING : ('a'..'z'|'A'..'Z'|'0'..'9'|'\.'|'-')+;
this matches
'hallo ( test', 'hallo ? test', 'hallo : test', etc ..
but noch anything like
'hallo . test' (or !,\,/," instead of . )
do I have to escape those? i've tried
PUNKTUATION
: '\.'|','|'!'|'?'|':'|'\\'|'/'|'$'|';'|'"'|')'|'(';
as rule, but 'hallo . test' still isn't matched.
i'm using antlr-3.0b5.
thanks for any suggestions in advance.
-------------- 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/20061216/21aba37c/attachment.bin
More information about the antlr-interest
mailing list