Replace Action with Action* so can be polymorphic

This commit is contained in:
Keith Winstein
2011-01-13 00:44:07 -05:00
parent 82ac626320
commit 59f000cdce
7 changed files with 123 additions and 107 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ namespace Parser {
class Transition
{
public:
Action action;
Action *action;
State *next_state;
Transition( const Transition &x )
@@ -26,7 +26,7 @@ namespace Parser {
}
virtual ~Transition() {}
Transition( Action s_action=Ignore(), State *s_next_state=NULL )
Transition( Action *s_action=NULL, State *s_next_state=NULL )
: action( s_action ), next_state( s_next_state )
{}
};