I'm trying to write a javacc-based parser that involves the following tokens / lexical states:
TOKEN :
{
<"{"> : FIRST
}
<FIRST, DEFAULT> TOKEN :
{
<"~[]"> : DEFAULT
}
Trying to parse "{;}" results in the lexical error
Encountered: ";" (59), after : ""
which I don't understand. I can avoid the error in two ways:
However, I do need both of these (as you can guess, the above is just a minimal test case), so this isn't a suitable workaround. Any idea what is wrong with the above token definition ?
Thanks !
Too many quote marks. What you want is
TOKEN :
{
<"{"> : FIRST
}
<FIRST, DEFAULT> TOKEN :
{
<~[]> : DEFAULT
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With