'stypp' serves as a pretty printer for source files written in a styx-conform language. Beside that it can be used to port source files, provided that the abstract syntax of the source and target language are equivalent. The conversion includes all comments. A user-defined token conversion handler can be applied.
The work on this program, especially on the pretty printer layout, ist still in progress.
The current version doesn't support the embedded language facility.
Name | Type | Semantic |
srclang | name | source language name |
dstlang | name | target language name |
filename | path | path of source file to transform |
Name | Type | Default value | Semantic |
charset | string | "" | source file character set ( UTF-8, UCS4, ... ) |
skipset | string | "" | ( ascii ) characters to be skipped |
lookahead | flag | false | enable n character lookahead |
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] ) |
ppfun | string | "" | user-defined token conversion: Function@Library ( see [ptm_pp] ) |
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 [srclang.pim], [srclang.lim], [dstlang.pim] and [dstlang.lim] |