4

I cleary have the unicode whitespace characters defined in my SKIP token like so:

    SKIP {
" "
| "\r"
| "\n"
| "\t"

}

However, when I run Java CC it parses all the tokens fine until I hit any of the above mentioning white space characters and it throws the following error:

Exception in thread "main" prjct1.TokenMgrError: Lexical error at line 1, column 25.  Encountered: "\r" (13), after : "Random:Word:Here"

So as you can see it runs fine until it hits the "\r". I get the same error with " ", "\n", and "\t". Any thoughts? thanks

kevin sufferdini
  • 131
  • 3
  • 14

2 Answers2

1

Make sure you have a colon between the SKIP and your bracket.

SKIP: { " " | "foo" | "bar" }

Chris Gambrell
  • 291
  • 3
  • 8
0

I had similar problem. Check your quotes. Are they neutral quotes such as " or left/right double quotes”?

I had double quotes, after making them neutral quote, this error was gone.

Meera Datey
  • 1,913
  • 14
  • 15