[Haskell] ANNOUNCE: Happy 1.15

P.C.Callaghan p.c.callaghan at durham.ac.uk
Tue Jan 18 18:44:42 EST 2005


> Does this mean that it is not possible to put multiple entry points
> into a GLR parser?

Correct: the GLR parser doesn't provide this standard Happy functionality.
There is the work-around that you mention.

I decided to leave %name out this time, mainly because of the possibility
of the workaround and because (I think) the issues are slightly different
in the GLR setting (see below). But it's on the list to add next time, and
shouldn't be too hard. The same for %partial.

Note that a GLR parser will handle a top rule which allows any of your
start symbols - ie, S/R and R/R conflicts won't be an issue as they would
be for standard Happy. If you are using Tree-decode mode, the top-level
rule will return values in some union of the separate parser results, and
it's a simple matter to then pick out the ones you want.

It's an open question whether this is better (since you can now do it),
compared to deciding in advance what you expect and then trying to parse
just that. Comments on this point are welcome!  I'm also interested in
examples where people want multiple entry points but want to work with
graphs (rather than decoding them).



More information about the Haskell mailing list