# call parser
$parser->run(
stream => \@streamData,
files => \@ARGV,
filter => 'perl|sdf|html',
safe => exists $options{activeContents} ? $safe : undef,
activeBaseData => {
targetLanguage => 'SDF',
userSettings => {map {$_=>1} exists $options{set} ? @{$options{set}} : ()},
},
predeclaredVars => {
CONVERTER_NAME => basename($0),
CONVERTER_VERSION => do {no strict 'refs'; ${join('::', __PACKAGE__, 'VERSION')}},
},
vispro => 1,
cache => (exists $options{cache} ? CACHE_ON : CACHE_OFF)
+ (exists $options{cacheCleanup} ? CACHE_CLEANUP : 0),
display => DISPLAY_ALL
+ (exists $options{noinfo} ? DISPLAY_NOINFO : 0)
+ (exists $options{nowarn} ? DISPLAY_NOWARN : 0),
trace => TRACE_NOTHING
+ ((exists $options{trace} and $options{trace} & 1) ? TRACE_PARAGRAPHS : 0)
+ ((exists $options{trace} and $options{trace} & 2) ? TRACE_LEXER : 0)
+ ((exists $options{trace} and $options{trace} & 4) ? TRACE_PARSER : 0)
+ ((exists $options{trace} and $options{trace} & 8) ? TRACE_SEMANTIC : 0)
+ ((exists $options{trace} and $options{trace} & 16) ? TRACE_ACTIVE : 0),
) or exit(1); |