src
Public Member Functions | List of all members
re2c::CatOp Class Reference

#include <regexp_cat.h>

Inheritance diagram for re2c::CatOp:
Inheritance graph
[legend]
Collaboration diagram for re2c::CatOp:
Collaboration graph
[legend]

Public Member Functions

 CatOp (RegExp *e1, RegExp *e2)
 
void split (std::set< uint32_t > &)
 
uint32_t calc_size () const
 
uint32_t fixedLength ()
 
nfa_state_tcompile (nfa_t &nfa, nfa_state_t *n)
 
void display (std::ostream &o) const
 
 FORBID_COPY (CatOp)
 
- Public Member Functions inherited from re2c::RegExp
 RegExp ()
 
virtual ~RegExp ()
 
 FORBID_COPY (RegExp)
 

Additional Inherited Members

- Static Public Attributes inherited from re2c::RegExp
static free_list< RegExp * > vFreeList
 

Detailed Description

Definition at line 9 of file regexp_cat.h.

Constructor & Destructor Documentation

re2c::CatOp::CatOp ( RegExp e1,
RegExp e2 
)
inline

Definition at line 15 of file regexp_cat.h.

16  : exp1 (e1)
17  , exp2 (e2)
18  {}

Member Function Documentation

uint32_t re2c::CatOp::calc_size ( ) const
virtual

Implements re2c::RegExp.

Definition at line 21 of file calc_size.cc.

22 {
23  return exp1->calc_size()
24  + exp2->calc_size();
25 }
virtual uint32_t calc_size() const =0

Here is the call graph for this function:

nfa_state_t * re2c::CatOp::compile ( nfa_t nfa,
nfa_state_t n 
)
virtual

Implements re2c::RegExp.

Definition at line 32 of file nfa.cc.

33 {
34  nfa_state_t *s2 = exp2->compile(nfa, t);
35  nfa_state_t *s1 = exp1->compile(nfa, s2);
36  return s1;
37 }
virtual nfa_state_t * compile(nfa_t &nfa, nfa_state_t *n)=0

Here is the call graph for this function:

void re2c::CatOp::display ( std::ostream &  o) const
virtual

Implements re2c::RegExp.

Definition at line 25 of file display.cc.

26 {
27  o << exp1 << exp2;
28 }
uint32_t re2c::CatOp::fixedLength ( )
virtual

Reimplemented from re2c::RegExp.

Definition at line 30 of file fixed_length.cc.

31 {
32  const uint32_t l1 = exp1->fixedLength ();
33  if (l1 != ~0u)
34  {
35  const uint32_t l2 = exp2->fixedLength ();
36  if (l2 != ~0u)
37  {
38  return l1 + l2;
39  }
40  }
41  return ~0u;
42 }
virtual uint32_t fixedLength()
Definition: fixed_length.cc:12

Here is the call graph for this function:

re2c::CatOp::FORBID_COPY ( CatOp  )
void re2c::CatOp::split ( std::set< uint32_t > &  cs)
virtual

Implements re2c::RegExp.

Definition at line 21 of file split.cc.

22 {
23  exp1->split (cs);
24  exp2->split (cs);
25 }
virtual void split(std::set< uint32_t > &)=0

Here is the call graph for this function:


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