1

Hi I am trying to ignore java comments using JFlex but I can't manage to make it working, I always have an error in execution. I used these two lines:

commentary = "//"[\r\n]*(\r|\n|\r\n)
<YYINITIAL> {commentary}    {}

I also tried different things like commentary = [/][/].* but without success.

rds
  • 26,253
  • 19
  • 107
  • 134
Umut LeBg
  • 13
  • 4
  • 1
    [java comment regular expression](http://stackoverflow.com/questions/1657066/java-regular-expression-finding-comments-in-code) – jcoppens May 23 '15 at 13:45

1 Answers1

0

commentary = (/*([^]|[\r\n]|(*+([^/]|[\r\n])))*+/)|(//.)

Please try this

VedantK
  • 9,728
  • 7
  • 66
  • 71