OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
main.h File Reference
#include <string>
#include "parse/t_const.h"
#include "parse/t_field.h"
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int yylex (void)
 
int yyparse (void)
 
void yyerror (const char *fmt,...)
 
void pdebug (const char *fmt,...)
 
void pwarning (int level, const char *fmt,...)
 
void failure (const char *fmt,...)
 
void validate_const_type (t_const *c)
 
void validate_field_value (t_field *field, t_const_value *cv)
 
bool validate_throws (t_struct *throws)
 
std::string program_name (std::string filename)
 
std::string directory_name (std::string filename)
 
std::string include_file (std::string filename)
 
void clear_doctext ()
 
char * clean_up_doctext (char *doctext)
 

Variables

int yylineno
 
char yytext []
 
FILE * yyin
 

Function Documentation

char* clean_up_doctext ( char *  doctext)

Cleans up text commonly found in doxygen-like comments

Cleans up text commonly found in doxygen-like comments

Warning: if you mix tabs and spaces in a non-uniform way, you will get what you deserve.

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

void clear_doctext ( )

Clears any previously stored doctext string.

Clears any previously stored doctext string. Also prints a warning if we are discarding information.

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

Here is the call graph for this function:

std::string directory_name ( std::string  filename)

Gets the directory path of a filename

void failure ( const char *  fmt,
  ... 
)

Failure!

Prints a failure message and exits

Parameters
fmtC format string followed by additional arguments

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

std::string include_file ( std::string  filename)

Get the absolute path for an include file

void pdebug ( const char *  fmt,
  ... 
)

Parse debugging output, used to print helpful info

Prints a debug message from the parser.

Parameters
fmtC format string followed by additional arguments

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

std::string program_name ( std::string  filename)

Converts a string filename into a thrift program name

void pwarning ( int  level,
const char *  fmt,
  ... 
)

Parser warning

Prints a warning message

Parameters
fmtC format string followed by additional arguments

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

void validate_const_type ( t_const c)

Check constant types

Check the type of the parsed const information against its declared type

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

Here is the call graph for this function:

void validate_field_value ( t_field field,
t_const_value cv 
)

Check constant types

Check the type of a default value assigned to a field.

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

Here is the call graph for this function:

bool validate_throws ( t_struct throws)

Check members of a throws block

Check that all the elements of a throws block are actually exceptions.

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

Here is the call graph for this function:

void yyerror ( const char *  fmt,
  ... 
)

Expected to be defined by Flex/Bison

Report an error to the user. This is called yyerror for historical reasons (lex and yacc expect the error reporting routine to be called this). Call this function to report any errors to the user. yyerror takes printf style arguments.

Parameters
fmtC format string followed by additional arguments

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

int yylex ( void  )

Defined in the flex library

int yyparse ( void  )

Variable Documentation

FILE* yyin
int yylineno

Flex utilities

char yytext[]