I'm new at Haskell and Alex. I'm trying to make tokens of operators in Lexer.x
here is an example of my code
\<= { \s -> TLE }
\== { \s -> TEQ }
\/= { \s -> TNEQ }
\&& { \s -> TAND }
but when I wrote
\|| { \s -> TOR }
I got a parse error on this line How I should make token for || ?
You can use string literals to prevent escaping all characters, so you can use:
"||" { \s -> TOR }