Groups | Search | Server Info | Login | Register


Groups > comp.compilers > #3604

RE: LR Parsing of Permutation Phrases

Path csiph.com!weretis.net!feeder9.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From Christopher F Clark <christopher.f.clark@compiler-resources.com>
Newsgroups comp.compilers
Subject RE: LR Parsing of Permutation Phrases
Date Sat, 12 Oct 2024 21:34:24 +0300
Organization Compilers Central
Sender johnl%iecc.com
Approved comp.compilers@iecc.com
Message-ID <24-10-006@comp.compilers> (permalink)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Injection-Info gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="59347"; mail-complaints-to="abuse@iecc.com"
Keywords LR(1), parse
Posted-Date 12 Oct 2024 15:24:32 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:3604

Show key headers only | View raw


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
------------------------------------------------------------------------------

Back to comp.compilers | Previous | Next | Find similar


Thread

RE: LR Parsing of Permutation Phrases Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2024-10-12 21:34 +0300

csiph-web