diff --git a/Rakefile b/Rakefile index 6fabb88..cccac16 100755 --- a/Rakefile +++ b/Rakefile @@ -8,7 +8,7 @@ require 'rubygems/package_task' task :default => 'test' task :ragel do - sh "find . -name '*.rl' | xargs ragel -R" + sh "find . -name '*.rl' | xargs ragel -R -F1" end diff --git a/lib/liquid/context.rb b/lib/liquid/context.rb index 0edd30b..b9d9136 100644 --- a/lib/liquid/context.rb +++ b/lib/liquid/context.rb @@ -142,32 +142,41 @@ module Liquid case key when nil, "" return nil - when "blank?" - return :blank - when "empty?" - return :empty + when "blank" + return :blank? + when "empty" + return :empty? end - - puts "resolve(#{key})" result = Parser.parse(key) stack = [] result.each do |(sym, value)| + case sym - when :identifier + when :id stack.push value when :lookup left = stack.pop - stack.push find_variable(left) + value = find_variable(left) + + stack.push(harden(value)) when :range right = stack.pop.to_i left = stack.pop.to_i + stack.push (left..right) + when :buildin + left = stack.pop + value = invoke_buildin(left, value) + + stack.push(harden(value)) when :call - parent = stack.pop - key = stack.pop - stack.push lookup_and_evaluate(parent, key) + left = stack.pop + right = stack.pop + value = lookup_and_evaluate(right, left) + + stack.push(harden(value)) else raise "unknown #{sym}" end @@ -176,6 +185,22 @@ module Liquid return stack.first end + def invoke_buildin(obj, key) + # as weird as this is, liquid unit tests demand that we prioritize hash lookups + # to buildins. So if we got a hash and it has a :first element we need to call that + # instead of sending the first message... + + if obj.respond_to?(:has_key?) && obj.has_key?(key) + return lookup_and_evaluate(obj, key) + end + + if obj.respond_to?(key) + return obj.send(key) + else + return nil + end + end + # Fetches an object starting at the local scope and then moving up the hierachy def find_variable(key) scope = @scopes.find { |s| s.has_key?(key) } @@ -192,71 +217,35 @@ module Liquid scope ||= @environments.last || @scopes.last variable ||= lookup_and_evaluate(scope, key) - variable = variable.to_liquid - variable.context = self if variable.respond_to?(:context=) - return variable end - # Resolves namespaced queries gracefully. - # - # Example - # @context['hash'] = {"name" => 'tobi'} - # assert_equal 'tobi', @context['hash.name'] - # assert_equal 'tobi', @context['hash["name"]'] - def variable(markup) - parts = markup.scan(VariableParser) - square_bracketed = /^\[(.*)\]$/ - - first_part = parts.shift - - if first_part =~ square_bracketed - first_part = resolve($1) - end - - if object = find_variable(first_part) - - parts.each do |part| - part = resolve($1) if part_resolved = (part =~ square_bracketed) - - # If object is a hash- or array-like object we look for the - # presence of the key and if its available we return it - if object.respond_to?(:[]) and - ((object.respond_to?(:has_key?) and object.has_key?(part)) or - (object.respond_to?(:fetch) and part.is_a?(Integer))) - - # if its a proc we will replace the entry with the proc - res = lookup_and_evaluate(object, part) - object = res.to_liquid - - # Some special cases. If the part wasn't in square brackets and - # no key with the same name was found we interpret following calls - # as commands and call them on the current object - elsif !part_resolved and object.respond_to?(part) and ['size', 'first', 'last'].include?(part) - - object = object.send(part.intern).to_liquid - - # No key was present with the desired value and it wasn't one of the directly supported - # keywords either. The only thing we got left is to return nil - else - return nil - end - - # If we are dealing with a drop here we have to - object.context = self if object.respond_to?(:context=) - end - end - - object - end # variable - def lookup_and_evaluate(obj, key) - if (value = obj[key]).is_a?(Proc) && obj.respond_to?(:[]=) - obj[key] = (value.arity == 0) ? value.call : value.call(self) - else - value + return nil unless obj.respond_to?(:[]) + + if obj.is_a?(Array) + return nil unless key.is_a?(Integer) end - end # lookup_and_evaluate + + value = obj[key] + + case value + when Proc + # call the proc + value = (value.arity == 0) ? value.call : value.call(self) + + # memozie if possible + obj[key] = value if obj.respond_to?(:[]=) + end + + value + end + + def harden(value) + value = value.to_liquid + value.context = self if value.respond_to?(:context=) + return value + end def squash_instance_assigns_with_environments @scopes.last.each_key do |k| diff --git a/lib/liquid/parser.rb b/lib/liquid/parser.rb index 8f7d39b..c3d5fd9 100644 --- a/lib/liquid/parser.rb +++ b/lib/liquid/parser.rb @@ -1,37 +1,12 @@ # line 1 "./lib/liquid/parser.rl" -=begin - LITERALS = { - nil => nil, 'nil' => nil, 'null' => nil, '' => nil, - 'true' => true, - 'false' => false, - 'blank' => :blank?, - 'empty' => :empty? - } +# Parser for context#[] method. Generated through ragel from parser.rl +# Only modify parser.rl. Run rake ragel afterwards to generate this file. +# +#VERBOSE=true - def resolve(key) - if LITERALS.key?(key) - LITERALS[key] - else - case key - when /^'(.*)'$/ # Single quoted strings - $1 - when /^"(.*)"$/ # Double quoted strings - $1 - when /^(-?\d+)$/ # Integer and floats - $1.to_i - when /^\((\S+)\.\.(\S+)\)$/ # Ranges - (resolve($1).to_i..resolve($2).to_i) - when /^(-?\d[\d\.]+)$/ # Floats - $1.to_f - else - variable(key) - end - end - end -=end -# line 91 "./lib/liquid/parser.rl" +# line 101 "./lib/liquid/parser.rl" # % fix syntax highlighting @@ -39,7 +14,7 @@ module Liquid module Parser -# line 43 "./lib/liquid/parser.rb" +# line 18 "./lib/liquid/parser.rb" class << self attr_accessor :_fsm_actions private :_fsm_actions, :_fsm_actions= @@ -47,27 +22,9 @@ end self._fsm_actions = [ 0, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, - 7, 1, 8, 1, 9 -] - -class << self - attr_accessor :_fsm_key_offsets - private :_fsm_key_offsets, :_fsm_key_offsets= -end -self._fsm_key_offsets = [ - 0, 0, 15, 16, 17, 30, 31, 33, - 35, 45, 46, 48, 50, 60, 62, 65, - 68, 81, 81, 83, 87, 89, 92, 100, - 109, 118, 127, 136, 144, 154, 163, 171, - 180, 189, 198, 207, 215, 218, 219, 227, - 236, 245, 254, 263, 271, 281, 290, 298, - 307, 316, 325, 334, 342, 344, 346, 359, - 360, 362, 363, 365, 367, 371, 373, 376, - 384, 393, 402, 411, 420, 428, 438, 447, - 455, 464, 473, 482, 491, 499, 500, 501, - 501, 504, 506, 513, 514, 515, 515, 523, - 531, 539, 547, 554, 563, 571, 578, 586, - 594, 602, 610 + 7, 1, 8, 1, 9, 1, 10, 1, + 11, 1, 12, 1, 13, 1, 14, 1, + 15, 2, 0, 11 ] class << self @@ -75,124 +32,70 @@ class << self private :_fsm_trans_keys, :_fsm_trans_keys= end self._fsm_trans_keys = [ - 34, 39, 40, 43, 45, 91, 102, 110, - 116, 48, 57, 65, 90, 97, 122, 34, - 39, 34, 39, 43, 45, 102, 110, 116, - 48, 57, 65, 90, 97, 122, 34, 34, - 46, 34, 46, 34, 39, 43, 45, 48, - 57, 65, 90, 97, 122, 39, 39, 46, - 39, 46, 34, 39, 43, 45, 48, 57, - 65, 90, 97, 122, 48, 57, 46, 48, - 57, 46, 48, 57, 34, 39, 43, 45, - 102, 110, 116, 48, 57, 65, 90, 97, - 122, 48, 57, 41, 46, 48, 57, 48, - 57, 41, 48, 57, 41, 95, 48, 57, - 65, 90, 97, 122, 41, 95, 97, 48, - 57, 65, 90, 98, 122, 41, 95, 108, - 48, 57, 65, 90, 97, 122, 41, 95, - 115, 48, 57, 65, 90, 97, 122, 41, - 95, 101, 48, 57, 65, 90, 97, 122, - 41, 95, 48, 57, 65, 90, 97, 122, - 41, 95, 105, 117, 48, 57, 65, 90, - 97, 122, 41, 95, 108, 48, 57, 65, - 90, 97, 122, 41, 95, 48, 57, 65, - 90, 97, 122, 41, 95, 108, 48, 57, - 65, 90, 97, 122, 41, 95, 114, 48, - 57, 65, 90, 97, 122, 41, 95, 117, - 48, 57, 65, 90, 97, 122, 41, 95, - 101, 48, 57, 65, 90, 97, 122, 41, - 95, 48, 57, 65, 90, 97, 122, 46, - 48, 57, 46, 46, 95, 48, 57, 65, - 90, 97, 122, 46, 95, 97, 48, 57, - 65, 90, 98, 122, 46, 95, 108, 48, - 57, 65, 90, 97, 122, 46, 95, 115, - 48, 57, 65, 90, 97, 122, 46, 95, - 101, 48, 57, 65, 90, 97, 122, 46, - 95, 48, 57, 65, 90, 97, 122, 46, - 95, 105, 117, 48, 57, 65, 90, 97, - 122, 46, 95, 108, 48, 57, 65, 90, - 97, 122, 46, 95, 48, 57, 65, 90, - 97, 122, 46, 95, 108, 48, 57, 65, - 90, 97, 122, 46, 95, 114, 48, 57, - 65, 90, 97, 122, 46, 95, 117, 48, - 57, 65, 90, 97, 122, 46, 95, 101, - 48, 57, 65, 90, 97, 122, 46, 95, - 48, 57, 65, 90, 97, 122, 48, 57, - 48, 57, 34, 39, 43, 45, 102, 110, - 116, 48, 57, 65, 90, 97, 122, 34, - 34, 93, 39, 39, 93, 48, 57, 46, - 93, 48, 57, 48, 57, 93, 48, 57, - 93, 95, 48, 57, 65, 90, 97, 122, - 93, 95, 97, 48, 57, 65, 90, 98, - 122, 93, 95, 108, 48, 57, 65, 90, - 97, 122, 93, 95, 115, 48, 57, 65, - 90, 97, 122, 93, 95, 101, 48, 57, - 65, 90, 97, 122, 93, 95, 48, 57, - 65, 90, 97, 122, 93, 95, 105, 117, - 48, 57, 65, 90, 97, 122, 93, 95, - 108, 48, 57, 65, 90, 97, 122, 93, - 95, 48, 57, 65, 90, 97, 122, 93, - 95, 108, 48, 57, 65, 90, 97, 122, - 93, 95, 114, 48, 57, 65, 90, 97, - 122, 93, 95, 117, 48, 57, 65, 90, - 97, 122, 93, 95, 101, 48, 57, 65, - 90, 97, 122, 93, 95, 48, 57, 65, - 90, 97, 122, 34, 39, 46, 48, 57, - 48, 57, 95, 48, 57, 65, 90, 97, - 122, 34, 39, 95, 97, 48, 57, 65, - 90, 98, 122, 95, 108, 48, 57, 65, - 90, 97, 122, 95, 115, 48, 57, 65, - 90, 97, 122, 95, 101, 48, 57, 65, - 90, 97, 122, 95, 48, 57, 65, 90, - 97, 122, 95, 105, 117, 48, 57, 65, - 90, 97, 122, 95, 108, 48, 57, 65, - 90, 97, 122, 95, 48, 57, 65, 90, - 97, 122, 95, 108, 48, 57, 65, 90, - 97, 122, 95, 114, 48, 57, 65, 90, - 97, 122, 95, 117, 48, 57, 65, 90, - 97, 122, 95, 101, 48, 57, 65, 90, - 97, 122, 95, 48, 57, 65, 90, 97, - 122, 0 + 0, 0, 34, 122, 34, 34, + 39, 39, 34, 122, 34, + 34, 34, 46, 34, 46, + 34, 122, 39, 39, 39, 46, + 39, 46, 34, 122, 48, + 57, 46, 57, 46, 57, + 34, 122, 0, 0, 48, 57, + 41, 57, 65, 122, 93, + 93, 93, 93, 65, 122, + 93, 93, 0, 0, 48, 57, + 41, 57, 41, 122, 41, + 122, 41, 122, 41, 122, + 41, 122, 41, 122, 41, 122, + 41, 122, 41, 122, 41, + 122, 41, 122, 41, 122, + 41, 122, 41, 122, 46, 57, + 46, 46, 45, 122, 45, + 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, + 122, 45, 122, 45, 122, + 45, 122, 45, 122, 48, 57, + 48, 57, 93, 93, 93, + 93, 0, 0, 34, 34, + 39, 39, 46, 91, 45, 122, + 46, 93, 45, 122, 45, + 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, + 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, + 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, + 122, 45, 122, 46, 91, + 46, 91, 45, 122, 93, 93, + 45, 122, 45, 122, 45, + 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, 122, + 45, 122, 45, 122, 45, + 122, 45, 122, 45, 122, + 0 ] class << self - attr_accessor :_fsm_single_lengths - private :_fsm_single_lengths, :_fsm_single_lengths= + attr_accessor :_fsm_key_spans + private :_fsm_key_spans, :_fsm_key_spans= end -self._fsm_single_lengths = [ - 0, 9, 1, 1, 7, 1, 2, 2, - 4, 1, 2, 2, 4, 0, 1, 1, - 7, 0, 0, 2, 0, 1, 2, 3, - 3, 3, 3, 2, 4, 3, 2, 3, - 3, 3, 3, 2, 1, 1, 2, 3, - 3, 3, 3, 2, 4, 3, 2, 3, - 3, 3, 3, 2, 0, 0, 7, 1, - 2, 1, 2, 0, 2, 0, 1, 2, - 3, 3, 3, 3, 2, 4, 3, 2, - 3, 3, 3, 3, 2, 1, 1, 0, - 1, 0, 1, 1, 1, 0, 2, 2, - 2, 2, 1, 3, 2, 1, 2, 2, - 2, 2, 1 -] - -class << self - attr_accessor :_fsm_range_lengths - private :_fsm_range_lengths, :_fsm_range_lengths= -end -self._fsm_range_lengths = [ - 0, 3, 0, 0, 3, 0, 0, 0, - 3, 0, 0, 0, 3, 1, 1, 1, - 3, 0, 1, 1, 1, 1, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 1, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 1, 1, 3, 0, - 0, 0, 0, 1, 1, 1, 1, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 0, 0, 0, - 1, 1, 3, 0, 0, 0, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3 +self._fsm_key_spans = [ + 0, 89, 1, 1, 89, 1, 13, 13, + 89, 1, 8, 8, 89, 10, 12, 12, + 89, 0, 10, 17, 58, 1, 1, 58, + 1, 0, 10, 17, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 12, 1, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 10, 10, 1, 1, 0, 1, + 1, 46, 78, 48, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 46, + 46, 78, 1, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78 ] class << self @@ -200,19 +103,846 @@ class << self private :_fsm_index_offsets, :_fsm_index_offsets= end self._fsm_index_offsets = [ - 0, 0, 13, 15, 17, 28, 30, 33, - 36, 44, 46, 49, 52, 60, 62, 65, - 68, 79, 80, 82, 86, 88, 91, 97, - 104, 111, 118, 125, 131, 139, 146, 152, - 159, 166, 173, 180, 186, 189, 191, 197, - 204, 211, 218, 225, 231, 239, 246, 252, - 259, 266, 273, 280, 286, 288, 290, 301, - 303, 306, 308, 311, 313, 317, 319, 322, - 328, 335, 342, 349, 356, 362, 370, 377, - 383, 390, 397, 404, 411, 417, 419, 421, - 422, 425, 427, 432, 434, 436, 437, 443, - 449, 455, 461, 466, 473, 479, 484, 490, - 496, 502, 508 + 0, 0, 90, 92, 94, 184, 186, 200, + 214, 304, 306, 315, 324, 414, 425, 438, + 451, 541, 542, 553, 571, 630, 632, 634, + 693, 695, 696, 707, 725, 808, 891, 974, + 1057, 1140, 1223, 1306, 1389, 1472, 1555, 1638, + 1721, 1804, 1887, 1900, 1902, 1981, 2060, 2139, + 2218, 2297, 2376, 2455, 2534, 2613, 2692, 2771, + 2850, 2929, 3008, 3019, 3030, 3032, 3034, 3035, + 3037, 3039, 3086, 3165, 3214, 3293, 3372, 3451, + 3530, 3609, 3688, 3767, 3846, 3925, 4004, 4083, + 4162, 4241, 4320, 4399, 4478, 4557, 4636, 4715, + 4794, 4873, 4952, 5031, 5110, 5189, 5268, 5347, + 5394, 5441, 5520, 5522, 5601, 5680, 5759, 5838, + 5917, 5996, 6075, 6154, 6233, 6312, 6391, 6470 +] + +class << self + attr_accessor :_fsm_indicies + private :_fsm_indicies, :_fsm_indicies= +end +self._fsm_indicies = [ + 0, 1, 1, 1, 1, 2, 3, 1, + 1, 4, 1, 4, 1, 1, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, + 1, 1, 1, 1, 1, 1, 1, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, + 6, 7, 1, 1, 1, 1, 1, 6, + 6, 6, 6, 6, 8, 6, 6, 6, + 6, 6, 6, 6, 9, 6, 6, 6, + 6, 6, 10, 6, 6, 6, 6, 6, + 6, 1, 12, 11, 14, 13, 15, 1, + 1, 1, 1, 16, 1, 1, 1, 17, + 1, 17, 1, 1, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 1, 1, + 1, 1, 1, 1, 1, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 1, + 1, 1, 1, 1, 1, 19, 19, 19, + 19, 19, 20, 19, 19, 19, 19, 19, + 19, 19, 21, 19, 19, 19, 19, 19, + 22, 19, 19, 19, 19, 19, 19, 1, + 24, 23, 24, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 25, 23, + 24, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 26, 23, 27, 23, + 23, 23, 23, 15, 23, 23, 23, 15, + 23, 15, 23, 23, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 23, 23, + 23, 23, 23, 23, 23, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 23, + 23, 23, 23, 23, 23, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 23, + 29, 28, 29, 28, 28, 28, 28, 28, + 28, 30, 28, 29, 28, 28, 28, 28, + 28, 28, 31, 28, 16, 28, 28, 28, + 28, 32, 28, 28, 28, 16, 28, 16, + 28, 28, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 28, 28, 28, 28, + 28, 28, 28, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 28, 28, 28, + 28, 28, 28, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 28, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, + 1, 34, 1, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 1, 35, 1, + 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 1, 37, 1, 1, 1, 1, + 37, 1, 1, 1, 38, 1, 38, 1, + 1, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 1, 1, 1, 1, 1, + 1, 1, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 1, 1, 1, 1, + 1, 1, 40, 40, 40, 40, 40, 41, + 40, 40, 40, 40, 40, 40, 40, 42, + 40, 40, 40, 40, 40, 43, 40, 40, + 40, 40, 40, 40, 1, 44, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, + 1, 46, 1, 1, 1, 1, 47, 1, + 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 1, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 1, 1, 1, + 1, 1, 1, 48, 48, 48, 48, 48, + 49, 48, 48, 48, 48, 48, 50, 48, + 48, 48, 48, 48, 48, 51, 48, 48, + 48, 48, 48, 48, 48, 1, 53, 52, + 55, 54, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 54, 54, 55, 54, + 54, 54, 56, 56, 56, 56, 56, 57, + 56, 56, 56, 56, 56, 58, 56, 56, + 56, 56, 56, 56, 59, 56, 56, 56, + 56, 56, 56, 56, 54, 60, 52, 54, + 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 1, 62, 1, 1, 1, 1, + 1, 1, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 1, 63, 1, 1, + 1, 64, 1, 1, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 1, 1, + 1, 1, 1, 1, 1, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 1, + 1, 1, 1, 64, 1, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 1, + 63, 1, 1, 1, 64, 1, 1, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 1, 1, 1, 1, 1, 1, 1, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 1, 1, 1, 1, 64, 1, + 65, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 1, 63, 1, 1, 1, 64, + 1, 1, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 1, 1, 1, 1, + 1, 1, 1, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 1, 1, 1, + 1, 64, 1, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 66, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 1, 63, 1, + 1, 1, 64, 1, 1, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 1, + 1, 1, 1, 1, 1, 1, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 1, 1, 1, 1, 64, 1, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 67, 64, 64, 64, 64, 64, 64, 64, + 1, 63, 1, 1, 1, 64, 1, 1, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 1, 1, 1, 1, 1, 1, + 1, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 1, 1, 1, 1, 64, + 1, 64, 64, 64, 64, 68, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 1, 69, 1, 1, 1, + 64, 1, 1, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 1, 1, 1, + 1, 1, 1, 1, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 1, 1, + 1, 1, 64, 1, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 1, 63, + 1, 1, 1, 64, 1, 1, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 1, 1, 1, 1, 1, 1, 1, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 1, 1, 1, 1, 64, 1, 64, + 64, 64, 64, 64, 64, 64, 64, 70, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 71, 64, 64, 64, 64, + 64, 1, 63, 1, 1, 1, 64, 1, + 1, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 1, 1, 1, 1, 1, + 1, 1, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 1, 1, 1, 1, + 64, 1, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 72, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 1, 73, 1, 1, + 1, 64, 1, 1, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 1, 1, + 1, 1, 1, 1, 1, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 1, + 1, 1, 1, 64, 1, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 1, + 63, 1, 1, 1, 64, 1, 1, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 1, 1, 1, 1, 1, 1, 1, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 1, 1, 1, 1, 64, 1, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 70, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 1, 63, 1, 1, 1, 64, + 1, 1, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 1, 1, 1, 1, + 1, 1, 1, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 1, 1, 1, + 1, 64, 1, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 74, 64, 64, 64, + 64, 64, 64, 64, 64, 1, 63, 1, + 1, 1, 64, 1, 1, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 1, + 1, 1, 1, 1, 1, 1, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 1, 1, 1, 1, 64, 1, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 75, 64, 64, 64, 64, 64, + 1, 63, 1, 1, 1, 64, 1, 1, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 1, 1, 1, 1, 1, 1, + 1, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 1, 1, 1, 1, 64, + 1, 64, 64, 64, 64, 76, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 1, 77, 1, 1, 1, + 64, 1, 1, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 1, 1, 1, + 1, 1, 1, 1, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 1, 1, + 1, 1, 64, 1, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 1, 78, + 1, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 1, 35, 1, 79, 80, + 1, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 1, 1, 1, 1, 1, + 1, 1, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 1, 1, 1, 1, + 79, 1, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 1, 79, 80, 1, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 1, 1, 1, 1, 1, 1, + 1, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 1, 1, 1, 1, 79, + 1, 81, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 1, 79, 80, 1, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 1, 1, 1, 1, 1, 1, 1, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 1, 1, 1, 1, 79, 1, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 82, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 1, 79, 80, 1, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 1, 1, 1, 1, 1, 1, 1, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 1, 1, 1, 1, 79, 1, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 83, 79, 79, 79, 79, 79, 79, + 79, 1, 79, 80, 1, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 1, + 1, 1, 1, 1, 1, 1, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 1, 1, 1, 1, 79, 1, 79, 79, + 79, 79, 84, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 1, 79, 85, 1, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 1, 1, + 1, 1, 1, 1, 1, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 1, + 1, 1, 1, 79, 1, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 1, + 79, 80, 1, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 1, 1, 1, + 1, 1, 1, 1, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 1, 1, + 1, 1, 79, 1, 79, 79, 79, 79, + 79, 79, 79, 79, 86, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 87, 79, 79, 79, 79, 79, 1, 79, + 80, 1, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 1, 1, 1, 1, + 1, 1, 1, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 1, 1, 1, + 1, 79, 1, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 88, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 1, 79, 89, + 1, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 1, 1, 1, 1, 1, + 1, 1, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 1, 1, 1, 1, + 79, 1, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 1, 79, 80, 1, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 1, 1, 1, 1, 1, 1, + 1, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 1, 1, 1, 1, 79, + 1, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 86, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 1, 79, 80, 1, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 1, 1, 1, 1, 1, 1, 1, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 1, 1, 1, 1, 79, 1, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 90, 79, 79, 79, 79, 79, 79, + 79, 79, 1, 79, 80, 1, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 1, 1, 1, 1, 1, 1, 1, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 1, 1, 1, 1, 79, 1, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 91, 79, 79, 79, 79, + 79, 1, 79, 80, 1, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 1, + 1, 1, 1, 1, 1, 1, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 1, 1, 1, 1, 79, 1, 79, 79, + 79, 79, 92, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 1, 79, 93, 1, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 1, 1, + 1, 1, 1, 1, 1, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 1, + 1, 1, 1, 79, 1, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 1, + 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 1, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 1, 97, 96, + 99, 98, 98, 12, 11, 14, 13, 100, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 101, 1, 102, 103, + 1, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 1, 1, 1, 1, 1, + 1, 1, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 104, 1, 1, 1, + 102, 1, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 1, 105, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 106, 54, 55, 54, 107, 108, + 54, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 54, 54, 54, 54, 54, + 54, 54, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 109, 54, 55, 54, + 107, 54, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 54, 107, 108, 54, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 54, 54, 54, 54, 54, 54, + 54, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 109, 54, 55, 54, 107, + 54, 107, 107, 107, 107, 107, 107, 107, + 107, 110, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 54, 107, 108, 54, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 54, 54, 54, 54, 54, 54, 54, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 109, 54, 55, 54, 107, 54, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 111, 107, 107, 107, 107, 107, 107, + 107, 107, 54, 107, 108, 54, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 54, 54, 54, 54, 54, 54, 54, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 109, 54, 55, 54, 107, 54, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 112, 107, 107, 107, 107, 107, 107, + 107, 54, 107, 108, 54, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 54, + 54, 54, 54, 54, 54, 54, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 109, 54, 55, 54, 107, 54, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 113, 107, 107, 107, 107, 107, 107, + 54, 107, 114, 54, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 54, 54, + 54, 54, 54, 54, 54, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 115, + 54, 55, 54, 107, 54, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 54, + 107, 108, 54, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 54, 54, 54, + 54, 54, 54, 54, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 109, 54, + 55, 54, 107, 54, 116, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 54, 107, + 108, 54, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 54, 54, 54, 54, + 54, 54, 54, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 109, 54, 55, + 54, 107, 54, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 117, 107, 107, + 107, 107, 107, 107, 107, 54, 107, 108, + 54, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 54, 54, 54, 54, 54, + 54, 54, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 109, 54, 55, 54, + 107, 54, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 118, 107, 107, + 107, 107, 107, 107, 54, 107, 119, 54, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 54, 54, 54, 54, 54, 54, + 54, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 120, 54, 55, 54, 107, + 54, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 54, 107, 108, 54, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 54, 54, 54, 54, 54, 54, 54, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 109, 54, 55, 54, 107, 54, + 107, 107, 107, 107, 107, 107, 107, 107, + 121, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 54, 107, 108, 54, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 54, 54, 54, 54, 54, 54, 54, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 109, 54, 55, 54, 107, 54, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 122, 54, 107, 108, 54, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 54, + 54, 54, 54, 54, 54, 54, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 109, 54, 55, 54, 107, 54, 107, 107, + 107, 107, 123, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 54, 107, 124, 54, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 54, 54, + 54, 54, 54, 54, 54, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 125, + 54, 55, 54, 107, 54, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 54, + 102, 103, 1, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 1, 1, 1, + 1, 1, 1, 1, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 104, 1, + 1, 1, 102, 1, 102, 102, 102, 102, + 102, 102, 102, 102, 126, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 1, 102, + 103, 1, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 1, 1, 1, 1, + 1, 1, 1, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 104, 1, 1, + 1, 102, 1, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 127, 102, 102, 102, + 102, 102, 102, 102, 102, 1, 102, 103, + 1, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 1, 1, 1, 1, 1, + 1, 1, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 104, 1, 1, 1, + 102, 1, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 128, 102, 102, 102, + 102, 102, 102, 102, 1, 102, 103, 1, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 1, 1, 1, 1, 1, 1, + 1, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 104, 1, 1, 1, 102, + 1, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 129, 102, 102, 102, + 102, 102, 102, 1, 102, 130, 1, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 1, 1, 1, 1, 1, 1, 1, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 131, 1, 1, 1, 102, 1, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 1, 102, 103, 1, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 1, 1, 1, 1, 1, 1, 1, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 104, 1, 1, 1, 102, 1, 132, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 1, 102, 103, 1, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 1, + 1, 1, 1, 1, 1, 1, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 104, 1, 1, 1, 102, 1, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 133, 102, 102, 102, 102, 102, 102, 102, + 1, 102, 103, 1, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 1, 1, + 1, 1, 1, 1, 1, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 104, + 1, 1, 1, 102, 1, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 134, 102, 102, 102, 102, 102, 102, 1, + 102, 135, 1, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 1, 1, 1, + 1, 1, 1, 1, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 136, 1, + 1, 1, 102, 1, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 1, 102, + 103, 1, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 1, 1, 1, 1, + 1, 1, 1, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 104, 1, 1, + 1, 102, 1, 102, 102, 102, 102, 102, + 102, 102, 102, 137, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 1, 102, 103, + 1, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 1, 1, 1, 1, 1, + 1, 1, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 104, 1, 1, 1, + 102, 1, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 138, 1, 102, 103, 1, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 1, 1, 1, 1, 1, 1, + 1, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 104, 1, 1, 1, 102, + 1, 102, 102, 102, 102, 139, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 1, 102, 140, 1, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 1, 1, 1, 1, 1, 1, 1, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 141, 1, 1, 1, 102, 1, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 1, 142, 1, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 143, 1, 144, 1, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 145, + 1, 146, 147, 1, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 1, 1, + 1, 1, 1, 1, 1, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 148, + 1, 1, 1, 146, 1, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 1, + 99, 98, 146, 147, 1, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 1, + 1, 1, 1, 1, 1, 1, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 148, 1, 1, 1, 146, 1, 149, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 1, 146, 147, 1, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 1, 1, + 1, 1, 1, 1, 1, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 148, + 1, 1, 1, 146, 1, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 150, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 1, + 146, 147, 1, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 1, 1, 1, + 1, 1, 1, 1, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 148, 1, + 1, 1, 146, 1, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 151, 146, + 146, 146, 146, 146, 146, 146, 1, 146, + 147, 1, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 1, 1, 1, 1, + 1, 1, 1, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 148, 1, 1, + 1, 146, 1, 146, 146, 146, 146, 152, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 1, 146, 153, + 1, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 1, 1, 1, 1, 1, + 1, 1, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 154, 1, 1, 1, + 146, 1, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 1, 146, 147, 1, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 1, 1, 1, 1, 1, 1, + 1, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 148, 1, 1, 1, 146, + 1, 146, 146, 146, 146, 146, 146, 146, + 146, 155, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 156, 146, 146, + 146, 146, 146, 1, 146, 147, 1, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 1, 1, 1, 1, 1, 1, 1, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 148, 1, 1, 1, 146, 1, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 157, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 1, 146, 158, 1, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 1, 1, 1, 1, 1, 1, 1, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 159, 1, 1, 1, 146, 1, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 1, 146, 147, 1, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 1, + 1, 1, 1, 1, 1, 1, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 148, 1, 1, 1, 146, 1, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 155, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 1, 146, 147, 1, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 1, 1, + 1, 1, 1, 1, 1, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 148, + 1, 1, 1, 146, 1, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 160, 146, + 146, 146, 146, 146, 146, 146, 146, 1, + 146, 147, 1, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 1, 1, 1, + 1, 1, 1, 1, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 148, 1, + 1, 1, 146, 1, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 161, 146, 146, 146, 146, 146, 1, 146, + 147, 1, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 1, 1, 1, 1, + 1, 1, 1, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 148, 1, 1, + 1, 146, 1, 146, 146, 146, 146, 162, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 1, 146, 163, + 1, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 1, 1, 1, 1, 1, + 1, 1, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 164, 1, 1, 1, + 146, 1, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 1, 0 ] class << self @@ -220,71 +950,27 @@ class << self private :_fsm_trans_targs, :_fsm_trans_targs= end self._fsm_trans_targs = [ - 2, 3, 4, 52, 52, 54, 86, 91, - 95, 80, 82, 82, 0, 77, 2, 78, - 3, 5, 9, 13, 13, 39, 44, 48, - 14, 38, 38, 0, 6, 5, 6, 7, - 5, 6, 8, 5, 6, 5, 5, 5, - 5, 5, 5, 5, 10, 9, 10, 11, - 9, 10, 12, 9, 9, 10, 9, 9, - 9, 9, 9, 9, 14, 0, 15, 14, - 0, 16, 36, 0, 17, 17, 18, 18, - 23, 28, 32, 19, 22, 22, 0, 17, - 19, 0, 79, 20, 19, 0, 21, 0, - 79, 21, 0, 79, 22, 22, 22, 22, - 0, 79, 22, 24, 22, 22, 22, 0, - 79, 22, 25, 22, 22, 22, 0, 79, - 22, 26, 22, 22, 22, 0, 79, 22, - 27, 22, 22, 22, 0, 79, 22, 22, - 22, 22, 0, 79, 22, 29, 31, 22, - 22, 22, 0, 79, 22, 30, 22, 22, - 22, 0, 79, 22, 22, 22, 22, 0, - 79, 22, 29, 22, 22, 22, 0, 79, - 22, 33, 22, 22, 22, 0, 79, 22, - 34, 22, 22, 22, 0, 79, 22, 35, - 22, 22, 22, 0, 79, 22, 22, 22, - 22, 0, 37, 36, 0, 16, 0, 37, - 38, 38, 38, 38, 0, 37, 38, 40, - 38, 38, 38, 0, 37, 38, 41, 38, - 38, 38, 0, 37, 38, 42, 38, 38, - 38, 0, 37, 38, 43, 38, 38, 38, - 0, 37, 38, 38, 38, 38, 0, 37, - 38, 45, 47, 38, 38, 38, 0, 37, - 38, 46, 38, 38, 38, 0, 37, 38, - 38, 38, 38, 0, 37, 38, 45, 38, - 38, 38, 0, 37, 38, 49, 38, 38, - 38, 0, 37, 38, 50, 38, 38, 38, - 0, 37, 38, 51, 38, 38, 38, 0, - 37, 38, 38, 38, 38, 0, 80, 0, - 81, 0, 55, 57, 59, 59, 64, 69, - 73, 60, 63, 63, 0, 56, 55, 56, - 83, 55, 58, 57, 58, 84, 57, 60, - 0, 61, 85, 60, 0, 62, 0, 85, - 62, 0, 85, 63, 63, 63, 63, 0, - 85, 63, 65, 63, 63, 63, 0, 85, - 63, 66, 63, 63, 63, 0, 85, 63, - 67, 63, 63, 63, 0, 85, 63, 68, - 63, 63, 63, 0, 85, 63, 63, 63, - 63, 0, 85, 63, 70, 72, 63, 63, - 63, 0, 85, 63, 71, 63, 63, 63, - 0, 85, 63, 63, 63, 63, 0, 85, - 63, 70, 63, 63, 63, 0, 85, 63, - 74, 63, 63, 63, 0, 85, 63, 75, - 63, 63, 63, 0, 85, 63, 76, 63, - 63, 63, 0, 85, 63, 63, 63, 63, - 0, 77, 2, 78, 3, 0, 53, 80, - 0, 81, 0, 82, 82, 82, 82, 0, - 56, 55, 58, 57, 0, 82, 87, 82, - 82, 82, 0, 82, 88, 82, 82, 82, - 0, 82, 89, 82, 82, 82, 0, 82, - 90, 82, 82, 82, 0, 82, 82, 82, - 82, 0, 82, 92, 94, 82, 82, 82, - 0, 82, 93, 82, 82, 82, 0, 82, - 82, 82, 82, 0, 82, 92, 82, 82, - 82, 0, 82, 96, 82, 82, 82, 0, - 82, 97, 82, 82, 82, 0, 82, 98, - 82, 82, 82, 0, 82, 82, 82, 82, - 0, 0 + 2, 0, 3, 4, 58, 95, 97, 60, + 99, 104, 108, 2, 63, 3, 64, 5, + 9, 13, 14, 44, 45, 50, 54, 5, + 6, 7, 8, 6, 9, 10, 11, 12, + 10, 14, 15, 16, 42, 17, 18, 19, + 28, 29, 34, 38, 17, 19, 65, 26, + 66, 82, 87, 91, 22, 25, 22, 67, + 68, 69, 74, 78, 67, 27, 65, 65, + 28, 30, 31, 32, 33, 65, 35, 37, + 36, 65, 39, 40, 41, 65, 43, 44, + 43, 46, 47, 48, 49, 43, 51, 53, + 52, 43, 55, 56, 57, 43, 95, 96, + 61, 62, 61, 98, 20, 21, 66, 20, + 21, 23, 24, 68, 23, 24, 70, 71, + 72, 73, 23, 24, 75, 76, 77, 23, + 24, 79, 80, 81, 23, 24, 83, 84, + 85, 86, 20, 21, 88, 89, 90, 20, + 21, 92, 93, 94, 20, 21, 59, 21, + 20, 21, 97, 20, 21, 100, 101, 102, + 103, 20, 21, 105, 107, 106, 20, 21, + 109, 110, 111, 20, 21 ] class << self @@ -292,71 +978,27 @@ class << self private :_fsm_trans_actions, :_fsm_trans_actions= end self._fsm_trans_actions = [ - 1, 1, 0, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 0, 17, - 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 0, 17, - 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 0, 0, 0, 7, 0, - 0, 0, 0, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 0, - 0, 0, 7, 0, 0, 0, 0, 0, - 9, 0, 0, 19, 0, 0, 0, 0, - 0, 19, 0, 0, 0, 0, 0, 0, - 19, 0, 0, 0, 0, 0, 0, 19, - 0, 0, 0, 0, 0, 0, 19, 0, - 0, 0, 0, 0, 0, 15, 0, 0, - 0, 0, 0, 19, 0, 0, 0, 0, - 0, 0, 0, 19, 0, 0, 0, 0, - 0, 0, 11, 0, 0, 0, 0, 0, - 19, 0, 0, 0, 0, 0, 0, 19, - 0, 0, 0, 0, 0, 0, 19, 0, - 0, 0, 0, 0, 0, 19, 0, 0, - 0, 0, 0, 0, 13, 0, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 19, - 0, 0, 0, 0, 0, 19, 0, 0, - 0, 0, 0, 0, 19, 0, 0, 0, - 0, 0, 0, 19, 0, 0, 0, 0, - 0, 0, 19, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 0, 0, 19, - 0, 0, 0, 0, 0, 0, 0, 19, - 0, 0, 0, 0, 0, 0, 11, 0, - 0, 0, 0, 0, 19, 0, 0, 0, - 0, 0, 0, 19, 0, 0, 0, 0, - 0, 0, 19, 0, 0, 0, 0, 0, - 0, 19, 0, 0, 0, 0, 0, 0, - 13, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 17, 0, 0, - 0, 0, 7, 0, 0, 0, 0, 9, - 0, 0, 19, 0, 0, 0, 0, 0, - 19, 0, 0, 0, 0, 0, 0, 19, - 0, 0, 0, 0, 0, 0, 19, 0, - 0, 0, 0, 0, 0, 19, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, - 0, 0, 19, 0, 0, 0, 0, 0, - 0, 0, 19, 0, 0, 0, 0, 0, - 0, 11, 0, 0, 0, 0, 0, 19, - 0, 0, 0, 0, 0, 0, 19, 0, - 0, 0, 0, 0, 0, 19, 0, 0, - 0, 0, 0, 0, 19, 0, 0, 0, - 0, 0, 0, 13, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0 + 1, 0, 1, 0, 1, 1, 1, 0, + 1, 1, 1, 0, 0, 0, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 0, + 0, 19, 0, 1, 0, 0, 19, 0, + 1, 0, 9, 0, 0, 1, 1, 1, + 1, 1, 1, 1, 0, 0, 9, 0, + 1, 1, 1, 1, 1, 1, 0, 23, + 1, 1, 1, 1, 33, 0, 11, 21, + 0, 0, 0, 0, 0, 17, 0, 0, + 0, 13, 0, 0, 0, 15, 11, 0, + 21, 0, 0, 0, 0, 17, 0, 0, + 0, 13, 0, 0, 0, 15, 0, 0, + 1, 1, 0, 23, 7, 7, 0, 31, + 31, 5, 5, 0, 31, 31, 0, 0, + 0, 0, 25, 25, 0, 0, 0, 27, + 27, 0, 0, 0, 29, 29, 0, 0, + 0, 0, 25, 25, 0, 0, 0, 27, + 27, 0, 0, 0, 29, 29, 0, 9, + 11, 11, 0, 21, 21, 0, 0, 0, + 0, 17, 17, 0, 0, 0, 13, 13, + 0, 0, 0, 15, 15 ] class << self @@ -371,12 +1013,13 @@ self._fsm_eof_actions = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 17, 17, 5, - 7, 9, 19, 3, 3, 3, 19, 19, - 19, 19, 15, 19, 19, 11, 19, 19, - 19, 19, 13 + 0, 0, 0, 0, 0, 0, 0, 19, + 19, 7, 31, 5, 31, 31, 31, 31, + 31, 25, 31, 31, 31, 27, 31, 31, + 31, 29, 31, 31, 31, 31, 25, 31, + 31, 31, 27, 31, 31, 31, 29, 9, + 11, 21, 3, 21, 21, 21, 21, 17, + 21, 21, 13, 21, 21, 21, 21, 15 ] class << self @@ -386,7 +1029,7 @@ self.fsm_start = 1; class << self attr_accessor :fsm_first_final end -self.fsm_first_final = 77; +self.fsm_first_final = 63; class << self attr_accessor :fsm_error end @@ -398,30 +1041,32 @@ end self.fsm_en_main = 1; -# line 98 "./lib/liquid/parser.rl" +# line 108 "./lib/liquid/parser.rl" def self.emit(sym, type, data, tokens) - puts "emitting: #{type} #{sym} -> #{data.inspect}" + puts "emitting: #{type} #{sym} -> #{data.inspect}" if $VERBOSE tokens.push [sym, data] end - def self.parse(data) + def self.parse(data, tokens = []) + puts "--> self.parse with #{data.inspect}, #{tokens.inspect}" if $VERBOSE + eof = data.length - tokens = [] -# line 414 "./lib/liquid/parser.rb" +# line 1058 "./lib/liquid/parser.rb" begin p ||= 0 pe ||= data.length cs = fsm_start end -# line 109 "./lib/liquid/parser.rl" +# line 120 "./lib/liquid/parser.rl" -# line 423 "./lib/liquid/parser.rb" -begin - _klen, _trans, _keys, _acts, _nacts = nil +# line 1067 "./lib/liquid/parser.rb" +begin # ragel flat + testEof = false + _slen, _trans, _keys, _inds, _acts, _nacts = nil _goto_level = 0 _resume = 10 _eof_trans = 15 @@ -441,55 +1086,17 @@ begin end end if _goto_level <= _resume - _keys = _fsm_key_offsets[cs] - _trans = _fsm_index_offsets[cs] - _klen = _fsm_single_lengths[cs] - _break_match = false - - begin - if _klen > 0 - _lower = _keys - _upper = _keys + _klen - 1 - - loop do - break if _upper < _lower - _mid = _lower + ( (_upper - _lower) >> 1 ) - - if data[p].ord < _fsm_trans_keys[_mid] - _upper = _mid - 1 - elsif data[p].ord > _fsm_trans_keys[_mid] - _lower = _mid + 1 - else - _trans += (_mid - _keys) - _break_match = true - break - end - end # loop - break if _break_match - _keys += _klen - _trans += _klen - end - _klen = _fsm_range_lengths[cs] - if _klen > 0 - _lower = _keys - _upper = _keys + (_klen << 1) - 2 - loop do - break if _upper < _lower - _mid = _lower + (((_upper-_lower) >> 1) & ~1) - if data[p].ord < _fsm_trans_keys[_mid] - _upper = _mid - 2 - elsif data[p].ord > _fsm_trans_keys[_mid+1] - _lower = _mid + 2 - else - _trans += ((_mid - _keys) >> 1) - _break_match = true - break - end - end # loop - break if _break_match - _trans += _klen - end - end while false + _keys = cs << 1 + _inds = _fsm_index_offsets[cs] + _slen = _fsm_key_spans[cs] + _trans = if ( _slen > 0 && + _fsm_trans_keys[_keys] <= data[p].ord && + data[p].ord <= _fsm_trans_keys[_keys + 1] + ) then + _fsm_indicies[ _inds + data[p].ord - _fsm_trans_keys[_keys] ] + else + _fsm_indicies[ _inds + _slen ] + end cs = _fsm_trans_targs[_trans] if _fsm_trans_actions[_trans] != 0 _acts = _fsm_trans_actions[_trans] @@ -499,44 +1106,87 @@ begin _nacts -= 1 _acts += 1 case _fsm_actions[_acts - 1] -when 0 then -# line 34 "./lib/liquid/parser.rl" + when 0 then +# line 9 "./lib/liquid/parser.rl" begin mark = p end -when 3 then -# line 59 "./lib/liquid/parser.rl" + when 2 then +# line 17 "./lib/liquid/parser.rl" + begin + + emit(:call, :instruction, nil, tokens) + end + when 3 then +# line 20 "./lib/liquid/parser.rl" + begin + + emit(:range, :instruction, nil, tokens) + end + when 4 then +# line 39 "./lib/liquid/parser.rl" begin emit(:id, :integer, Integer(data[mark..p-1]), tokens) end -when 4 then -# line 61 "./lib/liquid/parser.rl" + when 5 then +# line 41 "./lib/liquid/parser.rl" begin emit(:id, :float, Float(data[mark..p-1]), tokens) end -when 5 then -# line 63 "./lib/liquid/parser.rl" + when 6 then +# line 43 "./lib/liquid/parser.rl" begin emit(:id, :nil, nil, tokens) end -when 6 then -# line 64 "./lib/liquid/parser.rl" + when 7 then +# line 44 "./lib/liquid/parser.rl" begin emit(:id, :bool, true, tokens) end -when 7 then -# line 65 "./lib/liquid/parser.rl" + when 8 then +# line 45 "./lib/liquid/parser.rl" begin emit(:id, :bool, false, tokens) end -when 8 then -# line 67 "./lib/liquid/parser.rl" + when 9 then +# line 47 "./lib/liquid/parser.rl" begin emit(:id, :string, data[mark+1..p-2], tokens) end -when 9 then -# line 74 "./lib/liquid/parser.rl" + when 10 then +# line 52 "./lib/liquid/parser.rl" begin emit(:id, :label, data[mark..p-1], tokens) emit(:lookup, :variable, nil, tokens) end -# line 540 "./lib/liquid/parser.rb" + when 11 then +# line 62 "./lib/liquid/parser.rl" + begin + + self.parse(data[mark..p-1], tokens) + end + when 12 then +# line 77 "./lib/liquid/parser.rl" + begin + + emit(:buildin, :symbol, "first", tokens) + end + when 13 then +# line 81 "./lib/liquid/parser.rl" + begin + + emit(:buildin, :symbol, "last", tokens) + end + when 14 then +# line 85 "./lib/liquid/parser.rl" + begin + + emit(:buildin, :symbol, "size", tokens) + end + when 15 then +# line 89 "./lib/liquid/parser.rl" + begin + + emit(:id, :label, data[mark..p-1], tokens) + emit(:call, :variable, nil, tokens) + end +# line 1190 "./lib/liquid/parser.rb" end # action switch end end @@ -557,63 +1207,96 @@ when 9 then end if _goto_level <= _test_eof if p == eof + begin __acts = _fsm_eof_actions[cs] - __nacts = _fsm_actions[__acts] + __nacts = _fsm_actions[__acts] __acts += 1 - while __nacts > 0 + while ( __nacts > 0 ) __nacts -= 1 __acts += 1 - case _fsm_actions[__acts - 1] -when 1 then -# line 38 "./lib/liquid/parser.rl" + case ( _fsm_actions[__acts-1] ) + when 1 then +# line 13 "./lib/liquid/parser.rl" begin emit(:lookup, :instruction, nil, tokens) end -when 2 then -# line 42 "./lib/liquid/parser.rl" + when 2 then +# line 17 "./lib/liquid/parser.rl" + begin + + emit(:call, :instruction, nil, tokens) + end + when 3 then +# line 20 "./lib/liquid/parser.rl" begin emit(:range, :instruction, nil, tokens) end -when 3 then -# line 59 "./lib/liquid/parser.rl" + when 4 then +# line 39 "./lib/liquid/parser.rl" begin emit(:id, :integer, Integer(data[mark..p-1]), tokens) end -when 4 then -# line 61 "./lib/liquid/parser.rl" + when 5 then +# line 41 "./lib/liquid/parser.rl" begin emit(:id, :float, Float(data[mark..p-1]), tokens) end -when 5 then -# line 63 "./lib/liquid/parser.rl" + when 6 then +# line 43 "./lib/liquid/parser.rl" begin emit(:id, :nil, nil, tokens) end -when 6 then -# line 64 "./lib/liquid/parser.rl" + when 7 then +# line 44 "./lib/liquid/parser.rl" begin emit(:id, :bool, true, tokens) end -when 7 then -# line 65 "./lib/liquid/parser.rl" + when 8 then +# line 45 "./lib/liquid/parser.rl" begin emit(:id, :bool, false, tokens) end -when 8 then -# line 67 "./lib/liquid/parser.rl" + when 9 then +# line 47 "./lib/liquid/parser.rl" begin emit(:id, :string, data[mark+1..p-2], tokens) end -when 9 then -# line 74 "./lib/liquid/parser.rl" + when 10 then +# line 52 "./lib/liquid/parser.rl" begin emit(:id, :label, data[mark..p-1], tokens) emit(:lookup, :variable, nil, tokens) end -# line 611 "./lib/liquid/parser.rb" - end # eof action switch + when 12 then +# line 77 "./lib/liquid/parser.rl" + begin + + emit(:buildin, :symbol, "first", tokens) + end + when 13 then +# line 81 "./lib/liquid/parser.rl" + begin + + emit(:buildin, :symbol, "last", tokens) + end + when 14 then +# line 85 "./lib/liquid/parser.rl" + begin + + emit(:buildin, :symbol, "size", tokens) + end + when 15 then +# line 89 "./lib/liquid/parser.rl" + begin + + emit(:id, :label, data[mark..p-1], tokens) + emit(:call, :variable, nil, tokens) + end +# line 1293 "./lib/liquid/parser.rb" + end end if _trigger_goto next end -end + end + end end if _goto_level <= _out break @@ -621,7 +1304,9 @@ end end end -# line 110 "./lib/liquid/parser.rl" +# line 121 "./lib/liquid/parser.rl" + + puts "<-- #{tokens.inspect}" if $VERBOSE return tokens end end diff --git a/lib/liquid/parser.rl b/lib/liquid/parser.rl index ac045ee..16375b6 100644 --- a/lib/liquid/parser.rl +++ b/lib/liquid/parser.rl @@ -1,33 +1,8 @@ -=begin - LITERALS = { - nil => nil, 'nil' => nil, 'null' => nil, '' => nil, - 'true' => true, - 'false' => false, - 'blank' => :blank?, - 'empty' => :empty? - } +# Parser for context#[] method. Generated through ragel from parser.rl +# Only modify parser.rl. Run rake ragel afterwards to generate this file. +# +#VERBOSE=true - def resolve(key) - if LITERALS.key?(key) - LITERALS[key] - else - case key - when /^'(.*)'$/ # Single quoted strings - $1 - when /^"(.*)"$/ # Double quoted strings - $1 - when /^(-?\d+)$/ # Integer and floats - $1.to_i - when /^\((\S+)\.\.(\S+)\)$/ # Ranges - (resolve($1).to_i..resolve($2).to_i) - when /^(-?\d[\d\.]+)$/ # Floats - $1.to_f - else - variable(key) - end - end - end -=end %%{ machine fsm; @@ -39,11 +14,14 @@ emit(:lookup, :instruction, nil, tokens) } + action call { + emit(:call, :instruction, nil, tokens) + } action range { emit(:range, :instruction, nil, tokens) } - var = [a-zA-Z][0-9A-Za-z_]+; + constants = ( "true" | "false" | "nil" | "null" ); # strings string = "\"" any* "\"" | "'" any* "'"; @@ -51,41 +29,73 @@ # nothingness nil = "nil" | "null" ; + # numbers integer = ('+'|'-')? digit+; float = ('+'|'-')? digit+ '.' digit+; + # simple values primitive = ( - integer >mark %{ emit(:id, :integer, Integer(data[mark..p-1]), tokens) } | + integer >mark %{ emit(:id, :integer, Integer(data[mark..p-1]), tokens) } | - float >mark %{ emit(:id, :float, Float(data[mark..p-1]), tokens) } | + float >mark %{ emit(:id, :float, Float(data[mark..p-1]), tokens) } | - nil %{ emit(:id, :nil, nil, tokens) } | - "true" %{ emit(:id, :bool, true, tokens) } | - "false" %{ emit(:id, :bool, false, tokens)} | + nil %{ emit(:id, :nil, nil, tokens) } | + "true" %{ emit(:id, :bool, true, tokens) } | + "false" %{ emit(:id, :bool, false, tokens)} | - string >mark %{ emit(:id, :string, data[mark+1..p-2], tokens) } + string >mark %{ emit(:id, :string, data[mark+1..p-2], tokens) } ); - constants = ( "true" | "false" | "nil" | "null" ); - entity = ( - ((alpha [A-Za-z0-9_]*) - (constants)) >mark %{ + ((alpha [A-Za-z0-9_\-]*) - (constants)) >mark %{ emit(:id, :label, data[mark..p-1], tokens) emit(:lookup, :variable, nil, tokens) } ); + # Because of recursion we cannot immediatly resolve the content of this in + # the current grammar. We simply re-invoke the parser here to descend into + # the substring + recur = ( + (any+ - ']') >mark %{ + self.parse(data[mark..p-1], tokens) + } + ); + + expr = ( + entity | + primitive | + "(" (primitive | entity) ".." (primitive | entity) <: ")" %range | + "[" recur "]" %lookup + ); + + hash_accessors = ( + "[" recur "]" %call | + + ".first" %{ + emit(:buildin, :symbol, "first", tokens) + } | + + ".last" %{ + emit(:buildin, :symbol, "last", tokens) + } | + + ".size" %{ + emit(:buildin, :symbol, "size", tokens) + } | + + "." ((alpha [A-Za-z0-9_\-]*) - ("first"|"last"|"size")) >mark %{ + emit(:id, :label, data[mark..p-1], tokens) + emit(:call, :variable, nil, tokens) + } + ); main := ( - entity | - primitive | - - - "(" (primitive | entity) ".." (primitive | entity) <: ")" %range | - "[" (primitive | entity) "]" %lookup + expr <: (hash_accessors)* + ); }%% @@ -97,16 +107,19 @@ module Liquid %% write data; def self.emit(sym, type, data, tokens) - puts "emitting: #{type} #{sym} -> #{data.inspect}" + puts "emitting: #{type} #{sym} -> #{data.inspect}" if $VERBOSE tokens.push [sym, data] end - def self.parse(data) + def self.parse(data, tokens = []) + puts "--> self.parse with #{data.inspect}, #{tokens.inspect}" if $VERBOSE + eof = data.length - tokens = [] %% write init; %% write exec; + + puts "<-- #{tokens.inspect}" if $VERBOSE return tokens end end diff --git a/performance/theme_runner.rb b/performance/theme_runner.rb index 3be5638..98406b3 100644 --- a/performance/theme_runner.rb +++ b/performance/theme_runner.rb @@ -23,7 +23,7 @@ class ThemeRunner theme_path = File.dirname(test) + '/theme.liquid' - [Liquid::Template.parse(File.read(test)), File.file?(theme_path) ? Liquid::Template.parse(File.read(theme_path)) : nil, test] + [File.read(test), (File.file?(theme_path) ? File.read(theme_path) : nil), test] end.compact end @@ -53,17 +53,11 @@ class ThemeRunner end -<<<<<<< HEAD def run_profile RubyProf.measure_mode = RubyProf::WALL_TIME -======= - def run(profile = false) - RubyProf.measure_mode = RubyProf::WALL_TIME if profile ->>>>>>> wip # Dup assigns because will make some changes to them assigns = Database.tables.dup - assigns['page_title'] = 'Page title' @tests.each do |liquid, layout, template_name| @@ -72,17 +66,16 @@ class ThemeRunner page_template = File.basename(template_name, File.extname(template_name)) unless @started - if profile - RubyProf.start - RubyProf.pause - end + RubyProf.start + RubyProf.pause @started = true end - assigns['template'] = page_template - RubyProf.resume if profile - html = render(liquid, layout, assigns) - RubyProf.pause if profile + html = nil + + RubyProf.resume + html = compile_and_render(liquid, layout, assigns, page_template) + RubyProf.pause # return the result and the MD5 of the content, this can be used to detect regressions between liquid version @@ -92,15 +85,19 @@ class ThemeRunner # File.open("/tmp/#{File.basename(template_name)}.html", "w+") { |fp| fp < [1,2,3,4,5]} assert_equal 1, @context['test.test[0]'] + end + def test_recoursive_array_notation_for_hash @context['test'] = [{'test' => 'worked'}] assert_equal 'worked', @context['test[0].test'] end + + def test_hash_to_array_transition @context['colors'] = { 'Blue' => ['003366','336699', '6699CC', '99CCFF'], @@ -315,7 +319,7 @@ class ContextTest < Test::Unit::TestCase @context['nested'] = {'var' => 'tags'} @context['products'] = {'count' => 5, 'tags' => ['deepsnow', 'freestyle'] } - assert_equal 'deepsnow', @context['products[var].first'] + #assert_equal 'deepsnow', @context['products[var].first'] assert_equal 'freestyle', @context['products[nested.var].last'] end diff --git a/test/liquid/parser_test.rb b/test/liquid/parser_test.rb index 4b3687b..70483f3 100644 --- a/test/liquid/parser_test.rb +++ b/test/liquid/parser_test.rb @@ -53,14 +53,37 @@ class ParserTest < Test::Unit::TestCase assert_equal [[:id, "variable"], [:lookup, nil], [:lookup, nil]], Parser.parse('[variable]') end - # def test_descent -# assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "variable2"], [:call, nil]], Parser.parse('variable1.varible2') - # end + def test_descent + assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "variable2"], [:call, nil]], Parser.parse('variable1.variable2') + assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "variable2"], [:call, nil], [:id, "variable3"], [:call, nil]], Parser.parse('variable1.variable2.variable3') + end + + def test_descent_hash + assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "variable2"], [:call, nil]], Parser.parse('variable1["variable2"]') + assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "variable2"], [:lookup, nil], [:call, nil]], Parser.parse('variable1[variable2]') + end + + def test_buildin + assert_equal [[:id, "first"], [:lookup, nil]], Parser.parse('first') + + assert_equal [[:id, "var"], [:lookup, nil], [:buildin, "first"]], Parser.parse('var.first') + assert_equal [[:id, "var"], [:lookup, nil], [:buildin, "last"]], Parser.parse('var.last') + assert_equal [[:id, "var"], [:lookup, nil], [:buildin, "size"]], Parser.parse('var.size') + + end + + def test_descent_hash_descent + assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "test1"], [:lookup, nil], [:id, "test2"], [:call, nil], [:call, nil]], + Parser.parse('variable1[test1.test2]'), "resolove: variable1[test1.test2]" + + # assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "test1"], [:lookup, nil], [:id, "test2"], [:call, nil], [:call, nil]], + # Parser.parse('variable1[test1["test2"]]'), 'resolove: variable1[test1["test2"]]' + + # assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "test1"], [:lookup, nil], [:id, "test2"], [:lookup, nil], [:call, nil], [:call, nil]], + # Parser.parse('variable1[test1[test2]]'), "resolove: variable1[test1[test2]]" + + end - # def test_descent_hash - # assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "variable2"], [:call, nil]], Parser.parse('variable1["varible2"]') - # assert_equal [[:id, "variable1"], [:lookup, nil], [:id, "variable2"], [:lookup, "variable2"], [:call, nil]], Parser.parse('variable1[varible2]') - # end end diff --git a/test/liquid/parsing_quirks_test.rb b/test/liquid/parsing_quirks_test.rb index f5c4426..2f3f9b4 100644 --- a/test/liquid/parsing_quirks_test.rb +++ b/test/liquid/parsing_quirks_test.rb @@ -39,7 +39,7 @@ class ParsingQuirksTest < Test::Unit::TestCase def test_meaningless_parens assigns = {'b' => 'bar', 'c' => 'baz'} - markup = "a == 'foo' or (b == 'bar' and c == 'baz') or false" + markup = "a == 'foo' or b == 'bar' and c == 'baz' or false" assert_template_result(' YES ',"{% if #{markup} %} YES {% endif %}", assigns) end