Peterson, Joe wrote:
Michael,

Thanks for the response.  You suggested:
  
NONCOMMENT  : '#ABCD' { $channel = HIDDEN; };
COMMENT     : '#' ~('\r' | '\n')* NEWLINE   { $channel = HIDDEN; };
NEWLINE     : '\r' ('\n')? | '\n';
    

I've tried that but then a line like the one below is treated as a comment:
        #ABCD this = that
Apparently unless you set it to fuzzy, you get the longest match.  I can't turn on fuzzy, so I need to figure out another method.

-JEEP


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
  
COMMENT : '#'
                         (
                              ( 'ABCD')=> 'ABCD'
                            | ~('\r' | '\n')* NEWLINE
                         )
                         { $channel = HIDDEN; }
                      ;

NEWLINE     : '\r' ('\n')? | '\n';


Jim

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to