mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00

* origin/topic/gregor/bif-tuning: Refactor: BifTypePtr --> BifType Bif const: make sure const is indeed a constant. Support any type in bif const declaration. Tweak for bifcl Fix to bifcl wrt namespaces. Enable declaration of set, vector, and table types in bifs. Moving type declarations into its own bif file Support namespaces / modules in bif. Checkpoint. Support namespaces / modules in bif. Checkpoint. Remove leftovers from removing "declare enum" from bifcl Use namespaces for NetVar type pointers. Remove unused and unnecessary "declare enum" from bifcl Bif: add record type declaration. Minor tweaks for bif language. enum type: don't allow mixing of explicit value and auto-increment. Add support for enum with explicit enumerator values. Closes #403.
17 lines
534 B
C++
17 lines
534 B
C++
//
|
|
// These functions are used by both Bro and bifcl.
|
|
//
|
|
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
static const char* GLOBAL_MODULE_NAME = "GLOBAL";
|
|
|
|
extern string extract_module_name(const char* name);
|
|
extern string extract_var_name(const char* name);
|
|
extern string normalized_module_name(const char* module_name); // w/o ::
|
|
|
|
// Concatenates module_name::var_name unless var_name is already fully
|
|
// qualified, in which case it is returned unmodified.
|
|
extern string make_full_var_name(const char* module_name, const char* var_name);
|