KorAP/Koral

Warn on reserved words

Akron opened this issue · 0 comments

Akron commented

When Antlr stumbles upon reserved words in wrong contexts, it will stop parsing, pointing to the first failing symbol. It would be nice to throw an error message giving a hint, that the user tried to use a reserved term. A first start may be, taking the token inventory (or hardcoded) in a regex following a word boundary (at least in PQ+), and in case that matches, responding with "Maybe use of a reserved token".

Reported example in PQ+: split.