| 1 |
# see for example: |
| 2 |
# - http://textx.github.io/Arpeggio/ |
| 3 |
# - https://nim-lang.org/docs/pegs.html |
| 4 |
# - https://github.com/erikrose/parsimonious |
| 5 |
# can't handle parsimonious-style regex while ~ is a cut operator |
| 6 |
|
| 7 |
---input--- |
| 8 |
~"regex" i"insensitive" "multimod"ilx ("not modified") |
| 9 |
|
| 10 |
---tokens--- |
| 11 |
'~' Operator |
| 12 |
'"regex"' Literal.String.Double |
| 13 |
' ' Text |
| 14 |
'i"insensitive"' Literal.String.Double |
| 15 |
' ' Text |
| 16 |
'"multimod"ilx' Literal.String.Double |
| 17 |
' ' Text |
| 18 |
'(' Punctuation |
| 19 |
'"not modified"' Literal.String.Double |
| 20 |
')' Punctuation |
| 21 |
'\n' Text.Whitespace |