Skip to content
Snippets Groups Projects
Commit 8a43b8b9 authored by Xun Yang's avatar Xun Yang
Browse files

running joosc

parent 8a5a3d8d
No related branches found
No related tags found
No related merge requests found
#! /bin/bash #! /bin/bash
result=`python3 joosc.py $1` result=`python joosc.py $1`
1>&2 echo $result 1>&2 echo $result
if [ '$result' != "0" ] ; then if [ '$result' != "0" ] ; then
exit 42 exit 42
......
...@@ -16,12 +16,10 @@ def main(): ...@@ -16,12 +16,10 @@ def main():
try: try:
(tokens, errorString) = scan(content) (tokens, errorString) = scan(content)
except: except:
print("scan exception")
return 42 return 42
# Error in Scanning # Error in Scanning
if tokens is None: if tokens is None:
print("scan failed")
return 42 return 42
# Weed the tokens # Weed the tokens
...@@ -30,18 +28,15 @@ def main(): ...@@ -30,18 +28,15 @@ def main():
return 42 return 42
# Parsing # Parsing
try: (steps, error) = parse(tokens)
(steps, error) = parse(tokens)
except:
print("parse exception")
return 42
if steps is None: if steps is None:
print("parse failed")
# print(error)
return 42 return 42
print("success in scanning and parsing") # print("success in scanning and parsing")
return 0 return 0
main() re = main()
print(re)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment