I would like to ask if the word "IS" is a reserved word. Here is why I am asking. The language that I am trying to create a parser for is a priority language. I have an assignment that looks like this:
%VARIABLE IS STRING
Using the Antlr interpreter, I type in the statement above and I get an error stating a 'MisMatchedSetException'.
If I type:
%VARIABLE AND STRING
Everything works as expected.
I spent some time looking around for a solution, but nothing so far.
Here is a part of my grammar:
assignis : '%' IDENT logical_operator types ;
types : ('FIXED' | 'STRING' | 'FLOAT');
logical_operator : 'IS' | 'AND';
IDENT : ('a'..'z' | 'A'..'Z' | '0'..'9' | DOT)+;