Package iota

Class Main

java.lang.Object
iota.Main

class Main extends Object
This is the main entry point for the iota compiler. The compiler proceeds as follows:
  1. It reads arguments that affects its behavior.
  2. It builds a scanner.
  3. It builds a parser (using the scanner) and parses the input for producing an abstact syntax tree (AST).
  4. 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.
  5. 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.
  6. 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 Details

    • main

      public static void main(String[] args)
      Entry point.
      Parameters:
      args - the command-line arguments.