Makefile rewrite
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
@ -82,12 +84,20 @@ typedef enum {
|
||||
TYPE_PRIMITIVE_TYPE = 12
|
||||
} types;
|
||||
|
||||
void printdebug_impl(char *file, int line, const char *format, ...);
|
||||
#define printdebug(format, ...) \
|
||||
printdebug_impl(__FILE__, __LINE__, format, ##__VA_ARGS__)
|
||||
|
||||
void printdebug_impl(char *file, int line, const char *format, ...);
|
||||
AdInfo *CreatePrimitiveInfo(int size);
|
||||
int getPrimSize(TableNode *definition);
|
||||
AdInfo *CreateArrayInfo(int dim, TableNode *type);
|
||||
int getNumArrDim(TableNode *definition);
|
||||
TableNode *getArrType(TableNode *definition);
|
||||
AdInfo *CreateRecordInfo(int length, SymbolTable *recordScope);
|
||||
int getRecTotal(TableNode *node);
|
||||
TableNode *setRecOffsetInfo(SymbolTable *scope, TableNode *node);
|
||||
int *getRecOffsets(TableNode *node);
|
||||
int getRecLength(TableNode *definition);
|
||||
SymbolTable *getRecList(TableNode *definition);
|
||||
TableNode *setRecSize(TableNode *tn, int n);
|
||||
@ -103,19 +113,21 @@ TableNode *getReturn(TableNode *definition);
|
||||
SymbolTable *CreateScope(SymbolTable *ParentScope, int Line, int Column);
|
||||
SymbolTable *init(SymbolTable *start);
|
||||
TableNode *populateTypeAndInfo(TableNode *tn, TableNode *type, AdInfo *info);
|
||||
AdInfo *getAdInfo(TableNode *tn);
|
||||
int getAdInfoType(TableNode *tn);
|
||||
TableNode *CreateEntry(SymbolTable *table, int tag, TableNode *typeOf, char *id,
|
||||
AdInfo *ad);
|
||||
TableNode *CreateEntry(SymbolTable *table, int tag, TableNode *typeOf, char *id, AdInfo *ad);
|
||||
TableNode *getTypeEntry(TableNode *tn);
|
||||
char *getType(TableNode *tn);
|
||||
char *getName(TableNode *tn);
|
||||
int getLine(SymbolTable *st);
|
||||
int getColumn(SymbolTable *st);
|
||||
TableNode *getTypeEntry(TableNode *tn);
|
||||
TableNode *addName(TableNode *tn, char *str);
|
||||
SymbolTable *setLineNumber(SymbolTable *st, int line);
|
||||
SymbolTable *setColumnNumber(SymbolTable *st, int column);
|
||||
TableNode *table_lookup(SymbolTable *table, char *x);
|
||||
TableNode *look_up(SymbolTable *table, char *x);
|
||||
void printline(FILE *file_ptr, bool b);
|
||||
void st_fprint(FILE *file_ptr, char *label1, int label2, int label3, char *label4, char *label5);
|
||||
void print_symbol_table(SymbolTable *table, FILE *file_ptr);
|
||||
SymbolTable *getAncestor(SymbolTable *table);
|
||||
SymbolTable *removeEntry(SymbolTable *scope, char *search);
|
||||
@ -126,11 +138,7 @@ SymbolTable *getFirstChild(ListOfTable *lt);
|
||||
ListOfTable *getRestOfChildren(ListOfTable *lt);
|
||||
TableNode *getFirstEntry(SymbolTable *st);
|
||||
TableNode *getNextEntry(TableNode *tn);
|
||||
|
||||
TableNode *printTableNode(TableNode *tn);
|
||||
void printdebug_impl(char *file, int line, const char *format, ...);
|
||||
#define printdebug(format, ...) \
|
||||
printdebug_impl(__FILE__, __LINE__, format, ##__VA_ARGS__)
|
||||
|
||||
extern int yylex(void);
|
||||
extern char *yytext;
|
||||
|
Reference in New Issue
Block a user