Dan S
unread,Sep 8, 2012, 2:00:46 PM9/8/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to modgr...@googlegroups.com
Hi - first steps with this module, and I'm trying to work out how to parse doublequoted strings, where a doublequote can be included if escaped with a backslash.
"This is an \"example\" of something that should parse OK"
The module has NOT_FOLLOWED_BY, but it seems like NOT_PRECEDED_BY would be good for this case...? Trying to think of a neat way to express this in modgrammar. So far all I have is:
class StringLiteral(Grammar):
# TODO: escaped double-quotes would break this.
grammar = ('"', OPTIONAL(WORD('^"')), '"')