src
Public Types | Public Member Functions | Public Attributes | List of all members
re2c::opt_t Struct Reference

#include <opt.h>

Collaboration diagram for re2c::opt_t:
Collaboration graph
[legend]

Public Types

enum  target_t { CODE, DOT, SKELETON }
 

Public Member Functions

 opt_t ()
 
 opt_t (const opt_t &opt)
 
opt_toperator= (const opt_t &opt)
 
void fix ()
 

Public Attributes

opt_t::target_t target
 
bool bNoGenerationDate
 
bool version
 
Enc encoding
 
bool bCaseInsensitive
 
bool bCaseInverted
 
empty_class_policy_t empty_class_policy
 
bool cFlag
 
bool tFlag
 
const char * header_file
 
std::string yycondtype
 
std::string cond_get
 
bool cond_get_naked
 
std::string cond_set
 
std::string cond_set_arg
 
bool cond_set_naked
 
std::string yyctable
 
std::string condPrefix
 
std::string condEnumPrefix
 
std::string condDivider
 
std::string condDividerParam
 
std::string condGoto
 
std::string condGotoParam
 
bool fFlag
 
std::string state_get
 
bool state_get_naked
 
std::string state_set
 
std::string state_set_arg
 
bool state_set_naked
 
std::string yyfilllabel
 
std::string yynext
 
std::string yyaccept
 
bool bUseStateAbort
 
bool bUseStateNext
 
bool rFlag
 
bool FFlag
 
bool sFlag
 
bool bFlag
 
std::string yybm
 
bool yybmHexTable
 
bool gFlag
 
std::string yytarget
 
uint32_t cGotoThreshold
 
uint32_t topIndent
 
std::string indString
 
InputAPI input_api
 
std::string yycursor
 
std::string yymarker
 
std::string yyctxmarker
 
std::string yylimit
 
std::string yypeek
 
std::string yyskip
 
std::string yybackup
 
std::string yybackupctx
 
std::string yyrestore
 
std::string yyrestorectx
 
std::string yylessthan
 
bool iFlag
 
bool dFlag
 
std::string yydebug
 
std::string yyctype
 
std::string yych
 
bool bEmitYYCh
 
bool yychConversion
 
std::string fill
 
bool fill_use
 
bool fill_check
 
std::string fill_arg
 
bool fill_arg_use
 
bool fill_naked
 
std::string labelPrefix
 
dfa_minimization_t dfa_minimization
 

Detailed Description

Definition at line 107 of file opt.h.

Member Enumeration Documentation

Enumerator
CODE 
DOT 
SKELETON 

Definition at line 109 of file opt.h.

110  {
111  CODE,
112  DOT,
113  SKELETON
114  };

Constructor & Destructor Documentation

re2c::opt_t::opt_t ( )

Definition at line 9 of file opt.cc.

10  : name (value)
11 #define OPT(type, name, value) , name (value)
12  RE2C_OPTS
13 #undef OPT1
14 #undef OPT
15 {}
#define RE2C_OPTS
Definition: opt.h:17
re2c::opt_t::opt_t ( const opt_t opt)

Definition at line 17 of file opt.cc.

18  : name (opt.name)
19 #define OPT(type, name, value) , name (opt.name)
20  RE2C_OPTS
21 #undef OPT1
22 #undef OPT
23 {}
#define RE2C_OPTS
Definition: opt.h:17

Member Function Documentation

void re2c::opt_t::fix ( )

Definition at line 35 of file opt.cc.

