From Newsgroup: comp.compilers
Thanks for pointing out this paper. The paper is a nice presentation
of how to extend the "closure" operation of LR parsing to handle
permutation phrases. I will definitely add this to my toolbox of
techniques.
The only restriction mentioned in the paper that is slightly troubling
is that it depends upon the elements being permuted must be unique,
which if one uses it with non-terminals (as the items being permuted)
could be problematic since, if I recall correctly, it is impossible in
some cases to determine if two non-terminals never derive the same
string. However, in most practical cases that won't be a problem.
Moreover, I suspect if one uses the typical disambiguation rules in
yacc-like parsers, the ones borrowed from precedence parsing, you can
resolve that issue.
-- ****************************************************************************** Chris Clark email:
christopher.f.clark@compiler-resources.com Compiler Resources, Inc. Web Site:
http://world.std.com/~compres
23 Bailey Rd voice: (508) 435-5016
Berlin, MA 01503 USA twitter: @intel_chris ------------------------------------------------------------------------------ --- Synchronet 3.21b-Linux NewsLink 1.2