| 1 |
# The LaTeX3 package `pegmatch` |
| 2 |
|
| 3 |
``` |
| 4 |
Caption : Parsing Expression Grammars for TeX |
| 5 |
Author : Jianrui Lyu <[email protected]> |
| 6 |
CTAN Page : https://ctan.org/pkg/pegmatch |
| 7 |
Repository : https://github.com/lvjr/pegmatch |
| 8 |
License : The LaTeX Project Public License 1.3c |
| 9 |
``` |
| 10 |
|
| 11 |
The `pegmatch` package ports PEG ([Parsing Expression Grammars](https://bford.info/packrat/)) to TeX. |
| 12 |
Following the design in LPEG ([Parsing Expression Grammars for Lua](https://www.inf.puc-rio.br/~roberto/lpeg/)), |
| 13 |
it defines patterns as LaTeX3 variables, and offers several operators to compose patterns. |
| 14 |
In general, PEG matching is much more powerful than RE (Regular Expressions) matching. |
| 15 |
At this time, `pegmatch` package only supports TeX strings. |
| 16 |
Also it is still in experimental status, hence some interfaces may change in future releases. |