36 {
37  // some options either make no sense or must have fixed value
38  // with current target: reset them to default
39  switch (target)
40  {
41  case DOT:
42  // default code generation options
47  // default environment-insensitive formatting
49  // fallthrough
50  case SKELETON:
51  // default line information
53  // default environment-sensitive formatting
58  // default environment bindings
110  break;
111  default:
112  break;
113  }
114 
115  if (bCaseInsensitive)
116  {
118  }
119 
120  // respect hierarchy
121  if (!cFlag)
122  {
138  }
139  if (!fFlag)
140  {
151  }
152  if (!bFlag)
153  {
156  }
157  if (!gFlag)
158  {
161  }
162  if (input_api.type () != InputAPI::DEFAULT)
163  {
168  }
169  if (input_api.type () != InputAPI::CUSTOM)
170  {
178  }
179  if (!dFlag)
180  {
182  }
183  if (!fill_use)
184  {
190  }
191 
192  // force individual options
193  switch (target)
194  {
195  case DOT:
196  iFlag = true;
197  break;
198  case SKELETON:
199  iFlag = true;
201  indString = " ";
202  topIndent = 2;
203  break;
204  default:
205  break;
206  }
207  switch (encoding.type ())
208  {
209  case Enc::UCS2:
210  case Enc::UTF16:
211  case Enc::UTF32:
212  sFlag = true;
213  break;
214  default:
215  break;
216  }
217  if (bFlag)
218  {
219  sFlag = true;
220  }
221  if (gFlag)
222  {
223  bFlag = true;
224  sFlag = true;
225  }
226  if (header_file != NULL)
227  {
228  tFlag = true;
229  }
230 }
bool bFlag
Definition: opt.h:118
bool tFlag
Definition: opt.h:118
std::string indString
Definition: opt.h:118
std::string yyrestore
Definition: opt.h:118
static const opt_t baseopt
Definition: opt.h:151
std::string condPrefix
Definition: opt.h:118
bool cond_set_naked
Definition: opt.h:118
std::string yytarget
Definition: opt.h:118
std::string yycondtype
Definition: opt.h:118
type_t type() const
Definition: enc.h:185
bool state_get_naked
Definition: opt.h:118
bool bCaseInsensitive
Definition: opt.h:118
std::string yyskip
Definition: opt.h:118
std::string cond_get
Definition: opt.h:118
InputAPI input_api
Definition: opt.h:118
bool fill_naked
Definition: opt.h:118
std::string yylimit
Definition: opt.h:118
std::string yych
Definition: opt.h:118
std::string condDivider
Definition: opt.h:118
std::string yybm
Definition: opt.h:118
std::string yybackup
Definition: opt.h:118
std::string yycursor
Definition: opt.h:118
const char * header_file
Definition: opt.h:118
bool cFlag
Definition: opt.h:118
bool bUseStateNext
Definition: opt.h:118
std::string yylessthan
Definition: opt.h:118
std::string yynext
Definition: opt.h:118
std::string yypeek
Definition: opt.h:118
bool sFlag
Definition: opt.h:118
bool dFlag
Definition: opt.h:118
uint32_t topIndent
Definition: opt.h:118
std::string condEnumPrefix
Definition: opt.h:118
bool bUseStateAbort
Definition: opt.h:118
bool iFlag
Definition: opt.h:118
std::string cond_set
Definition: opt.h:118
bool cond_get_naked
Definition: opt.h:118
uint32_t cGotoThreshold
Definition: opt.h:118
opt_t::target_t target
Definition: opt.h:118
bool fill_use
Definition: opt.h:118
bool gFlag
Definition: opt.h:118
std::string yyctable
Definition: opt.h:118
std::string state_set
Definition: opt.h:118
Enc encoding
Definition: opt.h:118
void set(type_t t)
Definition: input_api.cc:20
std::string fill_arg
Definition: opt.h:118
std::string yyaccept
Definition: opt.h:118
std::string labelPrefix
Definition: opt.h:118
std::string yybackupctx
Definition: opt.h:118
bool fFlag
Definition: opt.h:118
bool state_set_naked
Definition: opt.h:118
bool yychConversion
Definition: opt.h:118
type_t type() const
Definition: input_api.cc:15
std::string yyrestorectx
Definition: opt.h:118
std::string yydebug
Definition: opt.h:118
std::string state_set_arg
Definition: opt.h:118
std::string fill
Definition: opt.h:118
std::string yyctxmarker
Definition: opt.h:118
std::string condGotoParam
Definition: opt.h:118
std::string yymarker
Definition: opt.h:118
std::string state_get
Definition: opt.h:118
bool yybmHexTable
Definition: opt.h:118
std::string yyfilllabel
Definition: opt.h:118
std::string condGoto
Definition: opt.h:118
bool fill_arg_use
Definition: opt.h:118
bool bEmitYYCh
Definition: opt.h:118
std::string cond_set_arg
Definition: opt.h:118
bool bCaseInverted
Definition: opt.h:118
bool fill_check
Definition: opt.h:118
std::string condDividerParam
Definition: opt.h:118
std::string yyctype
Definition: opt.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

opt_t & re2c::opt_t::operator= ( const opt_t opt)

Definition at line 25 of file opt.cc.

26 {
27 #define OPT1 OPT
28 #define OPT(type, name, value) name = opt.name;
29  RE2C_OPTS
30 #undef OPT1
31 #undef OPT
32  return *this;
33 }
#define RE2C_OPTS
Definition: opt.h:17

Member Data Documentation

bool re2c::opt_t::bCaseInsensitive

Definition at line 118 of file opt.h.

bool re2c::opt_t::bCaseInverted

Definition at line 118 of file opt.h.

bool re2c::opt_t::bEmitYYCh

