pim_test Parser test program


'pim_test' parses the given source file and lists the derivation tree on stdout. The source file must be conform with the language parameter. It uses the image files of the parser and scanner tables, [Language.lim] and [Language.pim].

In the case you specify a start symbol the parsing process starts from this nonterminal. The symbol must be specified as valid start nonterminal in [Language.sty]. If the option is omitted the parser takes the first start nonterminal.

Arguments


NameTypeSemantic
Language name language name
FileName path path of source file to parse



Options

An option will be specified as follows: -<Name>=<Value>
The default value will be applied when the option wasn't specified.

NameTypeDefault valueSemantic
Start string"" start symbol
charset string"" source file character set ( UTF-8, UCS4, ... )
binmode flagfalse scan source file in binary mode ( not with charset-option )
wprint flagfalse unicode output ( on non-default character set )
tree flagtrue create a derivation tree ( optimized memory representation )
xaron flagfalse create a derivation tree ( lisp like representation )
early flagfalse use early reduction
prepar string"" preprocessing: index~value , ...
premac string"" preprocessing: pre-defined macro , ...

The options 'prepar' and 'premac' are only useful with styx-like preprocessing.

If your language uses the same preprocessing directives as specified in [styx.sty], but differnt macro token identifiers and keywords, the option 'prepar' can be used to enable preprocessing and specify the differences as a comma separated list:

  1. 0~name of identifier token
  2. 1~name of macro definition token
  3. 2~name of argument separator token
  4. 3~name of include token
  5. 4~name of conditional token
  6. 5~#macro keyword
  7. 6~#end keyword
  8. 7~#ifdef keyword
  9. 8~#ifndef keyword
  10. 9~#else keyword
  11. 10~#include keyword
  12. 11~environment variable as search path for include files
  13. 12~include file character set ( default: charset-option )

The option 'premac' supports pre-defined macros in connection with styx-like preprocessing.

Environment

An environment variable will be specified as followed: -<Name>=<Value>
The default value will be applied when no environment variable was specified.

NameTypeDefault valueSemantic
PATH path search path for [Language.pim] and [Language.lim]