diff --git a/joosc b/joosc index 3d523afc597a258c7708fba04c1d8b66069d9a2c..f21cd0546eea6e286f52e333dce658db693b2005 100755 --- a/joosc +++ b/joosc @@ -1,5 +1,5 @@ #! /bin/bash -result=`python3 joosc.py $1` +result=`python joosc.py $1` 1>&2 echo $result if [ '$result' != "0" ] ; then exit 42 diff --git a/joosc.py b/joosc.py index 5aa7469accaccc76dada4d6275be16d65853cd37..651d2cebd9814959e018fe64fc8f661d804f66ca 100644 --- a/joosc.py +++ b/joosc.py @@ -16,12 +16,10 @@ def main(): try: (tokens, errorString) = scan(content) except: - print("scan exception") return 42 # Error in Scanning if tokens is None: - print("scan failed") return 42 # Weed the tokens @@ -30,18 +28,15 @@ def main(): return 42 # Parsing - try: - (steps, error) = parse(tokens) - except: - print("parse exception") - return 42 + (steps, error) = parse(tokens) + + if steps is None: - print("parse failed") - # print(error) return 42 - print("success in scanning and parsing") + # print("success in scanning and parsing") return 0 -main() +re = main() +print(re)