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

#include <go.h>

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

Public Types

enum  type_t { BINARY, LINEAR }
 

Public Member Functions

 If (type_t t, const Span *sp, uint32_t nsp, const State *next)
 
 ~If ()
 
void emit (OutputFile &o, uint32_t ind, bool &readCh)
 
void used_labels (std::set< label_t > &used)
 

Public Attributes

enum re2c::If::type_t type
 
union {
   Binary *   binary
 
   Linear *   linear
 
info
 

Detailed Description

Definition at line 84 of file go.h.

Member Enumeration Documentation

Enumerator
BINARY 
LINEAR 

Definition at line 86 of file go.h.

87  {
88  BINARY,
89  LINEAR
90  } type;
enum re2c::If::type_t type

Constructor & Destructor Documentation

re2c::If::If ( type_t  t,
const Span sp,
uint32_t  nsp,
const State next 
)

Definition at line 105 of file go_construct.cc.

106  : type (t)
107  , info ()
108 {
109  switch (type)
110  {
111  case BINARY:
112  info.binary = new Binary (sp, nsp, next);
113  break;
114  case LINEAR:
115  info.linear = new Linear (sp, nsp, next);
116  break;
117  }
118 }
union re2c::If::@0 info
enum re2c::If::type_t type
re2c::If::~If ( )

Definition at line 30 of file go_destruct.cc.

31 {
32  switch (type)
33  {
34  case BINARY:
35  delete info.binary;
36  break;
37  case LINEAR:
38  delete info.linear;
39  break;
40  }
41 }
union re2c::If::@0 info
enum re2c::If::type_t type

Member Function Documentation

void re2c::If::emit ( OutputFile o,
uint32_t  ind,
bool &  readCh 
)

Definition at line 135 of file go_emit.cc.

136 {
137  switch (type)
138  {
139  case BINARY:
140  info.binary->emit (o, ind, readCh);
141  break;
142  case LINEAR:
143  info.linear->emit (o, ind, readCh);
144  break;
145  }
146 }
union re2c::If::@0 info
enum re2c::If::type_t type

Here is the caller graph for this function:

void re2c::If::used_labels ( std::set< label_t > &  used)

Definition at line 36 of file go_used_labels.cc.

37 {
38  switch (type)
39  {
40  case BINARY:
41  info.binary->used_labels (used);
42  break;
43  case LINEAR:
44  info.linear->used_labels (used);
45  break;
46  }
47 }
union re2c::If::@0 info
enum re2c::If::type_t type

Here is the caller graph for this function:

Member Data Documentation

Binary* re2c::If::binary

Definition at line 93 of file go.h.

union { ... } re2c::If::info
Linear* re2c::If::linear

Definition at line 94 of file go.h.

enum re2c::If::type_t re2c::If::type

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