Skip to content

Compiler Options

M2SF Project Administrator edited this page May 29, 2017 · 5 revisions

Command Format

m2j information

or

m2j [dialects] [products] [capabilities] sourcefile [diagnostics]

Information Options

--help, -h
--version, -V
--license

Diagnostic Options

--verbose, -v
--lexer-debug
--parser-debug
--print-settings
--errant-semicolons

Defaults

all diagnostics are off

Compilation Product Options

--ast, --no-ast
--graph, --no-graph
--xlat, --no-xlat
--obj, --no-obj

--syntax-only  (--no-ast, --no-graph, --no-xlat, --no-obj)
--ast-only     (--no-graph, --no-xlat, --no-obj)
--graph-only   (--no-ast, --no-xlat, --no-obj)
--xlat-only    (--no-ast, --no-graph, --no-obj)
--obj-only     (--no-ast, --no-graph, --no-xlat)

In combination with option --xlat

--strip-comments
--preserve-comments

Defaults

--ast, --xlat, --obj, --preserve-comments

Dialect Options

--ext  (see capability table below)
--pim3 (see capability table below)
--pim4 (see capability table below)

Defaults

--ext

Capability Options

Available in Extended dialect mode

--lowline-identifiers, --no-lowline-identifiers
--to-do-statement, --no-to-do-statement

Defaults

--no-lowline-identifiers, --to-do-statement

Available in PIM3 and PIM4 dialect modes

--synonyms, --no-synonyms
--octal-literals, --no-octal-literals
--legacy-export, --no-legacy-export
--explicit-cast, --no-explicit-cast
--coroutines, --no-coroutines
--variant-records, --no-variant-records
--local-modules, --no-local-modules

--safer
  (--no-synonyms, --no-octal-literals, --explicit-cast,
   --no-coroutines, --no-variant-records, --no-local-modules)

--compliant
  (--synonyms, --octal-literals, --no-explicit-cast,
   --coroutines, --variant-records, --local-modules)

Defaults

--safer

Capabilities

Capabilities Extended PIM3 PIM4
Synonyms ~, &, <> off, immutable off, mutable off, mutable
Line comments on, immutable off, immutable off, immutable
Prefix literals on, immutable off, immutable off, immutable
Suffix literals off, immutable on, immutable on, immutable
Octal literals off, immutable off, mutable off, mutable
Lowline identifiers off, mutable off, immutable off, immutable
Escape tab and newline on, immutable off, immutable off, immutable
Set difference operator \ on, immutable off, immutable off, immutable
Postfix ++/-- statements on, immutable off, immutable off, immutable
Pragma delimiters <*, *> on, immutable off, immutable off, immutable
--------------------------- ---------------- ---------------- ----------------
Ignore PIM2 legacy exports off, immutable off, mutable off, mutable
Subtyped cardinals off, immutable off, immutable on, immutable
Safe string termination on, immutable off, immutable on, immutable
Import variables immutable on, immutable off, immutable off, immutable
CONST parameters on, immutable off, immutable off, immutable
Variadic parameters on, immutable off, immutable off, immutable
Additional types on, immutable off, immutable off, immutable
Additional functions on, immutable off, immutable off, immutable
Unified conversion on, immutable off, immutable off, immutable
Explicit cast on, immutable on, mutable on, mutable
--------------------------- ---------------- ---------------- ----------------
Coroutines off, immutable off, mutable off, mutable
Variant records off, immutable off, mutable off, mutable
Extensible records on, immutable off, immutable off, immutable
Indeterminate records on, immutable off, immutable off, immutable
Unqualified import off, immutable on, immutable on, immutable
Local modules off, immutable off, mutable off, mutable
WITH statement off, immutable on, immutable on, immutable
TO DO statement on, mutable off, immutable off, immutable
--------------------------- ---------------- ---------------- ----------------