JavaCC: Please help me understand token ambiguity.
- by java.is.for.desktop
Hello, everyone!
I had already many problems with understanding, how ambiguous tokens can be handled elegantly (or somehow at all) in JavaCC. Let's take this example:
I want to parse XML processing instruction.
The format is: "<?" <target> <data> "?>": target is an XML name, data can be anything except ?>, because it's the…