Astaroth  2.2
code_generator.c File Reference

Brief info. More...

#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "acc.tab.h"
#include "ast.h"
+ Include dependency graph for code_generator.c:

Data Structures

struct  Symbol
 

Macros

#define TRANSLATION_TABLE_SIZE   (1024)
 
#define MAX_ID_LEN   (256)
 
#define SYMBOL_TABLE_SIZE   (65536)
 
#define MAX_NESTS   (32)
 
#define ARRAY_SIZE(x)   (sizeof(x) / sizeof(x[0]))
 

Enumerations

enum  SymbolType { SYMBOLTYPE_FUNCTION, SYMBOLTYPE_FUNCTION_PARAMETER, SYMBOLTYPE_OTHER, NUM_SYMBOLTYPES }
 

Functions

int yyparse (void)
 
int main (void)
 

Variables

ASTNoderoot = NULL
 

Detailed Description

Brief info.

Detailed info.

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE (   x)    (sizeof(x) / sizeof(x[0]))

◆ MAX_ID_LEN

#define MAX_ID_LEN   (256)

◆ MAX_NESTS

#define MAX_NESTS   (32)

◆ SYMBOL_TABLE_SIZE

#define SYMBOL_TABLE_SIZE   (65536)

◆ TRANSLATION_TABLE_SIZE

#define TRANSLATION_TABLE_SIZE   (1024)

Enumeration Type Documentation

◆ SymbolType

enum SymbolType
Enumerator
SYMBOLTYPE_FUNCTION 
SYMBOLTYPE_FUNCTION_PARAMETER 
SYMBOLTYPE_OTHER 
NUM_SYMBOLTYPES 

Function Documentation

◆ main()

int main ( void  )

◆ yyparse()

int yyparse ( void  )

Variable Documentation

◆ root

ASTNode* root = NULL