Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
arpeggio-gm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
郭家华
arpeggio-gm
Commits
0faae5f5
Commit
0faae5f5
authored
11 years ago
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small performance fix
parent
6ae9d264
master
cleanpeg
gm/master
release/v0.7.x
release/v0.8.x
visitor
v0.9
v0.8.1
v0.8
v0.7.1
v0.7
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
__init__.py
arpeggio/__init__.py
+3
-4
No files found.
arpeggio/__init__.py
View file @
0faae5f5
...
@@ -157,15 +157,12 @@ class ParsingExpression(object):
...
@@ -157,15 +157,12 @@ class ParsingExpression(object):
if
parser
.
debug
:
if
parser
.
debug
:
print
(
">> Entering rule {}"
.
format
(
self
.
name
))
print
(
">> Entering rule {}"
.
format
(
self
.
name
))
if
parser
.
_in_parse_intro
:
parser
.
_in_parse_intro
=
True
# Do not recurse in parse_intro
return
# Skip whitespaces and parse comments if we are not
# Skip whitespaces and parse comments if we are not
# in the lexical rule
# in the lexical rule
if
not
parser
.
_in_lex_rule
:
if
not
parser
.
_in_lex_rule
:
parser
.
_skip_ws
()
parser
.
_skip_ws
()
parser
.
_in_parse_intro
=
True
if
parser
.
comments_model
and
not
parser
.
_in_parse_comment
:
if
parser
.
comments_model
and
not
parser
.
_in_parse_comment
:
parser
.
_in_parse_comment
=
True
parser
.
_in_parse_comment
=
True
try
:
try
:
...
@@ -184,6 +181,8 @@ class ParsingExpression(object):
...
@@ -184,6 +181,8 @@ class ParsingExpression(object):
parser
.
_in_parse_intro
=
False
parser
.
_in_parse_intro
=
False
def
parse
(
self
,
parser
):
def
parse
(
self
,
parser
):
if
not
parser
.
_in_parse_intro
:
self
.
_parse_intro
(
parser
)
self
.
_parse_intro
(
parser
)
# Current position could change in recursive calls
# Current position could change in recursive calls
...
...
This diff is collapsed.
Click to expand it.
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