Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4ccea941
Commit
4ccea941
authored
Jun 30, 2000
by
Fredrik Lundh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- reverted to "\x is binary byte"
- removed evil tabs from sre_parse and sre_compile
parent
1739be50
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
Lib/sre_compile.py
Lib/sre_compile.py
+1
-1
Lib/sre_parse.py
Lib/sre_parse.py
+5
-4
Lib/test/output/test_sre
Lib/test/output/test_sre
+0
-1
No files found.
Lib/sre_compile.py
View file @
4ccea941
...
...
@@ -39,7 +39,7 @@ def _compile(code, pattern, flags):
return
_sre
.
getlower
(
literal
,
flags
)
else
:
emit
(
OPCODES
[
op
])
fixup
=
lambda
x
:
x
fixup
=
lambda
x
:
x
skip
=
len
(
code
);
emit
(
0
)
for
op
,
av
in
av
:
emit
(
OPCODES
[
op
])
...
...
Lib/sre_parse.py
View file @
4ccea941
...
...
@@ -19,8 +19,9 @@ from sre_constants import *
# FIXME: should be 65535, but the arraymodule is still broken
MAXREPEAT
=
32767
# FIXME: same here
CHARMASK
=
0x7fff
# FIXME: might change in 2.0 final. but for now, this seems
# to be the best way to be compatible with 1.5.2
CHARMASK
=
0xff
SPECIAL_CHARS
=
".
\
\
[{()*+?^$|"
REPEAT_CHARS
=
"*+?{"
...
...
@@ -616,9 +617,9 @@ def expand_template(template, match):
a
=
p
.
append
sep
=
match
.
string
[:
0
]
if
type
(
sep
)
is
type
(
""
):
char
=
chr
char
=
chr
else
:
char
=
unichr
char
=
unichr
for
c
,
s
in
template
:
if
c
is
LITERAL
:
a
(
char
(
s
))
...
...
Lib/test/output/test_sre
View file @
4ccea941
test_sre
=== Failed incorrectly ('\\x00ffffffffffffff', '\377', 0, 'found', '\377')
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
=== grouping error ('([^/]*/)*sub1/', 'd:msgs/tdir/sub1/trial/away.cpp', 0, 'found+"-"+g1', 'd:msgs/tdir/sub1/-tdir/') 'd:msgs/tdir/sub1/-trial/' should be 'd:msgs/tdir/sub1/-tdir/'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment