Compiler

class Compiler(var lexer: Lexer, val parserWrapper: ParserWrapper, val visitor: ParseTreeVisitor<AstObject>, val analyzer: Analyzer?)

Used to simulate the behaviour of a compiler

Constructors

Link copied to clipboard
constructor(lexer: Lexer, parserWrapper: ParserWrapper, visitor: ParseTreeVisitor<AstObject>, analyzer: Analyzer?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

represents the program semantic analyzer

Link copied to clipboard
var lexer: Lexer

represents the lexer

Link copied to clipboard

represents the wrapper containing the parser

Link copied to clipboard
val visitor: ParseTreeVisitor<AstObject>

represents the program visitor

Functions

Link copied to clipboard

This function passes the program through each possible compilation step, returning either CompilationSuccess in case of success or CompilationFailure otherwise