Jump to content

Simple precedence grammar

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Qsebas (talk | contribs) at 02:26, 14 June 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A Simple precedence grammar is a context-free formal grammar that can be parsed with Simple precedence parser

Formal definition

G = (N, Σ, P, S) is a Simple precedence grammar such that all the productions rules in P complies with the following constraints:

Examples

Example number 1

precedence table:
S a b c
S
a
b
c
As there is no conflict present in the table, and there is no Useless Rules nor Erasing Rules, and the grammar is Uniquely Inversible, this grammar is a Simple precedence grammar