In a lexer, '*/' is two consecutive characters and not a set, so while ANTLR lets you complement it without a warning, it doesn't work as expected. At least that was the result when I tried a similar method on another rule.
Sam -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hendrik Maryns Sent: Wednesday, November 12, 2008 6:10 AM To: [EMAIL PROTECTED] Subject: Re: [antlr-interest] fragment and option greedy=false Sam Harwell schreef: > COMMENT > : '/*' > ( (~'*' | '*' ~'/') => VALID_CHAR > )* > '*/' > ; Why not simply (~'*/') => VALID_CHAR ? H. -- Hendrik Maryns http://tcl.sfs.uni-tuebingen.de/~hendrik/ ================== Ask smart questions, get good answers: http://www.catb.org/~esr/faqs/smart-questions.html List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
