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
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
backend
arpeggio-gm
Commits
62080f76
Commit
62080f76
authored
Sep 08, 2014
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eolterm propagation fix
parent
96570573
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
__init__.py
arpeggio/__init__.py
+16
-12
No files found.
arpeggio/__init__.py
View file @
62080f76
...
...
@@ -397,10 +397,11 @@ class ZeroOrMore(Repetition):
def
_parse
(
self
,
parser
):
results
=
[]
# Remember current eolterm and set eolterm of
# this repetition
old_eolterm
=
parser
.
eolterm
parser
.
eolterm
=
self
.
eolterm
if
self
.
eolterm
:
# Remember current eolterm and set eolterm of
# this repetition
old_eolterm
=
parser
.
eolterm
parser
.
eolterm
=
self
.
eolterm
while
True
:
try
:
...
...
@@ -409,8 +410,9 @@ class ZeroOrMore(Repetition):
except
NoMatch
as
e
:
parser
.
position
=
c_pos
# Backtracking
# Restore previous eolterm
parser
.
eolterm
=
old_eolterm
if
self
.
eolterm
:
# Restore previous eolterm
parser
.
eolterm
=
old_eolterm
if
results
:
break
...
...
@@ -428,10 +430,11 @@ class OneOrMore(Repetition):
results
=
[]
first
=
False
# Remember current eolterm and set eolterm of
# this repetition
old_eolterm
=
parser
.
eolterm
parser
.
eolterm
=
self
.
eolterm
if
self
.
eolterm
:
# Remember current eolterm and set eolterm of
# this repetition
old_eolterm
=
parser
.
eolterm
parser
.
eolterm
=
self
.
eolterm
while
True
:
try
:
...
...
@@ -441,8 +444,9 @@ class OneOrMore(Repetition):
except
NoMatch
:
parser
.
position
=
c_pos
# Backtracking
# Restore previous eolterm
parser
.
eolterm
=
old_eolterm
if
self
.
eolterm
:
# Restore previous eolterm
parser
.
eolterm
=
old_eolterm
if
not
first
:
raise
...
...
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