First of all, i am completely new to antlr4, DSL & EBNF so it might be the case, that i'm not using antlr4 the right way, but right now i'm not aware of an alternative way for what i'm trying to do. Here it is:
I want to have a rule, which should consist of three upperCases but it shouldn't be allowed to have an reserved String as an Result.
Example:
parse: threeUpperCase;
threeUpperCase: UPPER UPPER UPPER;
UPPER:[A-Z]
I want to avoid that threeUpperCase matches 'ABC' & 'DEF (BCA, CAB,BAC, FED, EDF etc. are allowed). Is there a way to do this ?