Here is some documentation for the SANY stand-alone parser:
The switches for the sany parser are:
-s : parsing only, no semantic analysis
-l : omit level checking
-d : debugging mode, see below
-stat : does not seem to do anything
Debugging mode provides a command line with the following
commands, where N is a number
mt [N] : prints module table, which seems to be a context/symbol table,
giving the list of defined/declared symbols, their name,
and their UID. If N is given, it prints to depth N.
Default is N = 2
mt* [N] : Like mt, except it also prints the Naturals module
if it's EXTENDed and it prints the module
contexts.
cst : Prints concrete syntax tree of everything. It accepts
a second argument but seems to ignore it
s token : Seems to print concrete syntax tree for object
corresponding to token. Note: if token is omitted,
it seems to take the token to be the 2nd token in
the last command with two tokens.
N1 [N2] : prints the node with uid = N1 to depth N2. Default
seems to be N2 = 4.
qu : quit
Note: If either the -l or -s switches are used, or if an error occurs,
then level checking is not done. This implies that any command that
tries to print level information will throw an exception.
To find a module's Theorem, Assumption, UseOrHide, and Instance nodes,
print the module node, whose node uid is obtained with the mt command.
The uids of OpDef nodes are also obtained from the mt command.