On Fri, Aug 5, 2011 at 21:15, Jason Garber <[email protected]> wrote:
Stefan,
[...]
All I did to figure it out was to comment out the lines in the input after
the ones that were working (in order to exclude the trouble spot).
[...]

---------------------------

Jason,

Today I found out about about the Parslet's error reports:
http://kschiess.github.com/parslet/tricks.html

By using

require 'parslet/convenience'
parser.parse_with_debug(input)

I got a detailed error message that pointed me directly to where the problem
was:

Expected at least 1 of row:RECORD NEWLINE at line 1 char 1.
`- Expected at least 1 of row:RECORD NEWLINE at line 1 char 1.
   `- Failed to match sequence (row:RECORD NEWLINE) at line 5 char 1.
      `- Failed to match sequence (LF CR?) at line 5 char 1.
         `- Expected "\\n", but got "\"J" at line 5 char 1.

You probably already know about this feature, but I am sure someone on this
list might find this information useful.

Stefan

Reply via email to