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

#include <go.h>

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

Public Member Functions

 Cpgoto (const Span *span, uint32_t nSpans, const Span *hspan, uint32_t hSpans, const State *next)
 
 ~Cpgoto ()
 
void emit (OutputFile &o, uint32_t ind, bool &readCh)
 
void used_labels (std::set< label_t > &used)
 
 FORBID_COPY (Cpgoto)
 

Public Attributes

SwitchIfhgo
 
CpgotoTabletable
 

Detailed Description

Definition at line 149 of file go.h.

Constructor & Destructor Documentation

re2c::Cpgoto::Cpgoto ( const Span span,
uint32_t  nSpans,
const Span hspan,
uint32_t  hSpans,
const State next 
)

Definition at line 173 of file go_construct.cc.

174  : hgo (hSpans == 0 ? NULL : new SwitchIf (hspan, hSpans, next))
175  , table (new CpgotoTable (span, nSpans))
176 {}
CpgotoTable * table
Definition: go.h:152
SwitchIf * hgo
Definition: go.h:151
re2c::Cpgoto::~Cpgoto ( )

Definition at line 67 of file go_destruct.cc.

68 {
69  delete hgo;
70  delete table;
71 }
CpgotoTable * table
Definition: go.h:152
SwitchIf * hgo
Definition: go.h:151

Member Function Documentation

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

Definition at line 220 of file go_emit.cc.

221 {
222  std::string yych = output_hgo (o, ind, readCh, hgo);
223  o.ws("{\n");
224  table->emit (o, ++ind);
225  o.wind(ind).ws("goto *").wstring(opts->yytarget).ws("[").wstring(yych).ws("];\n");
226  o.wind(--ind).ws("}\n");
227 }
CpgotoTable * table
Definition: go.h:152
SwitchIf * hgo
Definition: go.h:151
std::string yytarget
Definition: opt.h:118
static std::string output_hgo(OutputFile &o, uint32_t ind, bool &readCh, SwitchIf *hgo)
Definition: go_emit.cc:54
void emit(OutputFile &o, uint32_t ind)
Definition: go_emit.cc:195
Opt opts
Definition: opt.cc:7

Here is the call graph for this function:

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

Definition at line 83 of file go_used_labels.cc.

84 {
85  if (hgo != NULL)
86  {
87  hgo->used_labels (used);
88  }
89  table->used_labels (used);
90 }
CpgotoTable * table
Definition: go.h:152
void used_labels(std::set< label_t > &used)
SwitchIf * hgo
Definition: go.h:151
void used_labels(std::set< label_t > &used)

Here is the call graph for this function:

Member Data Documentation

SwitchIf* re2c::Cpgoto::hgo

Definition at line 151 of file go.h.

CpgotoTable* re2c::Cpgoto::table

Definition at line 152 of file go.h.


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