[antlr-interest] Line wrapping in generated lexer/parser
Richard Gildea
rgildea at googlemail.com
Tue May 4 04:14:21 PDT 2010
Hi,
I am using Antlr-3.1.2 to generate a Python target for my grammar. I am
observing slight discrepancies in the generated code between different
platforms, which shows up as differences when committing to svn.
I suspect it is an issue with the different line endings for the different
platforms, which is causing the lines to be wrapped differently.
e.g.
(on Windows)
DFA.unpack(u"\2\144\2\uffff\1\144\22\uffff\20\144\12\u00da\105"
u"\144"),
vs
(on Mac)
DFA.unpack(u"\2\144\2\uffff\1\144\22\uffff\20\144\12\u00dc\105\144"),
In all cases it seems to be where one character is pushed to the next line.
Is this an issue with CR+LF counting as two characters on Windows, and
causing the line to creep over the character limit? If so, is there a
possible way round this behaviour so that I can get a clean diff between
generated code on different platforms?
Thanks,
Richard
More information about the antlr-interest
mailing list