I borrowed the example presented here
http://www.haskell.org/alex/doc/html/introduction.html
I am trying to make an interpreter for numerical expressions. (literals only, no variables) And I want to have newlines separate two different expressions. Unfortunaltely, when I do this
$ignoredWhite = [\t\f\v\r] -- ignored whitespace
$newline = "\n" --new line
Alex (v 2.2) aborts compilation. I have tried
$newline = \n --new line
but that just causes the abort to move from alex to final binary (aka one generated by ghc), when it is reading the input.
How do I go about fixing this?