OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
globals.h File Reference
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <string>
Include dependency graph for globals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  PARSE_MODE { INCLUDES = 1, PROGRAM = 2 }
 
enum  PROGDOCTEXT_STATUS {
  INVALID = 0, STILL_CANDIDATE = 1, ALREADY_PROCESSED = 2, ABSOLUTELY_SURE = 3,
  NO_PROGRAM_DOCTEXT = 4
}
 

Variables

int g_strict
 
t_programg_program
 
t_typeg_type_void
 
t_typeg_type_string
 
t_typeg_type_binary
 
t_typeg_type_slist
 
t_typeg_type_bool
 
t_typeg_type_byte
 
t_typeg_type_i16
 
t_typeg_type_i32
 
t_typeg_type_i64
 
t_typeg_type_double
 
t_scopeg_scope
 
t_scopeg_parent_scope
 
std::string g_parent_prefix
 
PARSE_MODE g_parse_mode
 
char * g_time_str
 
char * g_doctext
 
int g_doctext_lineno
 
char * g_program_doctext_candidate
 
int g_program_doctext_lineno
 
PROGDOCTEXT_STATUS g_program_doctext_status
 
int g_allow_neg_field_keys
 
int g_allow_64bit_consts
 

Enumeration Type Documentation

enum PARSE_MODE

Parsing mode, two passes up in this gin rummy!

Enumerator
INCLUDES 
PROGRAM 

Definition at line 54 of file globals.h.

Status of program level doctext candidate

Enumerator
INVALID 
STILL_CANDIDATE 
ALREADY_PROCESSED 
ABSOLUTELY_SURE 
NO_PROGRAM_DOCTEXT 

Definition at line 146 of file globals.h.

Variable Documentation

int g_allow_64bit_consts

Whether or not 64-bit constants will generate a warning.

Some languages don't support 64-bit constants, but many do, so we can suppress this warning for projects that don't use any non-64-bit-safe languages.

Whether or not 64-bit constants will generate a warning.

Definition at line 194 of file src/contrail-common/sandesh/compiler/main.cc.

int g_allow_neg_field_keys

Whether or not negative field keys are accepted.

When a field does not have a user-specified key, thrift automatically assigns a negative value. However, this is fragile since changes to the file may unintentionally change the key numbering, resulting in a new protocol that is not backwards compatible.

When g_allow_neg_field_keys is enabled, users can explicitly specify negative keys. This way they can write a .thrift file with explicitly specified keys that is still backwards compatible with older .thrift files that did not specify key values.

Whether or not negative field keys are accepted.

Definition at line 189 of file src/contrail-common/sandesh/compiler/main.cc.

char* g_doctext

The last parsed doctext comment.

Definition at line 172 of file src/contrail-common/sandesh/compiler/main.cc.

int g_doctext_lineno

The location of the last parsed doctext comment.

Definition at line 177 of file src/contrail-common/sandesh/compiler/main.cc.

std::string g_parent_prefix

The prefix for the parent scope entries

Prefix for putting types in parent scope

Definition at line 116 of file src/contrail-common/sandesh/compiler/main.cc.

t_scope* g_parent_scope

The parent scope to also load symbols into

Parent scope to also parse types

Definition at line 111 of file src/contrail-common/sandesh/compiler/main.cc.

PARSE_MODE g_parse_mode

The parsing pass that we are on. We do different things on each pass.

Parsing pass

Definition at line 121 of file src/contrail-common/sandesh/compiler/main.cc.

t_program* g_program

The master program parse tree. This is accessed from within the parser code to build up the program elements.

Global program tree

Definition at line 62 of file src/contrail-common/sandesh/compiler/main.cc.

char* g_program_doctext_candidate

The program level doctext. Stored seperately to make parsing easier.

The First doctext comment

Definition at line 182 of file src/contrail-common/sandesh/compiler/main.cc.

int g_program_doctext_lineno
PROGDOCTEXT_STATUS g_program_doctext_status
t_scope* g_scope

The scope that we are currently parsing into

Global scope

Definition at line 106 of file src/contrail-common/sandesh/compiler/main.cc.

int g_strict

Strictness level

Definition at line 152 of file src/contrail-common/sandesh/compiler/main.cc.

char* g_time_str

Global time string, used in formatting error messages etc.

Global time string

Definition at line 167 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_binary

Definition at line 70 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_bool

Definition at line 72 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_byte

Definition at line 73 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_double

Definition at line 77 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_i16

Definition at line 74 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_i32

Definition at line 75 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_i64

Definition at line 76 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_slist

Definition at line 71 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_string

Definition at line 69 of file src/contrail-common/sandesh/compiler/main.cc.

t_type* g_type_void

Global types for the parser to be able to reference

Global types

Definition at line 68 of file src/contrail-common/sandesh/compiler/main.cc.