diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-16 02:52:51 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-02-16 02:52:51 +0100 |
commit | 8811c358f8c82aea515051b508b26fbfacb61e24 (patch) | |
tree | 4acc9c426f9e83c9e5e66c10807af760be9830dd /src/parser.cpp | |
parent | 7b16df057ce5b8cd5ad1870d5188ee11140e73b5 (diff) | |
download | sciteco-8811c358f8c82aea515051b508b26fbfacb61e24.tar.gz |
implemented command to query ASCII code of character (^^x)
Diffstat (limited to 'src/parser.cpp')
-rw-r--r-- | src/parser.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 6e32d87..46bea77 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -45,6 +45,7 @@ gint macro_pc = 0; namespace States { StateStart start; StateControl control; + StateASCII ascii; StateFCommand fcommand; StateCondCommand condcommand; StateECommand ecommand; @@ -1208,6 +1209,7 @@ StateControl::StateControl() : State() { transitions['\0'] = this; transitions['U'] = &States::ctlucommand; + transitions['^'] = &States::ascii; } State * @@ -1275,6 +1277,21 @@ StateControl::custom(gchar chr) throw (Error) return &States::start; } +StateASCII::StateASCII() : State() +{ + transitions['\0'] = this; +} + +State * +StateASCII::custom(gchar chr) throw (Error) +{ + BEGIN_EXEC(&States::start); + + expressions.push(chr); + + return &States::start; +} + StateECommand::StateECommand() : State() { transitions['\0'] = this; |