I'm trying to implement a C++ style block comment:
/*hello!*/
I've copied the block comment code from the samples. It works fine
UNLESS the block comment contains a character that is not used by any
of my language's other constructs.
For example, my language does not use the '.' operator for anything.
So, ANTLR will reject this code with an "unexpected char" error:
/*Hello.*/
This, however is ok:
/*Hello!*/
Because the '!' is a valid char in my language (it means "not.")
Any advice on how to allow anything to be inside the block comment? I
thought matching against ~('*'|'\n'|'\r') would do the trick, but it
doesn't seem to be enough.
Thanks in advance.