equal
deleted
inserted
replaced
34 |
34 |
35 #include "../../util/symtable.hh" |
35 #include "../../util/symtable.hh" |
36 #include "../../util/dsymtable.hh" |
36 #include "../../util/dsymtable.hh" |
37 #include "../../absyntax/visitor.hh" |
37 #include "../../absyntax/visitor.hh" |
38 #include "../../absyntax_utils/absyntax_utils.hh" |
38 #include "../../absyntax_utils/absyntax_utils.hh" |
|
39 #include "../../main.hh" // required for ERROR() and ERROR_MSG() macros. |
39 |
40 |
40 #include "../stage4.hh" |
41 #include "../stage4.hh" |
41 |
42 |
42 //#define DEBUG |
43 //#define DEBUG |
43 #ifdef DEBUG |
44 #ifdef DEBUG |
44 #define TRACE(classname) printf("\n____%s____\n",classname); |
45 #define TRACE(classname) printf("\n____%s____\n",classname); |
45 #else |
46 #else |
46 #define TRACE(classname) |
47 #define TRACE(classname) |
47 #endif |
48 #endif |
48 |
49 |
49 #define ERROR error_exit(__FILE__,__LINE__) |
|
50 /* function defined in main.cc */ |
|
51 extern void error_exit(const char *file_name, int line_no); |
|
52 |
50 |
53 |
51 |
54 #define STAGE4_ERROR(symbol1, symbol2, ...) {stage4err("while generating C code", symbol1, symbol2, __VA_ARGS__); exit(EXIT_FAILURE);} |
52 #define STAGE4_ERROR(symbol1, symbol2, ...) {stage4err("while generating C code", symbol1, symbol2, __VA_ARGS__); exit(EXIT_FAILURE);} |
55 |
53 |
56 |
54 |