Commit 93a7e010 authored by Igor Dejanovic's avatar Igor Dejanovic

Small change in calc_peg example

parent 3eadb8fa
...@@ -52,12 +52,11 @@ def main(debug=False): ...@@ -52,12 +52,11 @@ def main(debug=False):
result = parser.getASG(sem_actions) result = parser.getASG(sem_actions)
if debug: # getASG will start semantic analysis.
# getASG will start semantic analysis. # In this case semantic analysis will evaluate expression and
# In this case semantic analysis will evaluate expression and # returned value will be evaluated result of the input_expr expression.
# returned value will be evaluated result of the input_expr expression. # Semantic actions are supplied to the getASG function.
# Semantic actions are supplied to the getASG function. print("{} = {}".format(input_expr, result))
print("{} = {}".format(input_expr, result))
if __name__ == "__main__": if __name__ == "__main__":
# In debug mode dot (graphviz) files for parser model # In debug mode dot (graphviz) files for parser model
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment