Code Generation Targets

The compiler currently supports three main code generation targets. A fourth, the HTML target, should be considered experimental. If a target is not specified then the compiler will validate the correctness of the source files and the exit.

Code Generation Target Names

html

Generates pure HTML code. Note that this will fail unless the optimizer can reduce each source file to a list of print() calls. The optimizer is currently rather limited, and so use of this target is experimental at best.

asp

Generates ASP (Active Server Pages) code. The code produced uses the JScript version 3.0 scripting language and is compatible with Microsoft IIS 4.0 and later versions.

jsp

Generates JSP (Java Server Pages) code compatible with the JSP 1.2 specification.

php

Generates PHP (Hypertext Preprocessor) code. Currently the PHP code generated is compatible with PHP version 4.2 and later versions.

The way in which you specify the code generation target depends upon the way in which you invoke the compiler; see the section called “Specifying Compiler Options”.

You can also specify a number of flags that affect code generation and the compiler's operation in general. Valid flags are:

Compiler Flags

linenos

Each statement of the generated code is preceded with a comment showing the source file and line number that the statement was generated from. This is a debugging aid.

tokens

Display a list of lexical tokens from each source file parsed.

parse

Display the parse tree for each source file.

types

Display the parse tree with type information for each source file.

trans

Display the parse tree after the transformation stage for each source file.

opt

Display the parse tree after optimization for each source file.

passes

Display extra miscellaneous messages describing the passes performed by the compiler.