X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=kll.py;h=401d22e1f5b0de76b39812d3749a1d8538c4ccc6;hb=3f0149b7213fdcf28f94291ab5bcab2bed82ff91;hp=76dc3b50da92e8564a2e9275d4c89bf47a17fe02;hpb=6454917b11f89eb345d57daf9976ecfeab6509dc;p=kiibohd-kll.git diff --git a/kll.py b/kll.py index 76dc3b5..401d22e 100755 --- a/kll.py +++ b/kll.py @@ -387,7 +387,6 @@ def optionExpansion( sequences ): curLeafList[ leaf ] = 0 if leaf + 1 < len( curLeafList ): curLeafList[ leaf + 1 ] += 1 - break return expandedSequences @@ -553,9 +552,11 @@ def processKLLFile( filename ): data = file.read() tokenSequence = tokenize( data ) #print ( pformat( tokenSequence ) ) # Display tokenization - tree = parse( tokenSequence ) - - + try: + tree = parse( tokenSequence ) + except NoParseError as e: + print("Error parsing %s. %s" % (filename, e.msg), file=sys.stderr) + sys.exit(1) ### Main Entry Point ###