17 May 03:21
alex + happy parser problem
From: Sean McLaughlin <seanmcl <at> gmail.com>
Subject: alex + happy parser problem
Newsgroups: gmane.comp.lang.haskell.cafe
Date: 2008-05-17 01:22:10 GMT
Subject: alex + happy parser problem
Newsgroups: gmane.comp.lang.haskell.cafe
Date: 2008-05-17 01:22:10 GMT
Hi, To learn alex and happy, I'm trying to write a parser for a simple expression language. When I wrote my own lexer and just used happy, it was fine. When I used the basic wrapper of alex it was also fine. However, when I use the posn wrapper to get position information, I get a strange exception when the parse error occurs at the end of the input. For example, parsing "1 + " yields "Internal Happy error" rather than something like "Parse error at line 1, column 5" The lexer and parser are attached. Can anyone see what I'm doing wrong? calling parse "1+" yields a "Internal Happy error" instead of a parse error as I would expect. Thanks, Sean ------------------ -- Lexer ------------------(Continue reading)
RSS Feed