Skip to content

Compiler Options

Benjamin Kowarsch edited this page Jun 8, 2017 · 2 revisions

Command Format

m2cc information

or

m2cc [products] [capabilities] sourcefile [diagnostics]

Information Options

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

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

Capability Options

--lowline-identifiers, --no-lowline-identifiers
--dollar-identifiers, --no-dollar-identifiers

Experimental

--exponentiation-operator, --no-exponentiation-operator

Defaults

--no-lowline-identifiers, --no-dollar-identifiers,
--no-exponentiation-operator

Diagnostic Options

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

Defaults

all diagnostics are off

Clone this wiki locally