Couldn't find a rigorous language spec for matlab,
but it kinda looks like the lexer can handle the distinction
by remember the previous token type returned. (e.g.,
if the previous token type was X, or X., or ), then the
single quote is an operator instead of a string -- the exact
rule depends on the exact language spec).

Obviously, you don't want the parser trying to piece
together a quoted string out of whatever (possibly illegal!)
tokens appeared inside it, so this is a job for the lexer.

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to