put the last regex in the syntax file
This commit is contained in:
parent
c21d034217
commit
68d8af9fd2
|
|
@ -4,6 +4,7 @@ from itertools import zip_longest
|
||||||
|
|
||||||
import pyparsing as pp
|
import pyparsing as pp
|
||||||
# import rich
|
# import rich
|
||||||
|
import regex # future: remove regex
|
||||||
|
|
||||||
pps = pp.Suppress
|
pps = pp.Suppress
|
||||||
|
|
||||||
|
|
@ -237,6 +238,10 @@ def readable_markup(list_of_tokens):
|
||||||
return " ".join(readable_list)
|
return " ".join(readable_list)
|
||||||
|
|
||||||
|
|
||||||
|
# Pre-parser expressions
|
||||||
|
rgx_import_file = regex.compile(r'::( ?\< ?(?P<file_name>[\w\-._/]+) ?\>[ \s]*)+')
|
||||||
|
|
||||||
|
|
||||||
# Base elements
|
# Base elements
|
||||||
quotes = pp.Word(r""""'""")
|
quotes = pp.Word(r""""'""")
|
||||||
value = (pps(quotes) + pp.Word(pp.alphanums + r'.') + pps(pp.match_previous_literal(quotes)) ^
|
value = (pps(quotes) + pp.Word(pp.alphanums + r'.') + pps(pp.match_previous_literal(quotes)) ^
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue