mirror of https://github.com/Icinga/icinga2.git
Updated the lexer/parser.
This commit is contained in:
parent
e7169fdf8a
commit
c9a58ddba2
|
@ -0,0 +1,3 @@
|
|||
icinga_lexer.cc
|
||||
icinga_parser.cc
|
||||
icinga_parser.h
|
|
@ -1,7 +1,7 @@
|
|||
%{
|
||||
#include <iostream>
|
||||
#include "configcontext.h"
|
||||
#include "icinga.tab.h"
|
||||
#include "icinga_parser.h"
|
||||
|
||||
#define YY_EXTRA_TYPE ConfigContext *
|
||||
#define YY_USER_ACTION yylloc->first_line = yylineno;
|
||||
|
@ -14,7 +14,6 @@ do { \
|
|||
%}
|
||||
|
||||
%option reentrant noyywrap yylineno
|
||||
%option prefix="icinga"
|
||||
%option bison-bridge bison-locations
|
||||
|
||||
%x IN_C_COMMENT
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
%pure-parser
|
||||
%name-prefix="icinga"
|
||||
|
||||
%locations
|
||||
%defines
|
||||
|
@ -32,9 +31,9 @@
|
|||
#include <iostream>
|
||||
#include "configcontext.h"
|
||||
|
||||
int icingalex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner);
|
||||
int yylex(YYSTYPE *lvalp, YYLTYPE *llocp, void *scanner);
|
||||
|
||||
void icingaerror(YYLTYPE *locp, ConfigContext *context, const char *err)
|
||||
void yyerror(YYLTYPE *locp, ConfigContext *context, const char *err)
|
||||
{
|
||||
std::cout << locp->first_line << ":" << locp->first_column
|
||||
<< "-"
|
||||
|
|
Loading…
Reference in New Issue