[Haskell] help with happy/alex

robert bauer shlomobauer at mac.com
Wed Nov 22 20:05:29 EST 2006


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TVScriptParser.y
Type: application/octet-stream
Size: 559 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell/attachments/20061122/3b63c247/TVScriptParser-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TVScriptLexer.x
Type: application/octet-stream
Size: 1312 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell/attachments/20061122/3b63c247/TVScriptLexer-0001.obj


More information about the Haskell mailing list