[antlr-interest] Comment

Thomas.dill thomas.dill at teleport.ch
Thu May 7 05:47:39 PDT 2009


Thanks for your reply.
 
 It doesn't work, because, as you can see in the example code, after
"PRINT" there is an asterik and there is the problem. If you try it with
ANTLRWorks you can see what I mean.
 
 Best regards,
 Tom

--------- Original-Nachricht --------
 Von: "Michael" 
 An: "antlr-interest at antlr.org" 
 Cc: "Thomas Dill" 
 Betreff: Re: [antlr-interest] Comment
 Datum: 07/05/09 14:41
 
 Am Thursday 07 May 2009 14:10:22 schrieb Thomas Dill:
 > Hi there.
 >
 >
 >
 > I still got the following Problem:
 >
 >
 >
 > In the syntax, I want to parse, a comment line starts with "-*" and ends
at
 > the end of the line. It's possible that an asterisk can appear in a
"text",
 > too.
 >
 
 i have a working one-line comment version like this ( comments start with #

 or // and go until end of the line):
 
 
 NL: ('r'? 'n')+ { skip();};
 SINGLE_COMMENT: ('#' | '//') ~('r' | 'n')*
;
 
 so change this to:
 SINGLE_COMMENT: '-*' ~('r' | 'n')* ;
 
 doesn't work?
 
 cheers,
  Michael
 
 

________________________________________________________________
Diese Mitteilung wurde von http://www.breitband.ch uebermittelt.
Einer der schnellsten Kabel-Internet Zugaenge!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090507/35f41ce7/attachment.html 


More information about the antlr-interest mailing list