Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renegerate.

  • Loading branch information...
commit 4527f3ba8d7c30094e5217d5048d04e5f497830a 1 parent 657abff
@knu authored
Showing with 15 additions and 4 deletions.
  1. +15 −4 lib/webrobots/robotstxt.rb
View
19 lib/webrobots/robotstxt.rb
@@ -1,6 +1,6 @@
#
# DO NOT MODIFY!!!!
-# This file is automatically generated by Racc 1.4.6
+# This file is automatically generated by Racc 1.4.7
# from Racc grammer file "".
#
@@ -14,12 +14,23 @@ class Error < StandardError
end
class ParseError < Error
+ # The site's root URI
+ attr_reader :site
+
+ def initialize(message, site)
+ @message = message
+ @site = site
+ end
+
+ def to_s
+ @message
+ end
end
class RobotsTxt
class Parser < Racc::Parser
-module_eval(<<'...end robotstxt.ry/module_eval...', 'robotstxt.ry', 158)
+module_eval(<<'...end robotstxt.ry/module_eval...', 'robotstxt.ry', 169)
def initialize(target = nil)
super()
@@ -90,7 +101,7 @@ def parse(input, site)
do_parse
rescue Racc::ParseError => e
- raise ParseError, e.message
+ raise ParseError.new(e.message, @site)
ensure
@q.clear
end
@@ -606,7 +617,7 @@ def initialize(agentlines, rulelines)
else
@options[ruleline.token.downcase] = ruleline.value
end
- }
+ } if rulelines
@acls.replace @acls.sort_by { |x|
[-x.value.length, x.is_a?(AllowLine) ? -1 : 0]
}

0 comments on commit 4527f3b

Please sign in to comment.
Something went wrong with that request. Please try again.