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

#include <spec.h>

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

Public Member Functions

 Spec ()
 
 Spec (const Spec &spec)
 
Specoperator= (const Spec &spec)
 
bool add_def (RuleOp *r)
 
void add (RuleOp *r)
 
void clear ()
 

Public Attributes

RegExpre
 
rules_t rules
 

Detailed Description

Definition at line 10 of file spec.h.

Constructor & Destructor Documentation

re2c::Spec::Spec ( )
inline

Definition at line 15 of file spec.h.

16  : re (NULL)
17  , rules ()
18  {}
rules_t rules
Definition: spec.h:13
RegExp * re
Definition: spec.h:12
re2c::Spec::Spec ( const Spec spec)
inline

Definition at line 19 of file spec.h.

20  : re (spec.re)
21  , rules (spec.rules)
22  {}
rules_t rules
Definition: spec.h:13
RegExp * re
Definition: spec.h:12

Member Function Documentation

void re2c::Spec::add ( RuleOp r)
inline

Definition at line 41 of file spec.h.

42  {
43  rules[r->rank].line = r->loc.line;
44  re = mkAlt (re, r);
45  }
rules_t rules
Definition: spec.h:13
RegExp * re
Definition: spec.h:12
RegExp * mkAlt(RegExp *e1, RegExp *e2)
Definition: regexp.cc:40

Here is the call graph for this function:

Here is the caller graph for this function:

bool re2c::Spec::add_def ( RuleOp r)
inline

Definition at line 29 of file spec.h.

30  {
31  if (rules.find (rule_rank_t::def ()) != rules.end ())
32  {
33  return false;
34  }
35  else
36  {
37  add (r);
38  return true;
39  }
40  }
void add(RuleOp *r)
Definition: spec.h:41
rules_t rules
Definition: spec.h:13
static rule_rank_t def()
Definition: rule_rank.cc:30

Here is the call graph for this function:

void re2c::Spec::clear ( )
inline

Definition at line 46 of file spec.h.

47  {
48  re = NULL;
49  rules.clear ();
50  }
rules_t rules
Definition: spec.h:13
RegExp * re
Definition: spec.h:12
Spec& re2c::Spec::operator= ( const Spec spec)
inline

Definition at line 23 of file spec.h.

24  {
25  re = spec.re;
26  rules = spec.rules;
27  return *this;
28  }
rules_t rules
Definition: spec.h:13
RegExp * re
Definition: spec.h:12

Member Data Documentation

RegExp* re2c::Spec::re

Definition at line 12 of file spec.h.

rules_t re2c::Spec::rules

Definition at line 13 of file spec.h.


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