
robert bauer wrote:
Hi,
I have a .y and .x file. The alex -g _.x gives me a .hs file and happy -g -a -c _.y gives me a .hs file. I then use ghc -c alex.hs to get a a .o and a .hi file. This works great. Unfortunately ghc -c happy.y doesn't work -- it says that it the module name for the lexer doesn't match. I've attached the .y and .x files.
Also, I cannot figure out what I need to do in the parser to call the lexer and I don't know how to kick start the parser -- I have no clue what to put in third, main.hs, module.
Any help would be appreciated.
You have a typo in the module name in TVScriptLexer.x. As for tying it together, I suggest taking a look at some of the examples, eg. http://darcs.haskell.org/alex/examples/tiny.y from the Alex distribution. Cheers, Simon
participants (1)
-
Simon Marlow