Clone wiki

inf225public / glossary / Parsing expression grammar

[Alphabetical Index | Tag Index]

Parsing expression grammar*

A form of Analytic grammar, giving rules that can be directly applied to parse a string top-down. Similar to a Context-free grammar, but the rules are unambiguously interpreted; for example, alternatives are tried in order. Related to parse combinators. PEGs are a useful and straight-forward technique for parsing software languages. It is suspected that there are context-free languages that cannot be parsed by a PEG, but this has not been proved.