I have a grammar that parses a file containing multiple "records" separated by a sentinel character (pipe | in the example code).
One comment on Issue #156 suggests using a greek Delta character as a sentinel to minimize the chance of collisions with parsed text, but ASCII and Unicode define a Record Separator character for exactly that purpose, eliminating the possibility of collisions. (https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text)
But when I try to use RS instead of pipe as a separator, parsimonious fails. The example code gives the expected set of <Node called "x" matching ... messages with the pipe separator, but generates an exception
parsimonious.exceptions.ParseError: Rule 'rs' didn't match at '' (line 10, column 1).
with the RS separator.
I have a grammar that parses a file containing multiple "records" separated by a sentinel character (pipe
|
in the example code).One comment on Issue #156 suggests using a greek Delta character as a sentinel to minimize the chance of collisions with parsed text, but ASCII and Unicode define a Record Separator character for exactly that purpose, eliminating the possibility of collisions. (https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text)
But when I try to use RS instead of pipe as a separator, parsimonious fails. The example code gives the expected set of
<Node called "x" matching ...
messages with the pipe separator, but generates an exceptionparsimonious.exceptions.ParseError: Rule 'rs' didn't match at '' (line 10, column 1).
with the RS separator.Is there any reason why one should work and not the other?