[antlr-interest] greedy question
Pierre Attar
pat at tireme.fr
Fri Mar 14 09:51:57 PDT 2008
Hi,
I have some problems understanding lexer recognition. Here is my need.
Using the following string of characters, (string["using ""quotes"""]),
I want to extract the content : (using ""quotes"").
I wrote the following rule;
string : 'string["' (options {greedy=false;} : . ) '"]' ;
This works for (string["essai"]) but does not works in my sample
(string["using ""quotes"""]) and I have a MismachedSetException.
I try many different configurations but do not figure out how to solve
the string containing quotes.
Is is possible to use the greedy feature in this case or should I
explore an other antlr recognition feature ?
Any idea are welcome, Pierre
>
More information about the antlr-interest
mailing list