diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-07 21:41:05 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-07 21:41:05 +0100 |
commit | 69419eceaca8e347016ccbe42326bcdc881355fc (patch) | |
tree | 865c513afc65d4f32a1cb66589d4dc537b2e8a27 /parser.h | |
parent | 8888a37426ff514d68c9b91e5f5185dedde9df4a (diff) | |
download | sciteco-69419eceaca8e347016ccbe42326bcdc881355fc.tar.gz |
undo stack enable/disable, parse-only mode, colon modifiers evaluation
Diffstat (limited to 'parser.h')
-rw-r--r-- | parser.h | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -12,23 +12,26 @@ protected: State *transitions[MAX_TRANSITIONS]; inline void - init(const gchar *chars, State *state) + init(const gchar *chars, State &state) { while (*chars) - transitions[(int)*chars++] = state; + transitions[(int)*chars++] = &state; } inline void init(const gchar *chars) { - init(chars, this); + init(chars, *this); } public: State(); - static gboolean input(gchar chr); + static bool input(gchar chr); State *get_next_state(gchar chr); +protected: + static bool eval_colon(void); + virtual State * custom(gchar chr) { @@ -40,6 +43,7 @@ class StateStart : public State { public: StateStart(); +private: void move(gint64 n); State *custom(gchar chr); |