mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Rename all of bro lexer methods and such
This commit is contained in:
parent
8829292c0c
commit
d875ad1a96
5 changed files with 8 additions and 8 deletions
|
@ -91,14 +91,14 @@ set_property(SOURCE re-scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-sign-c
|
||||||
# Parser/Scanner
|
# Parser/Scanner
|
||||||
bison_target(Parser parse.y
|
bison_target(Parser parse.y
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/p.cc
|
${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
|
#VERBOSE ${CMAKE_CURRENT_BINARY_DIR}/parse.output
|
||||||
COMPILE_FLAGS "${BISON_FLAGS}")
|
COMPILE_FLAGS "${BISON_FLAGS}")
|
||||||
replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/p.cc
|
replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/p.cc
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/parse.cc
|
${CMAKE_CURRENT_BINARY_DIR}/parse.cc
|
||||||
bro yy)
|
zeek yy)
|
||||||
flex_target(Scanner scan.l ${CMAKE_CURRENT_BINARY_DIR}/scan.cc
|
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")
|
set_property(SOURCE scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-sign-compare")
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
|
@ -60,7 +60,7 @@ bool in_debug = false;
|
||||||
// ### fix this hardwired access to external variables etc.
|
// ### fix this hardwired access to external variables etc.
|
||||||
struct yy_buffer_state;
|
struct yy_buffer_state;
|
||||||
using YY_BUFFER_STATE = 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 YYLTYPE yylloc; // holds start line and column of token
|
||||||
extern int line_number;
|
extern int line_number;
|
||||||
|
@ -963,7 +963,7 @@ ValPtr dbg_eval_expr(const char* expr)
|
||||||
|
|
||||||
// Set up the lexer to read from the string.
|
// Set up the lexer to read from the string.
|
||||||
string parse_string = string("@DEBUG ") + expr;
|
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.
|
// Fix filename and line number for the lexer/parser, which record it.
|
||||||
filename = "<interactive>";
|
filename = "<interactive>";
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// These are required by the lexer in scan.l and are intentionally not namespaced.
|
// These are required by the lexer in scan.l and are intentionally not namespaced.
|
||||||
extern int yyparse();
|
extern int yyparse();
|
||||||
extern int yydebug;
|
extern int yydebug;
|
||||||
extern int brolex();
|
extern int zeeklex();
|
||||||
extern char last_tok[128];
|
extern char last_tok[128];
|
||||||
|
|
||||||
extern void add_essential_input_file(const char* file);
|
extern void add_essential_input_file(const char* file);
|
||||||
|
|
|
@ -114,7 +114,7 @@ extern bool current_file_has_conditionals;
|
||||||
|
|
||||||
extern YYLTYPE GetCurrentLocation();
|
extern YYLTYPE GetCurrentLocation();
|
||||||
extern int yyerror(const char[]);
|
extern int yyerror(const char[]);
|
||||||
extern int brolex();
|
extern int zeeklex();
|
||||||
|
|
||||||
#define YYLLOC_DEFAULT(Current, Rhs, N) \
|
#define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||||
(Current) = (Rhs)[(N)];
|
(Current) = (Rhs)[(N)];
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
#include "zeek/plugin/Manager.h"
|
#include "zeek/plugin/Manager.h"
|
||||||
|
|
||||||
#include "broparse.h"
|
#include "zeekparse.h"
|
||||||
|
|
||||||
using namespace zeek::detail;
|
using namespace zeek::detail;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue