SLR(1) parsers (Richard L. Goerwitz)
Thu, 20 May 1993 01:36:34 GMT

          From comp.compilers

Related articles
SLR(1) parsers (1993-05-20)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Richard L. Goerwitz)
Keywords: LR(1), parse
Organization: University of Chicago
Date: Thu, 20 May 1993 01:36:34 GMT

It's always said that SLR(1) parsers aren't *quite* powerful enough for
many programming languages. Fair enough. The classic example is

S -> L '=' R
S -> R
L -> '*' R
L -> id
R -> L

Just on naive inspection, it seems a dummy precedence could clear things
up, assuming that we have a precedence-based conflict resolu- tion

First question: Is my naive intuition right that dummy precedences can in
fact clear up many of the supposed problems with SLR(1) parsers? Second
question: If dummy precedences can do this (which may not be possible -
but if it is), then is there some really useful construct for which they
can't act as a band-aid?

      -Richard L. Goerwitz goer%midway@uchicago.bitnet rutgers!oddjob!ellis!goer

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.