aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/parser.h b/parser.h
index c21f872..86751bc 100644
--- a/parser.h
+++ b/parser.h
@@ -225,11 +225,13 @@ private:
};
class StateSearch : public StateExpectString {
-private:
+protected:
struct Parameters {
gint dot;
gint from, to;
gint count;
+
+ Buffer *from_buffer, *to_buffer;
} parameters;
enum MatchState {
@@ -244,9 +246,16 @@ private:
gchar *class2regexp(MatchState &state, const gchar *&pattern,
bool escape_default = false);
gchar *pattern2regexp(const gchar *&pattern, bool single_expr = false);
+ void do_search(GRegex *re, gint from, gint to, gint &count);
+ virtual void initial(void) throw (Error);
+ virtual void process(const gchar *str, gint new_chars) throw (Error);
+ virtual State *done(const gchar *str) throw (Error);
+};
+
+class StateSearchAll : public StateSearch {
+private:
void initial(void) throw (Error);
- void process(const gchar *str, gint new_chars) throw (Error);
State *done(const gchar *str) throw (Error);
};
@@ -260,6 +269,7 @@ namespace States {
extern StateScintilla_lParam scintilla_lparam;
extern StateInsert insert;
extern StateSearch search;
+ extern StateSearchAll searchall;
extern State *current;
}