'ptm_img' translates the given source file into a binary format and reverse. In the reverse case it 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 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.
Name | Type | Semantic |
Language | name | language name |
Img | path | path of the binary format |
Name | Type | Default value | Semantic |
FileName | path | "" | path of source file to parse |
charset | string | "" | source file character set ( UTF-8, UCS4, ... ) |
skipset | string | "" | ( ascii ) characters to be skipped |
lookahead | flag | false | enable n character lookahead |
binmode | flag | false | scan source file in binary mode ( not with charset-option ) |
wprint | flag | false | unicode / UTF-8 output ( on non-default character set ) |
prepar | string | "" | standard preprocessing: yes or list index~value , ... |
premac | string | "" | standard preprocessing: pre-defined macro , ... |
prefun | string | "" | user-defined preprocessing: Function@Library ( not with prepar-option ) |
Start | string | "" | start symbol |
xaron | flag | false | create a derivation tree ( lisp like representation ) |
early | flag | false | use early reduction |
shiftfun | string | "" | user-defined token conversion: Function@Library ( see [ptm_gen] ) |
reducefun | string | "" | user-defined nonterminal conversion: Function@Library ( see [ptm_gen] ) |
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:
The option 'premac' supports pre-defined macros in connection with styx-like preprocessing.
Dynamic library support is a prerequisite for the user-defined callback handler.
Name | Type | Default value | Semantic |
BINSTYX | path | PATH | search environment for [Language.pim] and [Language.lim] |