Skip to content

Commit

Permalink
Adapt classical PEG syntax to arpeggio equivalent. Some tests fail
Browse files Browse the repository at this point in the history
  • Loading branch information
jontxu committed Oct 18, 2023
1 parent bd7e5c4 commit 7524aa9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/peg/testpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def get_parser(debug=False, root='query_specification'):
peg_rules = re.sub('#', '// ', peg_rules)

# adapt character range syntax
peg_rules = re.sub("'\\[", "r'[", peg_rules)
peg_rules = re.sub("\\[", "r'[", peg_rules)
peg_rules = re.sub("\\!r'\\[", "r'[^", peg_rules)
peg_rules = re.sub("\\]", "]'", peg_rules)
peg_rules = re.sub("EOF <-[^;]*;", "", peg_rules)

return ParserPEG(peg_rules,
root,
Expand Down

0 comments on commit 7524aa9

Please sign in to comment.