aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h
index 0c389cc..dc43b1c 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -433,6 +433,19 @@ void teco_machine_stringbuilding_escape(teco_machine_stringbuilding_t *ctx, cons
void teco_machine_stringbuilding_clear(teco_machine_stringbuilding_t *ctx);
/**
+ * Persistent state for teco_state_number_input().
+ */
+typedef struct {
+ /**
+ * Syntactially determined radix (0, 8 or 16).
+ * In case of 0, "^R" determines the radix (10 by default).
+ */
+ guint radix;
+ /** accumulator for parsing numbers */
+ teco_int_t value;
+} teco_machine_number_t;
+
+/**
* Peristent state for teco_state_expectstring_input().
*
* This is part of the main machine instead of being a global variable,
@@ -523,6 +536,7 @@ struct teco_machine_main_t {
* but it's hard to prevent memory leaks if putting them into
* a common union.
*/
+ teco_machine_number_t number;
teco_machine_expectstring_t expectstring;
/**
* State machine for parsing Q-reg specifications.