For example, I did

$ sglri -p PHP.def < example.php

$ echo $?
1

Of 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
readFromTextFile: parse error at line 0, col 0
not a valid term

Submitted on 6 April 2006 at 17:23

On 2 June 2006 at 16:38 Jira commented:

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.


On 2 July 2006 at 02:18 Jira commented:

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 table

Not 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