aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2013-10-17 23:13:17 +0200
committerDrahflow <drahflow@gmx.de>2013-10-17 23:13:17 +0200
commiteb9ed693fad8122a99f9cad8e9a496041be11f4b (patch)
treec4dbe891f6ab74db5f2860b8cf8701821e4b1018 /compiler
parentbbc9f464e5a914ab0699a917d5b2848f72a3ac47 (diff)
Allow escape of more meta-characters in regex
Diffstat (limited to 'compiler')
-rw-r--r--compiler/standardClient.ey17
1 files changed, 16 insertions, 1 deletions
diff --git a/compiler/standardClient.ey b/compiler/standardClient.ey
index f75af2c..efe7298 100644
--- a/compiler/standardClient.ey
+++ b/compiler/standardClient.ey
@@ -122,7 +122,7 @@
[ { ^d } {
{ _ 0 "0" * ge -01 0 "9" * le and }" terminal =a
tail
- } { ^\ } {
+ } { ^\ } { # FIXME the following code looks like it could be compressed a bit
{ 0 "\\" * eq }" terminal =a
tail
} { ^. } {
@@ -134,6 +134,21 @@
} { ^[ } {
{ 0 "[" * eq }" terminal =a
tail
+ } { ^? } {
+ { 0 "?" * eq }" terminal =a
+ tail
+ } { ^* } {
+ { 0 "*" * eq }" terminal =a
+ tail
+ } { ^+ } {
+ { 0 "+" * eq }" terminal =a
+ tail
+ } { ^$ } {
+ { 0 "$" * eq }" terminal =a
+ tail
+ } { ^^ } {
+ { 0 "^" * eq }" terminal =a
+ tail
} { 1 } {
"invalid character '" "' after \\ in regex" -120 cat cat die
} ] conds