The first compile phase produces a parsed and partially checked object file given an input text (source) file.
The source file is a text file in the HAC language. The object file, if given, is the result of the compile. If the object file is omitted, the program just reports the result of complation without producing an object file.
Options:
general compile flags (repeatable) where optname is one of the following:
- dump-include-paths: dumps -I include paths as they are processed
- dump-object-header: (diagnostic) dumps persistent object header before saving
- no-dump-include-paths: suppress feedback of -I include paths
- no-dump-object-header: suppress persistent object header dump
- case-collision=[ignore|warn|error]: Set the error handling policy for case-insensitive collisions.
- ignore skips the check altogether
- warn issues a warning but continues
- error rejects and aborts compiling
- unknown-spec=[ignore|warn|error]: Sets the error handling policy for unknown spec directives.
Dialect flags (for ACT-compatibility):
ACT is a preset that activates all ACT-mode flags for compatibility.
- export-all: Treat all definitions as exported, i.e. no export checking.
- export-strict: Check that definitions are exported for use outside their respective home namespaces (default, ACT).
- namespace-instances Allow instance management outside global namespace (default). Negatable with no- prefixed. ACT mode: no-namespace-instances.
- array-internal-nodes Allow implicit arrays of internal nodes in PRS (default). Negatable with no- prefixed. ACT mode: no-array-internal-nodes.
The following options are forwarded to the create-phase of compilation by the driver. That is, they do not have any affect until the create phase. These options must be specified up-front at compile-time and cannot be overriden at create-time on the command line.
- canonical-shortest-hier: Only consider hierarchical depth (number of member-dots) for choosing canonical alias, no further tiebreaker.
- canonical-shortest-length: In addition to minimizing the hierarchy depth, also use overall string length as a tiebreaker.
- canonical-shortest-stage: (unimplemented) Considers length of identifiers stage-by-stage when hierarchical depths are equal. This is for best compatibility with ACT mode.
Emit import dependencies in file depfile as a side-effect. Useful for automatic dynamic dependency-tracking in Makefiles.
Names objfile as the output object file to save. This is an alternative to naming the object file as the second non-option argument.
Expect input to be piped from stdin rather than a named file. Since the name of the input file is omitted in this case, the only non-option argument (if any) is interpreted as the name of the output object file.
haco is provided as a single-command alias to hackt compile1.
TODO: quick explanation of parse errors.