From 24b297f587aa59f6af0e14da196a1e1970ab3a33 Mon Sep 17 00:00:00 2001 From: Moritz Lenz Date: Tue, 7 Sep 2010 16:09:04 +0200 Subject: [PATCH] report unrecognized backslash sequences --- src/Regex/P6Regex/Grammar.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Regex/P6Regex/Grammar.pm b/src/Regex/P6Regex/Grammar.pm index 9b4c70b..d7ce26f 100644 --- a/src/Regex/P6Regex/Grammar.pm +++ b/src/Regex/P6Regex/Grammar.pm @@ -145,6 +145,7 @@ grammar Regex::P6Regex::Grammar is HLL::Grammar; token backslash:sym { 'z' <.obs: '\\z as end-of-string matcher', '$'> } token backslash:sym { 'Z' <.obs: '\\Z as end-of-string matcher', '\\n?$'> } token backslash:sym { 'Q' <.obs: '\\Q as quotemeta', 'quotes or literal variable match'> } + token backslash:sym { {} \w <.panic: 'Unrecognized backslash sequence'> } token backslash:sym { \W } proto token assertion { <...> }