Package iota
Class Main
java.lang.Object
iota.Main
This is the main entry point for the iota compiler. The compiler proceeds as follows:
- It reads arguments that affects its behavior.
- It builds a scanner.
- It builds a parser (using the scanner) and parses the input for producing an abstact syntax tree (AST).
- It sends the preAnalyze() message to that AST, which recursively descends the tree so far as the member headers for declaring types (just one in iota, which is the type induced by the program. For example, the type T for the program T.java) and their members in the symbol table within the compilation unit context.
- It sends the analyze() message to that AST for declaring local variables, and checking and assigning types to expressions. Analysis also sometimes rewrites some of the abstract syntax tree for clarifying the semantics. Analysis does all of this by recursively descending the AST down to its leaves.
- Finally, it sends a codegen() message to the AST for generating the target language code. Again, codegen() recursively descends the tree, down to its leaves, generating a .marv file.
-
Method Summary
-
Method Details
-
main
Entry point.- Parameters:
args
- the command-line arguments.
-