Module src.frontend

Expand source code
import os
import sys

# sys.path.insert(0, os.path.dirname(__file__))
sys.path.append(os.path.dirname(__file__))

Sub-modules

src.frontend.AST_builder

This module takes in the parse tree, and produces an Abstract Syntax Tree.This is done using a Depth First Traversal. By taking the Concrete Syntax …

src.frontend.bnfToParser

This module reads in a BNF and produces a parser for use with rply.The BNF expects the form X : Y Y #name, where the name determines what the node …

src.frontend.frontend

This module acts as the interface for running all the seperate portions of the front end. It allows for command line arguments that can be used to …

src.frontend.lexer

The lexer class definition. Uses rplys lexer as a jumping off point, and regexes and token names are added in order to tokenize.

src.frontend.parser

This module contains definitions for the ParseTree and Parser classes, as well as some ansillary functions to assist.

src.frontend.preprocessor

This module serves as the pre-processor for any given C program. By searching for any pre-processor keywords it will perform the necessary …

src.frontend.semantics

The module serves to perform semantic analysis on the AST to ensure the typing is correct

src.frontend.symbol_table

The module serves to create the symbol table