- Nil Vilas
- Pau Núñez
- SymbolsListener: Variable declaration and fill up Symbols Table
- TypeCheckListener: Semantic type-check, compile time errors (typing)
- CodeGenListener: Three-address code generation. (t-code due to high temporal register usage)
- Lexer (char stream -> token stream)
- Parser (parses token stream)
- Generate parse tree
- Check for lexical or syntactical errors
- Walker (checking variable types or generating code)
- Listener that looks for var and func declarations in the tree and stores required information (SymbolsListener)
- Traverse the tree using this listener, to collect information about declared identifiers
- Listener that will perform type checkings wherever it is needed (on expressions, assignments, parameter passing, etc) (TypeCheckListener)
- Traverse the tree using this listener, so all types are checked
- Listener that will generate code for each part of the tree (CodeGenListener)
- Traverse the tree using this listener, so code is generated and stored in 'mycode'
- Print generated code