[antlr-interest] Need help with EOL mess

Anthony W Youngman Anthony.Youngman at ECA-International.com
Tue Dec 16 03:07:20 PST 2003

 Seems to me it's confusing "\r\n" and '\r' (which would make sense).

Can you combine these two rules as "'\r' ('\n')?"?


-----Original Message-----
From: skappskapp [mailto:skapp at rochester.rr.com] 
Sent: 15 December 2003 16:37
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Need help with EOL mess

Here is my whitespace definition from the grammar file:

    // This rule matches and discards any whitespace.
    : ( ' '
      | '\t'
      | ( options { generateAmbigWarnings=false; }
          : "\r\n"          { newline(); }      // Microsoft
          | '\r'            { newline(); }      // Macintosh
          | '\n'            { newline(); }      // Unix
      )+  { $setType(Token.SKIP); }

This *does* generate ambiguous warnings but I don't know how to 
address this. Does anyone have any suggestions?




Your use of Yahoo! Groups is subject to


This transmission is intended for the named recipient only. It may contain private and confidential information. If this has come to you in error you must not act on anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, or show it to anyone. Please e-mail the sender to inform us of the transmission error or telephone ECA International immediately and delete the e-mail from your information system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.



Yahoo! Groups Links

To visit your group on the web, go to:

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

Your use of Yahoo! Groups is subject to:

More information about the antlr-interest mailing list