MXVM 1.8.1
Virtual Machine, Compiler, and Pascal Frontend
Loading...
Searching...
No Matches
icode.hpp File Reference

Pascal-to-MXVM code generator using the Visitor pattern over the Pascal AST. More...

#include "ast.hpp"
#include <algorithm>
#include <cctype>
#include <cstdlib>
#include <map>
#include <memory>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
Include dependency graph for icode.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pascal::ArrayInfo
 Metadata describing a Pascal array's bounds, element type, and sizing. More...
class  pascal::BuiltinFunctionHandler
 Abstract handler for a group of built-in functions/procedures. More...
class  pascal::BuiltinFunctionRegistry
 Registry of BuiltinFunctionHandler instances. More...
class  pascal::IOFunctionHandler
 Built-in handler for I/O procedures (write, writeln, read, readln). More...
class  pascal::StdFunctionHandler
 Built-in handler for standard library functions (chr, ord, inc, dec, etc.). More...
class  pascal::StringFunctionHandler
 Built-in handler for string library functions (length, copy, concat, etc.). More...
class  pascal::SDLFunctionHandler
 Built-in handler for SDL2 bindings. More...
class  pascal::FileFunctionHandler
 Built-in handler for Pascal file I/O procedures (assign, reset, rewrite, append, close, eof, eoln). More...
class  pascal::CodeGenVisitor
 AST visitor that generates MXVM intermediate code. More...
struct  pascal::CodeGenVisitor::Scope
struct  pascal::CodeGenVisitor::FuncInfo
 Describes a user-declared function's parameter and return types. More...
struct  pascal::CodeGenVisitor::ValueLocation
 Describes where a value currently resides (register, memory, or immediate). More...
struct  pascal::CodeGenVisitor::RecordField
 A field within a record type definition. More...
struct  pascal::CodeGenVisitor::RecordTypeInfo
 Complete description of a record type. More...

Namespaces

namespace  pascal

Macros

#define MXVM_BOUNDS_CHECK

Enumerations

enum class  pascal::VarType {
  pascal::INT , pascal::DOUBLE , pascal::STRING , pascal::CHAR ,
  pascal::RECORD , pascal::PTR , pascal::BOOL , pascal::UNKNOWN ,
  pascal::ARRAY_INT , pascal::ARRAY_DOUBLE , pascal::ARRAY_STRING
}
 Enumeration of variable / expression value types. More...

Functions

std::string pascal::mxvmOpt (const std::string &text)

Detailed Description

Pascal-to-MXVM code generator using the Visitor pattern over the Pascal AST.

Author
Jared Bruni

Definition in file icode.hpp.

Macro Definition Documentation

◆ MXVM_BOUNDS_CHECK

#define MXVM_BOUNDS_CHECK

Definition at line 22 of file icode.hpp.