For Programmers: Free Programming Magazines  


Home > Archive > Compilers > January 2007 > reduce actions vs shift actions









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author reduce actions vs shift actions
Richard A Nelson

2007-01-06, 7:29 pm

I'm looking towards replacing an extant parser system with something
more formal - to hopefully detect parsing issues are parser build time,
rather than trying to debug misparsed code.

The current tool is similar to a NFA, with lots of embedded actions.
>From the size, and scope of the grammar, I am very confident that

converting the grammar to LALR would be a disaster, many reduce-reduce
conflicts created by the embedded actions (due to the hidden reductions
generated by tools like YACC).

I've seen references to parser generators that can properly support
shift actions - I guess by special encoding of the action array... but
I've not yet found any description of rational techniques to handle
this, or describe the effects (increased table size due to less sharing) ?

The next problem, should I overcome this limitation, will be the bizarre
lookahead used by the tool - but I'm hoping that converting the input to
something YACC(or workalike) will eat will start showing me what kind of
tweaks I'll be needing for the grammar (and actions).

Thanks,
--
Rick
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com