This package and its subpackages contain the Falcon compiler.

The Falcon compiler compiles Flex code consisting of `.mxml` `.as`, `.css`, `.fxg`, and `.properties` files into SWF and SWC files.

The main entry point for compiling a SWF is in the `MXMLC` class in the package `org.apache.flex.compiler.clients`. The main entry point for compiling a SWC is in the `COMPC` class in the same package. The corresponding Ant tasks are in the package `org.apache.flex.compiler.ant`.

The `org.apache.flex.compiler` package makes use of the libraries in the `org.apache.flex.abc`, `org.apache.flex.swf`, and `org.apache.flex.swc` packages to read and write the ABC, SWF, and SWC formats. However, these support libraries are independent of the compiler.

Falcon is a large body of code but it is organized around ten core concepts, with a subpackage for each one:

Workspace | `org.apache.flex.compiler.workspaces` | The root object of the compiler's data structures. Owns projects to be compiled.
Project | `org.apache.flex.compiler.projects` | Owns compilation units to be compiled into one or more targets.
Target | `org.apache.flex.compiler.targets` | Manages the compilation of a set of compilation units into a SWF or SWC.
Compilation Unit | `org.apache.flex.compiler.units` | Manages the compilation of a single file. This typically involves building an AST and a file scope, performing semantic analysis to discover problems, and code-generating ABC for a `DoABC` SWF tag.
AST | `org.apache.flex.compiler.tree` | Represents almost every detail of a source file as a tree of nodes.
Scope | `org.apache.flex.compiler.scopes` | Organizes definitions -- named things declared in source code -- in a hierarchy that reflects the block structure of the source file. Scopes and definitions comprise a symbol table that allow AST nodes representing identifiers in the source code to be resolved to definitions (i.e., what they mean). A file scope contains the definitions defined with a single file. A project scope contains definitions that are visible between files.
Definition | `org.apache.flex.compiler.definitions` | Represents a named object in a scope, such as a class, interface, function, variable, etc.
Semantic Analysis | `org.apache.flex.compiler.analysis` | Resolves identifier nodes in an AST to definitions in a scope (and quite a bit more.)
Problem | `org.apache.flex.compiler.problems` | Represents an error or warning. Most problems are found during semantic analysis.
Code Generation | `org.apache.flex.compiler.codegen` | Reduces an AST to ABC, using scopes and definitions to understand what each node means. The bulk of code generation is handled by a BURM (Bottom-Up Rewrite Machine).

For more information, see the description of each of these packages.

The compiler code is organized into "external" and "internal" packages. The internal packages are all within `org.apache.flex.compiler.internal`. For example, `org.apache.flex.compiler.definitions` is an external package that contains the definition interfaces for clients of the compiler to use; `org.apache.flex.compiler.internal.definitions` is its internal counterpart that contains the definition classes that the compiler itself creates. Clients should never use code in an internal package; if it becomes necessary to do so, the code should be moved to an external package. The distinction can be important: in the case of definitions, for example, the methods in the interfaces are guaranteed to be safe to call from multiple threads, while the methods in the classes are not.