[antlr-interest] inconsistent line endings in generated parser and lexer

Adam Connelly adam.rpconnelly at googlemail.com
Thu Apr 24 07:32:37 PDT 2008


I'm guessing this is a problem with the templates that are used to generate
the lexer and parser.  I've also noticed it when debugging grammars in
Visual Studio because any time you generate your parser it pops up a box
asking if you want to normalise the line endings - a bit annoying.  I'd
second that request.

Adam
2008/4/22 Doucette, Charles <cdoucette at vaultus.com>:

>  I have a grammar file which I have been editing in Antlrworks on Windows.
> Apparently, every one of those lines ends with CR-LF.
> Every other line automatically generated by ANTLR ends with LF.
> When you combine those two streams into the automatically generated parser
> and lexer, the line endings are inconsistent.
> When I try to add those files to my source control tool (and perhaps I
> shouldn't try since it is generated), Subversion,
> I get an error that the line endings are inconsistent.
> It can handle all CRs (Mac?), all LFs (Unix) or all CR-LFs (Windows) - but
> it apparently doesn't like a mixture.
> Is it possible to configure ANTLR to generate consistent line endings?
> If not, I'd like to request that as a feature.
>  Today, perhaps I must just remove CRs from my grammar input file before
> processing it.
>
> Thanks,
> Chuck
>
>   ------------------------------
>  Charles E. Doucette ·  617-399-1122 ·  Vaultus Mobile Technologies, 263
> Summer St., Boston, MA 02210 ·  http://www.vaultus.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080424/71c750e7/attachment.html 


More information about the antlr-interest mailing list