Parsing expression grammar: Difference between revisions

Content deleted Content added
m Reverted edit by 2600:1006:B1A4:8F61:6E8A:2DB7:CAEC:C00E (talk) to last version by 209.94.142.169
Definition: Fixed spelling
Tags: Mobile edit Mobile web edit
Line 33:
A '''parsing expression grammar''' is a collection of named parsing expressions, which may reference each other. The effect of one such reference in a parsing expression is as if the whole referenced parsing expression was given in place of the reference. A parsing expression grammar also has a designated '''starting expression'''; a string matches the grammar if it matches its starting expression.
 
An element of a string matched is called a ''[[terminal symbol]]'', or '''terminal''' for short. Likewise the names assigned to parsing expressions are called ''[[nonterminal symbol]]s'', or '''nonterminals''' for short. These terms would be descriptive for [[Chomsky hierarchy|generative grammars]], but in the case of parsing expression grammars they are merely terminology, kept mostly because of being near ubiquousubiquitous in discussions of [[parsing]] algorithms.
 
=== Syntax ===