Automaton Struct Reference

List of all members.

Public Member Functions

 Automaton ()
int n_rules ()
const list< Rule > & rules (int s)
const list< Trans > & trans (int s)
bool final (int s)
void build (State *st)

Public Attributes

vector< State * > state
vector< Treerhs
int s

Detailed Description

Definition at line 187 of file patternmatcher.cpp.


Constructor & Destructor Documentation

Automaton::Automaton (  )  [inline]

Definition at line 191 of file patternmatcher.cpp.

00191 : state(vector<State*>()), rhs(vector<Tree>()), s(0) {}


Member Function Documentation

void Automaton::build ( State st  ) 

Definition at line 211 of file patternmatcher.cpp.

References isBoxInt(), isBoxReal(), State::match_num, s, State::s, state, and State::trans.

Referenced by make_pattern_matcher().

00212 {
00213   state.push_back(st);
00214   st->s = s++;
00215   list<Trans>::const_iterator t;
00216   for (t = st->trans.begin(); t != st->trans.end(); t++) {
00217     Tree x;
00218     double f; 
00219     int i;
00220     if (t->is_cst_trans(x) &&
00221     (isBoxInt(x, &i) || isBoxReal(x, &f)))
00222       st->match_num = true;
00223     build(t->state);
00224   }
00225 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool Automaton::final ( int  s  )  [inline]

Definition at line 200 of file patternmatcher.cpp.

References s, and trans().

Referenced by apply_pattern_matcher(), and make_pattern_matcher().

00200 { return trans(s).empty(); }

Here is the call graph for this function:

Here is the caller graph for this function:

int Automaton::n_rules (  )  [inline]

Definition at line 194 of file patternmatcher.cpp.

References rhs.

Referenced by apply_pattern_matcher().

00194 { return rhs.size(); }

Here is the caller graph for this function:

const list<Rule>& Automaton::rules ( int  s  )  [inline]

Definition at line 196 of file patternmatcher.cpp.

References state.

Referenced by add_subst(), apply_pattern_matcher(), and make_pattern_matcher().

00196 { return state[s]->rules; }

Here is the caller graph for this function:

const list<Trans>& Automaton::trans ( int  s  )  [inline]

Definition at line 198 of file patternmatcher.cpp.

References state.

Referenced by apply_pattern_matcher_internal(), and final().

00198 { return state[s]->trans; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 189 of file patternmatcher.cpp.

Referenced by apply_pattern_matcher(), make_pattern_matcher(), and n_rules().

Definition at line 203 of file patternmatcher.cpp.

Referenced by build(), final(), and infereBoxType().

Definition at line 188 of file patternmatcher.cpp.

Referenced by apply_pattern_matcher_internal(), build(), rules(), and trans().


The documentation for this struct was generated from the following file:
Generated on Wed Apr 28 23:46:03 2010 for FAUST compiler by  doxygen 1.6.3