nathansobo/treetop — Issue #23: Doc fix in the website
Author: roma1n
Created: 2011-12-19 09:40:28+00:00
State: open

Hi,

I believe the string parsing example in the website should be changed: the order of the 'escaped quote' and 'any character' choice should be swapped. In other words, the string parsing expression should be:

rule string
'"' ('\"' / !'"' . )* '"'
end

The following test case illustrates this point:

assert @parser.parse('"He said, \"Hi!\""')