diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/vendor/rack-mount-0.6.6.pre/rack/mount/strexp/parser.y')
-rw-r--r-- | actionpack/lib/action_dispatch/vendor/rack-mount-0.6.6.pre/rack/mount/strexp/parser.y | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/actionpack/lib/action_dispatch/vendor/rack-mount-0.6.6.pre/rack/mount/strexp/parser.y b/actionpack/lib/action_dispatch/vendor/rack-mount-0.6.6.pre/rack/mount/strexp/parser.y deleted file mode 100644 index ffbd9fae11..0000000000 --- a/actionpack/lib/action_dispatch/vendor/rack-mount-0.6.6.pre/rack/mount/strexp/parser.y +++ /dev/null @@ -1,34 +0,0 @@ -class Rack::Mount::StrexpParser -rule - target: expr { result = anchor ? "\\A#{val.join}\\Z" : "\\A#{val.join}" } - - expr: expr token { result = val.join } - | token - - token: PARAM { - name = val[0].to_sym - requirement = requirements[name] - result = REGEXP_NAMED_CAPTURE % [name, requirement] - } - | GLOB { - name = val[0].to_sym - requirement = requirements[name] - result = REGEXP_NAMED_CAPTURE % [name, '.+' || requirement] - } - | LPAREN expr RPAREN { result = "(?:#{val[1]})?" } - | CHAR { result = Regexp.escape(val[0]) } -end - ----- header ---- -require 'rack/mount/utils' -require 'rack/mount/strexp/tokenizer' - ----- inner - -if Regin.regexp_supports_named_captures? - REGEXP_NAMED_CAPTURE = '(?<%s>%s)'.freeze -else - REGEXP_NAMED_CAPTURE = '(?:<%s>%s)'.freeze -end - -attr_accessor :anchor, :requirements |