Rename all of bro lexer methods and such

This commit is contained in:
Tim Wojtulewicz 2022-06-28 16:03:41 -07:00
parent 8829292c0c
commit d875ad1a96
5 changed files with 8 additions and 8 deletions

View file

@ -91,14 +91,14 @@ set_property(SOURCE re-scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-sign-c
# Parser/Scanner
bison_target(Parser parse.y
${CMAKE_CURRENT_BINARY_DIR}/p.cc
HEADER ${CMAKE_CURRENT_BINARY_DIR}/broparse.h
HEADER ${CMAKE_CURRENT_BINARY_DIR}/zeekparse.h
#VERBOSE ${CMAKE_CURRENT_BINARY_DIR}/parse.output
COMPILE_FLAGS "${BISON_FLAGS}")
replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/p.cc
${CMAKE_CURRENT_BINARY_DIR}/parse.cc
bro yy)
zeek yy)
flex_target(Scanner scan.l ${CMAKE_CURRENT_BINARY_DIR}/scan.cc
COMPILE_FLAGS "-Pbro")
COMPILE_FLAGS "-Pzeek")
set_property(SOURCE scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-sign-compare")
########################################################################

View file

@ -60,7 +60,7 @@ bool in_debug = false;
// ### fix this hardwired access to external variables etc.
struct yy_buffer_state;
using YY_BUFFER_STATE = struct yy_buffer_state*;
YY_BUFFER_STATE bro_scan_string(const char*);
YY_BUFFER_STATE zeek_scan_string(const char*);
extern YYLTYPE yylloc; // holds start line and column of token
extern int line_number;
@ -963,7 +963,7 @@ ValPtr dbg_eval_expr(const char* expr)
// Set up the lexer to read from the string.
string parse_string = string("@DEBUG ") + expr;
bro_scan_string(parse_string.c_str());
zeek_scan_string(parse_string.c_str());
// Fix filename and line number for the lexer/parser, which record it.
filename = "<interactive>";

View file

@ -10,7 +10,7 @@
// These are required by the lexer in scan.l and are intentionally not namespaced.
extern int yyparse();
extern int yydebug;
extern int brolex();
extern int zeeklex();
extern char last_tok[128];
extern void add_essential_input_file(const char* file);

View file

@ -114,7 +114,7 @@ extern bool current_file_has_conditionals;
extern YYLTYPE GetCurrentLocation();
extern int yyerror(const char[]);
extern int brolex();
extern int zeeklex();
#define YYLLOC_DEFAULT(Current, Rhs, N) \
(Current) = (Rhs)[(N)];

View file

@ -39,7 +39,7 @@
#include "zeek/plugin/Manager.h"
#include "broparse.h"
#include "zeekparse.h"
using namespace zeek::detail;