1 Commits

Author SHA1 Message Date
Jamie Hardt
10c0e4f038 Fixed regex statements in parser
This clears up a bunch of `DeprecationWarning`s in pytest
2022-11-06 12:25:25 -08:00
2 changed files with 8 additions and 8 deletions

View File

@@ -67,8 +67,8 @@ protools_text_export_grammar = Grammar(
fs = "\t"
rs = "\n"
block_ending = rs rs
string_value = ~"[^\t\n]*"
integer_value = ~"\d+"
float_value = ~"\d+(\.\d+)?"
isp = ~"[^\d\t\n]*"
string_value = ~r"[^\t\n]*"
integer_value = ~r"\d+"
float_value = ~r"\d+(\.\d+)?"
isp = ~r"[^\d\t\n]*"
""")

View File

@@ -18,11 +18,11 @@ tag_grammar = Grammar(
key_tag = "[" key "]" word_sep?
short_tag = "$" key "=" word word_sep?
full_text_tag = "{" key "=" value "}" word_sep?
key = ~"[A-Za-z][A-Za-z0-9_]*"
value = ~"[^}]+"
key = ~r"[A-Za-z][A-Za-z0-9_]*"
value = ~r"[^}]+"
tag_junk = word word_sep?
word = ~"[^ \[\{\$][^ ]*"
word_sep = ~" +"
word = ~r"[^ \[\{\$][^ ]*"
word_sep = ~r" +"
modifier = ("@" / "&") word_sep?
"""
)