diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/parser.cpp | 17 | ||||
-rw-r--r-- | src/parser.h | 9 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 6e32d87..46bea77 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -45,6 +45,7 @@ gint macro_pc = 0; namespace States { StateStart start; StateControl control; + StateASCII ascii; StateFCommand fcommand; StateCondCommand condcommand; StateECommand ecommand; @@ -1208,6 +1209,7 @@ StateControl::StateControl() : State() { transitions['\0'] = this; transitions['U'] = &States::ctlucommand; + transitions['^'] = &States::ascii; } State * @@ -1275,6 +1277,21 @@ StateControl::custom(gchar chr) throw (Error) return &States::start; } +StateASCII::StateASCII() : State() +{ + transitions['\0'] = this; +} + +State * +StateASCII::custom(gchar chr) throw (Error) +{ + BEGIN_EXEC(&States::start); + + expressions.push(chr); + + return &States::start; +} + StateECommand::StateECommand() : State() { transitions['\0'] = this; diff --git a/src/parser.h b/src/parser.h index 9908f31..da9bfee 100644 --- a/src/parser.h +++ b/src/parser.h @@ -218,6 +218,14 @@ private: State *custom(gchar chr) throw (Error); }; +class StateASCII : public State { +public: + StateASCII(); + +private: + State *custom(gchar chr) throw (Error); +}; + class StateFCommand : public State { public: StateFCommand(); @@ -268,6 +276,7 @@ protected: namespace States { extern StateStart start; extern StateControl control; + extern StateASCII ascii; extern StateFCommand fcommand; extern StateCondCommand condcommand; extern StateECommand ecommand; |