[antlr-interest] Matching multiple occurrences of quoted text joined by 'and' (i.e. "a" and "b" and "c")
Colin Yates
colin.yates at gmail.com
Wed Nov 3 12:37:19 PDT 2010
Thanks Gordon,
That doesn't work either. I think I need to separate out just this
fragment into its own grammar to ensure that the rest of the grammar
isn't having any unexpected side effects.
I will report back once I have isolated these two rules... Thanks!
Sent from my iPad
On 3 Nov 2010, at 19:25, Gordon Tyler <Gordon.Tyler at quest.com> wrote:
>> QUOTED_TEXT : '\"' ( options {greedy=false;} : .)* '\"'
>
> Try this:
>
> QUOTED_TEXT : '"' (~'"')* '"'
>
> In English: Match '"', then match zero or more characters which are not '"', then match '"'.
>
> Ciao,
> Gordon
>
More information about the antlr-interest
mailing list