34 #ifndef _QORE_PARSER_SUPPORT_H
36 #define _QORE_PARSER_SUPPORT_H
38 #define HE_TAG_CONST 1
39 #define HE_TAG_SCOPED_CONST 2
43 class QoreParserLocation {
50 int saved_first_line = 0;
51 int saved_first_col = 0;
53 DLLLOCAL
void saveFirst() {
55 saved_first_line = first_line;
56 saved_first_col = first_col;
59 DLLLOCAL
void restoreFirst() {
60 first_line = saved_first_line;
61 first_col = saved_first_col;
64 DLLLOCAL
void update(
int lineno,
int leng,
const char* text) {
66 first_line = last_line;
68 if (first_line == lineno)
72 for (; ((int)col <= leng) && (text[leng - col] !=
'\n'); ++col) {}
79 hashdecl TryModuleError {
83 DLLLOCAL TryModuleError(
char* v, QoreException* e) : var(v), ex(e) {
86 DLLLOCAL ~TryModuleError() {
94 DLLLOCAL
void fixName() {
95 size_t len = strlen(var);
98 memmove(var, var + 1, len);
108 DLLLOCAL
char* takeName() {
115 #define YYLTYPE class QoreParserLocation
118 typedef void* yyscan_t;
119 DLLLOCAL
extern int yyparse(yyscan_t yyscanner);
120 DLLLOCAL
extern hashdecl yy_buffer_state* yy_scan_string(
const char*, yyscan_t scanner);
121 DLLLOCAL
int yylex_init(yyscan_t* scanner);
122 DLLLOCAL
void yyset_in(FILE* in_str, yyscan_t yyscanner);
123 DLLLOCAL
int yylex_destroy(yyscan_t yyscanner);
124 DLLLOCAL
void yyset_lineno(
int line_number, yyscan_t yyscanner);
This is the hash or associative list container type in Qore, dynamically allocated only,...
Definition: QoreHashNode.h:50