This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/snippets/peg/test_operators.txt
2022-12-04 16:06:01 +01:00

29 lines
639 B
Text

# see for example:
# - https://github.com/gvanrossum/pegen
# - https://nim-lang.org/docs/pegs.html
---input---
rule = 'a' | 'b'
rule: 'a' ~ 'b'
---tokens---
'rule' Name.Class
' ' Text
'=' Operator
' ' Text
"'a'" Literal.String.Single
' ' Text
'|' Operator
' ' Text
"'b'" Literal.String.Single
'\n' Text.Whitespace
'rule' Name.Class
':' Operator
' ' Text
"'a'" Literal.String.Single
' ' Text
'~' Operator
' ' Text
"'b'" Literal.String.Single
'\n' Text.Whitespace