[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug: inlining changes start state



On Wed, 9 Jul 2008, Etienne M. Gagnon wrote:
This is effectively quite an annoying bug. Have you tried, in the short term, to reorder your productions.

I just tried modifying the inliner to not remove productions after inlining them, and that apparently resolved the problem. It's a one-line change and I trust this won't hurt anything, since if the inlined production turns out to not be reachable from the start state, it won't appear in the generated parser.

Fortunately or unfortunately, it turns out that inlining wasn't helping my grammar after all. By changing the initial state, the inliner was just masking ambiguities caused by the original start state, not resolving them. If I modify my grammar to fix those ambiguities, it doesn't even need inlining any more.

Instead, I'll try to get version 4 up and running ASAP. I know that it's not visible on the web site, but I am actively (and almost exclusively) working on it these days.

That sounds great. Will v4 offer directives for resolving shift/reduce conflicts? I am working on a language similar to Lua in that it allows expressions to appear in sequence with no separator, and I don't relish the prospect of maintaining two versions of the expression grammar when the conflict could be resolved by a standard "prefer shift" policy. I really like SableCC's architecture but this one issue is making me consider changing to CUP.

PS: Could you (re-)enter your bug report using your existing sablecc.org account on http://sablecc3.sablecc.org

Done. I closed the old report too.

Thanks for your assistance,
Adrian Quark