Closed krishna116 closed 2 years ago
This is because //
comments everything up to the end of line. This is not re2c-specific behavior, it is simply how single-line comments work in any language.
You can either break the code into multiple lines:
[123] {
//printf("%c", *YYCURSOR);
break;
}
Or use a nested multiline comment /* ... */
:
[123] { /*printf("%c", *YYCURSOR);*/ break; }
Ok, thank you for the explain and detail example, so it is closed.
For example, re2c v2.2 cannot compile follow code because "//comment" used in the brace.
The error is: