FAUST compiler
0.9.9.6b8
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
patternmatcher
patternmatcher.hh
Go to the documentation of this file.
1
2
#ifndef __PATTERNMATCHER__
3
#define __PATTERNMATCHER__
4
5
using namespace
std;
6
#include <vector>
7
#include "
tlib.hh
"
8
9
struct
Automaton
;
10
11
/* Create a pattern matching automaton from the given list of rules. */
12
13
Automaton
*
make_pattern_matcher
(
Tree
R);
14
15
/* Apply the pattern matcher to a single argument, starting from a given state
16
s. Returns the resulting state, modifies the variable bindings E
17
accordingly, and sets C to the resulting closure if a final state is
18
reached. Result will be -1 to indicate a matching failure, and C will be
19
set to nil if no final state has been reached yet. */
20
21
int
apply_pattern_matcher
(
Automaton
*A,
// automaton
22
int
s
,
// start state
23
Tree
X,
// arg to be matched
24
Tree
& C,
// output closure (if any)
25
vector<Tree>& E);
// modified output environments
26
27
#endif
make_pattern_matcher
Automaton * make_pattern_matcher(Tree R)
Definition:
patternmatcher.cpp:479
Automaton
Definition:
patternmatcher.cpp:187
CTree
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition:
tree.hh:109
apply_pattern_matcher
int apply_pattern_matcher(Automaton *A, int s, Tree X, Tree &C, vector< Tree > &E)
Definition:
patternmatcher.cpp:660
tlib.hh
Automaton::s
int s
Definition:
patternmatcher.cpp:203
Generated on Fri Sep 5 2014 18:06:36 for FAUST compiler by
1.8.7