Simple precedence grammar

Simple precedence grammar

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

__TOC__

=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 (unreacheable symbols or unproductives rules)
* For each pair of symbols "X", "Y" ("X", "Y" in ("N" ∪ Σ)) there is only one Wirth-Weber precedence relation.
* G is uniquely inversible

=Examples=

Example 1

S o aSSb | c

precedence table:


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Simple precedence parser — In computer science, a Simple precedence parser is a type of bottom up parser for context free grammars that can be used only by Simple precedence grammars.The implementation of the parser is quite similar to the generic bottom up parser. A stack …   Wikipedia

  • Operator-precedence grammar — An operator precedence grammar is a kind of grammar for formal languages. Technically, an operator precedence grammar is a context free grammar that has the property (among others[1]) that no production has either an empty right hand side or two… …   Wikipedia

  • Wirth-Weber precedence relationship — The Wirth Weber relationship between a pair of symbols (V t cup V n) is necessary to determine if a formal grammar is a Simple precedence grammar, and in such case the Simple precedence parser can be used. The goal is to identify the when the… …   Wikipedia

  • Operator-precedence parser — An operator precedence parser is a bottom up parser that interprets an operator precedence grammar. For example, most calculators use operator precedence parsers to convert from the human readable infix notation with order of operations format… …   Wikipedia

  • Parser Grammar Engine — The Parser Grammar Engine (originally Parrot Grammar Engine) or PGE is a compiler and runtime for a Perl 6 rules for the Parrot virtual machine. [cite web | url=http://search.cpan.org/ ltoetsch/parrot 0.2.2/compilers/pge/README | title=Parrot… …   Wikipedia

  • Parsing expression grammar — A parsing expression grammar, or PEG, is a type of analytic formal grammar that describes a formal language in terms of a set of rules for recognizing strings in the language. A parsing expression grammar essentially represents a recursive… …   Wikipedia

  • Chinese grammar — This article describes the grammar of Standard Chinese. For the grammars of other forms of Chinese, see their respective articles via links on Chinese language and varieties of Chinese. 中文語法/中文语法 Zhōngwén yǔfǎ (Chinese grammar) Standard Chinese… …   Wikipedia

  • Stochastic context-free grammar — A stochastic context free grammar (SCFG; also probabilistic context free grammar, PCFG) is a context free grammar in which each production is augmented with a probability. The probability of a derivation (parse) is then the product of the… …   Wikipedia

  • Speech Recognition Grammar Specification — Die Speech Recognition Grammar Specification (SRGS) ist ein W3C Standard, der beschreibt, wie Spracherkennungs Grammatiken (engl. speech recognition grammars) spezifiziert werden. Eine Spracherkennungs Grammatik ist ein Reihe von Wortschemen, die …   Deutsch Wikipedia

  • Parsing — In computer science and linguistics, parsing, or, more formally, syntactic analysis, is the process of analyzing a sequence of tokens to determine their grammatical structure with respect to a given (more or less) formal grammar.Parsing is also… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”