Top Qs
Timeline
Chat
Perspective
Simple precedence grammar
Context-free formal grammar From Wikipedia, the free encyclopedia
Remove ads
A simple precedence grammar is a context-free formal grammar that can be parsed with a simple precedence parser.[1] The concept was first created in 1964 by Claude Pair,[2] and was later rediscovered, from ideas due to Robert Floyd, by Niklaus Wirth and Helmut Weber who published a paper, entitled EULER: a generalization of ALGOL, and its formal definition, published in 1966 in the Communications of the ACM.[3]
![]() | This article may be too technical for most readers to understand. (December 2024) |
![]() | It has been suggested that Simple precedence parser be merged into this article. (Discuss) Proposed since May 2025. |
![]() | It has been suggested that Wirth–Weber precedence relationship be merged into this article. (Discuss) Proposed since May 2025. |
Remove ads
Formal definition
G = (N, Σ, P, S) is a simple precedence grammar if all the production rules in P comply with the following constraints:
- There are no erasing rules (ε-productions)
- There are no useless rules (unreachable symbols or unproductive rules)
- For each pair of symbols X, Y (X, Y (N ∪ Σ)) there is only one Wirth–Weber precedence relation.
- G is uniquely inversible
Remove ads
Examples
- precedence table
Remove ads
Notes
References
External links
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads