Skip to content

Commit

Permalink
Added table for PEG rules, fixes #223
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Nov 19, 2020
1 parent 1a28ece commit f1bbe47
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/Getting-Started.md
Expand Up @@ -102,6 +102,20 @@ Note, however, that all examples shown in this document will lack proper error h
Frequently an application will include `try-catch` blocks to handle the exceptions.
The correct way of handling errors is shown at the last paragraph of this page.

## Parsing Expression Grammars

The PEGTL creates parsers according to a [Parsing Expression Grammar](http://en.wikipedia.org/wiki/Parsing_expression_grammar) (PEG).

| PEG | `tao::pegtl::` |
| --- | --- |
| &*e* | [`at< R... >`](Rule-Reference.md#at-r-) <sup>[(combinators)](Rule-Reference.md#combinators)</sup> |
| !*e* | [`not_at< R... >`](Rule-Reference.md#not_at-r-) <sup>[(combinators)](Rule-Reference.md#combinators)</sup> |
| *e*? | [`opt< R... >`](Rule-Reference.md#opt-r-) <sup>[(combinators)](Rule-Reference.md#combinators)</sup> |
| *e*+ | [`plus< R... >`](Rule-Reference.md#plus-r-) <sup>[(combinators)](Rule-Reference.md#combinators)</sup> |
| *e*<sub>1</sub>*e*<sub>2</sub> | [`seq< R... >`](Rule-Reference.md#seq-r-) <sup>[(combinators)](Rule-Reference.md#combinators)</sup> |
| *e*<sub>1</sub> / *e*<sub>2</sub> | [`sor< R... >`](Rule-Reference.md#sor-r-) <sup>[(combinators)](Rule-Reference.md#combinators)</sup> |
| *e** | [`star< R... >`](Rule-Reference.md#star-r-) <sup>[(combinators)](Rule-Reference.md#combinators)</sup> |

## Grammar Analysis

Every grammar must be free of cycles that make no progress, i.e. the cycle does not consume any input.
Expand Down

0 comments on commit f1bbe47

Please sign in to comment.