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

#include <go.h>

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

Public Member Functions

 Dot (const Span *sp, uint32_t nsp, const State *from)
 
 ~Dot ()
 
void emit (OutputFile &o)
 
 FORBID_COPY (Dot)
 

Public Attributes

const Statefrom
 
Casescases
 

Detailed Description

Definition at line 161 of file go.h.

Constructor & Destructor Documentation

re2c::Dot::Dot ( const Span sp,
uint32_t  nsp,
const State from 
)

Definition at line 178 of file go_construct.cc.

179  : from (s)
180  , cases (new Cases (sp, nsp))
181 {}
Cases * cases
Definition: go.h:164
const State * from
Definition: go.h:163
re2c::Dot::~Dot ( )

Definition at line 73 of file go_destruct.cc.

74 {
75  delete cases;
76 }
Cases * cases
Definition: go.h:164

Member Function Documentation

void re2c::Dot::emit ( OutputFile o)

Definition at line 229 of file go_emit.cc.

230 {
231  const uint32_t n = cases->cases_size;
232  if (n == 1)
233  {
234  o.wlabel(from->label).ws(" -> ").wlabel(cases->cases[0].to->label).ws("\n");
235  }
236  else
237  {
238  for (uint32_t i = 0; i < n; ++i)
239  {
240  o.wlabel(from->label).ws(" -> ").wlabel(cases->cases[i].to->label).ws(" [label=\"");
241  for (uint32_t j = 0; j < cases->cases[i].ranges.size (); ++j)
242  {
243  o.wrange(cases->cases[i].ranges[j].first, cases->cases[i].ranges[j].second);
244  }
245  o.ws("\"]\n");
246  }
247  }
248 }
uint32_t cases_size
Definition: go.h:45
Case * cases
Definition: go.h:44
label_t label
Definition: adfa.h:25
const State * to
Definition: go.h:30
Cases * cases
Definition: go.h:164
std::vector< std::pair< uint32_t, uint32_t > > ranges
Definition: go.h:29
const State * from
Definition: go.h:163

Here is the call graph for this function:

re2c::Dot::FORBID_COPY ( Dot  )

Member Data Documentation

Cases* re2c::Dot::cases

Definition at line 164 of file go.h.

const State* re2c::Dot::from

Definition at line 163 of file go.h.


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