[antlr-interest] Matching multiple occurrences of quoted text joined by 'and' (i.e. "a" and "b" and "c")

Gordon Tyler Gordon.Tyler at quest.com
Wed Nov 3 12:25:54 PDT 2010


> 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