#include <stdio.h>
#include <ctype.h>
#include "scanner.h"
-#include "parser.h"
+#include "parser-wrap.h"
#include "ast.h"
#define YY_FATAL_ERROR(_msg) BT_LOGF_STR(_msg)
return CTF_ERROR; \
} \
} while (0)
-
-BT_HIDDEN
-void setstring(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src);
-
-static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
- __attribute__((unused));
-static int input (yyscan_t yyscanner) __attribute__((unused));
-
-BT_HIDDEN
-int import_string(struct ctf_scanner *scanner, YYSTYPE *lvalp, const char *src, char delim);
-
%}
%x comment_ml comment_sl string_lit char_const
0{OCTALDIGIT}*{INTEGER_SUFFIX}? PARSE_INTEGER_LITERAL(8); return CTF_INTEGER_LITERAL;
0[xX]{HEXDIGIT}+{INTEGER_SUFFIX}? PARSE_INTEGER_LITERAL(16); return CTF_INTEGER_LITERAL;
-{IDENTIFIER} BT_LOGV("Got identifier: id=\"%s\"", yytext); setstring(yyextra, yylval, yytext); if (is_type(yyextra, yytext)) return ID_TYPE; else return IDENTIFIER;
+{IDENTIFIER} BT_LOGT("Got identifier: id=\"%s\"", yytext); setstring(yyextra, yylval, yytext); if (is_type(yyextra, yytext)) return ID_TYPE; else return IDENTIFIER;
[ \t\r\n] ; /* ignore */
. _BT_LOGE_LINENO(yylineno, "Invalid character: char=\"%c\", val=0x%02x", isprint(yytext[0]) ? yytext[0] : '\0', yytext[0]); return CTF_ERROR;
%%