diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-14 02:59:03 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-14 05:21:25 +0100 |
commit | 9fec9e70a2e3f50ca88e75e0e40977571ec79d88 (patch) | |
tree | 943186739d9e3156005556af17de58b10657a5e8 /src/parser.h | |
parent | 17c62e3d58a6f8cc301be10060f772f10ab4466c (diff) | |
download | sciteco-9fec9e70a2e3f50ca88e75e0e40977571ec79d88.tar.gz |
use Q-Register micro state machine when parsing Q-Reg spec in string-building commands
* allows referring to long Q-Register names in string arguments
* currently, long names specified this way use their own string building char parsing
(I'm unsure whether this makes any sense)
Diffstat (limited to 'src/parser.h')
-rw-r--r-- | src/parser.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/parser.h b/src/parser.h index 26cd064..7ef6329 100644 --- a/src/parser.h +++ b/src/parser.h @@ -135,7 +135,12 @@ public: virtual Type input(gchar chr) throw (State::Error) = 0; }; +/* avoid circular dependency on qregisters.h */ +class QRegSpecMachine; + class StringBuildingMachine : public MicroStateMachine<gchar *> { + QRegSpecMachine *qregspec_machine; + enum Mode { MODE_NORMAL, MODE_UPPER, @@ -146,15 +151,11 @@ class StringBuildingMachine : public MicroStateMachine<gchar *> { public: StringBuildingMachine() : MicroStateMachine(), + qregspec_machine(NULL), mode(MODE_NORMAL), toctl(false) {} + ~StringBuildingMachine(); - void - reset(void) - { - MicroStateMachine::reset(); - undo.push_var(mode) = MODE_NORMAL; - undo.push_var(toctl) = false; - } + void reset(void); gchar *input(gchar chr) throw (State::Error); }; |