Commit 8850a5da authored by Stefan Behnel's avatar Stefan Behnel

remove unused code from Lexicon.py

parent 59c3f07c
...@@ -37,32 +37,6 @@ def make_lexicon(): ...@@ -37,32 +37,6 @@ def make_lexicon():
fltconst = (decimal_fract + Opt(exponent)) | (decimal + exponent) fltconst = (decimal_fract + Opt(exponent)) | (decimal + exponent)
imagconst = (intconst | fltconst) + Any("jJ") imagconst = (intconst | fltconst) + Any("jJ")
sq_string = (
Str("'") +
Rep(AnyBut("\\\n'") | (Str("\\") + AnyChar)) +
Str("'")
)
dq_string = (
Str('"') +
Rep(AnyBut('\\\n"') | (Str("\\") + AnyChar)) +
Str('"')
)
non_sq = AnyBut("'") | (Str('\\') + AnyChar)
tsq_string = (
Str("'''")
+ Rep(non_sq | (Str("'") + non_sq) | (Str("''") + non_sq))
+ Str("'''")
)
non_dq = AnyBut('"') | (Str('\\') + AnyChar)
tdq_string = (
Str('"""')
+ Rep(non_dq | (Str('"') + non_dq) | (Str('""') + non_dq))
+ Str('"""')
)
beginstring = Opt(Any(string_prefixes) + Opt(Any(raw_prefixes)) | beginstring = Opt(Any(string_prefixes) + Opt(Any(raw_prefixes)) |
Any(raw_prefixes) + Opt(Any(bytes_prefixes)) | Any(raw_prefixes) + Opt(Any(bytes_prefixes)) |
Any(char_prefixes) Any(char_prefixes)
...@@ -76,7 +50,6 @@ def make_lexicon(): ...@@ -76,7 +50,6 @@ def make_lexicon():
Str('u') + four_hex | Str('x') + two_hex | Str('u') + four_hex | Str('x') + two_hex |
Str('U') + four_hex + four_hex | AnyChar) Str('U') + four_hex + four_hex | AnyChar)
deco = Str("@") deco = Str("@")
bra = Any("([{") bra = Any("([{")
ket = Any(")]}") ket = Any(")]}")
...@@ -102,7 +75,6 @@ def make_lexicon(): ...@@ -102,7 +75,6 @@ def make_lexicon():
(ket, Method('close_bracket_action')), (ket, Method('close_bracket_action')),
(lineterm, Method('newline_action')), (lineterm, Method('newline_action')),
#(stringlit, 'STRING'),
(beginstring, Method('begin_string_action')), (beginstring, Method('begin_string_action')),
(comment, IGNORE), (comment, IGNORE),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment