aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/parser.cpp b/parser.cpp
index 870a611..e37722e 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -10,6 +10,8 @@
#include "qbuffers.h"
#include "parser.h"
+//#define DEBUG
+
gint macro_pc = 0;
namespace States {
@@ -40,6 +42,12 @@ bool
macro_execute(const gchar *macro)
{
while (macro[macro_pc]) {
+#ifdef DEBUG
+ g_printf("EXEC(%d): input='%c'/%x, state=%p\n",
+ macro_pc, macro[macro_pc], macro[macro_pc],
+ States::current);
+#endif
+
if (!State::input(macro[macro_pc])) {
message_display(GTK_MESSAGE_ERROR,
"Syntax error \"%c\"",
@@ -193,6 +201,10 @@ StateStart::StateStart() : State()
transitions['^'] = &States::control;
transitions['E'] = &States::ecommand;
transitions['I'] = &States::insert;
+ transitions['Q'] = &States::getqreginteger;
+ transitions['U'] = &States::setqreginteger;
+ transitions['%'] = &States::increaseqreg;
+ transitions['M'] = &States::macro;
}
void