STR-549: sglri does not print an error message if the parse table is bad
For example, I did
$ sglri -p PHP.def < example.php
$ echo $?
1Of course, PHP.def should have been PHP.tbl. But sglri should at least print out an error message.
Strangely, it doesn’t to this for all files. Usually it just gives an ATerm error:
$ sglri -p /dev/null
Submitted on 6 April 2006 at 17:23
readFromTextFile: parse error at line 0, col 0
not a valid term
Issue Log
STR-549, martin:
This is because a prefix of PHP.def was probably a valid aterm and was read as such, but of course wasn’t a valid parse table term.We’ll need to do something with a failed open-parse-table in sglri.
STR-549, martin:
Valid aterm prefix:martin@linux:~/tmp> cat bar.def
definition
martin@linux:~/tmp> sglri -i Foo2.java -p bar.def
[ sglri | critical ] The specified parse table file does not contain a parse tableNot a valid aterm prefix:
martin@linux:~/tmp> cat foo.def
#%^**#$^
martin@linux:~/tmp> sglri -i Foo2.java -p foo.def
readFromTextFile: parse error at line 0, col 0
not a valid term
[ sglri | critical ] Could not open parse table
Log in to post comments