I am using ANTLR to create lexer/parser. Expressions can have the format like this
if(a==1 || b==2 or c==3 && d==4 and e==5)
I have grammar for supporting && and || like this –
AND : '&&'
OR : '||'
Need to know what changes will be required for supporting keyword “and” and “or”.
Just list “and” and “or” as alternatives in the definition of
ANDandOR