reflex.cpp File Reference

updated Thu Jan 26 2017
 
Macros | Functions | Variables
reflex.cpp File Reference

RE/flex scanner generator replacement for Flex/Lex. More...

#include "reflex.h"
#include "letter_scripts.h"
#include "language_scripts.h"
#include "pl_scripts.h"
Include dependency graph for reflex.cpp:

Macros

#define WITH_BOOST_PARTIAL_MATCH_BUG
 Work around the Boost.Regex partial_match bug by forcing the generated scanner to buffer all input. More...
 

Functions

int isword (int c)
 
int isalphaun (int c)
 
static void version (void)
 Display version information and exit. More...
 
static void help (const char *message=NULL, const char *arg=NULL)
 Display help information with an optional diagnostic message and exit. More...
 
static void abort (const char *error, const char *arg=NULL)
 Abort with an error message. More...
 
static std::string file_ext (std::string &name, const char *ext)
 Add file extension if not present. More...
 
int main (int argc, char **argv)
 Main program instantiates Reflex class and runs Reflex::main(argc, argv). More...
 

Variables

static const char * options_table []
 Command-line reflex options and .l spec options. More...
 
static const char * newline = "\n"
 

Detailed Description

RE/flex scanner generator replacement for Flex/Lex.

Author
Robert van Engelen - engel.nosp@m.en@g.nosp@m.enivi.nosp@m.a.co.nosp@m.m

Macro Definition Documentation

#define WITH_BOOST_PARTIAL_MATCH_BUG

Work around the Boost.Regex partial_match bug by forcing the generated scanner to buffer all input.

Function Documentation

static void abort ( const char *  error,
const char *  arg = NULL 
)
static

Abort with an error message.

static std::string file_ext ( std::string &  name,
const char *  ext 
)
static

Add file extension if not present.

static void help ( const char *  message = NULL,
const char *  arg = NULL 
)
static

Display help information with an optional diagnostic message and exit.

int isalphaun ( int  c)
inline

Check alphabetical or underscore character.

Returns
nonzero if argument c is in [A-Za-z_], zero otherwise.
int isword ( int  c)
inline

Check word character.

Returns
nonzero if argument c is in [A-Za-z0-9_], zero otherwise.
int main ( int  argc,
char **  argv 
)

Main program instantiates Reflex class and runs Reflex::main(argc, argv).

static void version ( void  )
static

Display version information and exit.

Variable Documentation

const char* newline = "\n"
static
const char* options_table[]
static

Command-line reflex options and .l spec options.