-
Couldn't load subscription status.
- Fork 2
CLI Arguments
m2pp information
or
m2pp sourcefile [options] [diagnostics]
--help, -h
--version, -V
--license
--build-info
The --help option prints usage information to the console.
The --version option prints the executable's version to the console.
The --license option prints license information to the console.
The --build-info option prints the executable's build parameters to the console.
The following processing options are available.
--outfile
--dict
--tabwidth
--newline
The --outfile option may be used to specify a custom target file name.
outfileOption :=
'--outfile' filename
;
The --dict option may be used to pass key/value pairs to m2pp for placeholder expansion.
dictionaryOption :=
'--dict' keyValuePair+
;
keyValuePair :=
key '=' value
;
alias key, value = StdIdent;
StdIdent :=
Letter ( Letter | Digit )*
;
The --tabwidth option may be used to set the tabulator width for ASCII TAB expansion.
A value of 0 leaves TABs in the output. For values greater than 0 m2pp will replace TABs with spaces. The default value is 0.
tabWidthOption :=
'--tabwidth' Digit
;
The --newline option may be used to set the newline mode. The default mode is LF.
newlineModeOption :=
'--newline' ( 'cr' | 'lf' | 'crlf' )
;
--verbose, -v
--show-settings
$ m2pp Stacks.gen.def --outfile IntStack.def --dict valueType=INTEGER maxDepth=100
Generates library interface IntStack.def from template Stacks.gen.def replacing each occurrence of placeholder valueType with INTEGER and any occurrence of placeholder maxDepth with 100.
$ m2pp Console.gen.mod --dict ver=iso
Generates ISO Modula-2 specific library module Console.iso.mod from template Console.gen.mod.
$ m2pp Jurassic.mod --tabwidth 4 --newline crlf
Reformats file Jurassic.mod by replacing each TAB with whitespace to match a tabulator width of four and replacing each end-of-line with CR LF.
Copyright © 2017 Modula-2 Software Foundation