Definition at line 118 of file opt.h.

bool re2c::opt_t::bFlag

Definition at line 118 of file opt.h.

bool re2c::opt_t::bNoGenerationDate

Definition at line 118 of file opt.h.

bool re2c::opt_t::bUseStateAbort

Definition at line 118 of file opt.h.

bool re2c::opt_t::bUseStateNext

Definition at line 118 of file opt.h.

bool re2c::opt_t::cFlag

Definition at line 118 of file opt.h.

uint32_t re2c::opt_t::cGotoThreshold

Definition at line 118 of file opt.h.

std::string re2c::opt_t::cond_get

Definition at line 118 of file opt.h.

bool re2c::opt_t::cond_get_naked

Definition at line 118 of file opt.h.

std::string re2c::opt_t::cond_set

Definition at line 118 of file opt.h.

std::string re2c::opt_t::cond_set_arg

Definition at line 118 of file opt.h.

bool re2c::opt_t::cond_set_naked

Definition at line 118 of file opt.h.

std::string re2c::opt_t::condDivider

Definition at line 118 of file opt.h.

std::string re2c::opt_t::condDividerParam

Definition at line 118 of file opt.h.

std::string re2c::opt_t::condEnumPrefix

Definition at line 118 of file opt.h.

std::string re2c::opt_t::condGoto

Definition at line 118 of file opt.h.

std::string re2c::opt_t::condGotoParam

Definition at line 118 of file opt.h.

std::string re2c::opt_t::condPrefix

Definition at line 118 of file opt.h.

dfa_minimization_t re2c::opt_t::dfa_minimization

Definition at line 118 of file opt.h.

bool re2c::opt_t::dFlag

Definition at line 118 of file opt.h.

empty_class_policy_t re2c::opt_t::empty_class_policy

Definition at line 118 of file opt.h.

Enc re2c::opt_t::encoding

Definition at line 118 of file opt.h.

bool re2c::opt_t::FFlag

Definition at line 118 of file opt.h.

bool re2c::opt_t::fFlag

Definition at line 118 of file opt.h.

std::string re2c::opt_t::fill

Definition at line 118 of file opt.h.

std::string re2c::opt_t::fill_arg

Definition at line 118 of file opt.h.

bool re2c::opt_t::fill_arg_use

Definition at line 118 of file opt.h.

bool re2c::opt_t::fill_check

Definition at line 118 of file opt.h.

bool re2c::opt_t::fill_naked

Definition at line 118 of file opt.h.

bool re2c::opt_t::fill_use

Definition at line 118 of file opt.h.

bool re2c::opt_t::gFlag

Definition at line 118 of file opt.h.

const char* re2c::opt_t::header_file

Definition at line 118 of file opt.h.

bool re2c::opt_t::iFlag

Definition at line 118 of file opt.h.

std::string re2c::opt_t::indString

Definition at line 118 of file opt.h.

InputAPI re2c::opt_t::input_api

Definition at line 118 of file opt.h.

std::string re2c::opt_t::labelPrefix

Definition at line 118 of file opt.h.

bool re2c::opt_t::rFlag

Definition at line 118 of file opt.h.

bool re2c::opt_t::sFlag

Definition at line 118 of file opt.h.

std::string re2c::opt_t::state_get

Definition at line 118 of file opt.h.

bool re2c::opt_t::state_get_naked

Definition at line 118 of file opt.h.

std::string re2c::opt_t::state_set

Definition at line 118 of file opt.h.

std::string re2c::opt_t::state_set_arg

Definition at line 118 of file opt.h.

bool re2c::opt_t::state_set_naked

Definition at line 118 of file opt.h.

opt_t::target_t re2c::opt_t::target

Definition at line 118 of file opt.h.

bool re2c::opt_t::tFlag

Definition at line 118 of file opt.h.

uint32_t re2c::opt_t::topIndent

Definition at line 118 of file opt.h.

bool re2c::opt_t::version

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yyaccept

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yybackup

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yybackupctx

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yybm

Definition at line 118 of file opt.h.

bool re2c::opt_t::yybmHexTable

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yych

Definition at line 118 of file opt.h.

bool re2c::opt_t::yychConversion

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yycondtype

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yyctable

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yyctxmarker

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yyctype

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yycursor

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yydebug

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yyfilllabel

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yylessthan

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yylimit

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yymarker

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yynext

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yypeek

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yyrestore

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yyrestorectx

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yyskip

Definition at line 118 of file opt.h.

std::string re2c::opt_t::yytarget

Definition at line 118 of file opt.h.


The documentation for this struct was generated from the following files: