Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pybison
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
pybison
Commits
2331ecff
Commit
2331ecff
authored
Dec 08, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup and applied pyflakes' suggestions.
parent
3e04c23b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
37 deletions
+33
-37
doc/calc.py
doc/calc.py
+14
-16
examples/calc/calc.py
examples/calc/calc.py
+14
-16
examples/calc/run.py
examples/calc/run.py
+0
-1
examples/calc1/calc1.py
examples/calc1/calc1.py
+3
-2
examples/java/run.py
examples/java/run.py
+1
-1
examples/template/template.py
examples/template/template.py
+1
-1
No files found.
doc/calc.py
View file @
2331ecff
...
...
@@ -2,9 +2,7 @@
"""
A simple pybison parser program implementing a calculator
"""
import
sys
from
bison
import
BisonParser
,
BisonNode
from
bison
import
BisonParser
class
Parser
(
BisonParser
):
"""
...
...
examples/calc/calc.py
View file @
2331ecff
...
...
@@ -2,9 +2,7 @@
"""
A simple pybison parser program implementing a calculator
"""
import
sys
from
bison
import
BisonParser
,
BisonNode
from
bison
import
BisonParser
class
Parser
(
BisonParser
):
"""
...
...
examples/calc/run.py
View file @
2331ecff
#!/usr/bin/env python
import
readline
import
sys
sys
.
path
.
insert
(
0
,
'../../build/lib.linux-x86_64-2.7/'
)
...
...
examples/calc1/calc1.py
View file @
2331ecff
...
...
@@ -3,9 +3,10 @@
A more advanced calculator example, with variable storage and scientific
functions (courtesy of python 'math' module)
"""
import
sys
,
math
,
readline
import
math
from
bison
import
BisonParser
from
bison
import
BisonParser
,
BisonNode
,
BisonError
class
Parser
(
BisonParser
):
"""
...
...
examples/java/run.py
View file @
2331ecff
...
...
@@ -25,7 +25,7 @@ else:
src
=
"I2PClient.java"
p
=
myjava
.
Parser
(
verbose
=
verbose
)
p
=
javaparser
.
Parser
(
verbose
=
verbose
)
print
"delmebld.py: running parser on HelloWorldApp.java"
res
=
p
.
run
(
file
=
src
)
...
...
examples/template/template.py
View file @
2331ecff
...
...
@@ -11,7 +11,7 @@ You can do much worse than to copy this file
somewhere, and tinker away to your heart's content.
"""
import
sys
,
traceback
import
sys
from
bison
import
BisonParser
,
BisonNode
...
...
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