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
3b10ae04
Commit
3b10ae04
authored
Dec 28, 2014
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing speed test.
parent
e0a3a087
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
test_speed.py
tests/speed/test_speed.py
+3
-3
No files found.
tests/speed/test_speed.py
View file @
3b10ae04
...
@@ -21,9 +21,9 @@ from arpeggio import OneOrMore, ZeroOrMore, EOF, ParserPython, Optional
...
@@ -21,9 +21,9 @@ from arpeggio import OneOrMore, ZeroOrMore, EOF, ParserPython, Optional
from arpeggio import RegExMatch as _
from arpeggio import RegExMatch as _
def number(): return _(r'
\
d*
\
.
\
d*|
\
d+')
def number(): return _(r'
\
d*
\
.
\
d*|
\
d+')
def factor(): return [(Optional([
"+","-"]), number), ("(", expression,
")")]
def factor(): return [(Optional([
u"+",u"-"]), number), (u"(", expression, u
")")]
def term(): return factor, ZeroOrMore([
"*",
"/"], factor)
def term(): return factor, ZeroOrMore([
u"*",u
"/"], factor)
def expression(): return term, ZeroOrMore([
"+",
"-"], term)
def expression(): return term, ZeroOrMore([
u"+", u
"-"], term)
def calcfile(): return OneOrMore(expression), EOF
def calcfile(): return OneOrMore(expression), EOF
parser = ParserPython(calcfile, reduce_tree=True)
parser = ParserPython(calcfile, reduce_tree=True)
...
...
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