
26 Sep
2010
26 Sep
'10
12:16 p.m.
Hello If you run happy with the info option and a file name for the output, happy will produce a report on the grammar:
happy -info=INFO.txt Main.g
You are right that the three unused termianls are 'let' 'in' and '=' terminal let is unused terminal in is unused terminal '=' is unused You are also importing a file Tokens_posn (presumably the lexer?) which you haven't posted - without being able to see this or the actual error message its rather hard to decode the error, however if you are using the file Token_posn.x from the Alex distribution there are two problems - one is you need Newstatement as a token, the other is runCalc has this type: runCalc :: String -> [Expr] runCalc ss = calc $ alexScanTokens ss Best wishes Stephen