* Martin Drautzburg <martin.drautzb...@web.de> [2013-02-20 08:13:16+0100] > I do know for sure, that it is possible to parse "(1+2)+3" (ghci does it just > fine). But I seem to be missing a trick. > > Can anyone shed some light on this?
The trick in this case is that ghci doesn't use a recursive descent parser — it uses an LR parser (generated by Happy). Another workaround is to use memoization of some sort — see e.g. GLL ("Generalized LL") parsing. Roman _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe