I am implementing the lexical and syntax analyzer for a c++ like programming language I have the following line in the regular expressions' section in lex file
arithm_op [/+*%-]
bitwise_op [&^~|]
punctuators [()=;{}]
For the following input in the parser file:
int a;
int c;
print(a|c);
The bitwise operator is not matched. The program terminates just before the lex file reaches the '|' symbol in the print statement
I have tried to escape the pipe '|' in the regex but didn't work yet.
|inside[].