aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-20 00:43:18 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-20 06:07:34 +0100
commitec510eda5f080d39906c396a36cba89188031640 (patch)
treef47468059f71cadb84a0699876310d0f1373411e /parser.h
parent9e49e88d0cc3e6336754040eeaab7a760645dd79 (diff)
downloadsciteco-ec510eda5f080d39906c396a36cba89188031640.tar.gz
local Q-Register tables; :M command
* munged files use the same local Q-Registers as commandline * :M calls macro without new set of local registers (local register names refer to the parent macro level) * only .x names accepted at the moment. for string building characters, this will like stay that way (cannot refer to extended/long names)
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/parser.h b/parser.h
index a704c83..2451a58 100644
--- a/parser.h
+++ b/parser.h
@@ -42,10 +42,12 @@ public:
class InvalidQRegError : public Error {
public:
- InvalidQRegError(const gchar *name)
- : Error("Invalid Q-Register \"%s\"", name) {}
- InvalidQRegError(gchar name)
- : Error("Invalid Q-Register \"%c\"", name) {}
+ InvalidQRegError(const gchar *name, bool local = false)
+ : Error("Invalid Q-Register \"%s%s\"",
+ local ? "." : "", name) {}
+ InvalidQRegError(gchar name, bool local = false)
+ : Error("Invalid Q-Register \"%s%c\"",
+ local ? "." : "", name) {}
};
protected:
@@ -95,7 +97,9 @@ class StateExpectString : public State {
STATE_UPPER,
STATE_CTL_E,
STATE_CTL_EQ,
- STATE_CTL_EU
+ STATE_CTL_EQ_LOCAL,
+ STATE_CTL_EU,
+ STATE_CTL_EU_LOCAL
} state;
enum Mode {
@@ -134,6 +138,8 @@ class QRegister;
* Super class for states accepting Q-Register specifications
*/
class StateExpectQReg : public State {
+ bool got_local;
+
public:
StateExpectQReg();
@@ -261,6 +267,6 @@ extern gchar *strings[2];
extern gchar escape_char;
void macro_execute(const gchar *macro) throw (State::Error);
-bool file_execute(const gchar *filename);
+bool file_execute(const gchar *filename, bool locals = true);
#endif