Limitations of Operator Precedence Parsing? (Eric O'Dell)
4 Dec 1999 22:35:14 -0500

          From comp.compilers

Related articles
Limitations of Operator Precedence Parsing? (1999-12-04)
| List of all articles for this month |

From: (Eric O'Dell)
Newsgroups: comp.compilers
Date: 4 Dec 1999 22:35:14 -0500
Keywords: parse, question, comment

In several places I have read that operator precedence parsing is less
powerful than more sophisticated methods, which seems pretty obvious,
but I am puzzled by the remark -- I think it was in the dragon book --
that operator precendence "grammars" are not tightly coupled with the
languages they describe. I gather that this means that they will
either refuse what ought to be legal constructs or that they will
accept what ought not to be legal constructs. Am I understanding this

Unfortunately, most of the books on compiler design that I've been
able to lay my cash-starved hands on simply dismiss operator
precedence parsing out of hand without bothering to give concrete
examples of its limitations. This is a pity, since knowing why an
algorithm is inadequate can be quite instructive in knowing why others
are adequate.

I would really appreciate it if one of the resident experts here could
provide an example or two.


[They accept too much. There's no way in an OP parser to say that two
operators can't be composed with each other. -John]

Post a followup to this message

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