diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-11 04:03:14 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-11 04:03:14 +0100 |
commit | 46316ece115c100a8146303957a3bec07a1d2dde (patch) | |
tree | 9486c8e0a2b623a7db36af8840cfce5a489e2b90 /parser.cpp | |
parent | d6593762d97bf44f3a398dc4fae714a9e20a24b2 (diff) | |
download | sciteco-46316ece115c100a8146303957a3bec07a1d2dde.tar.gz |
Q-Register table and EQx command
Diffstat (limited to 'parser.cpp')
-rw-r--r-- | parser.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -168,6 +168,22 @@ StateExpectString::custom(gchar chr) return this; } +StateExpectQReg::StateExpectQReg() : State() +{ + transitions['\0'] = this; +} + +State * +StateExpectQReg::custom(gchar chr) +{ + QRegister *reg = qregisters[(gchar []){g_ascii_toupper(chr), '\0'}]; + + if (!reg) + return NULL; + + return got_register(reg); +} + StateStart::StateStart() : State() { transitions['\0'] = this; @@ -563,6 +579,7 @@ StateECommand::StateECommand() : State() { transitions['\0'] = this; transitions['B'] = &States::file; + transitions['Q'] = &States::eqcommand; } State * |