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
e49cebde
Commit
e49cebde
authored
Aug 07, 2014
by
Igor Dejanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A note in examples for .dot files creation in debug mode.
parent
bf1de23c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
0 deletions
+27
-0
bibtex.py
examples/bibtex.py
+3
-0
calc.py
examples/calc.py
+3
-0
calc_peg.py
examples/calc_peg.py
+3
-0
csv.py
examples/csv.py
+3
-0
json.py
examples/json.py
+3
-0
peg_peg.py
examples/peg_peg.py
+3
-0
robot.py
examples/robot.py
+3
-0
robot_peg.py
examples/robot_peg.py
+3
-0
simple.py
examples/simple.py
+3
-0
No files found.
examples/bibtex.py
View file @
e49cebde
...
...
@@ -129,6 +129,9 @@ def main(debug=False, file_name=None):
if
__name__
==
"__main__"
:
# First parameter is bibtex file
if
len
(
sys
.
argv
)
>
1
:
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
entries
=
main
(
debug
=
True
,
file_name
=
sys
.
argv
[
1
])
pp
=
pprint
.
PrettyPrinter
(
indent
=
4
)
pp
.
pprint
(
entries
)
...
...
examples/calc.py
View file @
e49cebde
...
...
@@ -121,5 +121,8 @@ def main(debug=False):
print
(
"{} = {}"
.
format
(
input_expr
,
result
))
if
__name__
==
"__main__"
:
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main
(
debug
=
True
)
examples/calc_peg.py
View file @
e49cebde
...
...
@@ -60,5 +60,8 @@ def main(debug=False):
print
(
"{} = {}"
.
format
(
input_expr
,
result
))
if
__name__
==
"__main__"
:
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main
(
debug
=
True
)
examples/csv.py
View file @
e49cebde
...
...
@@ -34,5 +34,8 @@ def main(debug=False):
parse_tree
=
parser
.
parse
(
test_data
)
if
__name__
==
"__main__"
:
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main
(
debug
=
True
)
examples/json.py
View file @
e49cebde
...
...
@@ -88,5 +88,8 @@ def main(debug=False):
parse_tree
=
parser
.
parse
(
testdata
)
if
__name__
==
"__main__"
:
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main
(
debug
=
True
)
examples/peg_peg.py
View file @
e49cebde
...
...
@@ -64,6 +64,9 @@ def main(debug=False):
# ParserPEG will use ParserPython to parse peg_grammar definition and
# create parser_model for parsing PEG based grammars
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
parser
=
ParserPEG
(
peg_grammar
,
'peggrammar'
,
debug
=
debug
)
# Now we will use created parser to parse the same peg_grammar used for
...
...
examples/robot.py
View file @
e49cebde
...
...
@@ -114,5 +114,8 @@ def main(debug=False):
print
(
"position = "
,
result
)
if
__name__
==
"__main__"
:
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main
(
debug
=
True
)
examples/robot_peg.py
View file @
e49cebde
...
...
@@ -72,5 +72,8 @@ def main(debug=False):
return
parser
.
getASG
(
sem_actions
=
semantic_actions
)
if
__name__
==
"__main__"
:
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
print
(
"position = "
,
main
(
debug
=
True
))
examples/simple.py
View file @
e49cebde
...
...
@@ -50,5 +50,8 @@ def main(debug=False):
if
__name__
==
"__main__"
:
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main
(
debug
=
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