Jump to content

Simple precedence grammar

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by PigFlu Oink (talk | contribs) at 01:54, 24 May 2009 (fmt headline levels to start with "==", WikiCheck check #19 ). 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 a simple precedence parser.

Formal definition

G = (N, Σ, P, S) is a simple precedence grammar if all the production rules in P comply with the following constraints:

Examples

Example 1

precedence table:

S a b c $
S
a
b
c
$