Header files updated
This commit is contained in:
@ -11,35 +11,16 @@
|
||||
// 4️⃣ Rule end-markers (;, |) should always be 4 spaces in.
|
||||
// 5️⃣ C-blocks should always be clearly defined and follow clang formatting rules.
|
||||
// 6️⃣ 1-line if/for/while statements must be wrapped in curly braces.
|
||||
// 7️⃣ DO NOT USE TABS. EVER.
|
||||
// 7️⃣ Comments should always be above rules
|
||||
// 8️⃣ DO NOT USE TABS. EVER.
|
||||
|
||||
// Please ask Scarlett if you are unsure of how to format something. Thanks! 😀
|
||||
|
||||
%{
|
||||
#include <stdio.h>
|
||||
#include "../src/symbol_table.c"
|
||||
#include <math.h>
|
||||
extern int yylex(void);
|
||||
|
||||
void yyerror(const char *err);
|
||||
extern char* yytext;
|
||||
extern int yyleng;
|
||||
extern int yychar;
|
||||
extern SymbolTable * cur;
|
||||
//char* cur_value;
|
||||
//char* cur_type;
|
||||
int token_tracker;
|
||||
extern int line_number;
|
||||
extern int column_number;
|
||||
extern FILE * yyin;
|
||||
extern TableNode* funprime;
|
||||
extern TableNode* arrayprim;
|
||||
extern TableNode* recprime;
|
||||
extern TableNode* funtypeprime;
|
||||
extern TableNode* integ;
|
||||
extern TableNode* addr;
|
||||
extern TableNode* chara;
|
||||
extern TableNode* stri;
|
||||
extern TableNode* boo;
|
||||
TableNode * tn;
|
||||
%}
|
||||
|
||||
@ -144,7 +125,7 @@ definition:
|
||||
printdebug("Currently see a record definition for %s", $<words>2);
|
||||
tn = CreateEntry(getAncestor(cur), recprime, $2, CreateRecordInfo(0, cur = CreateScope(cur, 0, 0)));
|
||||
if (table_lookup(getAncestor(cur), $2) == undefined) {
|
||||
printdebug("rec not found ");
|
||||
printdebug("rec not found");
|
||||
}
|
||||
}
|
||||
dblock
|
||||
@ -196,7 +177,7 @@ definition:
|
||||
}
|
||||
if (node == undefined) {
|
||||
printdebug("function not declared at line %d, column %d", @1.first_line, @1.first_column);
|
||||
} else if(getAdInfoType(node) != TYPE_FUNCTION_DECLARATION) {
|
||||
} else if (getAdInfoType(node) != TYPE_FUNCTION_DECLARATION) {
|
||||
printdebug("function not declared at line %d, column %d", @1.first_line, @1.first_column);
|
||||
} else {
|
||||
setStartLine(node, @1.first_line);
|
||||
|
Reference in New Issue
Block a user