From 3a73f650a6ec13479a470e2dbcb218b7b061e693 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 22 Jan 2009 11:19:34 -0800 Subject: [PATCH 001/619] Fixed typing issue --- lib/racc/parserfilegenerator.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index 4c1690f6..3c349a95 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -328,6 +328,7 @@ def integer_list(name, table) end def serialize_integer_list_compressed(name, table) + # TODO: this can be made a LOT more clean with a simple split/map sep = "\n" nsep = ",\n" buf = '' @@ -351,7 +352,7 @@ def serialize_integer_list_compressed(name, table) line ' ]' @f.print(<<-End) - #{name} = arr = Array.new(#{table.size}, nil) + #{name} = arr = ::Array.new(#{table.size}, nil) idx = 0 clist.each do |str| str.split(',', -1).each do |i| From 49d93773d1255c00bfdb918751bb43436f9054d5 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 22 Jan 2009 11:21:07 -0800 Subject: [PATCH 002/619] I'm pretty sure I'm gonna have to kill Aaron, I doubt the trailing whitespace came from anyone else :P --- lib/racc/grammar.rb | 4 ++-- lib/racc/grammarfileparser.rb | 2 +- lib/racc/iset.rb | 2 +- lib/racc/logfilegenerator.rb | 2 +- lib/racc/parser.rb | 2 +- lib/racc/state.rb | 16 ++++++++-------- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 59cb78bc..cfb63abc 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -571,7 +571,7 @@ def compute_useless check_symbols_useless s end until r.size == rs and s.size == ss end - + def check_rules_useless(rules) rules.delete_if do |rule| rule.useless = false @@ -855,7 +855,7 @@ def before(len) end private - + def ptr_bug! raise "racc: fatal: pointer not exist: self: #{to_s}" end diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 3f713629..f9c679dd 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -284,7 +284,7 @@ def canonical_label(src) end label end - + def add_user_code(label, src) @result.params.send(USER_CODE_LABELS[label]).push src end diff --git a/lib/racc/iset.rb b/lib/racc/iset.rb index de638608..31aa4331 100644 --- a/lib/racc/iset.rb +++ b/lib/racc/iset.rb @@ -85,7 +85,7 @@ def clear def dup ISet.new(@set.dup) end - + end # class ISet end # module Racc diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index e5067781..b08a8daa 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -135,7 +135,7 @@ def action_out(f, state) def outact(f, t, act) case act when Shift - f.printf " %-12s shift, and go to state %d\n", + f.printf " %-12s shift, and go to state %d\n", t.to_s, act.goto_id when Reduce f.printf " %-12s reduce using rule %d (%s)\n", diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 3c2cf4b8..b0f9e7ee 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -386,7 +386,7 @@ def racc_reduce(toks, sim, tstack, vstack) toks.each {|t| out.print ' ', racc_token2str(t) } end out.puts " --> #{racc_token2str(sim)}" - + racc_print_stacks tstack, vstack @racc_debug_out.puts end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 735e622b..37dd9562 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -170,7 +170,7 @@ def core_to_state(core) @states.push dest @statecache[k] = dest - + puts "core_to_state: create state ID #{dest.ident}" if @d_state else if @d_state @@ -308,7 +308,7 @@ def lookahead la end - + def create_tmap(size) Array.new(size, 0) # use Integer as bitmap end @@ -512,13 +512,13 @@ def resolve_sr(state, s) end end end - + ASSOC = { :Left => :Reduce, :Right => :Shift, :Nonassoc => :Error } - + def do_resolve_sr(stok, rtok) puts "resolve_sr: s/r conflict: rtok=#{rtok}, stok=#{stok}" if @d_prec @@ -775,7 +775,7 @@ def initialize(ident, sym, from, to) attr_reader :symbol attr_reader :from_state attr_reader :to_state - + def inspect "(#{@from_state.ident}-#{@symbol}->#{@to_state.ident})" end @@ -938,11 +938,11 @@ def initialize(sid, shift, reduce) @shift = shift @reduce = reduce end - + attr_reader :stateid attr_reader :shift attr_reader :reduce - + def to_s sprintf('state %d: S/R conflict rule %d reduce and shift %s', @stateid, @reduce.ruleid, @shift.to_s) @@ -961,7 +961,7 @@ def initialize(sid, high, low, tok) attr_reader :high_prec attr_reader :low_prec attr_reader :token - + def to_s sprintf('state %d: R/R conflict with rule %d and %d on %s', @stateid, @high_prec.ident, @low_prec.ident, @token.to_s) From 1ee5fe22d734857f8f442d73d3c580ad72a8460a Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 22 Jan 2009 11:33:19 -0800 Subject: [PATCH 003/619] Consolidated all version strings to Racc::VERSION. Fixed packaging --- Rakefile | 5 ++++- doc/en/NEWS.en.rdoc | 10 +++++++++- lib/racc/info.rb | 4 ++-- lib/racc/parser.rb | 6 ++++-- tasks/gem.rb | 2 +- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index 49749308..1b68563b 100644 --- a/Rakefile +++ b/Rakefile @@ -4,7 +4,7 @@ require 'rake/rdoctask' require 'rake/testtask' require 'rake/clean' -require 'lib/racc/parser' +load './lib/racc/info.rb' require 'tasks/file' require 'tasks/gem' @@ -13,3 +13,6 @@ require 'tasks/doc' require 'tasks/email' task :default => :test + +task :clean => :clobber_docs +task :clean => :clobber_package diff --git a/doc/en/NEWS.en.rdoc b/doc/en/NEWS.en.rdoc index 07a45eff..0c8a9024 100644 --- a/doc/en/NEWS.en.rdoc +++ b/doc/en/NEWS.en.rdoc @@ -1,6 +1,14 @@ = NEWS -=== 1.4.6 +=== 1.4.7 + +* Bugfixes + + * consolidated all versions to Racc::VERSION. + * Made table generator explicitly use ::Array to avoid name collisions. + * Fixed up rake tasks for packaging. + +=== 1.4.6 (2008-12-21) * Bugfixes diff --git a/lib/racc/info.rb b/lib/racc/info.rb index 96a81cf3..866e73ee 100644 --- a/lib/racc/info.rb +++ b/lib/racc/info.rb @@ -10,7 +10,7 @@ # module Racc - Version = '1.4.6' - VERSION = Version + Version = '1.4.7' + VERSION = Version Copyright = 'Copyright (c) 1999-2006 Minero Aoki' end diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index b0f9e7ee..3567439d 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -11,6 +11,8 @@ # without restriction. # +require 'racc/info' + unless defined?(NotImplementedError) NotImplementedError = NotImplementError end @@ -30,10 +32,10 @@ module Racc class Parser - Racc_Runtime_Version = '1.4.6' + Racc_Runtime_Version = ::Racc::VERSION Racc_Runtime_Revision = '$Id$' - Racc_Runtime_Core_Version_R = '1.4.6' + Racc_Runtime_Core_Version_R = ::Racc::VERSION Racc_Runtime_Core_Revision_R = '$Id$'.split[1] begin require 'racc/cparse' diff --git a/tasks/gem.rb b/tasks/gem.rb index 634db104..6ef928a2 100644 --- a/tasks/gem.rb +++ b/tasks/gem.rb @@ -5,7 +5,7 @@ s.authors << 'Aoki Minero' s.authors << 'Aaron Patterson' s.email = 'aaronp@rubyforge.org' - s.version = Racc::Parser::Racc_Runtime_Version + s.version = Racc::VERSION s.require_paths = Dir['{lib,ext}'] s.extensions = ['ext/racc/cparse/extconf.rb'] s.files = `git ls-files`.split("\n") + ['lib/racc/parser-text.rb'] From 84814d4d5b5d549857c1a35e3139ef7d83ad8536 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 7 Sep 2009 15:12:17 +0800 Subject: [PATCH 004/619] Added rcov task Signed-off-by: Aaron Patterson --- Rakefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Rakefile b/Rakefile index 1b68563b..de41e038 100644 --- a/Rakefile +++ b/Rakefile @@ -16,3 +16,16 @@ task :default => :test task :clean => :clobber_docs task :clean => :clobber_package + +begin + require 'rcov/rcovtask' + Rcov::RcovTask.new do |t| + t.test_files = FileList["test/test_*.rb"] + t.verbose = true + t.rcov_opts << "--no-color" + t.rcov_opts << "--save coverage.info" + t.rcov_opts << "-x ^/" + end +rescue LoadError +end + From f606939e82f29b8792d4aa0eea1d432e59f74a17 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 7 Sep 2009 16:05:25 +0800 Subject: [PATCH 005/619] Added enhancements to build system to allow for pure ruby testing and rcov Signed-off-by: Aaron Patterson --- Rakefile | 12 ++++++++++++ lib/racc/parser.rb | 4 ++++ lib/racc/parserfilegenerator.rb | 7 ++++++- tasks/file.rb | 12 +++++++----- tasks/test.rb | 13 +++++++++++-- 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/Rakefile b/Rakefile index de41e038..a4d88ea5 100644 --- a/Rakefile +++ b/Rakefile @@ -20,12 +20,24 @@ task :clean => :clobber_package begin require 'rcov/rcovtask' Rcov::RcovTask.new do |t| + ENV['PURERUBY'] = "1" t.test_files = FileList["test/test_*.rb"] t.verbose = true t.rcov_opts << "--no-color" t.rcov_opts << "--save coverage.info" t.rcov_opts << "-x ^/" end + task "rcov" => PTEXT + + # this is for my emacs rcov overlay stuff on emacswiki. + task :rcov_overlay do + path = ENV["FILE"] + rcov, eol = Marshal.load(File.read("coverage.info")).last[path], 1 + puts rcov[:lines].zip(rcov[:coverage]).map { |line, coverage| + bol, eol = eol, eol + line.length + [bol, eol, "#ffcccc"] unless coverage + }.compact.inspect + end rescue LoadError end diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 3567439d..a82740b7 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -38,6 +38,9 @@ class Parser Racc_Runtime_Core_Version_R = ::Racc::VERSION Racc_Runtime_Core_Revision_R = '$Id$'.split[1] begin + raise LoadError, "not loading cparse" if ENV['PURERUBY'] + warn "loading cparse" + require 'racc/cparse' # Racc_Runtime_Core_Version_C = (defined in extention) Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2] @@ -54,6 +57,7 @@ class Parser Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C Racc_Runtime_Type = 'c' rescue LoadError + warn "using pure ruby racc engine" Racc_Main_Parsing_Routine = :_racc_do_parse_rb Racc_YY_Parse_Method = :_racc_yyparse_rb Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index 3c349a95..dc7764aa 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -12,9 +12,14 @@ require 'enumerator' require 'racc/compat' require 'racc/sourcetext' -require 'racc/parser-text' require 'rbconfig' +begin + require 'racc/parser-text' +rescue LoadError + warn "warning: couldn't load racc/parser-text.rb" +end + module Racc class ParserFileGenerator diff --git a/tasks/file.rb b/tasks/file.rb index 563a6976..799a317a 100644 --- a/tasks/file.rb +++ b/tasks/file.rb @@ -1,16 +1,17 @@ -kind = Config::CONFIG['DLEXT'] +kind = Config::CONFIG['DLEXT'] +EXT = "ext/racc/cparse/cparse.#{kind}" +PTEXT = 'lib/racc/parser-text.rb' -EXT = "ext/racc/cparse/cparse.#{kind}" [ EXT, - 'lib/racc/parser-text.rb', + PTEXT, 'ext/racc/cparse/Makefile', 'ext/racc/cparse/*.o', ].each { |f| Dir[f].each { |file| CLEAN << file } } file 'lib/racc/parser.rb' -file 'lib/racc/parser-text.rb' => ['lib/racc/parser.rb'] do |t| +file PTEXT => 'lib/racc/parser.rb' do |t| File.open(t.name, 'wb') { |file| file.write(<<-eorb) module Racc @@ -34,4 +35,5 @@ module Racc end end -task :build => ['lib/racc/parser-text.rb', EXT] + +task :build => [PTEXT, EXT] diff --git a/tasks/test.rb b/tasks/test.rb index 21cb0ac0..386994e0 100644 --- a/tasks/test.rb +++ b/tasks/test.rb @@ -4,7 +4,7 @@ end end -Rake::TestTask.new do |t| +Rake::TestTask.new :prototest do |t| %w[ ext lib ].each do |dir| t.libs << dir end @@ -13,4 +13,13 @@ t.verbose = true end -Rake::Task[:test].prerequisites << :build +task :test => :build do + Rake::Task[:prototest].invoke +end + +task "test:pure" => PTEXT do + ENV['PURERUBY'] = "1" + Rake::Task[:prototest].invoke +end + + From 8fc78eda761071c2a4ea72c6e2fe70e3821c017b Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 7 Sep 2009 17:34:47 +0800 Subject: [PATCH 006/619] ugh. rcov sucks Signed-off-by: Aaron Patterson --- Rakefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index a4d88ea5..43a8307c 100644 --- a/Rakefile +++ b/Rakefile @@ -20,15 +20,19 @@ task :clean => :clobber_package begin require 'rcov/rcovtask' Rcov::RcovTask.new do |t| - ENV['PURERUBY'] = "1" t.test_files = FileList["test/test_*.rb"] t.verbose = true t.rcov_opts << "--no-color" t.rcov_opts << "--save coverage.info" t.rcov_opts << "-x ^/" end + task "rcov" => :fuck_me task "rcov" => PTEXT + task :fuck_me do + ENV['PURERUBY'] = "1" + end + # this is for my emacs rcov overlay stuff on emacswiki. task :rcov_overlay do path = ENV["FILE"] From 313c922dc27cc6e5907469f43234a8ff0605bca5 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 7 Sep 2009 17:35:13 +0800 Subject: [PATCH 007/619] Converted all args to ivars in parser.rb to make more efficient Signed-off-by: Aaron Patterson --- lib/racc/parser.rb | 132 ++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index a82740b7..ff191caa 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -25,7 +25,6 @@ class ParseError < StandardError; end end module Racc - unless defined?(Racc_No_Extentions) Racc_No_Extentions = false end @@ -56,8 +55,14 @@ class Parser Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C Racc_Runtime_Type = 'c' - rescue LoadError + + # uncomment me to figure out WHICH cparse.bundle is being loaded + # f = $".last + # p f + # p File.join($:.find { |d| File.exist? File.join(d, f) }, f) + rescue LoadError => e warn "using pure ruby racc engine" + warn e Racc_Main_Parsing_Routine = :_racc_do_parse_rb Racc_YY_Parse_Method = :_racc_yyparse_rb Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R @@ -71,7 +76,12 @@ def Parser.racc_runtime_type private - def _racc_setup + def _racc_setup # REFACTOR: this should prolly be initialize + + # FIX: __all__ of this is unnecessarily static, and should not be + # FIX: called every parse. I still think #initialize is the right way + # FIX: to go + @yydebug = false unless self.class::Racc_debug_parser @yydebug = false unless defined?(@yydebug) if @yydebug @@ -80,6 +90,13 @@ def _racc_setup end arg = self.class::Racc_arg arg[13] = true if arg.size < 14 + + # TODO: clean up + @action_table, @action_check, @action_default, @action_pointer, + @goto_table, @goto_check, @goto_default, @goto_pointer, + @nt_base, @reduce_table, @token_table, @shift_n, + @reduce_n, @use_result, * = arg + arg end @@ -102,33 +119,29 @@ def _racc_init_sysvars ### def do_parse - __send__(Racc_Main_Parsing_Routine, _racc_setup(), false) + _racc_setup + __send__ Racc_Main_Parsing_Routine end def next_token raise NotImplementedError, "#{self.class}\#next_token is not defined" end - def _racc_do_parse_rb(arg, in_debug) - action_table, action_check, action_default, action_pointer, - goto_table, goto_check, goto_default, goto_pointer, - nt_base, reduce_table, token_table, shift_n, - reduce_n, use_result, * = arg - + def _racc_do_parse_rb _racc_init_sysvars tok = act = i = nil nerr = 0 catch(:racc_end_parse) { while true - if i = action_pointer[@racc_state[-1]] + if i = @action_pointer[@racc_state[-1]] if @racc_read_next if @racc_t != 0 # not EOF tok, @racc_val = next_token() unless tok # EOF @racc_t = 0 else - @racc_t = (token_table[tok] or 1) # error token + @racc_t = (@token_table[tok] or 1) # error token end racc_read_token(@racc_t, tok, @racc_val) if @yydebug @racc_read_next = false @@ -136,14 +149,14 @@ def _racc_do_parse_rb(arg, in_debug) end i += @racc_t unless i >= 0 and - act = action_table[i] and - action_check[i] == @racc_state[-1] - act = action_default[@racc_state[-1]] + act = @action_table[i] and + @action_check[i] == @racc_state[-1] + act = @action_default[@racc_state[-1]] end else - act = action_default[@racc_state[-1]] + act = @action_default[@racc_state[-1]] end - while act = _racc_evalact(act, arg) + while act = _racc_evalact(act) ; end end @@ -155,21 +168,17 @@ def _racc_do_parse_rb(arg, in_debug) ### def yyparse(recv, mid) - __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true) + _racc_setup + __send__ Racc_YY_Parse_Method, recv, mid end - def _racc_yyparse_rb(recv, mid, arg, c_debug) - action_table, action_check, action_default, action_pointer, - goto_table, goto_check, goto_default, goto_pointer, - nt_base, reduce_table, token_table, shift_n, - reduce_n, use_result, * = arg - + def _racc_yyparse_rb recv, mid _racc_init_sysvars nerr = 0 catch(:racc_end_parse) { - until i = action_pointer[@racc_state[-1]] - while act = _racc_evalact(action_default[@racc_state[-1]], arg) + until i = @action_pointer[@racc_state[-1]] + while act = _racc_evalact(@action_default[@racc_state[-1]]) ; end end @@ -177,31 +186,31 @@ def _racc_yyparse_rb(recv, mid, arg, c_debug) unless tok @racc_t = 0 else - @racc_t = (token_table[tok] or 1) # error token + @racc_t = (@token_table[tok] or 1) # error token end @racc_val = val @racc_read_next = false i += @racc_t unless i >= 0 and - act = action_table[i] and - action_check[i] == @racc_state[-1] - act = action_default[@racc_state[-1]] + act = @action_table[i] and + @action_check[i] == @racc_state[-1] + act = @action_default[@racc_state[-1]] end - while act = _racc_evalact(act, arg) + while act = _racc_evalact(act) ; end - while !(i = action_pointer[@racc_state[-1]]) || + while !(i = @action_pointer[@racc_state[-1]]) || ! @racc_read_next || @racc_t == 0 # $ unless i and i += @racc_t and i >= 0 and - act = action_table[i] and - action_check[i] == @racc_state[-1] - act = action_default[@racc_state[-1]] + act = @action_table[i] and + @action_check[i] == @racc_state[-1] + act = @action_default[@racc_state[-1]] end - while act = _racc_evalact(act, arg) + while act = _racc_evalact(act) ; end end @@ -213,14 +222,10 @@ def _racc_yyparse_rb(recv, mid, arg, c_debug) ### common ### - def _racc_evalact(act, arg) - action_table, action_check, action_default, action_pointer, - goto_table, goto_check, goto_default, goto_pointer, - nt_base, reduce_table, token_table, shift_n, - reduce_n, use_result, * = arg + def _racc_evalact(act) nerr = 0 # tmp - if act > 0 and act < shift_n + if act > 0 and act < @shift_n # # shift # @@ -235,40 +240,40 @@ def _racc_evalact(act, arg) racc_shift @racc_t, @racc_tstack, @racc_vstack end - elsif act < 0 and act > -reduce_n + elsif act < 0 and act > -@reduce_n # # reduce # code = catch(:racc_jump) { - @racc_state.push _racc_do_reduce(arg, act) + @racc_state.push _racc_do_reduce(act) false } if code case code when 1 # yyerror @racc_user_yyerror = true # user_yyerror - return -reduce_n + return -@reduce_n when 2 # yyaccept - return shift_n + return @shift_n else raise '[Racc Bug] unknown jump code' end end - elsif act == shift_n + elsif act == @shift_n # # accept # racc_accept if @yydebug throw :racc_end_parse, @racc_vstack[0] - elsif act == -reduce_n + elsif act == -@reduce_n # # error # case @racc_error_status when 0 - unless arg[21] # user_yyerror + unless @racc_user_yerror # HACK: arg[21] # user_yyerror nerr += 1 on_error @racc_t, @racc_val, @racc_vstack end @@ -281,11 +286,11 @@ def _racc_evalact(act, arg) @racc_user_yyerror = false @racc_error_status = 3 while true - if i = action_pointer[@racc_state[-1]] + if i = @action_pointer[@racc_state[-1]] i += 1 # error token if i >= 0 and - (act = action_table[i]) and - action_check[i] == @racc_state[-1] + (act = @action_table[i]) and + @action_check[i] == @racc_state[-1] break end end @@ -308,19 +313,15 @@ def _racc_evalact(act, arg) nil end - def _racc_do_reduce(arg, act) - action_table, action_check, action_default, action_pointer, - goto_table, goto_check, goto_default, goto_pointer, - nt_base, reduce_table, token_table, shift_n, - reduce_n, use_result, * = arg + def _racc_do_reduce(act) state = @racc_state vstack = @racc_vstack tstack = @racc_tstack i = act * -3 - len = reduce_table[i] - reduce_to = reduce_table[i+1] - method_id = reduce_table[i+2] + len = @reduce_table[i] + reduce_to = @reduce_table[i+1] + method_id = @reduce_table[i+2] void_array = [] tmp_t = tstack[-len, len] if @yydebug @@ -330,7 +331,7 @@ def _racc_do_reduce(arg, act) state[-len, len] = void_array # tstack must be updated AFTER method call - if use_result + if @use_result vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0]) else vstack.push __send__(method_id, tmp_v, vstack) @@ -339,14 +340,14 @@ def _racc_do_reduce(arg, act) racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug - k1 = reduce_to - nt_base - if i = goto_pointer[k1] + k1 = reduce_to - @nt_base + if i = @goto_pointer[k1] i += state[-1] - if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1 + if i >= 0 and (curstate = @goto_table[i]) and @goto_check[i] == k1 return curstate end end - goto_default[k1] + @goto_default[k1] end def on_error(t, val, vstack) @@ -441,5 +442,4 @@ def token_to_str(t) end end - end From 834430269e810184873b75f5c5db9dcd355bc84e Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 7 Sep 2009 17:35:51 +0800 Subject: [PATCH 008/619] Fixed build to use the same arch flags as host ruby Signed-off-by: Aaron Patterson --- ext/racc/cparse/extconf.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/racc/cparse/extconf.rb b/ext/racc/cparse/extconf.rb index 24b2ba17..d8dc2b20 100644 --- a/ext/racc/cparse/extconf.rb +++ b/ext/racc/cparse/extconf.rb @@ -1,6 +1,8 @@ # $Id$ -ENV["ARCHFLAGS"] = "-arch #{`uname -p` =~ /powerpc/ ? 'ppc' : 'i386'}" +require 'rbconfig' + +ENV["ARCHFLAGS"] = Config::CONFIG["CFLAGS"].scan(/-arch \S+/).join(" ") require 'mkmf' From c40d89446b14ebaf8386ba2ad0231f9afd211aa0 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 7 Sep 2009 17:36:21 +0800 Subject: [PATCH 009/619] Moved to ivars for cext as well Signed-off-by: Aaron Patterson --- ext/racc/cparse/cparse.c | 126 ++++++++++++++++++++++++--------------- 1 file changed, 77 insertions(+), 49 deletions(-) diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse/cparse.c index 31e3d764..9a62c4eb 100644 --- a/ext/racc/cparse/cparse.c +++ b/ext/racc/cparse/cparse.c @@ -47,6 +47,21 @@ static ID id_d_read_token; static ID id_d_next_state; static ID id_d_e_pop; +static ID id_action_table; +static ID id_action_check; +static ID id_action_default; +static ID id_action_pointer; +static ID id_goto_table; +static ID id_goto_check; +static ID id_goto_default; +static ID id_goto_pointer; +static ID id_nt_base; +static ID id_reduce_table; +static ID id_token_table; +static ID id_shift_n; +static ID id_reduce_n; +static ID id_use_result; + /* ----------------------------------------------------------------------- Utils ----------------------------------------------------------------------- */ @@ -180,9 +195,8 @@ struct cparse_params { Parser Main Routines ----------------------------------------------------------------------- */ -static VALUE racc_cparse _((VALUE parser, VALUE arg, VALUE sysdebug)); -static VALUE racc_yyparse _((VALUE parser, VALUE lexer, VALUE lexmid, - VALUE arg, VALUE sysdebug)); +static VALUE racc_cparse _((VALUE parser)); +static VALUE racc_yyparse _((VALUE parser, VALUE lexer, VALUE lexmid)); static void call_lexer _((struct cparse_params *v)); static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self)); @@ -190,7 +204,7 @@ static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self)); static VALUE assert_array _((VALUE a)); static long assert_integer _((VALUE n)); static VALUE assert_hash _((VALUE h)); -static VALUE initialize_params _((VALUE vparams, VALUE parser, VALUE arg, +static VALUE initialize_params _((VALUE vparams, VALUE parser, VALUE lexer, VALUE lexmid)); static void cparse_params_mark _((void *ptr)); @@ -211,7 +225,7 @@ static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self)); #endif static VALUE -racc_cparse(VALUE parser, VALUE arg, VALUE sysdebug) +racc_cparse(VALUE parser) { volatile VALUE vparams; struct cparse_params *v; @@ -219,8 +233,8 @@ racc_cparse(VALUE parser, VALUE arg, VALUE sysdebug) vparams = Data_Make_Struct(CparseParams, struct cparse_params, cparse_params_mark, -1, v); D_puts("starting cparse"); - v->sys_debug = RTEST(sysdebug); - vparams = initialize_params(vparams, parser, arg, Qnil, Qnil); + v->sys_debug = Qtrue; + vparams = initialize_params(vparams, parser, Qnil, Qnil); v->lex_is_iterator = Qfalse; parse_main(v, Qnil, Qnil, 0); @@ -228,16 +242,16 @@ racc_cparse(VALUE parser, VALUE arg, VALUE sysdebug) } static VALUE -racc_yyparse(VALUE parser, VALUE lexer, VALUE lexmid, VALUE arg, VALUE sysdebug) +racc_yyparse(VALUE parser, VALUE lexer, VALUE lexmid) { volatile VALUE vparams; struct cparse_params *v; vparams = Data_Make_Struct(CparseParams, struct cparse_params, cparse_params_mark, -1, v); - v->sys_debug = RTEST(sysdebug); + v->sys_debug = Qfalse; D_puts("start C yyparse"); - vparams = initialize_params(vparams, parser, arg, lexer, lexmid); + vparams = initialize_params(vparams, parser, lexer, lexmid); v->lex_is_iterator = Qtrue; D_puts("params initialized"); parse_main(v, Qnil, Qnil, 0); @@ -311,7 +325,7 @@ assert_integer(VALUE n) } static VALUE -initialize_params(VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lexmid) +initialize_params(VALUE vparams, VALUE parser, VALUE lexer, VALUE lexmid) { struct cparse_params *v; @@ -322,47 +336,46 @@ initialize_params(VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lex if (! NIL_P(lexmid)) v->lexmid = value_to_id(lexmid); - v->debug = RTEST(rb_ivar_get(parser, id_yydebug)); - - Check_Type(arg, T_ARRAY); - if (!(13 <= RARRAY_LEN(arg) && RARRAY_LEN(arg) <= 14)) - rb_raise(RaccBug, "[Racc Bug] wrong arg.size %ld", RARRAY_LEN(arg)); - v->action_table = assert_array (RARRAY_PTR(arg)[ 0]); - v->action_check = assert_array (RARRAY_PTR(arg)[ 1]); - v->action_default = assert_array (RARRAY_PTR(arg)[ 2]); - v->action_pointer = assert_array (RARRAY_PTR(arg)[ 3]); - v->goto_table = assert_array (RARRAY_PTR(arg)[ 4]); - v->goto_check = assert_array (RARRAY_PTR(arg)[ 5]); - v->goto_default = assert_array (RARRAY_PTR(arg)[ 6]); - v->goto_pointer = assert_array (RARRAY_PTR(arg)[ 7]); - v->nt_base = assert_integer(RARRAY_PTR(arg)[ 8]); - v->reduce_table = assert_array (RARRAY_PTR(arg)[ 9]); - v->token_table = assert_hash (RARRAY_PTR(arg)[10]); - v->shift_n = assert_integer(RARRAY_PTR(arg)[11]); - v->reduce_n = assert_integer(RARRAY_PTR(arg)[12]); - if (RARRAY_LEN(arg) > 13) { - v->use_result_var = RTEST(RARRAY_PTR(arg)[13]); - } - else { - v->use_result_var = Qtrue; - } + v->debug = RTEST(rb_ivar_get(parser, id_yydebug)); + v->action_table = rb_ivar_get(parser, id_action_table); + v->action_check = rb_ivar_get(parser, id_action_check); + v->action_default = rb_ivar_get(parser, id_action_default); + v->action_pointer = rb_ivar_get(parser, id_action_pointer); + v->goto_table = rb_ivar_get(parser, id_goto_table); + v->goto_check = rb_ivar_get(parser, id_goto_check); + v->goto_default = rb_ivar_get(parser, id_goto_default); + v->goto_pointer = rb_ivar_get(parser, id_goto_pointer); + v->nt_base = NUM2LONG(rb_ivar_get(parser, id_nt_base)); + v->reduce_table = rb_ivar_get(parser, id_reduce_table); + v->token_table = rb_ivar_get(parser, id_token_table); + v->shift_n = NUM2LONG(rb_ivar_get(parser, id_shift_n)); + v->reduce_n = NUM2LONG(rb_ivar_get(parser, id_reduce_n)); + v->tstack = v->debug ? NEW_STACK() : Qnil; + v->vstack = NEW_STACK(); + v->state = NEW_STACK(); + v->curstate = 0; + v->t = INT2FIX(FINAL_TOKEN + 1); // must not init to FINAL_TOKEN + v->nerr = 0; + v->errstatus = 0; + v->retval = Qnil; + v->fin = 0; + v->lex_is_iterator = Qfalse; - v->tstack = v->debug ? NEW_STACK() : Qnil; - v->vstack = NEW_STACK(); - v->state = NEW_STACK(); - v->curstate = 0; - PUSH(v->state, INT2FIX(0)); - v->t = INT2FIX(FINAL_TOKEN + 1); /* must not init to FINAL_TOKEN */ - v->nerr = 0; - v->errstatus = 0; - rb_ivar_set(parser, id_errstatus, LONG2NUM(v->errstatus)); + v->use_result_var = rb_ivar_get(parser, id_use_result); - v->retval = Qnil; - v->fin = 0; + /* if (RARRAY_LEN(arg) > 13) { */ + /* v->use_result_var = RTEST(RARRAY_PTR(arg)[13]); */ + /* } */ + /* else { */ + /* v->use_result_var = Qtrue; */ + /* } */ - v->lex_is_iterator = Qfalse; + PUSH(v->state, INT2FIX(0)); + + rb_ivar_set(parser, id_errstatus, LONG2NUM(v->errstatus)); rb_iv_set(parser, "@vstack", v->vstack); + if (v->debug) { rb_iv_set(parser, "@tstack", v->tstack); } @@ -798,8 +811,8 @@ Init_cparse(void) Racc = rb_define_module("Racc"); Parser = rb_define_class_under(Racc, "Parser", rb_cObject); } - rb_define_private_method(Parser, "_racc_do_parse_c", racc_cparse, 2); - rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 4); + rb_define_private_method(Parser, "_racc_do_parse_c", racc_cparse, 0); + rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 2); rb_define_const(Parser, "Racc_Runtime_Core_Version_C", rb_str_new2(RACC_VERSION)); rb_define_const(Parser, "Racc_Runtime_Core_Id_C", @@ -821,4 +834,19 @@ Init_cparse(void) id_d_read_token = rb_intern("racc_read_token"); id_d_next_state = rb_intern("racc_next_state"); id_d_e_pop = rb_intern("racc_e_pop"); + + id_action_table = rb_intern("@action_table"); + id_action_check = rb_intern("@action_check"); + id_action_default = rb_intern("@action_default"); + id_action_pointer = rb_intern("@action_pointer"); + id_goto_table = rb_intern("@goto_table"); + id_goto_check = rb_intern("@goto_check"); + id_goto_default = rb_intern("@goto_default"); + id_goto_pointer = rb_intern("@goto_pointer"); + id_nt_base = rb_intern("@nt_base"); + id_reduce_table = rb_intern("@reduce_table"); + id_token_table = rb_intern("@token_table"); + id_shift_n = rb_intern("@shift_n"); + id_reduce_n = rb_intern("@reduce_n"); + id_use_result = rb_intern("@use_result"); } From bd5651416fee071e991acf917965ec7f55560de7 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Wed, 16 Sep 2009 06:11:16 +0800 Subject: [PATCH 010/619] YAY for simpler Signed-off-by: Aaron Patterson --- ext/racc/cparse/extconf.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ext/racc/cparse/extconf.rb b/ext/racc/cparse/extconf.rb index d8dc2b20..8e097093 100644 --- a/ext/racc/cparse/extconf.rb +++ b/ext/racc/cparse/extconf.rb @@ -1,9 +1,3 @@ -# $Id$ - -require 'rbconfig' - -ENV["ARCHFLAGS"] = Config::CONFIG["CFLAGS"].scan(/-arch \S+/).join(" ") - require 'mkmf' create_makefile 'racc/cparse/cparse' From 023d39b06b1be056bc9e34e9339a0cf0fcedbf83 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Wed, 16 Sep 2009 18:01:22 -0700 Subject: [PATCH 011/619] Moved ext/racc/cparse/* to ext/racc/* --- ext/racc/{cparse => }/MANIFEST | 0 ext/racc/{cparse => }/cparse.c | 0 ext/racc/{cparse => }/depend | 0 ext/racc/{cparse => }/extconf.rb | 0 tasks/file.rb | 14 +++++++------- tasks/gem.rb | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename ext/racc/{cparse => }/MANIFEST (100%) rename ext/racc/{cparse => }/cparse.c (100%) rename ext/racc/{cparse => }/depend (100%) rename ext/racc/{cparse => }/extconf.rb (100%) diff --git a/ext/racc/cparse/MANIFEST b/ext/racc/MANIFEST similarity index 100% rename from ext/racc/cparse/MANIFEST rename to ext/racc/MANIFEST diff --git a/ext/racc/cparse/cparse.c b/ext/racc/cparse.c similarity index 100% rename from ext/racc/cparse/cparse.c rename to ext/racc/cparse.c diff --git a/ext/racc/cparse/depend b/ext/racc/depend similarity index 100% rename from ext/racc/cparse/depend rename to ext/racc/depend diff --git a/ext/racc/cparse/extconf.rb b/ext/racc/extconf.rb similarity index 100% rename from ext/racc/cparse/extconf.rb rename to ext/racc/extconf.rb diff --git a/tasks/file.rb b/tasks/file.rb index 799a317a..60fc44b2 100644 --- a/tasks/file.rb +++ b/tasks/file.rb @@ -1,12 +1,12 @@ kind = Config::CONFIG['DLEXT'] -EXT = "ext/racc/cparse/cparse.#{kind}" +EXT = "ext/racc/cparse.#{kind}" PTEXT = 'lib/racc/parser-text.rb' [ EXT, PTEXT, - 'ext/racc/cparse/Makefile', - 'ext/racc/cparse/*.o', + 'ext/racc/Makefile', + 'ext/racc/*.o', ].each { |f| Dir[f].each { |file| CLEAN << file } } file 'lib/racc/parser.rb' @@ -23,14 +23,14 @@ module Racc } end -task 'ext/racc/cparse/Makefile' do - Dir.chdir('ext/racc/cparse') do +task 'ext/racc/Makefile' do + Dir.chdir('ext/racc') do ruby "extconf.rb" end end -task EXT => 'ext/racc/cparse/Makefile' do - Dir.chdir('ext/racc/cparse') do +task EXT => 'ext/racc/Makefile' do + Dir.chdir('ext/racc') do sh 'make' end end diff --git a/tasks/gem.rb b/tasks/gem.rb index 6ef928a2..166f35a8 100644 --- a/tasks/gem.rb +++ b/tasks/gem.rb @@ -7,7 +7,7 @@ s.email = 'aaronp@rubyforge.org' s.version = Racc::VERSION s.require_paths = Dir['{lib,ext}'] - s.extensions = ['ext/racc/cparse/extconf.rb'] + s.extensions = ['ext/racc/extconf.rb'] s.files = `git ls-files`.split("\n") + ['lib/racc/parser-text.rb'] s.homepage = 'http://racc.rubyforge.org/' s.rdoc_options = ['--main', 'README.en.rdoc'] From e4a86af2d5941b6da6ce8830464688b647aa0f26 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 10 Jan 2011 17:00:06 -0800 Subject: [PATCH 012/619] Wrote an initializer --- ext/racc/cparse.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index 9a62c4eb..ab4edbf5 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -204,6 +204,7 @@ static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self)); static VALUE assert_array _((VALUE a)); static long assert_integer _((VALUE n)); static VALUE assert_hash _((VALUE h)); +static VALUE initialize _((VALUE self)); static VALUE initialize_params _((VALUE vparams, VALUE parser, VALUE lexer, VALUE lexmid)); static void cparse_params_mark _((void *ptr)); @@ -227,15 +228,10 @@ static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self)); static VALUE racc_cparse(VALUE parser) { - volatile VALUE vparams; + volatile VALUE vparams = rb_iv_get(parser, "@vparams"); struct cparse_params *v; + Data_Get_Struct(vparams, struct cparse_params, v); - vparams = Data_Make_Struct(CparseParams, struct cparse_params, - cparse_params_mark, -1, v); - D_puts("starting cparse"); - v->sys_debug = Qtrue; - vparams = initialize_params(vparams, parser, Qnil, Qnil); - v->lex_is_iterator = Qfalse; parse_main(v, Qnil, Qnil, 0); return v->retval; @@ -324,6 +320,21 @@ assert_integer(VALUE n) return NUM2LONG(n); } +static VALUE +initialize(VALUE self) { + volatile VALUE vparams; + struct cparse_params *v; + + vparams = Data_Make_Struct(CparseParams, struct cparse_params, + cparse_params_mark, -1, v); + rb_iv_set(self, "@vparams", vparams); + + D_puts("starting cparse"); + v->sys_debug = Qtrue; + vparams = initialize_params(vparams, self, Qnil, Qnil); + v->lex_is_iterator = Qfalse; +} + static VALUE initialize_params(VALUE vparams, VALUE parser, VALUE lexer, VALUE lexmid) { @@ -811,6 +822,9 @@ Init_cparse(void) Racc = rb_define_module("Racc"); Parser = rb_define_class_under(Racc, "Parser", rb_cObject); } + + rb_define_method(Parser, "initialize", (VALUE(*)(ANYARGS))initialize, 0); + rb_define_private_method(Parser, "_racc_do_parse_c", racc_cparse, 0); rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 2); rb_define_const(Parser, "Racc_Runtime_Core_Version_C", From 513773919c5d531e88287cc3f08f8abb11deabcc Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 10 Jan 2011 17:31:38 -0800 Subject: [PATCH 013/619] Added test_pure task --- Rakefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Rakefile b/Rakefile index 43a8307c..d6ac5dae 100644 --- a/Rakefile +++ b/Rakefile @@ -14,6 +14,11 @@ require 'tasks/email' task :default => :test +task :test_pure do + ENV["PURERUBY"] = "1" + Rake.application[:test].invoke +end + task :clean => :clobber_docs task :clean => :clobber_package From ea143708e8d3563bc5f4aa532fcbe60a717948fc Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 10 Jan 2011 17:46:59 -0800 Subject: [PATCH 014/619] Seriously. stop with all the clever. The ruby parser is fast enough --- lib/racc/parserfilegenerator.rb | 53 ++------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index dc7764aa..aac7e373 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -325,57 +325,8 @@ def state_transition_table end def integer_list(name, table) - if table.size > 2000 - serialize_integer_list_compressed name, table - else - serialize_integer_list_std name, table - end - end - - def serialize_integer_list_compressed(name, table) - # TODO: this can be made a LOT more clean with a simple split/map - sep = "\n" - nsep = ",\n" - buf = '' - com = '' - ncom = ',' - co = com - @f.print 'clist = [' - table.each do |i| - buf << co << i.to_s; co = ncom - if buf.size > 66 - @f.print sep; sep = nsep - @f.print "'", buf, "'" - buf = '' - co = com - end - end - unless buf.empty? - @f.print sep - @f.print "'", buf, "'" - end - line ' ]' - - @f.print(<<-End) - #{name} = arr = ::Array.new(#{table.size}, nil) - idx = 0 - clist.each do |str| - str.split(',', -1).each do |i| - arr[idx] = i.to_i unless i.empty? - idx += 1 - end - end - End - end - - def serialize_integer_list_std(name, table) - sep = '' - line "#{name} = [" - table.each_slice(10) do |ns| - @f.print sep; sep = ",\n" - @f.print ns.map {|n| sprintf('%6s', n ? n.to_s : 'nil') }.join(',') - end - line ' ]' + lines = table.inspect.split(/((?:\w+, ){15})/).reject { |s| s.empty? } + line "#{name} = #{lines.join("\n")}" end def i_i_sym_list(name, table) From 966b809340375cbfb65656e8f6cca9b0b92d40e7 Mon Sep 17 00:00:00 2001 From: Sylvester Keil Date: Wed, 9 Nov 2011 09:46:12 +0100 Subject: [PATCH 015/619] Config is deprectaed in Ruby 1.9.3 and 1.8.8 Use RbConfig to suppress deprecation warnings when generating a parser. --- lib/racc/parserfilegenerator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index aac7e373..9bda0783 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -119,7 +119,7 @@ def parser_file footer end - c = ::Config::CONFIG + c = ::RbConfig::CONFIG RUBY_PATH = "#{c['bindir']}/#{c['ruby_install_name']}#{c['EXEEXT']}" def shebang(path) From 11e0ffd146b7e8b3e55345181b432a2b132d5d50 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Wed, 9 Nov 2011 13:17:50 -0800 Subject: [PATCH 016/619] Why aren't we using hoe? --- Rakefile | 5 +++-- tasks/doc.rb | 2 +- tasks/gem.rb | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index d6ac5dae..af6350c7 100644 --- a/Rakefile +++ b/Rakefile @@ -1,9 +1,10 @@ require 'rake' -require 'rake/gempackagetask' -require 'rake/rdoctask' +require 'rubygems/package_task' require 'rake/testtask' require 'rake/clean' +include Rake::DSL + load './lib/racc/info.rb' require 'tasks/file' diff --git a/tasks/doc.rb b/tasks/doc.rb index 73eaab52..f71ad641 100644 --- a/tasks/doc.rb +++ b/tasks/doc.rb @@ -1,4 +1,4 @@ -require 'rake/rdoctask' +require 'rdoc/task' Rake::RDocTask.new(:docs) do |rd| rd.main = "README.en.rdoc" diff --git a/tasks/gem.rb b/tasks/gem.rb index 166f35a8..c23a6109 100644 --- a/tasks/gem.rb +++ b/tasks/gem.rb @@ -32,6 +32,6 @@ end end -Rake::GemPackageTask.new(SPEC) do |pkg| +Gem::PackageTask.new(SPEC) do |pkg| pkg.need_tar = true end From 7b96b2105cbc1b0bb8e62ebfec381a420d7e5fee Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 13 Jun 2012 16:28:44 -0700 Subject: [PATCH 017/619] Initialize instance variables in cparse to fix warnings --- ext/racc/cparse.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index ab4edbf5..362c944f 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -329,6 +329,22 @@ initialize(VALUE self) { cparse_params_mark, -1, v); rb_iv_set(self, "@vparams", vparams); + rb_ivar_set(self, id_yydebug, Qnil); + rb_ivar_set(self, id_action_table, Qnil); + rb_ivar_set(self, id_action_check, Qnil); + rb_ivar_set(self, id_action_default, Qnil); + rb_ivar_set(self, id_action_pointer, Qnil); + rb_ivar_set(self, id_goto_table, Qnil); + rb_ivar_set(self, id_goto_check, Qnil); + rb_ivar_set(self, id_goto_default, Qnil); + rb_ivar_set(self, id_goto_pointer, Qnil); + rb_ivar_set(self, id_nt_base, Qnil); + rb_ivar_set(self, id_reduce_table, Qnil); + rb_ivar_set(self, id_token_table, Qnil); + rb_ivar_set(self, id_shift_n, Qnil); + rb_ivar_set(self, id_reduce_n, Qnil); + rb_ivar_set(self, id_use_result, Qnil); + D_puts("starting cparse"); v->sys_debug = Qtrue; vparams = initialize_params(vparams, self, Qnil, Qnil); From 2e98dace2fe2d17bca53d106483dd15c07a31aac Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 24 Mar 2013 14:03:07 +0530 Subject: [PATCH 018/619] change all grammer => grammar --- README.en.rdoc | 4 ++-- doc/en/command.en.html | 2 +- doc/en/usage.en.html | 2 +- lib/racc/parserfilegenerator.rb | 2 +- sample/array2.y | 2 +- sample/conflict.y | 4 ++-- sample/lalr.y | 2 +- sample/syntax.y | 2 +- sample/yyerr.y | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.en.rdoc b/README.en.rdoc index 56bed808..106904c4 100644 --- a/README.en.rdoc +++ b/README.en.rdoc @@ -63,7 +63,7 @@ ... Does it works? For details of Racc, see HTML documents placed under 'doc.en/' - and sample grammer files under 'sample/'. + and sample grammar files under 'sample/'. == License @@ -77,7 +77,7 @@ == Bug Reports Any kind of bug reports are welcome. - If you find a bug of Racc, please email me. Your grammer file, + If you find a bug of Racc, please email me. Your grammar file, debug output genereted by "racc -g", are helpful. diff --git a/doc/en/command.en.html b/doc/en/command.en.html index 7e2f7120..b64f00fd 100644 --- a/doc/en/command.en.html +++ b/doc/en/command.en.html @@ -47,7 +47,7 @@

Racc Command Reference

-C, --check-only
-Check syntax of racc grammer file and quit. +Check syntax of racc grammar file and quit.
-S, --output-status
diff --git a/doc/en/usage.en.html b/doc/en/usage.en.html index de5810e2..7e05f216 100644 --- a/doc/en/usage.en.html +++ b/doc/en/usage.en.html @@ -11,7 +11,7 @@

Generating Parser Using Racc

This creates ruby script file "parse.tab.y". -o option changes this.

-

Writing Racc Grammer File

+

Writing Racc Grammar File

If you want your own parser, you have to write grammar file. A grammar file contains name of parser class, grammar the parser can parse, diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index 9bda0783..1ee09a7c 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -130,7 +130,7 @@ def notice line %q[#] line %q[# DO NOT MODIFY!!!!] line %Q[# This file is automatically generated by Racc #{Racc::Version}] - line %Q[# from Racc grammer file "#{@params.filename}".] + line %Q[# from Racc grammar file "#{@params.filename}".] line %q[#] end diff --git a/sample/array2.y b/sample/array2.y index 639f7936..c3bdd6f0 100644 --- a/sample/array2.y +++ b/sample/array2.y @@ -1,7 +1,7 @@ # $Id$ # # Converting Array-like string into Ruby's Array, version 2. -# This grammer uses no_result_var. +# This grammar uses no_result_var. class ArrayParser2 options no_result_var diff --git a/sample/conflict.y b/sample/conflict.y index 28d7799d..d14d8c40 100644 --- a/sample/conflict.y +++ b/sample/conflict.y @@ -1,7 +1,7 @@ # $Id$ # -# Example of conflicted grammer. -# This grammer contains 1 Shift/Reduce conflict and 1 Reduce/Reduce conflict. +# Example of conflicted grammar. +# This grammar contains 1 Shift/Reduce conflict and 1 Reduce/Reduce conflict. class A rule diff --git a/sample/lalr.y b/sample/lalr.y index 0566d6be..4bfa9455 100644 --- a/sample/lalr.y +++ b/sample/lalr.y @@ -1,6 +1,6 @@ # $Id$ # -# This is LALR grammer, and not LL/SLR. +# This is LALR grammar, and not LL/SLR. class A rule diff --git a/sample/syntax.y b/sample/syntax.y index 6bef1e9c..62939548 100644 --- a/sample/syntax.y +++ b/sample/syntax.y @@ -1,6 +1,6 @@ # $Id$ # -# Racc syntax checker. This grammer file generates +# Racc syntax checker. This grammar file generates # invalid ruby program, you cannot run this parser. class P diff --git a/sample/yyerr.y b/sample/yyerr.y index 99220e0a..2d46d966 100644 --- a/sample/yyerr.y +++ b/sample/yyerr.y @@ -1,6 +1,6 @@ # $Id$ # -# Test grammer file for error handling. +# Test grammar file for error handling. class A rule From 1373dffa9992d40c45b1d325237490497753ca01 Mon Sep 17 00:00:00 2001 From: Gino Hu Date: Wed, 24 Jul 2013 01:10:26 +0800 Subject: [PATCH 019/619] add .en/.ja to index page --- doc/en/index.en.html | 12 ++++++------ doc/ja/index.ja.html | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/en/index.en.html b/doc/en/index.en.html index c6944e95..8553171c 100644 --- a/doc/en/index.en.html +++ b/doc/en/index.en.html @@ -1,10 +1,10 @@

Racc User Manual

updated for version 1.4

diff --git a/doc/ja/index.ja.html b/doc/ja/index.ja.html index 29fd70f3..02ade11a 100644 --- a/doc/ja/index.ja.html +++ b/doc/ja/index.ja.html @@ -1,10 +1,10 @@

Racc ユーザマニュアル

バージョン 1.4 対応

From 7683d77a410f48403a2dabfc4f25c85f7627bc01 Mon Sep 17 00:00:00 2001 From: Gino Hu Date: Wed, 24 Jul 2013 13:59:21 +0800 Subject: [PATCH 020/619] sorry and fix file name bug --- doc/ja/index.ja.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/ja/index.ja.html b/doc/ja/index.ja.html index 02ade11a..1ac4263c 100644 --- a/doc/ja/index.ja.html +++ b/doc/ja/index.ja.html @@ -1,10 +1,10 @@

Racc ユーザマニュアル

バージョン 1.4 対応

From 0c21e3068f09c674ae40aa8f9b599a3f0aad33b7 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 29 Oct 2013 16:07:10 -0700 Subject: [PATCH 021/619] extra ignores --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e2b6d240..4d1a4666 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ lib/racc/parser-text.rb Makefile tags +TAGS +tmp \ No newline at end of file From 804531c673d4fa7b54fbaf5625aa28d559367e0a Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 29 Oct 2013 16:07:49 -0700 Subject: [PATCH 022/619] Use Hoe's hoe/compiler to deal with rake-compiler stuffs. Not sure if hooked up entirely properly yet as I can't get a full compile to work. --- Rakefile | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Rakefile b/Rakefile index 6c5d5ce4..2af6299a 100644 --- a/Rakefile +++ b/Rakefile @@ -3,12 +3,12 @@ require 'rubygems' require 'hoe' -gem 'rake-compiler', '>= 0.4.1' -require "rake/extensiontask" +# gem 'rake-compiler', '>= 0.4.1' +# require "rake/extensiontask" -Hoe.plugin :debugging, :doofus, :git, :isolate +Hoe.plugin :debugging, :doofus, :git, :isolate, :compiler -Hoe.spec 'racc' do +hoespec = Hoe.spec 'racc' do developer 'Aaron Patterson', 'aaron@tenderlovemaking.com' self.extra_rdoc_files = Dir['*.rdoc'] @@ -16,20 +16,17 @@ Hoe.spec 'racc' do self.readme_file = 'README.rdoc' self.testlib = :testunit - extra_dev_deps << ['rake-compiler', '>= 0.4.1'] + dependency 'rake-compiler', '>= 0.4.1', :developer if RUBY_PLATFORM =~ /java/ self.spec_extras = { :platform => 'java' } - else - self.spec_extras = { - :extensions => ["ext/racc/extconf.rb"] - } end +end - Rake::ExtensionTask.new "cparse", spec do |ext| - ext.lib_dir = File.join 'lib', 'racc' - ext.ext_dir = File.join 'ext', 'racc' - end +task :racc => :isolate +Rake::ExtensionTask.new :racc, hoespec.spec do |ext| + ext.lib_dir = File.join 'lib', 'racc' + ext.ext_dir = File.join 'ext', 'racc' end file 'lib/racc/parser-text.rb' => ['lib/racc/parser.rb'] do |t| From 6e0229e9b60514d1769bb2162bf71388979e762f Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 29 Oct 2013 16:08:15 -0700 Subject: [PATCH 023/619] Re-apply some of my previous work by hand. Got nuked by a merge from 1-4-stable. --- ext/racc/cparse.c | 60 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index 76392904..0811deba 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -333,6 +333,8 @@ initialize(VALUE self) { cparse_params_mark, -1, v); rb_iv_set(self, "@vparams", vparams); + // these are set in parser.rb in _racc_setup: + rb_ivar_set(self, id_yydebug, Qnil); rb_ivar_set(self, id_action_table, Qnil); rb_ivar_set(self, id_action_check, Qnil); @@ -353,6 +355,8 @@ initialize(VALUE self) { v->sys_debug = Qtrue; vparams = initialize_params(vparams, self, Qnil, Qnil); v->lex_is_iterator = Qfalse; + + return self; } static VALUE @@ -366,39 +370,33 @@ initialize_params(VALUE vparams, VALUE parser, VALUE lexer, VALUE lexmid) v->lexer = lexer; if (! NIL_P(lexmid)) v->lexmid = value_to_id(lexmid); - v->debug = RTEST(rb_ivar_get(parser, id_yydebug)); - - Check_Type(arg, T_ARRAY); - if (!(13 <= RARRAY_LEN(arg) && RARRAY_LEN(arg) <= 14)) - rb_raise(RaccBug, "[Racc Bug] wrong arg.size %ld", RARRAY_LEN(arg)); - v->action_table = assert_array (rb_ary_entry(arg, 0)); - v->action_check = assert_array (rb_ary_entry(arg, 1)); - v->action_default = assert_array (rb_ary_entry(arg, 2)); - v->action_pointer = assert_array (rb_ary_entry(arg, 3)); - v->goto_table = assert_array (rb_ary_entry(arg, 4)); - v->goto_check = assert_array (rb_ary_entry(arg, 5)); - v->goto_default = assert_array (rb_ary_entry(arg, 6)); - v->goto_pointer = assert_array (rb_ary_entry(arg, 7)); - v->nt_base = assert_integer(rb_ary_entry(arg, 8)); - v->reduce_table = assert_array (rb_ary_entry(arg, 9)); - v->token_table = assert_hash (rb_ary_entry(arg, 10)); - v->shift_n = assert_integer(rb_ary_entry(arg, 11)); - v->reduce_n = assert_integer(rb_ary_entry(arg, 12)); - if (RARRAY_LEN(arg) > 13) { - v->use_result_var = RTEST(rb_ary_entry(arg, 13)); - } - else { - v->use_result_var = Qtrue; - } - v->use_result_var = rb_ivar_get(parser, id_use_result); + v->debug = RTEST(rb_ivar_get(parser, id_yydebug)); + v->action_table = rb_ivar_get(parser, id_action_table); + v->action_check = rb_ivar_get(parser, id_action_check); + v->action_default = rb_ivar_get(parser, id_action_default); + v->action_pointer = rb_ivar_get(parser, id_action_pointer); + v->goto_table = rb_ivar_get(parser, id_goto_table); + v->goto_check = rb_ivar_get(parser, id_goto_check); + v->goto_default = rb_ivar_get(parser, id_goto_default); + v->goto_pointer = rb_ivar_get(parser, id_goto_pointer); + v->nt_base = NUM2LONG(rb_ivar_get(parser, id_nt_base)); + v->reduce_table = rb_ivar_get(parser, id_reduce_table); + v->token_table = rb_ivar_get(parser, id_token_table); + v->shift_n = NUM2LONG(rb_ivar_get(parser, id_shift_n)); + v->reduce_n = NUM2LONG(rb_ivar_get(parser, id_reduce_n)); + v->tstack = v->debug ? NEW_STACK() : Qnil; + v->vstack = NEW_STACK(); + v->state = NEW_STACK(); + v->curstate = 0; + v->t = INT2FIX(FINAL_TOKEN + 1); // must not init to FINAL_TOKEN + v->nerr = 0; + v->errstatus = 0; + v->retval = Qnil; + v->fin = 0; + v->lex_is_iterator = Qfalse; - /* if (RARRAY_LEN(arg) > 13) { */ - /* v->use_result_var = RTEST(RARRAY_PTR(arg)[13]); */ - /* } */ - /* else { */ - /* v->use_result_var = Qtrue; */ - /* } */ + v->use_result_var = rb_ivar_get(parser, id_use_result); PUSH(v->state, INT2FIX(0)); From 448c006d3362080daaa0da0119ce94cf5e7b231e Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Tue, 29 Oct 2013 17:43:50 -0700 Subject: [PATCH 024/619] Use racc/racc in extension for consistency This fixes build issues where the hoe compiler plugin was trying to install racc/racc which didn't exist. --- Rakefile | 4 ---- ext/racc/extconf.rb | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index 2af6299a..23d55265 100644 --- a/Rakefile +++ b/Rakefile @@ -24,10 +24,6 @@ hoespec = Hoe.spec 'racc' do end task :racc => :isolate -Rake::ExtensionTask.new :racc, hoespec.spec do |ext| - ext.lib_dir = File.join 'lib', 'racc' - ext.ext_dir = File.join 'ext', 'racc' -end file 'lib/racc/parser-text.rb' => ['lib/racc/parser.rb'] do |t| source = 'lib/racc/parser.rb' diff --git a/ext/racc/extconf.rb b/ext/racc/extconf.rb index 997d235d..d8e69fa1 100644 --- a/ext/racc/extconf.rb +++ b/ext/racc/extconf.rb @@ -1,3 +1,3 @@ require 'mkmf' -create_makefile 'racc/cparse' +create_makefile 'racc/racc' From aa9cfcc2fdb6652512d2e51d59f3078123514344 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Sat, 9 Nov 2013 10:37:38 -0500 Subject: [PATCH 025/619] merge ruby/ruby@e44d412 upstream from r43618 --- rdoc/en/grammar.en.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index b15c6e6b..ce955d34 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -96,7 +96,7 @@ An array of value of right-hand side (rhs). A stack of values. DO NOT MODIFY this stack unless you know what you are doing. -== Operator Precedance +== Operator Precedence This function is equal to '%prec' in yacc. To designate this block: From 48861ecbaec90c7aae7dd4d636356b645c2ced83 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 13 Jun 2012 16:46:14 -0700 Subject: [PATCH 026/619] Fixed missing return warning from clang. Added conversion from ruby to C for use_result_var --- ext/racc/cparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index 76392904..f01c3398 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -353,6 +353,8 @@ initialize(VALUE self) { v->sys_debug = Qtrue; vparams = initialize_params(vparams, self, Qnil, Qnil); v->lex_is_iterator = Qfalse; + + return self; } static VALUE @@ -391,7 +393,7 @@ initialize_params(VALUE vparams, VALUE parser, VALUE lexer, VALUE lexmid) v->use_result_var = Qtrue; } - v->use_result_var = rb_ivar_get(parser, id_use_result); + v->use_result_var = NUM2INT(rb_ivar_get(parser, id_use_result)); /* if (RARRAY_LEN(arg) > 13) { */ /* v->use_result_var = RTEST(RARRAY_PTR(arg)[13]); */ From 936e617c31914deaa22fd1d9a3b2d946ca6f7286 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 13 Jun 2012 16:46:29 -0700 Subject: [PATCH 027/619] Added coding magic comment to tasks/email.rb --- tasks/email.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/email.rb b/tasks/email.rb index 8ba58d16..b275312e 100644 --- a/tasks/email.rb +++ b/tasks/email.rb @@ -1,3 +1,5 @@ +# coding: UTF-8 + class EmailTask def initialize language, readme, changelog @language = language From a957d46e8c4f15f73d3c238950453e8ac9c43632 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 13 Jun 2012 16:50:56 -0700 Subject: [PATCH 028/619] Added "." to the load path for ruby 1.9 --- Rakefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Rakefile b/Rakefile index 6c5d5ce4..307b6d37 100644 --- a/Rakefile +++ b/Rakefile @@ -7,6 +7,12 @@ gem 'rake-compiler', '>= 0.4.1' require "rake/extensiontask" Hoe.plugin :debugging, :doofus, :git, :isolate +$: << '.' # instead of require_relative for 1.8 compatibility +require 'tasks/file' +require 'tasks/gem' +require 'tasks/test' +require 'tasks/doc' +require 'tasks/email' Hoe.spec 'racc' do developer 'Aaron Patterson', 'aaron@tenderlovemaking.com' From 116a8c5ae4ab1cab5a00c13a26d11d60868938a7 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 14 Nov 2013 16:09:33 -0800 Subject: [PATCH 029/619] Add .travis.yml for pull request checking Notifications are currently disabled --- .travis.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..442c46d1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +--- +after_script: +- rake travis:after -t +before_script: +- gem install hoe-travis --no-rdoc --no-ri +- rake travis:before -t +language: ruby +notifications: + email: +rvm: +- 1.8.7 +- 1.9.3 +- 2.0.0 +- ruby-head +script: rake travis +matrix: + allow_failures: + - rvm: ruby-head From 4a36f9e701bdabd891b65ea265a65518307b1810 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Thu, 14 Nov 2013 16:17:01 -0800 Subject: [PATCH 030/619] Fix test runs on master, but they still fail --- Rakefile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Rakefile b/Rakefile index 307b6d37..9c06303a 100644 --- a/Rakefile +++ b/Rakefile @@ -7,14 +7,8 @@ gem 'rake-compiler', '>= 0.4.1' require "rake/extensiontask" Hoe.plugin :debugging, :doofus, :git, :isolate -$: << '.' # instead of require_relative for 1.8 compatibility -require 'tasks/file' -require 'tasks/gem' -require 'tasks/test' -require 'tasks/doc' -require 'tasks/email' - -Hoe.spec 'racc' do + +hoe = Hoe.spec 'racc' do developer 'Aaron Patterson', 'aaron@tenderlovemaking.com' self.extra_rdoc_files = Dir['*.rdoc'] @@ -23,6 +17,7 @@ Hoe.spec 'racc' do self.testlib = :testunit extra_dev_deps << ['rake-compiler', '>= 0.4.1'] + extra_dev_deps << ['minitest', '~> 4.7'] if RUBY_PLATFORM =~ /java/ self.spec_extras = { :platform => 'java' } @@ -38,6 +33,8 @@ Hoe.spec 'racc' do end end +hoe.test_prelude = 'gem "minitest", "~> 4.7"' + file 'lib/racc/parser-text.rb' => ['lib/racc/parser.rb'] do |t| source = 'lib/racc/parser.rb' From e716e9aed71a7b34a06156cfc6ba2d4ebabd7706 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 30 Oct 2013 12:18:38 +0100 Subject: [PATCH 031/619] fix detection of rb_ary_subseq(), use mkmf's have_func() * See tenderlove/racc#34 and 1b1942a0 --- ext/racc/cparse.c | 2 +- ext/racc/extconf.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index f01c3398..279f53f6 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -80,7 +80,7 @@ static ID id_use_result; # define LONG2NUM(i) INT2NUM(i) #endif -#ifndef rb_ary_subseq +#ifndef HAVE_RB_ARY_SUBSEQ # define rb_ary_subseq(ary, beg, len) rb_ary_new4(len, RARRAY_PTR(ary) + beg) #endif diff --git a/ext/racc/extconf.rb b/ext/racc/extconf.rb index 997d235d..4ddf47b7 100644 --- a/ext/racc/extconf.rb +++ b/ext/racc/extconf.rb @@ -1,3 +1,5 @@ require 'mkmf' +have_func('rb_ary_subseq') + create_makefile 'racc/cparse' From dae3b319b948caa25f3e80b34777cc794c1e38c6 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 12 Dec 2013 16:45:07 -0800 Subject: [PATCH 032/619] More manual edits to fix bad merge on master. This gets all tests passing again. --- lib/racc/parser.rb | 26 ++++---------------------- test/test_scan_y.rb | 3 ++- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 1efbee12..7407774d 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -270,8 +270,7 @@ def _racc_init_sysvars # @q.shift # end def do_parse - _racc_setup - __send__ Racc_Main_Parsing_Routine + __send__(Racc_Main_Parsing_Routine, _racc_setup(), false) end # The method to fetch next token. @@ -287,10 +286,6 @@ def next_token end def _racc_do_parse_rb(arg, in_debug) - action_table, action_check, action_default, action_pointer, - _, _, _, _, - _, _, token_table, * = arg - _racc_init_sysvars tok = act = i = nil @@ -335,11 +330,7 @@ def yyparse(recv, mid) __send__ Racc_YY_Parse_Method, recv, mid end - def _racc_yyparse_rb(recv, mid, arg, c_debug) - action_table, action_check, action_default, action_pointer, - _, _, _, _, - _, _, token_table, * = arg - + def _racc_yyparse_rb(recv, mid) _racc_init_sysvars catch(:racc_end_parse) { @@ -388,11 +379,7 @@ def _racc_yyparse_rb(recv, mid, arg, c_debug) ### common ### - def _racc_evalact(act, arg) - action_table, action_check, _, action_pointer, - _, _, _, _, - _, _, _, shift_n, - reduce_n, * = arg + def _racc_evalact(act) nerr = 0 # tmp if act > 0 and act < @shift_n @@ -483,12 +470,7 @@ def _racc_evalact(act, arg) nil end - def _racc_do_reduce(arg, act) - _, _, _, _, - goto_table, goto_check, goto_default, goto_pointer, - nt_base, reduce_table, _, _, - _, use_result, * = arg - + def _racc_do_reduce(act) state = @racc_state vstack = @racc_vstack tstack = @racc_tstack diff --git a/test/test_scan_y.rb b/test/test_scan_y.rb index b5f95936..c925499a 100644 --- a/test/test_scan_y.rb +++ b/test/test_scan_y.rb @@ -16,7 +16,8 @@ def test_compile # it generates valid ruby assert Module.new { - self.class_eval(generator.generate_parser) + parser = generator.generate_parser + self.class_eval(parser) } grammar = @states.grammar From 9c187973fb4bab388aaed14dc645010f4e807679 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 12 Dec 2013 17:34:36 -0800 Subject: [PATCH 033/619] fixed build name. --- ext/racc/extconf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/racc/extconf.rb b/ext/racc/extconf.rb index 4ddf47b7..36c91dde 100644 --- a/ext/racc/extconf.rb +++ b/ext/racc/extconf.rb @@ -2,4 +2,4 @@ have_func('rb_ary_subseq') -create_makefile 'racc/cparse' +create_makefile 'racc/racc' From 6b461a0ff4145cc31bdbd444fff61bc3ab064521 Mon Sep 17 00:00:00 2001 From: Agis- Date: Wed, 22 Jan 2014 10:14:37 +0200 Subject: [PATCH 034/619] Remove outdated link from README --- README.rdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 106904c4..99382f29 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,7 +1,6 @@ = Racc * http://i.loveruby.net/en/projects/racc/ -* http://racc.rubyforge.org/ == DESCRIPTION: From 57fd209a740e3db648c27bba9545e5034415a6b7 Mon Sep 17 00:00:00 2001 From: kawamoto Date: Mon, 10 Mar 2014 02:46:25 +0900 Subject: [PATCH 035/619] update grammar.en.rdoc --- rdoc/en/grammar.en.rdoc | 266 +++++++++++++++++++++++++++++++--------- 1 file changed, 209 insertions(+), 57 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index ce955d34..178b7bc7 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -4,13 +4,16 @@ == Class Block and User Code Block -There's two block on toplevel. -one is 'class' block, another is 'user code' block. 'user code' block MUST -places after 'class' block. +There are two blocks on toplevel. +One is the 'class' block and the other is the 'user' block. +You MUST write the 'user' block after the 'class' block. +The 'class' block can also be called the 'rule' block or the 'class definition' +block. == Comment -You can insert comment about all places. Two style comment can be used, +You can insert comment about all places. +There are two possible comment styles, Ruby style (#.....) and C style (/*......*/) . == Class Block @@ -27,11 +30,13 @@ class CLASS_NAME rule GRAMMARS -- -CLASS_NAME is a name of parser class. -This is the name of generating parser class. +CLASS_NAME is the name of the parser class to be defined. +This is used as the name of the parser class in the generated file +which is written in Ruby. If CLASS_NAME includes '::', Racc outputs module clause. -For example, writing "class M::C" causes creating the code bellow: +For example, when CLASS_NAME is "M::C", +the parser class is defined as follows in the generated file. -- module M class C @@ -43,8 +48,8 @@ end == Grammar Block -The grammar block discripts grammar which is able -to be understood by parser. Syntax is: +The grammar block is where you write grammars understood by the generated parser. +It is written between the reserved words 'rule' and 'end' and its syntax is as follows: -- (token): (token) (token) (token).... (action) @@ -52,19 +57,29 @@ to be understood by parser. Syntax is: | (token) (token) (token).... (action) | (token) (token) (token).... (action) -- -(action) is an action which is executed when its (token)s are found. -(action) is a ruby code block, which is surrounded by braces: + +(action) is executed when its (token)s are found. +(action) is basically a ruby code block which is surrounded by braces: -- { print val[0] puts val[1] } -- -Note that you cannot use '%' string, here document, '%r' regexp in action. - -Actions can be omitted. -When it is omitted, '' (empty string) is used. - -A return value of action is a value of left side value ($$). -It is value of result, or returned value by "return" statement. +However, you cannot use some of Ruby syntax inside action, +for instance, you cannot use '%' string, here document, '%r' regexp. + +The return value of an action is the left-hand side (lhs) value of the rule. +This is $$ in yacc. +The way to return the value depends on the option you set. +By default, the 'result' local variable (this is val[0] by default) represents +the left-hand side value, thus the value stored in the 'result' variable +by the end of the action would be the left-hand side value. +Otherwise, you can explicitly 'return' the return value. +Alternatively, when you set no_result_var option via options, +the lhs value is the value of the last statement in the action block (as the +same as Ruby methods). + +In whichever way, you can omit actions. +When it is omitted, the left-hand side value is always val[0]. Here is an example of whole grammar block. -- @@ -81,25 +96,75 @@ rule startdesig: START TOKEN -- -You can use following special local variables in action. + +You can use following special local variables inside actions. +The symbols surrounded by parentheses are how they are represented when using +yacc. * result ($$) -The value of left-hand side (lhs). A default value is val[0]. +The value of left-hand side (lhs). This is val[0] by default. * val ($1,$2,$3...) -An array of value of right-hand side (rhs). +An array of the right-hand side (rhs) values. +This is generated every time, so you can freely modify or discard it. * _values (...$-2,$-1,$0) -A stack of values. +A stack of values used by the Racc core. DO NOT MODIFY this stack unless you know what you are doing. +There is also a special form of action which is called embedded action. +It is an action which can be written wherever you like in the middle of the +token sequence. +Here is an example of the embedded action. +--- +target: A B { puts 'test test' } C D { normal action } +--- + +When a rule is written like this, +the action written between B and C is executed at the moment just after both A +and B are found. +An embedded action itself has its value. That is, in the following example, +-- +target: A { result = 1 } B { p val[1] } +-- +when the last action block { p val[1] } is executed, +it shows 1 that is the value of the embedded action and not the value of B. + +In its effect, writing an embedded action is the same as adding a nonterminal +symbol whose rule is empty. The above example and the following code mean +completely the same. +-- +target : A nonterm B { p val[1] } +nonterm : /* empty rule */ { result = 1 } +-- + + == Operator Precedence -This function is equal to '%prec' in yacc. -To designate this block: +When there's a shift/reduce conflict on a token, +sometimes the conflict can be eliminated by defining operator precedences. +The famous examples of such case are arithmetic operators and if-else syntax. + +It does not mean setting operator precedences is necessary to resolve conflicts +because usually it can also be solved by changing the way to construct rules. +However, using operator precedence results in the simpler grammar in most cases. + +When shift/reduce conflicts occur, Racc first investigate whether the precedence +is set on the rule. The precedence of a rule is equal to the precedence of the +last terminal symbol of the rule. +For instance, +-- +target: TERM_A nonterm_a TERM_B nonterm_b +-- +the precedence of this rule is the precedence of TERM_B. +If not any precedence is set on TERM_B, +Racc would consider that it could not solve the conflict by precedence +and report "Shift/Reduce conflict". + +This is how to designate the operator precedences: -- prechigh nonassoc '++' @@ -108,9 +173,47 @@ prechigh right '=' preclow -- -`right' is yacc's %right, `left' is yacc's %left. -`=' + (symbol) means yacc's %prec: +The token written in the line closer to prechigh has the higher precedence. +You can also write this upside-down, that is, writing preclow above and prechigh +at the bottom. + +Left, right and nonassoc represent associativity. +When a confliction occurs between the operators whose precedences are the same +their associativities are used to decide whether shift or reduce. + +For instance, think of the following case: +-- +a - b - c +-- + +When - is left-associative, this is interpreted as follows: +-- +(a - b) - c +-- +Arithmetic operators are usually left-associative. + +On the other hand, +if - is right-associative, it is interpreted as follows: +-- +a - (b - c) +-- + +When an operator is not allowed to be written in succession like this in the +first place, it is nonassoc. +++ in C language and unary minus are nonassoc. + +The left, right, nonassoc are %left, %right and %nonassoc in yacc. + + +By the way, as described, usually the precedence of the rule to be reduced is +the precedence of the last token. (the term 'token' used here means the terminal +symbol.) But sometimes we want to change the precedence of a particular token +only inside a particular rule. For example, the precedence of unary minus must +be higher than the precedence of minus for subtraction. + +In such case, you can use %prec in yacc and you can do the same thing by using +'=' + (symbol) with racc. -- prechigh nonassoc UMINUS @@ -121,65 +224,99 @@ preclow rule exp: exp '*' exp | exp '-' exp - | '-' exp =UMINUS # equals to "%prec UMINUS" + | '-' exp =UMINUS # changing the precedence of - only here : : -- -== expect +In the above example, the precedence of the '-' exp rule is equal to the +precedence of UMINUS and higher than the precedence of '*', as we intended. -Racc has bison's "expect" directive. --- -# Example - -class MyParser -rule - expect 3 - : - : --- -This directive declears "expected" number of shift/reduce conflict. -If "expected" number is equal to real number of conflicts, -racc does not print confliction warning message. == Declaring Tokens -By declaring tokens, you can avoid many meanless bugs. -If decleared token does not exist/existing token does not decleared, -Racc output warnings. Declearation syntax is: +By explicitly declaring tokens, +you can avoid many meaningless bugs, especially typos. +If a declared token does not exist or an existing token is not declared, +Racc outputs warnings. Declaration syntax is: -- token TOKEN_NAME AND_IS_THIS ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST -- +This feature is similar to %token in yacc but slightly different. +With racc, this is not required and even if the tokens are declared, it does not +cause errors but only warnings. + +Please notice that you can write the declaration spanning over multiple lines. + +Racc do have the reserved words but they are considered as the reserved words +only when they are written at the beginning of the line. Therefore, for instance, +prechigh can also be used as a symbol. However, for an abyssal reason, no matter +what we do, we cannot use 'end' as a symbol. + + == Options -You can write options for racc command in your racc file. +You can write some of the options for racc command in your racc file as their +default values. -- options OPTION OPTION ... -- -Options are: +Currently, the options you can write here are: * omit_action_call + * no_omit_action_call -omit empty action call or not. +To omit or not to omit empty action call or not. * result_var + * no_result_var + +To use or not to use local variable "result" -use/does not use local variable "result" -You can use 'no_' prefix to invert its meanings. +== expect + +Racc has bison's "expect" directive. + +A practical parser usually contains non-harmful shift/reduce conflicts. +It is ok for the person who wrote the grammar because he or she knows it, +however, if racc reports "conflicts" after a user processed the grammar file, +he or she might be anxious. +In that case, you can declare the expected number of the conflicts to suppress +the warning message. + +-- +# Example + +class MyParser +rule + expect 3 + : + : +-- + +When you declared the expected number of shift/reduce conflicts as 3 like the +above code, the number of conflicts should exactly be 3. +If it was not 3 (even it was zero), racc would print the warning message. + +Besides, +you could not suppress the warning message for reduce/reduce conflict. + == Converting Token Symbol -Token symbols are, as default, +Token symbols are, by default: * naked token string in racc file (TOK, XFILE, this_is_token, ...) --> symbol (:TOK, :XFILE, :this_is_token, ...) * quoted string (':', '.', '(', ...) --> same string (':', '.', '(', ...) -You can change this default by "convert" block. +This can be inconvenient when you already have a scanner returning values in a +different form. In that case, you can change this using "convert" block. + Here is an example: -- convert @@ -187,8 +324,13 @@ convert MIN 'MinusClass' # We use MinusClass for symbol of `MIN' end -- -We can use almost all ruby value can be used by token symbol, -except 'false' and 'nil'. These are causes unexpected parse error. + +By default, the value of the token symbol PLUS is :PLUS. +But when there's the above definition, it becomes PlusClass. + + +We can use all ruby values as token symbol values +except 'false' and 'nil'. If you want to use String as token symbol, special care is required. For example: @@ -202,16 +344,26 @@ end == Start Rule -'%start' in yacc. This changes start rule. +In order to create a parser, you need to tell racc which rule is the first rule. +The start rule is a way to write it explicitly. + -- start real_target -- +This is usually omitted and in that case, +the start rule is the first rule in the file. This statement will not be used forever, I think. +This is '%start' in yacc. + == User Code Block -"User Code Block" is a Ruby source code which is copied to output. -There are three user code block, "header" "inner" and "footer". +"User Code Block" is a Ruby source code which is copied to the output file. +There are three user code blocks, "header" "inner" and "footer". + +The code written in "header" block is copied to just before the parser class +definition. "inner" is for inside (and the beginning of) the class definition, +and "footer" is after the definition. Format of user code is like this: -- @@ -226,5 +378,5 @@ Format of user code is like this: : -- If four '-' exist on line head, -racc treat it as beginning of user code block. +racc treats it as the beginning of a user code block. A name of user code must be one word. From 715621b2414e8aae1042492f761496830ec839d0 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Sun, 9 Mar 2014 20:35:55 -0700 Subject: [PATCH 036/619] Apply edits from #46 --- rdoc/en/grammar.en.rdoc | 119 ++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index 178b7bc7..3303c621 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -65,7 +65,7 @@ It is written between the reserved words 'rule' and 'end' and its syntax is as f puts val[1] } -- However, you cannot use some of Ruby syntax inside action, -for instance, you cannot use '%' string, here document, '%r' regexp. +for instance, you cannot use '%' string, here document, or '%r' regexp. The return value of an action is the left-hand side (lhs) value of the rule. This is $$ in yacc. @@ -73,13 +73,13 @@ The way to return the value depends on the option you set. By default, the 'result' local variable (this is val[0] by default) represents the left-hand side value, thus the value stored in the 'result' variable by the end of the action would be the left-hand side value. -Otherwise, you can explicitly 'return' the return value. +Otherwise, you can explicitly 'return' the value desired. Alternatively, when you set no_result_var option via options, -the lhs value is the value of the last statement in the action block (as the -same as Ruby methods). +the lhs value is the value of the last statement in the action block (same as +Ruby methods). -In whichever way, you can omit actions. -When it is omitted, the left-hand side value is always val[0]. +In any case, you can omit actions. +When an action is omitted, the left-hand side value is always val[0]. Here is an example of whole grammar block. -- @@ -97,7 +97,7 @@ rule startdesig: START TOKEN -- -You can use following special local variables inside actions. +You can use the following special local variables inside actions. The symbols surrounded by parentheses are how they are represented when using yacc. @@ -112,30 +112,30 @@ This is generated every time, so you can freely modify or discard it. * _values (...$-2,$-1,$0) -A stack of values used by the Racc core. -DO NOT MODIFY this stack unless you know what you are doing. +A stack of values used by the Racc. +DO NOT MODIFY the _values stack unless you know what you are doing. There is also a special form of action which is called embedded action. -It is an action which can be written wherever you like in the middle of the +An embedded action can be written wherever you like in the middle of the token sequence. -Here is an example of the embedded action. +Here is an example of the embedded action: --- target: A B { puts 'test test' } C D { normal action } --- When a rule is written like this, -the action written between B and C is executed at the moment just after both A -and B are found. -An embedded action itself has its value. That is, in the following example, +the action written between B and C is executed immediately after both A and B +are found. +An embedded action itself has a value, as you can see in the following example: -- target: A { result = 1 } B { p val[1] } -- -when the last action block { p val[1] } is executed, +When the last action block { p val[1] } is executed, it shows 1 that is the value of the embedded action and not the value of B. -In its effect, writing an embedded action is the same as adding a nonterminal -symbol whose rule is empty. The above example and the following code mean -completely the same. +In effect, writing an embedded action is the same as adding a nonterminal +symbol whose rule is empty. The above example and the following code are +equivalent. -- target : A nonterm B { p val[1] } nonterm : /* empty rule */ { result = 1 } @@ -146,25 +146,27 @@ nonterm : /* empty rule */ { result = 1 } When there's a shift/reduce conflict on a token, sometimes the conflict can be eliminated by defining operator precedences. -The famous examples of such case are arithmetic operators and if-else syntax. +A famous example of such a case are arithmetic operators and if-else syntax. -It does not mean setting operator precedences is necessary to resolve conflicts -because usually it can also be solved by changing the way to construct rules. -However, using operator precedence results in the simpler grammar in most cases. +This doesn't mean setting operator precedence is necessary to resolve conflicts +because usually it can also be solved by changing the way rules are +constructed. +However, in most cases using operator precedence results in more simple grammar +syntax. -When shift/reduce conflicts occur, Racc first investigate whether the precedence -is set on the rule. The precedence of a rule is equal to the precedence of the -last terminal symbol of the rule. +When shift/reduce conflicts occur, Racc first investigates whether or not the +precedence is set on the rule. The precedence of a rule is equal to the +precedence of the last terminal symbol of the rule. For instance, -- target: TERM_A nonterm_a TERM_B nonterm_b -- the precedence of this rule is the precedence of TERM_B. -If not any precedence is set on TERM_B, -Racc would consider that it could not solve the conflict by precedence -and report "Shift/Reduce conflict". +If no precedence is set on TERM_B, +Racc would be unable to solve the conflict by precedence and report +"Shift/Reduce conflict". -This is how to designate the operator precedences: +Here we can see how to designate operator precedence: -- prechigh nonassoc '++' @@ -175,39 +177,38 @@ preclow -- The token written in the line closer to prechigh has the higher precedence. -You can also write this upside-down, that is, writing preclow above and prechigh -at the bottom. +You can also write this in reverse order, such as defining preclow before +prechigh at the bottom. Left, right and nonassoc represent associativity. -When a confliction occurs between the operators whose precedences are the same -their associativities are used to decide whether shift or reduce. +When a conflict occurs between operators whose precedence is equal, their +associativity is used to decide whether to shift or reduce. For instance, think of the following case: -- a - b - c -- -When - is left-associative, this is interpreted as follows: +When the "-" operator is left-associative this is interpreted as follows: -- (a - b) - c -- -Arithmetic operators are usually left-associative. +Note: arithmetic operators are usually left-associative. On the other hand, -if - is right-associative, it is interpreted as follows: +if the "-" operator is right-associative it is interpreted as follows: -- a - (b - c) -- When an operator is not allowed to be written in succession like this in the first place, it is nonassoc. -++ in C language and unary minus are nonassoc. +Note: in the C language "++", "unary" and "minus" are nonassoc. The left, right, nonassoc are %left, %right and %nonassoc in yacc. - -By the way, as described, usually the precedence of the rule to be reduced is -the precedence of the last token. (the term 'token' used here means the terminal +By the way, the precedence of the rule to be reduced is usually the precedence +of the last token. (The term "token" is used here to represent the terminal symbol.) But sometimes we want to change the precedence of a particular token only inside a particular rule. For example, the precedence of unary minus must be higher than the precedence of minus for subtraction. @@ -238,7 +239,7 @@ precedence of UMINUS and higher than the precedence of '*', as we intended. By explicitly declaring tokens, you can avoid many meaningless bugs, especially typos. If a declared token does not exist or an existing token is not declared, -Racc outputs warnings. Declaration syntax is: +Racc outputs warnings. Such as: -- token TOKEN_NAME AND_IS_THIS ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST @@ -250,10 +251,10 @@ cause errors but only warnings. Please notice that you can write the declaration spanning over multiple lines. -Racc do have the reserved words but they are considered as the reserved words -only when they are written at the beginning of the line. Therefore, for instance, -prechigh can also be used as a symbol. However, for an abyssal reason, no matter -what we do, we cannot use 'end' as a symbol. +Racc does have the reserved words but they are only considered as reserved +words when they are written at the beginning of the line. Therefore, for +instance, prechigh can also be used as a symbol. However, for an abyssal +reason, no matter what we do, we cannot use 'end' as a symbol. == Options @@ -268,12 +269,12 @@ Currently, the options you can write here are: * omit_action_call * no_omit_action_call -To omit or not to omit empty action call or not. +Whether to omit or allow empty action calls. * result_var * no_result_var -To use or not to use local variable "result" +Whether or not to allow the use of a local variable "result". == expect @@ -281,9 +282,9 @@ To use or not to use local variable "result" Racc has bison's "expect" directive. A practical parser usually contains non-harmful shift/reduce conflicts. -It is ok for the person who wrote the grammar because he or she knows it, -however, if racc reports "conflicts" after a user processed the grammar file, -he or she might be anxious. +It's acceptable for the author of the grammar because they already know about +it. However, if Racc reports "conflicts" after a user processed the grammar +file, they might be anxious. In that case, you can declare the expected number of the conflicts to suppress the warning message. @@ -301,13 +302,12 @@ When you declared the expected number of shift/reduce conflicts as 3 like the above code, the number of conflicts should exactly be 3. If it was not 3 (even it was zero), racc would print the warning message. -Besides, -you could not suppress the warning message for reduce/reduce conflict. +Besides, you could not suppress the warning message for reduce/reduce conflict. == Converting Token Symbol -Token symbols are, by default: +Token symbols abide by the following rules: * naked token string in racc file (TOK, XFILE, this_is_token, ...) --> symbol (:TOK, :XFILE, :this_is_token, ...) @@ -315,7 +315,7 @@ Token symbols are, by default: --> same string (':', '.', '(', ...) This can be inconvenient when you already have a scanner returning values in a -different form. In that case, you can change this using "convert" block. +different form. In that case, you can change this using a "convert" block. Here is an example: -- @@ -326,8 +326,7 @@ end -- By default, the value of the token symbol PLUS is :PLUS. -But when there's the above definition, it becomes PlusClass. - +However, when interpreting the above definition it becomes PlusClass. We can use all ruby values as token symbol values except 'false' and 'nil'. @@ -344,7 +343,7 @@ end == Start Rule -In order to create a parser, you need to tell racc which rule is the first rule. +In order to create a parser, you need to tell Racc the first rule to start. The start rule is a way to write it explicitly. -- @@ -354,7 +353,7 @@ This is usually omitted and in that case, the start rule is the first rule in the file. This statement will not be used forever, I think. -This is '%start' in yacc. +In yacc, this is '%start'. == User Code Block @@ -377,6 +376,6 @@ Format of user code is like this: : : -- -If four '-' exist on line head, -racc treats it as the beginning of a user code block. +If four '-' exist on line head, Racc treats this case as the beginning of a +user code block. A name of user code must be one word. From d7b930a8f9d3a39bf36957e7229d2d1d0f17cc7f Mon Sep 17 00:00:00 2001 From: kawamoto Date: Thu, 13 Mar 2014 05:10:46 +0900 Subject: [PATCH 037/619] Mainly s/unary and minus/unary minus --- rdoc/en/grammar.en.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index 3303c621..d92e3adc 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -193,7 +193,7 @@ When the "-" operator is left-associative this is interpreted as follows: -- (a - b) - c -- -Note: arithmetic operators are usually left-associative. +For instance, arithmetic operators are usually left-associative. On the other hand, if the "-" operator is right-associative it is interpreted as follows: @@ -202,8 +202,8 @@ a - (b - c) -- When an operator is not allowed to be written in succession like this in the -first place, it is nonassoc. -Note: in the C language "++", "unary" and "minus" are nonassoc. +first place, it is nonassoc. For instance, the "++" operator in the C language +and unary minus are nonassoc. The left, right, nonassoc are %left, %right and %nonassoc in yacc. From ed72c02b4ddb5b8f35c13dc23c7a30db32e1f216 Mon Sep 17 00:00:00 2001 From: kawamoto Date: Fri, 2 May 2014 07:24:34 +0900 Subject: [PATCH 038/619] Update the Options section --- rdoc/en/grammar.en.rdoc | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index d92e3adc..58aa5e5a 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -259,22 +259,29 @@ reason, no matter what we do, we cannot use 'end' as a symbol. == Options -You can write some of the options for racc command in your racc file as their -default values. +There are some options you can write in your racc grammar file. +The syntax is: -- options OPTION OPTION ... -- -Currently, the options you can write here are: - * omit_action_call - * no_omit_action_call +The currently available options are: -Whether to omit or allow empty action calls. + * [no_]omit_action_call - * result_var - * no_result_var +This is `omit_action_call` by default, which uses the `_reduce_none` action +when the action is empty. +This behavior can be changed to `no_omit_action_call` by specifying the +'--no-omit-actions' command line option of the racc command. +Also, you can set this to `no_omit_action_call` in your grammar file so that +each particular action is defined even when it is empty. -Whether or not to allow the use of a local variable "result". + * [no_]result_var + +This is `result_var` by default, which makes the `result` special variable +available in each action block. As also described in the Grammar Block section, +when this is `no_result_var`, the value of the last statement in each action +block is used as the lhs value. == expect From c68a799dd9b9b3302b61cf3d876756641ff9df15 Mon Sep 17 00:00:00 2001 From: kawamoto Date: Fri, 2 May 2014 07:44:08 +0900 Subject: [PATCH 039/619] edits that seem necessary to use no_omit_action_call --- bin/racc | 2 +- lib/racc/parserfilegenerator.rb | 2 +- lib/racc/state.rb | 4 ++-- lib/racc/statetransitiontable.rb | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/racc b/bin/racc index d8764bce..cf24cbe5 100755 --- a/bin/racc +++ b/bin/racc @@ -161,7 +161,7 @@ def main params = result.params.dup # Overwrites parameters given by a grammar file with command line options. params.superclass = superclass if superclass - params.omit_action_call = true if omit_action_call + params.omit_action_call = false unless omit_action_call # From command line option if make_executable params.make_executable = true diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index e1b62e5a..317ff1f4 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -264,7 +264,7 @@ def put_state_transition_table(f) private def state_transition_table - table = @states.state_transition_table + table = @states.state_transition_table(@params) table.use_result_var = @params.result_var? table.debug_parser = @params.debug_parser? diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 37dd9562..34f56f78 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -88,8 +88,8 @@ def n_rrconflicts @n_rrconflicts ||= inject(0) {|sum, st| sum + st.n_rrconflicts } end - def state_transition_table - @state_transition_table ||= StateTransitionTable.generate(self.dfa) + def state_transition_table(params=nil) + @state_transition_table ||= StateTransitionTable.generate(self.dfa, params) end # diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 4c5f4311..6bb98ec4 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -67,9 +67,10 @@ def token_value_table class StateTransitionTableGenerator - def initialize(states) + def initialize(states, params=nil) @states = states @grammar = states.grammar + @params = params || ParserFileGenerator::Params.new end def generate @@ -91,7 +92,7 @@ def reduce_table(grammar) next if idx == 0 t.push rule.size t.push rule.target.ident - t.push(if rule.action.empty? # and @params.omit_action_call? + t.push(if rule.action.empty? and @params.omit_action_call? then :_reduce_none else "_reduce_#{idx}".intern end) From 148d725d299e7298be097346970088c74c0fb187 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 22 Jan 2009 11:21:07 -0800 Subject: [PATCH 040/619] I'm pretty sure I'm gonna have to kill Aaron, I doubt the trailing whitespace came from anyone else :P --- lib/racc/grammar.rb | 4 ++-- lib/racc/grammarfileparser.rb | 2 +- lib/racc/iset.rb | 2 +- lib/racc/logfilegenerator.rb | 2 +- lib/racc/parser.rb | 1 + lib/racc/state.rb | 16 ++++++++-------- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 733f7084..0539ada4 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -571,7 +571,7 @@ def compute_useless check_symbols_useless s end until r.size == rs and s.size == ss end - + def check_rules_useless(rules) rules.delete_if do |rule| rule.useless = false @@ -855,7 +855,7 @@ def before(len) end private - + def ptr_bug! raise "racc: fatal: pointer not exist: self: #{to_s}" end diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 5e1871de..7b690eb2 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -284,7 +284,7 @@ def canonical_label(src) end label end - + def add_user_code(label, src) @result.params.send(USER_CODE_LABELS[label]).push src end diff --git a/lib/racc/iset.rb b/lib/racc/iset.rb index de638608..31aa4331 100644 --- a/lib/racc/iset.rb +++ b/lib/racc/iset.rb @@ -85,7 +85,7 @@ def clear def dup ISet.new(@set.dup) end - + end # class ISet end # module Racc diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index a7e96636..5e9d0a01 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -132,7 +132,7 @@ def action_out(f, state) def outact(f, t, act) case act when Shift - f.printf " %-12s shift, and go to state %d\n", + f.printf " %-12s shift, and go to state %d\n", t.to_s, act.goto_id when Reduce f.printf " %-12s reduce using rule %d (%s)\n", diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index f015c335..a09327e7 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -580,6 +580,7 @@ def racc_reduce(toks, sim, tstack, vstack) toks.each {|t| out.print ' ', racc_token2str(t) } end out.puts " --> #{racc_token2str(sim)}" + racc_print_stacks tstack, vstack @racc_debug_out.puts end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 735e622b..37dd9562 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -170,7 +170,7 @@ def core_to_state(core) @states.push dest @statecache[k] = dest - + puts "core_to_state: create state ID #{dest.ident}" if @d_state else if @d_state @@ -308,7 +308,7 @@ def lookahead la end - + def create_tmap(size) Array.new(size, 0) # use Integer as bitmap end @@ -512,13 +512,13 @@ def resolve_sr(state, s) end end end - + ASSOC = { :Left => :Reduce, :Right => :Shift, :Nonassoc => :Error } - + def do_resolve_sr(stok, rtok) puts "resolve_sr: s/r conflict: rtok=#{rtok}, stok=#{stok}" if @d_prec @@ -775,7 +775,7 @@ def initialize(ident, sym, from, to) attr_reader :symbol attr_reader :from_state attr_reader :to_state - + def inspect "(#{@from_state.ident}-#{@symbol}->#{@to_state.ident})" end @@ -938,11 +938,11 @@ def initialize(sid, shift, reduce) @shift = shift @reduce = reduce end - + attr_reader :stateid attr_reader :shift attr_reader :reduce - + def to_s sprintf('state %d: S/R conflict rule %d reduce and shift %s', @stateid, @reduce.ruleid, @shift.to_s) @@ -961,7 +961,7 @@ def initialize(sid, high, low, tok) attr_reader :high_prec attr_reader :low_prec attr_reader :token - + def to_s sprintf('state %d: R/R conflict with rule %d and %d on %s', @stateid, @high_prec.ident, @low_prec.ident, @token.to_s) From 0e663ea4a91a89b6ce8c245a60a1f57571a4272a Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 10 Jan 2011 17:31:38 -0800 Subject: [PATCH 041/619] Added test_pure task --- Rakefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Rakefile b/Rakefile index d6c6b050..467ccca9 100644 --- a/Rakefile +++ b/Rakefile @@ -95,6 +95,11 @@ else end +task :test_pure do + ENV["PURERUBY"] = "1" + Rake.application[:test].invoke +end + task :test => :compile Hoe.add_include_dirs('.:lib/racc') From fecad2a644b0ebf29279ab38b4ff54c26b8713e7 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Mon, 10 Jan 2011 17:46:59 -0800 Subject: [PATCH 042/619] Seriously. stop with all the clever. The ruby parser is fast enough --- lib/racc/parserfilegenerator.rb | 53 ++------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index f2d2788a..82536dc0 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -320,57 +320,8 @@ def state_transition_table end def integer_list(name, table) - if table.size > 2000 - serialize_integer_list_compressed name, table - else - serialize_integer_list_std name, table - end - end - - def serialize_integer_list_compressed(name, table) - # TODO: this can be made a LOT more clean with a simple split/map - sep = "\n" - nsep = ",\n" - buf = '' - com = '' - ncom = ',' - co = com - @f.print 'clist = [' - table.each do |i| - buf << co << i.to_s; co = ncom - if buf.size > 66 - @f.print sep; sep = nsep - @f.print "'", buf, "'" - buf = '' - co = com - end - end - unless buf.empty? - @f.print sep - @f.print "'", buf, "'" - end - line ' ]' - - @f.print(<<-End) - #{name} = arr = ::Array.new(#{table.size}, nil) - idx = 0 - clist.each do |str| - str.split(',', -1).each do |i| - arr[idx] = i.to_i unless i.empty? - idx += 1 - end - end - End - end - - def serialize_integer_list_std(name, table) - sep = '' - line "#{name} = [" - table.each_slice(10) do |ns| - @f.print sep; sep = ",\n" - @f.print ns.map {|n| sprintf('%6s', n ? n.to_s : 'nil') }.join(',') - end - line ' ]' + lines = table.inspect.split(/((?:\w+, ){15})/).reject { |s| s.empty? } + line "#{name} = #{lines.join("\n")}" end def i_i_sym_list(name, table) From 84e31cc5fe986048ce09714385cdd45616ed430b Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 24 Mar 2013 14:03:07 +0530 Subject: [PATCH 043/619] change all grammer => grammar --- README.rdoc | 4 ++-- lib/racc/parserfilegenerator.rb | 2 +- sample/array2.y | 2 +- sample/conflict.y | 4 ++-- sample/lalr.y | 2 +- sample/syntax.y | 2 +- sample/yyerr.y | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.rdoc b/README.rdoc index 56bed808..106904c4 100644 --- a/README.rdoc +++ b/README.rdoc @@ -63,7 +63,7 @@ ... Does it works? For details of Racc, see HTML documents placed under 'doc.en/' - and sample grammer files under 'sample/'. + and sample grammar files under 'sample/'. == License @@ -77,7 +77,7 @@ == Bug Reports Any kind of bug reports are welcome. - If you find a bug of Racc, please email me. Your grammer file, + If you find a bug of Racc, please email me. Your grammar file, debug output genereted by "racc -g", are helpful. diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index 82536dc0..b6003f47 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -125,7 +125,7 @@ def notice line %q[#] line %q[# DO NOT MODIFY!!!!] line %Q[# This file is automatically generated by Racc #{Racc::Version}] - line %Q[# from Racc grammer file "#{@params.filename}".] + line %Q[# from Racc grammar file "#{@params.filename}".] line %q[#] end diff --git a/sample/array2.y b/sample/array2.y index 639f7936..c3bdd6f0 100644 --- a/sample/array2.y +++ b/sample/array2.y @@ -1,7 +1,7 @@ # $Id$ # # Converting Array-like string into Ruby's Array, version 2. -# This grammer uses no_result_var. +# This grammar uses no_result_var. class ArrayParser2 options no_result_var diff --git a/sample/conflict.y b/sample/conflict.y index 28d7799d..d14d8c40 100644 --- a/sample/conflict.y +++ b/sample/conflict.y @@ -1,7 +1,7 @@ # $Id$ # -# Example of conflicted grammer. -# This grammer contains 1 Shift/Reduce conflict and 1 Reduce/Reduce conflict. +# Example of conflicted grammar. +# This grammar contains 1 Shift/Reduce conflict and 1 Reduce/Reduce conflict. class A rule diff --git a/sample/lalr.y b/sample/lalr.y index 0566d6be..4bfa9455 100644 --- a/sample/lalr.y +++ b/sample/lalr.y @@ -1,6 +1,6 @@ # $Id$ # -# This is LALR grammer, and not LL/SLR. +# This is LALR grammar, and not LL/SLR. class A rule diff --git a/sample/syntax.y b/sample/syntax.y index 6bef1e9c..62939548 100644 --- a/sample/syntax.y +++ b/sample/syntax.y @@ -1,6 +1,6 @@ # $Id$ # -# Racc syntax checker. This grammer file generates +# Racc syntax checker. This grammar file generates # invalid ruby program, you cannot run this parser. class P diff --git a/sample/yyerr.y b/sample/yyerr.y index 99220e0a..2d46d966 100644 --- a/sample/yyerr.y +++ b/sample/yyerr.y @@ -1,6 +1,6 @@ # $Id$ # -# Test grammer file for error handling. +# Test grammar file for error handling. class A rule From bcb4acc99796a6a23732f993be44a4c9102a68ee Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 29 Oct 2013 16:07:10 -0700 Subject: [PATCH 044/619] extra ignores --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 085e3b71..b854d1ee 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ tmp target lib/racc/cparse-jruby.jar racc.gemspec +TAGS From 0f190ee2665149b5f7d9841646b101e8ed64d892 Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 13 Jun 2012 16:46:29 -0700 Subject: [PATCH 045/619] Added coding magic comment to tasks/email.rb --- tasks/email.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/email.rb b/tasks/email.rb index 8ba58d16..b275312e 100644 --- a/tasks/email.rb +++ b/tasks/email.rb @@ -1,3 +1,5 @@ +# coding: UTF-8 + class EmailTask def initialize language, readme, changelog @language = language From 48fa6fc51cb0de55c057656efe4eabccc66eeeac Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Wed, 13 Jun 2012 16:50:56 -0700 Subject: [PATCH 046/619] Added "." to the load path for ruby 1.9 --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index 467ccca9..dac6c621 100644 --- a/Rakefile +++ b/Rakefile @@ -6,6 +6,7 @@ require 'hoe' gem 'rake-compiler', '>= 0.4.1' Hoe.plugin :debugging, :doofus, :git, :isolate, :gemspec +$: << '.' # instead of require_relative for 1.8 compatibility def java? /java/ === RUBY_PLATFORM From aff5ca09d4b91ed0ddb68f564ac10db15357a265 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Sat, 9 Nov 2013 10:37:38 -0500 Subject: [PATCH 047/619] merge ruby/ruby@e44d412 upstream from r43618 --- rdoc/en/grammar.en.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index b15c6e6b..ce955d34 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -96,7 +96,7 @@ An array of value of right-hand side (rhs). A stack of values. DO NOT MODIFY this stack unless you know what you are doing. -== Operator Precedance +== Operator Precedence This function is equal to '%prec' in yacc. To designate this block: From 5695c4b995838e3524f9d02370dbd4f5d9ea5b37 Mon Sep 17 00:00:00 2001 From: Agis- Date: Wed, 22 Jan 2014 10:14:37 +0200 Subject: [PATCH 048/619] Remove outdated link from README --- README.rdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 106904c4..99382f29 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,7 +1,6 @@ = Racc * http://i.loveruby.net/en/projects/racc/ -* http://racc.rubyforge.org/ == DESCRIPTION: From 7993679e75b4e819ce4ee5a8d448fc1ab46ade36 Mon Sep 17 00:00:00 2001 From: kawamoto Date: Mon, 10 Mar 2014 02:46:25 +0900 Subject: [PATCH 049/619] update grammar.en.rdoc --- rdoc/en/grammar.en.rdoc | 266 +++++++++++++++++++++++++++++++--------- 1 file changed, 209 insertions(+), 57 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index ce955d34..178b7bc7 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -4,13 +4,16 @@ == Class Block and User Code Block -There's two block on toplevel. -one is 'class' block, another is 'user code' block. 'user code' block MUST -places after 'class' block. +There are two blocks on toplevel. +One is the 'class' block and the other is the 'user' block. +You MUST write the 'user' block after the 'class' block. +The 'class' block can also be called the 'rule' block or the 'class definition' +block. == Comment -You can insert comment about all places. Two style comment can be used, +You can insert comment about all places. +There are two possible comment styles, Ruby style (#.....) and C style (/*......*/) . == Class Block @@ -27,11 +30,13 @@ class CLASS_NAME rule GRAMMARS -- -CLASS_NAME is a name of parser class. -This is the name of generating parser class. +CLASS_NAME is the name of the parser class to be defined. +This is used as the name of the parser class in the generated file +which is written in Ruby. If CLASS_NAME includes '::', Racc outputs module clause. -For example, writing "class M::C" causes creating the code bellow: +For example, when CLASS_NAME is "M::C", +the parser class is defined as follows in the generated file. -- module M class C @@ -43,8 +48,8 @@ end == Grammar Block -The grammar block discripts grammar which is able -to be understood by parser. Syntax is: +The grammar block is where you write grammars understood by the generated parser. +It is written between the reserved words 'rule' and 'end' and its syntax is as follows: -- (token): (token) (token) (token).... (action) @@ -52,19 +57,29 @@ to be understood by parser. Syntax is: | (token) (token) (token).... (action) | (token) (token) (token).... (action) -- -(action) is an action which is executed when its (token)s are found. -(action) is a ruby code block, which is surrounded by braces: + +(action) is executed when its (token)s are found. +(action) is basically a ruby code block which is surrounded by braces: -- { print val[0] puts val[1] } -- -Note that you cannot use '%' string, here document, '%r' regexp in action. - -Actions can be omitted. -When it is omitted, '' (empty string) is used. - -A return value of action is a value of left side value ($$). -It is value of result, or returned value by "return" statement. +However, you cannot use some of Ruby syntax inside action, +for instance, you cannot use '%' string, here document, '%r' regexp. + +The return value of an action is the left-hand side (lhs) value of the rule. +This is $$ in yacc. +The way to return the value depends on the option you set. +By default, the 'result' local variable (this is val[0] by default) represents +the left-hand side value, thus the value stored in the 'result' variable +by the end of the action would be the left-hand side value. +Otherwise, you can explicitly 'return' the return value. +Alternatively, when you set no_result_var option via options, +the lhs value is the value of the last statement in the action block (as the +same as Ruby methods). + +In whichever way, you can omit actions. +When it is omitted, the left-hand side value is always val[0]. Here is an example of whole grammar block. -- @@ -81,25 +96,75 @@ rule startdesig: START TOKEN -- -You can use following special local variables in action. + +You can use following special local variables inside actions. +The symbols surrounded by parentheses are how they are represented when using +yacc. * result ($$) -The value of left-hand side (lhs). A default value is val[0]. +The value of left-hand side (lhs). This is val[0] by default. * val ($1,$2,$3...) -An array of value of right-hand side (rhs). +An array of the right-hand side (rhs) values. +This is generated every time, so you can freely modify or discard it. * _values (...$-2,$-1,$0) -A stack of values. +A stack of values used by the Racc core. DO NOT MODIFY this stack unless you know what you are doing. +There is also a special form of action which is called embedded action. +It is an action which can be written wherever you like in the middle of the +token sequence. +Here is an example of the embedded action. +--- +target: A B { puts 'test test' } C D { normal action } +--- + +When a rule is written like this, +the action written between B and C is executed at the moment just after both A +and B are found. +An embedded action itself has its value. That is, in the following example, +-- +target: A { result = 1 } B { p val[1] } +-- +when the last action block { p val[1] } is executed, +it shows 1 that is the value of the embedded action and not the value of B. + +In its effect, writing an embedded action is the same as adding a nonterminal +symbol whose rule is empty. The above example and the following code mean +completely the same. +-- +target : A nonterm B { p val[1] } +nonterm : /* empty rule */ { result = 1 } +-- + + == Operator Precedence -This function is equal to '%prec' in yacc. -To designate this block: +When there's a shift/reduce conflict on a token, +sometimes the conflict can be eliminated by defining operator precedences. +The famous examples of such case are arithmetic operators and if-else syntax. + +It does not mean setting operator precedences is necessary to resolve conflicts +because usually it can also be solved by changing the way to construct rules. +However, using operator precedence results in the simpler grammar in most cases. + +When shift/reduce conflicts occur, Racc first investigate whether the precedence +is set on the rule. The precedence of a rule is equal to the precedence of the +last terminal symbol of the rule. +For instance, +-- +target: TERM_A nonterm_a TERM_B nonterm_b +-- +the precedence of this rule is the precedence of TERM_B. +If not any precedence is set on TERM_B, +Racc would consider that it could not solve the conflict by precedence +and report "Shift/Reduce conflict". + +This is how to designate the operator precedences: -- prechigh nonassoc '++' @@ -108,9 +173,47 @@ prechigh right '=' preclow -- -`right' is yacc's %right, `left' is yacc's %left. -`=' + (symbol) means yacc's %prec: +The token written in the line closer to prechigh has the higher precedence. +You can also write this upside-down, that is, writing preclow above and prechigh +at the bottom. + +Left, right and nonassoc represent associativity. +When a confliction occurs between the operators whose precedences are the same +their associativities are used to decide whether shift or reduce. + +For instance, think of the following case: +-- +a - b - c +-- + +When - is left-associative, this is interpreted as follows: +-- +(a - b) - c +-- +Arithmetic operators are usually left-associative. + +On the other hand, +if - is right-associative, it is interpreted as follows: +-- +a - (b - c) +-- + +When an operator is not allowed to be written in succession like this in the +first place, it is nonassoc. +++ in C language and unary minus are nonassoc. + +The left, right, nonassoc are %left, %right and %nonassoc in yacc. + + +By the way, as described, usually the precedence of the rule to be reduced is +the precedence of the last token. (the term 'token' used here means the terminal +symbol.) But sometimes we want to change the precedence of a particular token +only inside a particular rule. For example, the precedence of unary minus must +be higher than the precedence of minus for subtraction. + +In such case, you can use %prec in yacc and you can do the same thing by using +'=' + (symbol) with racc. -- prechigh nonassoc UMINUS @@ -121,65 +224,99 @@ preclow rule exp: exp '*' exp | exp '-' exp - | '-' exp =UMINUS # equals to "%prec UMINUS" + | '-' exp =UMINUS # changing the precedence of - only here : : -- -== expect +In the above example, the precedence of the '-' exp rule is equal to the +precedence of UMINUS and higher than the precedence of '*', as we intended. -Racc has bison's "expect" directive. --- -# Example - -class MyParser -rule - expect 3 - : - : --- -This directive declears "expected" number of shift/reduce conflict. -If "expected" number is equal to real number of conflicts, -racc does not print confliction warning message. == Declaring Tokens -By declaring tokens, you can avoid many meanless bugs. -If decleared token does not exist/existing token does not decleared, -Racc output warnings. Declearation syntax is: +By explicitly declaring tokens, +you can avoid many meaningless bugs, especially typos. +If a declared token does not exist or an existing token is not declared, +Racc outputs warnings. Declaration syntax is: -- token TOKEN_NAME AND_IS_THIS ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST -- +This feature is similar to %token in yacc but slightly different. +With racc, this is not required and even if the tokens are declared, it does not +cause errors but only warnings. + +Please notice that you can write the declaration spanning over multiple lines. + +Racc do have the reserved words but they are considered as the reserved words +only when they are written at the beginning of the line. Therefore, for instance, +prechigh can also be used as a symbol. However, for an abyssal reason, no matter +what we do, we cannot use 'end' as a symbol. + + == Options -You can write options for racc command in your racc file. +You can write some of the options for racc command in your racc file as their +default values. -- options OPTION OPTION ... -- -Options are: +Currently, the options you can write here are: * omit_action_call + * no_omit_action_call -omit empty action call or not. +To omit or not to omit empty action call or not. * result_var + * no_result_var + +To use or not to use local variable "result" -use/does not use local variable "result" -You can use 'no_' prefix to invert its meanings. +== expect + +Racc has bison's "expect" directive. + +A practical parser usually contains non-harmful shift/reduce conflicts. +It is ok for the person who wrote the grammar because he or she knows it, +however, if racc reports "conflicts" after a user processed the grammar file, +he or she might be anxious. +In that case, you can declare the expected number of the conflicts to suppress +the warning message. + +-- +# Example + +class MyParser +rule + expect 3 + : + : +-- + +When you declared the expected number of shift/reduce conflicts as 3 like the +above code, the number of conflicts should exactly be 3. +If it was not 3 (even it was zero), racc would print the warning message. + +Besides, +you could not suppress the warning message for reduce/reduce conflict. + == Converting Token Symbol -Token symbols are, as default, +Token symbols are, by default: * naked token string in racc file (TOK, XFILE, this_is_token, ...) --> symbol (:TOK, :XFILE, :this_is_token, ...) * quoted string (':', '.', '(', ...) --> same string (':', '.', '(', ...) -You can change this default by "convert" block. +This can be inconvenient when you already have a scanner returning values in a +different form. In that case, you can change this using "convert" block. + Here is an example: -- convert @@ -187,8 +324,13 @@ convert MIN 'MinusClass' # We use MinusClass for symbol of `MIN' end -- -We can use almost all ruby value can be used by token symbol, -except 'false' and 'nil'. These are causes unexpected parse error. + +By default, the value of the token symbol PLUS is :PLUS. +But when there's the above definition, it becomes PlusClass. + + +We can use all ruby values as token symbol values +except 'false' and 'nil'. If you want to use String as token symbol, special care is required. For example: @@ -202,16 +344,26 @@ end == Start Rule -'%start' in yacc. This changes start rule. +In order to create a parser, you need to tell racc which rule is the first rule. +The start rule is a way to write it explicitly. + -- start real_target -- +This is usually omitted and in that case, +the start rule is the first rule in the file. This statement will not be used forever, I think. +This is '%start' in yacc. + == User Code Block -"User Code Block" is a Ruby source code which is copied to output. -There are three user code block, "header" "inner" and "footer". +"User Code Block" is a Ruby source code which is copied to the output file. +There are three user code blocks, "header" "inner" and "footer". + +The code written in "header" block is copied to just before the parser class +definition. "inner" is for inside (and the beginning of) the class definition, +and "footer" is after the definition. Format of user code is like this: -- @@ -226,5 +378,5 @@ Format of user code is like this: : -- If four '-' exist on line head, -racc treat it as beginning of user code block. +racc treats it as the beginning of a user code block. A name of user code must be one word. From df0f164743723253a9685d9294e79e83327f5bc1 Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Sun, 9 Mar 2014 20:35:55 -0700 Subject: [PATCH 050/619] Apply edits from #46 --- rdoc/en/grammar.en.rdoc | 119 ++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index 178b7bc7..3303c621 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -65,7 +65,7 @@ It is written between the reserved words 'rule' and 'end' and its syntax is as f puts val[1] } -- However, you cannot use some of Ruby syntax inside action, -for instance, you cannot use '%' string, here document, '%r' regexp. +for instance, you cannot use '%' string, here document, or '%r' regexp. The return value of an action is the left-hand side (lhs) value of the rule. This is $$ in yacc. @@ -73,13 +73,13 @@ The way to return the value depends on the option you set. By default, the 'result' local variable (this is val[0] by default) represents the left-hand side value, thus the value stored in the 'result' variable by the end of the action would be the left-hand side value. -Otherwise, you can explicitly 'return' the return value. +Otherwise, you can explicitly 'return' the value desired. Alternatively, when you set no_result_var option via options, -the lhs value is the value of the last statement in the action block (as the -same as Ruby methods). +the lhs value is the value of the last statement in the action block (same as +Ruby methods). -In whichever way, you can omit actions. -When it is omitted, the left-hand side value is always val[0]. +In any case, you can omit actions. +When an action is omitted, the left-hand side value is always val[0]. Here is an example of whole grammar block. -- @@ -97,7 +97,7 @@ rule startdesig: START TOKEN -- -You can use following special local variables inside actions. +You can use the following special local variables inside actions. The symbols surrounded by parentheses are how they are represented when using yacc. @@ -112,30 +112,30 @@ This is generated every time, so you can freely modify or discard it. * _values (...$-2,$-1,$0) -A stack of values used by the Racc core. -DO NOT MODIFY this stack unless you know what you are doing. +A stack of values used by the Racc. +DO NOT MODIFY the _values stack unless you know what you are doing. There is also a special form of action which is called embedded action. -It is an action which can be written wherever you like in the middle of the +An embedded action can be written wherever you like in the middle of the token sequence. -Here is an example of the embedded action. +Here is an example of the embedded action: --- target: A B { puts 'test test' } C D { normal action } --- When a rule is written like this, -the action written between B and C is executed at the moment just after both A -and B are found. -An embedded action itself has its value. That is, in the following example, +the action written between B and C is executed immediately after both A and B +are found. +An embedded action itself has a value, as you can see in the following example: -- target: A { result = 1 } B { p val[1] } -- -when the last action block { p val[1] } is executed, +When the last action block { p val[1] } is executed, it shows 1 that is the value of the embedded action and not the value of B. -In its effect, writing an embedded action is the same as adding a nonterminal -symbol whose rule is empty. The above example and the following code mean -completely the same. +In effect, writing an embedded action is the same as adding a nonterminal +symbol whose rule is empty. The above example and the following code are +equivalent. -- target : A nonterm B { p val[1] } nonterm : /* empty rule */ { result = 1 } @@ -146,25 +146,27 @@ nonterm : /* empty rule */ { result = 1 } When there's a shift/reduce conflict on a token, sometimes the conflict can be eliminated by defining operator precedences. -The famous examples of such case are arithmetic operators and if-else syntax. +A famous example of such a case are arithmetic operators and if-else syntax. -It does not mean setting operator precedences is necessary to resolve conflicts -because usually it can also be solved by changing the way to construct rules. -However, using operator precedence results in the simpler grammar in most cases. +This doesn't mean setting operator precedence is necessary to resolve conflicts +because usually it can also be solved by changing the way rules are +constructed. +However, in most cases using operator precedence results in more simple grammar +syntax. -When shift/reduce conflicts occur, Racc first investigate whether the precedence -is set on the rule. The precedence of a rule is equal to the precedence of the -last terminal symbol of the rule. +When shift/reduce conflicts occur, Racc first investigates whether or not the +precedence is set on the rule. The precedence of a rule is equal to the +precedence of the last terminal symbol of the rule. For instance, -- target: TERM_A nonterm_a TERM_B nonterm_b -- the precedence of this rule is the precedence of TERM_B. -If not any precedence is set on TERM_B, -Racc would consider that it could not solve the conflict by precedence -and report "Shift/Reduce conflict". +If no precedence is set on TERM_B, +Racc would be unable to solve the conflict by precedence and report +"Shift/Reduce conflict". -This is how to designate the operator precedences: +Here we can see how to designate operator precedence: -- prechigh nonassoc '++' @@ -175,39 +177,38 @@ preclow -- The token written in the line closer to prechigh has the higher precedence. -You can also write this upside-down, that is, writing preclow above and prechigh -at the bottom. +You can also write this in reverse order, such as defining preclow before +prechigh at the bottom. Left, right and nonassoc represent associativity. -When a confliction occurs between the operators whose precedences are the same -their associativities are used to decide whether shift or reduce. +When a conflict occurs between operators whose precedence is equal, their +associativity is used to decide whether to shift or reduce. For instance, think of the following case: -- a - b - c -- -When - is left-associative, this is interpreted as follows: +When the "-" operator is left-associative this is interpreted as follows: -- (a - b) - c -- -Arithmetic operators are usually left-associative. +Note: arithmetic operators are usually left-associative. On the other hand, -if - is right-associative, it is interpreted as follows: +if the "-" operator is right-associative it is interpreted as follows: -- a - (b - c) -- When an operator is not allowed to be written in succession like this in the first place, it is nonassoc. -++ in C language and unary minus are nonassoc. +Note: in the C language "++", "unary" and "minus" are nonassoc. The left, right, nonassoc are %left, %right and %nonassoc in yacc. - -By the way, as described, usually the precedence of the rule to be reduced is -the precedence of the last token. (the term 'token' used here means the terminal +By the way, the precedence of the rule to be reduced is usually the precedence +of the last token. (The term "token" is used here to represent the terminal symbol.) But sometimes we want to change the precedence of a particular token only inside a particular rule. For example, the precedence of unary minus must be higher than the precedence of minus for subtraction. @@ -238,7 +239,7 @@ precedence of UMINUS and higher than the precedence of '*', as we intended. By explicitly declaring tokens, you can avoid many meaningless bugs, especially typos. If a declared token does not exist or an existing token is not declared, -Racc outputs warnings. Declaration syntax is: +Racc outputs warnings. Such as: -- token TOKEN_NAME AND_IS_THIS ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST @@ -250,10 +251,10 @@ cause errors but only warnings. Please notice that you can write the declaration spanning over multiple lines. -Racc do have the reserved words but they are considered as the reserved words -only when they are written at the beginning of the line. Therefore, for instance, -prechigh can also be used as a symbol. However, for an abyssal reason, no matter -what we do, we cannot use 'end' as a symbol. +Racc does have the reserved words but they are only considered as reserved +words when they are written at the beginning of the line. Therefore, for +instance, prechigh can also be used as a symbol. However, for an abyssal +reason, no matter what we do, we cannot use 'end' as a symbol. == Options @@ -268,12 +269,12 @@ Currently, the options you can write here are: * omit_action_call * no_omit_action_call -To omit or not to omit empty action call or not. +Whether to omit or allow empty action calls. * result_var * no_result_var -To use or not to use local variable "result" +Whether or not to allow the use of a local variable "result". == expect @@ -281,9 +282,9 @@ To use or not to use local variable "result" Racc has bison's "expect" directive. A practical parser usually contains non-harmful shift/reduce conflicts. -It is ok for the person who wrote the grammar because he or she knows it, -however, if racc reports "conflicts" after a user processed the grammar file, -he or she might be anxious. +It's acceptable for the author of the grammar because they already know about +it. However, if Racc reports "conflicts" after a user processed the grammar +file, they might be anxious. In that case, you can declare the expected number of the conflicts to suppress the warning message. @@ -301,13 +302,12 @@ When you declared the expected number of shift/reduce conflicts as 3 like the above code, the number of conflicts should exactly be 3. If it was not 3 (even it was zero), racc would print the warning message. -Besides, -you could not suppress the warning message for reduce/reduce conflict. +Besides, you could not suppress the warning message for reduce/reduce conflict. == Converting Token Symbol -Token symbols are, by default: +Token symbols abide by the following rules: * naked token string in racc file (TOK, XFILE, this_is_token, ...) --> symbol (:TOK, :XFILE, :this_is_token, ...) @@ -315,7 +315,7 @@ Token symbols are, by default: --> same string (':', '.', '(', ...) This can be inconvenient when you already have a scanner returning values in a -different form. In that case, you can change this using "convert" block. +different form. In that case, you can change this using a "convert" block. Here is an example: -- @@ -326,8 +326,7 @@ end -- By default, the value of the token symbol PLUS is :PLUS. -But when there's the above definition, it becomes PlusClass. - +However, when interpreting the above definition it becomes PlusClass. We can use all ruby values as token symbol values except 'false' and 'nil'. @@ -344,7 +343,7 @@ end == Start Rule -In order to create a parser, you need to tell racc which rule is the first rule. +In order to create a parser, you need to tell Racc the first rule to start. The start rule is a way to write it explicitly. -- @@ -354,7 +353,7 @@ This is usually omitted and in that case, the start rule is the first rule in the file. This statement will not be used forever, I think. -This is '%start' in yacc. +In yacc, this is '%start'. == User Code Block @@ -377,6 +376,6 @@ Format of user code is like this: : : -- -If four '-' exist on line head, -racc treats it as the beginning of a user code block. +If four '-' exist on line head, Racc treats this case as the beginning of a +user code block. A name of user code must be one word. From 12b67a63b5b3697626a963c1960efcd92921729e Mon Sep 17 00:00:00 2001 From: kawamoto Date: Thu, 13 Mar 2014 05:10:46 +0900 Subject: [PATCH 051/619] Mainly s/unary and minus/unary minus --- rdoc/en/grammar.en.rdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index 3303c621..d92e3adc 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -193,7 +193,7 @@ When the "-" operator is left-associative this is interpreted as follows: -- (a - b) - c -- -Note: arithmetic operators are usually left-associative. +For instance, arithmetic operators are usually left-associative. On the other hand, if the "-" operator is right-associative it is interpreted as follows: @@ -202,8 +202,8 @@ a - (b - c) -- When an operator is not allowed to be written in succession like this in the -first place, it is nonassoc. -Note: in the C language "++", "unary" and "minus" are nonassoc. +first place, it is nonassoc. For instance, the "++" operator in the C language +and unary minus are nonassoc. The left, right, nonassoc are %left, %right and %nonassoc in yacc. From d7816f24b07bc270fa6ee5224aa7ef7b27cba39e Mon Sep 17 00:00:00 2001 From: kawamoto Date: Fri, 2 May 2014 07:24:34 +0900 Subject: [PATCH 052/619] Update the Options section --- rdoc/en/grammar.en.rdoc | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index d92e3adc..58aa5e5a 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -259,22 +259,29 @@ reason, no matter what we do, we cannot use 'end' as a symbol. == Options -You can write some of the options for racc command in your racc file as their -default values. +There are some options you can write in your racc grammar file. +The syntax is: -- options OPTION OPTION ... -- -Currently, the options you can write here are: - * omit_action_call - * no_omit_action_call +The currently available options are: -Whether to omit or allow empty action calls. + * [no_]omit_action_call - * result_var - * no_result_var +This is `omit_action_call` by default, which uses the `_reduce_none` action +when the action is empty. +This behavior can be changed to `no_omit_action_call` by specifying the +'--no-omit-actions' command line option of the racc command. +Also, you can set this to `no_omit_action_call` in your grammar file so that +each particular action is defined even when it is empty. -Whether or not to allow the use of a local variable "result". + * [no_]result_var + +This is `result_var` by default, which makes the `result` special variable +available in each action block. As also described in the Grammar Block section, +when this is `no_result_var`, the value of the last statement in each action +block is used as the lhs value. == expect From 06686ac486f7e0b8d91d87b2dfca08c5bb0c6a08 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 4 Nov 2015 06:02:16 +0200 Subject: [PATCH 053/619] Use hoe-bundler to create Gemfile This is for Travis CI, so it can install all the dependencies before running the tests. hoe-travis is supposed to do this, but it doesn't work, as it uses a Rake task, and Rake doesn't run at all until the required dependencies are installed. Bundler users (like me) will also appreciate being able to use `bundle install` to get all the dependencies needed to work on Racc. Remove the `isolate` gem, as Bundler does everything it does. Also, the 2 don't play well together when running tests. In future, when any dependencies are changed, make sure to run `rake bundler:gemfile` and commit the results. --- .gitignore | 5 +++++ Gemfile | 19 +++++++++++++++++++ Rakefile | 10 +++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Gemfile diff --git a/.gitignore b/.gitignore index b854d1ee..5ae7affc 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,8 @@ target lib/racc/cparse-jruby.jar racc.gemspec TAGS + +# For Bundler +.bundle +Gemfile.lock +Gemfile.local diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..64fd9e12 --- /dev/null +++ b/Gemfile @@ -0,0 +1,19 @@ +# -*- ruby -*- + +# DO NOT EDIT THIS FILE. Instead, edit Rakefile, and run `rake bundler:gemfile`. + +source "https://rubygems.org/" + + +gem "rdoc", "~>4.0", :group => [:development, :test] +gem "rake", "~>10.4", :group => [:development, :test] +gem "rake-compiler", ">=0.4.1", :group => [:development, :test] +gem "minitest", "~>4.7", :group => [:development, :test] +gem "hoe", "~>3.14", :group => [:development, :test] +gem "hoe-debugging", "~>1.2", :group => [:development, :test] +gem "hoe-doofus", "~>1.0", :group => [:development, :test] +gem "hoe-git", "~>1.6", :group => [:development, :test] +gem "hoe-gemspec", "~>1.0", :group => [:development, :test] +gem "hoe-bundler", "~>1.2", :group => [:development, :test] + +# vim: syntax=ruby diff --git a/Rakefile b/Rakefile index dac6c621..fa75d377 100644 --- a/Rakefile +++ b/Rakefile @@ -5,7 +5,7 @@ require 'hoe' gem 'rake-compiler', '>= 0.4.1' -Hoe.plugin :debugging, :doofus, :git, :isolate, :gemspec +Hoe.plugin :debugging, :doofus, :git, :gemspec, :bundler $: << '.' # instead of require_relative for 1.8 compatibility def java? @@ -23,9 +23,17 @@ HOE = Hoe.spec 'racc' do self.history_file = 'ChangeLog' self.readme_file = 'README.rdoc' + dependency 'rake', '~> 10.4', :developer dependency 'rake-compiler', '>= 0.4.1', :developer dependency 'minitest', '~> 4.7', :developer # stick to stdlib's version + dependency 'hoe', '~> 3.14', :developer + dependency 'hoe-debugging', '~> 1.2', :developer + dependency 'hoe-doofus', '~> 1.0', :developer + dependency 'hoe-git', '~> 1.6', :developer + dependency 'hoe-gemspec', '~> 1.0', :developer + dependency 'hoe-bundler', '~> 1.2', :developer + if java? self.spec_extras[:platform] = 'java' else From b00c8de50de965ca333e2830372c28399632394a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 4 Nov 2015 09:33:39 +0200 Subject: [PATCH 054/619] Racc's test suite is friendly to `bundle exec` Previously, if you ran the tests with `bundle exec rake test`, it would try to run each test of the `racc` command using `bundle `, rather than `bundle exec `. --- test/helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 616c4fb3..bd0fc5af 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -77,7 +77,11 @@ def racc arg def ruby arg Dir.chdir(TEST_DIR) do Tempfile.open 'test' do |io| - cmd = "#{ENV['_'] || Gem.ruby} -I #{INC} #{arg} 2>#{io.path}" + executable = ENV['_'] || Gem.ruby + if File.basename(executable) == 'bundle' + executable = executable.dup << ' exec ruby' + end + cmd = "#{executable} -I #{INC} #{arg} 2>#{io.path}" result = system(cmd) assert(result, io.read) end From 3ff9e39c13a982240fb8606eca17792553dc4ce3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 4 Nov 2015 06:04:22 +0200 Subject: [PATCH 055/619] Update .travis.yml to use Bundler (and run the tests on more platforms) --- .travis.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 442c46d1..bc19ba67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,19 @@ --- -after_script: -- rake travis:after -t -before_script: -- gem install hoe-travis --no-rdoc --no-ri -- rake travis:before -t +sudo: false +cache: bundler language: ruby -notifications: - email: rvm: -- 1.8.7 -- 1.9.3 -- 2.0.0 -- ruby-head -script: rake travis + - 1.8.7 + - 1.9.3 + - 2.0.0 + - 2.1 + - 2.2 + - ruby-head matrix: allow_failures: - rvm: ruby-head +before_install: gem update --remote bundler +install: + - bundle install --retry 3 +script: + - bundle exec rake test From 2b3b9a7649e1245843a5881fa67d9fe53e6fa61f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 14:54:24 +0200 Subject: [PATCH 056/619] Make generated action and goto tables identical on Ruby 2.1/2.2 In git commit a8994b16, Nobuyoshi Nakada made MRI use qsort_r as its underlying sorting implementation on platforms which have it. This change of sort function means that in cases where an array has equal sort keys, the sort order will usually be different between 2.1 and 2.2. StateTransitionTableGenerator uses Array#sort! to order entries which are being inserted into one of the generated tables. Many entries have equal sort keys, so the difference in sort order means the generated tables are not identical between 2.1 and 2.2. Therefore, add an extra sort key as a "tie-breaker", so the sort order is completely deterministic regardless of the underlying sorting function. This will help Racc to generate completely identical parser code, regardless of the Ruby interpreter being used. --- lib/racc/statetransitiontable.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 4c5f4311..9545259f 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -229,9 +229,16 @@ def set_table(entries, dummy, tbl, chk, ptr) map = '-' * 10240 # sort long to short - entries.sort! {|a,b| b[0].size <=> a[0].size } + # we want a stable sort, so that the output will not be dependent on + # the sorting algorithm used by the underlying Ruby implementation + entries.each_with_index.map { |a, i| a.unshift(i) } + entries.sort! do |a, b| + comp = (b[1].size <=> a[1].size) + comp = (a[0] <=> b[0]) if comp == 0 + comp + end - entries.each do |arr, chkval, expr, min, ptri| + entries.each do |_, arr, chkval, expr, min, ptri| if upper + arr.size > map.size map << '-' * (arr.size + 1024) end From 5ae8e0775854f6cd8b02e1903b7cf3594d49e5ee Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 06:08:39 +0200 Subject: [PATCH 057/619] Show original grammar file filename in header of generated parser The code which generates the header of a Racc parser contains: line %Q[# This file is automatically generated by Racc #{Racc::Version}] line %Q[# from Racc grammar file "#{@params.filename}".] "from Racc grammar file #{@params.filename}"... looks like the author wanted the source file name to appear, doesn't it? Unfortunately, nothing ever sets @params.filename! So each and every Racc parser which exists out there says in the header: # from Racc grammar file "" At long last, this problem is now fixed! --- lib/racc/grammarfileparser.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 7b690eb2..36a33369 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -152,9 +152,10 @@ module Racc class GrammarFileParser # reopen class Result - def initialize(grammar) + def initialize(grammar, filename) @grammar = grammar @params = ParserFileGenerator::Params.new + @params.filename = filename end attr_reader :grammar @@ -179,9 +180,11 @@ def parse(src, filename = '-', lineno = 1) @scanner = GrammarFileScanner.new(src, @filename) @scanner.debug = @yydebug @grammar = Grammar.new - @result = Result.new(@grammar) + @result = Result.new(@grammar, @filename) + @embedded_action_seq = 0 yyparse @scanner, :yylex + parse_user_code @result.grammar.init @result From aac7c4142a566c5dea38ec1091e10a2c1c09bddf Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 4 Nov 2015 13:47:43 +0200 Subject: [PATCH 058/619] Avoid warning about use of (obsolete) MiniTest::Test::TestCase It is now called Minitest::Test. --- Gemfile | 2 +- Rakefile | 2 +- test/helper.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 64fd9e12..c92202b2 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ source "https://rubygems.org/" gem "rdoc", "~>4.0", :group => [:development, :test] gem "rake", "~>10.4", :group => [:development, :test] gem "rake-compiler", ">=0.4.1", :group => [:development, :test] -gem "minitest", "~>4.7", :group => [:development, :test] +gem "minitest", "~>5.8", :group => [:development, :test] gem "hoe", "~>3.14", :group => [:development, :test] gem "hoe-debugging", "~>1.2", :group => [:development, :test] gem "hoe-doofus", "~>1.0", :group => [:development, :test] diff --git a/Rakefile b/Rakefile index fa75d377..f6dcb99e 100644 --- a/Rakefile +++ b/Rakefile @@ -25,7 +25,7 @@ HOE = Hoe.spec 'racc' do dependency 'rake', '~> 10.4', :developer dependency 'rake-compiler', '>= 0.4.1', :developer - dependency 'minitest', '~> 4.7', :developer # stick to stdlib's version + dependency 'minitest', '~> 5.8', :developer dependency 'hoe', '~> 3.14', :developer dependency 'hoe-debugging', '~> 1.2', :developer diff --git a/test/helper.rb b/test/helper.rb index bd0fc5af..5b63f732 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -5,7 +5,7 @@ require 'tempfile' module Racc - class TestCase < MiniTest::Unit::TestCase + class TestCase < Minitest::Test PROJECT_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..')) TEST_DIR = File.join(PROJECT_DIR, 'test') From 8abfc83764d3dace2cf4df09a78630ec0db18d49 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 4 Nov 2015 13:52:11 +0200 Subject: [PATCH 059/619] Use String#to_sym rather than String#intern Racc has its own `Sym` class, and uses an `intern` method to convert a Ruby symbol into a Racc `Sym`. Using `String#intern` to convert strings into Ruby symbols is confusing because of the extreme similarity between method names. Use `#to_sym` instead. --- lib/racc/grammar.rb | 8 ++++---- lib/racc/grammarfileparser.rb | 4 ++-- lib/racc/parser.rb | 2 +- lib/racc/statetransitiontable.rb | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 0539ada4..d0aa33aa 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -277,7 +277,7 @@ def null(&block) end def action(&block) - id = "@#{@seqs["action"] += 1}".intern + id = "@#{@seqs["action"] += 1}".to_sym _delayed_add Rule.new(@grammar.intern(id), [], UserAction.proc(block)) id end @@ -340,7 +340,7 @@ def _defmetasyntax(type, id, action, &block) end def _regist(target_name) - target = target_name.intern + target = target_name.to_sym unless _added?(@grammar.intern(target)) yield(target).each_rule do |rule| rule.target = @grammar.intern(target) @@ -351,9 +351,9 @@ def _regist(target_name) end def _wrap(target_name, sym, block) - target = target_name.intern + target = target_name.to_sym _delayed_add Rule.new(@grammar.intern(target), - [@grammar.intern(sym.intern)], + [@grammar.intern(sym.to_sym)], UserAction.proc(block)) target end diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 36a33369..554922e3 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -248,7 +248,7 @@ def add_rule(target, list, sprec) end def embedded_action(act) - sym = @grammar.intern("@#{@embedded_action_seq += 1}".intern, true) + sym = @grammar.intern("@#{@embedded_action_seq += 1}".to_sym, true) @grammar.add Rule.new(sym, [], act) sym end @@ -340,7 +340,7 @@ def yylex0 elsif /\A\/\*/ =~ @line skip_comment elsif s = reads(/\A[a-zA-Z_]\w*/) - yield [atom_symbol(s), s.intern] + yield [atom_symbol(s), s.to_sym] elsif s = reads(/\A\d+/) yield [:DIGIT, s.to_i] elsif ch = reads(/\A./) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index a09327e7..ed7d9916 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -121,7 +121,7 @@ class ParseError < StandardError; end # It's yyparse() of yacc, and Racc::Parser#next_token is yylex(). # This method must returns an array like [TOKENSYMBOL, ITS_VALUE]. # EOF is [false, false]. -# (TOKENSYMBOL is a Ruby symbol (taken from String#intern) by default. +# (TOKENSYMBOL is a Ruby symbol (taken from String#to_sym) by default. # If you want to change this, see the grammar reference. # # Racc::Parser#yyparse is little complicated, but useful. diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 9545259f..c8dd9c8f 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -93,7 +93,7 @@ def reduce_table(grammar) t.push rule.target.ident t.push(if rule.action.empty? # and @params.omit_action_call? then :_reduce_none - else "_reduce_#{idx}".intern + else "_reduce_#{idx}".to_sym end) end t From 61c8c82683886e0981f4212f37cf46511dffeedb Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 22:14:42 +0200 Subject: [PATCH 060/619] Add a few comments (many more to go) --- lib/racc/grammar.rb | 34 ++++++++++++++++++++++++++-------- lib/racc/state.rb | 8 +++----- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index d0aa33aa..8f20a947 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -201,6 +201,17 @@ def Grammar.define(&block) env.grammar end + # Implements `Grammar.define` DSL + # Methods are DSL 'keywords' which can be used in a `Grammar.define` block + # + # Key method is `#seq`, which creates a `Rule` (effectively, RHS of a rule in a BNF grammar) + # (`Rule` objects can be combined using `#|`, similar to how alternative derivations for a + # non-terminal are separated by | in a BNF grammar) + # + # The other key method is `#method_missing`, which is used to register rules like so: + # + # self.nonterminal_name = seq(:token, :another_token) | seq(:something_else) + # class DefinitionEnv def initialize @grammar = Grammar.new @@ -225,6 +236,8 @@ def precedence_table(&block) @grammar.end_precedence_declaration env.reverse end + # Intercept calls to `self.non_terminal = ...`, and use them to register + # a new rule def method_missing(mid, *args, &block) unless mid.to_s[-1,1] == '=' super # raises NoMethodError @@ -268,10 +281,12 @@ def flush_delayed @delayed.clear end + # Basic method for creating a new `Rule`. def seq(*list, &block) Rule.new(nil, list.map {|x| _intern(x) }, UserAction.proc(block)) end + # Create a null `Rule` (one with an empty RHS) def null(&block) seq(&block) end @@ -284,12 +299,16 @@ def action(&block) alias _ action + # Create a `Rule` which can either be null (like an empty RHS in a BNF grammar), + # in which case the action will return `default`, or which can match a single + # `sym` token. def option(sym, default = nil, &block) _defmetasyntax("option", _intern(sym), block) {|target| seq() { default } | seq(sym) } end + # Create a `Rule` which matches 0 or more `sym` tokens in a row. def many(sym, &block) _defmetasyntax("many", _intern(sym), block) {|target| seq() { [] }\ @@ -297,6 +316,7 @@ def many(sym, &block) } end + # Create a `Rule` which matches 1 or more `sym` tokens in a row. def many1(sym, &block) _defmetasyntax("many1", _intern(sym), block) {|target| seq(sym) {|x| [x] }\ @@ -603,9 +623,9 @@ def check_symbols_useless(s) class Rule def initialize(target, syms, act) - @target = target - @symbols = syms - @action = act + @target = target # LHS of rule (may be `nil` if not yet known) + @symbols = syms # RHS of rule + @action = act # run this code when reducing @alternatives = [] @ident = nil @@ -800,11 +820,9 @@ def name attr_reader :lineno end - - # - # A set of rule and position in it's RHS. - # Note that the number of pointers is more than rule's RHS array, - # because pointer points right edge of the final symbol when reducing. + # A set of rules and positions in their RHS. + # Note that the number of pointers is more than the rule's RHS array, + # because pointer points to the right edge of the final symbol when reducing. # class LocationPointer diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 37dd9562..1d9311de 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -781,8 +781,7 @@ def inspect end end - - # LALR item. A set of rule and its lookahead tokens. + # LALR item. A set of rules and its lookahead tokens. class Item def initialize(rule, la) @rule = rule @@ -804,9 +803,8 @@ def each_la(tbl) end end - - # The table of LALR actions. Actions are either of - # Shift, Reduce, Accept and Error. + # The table of LALR actions. Actions are either + # Shift, Reduce, Accept, or Error. class ActionTable def initialize(rt, st) From 6f0133a9269c194f4e1d8476618f22e9f9cf5996 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 22:54:26 +0200 Subject: [PATCH 061/619] Remove useless ISet class It was nothing but a Hash with integer keys. I don't think we will lose any performance from ditching it. --- Manifest.txt | 1 - lib/racc/grammar.rb | 9 ++--- lib/racc/iset.rb | 91 --------------------------------------------- lib/racc/state.rb | 22 ++++------- 4 files changed, 11 insertions(+), 112 deletions(-) delete mode 100644 lib/racc/iset.rb diff --git a/Manifest.txt b/Manifest.txt index d77dfcad..0827cb3e 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -23,7 +23,6 @@ lib/racc/exception.rb lib/racc/grammar.rb lib/racc/grammarfileparser.rb lib/racc/info.rb -lib/racc/iset.rb lib/racc/logfilegenerator.rb lib/racc/parser-text.rb lib/racc/parser.rb diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 8f20a947..700065e7 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -10,7 +10,6 @@ # require 'racc/compat' -require 'racc/iset' require 'racc/sourcetext' require 'racc/logfilegenerator' require 'racc/exception' @@ -514,17 +513,17 @@ def compute_locate # Sym#expand def compute_expand(t) puts "expand> #{t.to_s}" if @debug_symbol - t.expand = _compute_expand(t, ISet.new, []) + t.expand = _compute_expand(t, {}, []) puts "expand< #{t.to_s}: #{t.expand.to_s}" if @debug_symbol end def _compute_expand(t, set, lock) if tmp = t.expand - set.update tmp - return set + return set.update(tmp) end + tok = nil - set.update_a t.heads + t.heads.each { |ptr| set[ptr.ident] = ptr } t.heads.each do |ptr| tok = ptr.dereference if tok and tok.nonterminal? diff --git a/lib/racc/iset.rb b/lib/racc/iset.rb deleted file mode 100644 index 31aa4331..00000000 --- a/lib/racc/iset.rb +++ /dev/null @@ -1,91 +0,0 @@ -# -# $Id$ -# -# Copyright (c) 1999-2006 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of the GNU LGPL, see the file "COPYING". -# - -module Racc - - # An "indexed" set. All items must respond to :ident. - class ISet - - def initialize(a = []) - @set = a - end - - attr_reader :set - - def add(i) - @set[i.ident] = i - end - - def [](key) - @set[key.ident] - end - - def []=(key, val) - @set[key.ident] = val - end - - alias include? [] - alias key? [] - - def update(other) - s = @set - o = other.set - o.each_index do |idx| - if t = o[idx] - s[idx] = t - end - end - end - - def update_a(a) - s = @set - a.each {|i| s[i.ident] = i } - end - - def delete(key) - i = @set[key.ident] - @set[key.ident] = nil - i - end - - def each(&block) - @set.compact.each(&block) - end - - def to_a - @set.compact - end - - def to_s - "[#{@set.compact.join(' ')}]" - end - - alias inspect to_s - - def size - @set.nitems - end - - def empty? - @set.nitems == 0 - end - - def clear - @set.clear - end - - def dup - ISet.new(@set.dup) - end - - end # class ISet - -end # module Racc diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 1d9311de..49686616 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -9,7 +9,6 @@ # For details of the GNU LGPL, see the file "COPYING". # -require 'racc/iset' require 'racc/statetransitiontable' require 'racc/exception' require 'forwardable' @@ -124,16 +123,16 @@ def compute_nfa def generate_states(state) puts "dstate: #{state}" if @d_state - table = {} + table = Hash.new { |h,k| h[k] = {} } state.closure.each do |ptr| if sym = ptr.dereference - addsym table, sym, ptr.next + table[sym][ptr.next.ident] = ptr.next end end table.each do |sym, core| puts "dstate: sym=#{sym} ncore=#{core}" if @d_state - dest = core_to_state(core.to_a) + dest = core_to_state(core.values) state.goto_table[sym] = dest id = sym.nonterminal?() ? @gotos.size : nil g = Goto.new(id, sym, state, dest) @@ -150,13 +149,6 @@ def generate_states(state) end end - def addsym(table, sym, ptr) - unless s = table[sym] - table[sym] = s = ISet.new - end - s.add ptr - end - def core_to_state(core) # # convert CORE to a State object. @@ -653,14 +645,14 @@ def ==(oth) alias eql? == def make_closure(core) - set = ISet.new + set = {} core.each do |ptr| - set.add ptr + set[ptr.ident] = ptr if t = ptr.dereference and t.nonterminal? - set.update_a t.expand + t.expand.values.each { |i| set[i.ident] = i } end end - set.to_a + set.sort_by { |k, v| k }.map { |k, v| v } end def check_la(la_rules) From 1a3429837675e3ae36791902769dbe1bce2a0c79 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 22:55:38 +0200 Subject: [PATCH 062/619] Remove useless compat.rb It adds #__send and #__send! to Object, which aren't even used anywhere. It also adds #map! to Array... I don't know which version of Ruby added Array#map!, but I am sure it is pretty ancient... --- Manifest.txt | 1 - lib/racc.rb | 1 - lib/racc/compat.rb | 32 -------------------------------- lib/racc/grammar.rb | 1 - lib/racc/grammarfileparser.rb | 1 - lib/racc/parserfilegenerator.rb | 1 - 6 files changed, 37 deletions(-) delete mode 100644 lib/racc/compat.rb diff --git a/Manifest.txt b/Manifest.txt index 0827cb3e..a4ced01e 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -17,7 +17,6 @@ ext/racc/com/headius/racc/Cparse.java fastcache/extconf.rb fastcache/fastcache.c lib/racc.rb -lib/racc/compat.rb lib/racc/debugflags.rb lib/racc/exception.rb lib/racc/grammar.rb diff --git a/lib/racc.rb b/lib/racc.rb index f6e4ac03..71f2a960 100644 --- a/lib/racc.rb +++ b/lib/racc.rb @@ -1,4 +1,3 @@ -require 'racc/compat' require 'racc/debugflags' require 'racc/grammar' require 'racc/state' diff --git a/lib/racc/compat.rb b/lib/racc/compat.rb deleted file mode 100644 index 14fa1118..00000000 --- a/lib/racc/compat.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# $Id$ -# -# Copyright (c) 1999-2006 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of the GNU LGPL, see the file "COPYING". -# - -unless Object.method_defined?(:__send) - class Object - alias __send __send__ - end -end - -unless Object.method_defined?(:__send!) - class Object - alias __send! __send__ - end -end - -unless Array.method_defined?(:map!) - class Array - if Array.method_defined?(:collect!) - alias map! collect! - else - alias map! filter - end - end -end diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 700065e7..9e061157 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -9,7 +9,6 @@ # For details of the GNU LGPL, see the file "COPYING". # -require 'racc/compat' require 'racc/sourcetext' require 'racc/logfilegenerator' require 'racc/exception' diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 554922e3..1fd01157 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -10,7 +10,6 @@ # require 'racc' -require 'racc/compat' require 'racc/grammar' require 'racc/parserfilegenerator' require 'racc/sourcetext' diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index b6003f47..f4de91e9 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -10,7 +10,6 @@ # require 'enumerator' -require 'racc/compat' require 'racc/sourcetext' require 'racc/parser-text' require 'rbconfig' From f9fc7f8ea6aa9a0b47f3e986ebd3dda7c10f79c1 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 23:02:01 +0200 Subject: [PATCH 063/619] NotImplementedError was added in Ruby 1.8.6 As such, we don't need to worry that it might not be there. --- lib/racc/parser.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index ed7d9916..5378c39a 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -9,14 +9,9 @@ # As a special exception, when this code is copied by Racc # into a Racc output file, you may use that output file # without restriction. -# require 'racc/info' -unless defined?(NotImplementedError) - NotImplementedError = NotImplementError # :nodoc: -end - module Racc class ParseError < StandardError; end end From 7416d6b4ffef77e3ac7f40f6bece3dd24f7b1699 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 23:04:20 +0200 Subject: [PATCH 064/619] Remove redundant ; in while loops --- lib/racc/parser.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 5378c39a..21725b0a 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -311,7 +311,6 @@ def _racc_do_parse_rb(arg, in_debug) act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) - ; end end } @@ -336,7 +335,6 @@ def _racc_yyparse_rb(recv, mid, arg, c_debug) catch(:racc_end_parse) { until i = action_pointer[@racc_state[-1]] while act = _racc_evalact(action_default[@racc_state[-1]], arg) - ; end end recv.__send__(mid) do |tok, val| @@ -355,7 +353,6 @@ def _racc_yyparse_rb(recv, mid, arg, c_debug) act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) - ; end while !(i = action_pointer[@racc_state[-1]]) || @@ -368,7 +365,6 @@ def _racc_yyparse_rb(recv, mid, arg, c_debug) act = action_default[@racc_state[-1]] end while act = _racc_evalact(act, arg) - ; end end end From a8c893d2bcc8fc1785ee4c70b39584de6d6d435f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 23:07:41 +0200 Subject: [PATCH 065/619] Remove useless 'funcall' alias for __send__ --- lib/racc/statetransitiontable.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index c8dd9c8f..5a58eb92 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -11,12 +11,6 @@ require 'racc/parser' -unless Object.method_defined?(:funcall) - class Object - alias funcall __send__ - end -end - module Racc StateTransitionTable = Struct.new(:action_table, @@ -306,9 +300,9 @@ def define_actions(c) c.module_eval "def _reduce_none(vals, vstack) vals[0] end" @grammar.each do |rule| if rule.action.empty? - c.funcall(:alias_method, "_reduce_#{rule.ident}", :_reduce_none) + c.__send__(:alias_method, "_reduce_#{rule.ident}", :_reduce_none) else - c.funcall(:define_method, "_racc_action_#{rule.ident}", &rule.action.proc) + c.__send__(:define_method, "_racc_action_#{rule.ident}", &rule.action.proc) c.module_eval(<<-End, __FILE__, __LINE__ + 1) def _reduce_#{rule.ident}(vals, vstack) _racc_action_#{rule.ident}(*vals) From be942f52974b399b54d21d1357433518bf5ccfe3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 23:10:31 +0200 Subject: [PATCH 066/619] Slight simplification to StateTransitionTableGenerator#addent --- lib/racc/statetransitiontable.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 5a58eb92..2c6a9654 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -166,15 +166,9 @@ def gen_goto_tables(t, grammar) end def addent(all, arr, chkval, ptr) - max = arr.size - min = nil - arr.each_with_index do |item, idx| - if item - min ||= idx - end - end + min = arr.index { |item| item } ptr.push(-7777) # mark - arr = arr[min...max] + arr = arr.drop(min) all.push [arr, chkval, mkmapexp(arr), min, ptr.size - 1] end From c4a82863162d8bb8f016acbb4dda7d1507ac33c5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 22:16:28 +0200 Subject: [PATCH 067/619] Make State#rrconf and State#srconf more concise --- lib/racc/state.rb | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 49686616..2866c911 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -606,8 +606,8 @@ def initialize(ident, core) @ritems = nil @action = {} @defact = nil - @rrconf = nil - @srconf = nil + @rrconf = Hash.new { |h,k| h[k] = [] } + @srconf = Hash.new { |h,k| h[k] = [] } @closure = make_closure(@core) end @@ -717,33 +717,19 @@ def la=(la) end def rr_conflict(high, low, ctok) - c = RRconflict.new(@ident, high, low, ctok) - - @rrconf ||= {} - if a = @rrconf[ctok] - a.push c - else - @rrconf[ctok] = [c] - end + @rrconf[ctok] << RRconflict.new(@ident, high, low, ctok) end def sr_conflict(shift, reduce) - c = SRconflict.new(@ident, shift, reduce) - - @srconf ||= {} - if a = @srconf[shift] - a.push c - else - @srconf[shift] = [c] - end + @srconf[shift] << SRconflict.new(@ident, shift, reduce) end def n_srconflicts - @srconf ? @srconf.size : 0 + @srconf.size end def n_rrconflicts - @rrconf ? @rrconf.size : 0 + @rrconf.size end end # class State From e4755cb8aa747d129cb3493023567557529ba463 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 23:12:09 +0200 Subject: [PATCH 068/619] Simplify code in StateTransitionTable#token_value_table --- lib/racc/statetransitiontable.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 2c6a9654..38b377c1 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -50,11 +50,7 @@ def parser_class end def token_value_table - h = {} - token_table().each do |sym, i| - h[sym.value] = i - end - h + Hash[token_table.map { |sym, i| [sym.value, i]}] end end From 7fe3a2bd80a2e48a43596cc89d2ff054f94c9550 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 5 Nov 2015 23:13:10 +0200 Subject: [PATCH 069/619] Simplify code in StateTransitionTableGenerator#token_table --- lib/racc/statetransitiontable.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 38b377c1..11b03bef 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -90,11 +90,7 @@ def reduce_table(grammar) end def token_table(grammar) - h = {} - grammar.symboltable.terminals.each do |t| - h[t] = t.ident - end - h + Hash[grammar.symboltable.terminals.map { |t| [t, t.ident]}] end def gen_action_tables(t, states) From c2700c460a0b1fdabd3736c9ecf2628e82f4fe45 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 05:54:31 +0200 Subject: [PATCH 070/619] Compute Sym#reduce? on demand instead of caching --- lib/racc/grammar.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 9e061157..f7ce35ea 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -823,13 +823,12 @@ def name # because pointer points to the right edge of the final symbol when reducing. # class LocationPointer - def initialize(rule, i, sym) @rule = rule @index = i - @symbol = sym + @symbol = sym # Sym which immediately follows this position in RHS + # or nil if it points to the end of RHS @ident = @rule.hash + i - @reduce = sym.nil? end attr_reader :rule @@ -840,12 +839,10 @@ def initialize(rule, i, sym) attr_reader :ident alias hash ident - attr_reader :reduce - alias reduce? reduce def to_s sprintf('(%d,%d %s)', - @rule.ident, @index, (reduce?() ? '#' : @symbol.to_s)) + @rule.ident, @index, (reduce? ? '#' : @symbol.to_s)) end alias inspect to_s @@ -870,6 +867,10 @@ def before(len) @rule.ptrs[@index - len] or ptr_bug! end + def reduce? + @symbol.nil? + end + private def ptr_bug! From c4980125b523fbea33a8219ec2d743766c9912e4 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 08:19:10 +0200 Subject: [PATCH 071/619] Simplified code in States#core_to_state --- lib/racc/state.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 2866c911..40a9d404 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -111,11 +111,9 @@ def compute_nfa # add state 0 core_to_state [ @grammar[0].ptrs[0] ] # generate LALR states - cur = 0 @gotos = [] - while cur < @states.size - generate_states @states[cur] # state is added here - cur += 1 + @states.each do |state| + generate_states(state) end @actions.init end From 69ec24241fdc873908379f47e2567894aabf1b92 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 08:43:26 +0200 Subject: [PATCH 072/619] These $ comments drive me crazy --- bin/racc | 3 --- bin/racc2y | 3 --- bin/y2racc | 3 --- ext/racc/extconf.rb | 2 -- lib/racc/debugflags.rb | 4 ---- lib/racc/exception.rb | 4 ---- lib/racc/grammar.rb | 4 ---- lib/racc/grammarfileparser.rb | 4 ---- lib/racc/info.rb | 4 ---- lib/racc/logfilegenerator.rb | 4 ---- lib/racc/parser.rb | 3 --- lib/racc/parserfilegenerator.rb | 4 ---- lib/racc/sourcetext.rb | 5 ----- lib/racc/state.rb | 4 ---- lib/racc/statetransitiontable.rb | 4 ---- sample/array.y | 2 -- sample/array2.y | 2 -- sample/calc-ja.y | 4 ---- sample/calc.y | 4 ---- sample/conflict.y | 2 -- sample/hash.y | 2 -- sample/lalr.y | 2 -- sample/lists.y | 2 -- sample/syntax.y | 2 -- sample/yyerr.y | 2 -- 25 files changed, 79 deletions(-) diff --git a/bin/racc b/bin/racc index d8764bce..4ff89742 100755 --- a/bin/racc +++ b/bin/racc @@ -1,14 +1,11 @@ #!/usr/bin/env ruby # -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of LGPL, see the file "COPYING". -# require 'racc/static' require 'optparse' diff --git a/bin/racc2y b/bin/racc2y index f88d73ed..1a136dee 100755 --- a/bin/racc2y +++ b/bin/racc2y @@ -1,14 +1,11 @@ #!/usr/local/bin/ruby # -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is feee software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the LGPL, see the file "COPYING". -# require 'racc/grammarfileparser' require 'racc/info' diff --git a/bin/y2racc b/bin/y2racc index 38bd3669..e44a075a 100755 --- a/bin/y2racc +++ b/bin/y2racc @@ -1,14 +1,11 @@ #!/usr/local/bin/ruby # -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public Lisence version 2.1. # For details of the GNU LGPL, see the file "COPYING". -# require 'racc/info' require 'strscan' diff --git a/ext/racc/extconf.rb b/ext/racc/extconf.rb index 1e30abed..4ddf47b7 100644 --- a/ext/racc/extconf.rb +++ b/ext/racc/extconf.rb @@ -1,5 +1,3 @@ -# $Id$ - require 'mkmf' have_func('rb_ary_subseq') diff --git a/lib/racc/debugflags.rb b/lib/racc/debugflags.rb index 74ff4369..aa061da5 100644 --- a/lib/racc/debugflags.rb +++ b/lib/racc/debugflags.rb @@ -1,13 +1,9 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of LGPL, see the file "COPYING". -# module Racc diff --git a/lib/racc/exception.rb b/lib/racc/exception.rb index a26517cc..38a4aefe 100644 --- a/lib/racc/exception.rb +++ b/lib/racc/exception.rb @@ -1,13 +1,9 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". -# module Racc class Error < StandardError; end diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index f7ce35ea..fd80ea77 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -1,13 +1,9 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". -# require 'racc/sourcetext' require 'racc/logfilegenerator' diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 1fd01157..d92baaf0 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -1,13 +1,9 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". -# require 'racc' require 'racc/grammar' diff --git a/lib/racc/info.rb b/lib/racc/info.rb index 22e49836..b6d94e70 100644 --- a/lib/racc/info.rb +++ b/lib/racc/info.rb @@ -1,13 +1,9 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". -# module Racc VERSION = '1.4.13' diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 5e9d0a01..41e9a4d5 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -1,13 +1,9 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". -# module Racc diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 21725b0a..e1b1946a 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -1,6 +1,3 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index f4de91e9..0c435f04 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -1,13 +1,9 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". -# require 'enumerator' require 'racc/sourcetext' diff --git a/lib/racc/sourcetext.rb b/lib/racc/sourcetext.rb index 3b2d89d9..47910479 100644 --- a/lib/racc/sourcetext.rb +++ b/lib/racc/sourcetext.rb @@ -1,16 +1,11 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of LGPL, see the file "COPYING". -# module Racc - class SourceText def initialize(text, filename, lineno) @text = text diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 40a9d404..0147c53a 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -1,13 +1,9 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". -# require 'racc/statetransitiontable' require 'racc/exception' diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 11b03bef..f7c47934 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -1,13 +1,9 @@ -# -# $Id$ -# # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. # You can distribute/modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of LGPL, see the file "COPYING". -# require 'racc/parser' diff --git a/sample/array.y b/sample/array.y index ce0590e6..2c365315 100644 --- a/sample/array.y +++ b/sample/array.y @@ -1,5 +1,3 @@ -# $Id$ -# # convert Array-like string into Ruby's Array. class ArrayParser diff --git a/sample/array2.y b/sample/array2.y index c3bdd6f0..7932007b 100644 --- a/sample/array2.y +++ b/sample/array2.y @@ -1,5 +1,3 @@ -# $Id$ -# # Converting Array-like string into Ruby's Array, version 2. # This grammar uses no_result_var. diff --git a/sample/calc-ja.y b/sample/calc-ja.y index d6e3eed8..57399f43 100644 --- a/sample/calc-ja.y +++ b/sample/calc-ja.y @@ -1,5 +1,3 @@ -# $Id$ -# # A simple calculator, version 2. # This file contains Japanese characters (encoding=EUC-JP). @@ -23,8 +21,6 @@ rule | NUMBER end ----- header -# $Id$ ---- inner def evaluate(str) diff --git a/sample/calc.y b/sample/calc.y index 8d9c581d..655aecd8 100644 --- a/sample/calc.y +++ b/sample/calc.y @@ -1,5 +1,3 @@ -# $Id$ -# # Very simple calculater. class Calcp @@ -21,8 +19,6 @@ rule | NUMBER end ----- header -# $Id$ ---- inner def parse(str) diff --git a/sample/conflict.y b/sample/conflict.y index d14d8c40..04f6058c 100644 --- a/sample/conflict.y +++ b/sample/conflict.y @@ -1,5 +1,3 @@ -# $Id$ -# # Example of conflicted grammar. # This grammar contains 1 Shift/Reduce conflict and 1 Reduce/Reduce conflict. diff --git a/sample/hash.y b/sample/hash.y index bec25d61..56db0f4c 100644 --- a/sample/hash.y +++ b/sample/hash.y @@ -1,5 +1,3 @@ -# $Id$ -# # Converting Hash-like string into Ruby's Hash. class HashParser diff --git a/sample/lalr.y b/sample/lalr.y index 4bfa9455..6279c845 100644 --- a/sample/lalr.y +++ b/sample/lalr.y @@ -1,5 +1,3 @@ -# $Id$ -# # This is LALR grammar, and not LL/SLR. class A diff --git a/sample/lists.y b/sample/lists.y index 6ec9066c..208a0b00 100644 --- a/sample/lists.y +++ b/sample/lists.y @@ -1,5 +1,3 @@ -# $Id$ -# # Rules for verious lists. # This file is just an example, you cannot compile this file. diff --git a/sample/syntax.y b/sample/syntax.y index 62939548..9f93ae41 100644 --- a/sample/syntax.y +++ b/sample/syntax.y @@ -1,5 +1,3 @@ -# $Id$ -# # Racc syntax checker. This grammar file generates # invalid ruby program, you cannot run this parser. diff --git a/sample/yyerr.y b/sample/yyerr.y index 2d46d966..2edf145d 100644 --- a/sample/yyerr.y +++ b/sample/yyerr.y @@ -1,5 +1,3 @@ -# $Id$ -# # Test grammar file for error handling. class A From f7b290cae6223d3caa1b138b4ba607a6a0fcd234 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 08:44:01 +0200 Subject: [PATCH 073/619] Minor grammar fix --- bin/racc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/racc b/bin/racc index 4ff89742..2d0321ac 100755 --- a/bin/racc +++ b/bin/racc @@ -128,7 +128,7 @@ def main exit 1 end if ARGV.size > 1 - $stderr.puts 'too many input' + $stderr.puts 'too many inputs' exit 1 end input = ARGV[0] From b1989499750d9f60ae98010699b25e0bd2b2f0ff Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 05:34:47 +0200 Subject: [PATCH 074/619] Spelling/grammar corrections in RDoc --- rdoc/en/grammar.en.rdoc | 78 ++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index 58aa5e5a..ca31dd29 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -4,28 +4,28 @@ == Class Block and User Code Block -There are two blocks on toplevel. +There are two blocks at the top level. One is the 'class' block and the other is the 'user' block. You MUST write the 'user' block after the 'class' block. The 'class' block can also be called the 'rule' block or the 'class definition' block. -== Comment +== Comments -You can insert comment about all places. +You can insert comments anywhere you like. There are two possible comment styles, -Ruby style (#.....) and C style (/*......*/) . + Ruby style (#.....) and C style (/*......*/) . == Class Block The class block is formed like this: -- class CLASS_NAME - [precedance table] - [token declearations] + [precedence table] + [token declarations] [expected number of S/R conflict] [options] - [semantic value convertion] + [semantic value conversion] [start rule] rule GRAMMARS @@ -34,9 +34,9 @@ CLASS_NAME is the name of the parser class to be defined. This is used as the name of the parser class in the generated file which is written in Ruby. -If CLASS_NAME includes '::', Racc outputs module clause. +If CLASS_NAME includes '::', Racc outputs a module clause. For example, when CLASS_NAME is "M::C", -the parser class is defined as follows in the generated file. +the parser class is defined as follows in the generated file: -- module M class C @@ -48,8 +48,10 @@ end == Grammar Block -The grammar block is where you write grammars understood by the generated parser. -It is written between the reserved words 'rule' and 'end' and its syntax is as follows: +The grammar block is where you write the grammar rules understood by the +generated parser. +It is written between the reserved words 'rule' and 'end' and its syntax is +as follows: -- (token): (token) (token) (token).... (action) @@ -59,23 +61,26 @@ It is written between the reserved words 'rule' and 'end' and its syntax is as f -- (action) is executed when its (token)s are found. -(action) is basically a ruby code block which is surrounded by braces: +(action) is basically a Ruby code block which is surrounded by braces: -- { print val[0] puts val[1] } -- -However, you cannot use some of Ruby syntax inside action, -for instance, you cannot use '%' string, here document, or '%r' regexp. +However, there is some Ruby syntax which cannot be used inside an action block. +for instance, you cannot use '%' strings, here documents, or '%r' regexps. The return value of an action is the left-hand side (lhs) value of the rule. This is $$ in yacc. -The way to return the value depends on the option you set. + +The way to return the value depends on the options you set. By default, the 'result' local variable (this is val[0] by default) represents the left-hand side value, thus the value stored in the 'result' variable -by the end of the action would be the left-hand side value. -Otherwise, you can explicitly 'return' the value desired. -Alternatively, when you set no_result_var option via options, -the lhs value is the value of the last statement in the action block (same as +is the left-hand side value. + +Alternatively, you can explicitly 'return' the value desired. + +Or, when you set the 'no_result_var' option via options, +the LHS value is the value of the last statement in the action block (same as Ruby methods). In any case, you can omit actions. @@ -98,7 +103,7 @@ rule -- You can use the following special local variables inside actions. -The symbols surrounded by parentheses are how they are represented when using +The symbols shown in parentheses are how they are represented when using yacc. * result ($$) @@ -112,10 +117,10 @@ This is generated every time, so you can freely modify or discard it. * _values (...$-2,$-1,$0) -A stack of values used by the Racc. +A stack of values used by Racc. DO NOT MODIFY the _values stack unless you know what you are doing. -There is also a special form of action which is called embedded action. +There is also a special form of action which is called an embedded action. An embedded action can be written wherever you like in the middle of the token sequence. Here is an example of the embedded action: @@ -145,7 +150,7 @@ nonterm : /* empty rule */ { result = 1 } == Operator Precedence When there's a shift/reduce conflict on a token, -sometimes the conflict can be eliminated by defining operator precedences. +sometimes the conflict can be eliminated by defining operator precedence. A famous example of such a case are arithmetic operators and if-else syntax. This doesn't mean setting operator precedence is necessary to resolve conflicts @@ -249,9 +254,9 @@ This feature is similar to %token in yacc but slightly different. With racc, this is not required and even if the tokens are declared, it does not cause errors but only warnings. -Please notice that you can write the declaration spanning over multiple lines. +Please notice that you can write declarations spanning over multiple lines. -Racc does have the reserved words but they are only considered as reserved +Racc does have reserved words but they are only considered as reserved words when they are written at the beginning of the line. Therefore, for instance, prechigh can also be used as a symbol. However, for an abyssal reason, no matter what we do, we cannot use 'end' as a symbol. @@ -309,10 +314,10 @@ When you declared the expected number of shift/reduce conflicts as 3 like the above code, the number of conflicts should exactly be 3. If it was not 3 (even it was zero), racc would print the warning message. -Besides, you could not suppress the warning message for reduce/reduce conflict. +Besides, you cannot suppress warning messages for reduce/reduce conflicts. -== Converting Token Symbol +== Converting Token Symbols Token symbols abide by the following rules: @@ -338,7 +343,7 @@ However, when interpreting the above definition it becomes PlusClass. We can use all ruby values as token symbol values except 'false' and 'nil'. -If you want to use String as token symbol, special care is required. +If you want to use a String as a token symbol, special care is required. For example: -- convert @@ -356,18 +361,19 @@ The start rule is a way to write it explicitly. -- start real_target -- -This is usually omitted and in that case, -the start rule is the first rule in the file. -This statement will not be used forever, I think. +This is usually omitted and in that case, the start rule is the first rule in +the file. +This statement will never be used, I think. In yacc, this is '%start'. == User Code Block -"User Code Block" is a Ruby source code which is copied to the output file. -There are three user code blocks, "header" "inner" and "footer". +A "User Code Block" is a block of Ruby source code which is copied to the +output file. +There can be up to three user code blocks: "header", "inner" and "footer". -The code written in "header" block is copied to just before the parser class +The code written in the "header" block is copied to just before the parser class definition. "inner" is for inside (and the beginning of) the class definition, and "footer" is after the definition. @@ -383,6 +389,6 @@ Format of user code is like this: : : -- -If four '-' exist on line head, Racc treats this case as the beginning of a +If there are four '-' at line head, Racc treats this case as the beginning of a user code block. -A name of user code must be one word. +The name of a user code block must be one word. From aa4b8bd68f031e8788c5c023835127bc1c077707 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 05:43:50 +0200 Subject: [PATCH 075/619] Drop support for MRI 1.8.7 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bc19ba67..21379cf3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ sudo: false cache: bundler language: ruby rvm: - - 1.8.7 - 1.9.3 - 2.0.0 - 2.1 From d44fe3f2e3e8cbbc85e8ba2c146b53a9879d936f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 05:44:16 +0200 Subject: [PATCH 076/619] Simplify code in Grammar#n_useless_nonterminals and Grammar#n_useless_rules --- lib/racc/grammar.rb | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index fd80ea77..1ca3ce81 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -79,14 +79,7 @@ def useless_nonterminal_exist? end def n_useless_nonterminals - @n_useless_nonterminals ||= - begin - n = 0 - @symboltable.each_nonterminal do |sym| - n += 1 if sym.useless? - end - n - end + @n_useless_nonterminals ||= @symboltable.nonterminals.count(&:useless?) end def useless_rule_exist? @@ -94,14 +87,7 @@ def useless_rule_exist? end def n_useless_rules - @n_useless_rules ||= - begin - n = 0 - each do |r| - n += 1 if r.useless? - end - n - end + @n_useless_rules ||= @rules.count(&:useless?) end def nfa From 01513416919a3f18b26eb1d34ff341a1feb8eb70 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 05:49:07 +0200 Subject: [PATCH 077/619] Drop support for 'driver' and 'prepare' blocks Guess when 'prepare' was originally renamed to 'header', and 'driver' to 'footer'?? November 27, 1999. (Look at commit 94280c6c.) Don't you think that there is a limit to how long we should keep backwards compatibility??? --- lib/racc/grammarfileparser.rb | 2 -- test/assets/normal.y | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index d92baaf0..e327f585 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -269,10 +269,8 @@ def parse_user_code USER_CODE_LABELS = { 'header' => :header, - 'prepare' => :header, # obsolete 'inner' => :inner, 'footer' => :footer, - 'driver' => :footer # obsolete } def canonical_label(src) diff --git a/test/assets/normal.y b/test/assets/normal.y index 96ae352c..87f9f0a3 100644 --- a/test/assets/normal.y +++ b/test/assets/normal.y @@ -22,6 +22,4 @@ rule /* end */ end ----- driver - - # driver is old name +---- footer From f19876f9d9d61ee7eb7caf31489d29d545f586e8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 07:55:17 +0200 Subject: [PATCH 078/619] Simplify code in GrammarFileParser#on_error --- lib/racc/grammarfileparser.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index e327f585..fc08e323 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -191,15 +191,8 @@ def next_token @scanner.scan end - def on_error(tok, val, _values) - if val.respond_to?(:id2name) - v = val.id2name - elsif val.kind_of?(String) - v = val - else - v = val.inspect - end - raise CompileError, "#{location()}: unexpected token '#{v}'" + def on_error(_tok, val, _values) + fail CompileError, "#{location}: unexpected token #{val.inspect}" end def location From cf648170cee224a5c283f36fe35a3eb26aa06772 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 08:13:56 +0200 Subject: [PATCH 079/619] Add comment in GrammarFileScanner#next_line --- lib/racc/grammarfileparser.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index fc08e323..49ade8bf 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -353,6 +353,7 @@ def next_line @lineno += 1 @line = @lines[@lineno] if not @line or /\A----/ =~ @line + # class block is over, user code blocks follow @epilogue = @lines.join("\n") @lines.clear @line = nil From e7a0f2ce3ac2e490b9f21e9b60e1dd1c6179b651 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 10:01:05 +0200 Subject: [PATCH 080/619] Simplify code in SymbolTable#intern --- lib/racc/grammar.rb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 1ca3ce81..88314247 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -883,20 +883,17 @@ def [](id) end def intern(val, dummy = false) - @cache[val] ||= - begin - sym = Sym.new(val, dummy) - @symbols.push sym - sym - end + @cache[val] ||= begin + Sym.new(val, dummy).tap { |sym| @symbols.push(sym) } + end end attr_reader :symbols alias to_a symbols def delete(sym) - @symbols.delete sym - @cache.delete sym.value + @symbols.delete(sym) + @cache.delete(sym.value) end attr_reader :nt_base From 44a378d91256ce0882f585a6509e772e8a07d7be Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 11:16:12 +0200 Subject: [PATCH 081/619] Added comment on Sym#serialized --- lib/racc/grammar.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 88314247..0c5c69eb 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -1055,6 +1055,9 @@ def serialize @serialized end + # some tokens are written one way in the grammar, but the actual value + # expected from the lexer is different + # you can set this up using a 'convert' block attr_writer :serialized attr_accessor :precedence From a0963e7c154d9560fe01580ae009a00748cc7e31 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 15:04:52 +0200 Subject: [PATCH 082/619] Remove useless !act check --- lib/racc/state.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 0147c53a..b7c79eee 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -571,7 +571,7 @@ def pack(state) def check_useless used = [] @actions.each_reduce do |act| - if not act or act.refn == 0 + if act.refn == 0 act.rule.useless = true else t = act.rule.target From c9805b1953d075e078a7798a303f4a98a0d8cdc3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 15:05:49 +0200 Subject: [PATCH 083/619] More comments in grammar.rb --- lib/racc/grammar.rb | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 0c5c69eb..30291cd3 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -406,8 +406,9 @@ def nonassoc(*syms) def init return if @closed @closed = true - @start ||= @rules.map {|r| r.target }.detect {|sym| not sym.dummy? } - raise CompileError, 'no rule in input' if @rules.empty? + # if 'start' nonterminal was not explicitly set, just take the first one + @start ||= @rules.map(&:target).detect { |sym| !sym.dummy? } + fail CompileError, 'no rule in input' if @rules.empty? add_start_rule @rules.freeze fix_ident @@ -867,11 +868,19 @@ class SymbolTable include Enumerable def initialize - @symbols = [] # :: [Racc::Sym] - @cache = {} # :: {(String|Symbol) => Racc::Sym} - @dummy = intern(:$start, true) - @anchor = intern(false, true) # Symbol ID = 0 - @error = intern(:error, false) # Symbol ID = 1 + @symbols = [] # all Syms used in a grammar + @cache = {} # map of String/Symbol name -> Sym + + # 'dummy' and 'anchor' are used to make sure the parser runs over ALL the + # input tokens before concluding that the parse was successful + # an 'anchor' token is appended to the end of the token stream, and a + # 'dummy rule' is automatically added which reduces [start node, anchor] + # to 'dummy' + # only if the parse ends in 'dummy', is it considered successful + + @dummy = intern(:$start, true) + @anchor = intern(false, true) # Symbol ID = 0 + @error = intern(:error, false) # Symbol ID = 1 end attr_reader :dummy @@ -994,12 +1003,12 @@ def initialize(value, dummyp) raise ArgumentError, "unknown symbol value: #{value.class}" end - @heads = [] - @locate = [] - @snull = nil - @null = nil - @expand = nil - @useless = nil + @heads = [] # RHS of rules which can reduce to this Sym + @locate = [] # all rules which have this Sym on their RHS + @snull = nil + @null = nil + @expand = nil + @useless = nil end class << self From 1f888c50a7a8ae35696d0ae51c3c000e84f28758 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 19:25:24 +0200 Subject: [PATCH 084/619] Simplify OrMark, Prec, UserAction classes --- lib/racc/grammar.rb | 32 ++++++-------------------------- lib/racc/grammarfileparser.rb | 2 +- 2 files changed, 7 insertions(+), 27 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 30291cd3..656b1e07 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -761,44 +761,24 @@ def empty? not @proc and not @source end - def name + def to_s "{action type=#{@source || @proc || 'nil'}}" end - alias inspect name + alias inspect to_s end - - class OrMark - def initialize(lineno) - @lineno = lineno - end - - def name + class OrMark < Struct.new(:lineno) + def to_s '|' end - - alias inspect name - - attr_reader :lineno end - - class Prec - def initialize(symbol, lineno) - @symbol = symbol - @lineno = lineno - end - - def name + class Prec < Struct.new(:symbol, :lineno) + def to_s "=#{@symbol}" end - - alias inspect name - - attr_reader :symbol - attr_reader :lineno end # A set of rules and positions in their RHS. diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 49ade8bf..188c69f8 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -204,7 +204,7 @@ def add_rule_block(list) target = list.shift case target when OrMark, UserAction, Prec - raise CompileError, "#{target.lineno}: unexpected symbol #{target.name}" + raise CompileError, "#{target.lineno}: unexpected symbol #{target}" end curr = [] list.each do |i| From f00612b3c910cabe6e0bf2da4488fc59a6c8caa0 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 22:18:00 +0200 Subject: [PATCH 085/619] Add test/regress.rb script This script tries compiling the same .y file with 2 different revisions of Racc, and ensures that the output is exactly the same. Later, I may develop this into a full-fledged test suite, which will perform the same type of regression test on several dozen files and summarize the results. --- test/regress.rb | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 test/regress.rb diff --git a/test/regress.rb b/test/regress.rb new file mode 100755 index 00000000..367847fa --- /dev/null +++ b/test/regress.rb @@ -0,0 +1,46 @@ +#!/usr/bin/env ruby + +require 'fileutils' +require 'tempfile' +require 'rainbow' + +filename, commit1, commit2 = *ARGV + +def croak(message) + $stderr.puts(message) + exit 1 +end + +def trysystem(command) + croak("Command failed: #{command}") unless system(command) +end + +croak("No such file: #{filename}") if !File.exist?(filename) + +if commit1.nil? || commit1.empty? || commit2.nil? || commit2.empty? + croak("Usage: regress.rb ") +end + +racc = File.join(File.dirname(__FILE__), '..', 'bin', 'racc') +racc_lib = File.join(File.dirname(__FILE__), '..', 'lib') +temp1 = Tempfile.new('racc-regress') +temp2 = Tempfile.new('racc-regress') + +trysystem("git checkout #{commit1}") +trysystem("ruby -I#{racc_lib} #{racc} -o #{temp1.path} #{filename}") + +trysystem("git checkout #{commit2}") +trysystem("ruby -I#{racc_lib} #{racc} -o #{temp2.path} #{filename}") + +success = system("diff #{temp1.path} #{temp2.path}") + +temp1.unlink +temp2.unlink + +if success + puts Rainbow("No change for #{filename}").green + exit 0 +else + puts Rainbow("Output changed for #{filename}").red + exit 1 +end From afe8d1cabfafa2f81e7460749ef924473bd9f992 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 05:48:36 +0200 Subject: [PATCH 086/619] Add .y files from parser gem to ./test/assets The author of these files, Peter Zotov, kindly gave permission for them to be used as Racc test cases. The original copyright notice and licensing terms have been prepended to each file. Soon these will become part of our 'regression' test suite. --- Manifest.txt | 6 + test/assets/macruby.y | 2197 ++++++++++++++++++++++++++++++++++ test/assets/ruby18.y | 1943 ++++++++++++++++++++++++++++++ test/assets/ruby19.y | 2174 +++++++++++++++++++++++++++++++++ test/assets/ruby20.y | 2350 ++++++++++++++++++++++++++++++++++++ test/assets/ruby21.y | 2359 ++++++++++++++++++++++++++++++++++++ test/assets/ruby22.y | 2381 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 14 + 8 files changed, 13424 insertions(+) create mode 100644 test/assets/macruby.y create mode 100644 test/assets/ruby18.y create mode 100644 test/assets/ruby19.y create mode 100644 test/assets/ruby20.y create mode 100644 test/assets/ruby21.y create mode 100644 test/assets/ruby22.y diff --git a/Manifest.txt b/Manifest.txt index a4ced01e..64eaa414 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -63,6 +63,7 @@ test/assets/expect.y test/assets/firstline.y test/assets/ichk.y test/assets/intp.y +test/assets/macruby.y test/assets/mailp.y test/assets/newsyn.y test/assets/noend.y @@ -75,6 +76,11 @@ test/assets/opt.y test/assets/percent.y test/assets/recv.y test/assets/rrconf.y +test/assets/ruby18.y +test/assets/ruby19.y +test/assets/ruby20.y +test/assets/ruby21.y +test/assets/ruby22.y test/assets/scan.y test/assets/syntax.y test/assets/unterm.y diff --git a/test/assets/macruby.y b/test/assets/macruby.y new file mode 100644 index 00000000..5ede0083 --- /dev/null +++ b/test/assets/macruby.y @@ -0,0 +1,2197 @@ +# Copyright (c) 2013 Peter Zotov +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::MacRuby + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END + tSTRING tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG + tCHARACTER + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt + { + result = [ val[0] ] + } + | stmts terms stmt + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL arg_value + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | mlhs tEQL mrhs + { + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | expr + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call tDOT operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + *val[3]) + } + | block_call tCOLON2 operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + *val[3]) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + command: operation command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + *val[1]) + } + | operation command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + *val[1]) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + *val[3]) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + *val[3]) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + *val[3]) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + *val[3]) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + *val[1]) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + *val[1]) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[2], [ val[3] ] + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[1], [ val[2] ] + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM tINTEGER tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + } + | tUMINUS_NUM tFLOAT tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + | arg tEH arg opt_nl tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[4], val[5]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | args tCOMMA assocs tCOMMA args opt_block_arg + { + val[2][-1] = @builder.objc_varargs(val[2][-1], val[4]) + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[5]) + } + | block_arg + { + result = [ val[0] ] + } + + call_args2: arg_value tCOMMA args opt_block_arg + { + result = [ val[0], *val[2].concat(val[3]) ] + } + | arg_value tCOMMA block_arg + { + result = [ val[0], val[2] ] + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + } + | arg_value tCOMMA assocs opt_block_arg + { + result = [ val[0], + @builder.associate(nil, val[2], nil), + *val[3] ] + } + | arg_value tCOMMA args tCOMMA assocs opt_block_arg + { + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + concat(val[5]) ] + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + open_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + open_args: call_args + { + result = [ nil, val[0], nil ] + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + rparen + { + result = [ val[0], [], val[2] ] + } + | tLPAREN_ARG call_args2 + { + @lexer.state = :expr_endarg + } + rparen + { + result = [ val[0], val[1], val[3] ] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | tCOMMA + { + result = [] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN bodystmt kEND + { + result = @builder.begin_keyword(val[0], val[1], val[2]) + } + | tLPAREN_ARG expr + { + @lexer.state = :expr_endarg + } + rparen + { + result = @builder.begin(val[0], val[1], val[3]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | operation brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + result = val[0]. + push(@builder.objc_restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + result = val[0]. + push(@builder.objc_restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.objc_restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.objc_restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + result = [ @builder.objc_restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + result = [ @builder.objc_restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.objc_restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.objc_restarg(val[0]), + *val[2] ] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: # nothing + { + result = [] + } + | tSEMI bv_decls + { + result = val[1] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist lambda_body + { + result = [ val[1], val[2] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl rparen + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call tCOLON2 operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + + method_call: operation paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tRCURLY + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tUMINUS_NUM tINTEGER =tLOWEST + { + result = @builder.negate(val[0], + @builder.integer(val[1])) + } + | tUMINUS_NUM tFLOAT =tLOWEST + { + result = @builder.negate(val[0], + @builder.float(val[1])) + } + + variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT expr_value term + { + result = [ val[0], val[1] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | f_args term + { + result = @builder.args(nil, val[0], nil) + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_arg + { + result = [ val[0] ] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tIDENTIFIER tASSOC tIDENTIFIER + { + @static_env.declare val[2][0] + + result = @builder.objc_kwarg(val[0], val[1], val[2]) + } + | tLABEL tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.objc_kwarg(val[0], nil, val[1]) + } + + f_arg_item: f_norm_arg + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: tIDENTIFIER tEQL primary_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 19 # closest released match: v1_9_0_2 + end + + def default_encoding + Encoding::BINARY + end diff --git a/test/assets/ruby18.y b/test/assets/ruby18.y new file mode 100644 index 00000000..eceb2532 --- /dev/null +++ b/test/assets/ruby18.y @@ -0,0 +1,1943 @@ +# Copyright (c) 2013 Peter Zotov +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby18 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tNTH_REF + tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT tREGEXP_END tUPLUS + tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ tGEQ tLEQ tANDOP + tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF tASET tLSHFT tRSHFT + tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN tLPAREN2 tRPAREN tLPAREN_ARG + tLBRACK tLBRACK2 tRBRACK tLBRACE tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 + tTILDE tPERCENT tDIVIDE tPLUS tMINUS tLT tGT tPIPE tBANG tCARET + tLCURLY tRCURLY tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG + tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END tSTRING + tSYMBOL tREGEXP_OPT tNL tEH tCOLON tCOMMA tSPACE tSEMI + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: compstmt + { + result = val[0] + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt + { + result = [ val[0] ] + } + | error stmt + { + result = [ val[1] ] + } + | stmts terms stmt + { + result = val[0] << val[2] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klBEGIN tLCURLY compstmt tRCURLY + { + if in_def? + diagnostic :error, :begin_in_method, nil, val[0] + end + + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 aref_args tRBRACK tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL arg_value + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | mlhs tEQL mrhs + { + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | expr + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT expr + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + block_command: block_call + | block_call tDOT operation2 command_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call tCOLON2 operation2 command_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_var compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + command: operation command_args =tLOWEST + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | operation command_args cmd_brace_block + { + lparen_t, args, rparen_t = val[1] + method_call = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + } + | kSUPER command_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kYIELD command_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:yield, val[0], + lparen_t, args, rparen_t) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_entry tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_entry: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_entry tRPAREN + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + { + result = val[0] + } + | mlhs_head mlhs_item + { + result = val[0] << val[1] + } + | mlhs_head tSTAR mlhs_node + { + result = val[0] << @builder.splat(val[1], val[2]) + } + | mlhs_head tSTAR + { + result = val[0] << @builder.splat(val[1]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_entry tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_node: variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tGT | tGEQ | tLT | tLEQ | tLSHFT + | tRSHFT | tPLUS | tMINUS | tSTAR2 | tSTAR | tDIVIDE + | tPERCENT | tPOW | tTILDE | tUPLUS | tUMINUS | tAREF + | tASET | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | klBEGIN | klEND | kALIAS | kAND + | kBEGIN | kBREAK | kCASE | kCLASS | kDEF | kDEFINED + | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE + | kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF + | kSUPER | kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD + | kIF | kUNLESS | kWHILE | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 aref_args tRBRACK tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[2], [ val[3] ] + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[1], [ val[2] ] + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM tINTEGER tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + } + | tUMINUS_NUM tFLOAT tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + | arg tEH arg tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[3], val[4]) + } + | primary + + arg_value: arg + + aref_args: none + | command opt_nl + { + result = [ val[0] ] + } + | args trailer + { + result = val[0] + } + | args tCOMMA tSTAR arg opt_nl + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + | tSTAR arg opt_nl + { + result = [ @builder.splat(val[0], val[1]) ] + } + + paren_args: tLPAREN2 none tRPAREN + { + result = [ val[0], [], val[2] ] + } + | tLPAREN2 call_args opt_nl tRPAREN + { + result = [ val[0], val[1], val[3] ] + } + | tLPAREN2 block_call opt_nl tRPAREN + { + result = [ val[0], [ val[1] ], val[3] ] + } + | tLPAREN2 args tCOMMA block_call opt_nl tRPAREN + { + result = [ val[0], val[1] << val[3], val[5] ] + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | args tCOMMA tSTAR arg_value opt_block_arg + { + result = val[0].concat( + [ @builder.splat(val[2], val[3]), + *val[4] ]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + } + | assocs tCOMMA tSTAR arg_value opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + @builder.splat(val[2], val[3]), + *val[4] ] + } + | args tCOMMA assocs opt_block_arg + { + result = val[0].concat( + [ @builder.associate(nil, val[2], nil), + *val[3] ]) + } + | args tCOMMA assocs tCOMMA tSTAR arg opt_block_arg + { + result = val[0].concat( + [ @builder.associate(nil, val[2], nil), + @builder.splat(val[4], val[5]), + *val[6] ]) + } + | tSTAR arg_value opt_block_arg + { + result = [ @builder.splat(val[0], val[1]), + *val[2] ] + } + | block_arg + { + result = [ val[0] ] + } + + call_args2: arg_value tCOMMA args opt_block_arg + { + result = [ val[0], *val[2].concat(val[3]) ] + } + | arg_value tCOMMA block_arg + { + result = [ val[0], val[2] ] + } + | arg_value tCOMMA tSTAR arg_value opt_block_arg + { + result = [ val[0], + @builder.splat(val[2], val[3]), + *val[4] ] + } + | arg_value tCOMMA args tCOMMA tSTAR arg_value opt_block_arg + { + result = [ val[0], + *val[2]. + push(@builder.splat(val[4], val[5])). + concat(val[6]) ] + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + } + | assocs tCOMMA tSTAR arg_value opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil), + @builder.splat(val[2], val[3]), + *val[4] ] + } + | arg_value tCOMMA assocs opt_block_arg + { + result = [ val[0], + @builder.associate(nil, val[2], nil), + *val[3] ] + } + | arg_value tCOMMA args tCOMMA assocs opt_block_arg + { + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + concat(val[5]) ] + } + | arg_value tCOMMA assocs tCOMMA tSTAR arg_value opt_block_arg + { + result = [ val[0], + @builder.associate(nil, val[2], nil), + @builder.splat(val[4], val[5]), + *val[6] ] + } + | arg_value tCOMMA args tCOMMA assocs tCOMMA tSTAR arg_value opt_block_arg + { + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + push(@builder.splat(val[6], val[7])). + concat(val[8]) ] + } + | tSTAR arg_value opt_block_arg + { + result = [ @builder.splat(val[0], val[1]), + *val[2] ] + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + open_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + open_args: call_args + { + result = [ nil, val[0], nil ] + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + tRPAREN + { + result = [ val[0], [], val[2] ] + } + | tLPAREN_ARG call_args2 + { + @lexer.state = :expr_endarg + } + tRPAREN + { + result = [ val[0], val[1], val[3] ] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN bodystmt kEND + { + result = @builder.begin_keyword(val[0], val[1], val[2]) + } + | tLPAREN_ARG expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + result = @builder.begin(val[0], val[1], val[4]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args tRPAREN + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 tRPAREN + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr tRPAREN + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | operation brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + when_bodies = val[3][0..-2] + else_t, else_body = val[3][-1] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + when_bodies = val[2][0..-2] + else_t, else_body = val[2][-1] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kCASE opt_terms kELSE compstmt kEND + { + result = @builder.case(val[0], nil, + [], val[2], val[3], + val[4]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | tCOLON + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | tCOLON + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + block_par: mlhs_item + { + result = [ @builder.arg_expr(val[0]) ] + } + | block_par tCOMMA mlhs_item + { + result = val[0] << @builder.arg_expr(val[2]) + } + + block_var: block_par + | block_par tCOMMA + | block_par tCOMMA tAMPER lhs + { + result = val[0]. + push(@builder.blockarg_expr(val[2], val[3])) + } + | block_par tCOMMA tSTAR lhs tCOMMA tAMPER lhs + { + result = val[0]. + push(@builder.restarg_expr(val[2], val[3])). + push(@builder.blockarg_expr(val[5], val[6])) + } + | block_par tCOMMA tSTAR tCOMMA tAMPER lhs + { + result = val[0]. + push(@builder.restarg_expr(val[2])). + push(@builder.blockarg_expr(val[4], val[5])) + } + | block_par tCOMMA tSTAR lhs + { + result = val[0]. + push(@builder.restarg_expr(val[2], val[3])) + } + | block_par tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg_expr(val[2])) + } + | tSTAR lhs tCOMMA tAMPER lhs + { + result = [ @builder.restarg_expr(val[0], val[1]), + @builder.blockarg_expr(val[3], val[4]) ] + } + | tSTAR tCOMMA tAMPER lhs + { + result = [ @builder.restarg_expr(val[0]), + @builder.blockarg_expr(val[2], val[3]) ] + } + | tSTAR lhs + { + result = [ @builder.restarg_expr(val[0], val[1]) ] + } + | tSTAR + { + result = [ @builder.restarg_expr(val[0]) ] + } + | tAMPER lhs + { + result = [ @builder.blockarg_expr(val[0], val[1]) ] + } + ; + + opt_block_var: # nothing + { + result = @builder.args(nil, [], nil) + } + | tPIPE tPIPE + { + result = @builder.args(val[0], [], val[1]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_var tPIPE + { + result = @builder.args(val[0], val[1], val[2], false) + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_var compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call tCOLON2 operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + + method_call: operation paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_var compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_var compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN when_args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + when_args: args + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | # nothing + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG xstring_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tRCURLY + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tUMINUS_NUM tINTEGER =tLOWEST + { + result = @builder.negate(val[0], + @builder.integer(val[1])) + } + | tUMINUS_NUM tFLOAT =tLOWEST + { + result = @builder.negate(val[0], + @builder.float(val[1])) + } + + variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + + var_ref: variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT expr_value term + { + result = [ val[0], val[1] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args opt_nl tRPAREN + { + result = @builder.args(val[0], val[1], val[3]) + + @lexer.state = :expr_beg + } + | f_args term + { + result = @builder.args(nil, val[0], nil) + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + | # nothing + { + result = [] + } + + f_norm_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + | tIDENTIFIER + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + + f_arg: f_norm_arg + { + result = [ val[0] ] + } + | f_arg tCOMMA f_norm_arg + { + result = val[0] << val[2] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr opt_nl tRPAREN + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + { + result = val[0] + } + | args trailer + { + result = @builder.pair_list_18(val[0]) + } + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } + +end + +---- header + +require 'parser' + +---- inner + + def version + 18 + end + + def default_encoding + Encoding::BINARY if defined? Encoding + end diff --git a/test/assets/ruby19.y b/test/assets/ruby19.y new file mode 100644 index 00000000..b405c952 --- /dev/null +++ b/test/assets/ruby19.y @@ -0,0 +1,2174 @@ +# Copyright (c) 2013 Peter Zotov +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby19 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END + tSTRING tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG + tCHARACTER + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt + { + result = [ val[0] ] + } + | stmts terms stmt + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | command_asgn + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL arg_value + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | mlhs tEQL mrhs + { + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | expr + + command_asgn: lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL command_asgn + { + result = @builder.assign(val[0], val[1], val[2]) + } + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call tDOT operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | block_call tCOLON2 operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + command: operation command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + } + | operation command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[2], [ val[3] ] + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + diagnostic :error, :dynamic_const, nil, val[1], [ val[2] ] + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM tINTEGER tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + } + | tUMINUS_NUM tFLOAT tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + | arg tEH arg opt_nl tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[4], val[5]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + | args tCOMMA + | args tCOMMA assocs tCOMMA + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + call_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN bodystmt kEND + { + result = @builder.begin_keyword(val[0], val[1], val[2]) + } + | tLPAREN_ARG + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | operation brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + @static_env.declare val[3][0] + + result = val[0]. + push(@builder.restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + @static_env.declare val[3][0] + + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0]), + *val[2] ] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: # nothing + { + result = [] + } + | tSEMI bv_decls + { + result = val[1] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist lambda_body + { + result = [ val[1], val[2] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl rparen + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call tCOLON2 operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + + method_call: operation paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tRCURLY + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tUMINUS_NUM tINTEGER =tLOWEST + { + result = @builder.negate(val[0], + @builder.integer(val[1])) + } + | tUMINUS_NUM tFLOAT =tLOWEST + { + result = @builder.negate(val[0], + @builder.float(val[1])) + } + + user_variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + +keyword_variable: kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: user_variable + { + result = @builder.accessible(val[0]) + } + | keyword_variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT expr_value term + { + result = [ val[0], val[1] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | f_args term + { + result = @builder.args(nil, val[0], nil) + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_f_block_arg + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_f_block_arg + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_arg + { + result = [ val[0] ] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + + f_arg_item: f_norm_arg + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: tIDENTIFIER tEQL primary_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 19 + end + + def default_encoding + Encoding::BINARY + end diff --git a/test/assets/ruby20.y b/test/assets/ruby20.y new file mode 100644 index 00000000..6e077347 --- /dev/null +++ b/test/assets/ruby20.y @@ -0,0 +1,2350 @@ +# Copyright (c) 2013 Peter Zotov +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby20 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tDSTAR tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DBEG + tSTRING_DVAR tSTRING_END tSTRING_DEND tSTRING tSYMBOL + tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG tCHARACTER + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt_or_begin + { + result = [ val[0] ] + } + | stmts terms stmt_or_begin + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt_or_begin: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + if in_def? + diagnostic :error, :begin_in_method, nil, val[0] + end + + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | command_asgn + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL arg_value + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | mlhs tEQL mrhs + { + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | expr + + command_asgn: lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL command_asgn + { + result = @builder.assign(val[0], val[1], val[2]) + } + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call dot_or_colon operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + fcall: operation + + command: fcall command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + } + | fcall command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tDSTAR | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_fetch(val[0], val[1], val[2])) + result = @builder.op_assign(const, val[3], val[4]) + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_global(val[0], val[1])) + result = @builder.op_assign(const, val[2], val[3]) + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM tINTEGER tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + } + | tUMINUS_NUM tFLOAT tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + | arg tEH arg opt_nl tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[4], val[5]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + | args tCOMMA + | args tCOMMA assocs tCOMMA + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + call_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | symbols + | qsymbols + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + bodystmt kEND + { + @lexer.cmdarg = val[1] + + result = @builder.begin_keyword(val[0], val[2], val[3]) + } + | tLPAREN_ARG + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + result = @builder.begin(val[0], nil, val[3]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | fcall brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + @static_env.declare val[3][0] + + result = val[0]. + push(@builder.restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + @static_env.declare val[3][0] + + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0]), + *val[2] ] + } + + block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_block_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + +opt_block_args_tail: + tCOMMA block_args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_block_args_tail + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | block_args_tail + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: opt_nl + { + result = [] + } + | opt_nl tSEMI bv_decls opt_nl + { + result = val[2] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist lambda_body + { + result = [ val[1], val[2] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl tRPAREN + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call dot_or_colon operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call dot_or_colon operation2 opt_paren_args brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | block_call dot_or_colon operation2 command_args do_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + + method_call: fcall paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + symbols: tSYMBOLS_BEG symbol_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + symbol_list: # nothing + { + result = [] + } + | symbol_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qsymbols: tQSYMBOLS_BEG qsym_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + qsym_list: # nothing + { + result = [] + } + | qsym_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.symbol_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tSTRING_DEND + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tUMINUS_NUM tINTEGER =tLOWEST + { + result = @builder.negate(val[0], + @builder.integer(val[1])) + } + | tUMINUS_NUM tFLOAT =tLOWEST + { + result = @builder.negate(val[0], + @builder.float(val[1])) + } + + user_variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + +keyword_variable: kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: user_variable + { + result = @builder.accessible(val[0]) + } + | keyword_variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT + { + @lexer.state = :expr_value + } + expr_value term + { + result = [ val[0], val[2] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | f_args term + { + result = @builder.args(nil, val[0], nil) + } + + args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_args_tail: tCOMMA args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | args_tail + { + result = val[0] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + + f_arg_item: f_norm_arg + { + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_kw: tLABEL arg_value + { + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = @builder.kwoptarg(val[0], val[1]) + } + + f_block_kw: tLABEL primary_value + { + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = @builder.kwoptarg(val[0], val[1]) + } + + f_block_kwarg: f_block_kw + { + result = [ val[0] ] + } + | f_block_kwarg tCOMMA f_block_kw + { + result = val[0] << val[2] + } + + f_kwarg: f_kw + { + result = [ val[0] ] + } + | f_kwarg tCOMMA f_kw + { + result = val[0] << val[2] + } + + kwrest_mark: tPOW | tDSTAR + + f_kwrest: kwrest_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.kwrestarg(val[0], val[1]) ] + } + | kwrest_mark + { + result = [ @builder.kwrestarg(val[0]) ] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: tIDENTIFIER tEQL primary_value + { + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + | tDSTAR arg_value + { + result = @builder.kwsplat(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 20 + end + + def default_encoding + Encoding::UTF_8 + end diff --git a/test/assets/ruby21.y b/test/assets/ruby21.y new file mode 100644 index 00000000..2ac94afb --- /dev/null +++ b/test/assets/ruby21.y @@ -0,0 +1,2359 @@ +# Copyright (c) 2013 Peter Zotov +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby21 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tDSTAR tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DBEG + tSTRING_DVAR tSTRING_END tSTRING_DEND tSTRING tSYMBOL + tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG tCHARACTER + tRATIONAL tIMAGINARY + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt_or_begin + { + result = [ val[0] ] + } + | stmts terms stmt_or_begin + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt_or_begin: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + diagnostic :error, :begin_in_method, nil, val[0] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | command_asgn + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL mrhs_arg + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | expr + + command_asgn: lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL command_asgn + { + result = @builder.assign(val[0], val[1], val[2]) + } + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call dot_or_colon operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + fcall: operation + + command: fcall command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + } + | fcall command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tDSTAR | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_fetch(val[0], val[1], val[2])) + result = @builder.op_assign(const, val[3], val[4]) + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_global(val[0], val[1])) + result = @builder.op_assign(const, val[2], val[3]) + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM simple_numeric tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + val[1], val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + | arg tEH arg opt_nl tCOLON arg + { + result = @builder.ternary(val[0], val[1], + val[2], val[4], val[5]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + | args tCOMMA + | args tCOMMA assocs tCOMMA + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + call_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs_arg: mrhs + { + result = @builder.array(nil, val[0], nil) + } + | arg_value + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | symbols + | qsymbols + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + bodystmt kEND + { + @lexer.cmdarg = val[1] + + result = @builder.begin_keyword(val[0], val[2], val[3]) + } + | tLPAREN_ARG + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + result = @builder.begin(val[0], nil, val[3]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | fcall brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + result = val[0]. + push(@builder.restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + result = [ @builder.restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0]), + *val[2] ] + } + + block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_block_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + +opt_block_args_tail: + tCOMMA block_args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_block_args_tail + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | block_args_tail + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: opt_nl + { + result = [] + } + | opt_nl tSEMI bv_decls opt_nl + { + result = val[2] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + lambda_body + { + @lexer.cmdarg = val[2] + @lexer.cmdarg.lexpop + + result = [ val[1], val[3] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl tRPAREN + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call dot_or_colon operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call dot_or_colon operation2 opt_paren_args brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | block_call dot_or_colon operation2 command_args do_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + + method_call: fcall paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + symbols: tSYMBOLS_BEG symbol_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + symbol_list: # nothing + { + result = [] + } + | symbol_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qsymbols: tQSYMBOLS_BEG qsym_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + qsym_list: # nothing + { + result = [] + } + | qsym_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.symbol_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tSTRING_DEND + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: simple_numeric + { + result = val[0] + } + | tUMINUS_NUM simple_numeric =tLOWEST + { + result = @builder.negate(val[0], val[1]) + } + + simple_numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tRATIONAL + { + result = @builder.rational(val[0]) + } + | tIMAGINARY + { + result = @builder.complex(val[0]) + } + + user_variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + +keyword_variable: kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: user_variable + { + result = @builder.accessible(val[0]) + } + | keyword_variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT + { + @lexer.state = :expr_value + } + expr_value term + { + result = [ val[0], val[2] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | { + result = @lexer.in_kwarg + @lexer.in_kwarg = true + } + f_args term + { + @lexer.in_kwarg = val[0] + result = @builder.args(nil, val[1], nil) + } + + + args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_args_tail: tCOMMA args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | args_tail + { + result = val[0] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + { + @static_env.declare val[0][0] + + result = val[0] + } + + f_arg_item: f_norm_arg + { + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_label: tLABEL + { + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = val[0] + } + + f_kw: f_label arg_value + { + result = @builder.kwoptarg(val[0], val[1]) + } + | f_label + { + result = @builder.kwarg(val[0]) + } + + f_block_kw: f_label primary_value + { + result = @builder.kwoptarg(val[0], val[1]) + } + | f_label + { + result = @builder.kwarg(val[0]) + } + + f_block_kwarg: f_block_kw + { + result = [ val[0] ] + } + | f_block_kwarg tCOMMA f_block_kw + { + result = val[0] << val[2] + } + + f_kwarg: f_kw + { + result = [ val[0] ] + } + | f_kwarg tCOMMA f_kw + { + result = val[0] << val[2] + } + + kwrest_mark: tPOW | tDSTAR + + f_kwrest: kwrest_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.kwrestarg(val[0], val[1]) ] + } + | kwrest_mark + { + result = [ @builder.kwrestarg(val[0]) ] + } + + f_opt: f_norm_arg tEQL arg_value + { + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: f_norm_arg tEQL primary_value + { + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + | tDSTAR arg_value + { + result = @builder.kwsplat(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 21 + end + + def default_encoding + Encoding::UTF_8 + end diff --git a/test/assets/ruby22.y b/test/assets/ruby22.y new file mode 100644 index 00000000..751c0e86 --- /dev/null +++ b/test/assets/ruby22.y @@ -0,0 +1,2381 @@ +# Copyright (c) 2013 Peter Zotov +# +# Parts of the source are derived from ruby_parser: +# Copyright (c) Ryan Davis, seattle.rb +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Parser::Ruby22 + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ + tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF + tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN + tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE + tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE + tDSTAR tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY + tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG tREGEXP_OPT + tWORDS_BEG tQWORDS_BEG tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DBEG + tSTRING_DVAR tSTRING_END tSTRING_DEND tSTRING tSYMBOL + tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG tCHARACTER + tRATIONAL tIMAGINARY tLABEL_END + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + top_stmts: # nothing + { + result = [] + } + | top_stmt + { + result = [ val[0] ] + } + | top_stmts terms top_stmt + { + result = val[0] << val[2] + } + | error top_stmt + { + result = [ val[1] ] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = @builder.preexe(val[0], val[1], val[2], val[3]) + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + } + + compstmt: stmts opt_terms + { + result = @builder.compstmt(val[0]) + } + + stmts: # nothing + { + result = [] + } + | stmt_or_begin + { + result = [ val[0] ] + } + | stmts terms stmt_or_begin + { + result = val[0] << val[2] + } + | error stmt + { + result = [ val[1] ] + } + + stmt_or_begin: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + diagnostic :error, :begin_in_method, nil, val[0] + } + + stmt: kALIAS fitem + { + @lexer.state = :expr_fname + } + fitem + { + result = @builder.alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + } + | kALIAS tGVAR tBACK_REF + { + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + } + | kALIAS tGVAR tNTH_REF + { + diagnostic :error, :nth_ref_alias, nil, val[2] + } + | kUNDEF undef_list + { + result = @builder.undef_method(val[0], val[1]) + } + | stmt kIF_MOD expr_value + { + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + } + | stmt kUNLESS_MOD expr_value + { + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + } + | stmt kWHILE_MOD expr_value + { + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + } + | stmt kUNTIL_MOD expr_value + { + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + } + | stmt kRESCUE_MOD stmt + { + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + } + | klEND tLCURLY compstmt tRCURLY + { + result = @builder.postexe(val[0], val[1], val[2], val[3]) + } + | command_asgn + | mlhs tEQL command_call + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN command_call + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | backref tOP_ASGN command_call + { + @builder.op_assign(val[0], val[1], val[2]) + } + | lhs tEQL mrhs + { + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + } + | mlhs tEQL mrhs_arg + { + result = @builder.multi_assign(val[0], val[1], val[2]) + } + | expr + + command_asgn: lhs tEQL command_call + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL command_asgn + { + result = @builder.assign(val[0], val[1], val[2]) + } + + expr: command_call + | expr kAND expr + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | expr kOR expr + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kNOT opt_nl expr + { + result = @builder.not_op(val[0], nil, val[2], nil) + } + | tBANG command_call + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | arg + + expr_value: expr + + command_call: command + | block_command + + block_command: block_call + | block_call dot_or_colon operation2 command_args + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + + cmd_brace_block: tLBRACE_ARG + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + fcall: operation + + command: fcall command_args =tLOWEST + { + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + } + | fcall command_args cmd_brace_block + { + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tDOT operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tDOT operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | kSUPER command_args + { + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + } + | kYIELD command_args + { + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + } + | kRETURN call_args + { + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + } + | kBREAK call_args + { + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + } + | kNEXT call_args + { + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + } + + mlhs: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_inner: mlhs_basic + { + result = @builder.multi_lhs(nil, val[0], nil) + } + | tLPAREN mlhs_inner rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + mlhs_basic: mlhs_head + | mlhs_head mlhs_item + { + result = val[0]. + push(val[1]) + } + | mlhs_head tSTAR mlhs_node + { + result = val[0]. + push(@builder.splat(val[1], val[2])) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + } + | mlhs_head tSTAR + { + result = val[0]. + push(@builder.splat(val[1])) + } + | mlhs_head tSTAR tCOMMA mlhs_post + { + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + } + | tSTAR mlhs_node + { + result = [ @builder.splat(val[0], val[1]) ] + } + | tSTAR mlhs_node tCOMMA mlhs_post + { + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.splat(val[0]) ] + } + | tSTAR tCOMMA mlhs_post + { + result = [ @builder.splat(val[0]), + *val[2] ] + } + + mlhs_item: mlhs_node + | tLPAREN mlhs_inner rparen + { + result = @builder.begin(val[0], val[1], val[2]) + } + + mlhs_head: mlhs_item tCOMMA + { + result = [ val[0] ] + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + { + result = [ val[0] ] + } + | mlhs_post tCOMMA mlhs_item + { + result = val[0] << val[2] + } + + mlhs_node: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + } + | primary_value tDOT tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tDOT tCONSTANT + { + result = @builder.attr_asgn(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + } + | tCOLON3 tCONSTANT + { + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + } + | backref + { + result = @builder.assignable(val[0]) + } + + cname: tIDENTIFIER + { + diagnostic :error, :module_name_const, nil, val[0] + } + | tCONSTANT + + cpath: tCOLON3 cname + { + result = @builder.const_global(val[0], val[1]) + } + | cname + { + result = @builder.const(val[0]) + } + | primary_value tCOLON2 cname + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER | tCONSTANT | tFID + | op + | reswords + + fsym: fname + { + result = @builder.symbol(val[0]) + } + | symbol + + fitem: fsym + | dsym + + undef_list: fitem + { + result = [ val[0] ] + } + | undef_list tCOMMA + { + @lexer.state = :expr_fname + } + fitem + { + result = val[0] << val[3] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tDSTAR | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND + | kALIAS | kAND | kBEGIN | kBREAK | kCASE + | kCLASS | kDEF | kDEFINED | kDO | kELSE + | kELSIF | kEND | kENSURE | kFALSE | kFOR + | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN + | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF + | kWHEN | kYIELD | kIF | kUNLESS | kWHILE + | kUNTIL + + arg: lhs tEQL arg + { + result = @builder.assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + } + | var_lhs tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | var_lhs tOP_ASGN arg kRESCUE_MOD arg + { + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + } + | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg + { + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + { + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + } + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_fetch(val[0], val[1], val[2])) + result = @builder.op_assign(const, val[3], val[4]) + } + | tCOLON3 tCONSTANT tOP_ASGN arg + { + const = @builder.const_op_assignable( + @builder.const_global(val[0], val[1])) + result = @builder.op_assign(const, val[2], val[3]) + } + | backref tOP_ASGN arg + { + result = @builder.op_assign(val[0], val[1], val[2]) + } + | arg tDOT2 arg + { + result = @builder.range_inclusive(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = @builder.range_exclusive(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tUMINUS_NUM simple_numeric tPOW arg + { + result = @builder.unary_op(val[0], + @builder.binary_op( + val[1], val[2], val[3])) + } + | tUPLUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | tUMINUS arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tPIPE arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = @builder.match_op(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | tBANG arg + { + result = @builder.not_op(val[0], nil, val[1], nil) + } + | tTILDE arg + { + result = @builder.unary_op(val[0], val[1]) + } + | arg tLSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = @builder.binary_op(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = @builder.logical_op(:and, val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = @builder.logical_op(:or, val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + } + + # Note: MRI eventually came to rely on disambiguation based on + # the lexer state, but it is too contrived with the Ragel lexer, + # so we kept this approach. See ruby/ruby@b0c03f63e5 for + # the initial commit, and ruby/ruby@23352f62a for MRI revert, + # which we decided not to track. + | arg tEH + { + @lexer.push_cond + @lexer.cond.push(true) + } + arg opt_nl tCOLON + { + @lexer.pop_cond + } + arg + { + result = @builder.ternary(val[0], val[1], + val[3], val[5], val[7]) + } + | primary + + arg_value: arg + + aref_args: none + | args trailer + | args tCOMMA assocs trailer + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs trailer + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val + } + + opt_paren_args: # nothing + { + result = [ nil, [], nil ] + } + | paren_args + + opt_call_args: # nothing + { + result = [] + } + | call_args + | args tCOMMA + | args tCOMMA assocs tCOMMA + { + result = val[0] << @builder.associate(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [ @builder.associate(nil, val[0], nil) ] + } + + call_args: command + { + result = [ val[0] ] + } + | args opt_block_arg + { + result = val[0].concat(val[1]) + } + | assocs opt_block_arg + { + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + } + | args tCOMMA assocs opt_block_arg + { + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + } + | block_arg + { + result = [ val[0] ] + } + + command_args: { + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + } + call_args + { + @lexer.cmdarg = val[0] + + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = @builder.block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = [ val[1] ] + } + | # nothing + { + result = [] + } + + args: arg_value + { + result = [ val[0] ] + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + + mrhs_arg: mrhs + { + result = @builder.array(nil, val[0], nil) + } + | arg_value + + mrhs: args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << @builder.splat(val[2], val[3]) + } + | tSTAR arg_value + { + result = [ @builder.splat(val[0], val[1]) ] + } + + primary: literal + | strings + | xstring + | regexp + | words + | qwords + | symbols + | qsymbols + | var_ref + | backref + | tFID + { + result = @builder.call_method(nil, nil, val[0]) + } + | kBEGIN + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + bodystmt kEND + { + @lexer.cmdarg = val[1] + + result = @builder.begin_keyword(val[0], val[2], val[3]) + } + | tLPAREN_ARG + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + expr + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + } + | tLPAREN_ARG + { + @lexer.state = :expr_endarg + } + opt_nl tRPAREN + { + result = @builder.begin(val[0], nil, val[3]) + } + | tLPAREN compstmt tRPAREN + { + result = @builder.begin(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = @builder.const_fetch(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = @builder.const_global(val[0], val[1]) + } + | tLBRACK aref_args tRBRACK + { + result = @builder.array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = @builder.associate(val[0], val[1], val[2]) + } + | kRETURN + { + result = @builder.keyword_cmd(:return, val[0]) + } + | kYIELD tLPAREN2 call_args rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + } + | kYIELD tLPAREN2 rparen + { + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + } + | kYIELD + { + result = @builder.keyword_cmd(:yield, val[0]) + } + | kDEFINED opt_nl tLPAREN2 expr rparen + { + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + } + | kNOT tLPAREN2 expr rparen + { + result = @builder.not_op(val[0], val[1], val[2], val[3]) + } + | kNOT tLPAREN2 rparen + { + result = @builder.not_op(val[0], val[1], nil, val[2]) + } + | fcall brace_block + { + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | method_call + | method_call brace_block + { + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + } + | tLAMBDA lambda + { + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + } + | kIF expr_value then compstmt if_tail kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + } + | kWHILE + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + } + | kUNTIL + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + } + | kCASE expr_value opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + } + | kCASE opt_terms case_body kEND + { + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + } + | kFOR for_var kIN + { + @lexer.cond.push(true) + } + expr_value do + { + @lexer.cond.pop + } + compstmt kEND + { + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + } + | kCLASS cpath superclass + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kCLASS tLSHFT expr term + { + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + } + | kMODULE cpath + { + @static_env.extend_static + @lexer.push_cmdarg + } + bodystmt kEND + { + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + } + | kDEF fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kDEF singleton dot_or_colon + { + @lexer.state = :expr_fname + } + fname + { + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + } + f_arglist bodystmt kEND + { + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + } + | kBREAK + { + result = @builder.keyword_cmd(:break, val[0]) + } + | kNEXT + { + result = @builder.keyword_cmd(:next, val[0]) + } + | kREDO + { + result = @builder.keyword_cmd(:redo, val[0]) + } + | kRETRY + { + result = @builder.keyword_cmd(:retry, val[0]) + } + + primary_value: primary + + then: term + | kTHEN + | term kTHEN + { + result = val[1] + } + + do: term + | kDO_COND + + if_tail: opt_else + | kELSIF expr_value then compstmt if_tail + { + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + } + + opt_else: none + | kELSE compstmt + { + result = val + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_marg_list: f_marg + { + result = [ val[0] ] + } + | f_marg_list tCOMMA f_marg + { + result = val[0] << val[2] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + { + result = val[0]. + push(@builder.restarg(val[2], val[3])) + } + | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + } + | f_marg_list tCOMMA tSTAR + { + result = val[0]. + push(@builder.restarg(val[2])) + } + | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list + { + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + } + | tSTAR f_norm_arg + { + result = [ @builder.restarg(val[0], val[1]) ] + } + | tSTAR f_norm_arg tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + } + | tSTAR + { + result = [ @builder.restarg(val[0]) ] + } + | tSTAR tCOMMA f_marg_list + { + result = [ @builder.restarg(val[0]), + *val[2] ] + } + + block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_block_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + +opt_block_args_tail: + tCOMMA block_args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_block_args_tail + { + result = val[0].concat(val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_block_optarg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_block_optarg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_block_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_block_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | block_args_tail + + opt_block_param: # nothing + { + result = @builder.args(nil, [], nil) + } + | block_param_def + { + @lexer.state = :expr_value + } + + block_param_def: tPIPE opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1], val[2]) + } + | tOROP + { + result = @builder.args(val[0], [], val[0]) + } + | tPIPE block_param opt_bv_decl tPIPE + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + + opt_bv_decl: opt_nl + { + result = [] + } + | opt_nl tSEMI bv_decls opt_nl + { + result = val[2] + } + + bv_decls: bvar + { + result = [ val[0] ] + } + | bv_decls tCOMMA bvar + { + result = val[0] << val[2] + } + + bvar: tIDENTIFIER + { + result = @builder.shadowarg(val[0]) + } + | f_bad_arg + + lambda: { + @static_env.extend_dynamic + } + f_larglist + { + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + } + lambda_body + { + @lexer.cmdarg = val[2] + @lexer.cmdarg.lexpop + + result = [ val[1], val[3] ] + + @static_env.unextend + } + + f_larglist: tLPAREN2 f_args opt_bv_decl tRPAREN + { + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + } + | f_args + { + result = @builder.args(nil, val[0], nil) + } + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = [ val[0], val[1], val[2] ] + } + | kDO_LAMBDA compstmt kEND + { + result = [ val[0], val[1], val[2] ] + } + + do_block: kDO_BLOCK + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + block_call: command do_block + { + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + } + | block_call dot_or_colon operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | block_call dot_or_colon operation2 opt_paren_args brace_block + { + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + | block_call dot_or_colon operation2 command_args do_block + { + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + } + + method_call: fcall paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + } + | primary_value tDOT operation2 opt_paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation2 paren_args + { + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 operation3 + { + result = @builder.call_method(val[0], val[1], val[2]) + } + | primary_value tDOT paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | primary_value tCOLON2 paren_args + { + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + } + | kSUPER paren_args + { + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + } + | kSUPER + { + result = @builder.keyword_cmd(:zsuper, val[0]) + } + | primary_value tLBRACK2 opt_call_args rbracket + { + result = @builder.index(val[0], val[1], val[2], val[3]) + } + + brace_block: tLCURLY + { + @static_env.extend_dynamic + } + opt_block_param compstmt tRCURLY + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + | kDO + { + @static_env.extend_dynamic + } + opt_block_param compstmt kEND + { + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + } + + case_body: kWHEN args then compstmt cases + { + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + } + + cases: opt_else + { + result = [ val[0] ] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + } + | + { + result = [] + } + + exc_list: arg_value + { + result = [ val[0] ] + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = [ val[0], val[1] ] + } + | none + + opt_ensure: kENSURE compstmt + { + result = [ val[0], val[1] ] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = @builder.string_compose(nil, val[0], nil) + } + + string: string1 + { + result = [ val[0] ] + } + | string string1 + { + result = val[0] << val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = @builder.string_compose(val[0], val[1], val[2]) + } + | tSTRING + { + result = @builder.string(val[0]) + } + | tCHARACTER + { + result = @builder.character(val[0]) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = @builder.xstring_compose(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG regexp_contents tSTRING_END tREGEXP_OPT + { + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + } + + words: tWORDS_BEG word_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + word_list: # nothing + { + result = [] + } + | word_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + word: string_content + { + result = [ val[0] ] + } + | word string_content + { + result = val[0] << val[1] + } + + symbols: tSYMBOLS_BEG symbol_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + symbol_list: # nothing + { + result = [] + } + | symbol_list word tSPACE + { + result = val[0] << @builder.word(val[1]) + } + + qwords: tQWORDS_BEG qword_list tSTRING_END + { + result = @builder.words_compose(val[0], val[1], val[2]) + } + + qsymbols: tQSYMBOLS_BEG qsym_list tSTRING_END + { + result = @builder.symbols_compose(val[0], val[1], val[2]) + } + + qword_list: # nothing + { + result = [] + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.string_internal(val[1]) + } + + qsym_list: # nothing + { + result = [] + } + | qsym_list tSTRING_CONTENT tSPACE + { + result = val[0] << @builder.symbol_internal(val[1]) + } + + string_contents: # nothing + { + result = [] + } + | string_contents string_content + { + result = val[0] << val[1] + } + +xstring_contents: # nothing + { + result = [] + } + | xstring_contents string_content + { + result = val[0] << val[1] + } + +regexp_contents: # nothing + { + result = [] + } + | regexp_contents string_content + { + result = val[0] << val[1] + } + + string_content: tSTRING_CONTENT + { + result = @builder.string_internal(val[0]) + } + | tSTRING_DVAR string_dvar + { + result = val[1] + } + | tSTRING_DBEG + { + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + } + compstmt tSTRING_DEND + { + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + } + + string_dvar: tGVAR + { + result = @builder.gvar(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + | backref + + + symbol: tSYMBOL + { + result = @builder.symbol(val[0]) + } + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = @builder.symbol_compose(val[0], val[1], val[2]) + } + + numeric: simple_numeric + { + result = val[0] + } + | tUMINUS_NUM simple_numeric =tLOWEST + { + result = @builder.negate(val[0], val[1]) + } + + simple_numeric: tINTEGER + { + result = @builder.integer(val[0]) + } + | tFLOAT + { + result = @builder.float(val[0]) + } + | tRATIONAL + { + result = @builder.rational(val[0]) + } + | tIMAGINARY + { + result = @builder.complex(val[0]) + } + + user_variable: tIDENTIFIER + { + result = @builder.ident(val[0]) + } + | tIVAR + { + result = @builder.ivar(val[0]) + } + | tGVAR + { + result = @builder.gvar(val[0]) + } + | tCONSTANT + { + result = @builder.const(val[0]) + } + | tCVAR + { + result = @builder.cvar(val[0]) + } + +keyword_variable: kNIL + { + result = @builder.nil(val[0]) + } + | kSELF + { + result = @builder.self(val[0]) + } + | kTRUE + { + result = @builder.true(val[0]) + } + | kFALSE + { + result = @builder.false(val[0]) + } + | k__FILE__ + { + result = @builder.__FILE__(val[0]) + } + | k__LINE__ + { + result = @builder.__LINE__(val[0]) + } + | k__ENCODING__ + { + result = @builder.__ENCODING__(val[0]) + } + + var_ref: user_variable + { + result = @builder.accessible(val[0]) + } + | keyword_variable + { + result = @builder.accessible(val[0]) + } + + var_lhs: user_variable + { + result = @builder.assignable(val[0]) + } + | keyword_variable + { + result = @builder.assignable(val[0]) + } + + backref: tNTH_REF + { + result = @builder.nth_ref(val[0]) + } + | tBACK_REF + { + result = @builder.back_ref(val[0]) + } + + superclass: term + { + result = nil + } + | tLT + { + @lexer.state = :expr_value + } + expr_value term + { + result = [ val[0], val[2] ] + } + | error term + { + yyerrok + result = nil + } + + f_arglist: tLPAREN2 f_args rparen + { + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + } + | { + result = @lexer.in_kwarg + @lexer.in_kwarg = true + } + f_args term + { + @lexer.in_kwarg = val[0] + result = @builder.args(nil, val[1], nil) + } + + args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = val[0].concat(val[2]).concat(val[3]) + } + | f_kwarg opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_kwrest opt_f_block_arg + { + result = val[0].concat(val[1]) + } + | f_block_arg + { + result = [ val[0] ] + } + + opt_args_tail: tCOMMA args_tail + { + result = val[1] + } + | # nothing + { + result = [] + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + } + | f_arg tCOMMA f_optarg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + } + | f_optarg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_optarg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | f_rest_arg opt_args_tail + { + result = val[0]. + concat(val[1]) + } + | f_rest_arg tCOMMA f_arg opt_args_tail + { + result = val[0]. + concat(val[2]). + concat(val[3]) + } + | args_tail + { + result = val[0] + } + | # nothing + { + result = [] + } + + f_bad_arg: tCONSTANT + { + diagnostic :error, :argument_const, nil, val[0] + } + | tIVAR + { + diagnostic :error, :argument_ivar, nil, val[0] + } + | tGVAR + { + diagnostic :error, :argument_gvar, nil, val[0] + } + | tCVAR + { + diagnostic :error, :argument_cvar, nil, val[0] + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + { + @static_env.declare val[0][0] + + result = val[0] + } + + f_arg_asgn: f_norm_arg + { + result = val[0] + } + + f_arg_item: f_arg_asgn + { + result = @builder.arg(val[0]) + } + | tLPAREN f_margs rparen + { + result = @builder.multi_lhs(val[0], val[1], val[2]) + } + + f_arg: f_arg_item + { + result = [ val[0] ] + } + | f_arg tCOMMA f_arg_item + { + result = val[0] << val[2] + } + + f_label: tLABEL + { + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = val[0] + } + + f_kw: f_label arg_value + { + result = @builder.kwoptarg(val[0], val[1]) + } + | f_label + { + result = @builder.kwarg(val[0]) + } + + f_block_kw: f_label primary_value + { + result = @builder.kwoptarg(val[0], val[1]) + } + | f_label + { + result = @builder.kwarg(val[0]) + } + + f_block_kwarg: f_block_kw + { + result = [ val[0] ] + } + | f_block_kwarg tCOMMA f_block_kw + { + result = val[0] << val[2] + } + + f_kwarg: f_kw + { + result = [ val[0] ] + } + | f_kwarg tCOMMA f_kw + { + result = val[0] << val[2] + } + + kwrest_mark: tPOW | tDSTAR + + f_kwrest: kwrest_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.kwrestarg(val[0], val[1]) ] + } + | kwrest_mark + { + result = [ @builder.kwrestarg(val[0]) ] + } + + f_opt: f_arg_asgn tEQL arg_value + { + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_opt: f_arg_asgn tEQL primary_value + { + result = @builder.optarg(val[0], val[1], val[2]) + } + + f_block_optarg: f_block_opt + { + result = [ val[0] ] + } + | f_block_optarg tCOMMA f_block_opt + { + result = val[0] << val[2] + } + + f_optarg: f_opt + { + result = [ val[0] ] + } + | f_optarg tCOMMA f_opt + { + result = val[0] << val[2] + } + + restarg_mark: tSTAR2 | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + } + | restarg_mark + { + result = [ @builder.restarg(val[0]) ] + } + + blkarg_mark: tAMPER2 | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = [ val[1] ] + } + | + { + result = [] + } + + singleton: var_ref + | tLPAREN2 expr rparen + { + result = val[1] + } + + assoc_list: # nothing + { + result = [] + } + | assocs trailer + + assocs: assoc + { + result = [ val[0] ] + } + | assocs tCOMMA assoc + { + result = val[0] << val[2] + } + + assoc: arg_value tASSOC arg_value + { + result = @builder.pair(val[0], val[1], val[2]) + } + | tLABEL arg_value + { + result = @builder.pair_keyword(val[0], val[1]) + } + | tSTRING_BEG string_contents tLABEL_END arg_value + { + result = @builder.pair_quoted(val[0], val[1], val[2], val[3]) + } + | tDSTAR arg_value + { + result = @builder.kwsplat(val[0], val[1]) + } + + operation: tIDENTIFIER | tCONSTANT | tFID + operation2: tIDENTIFIER | tCONSTANT | tFID | op + operation3: tIDENTIFIER | tFID | op + dot_or_colon: tDOT | tCOLON2 + opt_terms: | terms + opt_nl: | tNL + rparen: opt_nl tRPAREN + { + result = val[1] + } + rbracket: opt_nl tRBRACK + { + result = val[1] + } + trailer: | tNL | tCOMMA + + term: tSEMI + { + yyerrok + } + | tNL + + terms: term + | terms tSEMI + + none: # nothing + { + result = nil + } +end + +---- header + +require 'parser' + +Parser.check_for_encoding_support + +---- inner + + def version + 22 + end + + def default_encoding + Encoding::UTF_8 + end diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 22e1bd7f..842a575c 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -151,5 +151,19 @@ def test_unterm_y assert_compile 'unterm.y' } end + + # .y files from `parser` gem + + def test_ruby18 + assert_compile 'ruby18.y' + assert_debugfile 'ruby18.y', [] + assert_exec 'ruby18.y' + end + + def test_ruby22 + assert_compile 'ruby22.y' + assert_debugfile 'ruby22.y', [] + assert_exec 'ruby22.y' + end end end From e566fe3626fd3ad26a7d373370f541b44604595e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 07:53:54 +0200 Subject: [PATCH 087/619] Add regression tests to test suite Add test/regress directory, which has "known-good" compiler output from current `master`. Regression tests try running the compiler on the same inputs, and check if the output is identical to that committed in test/regress. The first regression test cases use the .y files which were donated by the `parser` gem developer. --- Manifest.txt | 2 + test/helper.rb | 42 +- test/regress/README.txt | 7 + test/regress/ruby18 | 7923 ++++++++++++++++++++++++++++++++ test/regress/ruby22 | 9033 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 6 +- 6 files changed, 16995 insertions(+), 18 deletions(-) create mode 100644 test/regress/README.txt create mode 100644 test/regress/ruby18 create mode 100644 test/regress/ruby22 diff --git a/Manifest.txt b/Manifest.txt index 64eaa414..21574bd6 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -89,6 +89,8 @@ test/assets/yyerr.y test/bench.y test/helper.rb test/infini.y +test/regress/ruby18 +test/regress/ruby22 test/scandata/brace test/scandata/gvar test/scandata/normal diff --git a/test/helper.rb b/test/helper.rb index 5b63f732..bfbe8a05 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -12,10 +12,11 @@ class TestCase < Minitest::Test RACC = File.join(PROJECT_DIR, 'bin', 'racc') OUT_DIR = File.join(TEST_DIR, 'out') - TAB_DIR = File.join(TEST_DIR, 'tab') + TAB_DIR = File.join(TEST_DIR, 'tab') # generated parsers go here LOG_DIR = File.join(TEST_DIR, 'log') ERR_DIR = File.join(TEST_DIR, 'err') - ASSET_DIR = File.join(TEST_DIR, 'assets') + ASSET_DIR = File.join(TEST_DIR, 'assets') # test grammars + REGRESS_DIR = File.join(TEST_DIR, 'regress') # known-good generated outputs INC = [ File.join(PROJECT_DIR, 'lib'), @@ -34,21 +35,21 @@ def teardown end end - def assert_compile asset, args = [] - asset = File.basename(asset, '.y') + def assert_compile(asset, args = []) + file = File.basename(asset, '.y') args = ([args].flatten) + [ - "#{ASSET_DIR}/#{asset}.y", + "#{ASSET_DIR}/#{file}.y", '-Do', - "-O#{OUT_DIR}/#{asset}", - "-o#{TAB_DIR}/#{asset}", + "-O#{OUT_DIR}/#{file}", + "-o#{TAB_DIR}/#{file}", ] racc "#{args.join(' ')}" end - def assert_debugfile asset, ok - name = File.basename(asset, '.y') + def assert_debugfile(asset, ok) + file = File.basename(asset, '.y') Dir.chdir(TEST_DIR) do - File.foreach("log/#{name}.y") do |line| + File.foreach("log/#{file}.y") do |line| line.strip! case line when /sr/ then assert_equal "sr#{ok[0]}", line @@ -63,18 +64,29 @@ def assert_debugfile asset, ok end end - def assert_exec file - file = File.basename(file, '.y') + def assert_exec(asset) + file = File.basename(asset, '.y') Dir.chdir(TEST_DIR) do - ruby("tab/#{file}") + ruby("#{TAB_DIR}/#{file}") end end - def racc arg + def assert_output(asset) + file = File.basename(asset, '.y') + + expected = File.read("#{REGRESS_DIR}/#{file}") + actual = File.read("#{TAB_DIR}/#{file}") + result = (expected == actual) + + assert(result, "Output of test/assets/#{file}.y differed from " \ + "expectation. Try compiling it and diff with test/regress/#{file}.") + end + + def racc(arg) ruby "-S #{RACC} #{arg}" end - def ruby arg + def ruby(arg) Dir.chdir(TEST_DIR) do Tempfile.open 'test' do |io| executable = ENV['_'] || Gem.ruby diff --git a/test/regress/README.txt b/test/regress/README.txt new file mode 100644 index 00000000..dcab7326 --- /dev/null +++ b/test/regress/README.txt @@ -0,0 +1,7 @@ +These files are "known-good" compiler output, generated from a stable version of +Racc. Whenever Racc is refactored, or changes are made which should not affect the +compiler output, running "rake test" checks that the compiler output is exactly +the same as these files. + +If a change is made which *should* change the compiler output, these files will +have to be regenerated from the source in test/assets, and the results committed. diff --git a/test/regress/ruby18 b/test/regress/ruby18 new file mode 100644 index 00000000..eaee890d --- /dev/null +++ b/test/regress/ruby18 @@ -0,0 +1,7923 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "ruby18.y". +# + +require 'racc/parser.rb' + + +require 'parser' + +module Parser + class Ruby18 < Racc::Parser + +module_eval(<<'...end ruby18.y/module_eval...', 'ruby18.y', 1936) + + def version + 18 + end + + def default_encoding + Encoding::BINARY if defined? Encoding + end +...end ruby18.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [-480, 195, 196, 195, 196, 489, 814, -480, -480, -480, 511, 578, 578, -480, -480, -80, -480, -429, 579, 579, 489, 72, 531, -87, 558, -480, 99, 489, -86, 73, 95, 98, 395, 195, 196, -480, -480, -82, -480, -480, -480, -480, -480, 489, 489, 558, 495, -84, 496, -83, -81, 463, 659, 658, 662, 661, 186, 99, 557, 558, 291, 291, 98, -80, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -480, -87, 557, -480, -480, -480, 259, 546, 530, 722, -74, -480, -61, 99, -480, 291, 557, 621, 98, -480, -86, -480, -85, -480, -480, -480, -480, -480, -480, -480, -277, -480, -480, -480, 187, -476, 510, -277, -277, -277, 99, -72, 488, -277, -277, 98, -277, -480, -480, -79, -75, -69, -480, -83, -78, 99, 99, 488, 621, -76, 98, 98, 99, -74, 488, -277, -277, 98, -277, -277, -277, -277, -277, -76, -74, -75, -73, 431, 99, 99, 488, 488, 621, 98, 98, -477, 259, 502, 195, 196, 258, 503, -74, 690, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, -277, 558, 259, -277, -277, -277, -74, 549, 99, -74, 620, -277, 713, 98, -277, 691, -76, 188, -77, -277, 521, -277, 521, -277, -277, -277, -277, -277, -277, -277, -272, -277, -82, -277, -76, 557, 189, -272, -272, -272, 99, 254, -272, -272, -272, 98, -272, -277, -277, 99, -77, 620, -277, -85, 98, -76, -272, -272, -76, 477, 190, -84, 476, 258, 254, -272, -272, 768, -272, -272, -272, -272, - +272, 99, 194, 620, 477, 234, 98, 479, 521, 523, 522, 523, 522, 519, 258, +477, 358, 282, 482, 673, 360, 359, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, -272, 521, 192, -272, -272, -272, -81, 283, -272, 193, -79, -272, 521, -87, -272, -272, 291, -272, 191, -272, 349, -272, 215, -272, -272, -272, -272, -272, -272, -272, -226, -272, 361, -272, 523, 522, 524, -226, -226, -226, 814, 394, -226, -226, -226, 521, -226, -272, -272, -272, -272, 396, -272, -473, 212, 606, -226, 496, 214, 213, 210, 211, 523, 522, 526, -226, -226, 397, -226, -226, -226, -226, -226, 523, 522, 527, 251, 477, 426, -474, 479, -480, -480, 252, -319, -226, 659, 658, 662, 661, 428, -319, -226, -226, -226, -417, -476, -226, -226, -226, -319, -226, -417, -417, 431, -226, 523, 522, 532, -429, -417, -226, -226, 284, 285, -473, 436, 254, -226, -417, -226, -226, -60, -226, -226, -226, -226, -226, 463, -421, 451, -480, -480, 541, -477, 542, -421, -473, -480, -480, -226, -474, 680, -476, -476, -421, -476, -480, -480, 452, 215, 453, -72, -476, -226, -80, -226, 215, -476, -226, -226, 391, -476, -474, 99, -480, -480, -226, 392, 98, 99, -78, 254, -226, -86, 98, -74, 393, -76, -82, -476, -84, 212, -428, -477, -73, 214, 213, -81, 212, -428, -477, 459, 214, 213, -226, -477, 461, 462, -428, -477, 195, 196, -421, -476, -476, -476, 263, -476, -226, -421, -226, -476, -476, -226, 291, -480, -476, -477, -476, -476, -476, -476, -476, -476, -476, 195, 196, 734, 606, -476, -476, -476, -476, -476, -476, -476, -427, 215, 254, -426, -425, 662, 661, -427, 464, -476, -426, -425, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, 465, -476, -476, -422, -476, -476, -476, -480, 734, 606, -422, 212, 215, -423, -480, 214, 213, 210, 211, -476, -423, 457, 471, -480, -424, 472, -476, 692, 458, -476, -476, -424, -476, -476, 291, 481, -476, 456, -476, 484, -476, -480, -476, 351, 516, -271, 466, 498, 500, 501, -476, 517, -271, 467, 499, -476, -476, -476, -476, -476, -476, -271, 393, 497, -476, -476, -477, -477, -477, 535, -477, 536, 538, -83, -477, -477, -259, 540, 254, -477, 215, -477, -477, -477, -477, -477, -477, -477, 215, 215, 215, 568, -477, -477, -477, -477, -477, -477, -477, 667, 668, 575, 669, 93, 94, 291, 580, 234, -477, 590, 591, -477, -477, -477, -477, -477, -477, -477, -477, -477, -477, -69, -477, -477, 592, -477, -477, -477, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, 507, -497, -497, -278, 469, 229, 230, 505, -477, 549, -278, -477, -477, 606, -477, -477, 506, 291, -477, -278, -477, 212, -477, 218, -477, 214, 213, 210, 211, 222, 220, 216, -477, 217, 616, 496, 624, -477, -477, -477, -477, -477, -477, 672, -278, 675, -477, -477, 62, 63, 64, -278, 51, 436, 436, -85, 56, 57, 693, 704, - +278, 60, 431, 58, 59, 61, 23, 24, 65, 66, 431, 243, 707, 708, 22, +28, 27, 88, 87, 89, 90, 715, 717, 17, 721, 254, 254, 215, 537, 215, +41, 724, - +259, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, 728, 80, 81, 730, +38, 39, 37, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, -277, 208, 209, -279, 606, 229, 230, -277, 200, 738, -279, 204, -477, 739, 52, 53, -277, 740, 54, - +279, 743, 212, 745, 218, 40, 214, 213, 210, 211, 222, 220, 216, 18, 217, +749, 753, 755, 79, 72, 74, 75, 76, 77, 758, 759, 760, 73, 78, 761, +99, 233, 763, -215, -277, 98, 62, 63, 64, 7, 51, -277, -260, 769, 56, 57, -477, 777, 778, 60, - +277, 58, 59, 61, 23, 24, 65, 66, 568, 568, 254, 254, 22, 28, 27, +88, 87, 89, 90, 234, 568, 17, 101, 102, 103, 104, 105, 6, 41, 8, +9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, 790, 80, 81, 791, +38, 39, 37, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, -428, -497, -497, 823, 792, 229, 230, -428, 36, 797, 824, 30, 799, 805, 52, 53, - +428, 807, 54, 822, 32, 212, 291, 218, 40, 214, 213, 210, 211, 222, 220, +216, 18, 217, 818, 825, 826, 79, 72, 74, 75, 76, 77, 827, -271, 829, 73, 78, 62, 63, 64, -271, 51, 830, 351, -278, 56, 57, 832, 835, -271, 60, -278, 58, 59, 61, 246, 247, 65, 66, 839, - +278, 840, 846, 245, 275, 279, 88, 87, 89, 90, 101, 102, 103, 104, 105, +847, 848, 758, 758, 276, 759, 861, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, 568, 80, 81, 215, 568, 655, 280, 653, 652, 651, 654, -277, 471, 874, -279, 875, 876, 880, -277, 229, 230, -279, 883, -477, 758, 885, 772, -277, 886, 204, - +279, 568, 52, 53, 568, 212, 54, 218, 568, 214, 213, 210, 211, 645, nil, +216, nil, 217, nil, nil, nil, 659, 658, 662, 661, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, nil, 62, 63, 64, 775, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, +nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, 101, 102, 103, 104, 105, +nil, nil, 537, nil, 276, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, nil, nil, 280, 215, 219, 224, 225, 226, 221, +223, 231, 232, 227, 228, nil, 208, 209, nil, nil, 229, 230, nil, 772, nil, +nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, 212, nil, 218, nil, +214, 213, 210, 211, 222, 220, 216, nil, 217, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, nil, nil, 233, nil, 855, 5, 62, +63, 64, 7, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, +59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, +89, 90, nil, nil, 17, nil, nil, nil, nil, nil, 6, 41, 8, 9, 92, +91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, +37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, 53, nil, nil, +54, nil, 32, nil, nil, nil, 40, 655, nil, 653, 652, 651, 654, nil, 18, +nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, +5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 23, 24, 65, 66, 659, 658, 662, 661, 22, 28, 27, +88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, 6, 41, 8, +9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 265, nil, nil, 52, 53, +nil, nil, 54, nil, 32, nil, nil, nil, 40, 655, nil, 653, 652, 651, 654, +nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, 659, 658, 662, 661, 22, +28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, 6, +41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, +52, 53, nil, nil, 54, nil, 32, nil, nil, nil, 40, 655, nil, 653, 652, +651, 654, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, 645, 58, 59, 61, 23, 24, 65, 66, 659, 658, 662, +661, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, 215, -497, -497, -497, -497, 221, 223, nil, nil, -497, - +497, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, nil, 30, nil, nil, +52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, 214, 213, 210, 211, +222, 220, 216, 18, 217, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, +nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, 215, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, nil, 30, +nil, nil, 52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, 214, 213, +210, 211, nil, nil, 216, 18, 217, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, +nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, +nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, 215, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, +nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, +214, 213, 210, 211, nil, nil, 216, 18, 217, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, +66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, +nil, nil, nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, 215, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 229, 230, nil, +36, nil, nil, 265, nil, nil, 52, 53, nil, nil, 54, nil, 32, 212, nil, +218, 40, 214, 213, 210, 211, nil, nil, 216, 18, 217, nil, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, +24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, +nil, 17, nil, nil, nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, 215, -497, -497, -497, -497, 221, 223, nil, nil, -497, - +497, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, nil, 265, nil, nil, +52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, 214, 213, 210, 211, +222, 220, 216, 18, 217, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, +nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, 215, -497, -497, -497, -497, 221, 223, nil, nil, -497, - +497, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, nil, 30, nil, nil, +52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, 214, 213, 210, 211, +222, 220, 216, 18, 217, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, +nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, 215, -497, -497, -497, -497, 221, 223, nil, nil, -497, - +497, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, nil, 30, nil, nil, +52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, 214, 213, 210, 211, +222, 220, 216, 18, 217, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, +nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, 215, -497, -497, -497, -497, 221, 223, nil, nil, -497, - +497, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, nil, 30, nil, nil, +52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, 214, 213, 210, 211, +222, 220, 216, 18, 217, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, +nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, 215, -497, -497, -497, -497, 221, 223, nil, nil, -497, - +497, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, nil, 30, nil, nil, +52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, 214, 213, 210, 211, +222, 220, 216, 18, 217, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, +nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, 215, 219, 224, 225, 226, 221, 223, nil, +nil, 227, 228, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, nil, 30, +nil, nil, 52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, 214, 213, +210, 211, 222, 220, 216, 18, 217, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, +nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, +nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, 215, 219, 224, 225, 226, 221, +223, 231, nil, 227, 228, nil, nil, nil, nil, nil, 229, 230, nil, 36, nil, +nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, 32, 212, nil, 218, 40, +214, 213, 210, 211, 222, 220, 216, 18, 217, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, +66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, +nil, nil, nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, 215, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 229, 230, nil, +36, nil, nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, 32, 212, nil, +218, 40, 214, 213, 210, 211, nil, nil, nil, 18, nil, nil, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, +24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, +nil, 17, nil, nil, nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, 215, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 229, +230, nil, 36, nil, nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, 32, +212, nil, 218, 40, 214, 213, 210, 211, nil, nil, nil, 18, nil, nil, nil, +nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 5, 62, 63, +64, 7, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, +61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, +90, nil, nil, 17, nil, nil, nil, nil, nil, 6, 41, 8, 9, 92, 91, +82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, +215, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 229, 230, nil, 36, nil, nil, 30, nil, nil, 52, 53, nil, nil, 54, +nil, 32, 212, nil, nil, 40, 214, 213, 210, 211, nil, nil, nil, 18, nil, +nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 5, +62, 63, 64, 7, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, +87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, 6, 41, 8, 9, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, +39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, 53, nil, +nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, +27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, 6, 41, +8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, +53, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, +22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, +6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, +nil, 52, 53, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, +nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, +nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, +30, nil, nil, 52, 53, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, +nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, +nil, nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, +nil, nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, 32, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, +nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, +65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, +17, nil, nil, nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, +83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 36, nil, nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, 32, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 5, 62, 63, 64, +7, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, +23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, +nil, nil, 17, nil, nil, nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, +50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, +32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, +nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 5, 62, +63, 64, 7, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, +59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, +89, 90, nil, nil, 17, nil, nil, nil, nil, nil, 6, 41, 8, 9, 92, +91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, +37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, 53, nil, nil, +54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, +nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, +5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, +88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, 6, 41, 8, +9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, 53, +nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, +28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, 6, +41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, +52, 53, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, +nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, +nil, nil, 52, 53, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 5, 62, 63, 64, 7, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, +nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, +nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, +nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, 32, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, 7, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, +nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, +nil, nil, nil, nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, +nil, nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, 32, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 153, 164, 154, 177, 150, 170, +160, 159, 180, 181, 175, 158, 157, 152, 178, 182, 183, 162, 151, 165, 169, +171, 163, 156, nil, nil, 172, 179, 174, 173, 166, 176, 161, 149, 168, 167, +nil, nil, nil, nil, nil, 148, 155, 146, 147, 144, 145, 109, 111, 108, nil, +110, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, 122, 123, +nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, 130, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, 133, nil, +120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, nil, nil, 143, 79, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 78, 153, 164, 154, 177, 150, +170, 160, 159, 180, 181, 175, 158, 157, 152, 178, 182, 183, 162, 151, 165, +169, 171, 163, 156, nil, nil, 172, 179, 174, 173, 166, 176, 161, 149, 168, +167, nil, nil, nil, nil, nil, 148, 155, 146, 147, 144, 145, 109, 111, nil, +nil, 110, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, 122, +123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, 130, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, 133, +nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, nil, nil, 143, +79, nil, nil, 62, 63, 64, nil, 51, nil, nil, 78, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, +28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, +22, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, +nil, 245, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, 241, nil, 243, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, +nil, nil, 245, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, 241, nil, 243, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, +nil, nil, nil, 245, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, +nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 241, nil, 243, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, -249, -249, -249, nil, -249, nil, nil, nil, -249, -249, nil, nil, nil, -249, nil, -249, -249, -249, -249, -249, -249, -249, nil, nil, nil, nil, -249, -249, -249, -249, -249, -249, -249, nil, nil, nil, nil, nil, nil, nil, nil, nil, -249, nil, nil, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, nil, -249, -249, nil, -249, -249, - +249, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, -249, nil, nil, -249, 254, nil, -249, -249, nil, nil, -249, nil, -249, nil, -249, nil, -249, nil, nil, nil, nil, nil, nil, nil, -249, nil, nil, nil, nil, -249, -249, -249, -249, -249, -249, nil, nil, nil, -249, -249, -249, -249, -249, nil, -249, nil, nil, nil, -249, -249, nil, nil, nil, -249, nil, -249, -249, -249, -249, -249, -249, -249, nil, nil, nil, nil, -249, -249, -249, -249, -249, -249, -249, nil, nil, nil, nil, nil, nil, nil, nil, nil, -249, nil, nil, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, nil, -249, -249, nil, -249, -249, - +249, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, -249, nil, nil, -249, 263, nil, -249, -249, nil, nil, -249, nil, -249, nil, -249, nil, -249, nil, nil, nil, nil, nil, nil, nil, -249, nil, nil, nil, nil, -249, -249, -249, -249, -249, -249, nil, nil, nil, -249, - +249, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, +88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 276, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +nil, nil, 280, nil, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, +nil, 208, 209, nil, nil, 229, 230, 273, nil, nil, 270, nil, nil, 52, 53, +nil, nil, 54, nil, 269, nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, +220, 216, nil, 217, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, 233, 51, 568, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, +279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 276, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, nil, nil, 280, nil, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, +228, nil, 208, 209, nil, nil, 229, 230, 273, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, 212, nil, 218, nil, 214, 213, 210, 211, +222, 220, 216, nil, 217, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, 233, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, +275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, +245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, +nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, +nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, +nil, nil, nil, 245, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, +nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 299, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, +nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, +nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, +66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, +nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, +65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, +17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, +83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, +247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 276, nil, nil, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, nil, nil, 280, nil, 215, +219, 224, 225, 226, 221, 223, 231, 232, 227, 228, nil, 208, 209, nil, nil, +229, 230, 315, nil, nil, 30, nil, nil, 52, 53, nil, nil, 54, nil, 32, +nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, 220, 216, nil, 217, nil, +nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, +233, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, +246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 276, nil, nil, 92, 91, 320, +50, 84, 83, 321, 85, 93, 94, nil, 80, 81, nil, nil, nil, 280, nil, +215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, nil, 208, 209, nil, +327, 229, 230, 322, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, +nil, nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, 220, 216, nil, 217, +nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, +64, 233, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, +61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, +90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 276, nil, nil, 92, 91, +320, 50, 84, 83, 321, 85, 93, 94, nil, 80, 81, nil, nil, nil, 280, +nil, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, nil, 208, 209, +nil, nil, 229, 230, 322, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, +nil, nil, nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, 220, 216, nil, +217, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, -473, -473, -473, 233, -473, nil, nil, nil, -473, -473, nil, nil, nil, -473, nil, -473, -473, -473, -473, -473, -473, -473, nil, -473, nil, nil, -473, -473, -473, -473, -473, -473, -473, nil, nil, nil, nil, nil, nil, nil, nil, nil, -473, nil, nil, -473, -473, -473, -473, -473, -473, -473, -473, -473, -473, nil, -473, -473, nil, -473, -473, - +473, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, -473, nil, nil, -473, -473, nil, -473, -473, nil, nil, -473, nil, -473, nil, -473, nil, -473, nil, nil, nil, nil, nil, nil, nil, -473, nil, -473, nil, nil, -473, -473, -473, -473, -473, -473, nil, nil, nil, -473, -473, -474, -474, -474, nil, -474, nil, nil, nil, -474, -474, nil, nil, nil, -474, nil, -474, -474, -474, -474, -474, -474, -474, nil, -474, nil, nil, -474, -474, -474, -474, -474, -474, -474, nil, nil, nil, nil, nil, nil, nil, nil, nil, -474, nil, nil, -474, -474, -474, -474, -474, -474, -474, -474, -474, -474, nil, -474, -474, nil, -474, -474, - +474, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, -474, nil, nil, -474, -474, nil, -474, -474, nil, nil, -474, nil, -474, nil, -474, nil, -474, nil, nil, nil, nil, nil, nil, nil, -474, nil, -474, nil, nil, -474, -474, -474, -474, -474, -474, nil, nil, nil, -474, - +474, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, +88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, +27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, +28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, +22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, 7, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, +nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, 6, 41, 8, 9, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, +nil, nil, 52, 53, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, +nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, 369, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, +nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, +nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 369, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, +nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, +nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, +66, nil, nil, nil, nil, 245, 28, 27, 88, 87, 89, 90, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 299, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, +nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, +65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, +83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, +79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, +24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, +nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, +nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, +nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, +23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, +nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, +50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, +nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, +64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, +61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, +90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, +82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, +nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, +nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, +63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, +59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, +89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, +91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, +37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, +54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, +nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, +62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, +87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, +39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, +88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, +279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, +275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, +245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, +nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, +nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, +nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, +nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, +nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, +nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, +66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, +nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, +65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, +83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, +79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, +247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, +nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, +nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, +246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, +50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, +nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, +64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, +61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, +90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, +82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, +nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, +nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, +63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, +59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, +89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, +91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, +37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, +54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, +nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, +62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, +87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, +39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, +88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, +279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, +275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, +245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, +nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, +nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, +nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, +nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, +nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, +nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, +66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, +nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, +65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, +83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, +79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, +247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, +nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, +nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, +246, 247, 65, 66, nil, nil, nil, nil, 245, 28, 27, 88, 87, 89, 90, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, +50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, +241, nil, 243, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, +nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, +64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, +61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 28, 27, 88, 87, 89, +90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, +82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 445, 53, nil, nil, 54, +nil, 241, nil, 243, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, +nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, +63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, +59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 28, 27, 88, 87, +89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, +91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, +37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, 449, 52, 53, nil, nil, +54, nil, 241, nil, 243, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, +nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, +62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, +87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 276, nil, nil, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, nil, +nil, 280, nil, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, nil, +208, 209, nil, nil, 229, 230, 273, nil, nil, 204, nil, nil, 52, 53, nil, +nil, 54, nil, nil, nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, 220, +216, nil, 217, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, 62, 63, 64, 233, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, +88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, 469, nil, 52, 53, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, +279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, +28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, +22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, +nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, +nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 153, 164, 154, 177, 150, 170, 160, 159, +180, 181, 175, 158, 157, 152, 178, 182, 183, 162, 151, 165, 169, 171, 163, +156, nil, nil, 172, 179, 174, 173, 166, 176, 161, 149, 168, 167, nil, nil, +nil, nil, nil, 148, 155, 146, 147, 144, 145, 109, 111, nil, nil, 110, nil, +nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, 122, 123, nil, 126, +128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, 130, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, 133, nil, 120, 138, +136, 135, 131, 132, 127, 125, 118, nil, 119, nil, nil, 143, 79, nil, nil, +62, 63, 64, nil, 51, nil, nil, 78, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, +87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, +39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, -249, -249, -249, nil, -249, nil, nil, nil, -249, -249, nil, nil, nil, -249, nil, -249, -249, -249, -249, -249, -249, -249, nil, nil, nil, nil, -249, -249, -249, -249, -249, -249, -249, nil, nil, nil, nil, nil, nil, nil, nil, nil, -249, nil, nil, -249, -249, -249, -249, -249, -249, -249, -249, -249, -249, nil, -249, -249, nil, -249, -249, - +249, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, -249, nil, nil, -249, 254, nil, -249, -249, nil, nil, -249, nil, -249, nil, -249, nil, -249, nil, nil, nil, nil, nil, nil, nil, -249, nil, nil, nil, nil, -249, -249, -249, -249, -249, -249, nil, nil, nil, -249, -249, -478, -478, -478, nil, -478, nil, nil, nil, -478, -478, nil, nil, nil, -478, nil, -478, -478, -478, -478, -478, -478, -478, nil, nil, nil, nil, -478, -478, -478, -478, -478, -478, -478, nil, nil, nil, nil, nil, nil, nil, nil, nil, -478, nil, nil, -478, -478, -478, -478, -478, -478, -478, -478, -478, -478, nil, -478, -478, nil, -478, -478, - +478, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, -478, nil, nil, -478, -478, nil, -478, -478, nil, nil, -478, nil, -478, nil, -478, nil, -478, nil, nil, nil, nil, nil, nil, nil, -478, nil, nil, nil, nil, -478, -478, -478, -478, -478, -478, nil, nil, nil, -478, -478, -479, -479, -479, nil, -479, nil, nil, nil, -479, -479, nil, nil, nil, -479, nil, -479, -479, -479, -479, -479, -479, -479, nil, nil, nil, nil, -479, -479, -479, -479, -479, -479, -479, nil, nil, nil, nil, nil, nil, nil, nil, nil, -479, nil, nil, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, nil, -479, -479, nil, -479, -479, - +479, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, -479, nil, nil, -479, -479, nil, -479, -479, nil, nil, -479, nil, -479, nil, -479, nil, -479, nil, nil, nil, nil, nil, nil, nil, -479, nil, nil, nil, nil, -479, -479, -479, -479, -479, -479, nil, nil, nil, -479, - +479, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 28, 27, +88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, +nil, nil, 54, nil, 299, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, +279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, +275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, +245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, +nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, 560, nil, 243, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, +nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, 564, nil, 243, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, +nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, +nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, +nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, +nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 584, nil, 243, nil, +40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, +66, nil, nil, nil, nil, 245, 28, 27, 88, 87, 89, 90, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 299, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, +nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, +65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, +83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, +79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, +247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, +nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, +nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, +246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, +50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, +nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, +64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, +61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, +90, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, +82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, +nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, +nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, +63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, +59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, +89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, +91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, +37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, +54, nil, 369, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, +nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, +62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, +87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, +39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, +nil, 54, nil, 612, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, +88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, +279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, +275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, 628, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, +245, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, 299, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, +nil, 245, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, 299, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, +nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, 17, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 153, 164, 154, 177, 150, 170, 160, 159, +180, 181, 175, 158, 157, 152, 178, 182, 183, 162, 151, 165, 169, 171, 163, +156, nil, nil, 172, 179, 174, 173, 166, 176, 161, 149, 168, 167, nil, nil, +nil, nil, nil, 148, 155, 146, 147, 144, 145, 109, 111, nil, nil, 110, nil, +nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, 122, 123, nil, 126, +128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, 130, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, 133, nil, 120, 138, +136, 135, 131, 132, 127, 125, 118, nil, 119, nil, nil, 143, 79, nil, nil, +62, 63, 64, nil, 51, nil, nil, 78, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, +87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, +39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, +88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, +nil, nil, 54, nil, 679, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, +27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, +28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, +22, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, +nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, +nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, +nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 276, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, nil, nil, 280, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 273, nil, +nil, 270, nil, nil, 52, 53, nil, nil, 54, nil, 697, nil, 698, nil, nil, +nil, nil, nil, nil, nil, nil, 699, nil, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, +nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, +nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, +66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, +nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, +65, 66, nil, nil, nil, nil, 245, 28, 27, 88, 87, 89, 90, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, +83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 560, nil, +243, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, +79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, +247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, +nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, +nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, +246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, +50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, +nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, +64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, +61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, +90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, +82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, +nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, +nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, +63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, +59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, +89, 90, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, +91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, +37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, +54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, +nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, +62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, +87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, +39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 23, 24, 65, 66, nil, nil, nil, nil, 22, 28, 27, +88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, +279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, +275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, +245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, +nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 276, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, nil, nil, 280, nil, 215, 219, 224, 225, 226, 221, 223, +231, 232, 227, 228, nil, 208, 209, nil, nil, 229, 230, 772, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, 212, nil, 218, nil, 214, +213, 210, 211, 222, 220, 216, nil, 217, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, 233, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, +nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, 780, nil, 243, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, +nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, +nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 786, nil, 243, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, +nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, +nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 788, nil, 243, nil, +40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, +66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 276, nil, nil, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, nil, nil, 280, nil, 215, 219, 224, +225, 226, 221, 223, 231, 232, 227, 228, nil, 208, 209, nil, nil, 229, 230, +772, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, 212, +nil, 218, nil, 214, 213, 210, 211, 222, 220, 216, nil, 217, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, 233, 51, +nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 23, 24, +65, 66, nil, nil, nil, nil, 22, 28, 27, 88, 87, 89, 90, nil, nil, +17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, +83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, +247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 802, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, +nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, +nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, +246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, +50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, +nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, +64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, +61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, +90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, +82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, +nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, +nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, +63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, +59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, +89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 276, nil, nil, 92, +91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, nil, nil, +280, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 273, nil, nil, 270, nil, nil, 52, 53, nil, nil, +54, nil, 821, nil, 820, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, +62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, +87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, +39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, +nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, +88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, +38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, +73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, +60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, +279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, +nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, +53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, +nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, +nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, +275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, +41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, +81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, +52, 53, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, +nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, 57, nil, +nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, +245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 276, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, +80, 81, nil, nil, nil, 280, nil, 215, 219, 224, 225, 226, 221, 223, 231, +232, 227, 228, nil, 208, 209, nil, nil, 229, 230, 772, nil, nil, 204, nil, +nil, 52, 53, nil, nil, 54, nil, nil, nil, 212, nil, 218, nil, 214, 213, +210, 211, 222, 220, 216, nil, 217, nil, nil, 79, 72, 74, 75, 76, 77, +nil, nil, nil, 73, 78, 62, 63, 64, 233, 51, nil, nil, nil, 56, 57, +nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, nil, +nil, 245, 28, 27, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, 94, +nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, +nil, nil, 52, 53, nil, nil, 54, nil, 299, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, 75, 76, +77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, nil, 56, +57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, nil, +nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 276, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, 93, +94, nil, 80, 81, nil, nil, nil, 280, nil, 215, 219, 224, 225, 226, 221, +223, 231, 232, 227, 228, nil, 208, 209, nil, nil, 229, 230, 772, nil, nil, +204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, 212, nil, 218, nil, +214, 213, 210, 211, 222, 220, 216, nil, 217, nil, nil, 79, 72, 74, 75, +76, 77, nil, nil, nil, 73, 78, 62, 63, 64, 233, 51, nil, nil, nil, +56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, nil, +nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, 85, +93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, nil, +nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 864, nil, 243, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, 74, +75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, nil, +nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, 66, +nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, 83, 86, +85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 200, +nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, 867, nil, 243, nil, +40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 79, 72, +74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, 51, nil, +nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, 65, +66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 276, nil, nil, 92, 91, 82, 50, 84, 83, +86, 85, 93, 94, nil, 80, 81, nil, nil, nil, 280, nil, 215, 219, 224, +225, 226, 221, 223, 231, 232, 227, 228, nil, 208, 209, nil, nil, 229, 230, +772, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, 212, +nil, 218, nil, 214, 213, 210, 211, 222, 220, 216, nil, 217, nil, nil, 79, +72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, 233, 51, +nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, 247, +65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, 84, +83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, +79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, nil, +51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, 246, +247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, 82, 50, +84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, nil, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, +nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, 64, +nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, 61, +246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, 90, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 276, nil, nil, 92, 91, 82, +50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, nil, nil, 280, nil, +215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, nil, 208, 209, nil, +nil, 229, 230, 772, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, nil, +nil, nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, 220, 216, nil, 217, +nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, 63, +64, 233, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, 59, +61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, 89, +90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, 92, 91, +82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, 39, 37, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, nil, 54, +nil, 889, nil, 243, nil, 40, nil, nil, nil, nil, nil, nil, nil, 207, nil, +nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, 62, +63, 64, nil, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, 58, +59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, 87, +89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 276, nil, nil, 92, +91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, nil, nil, +280, nil, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, nil, 208, +209, nil, nil, 229, 230, 772, nil, nil, 204, nil, nil, 52, 53, nil, nil, +54, nil, nil, nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, 220, 216, +nil, 217, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, 78, +62, 63, 64, 233, 51, nil, nil, nil, 56, 57, nil, nil, nil, 60, nil, +58, 59, 61, 246, 247, 65, 66, nil, nil, nil, nil, 245, 275, 279, 88, +87, 89, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, +92, 91, 82, 50, 84, 83, 86, 85, 93, 94, nil, 80, 81, nil, 38, +39, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 200, nil, nil, 204, nil, nil, 52, 53, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +207, nil, nil, nil, nil, 79, 72, 74, 75, 76, 77, nil, nil, nil, 73, +78, 153, 164, 154, 177, 150, 170, 160, 159, 180, 181, 175, 158, 157, 152, +178, 182, 183, 162, 151, 165, 169, 171, 163, 156, nil, nil, 172, 179, 174, +336, 335, 337, 334, 149, 168, 167, nil, nil, nil, nil, nil, 148, 155, 146, +147, 332, 333, 330, 111, 84, 83, 331, 85, nil, nil, nil, nil, nil, nil, +139, 140, nil, 137, 121, 122, 123, nil, 126, 128, nil, nil, 124, nil, nil, +nil, nil, 141, 142, 129, 130, nil, nil, nil, nil, nil, 341, nil, nil, nil, +nil, nil, nil, nil, 134, 133, nil, 120, 138, 136, 135, 131, 132, 127, 125, +118, nil, 119, nil, nil, 143, 153, 164, 154, 177, 150, 170, 160, 159, 180, +181, 175, 158, 157, 152, 178, 182, 183, 162, 151, 165, 169, 171, 163, 156, +nil, nil, 172, 179, 174, 173, 166, 176, 161, 149, 168, 167, nil, nil, nil, +nil, nil, 148, 155, 146, 147, 144, 145, 109, 111, nil, nil, 110, nil, nil, +nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, 122, 123, nil, 126, 128, +nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, 130, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, 133, nil, 120, 138, 136, +135, 131, 132, 127, 125, 118, nil, 119, nil, nil, 143, 215, 219, 224, 225, +226, 221, 223, 231, 232, 227, 228, nil, 208, 209, nil, nil, 229, 230, nil, +nil, nil, - +215, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 212, nil, 218, nil, +214, 213, 210, 211, 222, 220, 216, nil, 217, nil, nil, nil, nil, nil, nil, +nil, 376, 379, nil, nil, 377, nil, nil, nil, nil, 233, nil, - +215, 139, 140, nil, 137, 121, 122, 123, nil, 126, 128, nil, nil, 124, nil, +nil, nil, nil, 141, 142, 129, 130, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 134, 133, nil, 120, 138, 136, 135, 131, 132, 127, +125, 118, nil, 119, 381, 385, 143, nil, 383, nil, nil, nil, nil, nil, nil, +nil, 139, 140, nil, 137, 121, 122, 123, nil, 126, 128, nil, nil, 124, nil, +nil, nil, nil, 141, 142, 129, 130, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 134, 133, nil, 120, 138, 136, 135, 131, 132, 127, +125, 118, nil, 119, 433, 379, 143, nil, 434, nil, nil, nil, nil, nil, nil, +nil, 139, 140, nil, 137, 121, 122, 123, nil, 126, 128, nil, nil, 124, nil, +nil, nil, nil, 141, 142, 129, 130, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 134, 133, nil, 120, 138, 136, 135, 131, 132, 127, +125, 118, nil, 119, 433, 379, 143, nil, 434, nil, nil, nil, nil, nil, nil, +nil, 139, 140, nil, 137, 121, 122, 123, nil, 126, 128, nil, nil, 124, nil, +nil, nil, nil, 141, 142, 129, 130, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 134, 133, nil, 120, 138, 136, 135, 131, 132, 127, +125, 118, nil, 119, 550, 379, 143, nil, 551, nil, nil, nil, nil, nil, nil, +nil, 139, 140, nil, 137, 121, 122, 123, nil, 126, 128, nil, nil, 124, nil, +nil, nil, nil, 141, 142, 129, 130, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 134, 133, nil, 120, 138, 136, 135, 131, 132, 127, +125, 118, nil, 119, 552, 385, 143, nil, 553, nil, nil, nil, nil, nil, nil, +nil, 139, 140, nil, 137, 121, 122, 123, nil, 126, 128, nil, nil, 124, nil, +nil, nil, nil, 141, 142, 129, 130, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 134, 133, nil, 120, 138, 136, 135, 131, 132, 127, +125, 118, nil, 119, nil, nil, 143, 215, 219, 224, 225, 226, 221, 223, 231, +232, 227, 228, nil, 208, 209, nil, nil, 229, 230, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 212, nil, 218, nil, 214, 213, +210, 211, 222, 220, 216, nil, 217, nil, nil, nil, nil, nil, nil, 594, 379, +nil, nil, 595, nil, nil, nil, nil, nil, 233, 556, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 597, 385, +143, nil, 598, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 550, 379, +143, nil, 551, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 552, 385, +143, nil, 553, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 630, 379, +143, nil, 631, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 632, 385, +143, nil, 633, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 635, 385, +143, nil, 636, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 433, 379, +143, nil, 434, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 433, 379, +143, nil, 434, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 433, 379, +143, nil, 434, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 857, 379, +143, nil, 858, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, 859, 385, +143, nil, 860, nil, nil, nil, nil, nil, nil, nil, 139, 140, nil, 137, 121, +122, 123, nil, 126, 128, nil, nil, 124, nil, nil, nil, nil, 141, 142, 129, +130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 134, +133, nil, 120, 138, 136, 135, 131, 132, 127, 125, 118, nil, 119, nil, nil, +143, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, nil, 208, 209, +nil, nil, 229, 230, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, 220, 216, nil, +217, nil, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, nil, 208, +209, 291, 233, 229, 230, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, 220, 216, +nil, 217, nil, 215, 219, 224, 225, 226, 221, 223, 231, 232, 227, 228, nil, +208, 209, 291, 233, 229, 230, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 212, nil, 218, nil, 214, 213, 210, 211, 222, 220, +216, nil, 217, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 233] + +racc_action_check = [ +381, 512, 512, 518, 518, 306, 755, 381, 381, 381, 326, 440, 711, 381, 381, +313, 381, 199, 440, 711, 307, 70, 347, 316, 424, 381, 3, 627, 500, 70, +1, 3, 201, 603, 603, 381, 381, 630, 381, 381, 381, 381, 381, 727, 798, +446, 311, 631, 311, 632, 743, 394, 755, 755, 755, 755, 8, 310, 424, 447, +440, 711, 310, 199, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, +381, 381, 381, 201, 446, 381, 381, 381, 55, 381, 347, 603, 594, 381, 591, +512, 381, 518, 447, 491, 512, 381, 394, 381, 633, 381, 381, 381, 381, 381, +381, 381, 383, 381, 381, 381, 9, 632, 326, 383, 383, 383, 306, 313, 306, +383, 383, 306, 383, 381, 381, 316, 381, 591, 381, 381, 500, 307, 326, 307, +492, 595, 307, 326, 627, 630, 627, 383, 383, 627, 383, 383, 383, 383, 383, +631, 594, 632, 743, 582, 727, 798, 727, 798, 744, 727, 798, 633, 26, 322, +15, 15, 55, 322, 594, 550, 383, 383, 383, 383, 383, 383, 383, 383, 383, +383, 383, 383, 383, 383, 574, 277, 383, 383, 383, 594, 383, 491, 594, 491, +383, 582, 491, 383, 551, 595, 10, 633, 383, 528, 383, 343, 383, 383, 383, +383, 383, 383, 383, 50, 383, 550, 383, 595, 574, 11, 50, 50, 50, 511, +26, 50, 50, 50, 511, 50, 383, 383, 492, 383, 492, 383, 383, 492, 595, +50, 50, 595, 297, 12, 551, 297, 26, 277, 50, 50, 693, 50, 50, 50, +50, 50, 744, 14, 744, 298, 20, 744, 298, 344, 528, 528, 343, 343, 343, +277, 301, 108, 34, 301, 528, 108, 108, 50, 50, 50, 50, 50, 50, 50, +50, 50, 50, 50, 50, 50, 50, 345, 13, 50, 50, 50, 693, 36, 50, +13, 14, 50, 346, 14, 50, 50, 41, 50, 13, 50, 95, 50, 419, 50, +50, 50, 50, 50, 50, 50, 432, 50, 184, 50, 344, 344, 344, 432, 432, +432, 848, 200, 432, 432, 432, 348, 432, 50, 50, 50, 50, 202, 50, 320, +419, 803, 432, 803, 419, 419, 419, 419, 345, 345, 345, 432, 432, 203, 432, +432, 432, 432, 432, 346, 346, 346, 25, 303, 239, 321, 303, 597, 635, 25, +42, 435, 848, 848, 848, 848, 240, 42, 435, 435, 435, 330, 857, 435, 435, +435, 42, 435, 330, 320, 244, 432, 348, 348, 348, 35, 320, 435, 432, 37, +37, 320, 253, 432, 432, 320, 435, 435, 264, 435, 435, 435, 435, 435, 283, +321, 266, 597, 635, 376, 858, 377, 321, 320, 597, 635, 432, 321, 540, 597, +635, 321, 857, 597, 635, 267, 400, 268, 35, 857, 432, 35, 432, 401, 857, +432, 435, 198, 857, 321, 640, 597, 635, 435, 198, 640, 646, 283, 435, 435, +283, 646, 376, 198, 377, 376, 857, 377, 400, 271, 858, 540, 400, 400, 540, +401, 271, 858, 273, 401, 401, 435, 858, 280, 280, 271, 858, 294, 294, 331, +552, 552, 552, 275, 552, 435, 331, 435, 552, 552, 435, 276, 859, 552, 858, +552, 552, 552, 552, 552, 552, 552, 305, 305, 615, 615, 552, 552, 552, 552, +552, 552, 552, 332, 420, 279, 333, 334, 758, 758, 332, 284, 552, 333, 334, +552, 552, 552, 552, 552, 552, 552, 552, 552, 552, 285, 552, 552, 335, 552, +552, 552, 859, 870, 870, 335, 420, 288, 336, 859, 420, 420, 420, 420, 859, +336, 272, 292, 859, 337, 293, 552, 552, 272, 552, 552, 337, 552, 552, 296, +300, 552, 272, 552, 302, 552, 859, 552, 312, 339, 274, 286, 314, 315, 317, +552, 339, 274, 286, 314, 552, 552, 552, 552, 552, 552, 274, 286, 314, 552, +552, 553, 553, 553, 362, 553, 363, 368, 552, 553, 553, 371, 375, 382, 553, +402, 553, 553, 553, 553, 553, 553, 553, 403, 404, 405, 429, 553, 553, 553, +553, 553, 553, 553, 522, 522, 438, 522, 522, 522, 439, 441, 442, 553, 448, +450, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 451, 553, 553, 455, +553, 553, 553, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 324, +398, 398, 459, 460, 398, 398, 324, 553, 553, 459, 553, 553, 470, 553, 553, +324, 473, 553, 459, 553, 398, 553, 398, 553, 398, 398, 398, 398, 398, 398, +398, 553, 398, 487, 493, 494, 553, 553, 553, 553, 553, 553, 526, 503, 531, +553, 553, 60, 60, 60, 503, 60, 543, 547, 553, 60, 60, 554, 561, 503, +60, 563, 60, 60, 60, 60, 60, 60, 60, 566, 568, 576, 577, 60, 60, +60, 60, 60, 60, 60, 583, 586, 60, 593, 596, 599, 601, 366, 602, 60, +604, 607, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 608, 60, 60, +611, 60, 60, 60, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, +598, 366, 366, 721, 617, 366, 366, 598, 60, 623, 721, 60, 598, 625, 60, +60, 598, 626, 60, 721, 629, 366, 638, 366, 60, 366, 366, 366, 366, 366, +366, 366, 60, 366, 643, 647, 648, 60, 60, 60, 60, 60, 60, 649, 655, +660, 60, 60, 663, 60, 366, 665, 366, 636, 60, 97, 97, 97, 97, 97, +636, 678, 696, 97, 97, 636, 700, 701, 97, 636, 97, 97, 97, 97, 97, +97, 97, 702, 705, 709, 710, 97, 97, 97, 97, 97, 97, 97, 712, 716, +97, 4, 4, 4, 4, 4, 97, 97, 97, 97, 97, 97, 97, 97, 97, +97, 97, 97, 97, 97, 718, 97, 97, 719, 97, 97, 97, 399, 399, 399, +399, 399, 399, 399, 399, 399, 399, 399, 770, 399, 399, 771, 720, 399, 399, +770, 97, 732, 771, 97, 735, 746, 97, 97, 770, 750, 97, 771, 97, 399, +751, 399, 97, 399, 399, 399, 399, 399, 399, 399, 97, 399, 764, 772, 774, +97, 97, 97, 97, 97, 97, 775, 773, 782, 97, 97, 697, 697, 697, 773, +697, 783, 97, 825, 697, 697, 784, 787, 773, 697, 825, 697, 697, 697, 697, +697, 697, 697, 800, 825, 801, 806, 697, 697, 697, 697, 697, 697, 697, 106, +106, 106, 106, 106, 808, 809, 810, 813, 697, 814, 826, 697, 697, 697, 697, +697, 697, 697, 697, 697, 697, 833, 697, 697, 410, 836, 514, 697, 514, 514, +514, 514, 860, 837, 854, 876, 855, 856, 865, 860, 410, 410, 876, 871, 860, +872, 873, 697, 860, 874, 697, 876, 878, 697, 697, 881, 410, 697, 410, 892, +410, 410, 410, 410, 514, nil, 410, nil, 410, nil, nil, nil, 514, 514, 514, +514, 697, 697, 697, 697, 697, 697, nil, nil, nil, 697, 697, nil, 821, 821, +821, 697, 821, nil, nil, nil, 821, 821, nil, nil, nil, 821, nil, 821, 821, +821, 821, 821, 821, 821, nil, nil, nil, nil, 821, 821, 821, 821, 821, 821, +821, 350, 350, 350, 350, 350, nil, nil, 555, nil, 821, nil, nil, 821, 821, +821, 821, 821, 821, 821, 821, 821, 821, nil, 821, 821, nil, nil, nil, 821, +555, 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, nil, 555, 555, nil, +nil, 555, 555, nil, 821, nil, nil, 821, nil, nil, 821, 821, nil, nil, 821, +nil, nil, 555, nil, 555, nil, 555, 555, 555, 555, 555, 555, 555, nil, 555, +nil, nil, nil, 821, 821, 821, 821, 821, 821, nil, nil, nil, 821, 821, nil, +nil, 555, nil, 821, 0, 0, 0, 0, 0, 0, nil, nil, nil, 0, 0, +nil, nil, nil, 0, nil, 0, 0, 0, 0, 0, 0, 0, nil, nil, nil, +nil, 0, 0, 0, 0, 0, 0, 0, nil, nil, 0, nil, nil, nil, nil, +nil, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +nil, 0, 0, nil, 0, 0, 0, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0, nil, nil, 0, +nil, nil, 0, 0, nil, nil, 0, nil, 0, nil, nil, nil, 0, 645, nil, +645, 645, 645, 645, nil, 0, nil, nil, nil, nil, 0, 0, 0, 0, 0, +0, nil, nil, nil, 0, 0, 30, 30, 30, 30, 30, 30, nil, nil, nil, +30, 30, nil, nil, nil, 30, nil, 30, 30, 30, 30, 30, 30, 30, 645, +645, 645, 645, 30, 30, 30, 30, 30, 30, 30, nil, nil, 30, nil, nil, +nil, nil, nil, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, +30, 30, nil, 30, 30, nil, 30, 30, 30, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 30, nil, +nil, 30, nil, nil, 30, 30, nil, nil, 30, nil, 30, nil, nil, nil, 30, +753, nil, 753, 753, 753, 753, nil, 30, nil, nil, nil, nil, 30, 30, 30, +30, 30, 30, nil, nil, nil, 30, 30, 51, 51, 51, 51, 51, 51, nil, +nil, nil, 51, 51, nil, nil, nil, 51, nil, 51, 51, 51, 51, 51, 51, +51, 753, 753, 753, 753, 51, 51, 51, 51, 51, 51, 51, nil, nil, 51, +nil, nil, nil, nil, nil, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, +51, 51, 51, 51, nil, 51, 51, nil, 51, 51, 51, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +51, nil, nil, 51, nil, nil, 51, 51, nil, nil, 51, nil, 51, nil, nil, +nil, 51, 817, nil, 817, 817, 817, 817, nil, 51, nil, nil, nil, nil, 51, +51, 51, 51, 51, 51, nil, nil, nil, 51, 51, 186, 186, 186, 186, 186, +186, nil, nil, nil, 186, 186, nil, nil, nil, 186, 817, 186, 186, 186, 186, +186, 186, 186, 817, 817, 817, 817, 186, 186, 186, 186, 186, 186, 186, nil, +nil, 186, nil, nil, nil, nil, nil, 186, 186, 186, 186, 186, 186, 186, 186, +186, 186, 186, 186, 186, 186, nil, 186, 186, nil, 186, 186, 186, 409, 409, +409, 409, 409, 409, 409, nil, nil, 409, 409, nil, nil, nil, nil, nil, 409, +409, nil, 186, nil, nil, 186, nil, nil, 186, 186, nil, nil, 186, nil, 186, +409, nil, 409, 186, 409, 409, 409, 409, 409, 409, 409, 186, 409, nil, nil, +nil, 186, 186, 186, 186, 186, 186, nil, nil, nil, 186, 186, 187, 187, 187, +187, 187, 187, nil, nil, nil, 187, 187, nil, nil, nil, 187, nil, 187, 187, +187, 187, 187, 187, 187, nil, nil, nil, nil, 187, 187, 187, 187, 187, 187, +187, nil, nil, 187, nil, nil, nil, nil, nil, 187, 187, 187, 187, 187, 187, +187, 187, 187, 187, 187, 187, 187, 187, nil, 187, 187, nil, 187, 187, 187, +411, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 411, 411, nil, 187, nil, nil, 187, nil, nil, 187, 187, nil, nil, 187, +nil, 187, 411, nil, 411, 187, 411, 411, 411, 411, nil, nil, 411, 187, 411, +nil, nil, nil, 187, 187, 187, 187, 187, 187, nil, nil, nil, 187, 187, 204, +204, 204, 204, 204, 204, nil, nil, nil, 204, 204, nil, nil, nil, 204, nil, +204, 204, 204, 204, 204, 204, 204, nil, nil, nil, nil, 204, 204, 204, 204, +204, 204, 204, nil, nil, 204, nil, nil, nil, nil, nil, 204, 204, 204, 204, +204, 204, 204, 204, 204, 204, 204, 204, 204, 204, nil, 204, 204, nil, 204, +204, 204, 412, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 412, 412, nil, 204, nil, nil, 204, nil, nil, 204, 204, nil, +nil, 204, nil, 204, 412, nil, 412, 204, 412, 412, 412, 412, nil, nil, 412, +204, 412, nil, nil, nil, 204, 204, 204, 204, 204, 204, nil, nil, nil, 204, +204, 265, 265, 265, 265, 265, 265, nil, nil, nil, 265, 265, nil, nil, nil, +265, nil, 265, 265, 265, 265, 265, 265, 265, nil, nil, nil, nil, 265, 265, +265, 265, 265, 265, 265, nil, nil, 265, nil, nil, nil, nil, nil, 265, 265, +265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, nil, 265, 265, +nil, 265, 265, 265, 413, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 413, 413, nil, 265, nil, nil, 265, nil, nil, 265, +265, nil, nil, 265, nil, 265, 413, nil, 413, 265, 413, 413, 413, 413, nil, +nil, 413, 265, 413, nil, nil, nil, 265, 265, 265, 265, 265, 265, nil, nil, +nil, 265, 265, 270, 270, 270, 270, 270, 270, nil, nil, nil, 270, 270, nil, +nil, nil, 270, nil, 270, 270, 270, 270, 270, 270, 270, nil, nil, nil, nil, +270, 270, 270, 270, 270, 270, 270, nil, nil, 270, nil, nil, nil, nil, nil, +270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, nil, +270, 270, nil, 270, 270, 270, 414, 414, 414, 414, 414, 414, 414, nil, nil, +414, 414, nil, nil, nil, nil, nil, 414, 414, nil, 270, nil, nil, 270, nil, +nil, 270, 270, nil, nil, 270, nil, 270, 414, nil, 414, 270, 414, 414, 414, +414, 414, 414, 414, 270, 414, nil, nil, nil, 270, 270, 270, 270, 270, 270, +nil, nil, nil, 270, 270, 486, 486, 486, 486, 486, 486, nil, nil, nil, 486, +486, nil, nil, nil, 486, nil, 486, 486, 486, 486, 486, 486, 486, nil, nil, +nil, nil, 486, 486, 486, 486, 486, 486, 486, nil, nil, 486, nil, nil, nil, +nil, nil, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, +486, nil, 486, 486, nil, 486, 486, 486, 415, 415, 415, 415, 415, 415, 415, +nil, nil, 415, 415, nil, nil, nil, nil, nil, 415, 415, nil, 486, nil, nil, +486, nil, nil, 486, 486, nil, nil, 486, nil, 486, 415, nil, 415, 486, 415, +415, 415, 415, 415, 415, 415, 486, 415, nil, nil, nil, 486, 486, 486, 486, +486, 486, nil, nil, nil, 486, 486, 490, 490, 490, 490, 490, 490, nil, nil, +nil, 490, 490, nil, nil, nil, 490, nil, 490, 490, 490, 490, 490, 490, 490, +nil, nil, nil, nil, 490, 490, 490, 490, 490, 490, 490, nil, nil, 490, nil, +nil, nil, nil, nil, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, +490, 490, 490, nil, 490, 490, nil, 490, 490, 490, 416, 416, 416, 416, 416, +416, 416, nil, nil, 416, 416, nil, nil, nil, nil, nil, 416, 416, nil, 490, +nil, nil, 490, nil, nil, 490, 490, nil, nil, 490, nil, 490, 416, nil, 416, +490, 416, 416, 416, 416, 416, 416, 416, 490, 416, nil, nil, nil, 490, 490, +490, 490, 490, 490, nil, nil, nil, 490, 490, 495, 495, 495, 495, 495, 495, +nil, nil, nil, 495, 495, nil, nil, nil, 495, nil, 495, 495, 495, 495, 495, +495, 495, nil, nil, nil, nil, 495, 495, 495, 495, 495, 495, 495, nil, nil, +495, nil, nil, nil, nil, nil, 495, 495, 495, 495, 495, 495, 495, 495, 495, +495, 495, 495, 495, 495, nil, 495, 495, nil, 495, 495, 495, 417, 417, 417, +417, 417, 417, 417, nil, nil, 417, 417, nil, nil, nil, nil, nil, 417, 417, +nil, 495, nil, nil, 495, nil, nil, 495, 495, nil, nil, 495, nil, 495, 417, +nil, 417, 495, 417, 417, 417, 417, 417, 417, 417, 495, 417, nil, nil, nil, +495, 495, 495, 495, 495, 495, nil, nil, nil, 495, 495, 513, 513, 513, 513, +513, 513, nil, nil, nil, 513, 513, nil, nil, nil, 513, nil, 513, 513, 513, +513, 513, 513, 513, nil, nil, nil, nil, 513, 513, 513, 513, 513, 513, 513, +nil, nil, 513, nil, nil, nil, nil, nil, 513, 513, 513, 513, 513, 513, 513, +513, 513, 513, 513, 513, 513, 513, nil, 513, 513, nil, 513, 513, 513, 418, +418, 418, 418, 418, 418, 418, nil, nil, 418, 418, nil, nil, nil, nil, nil, +418, 418, nil, 513, nil, nil, 513, nil, nil, 513, 513, nil, nil, 513, nil, +513, 418, nil, 418, 513, 418, 418, 418, 418, 418, 418, 418, 513, 418, nil, +nil, nil, 513, 513, 513, 513, 513, 513, nil, nil, nil, 513, 513, 559, 559, +559, 559, 559, 559, nil, nil, nil, 559, 559, nil, nil, nil, 559, nil, 559, +559, 559, 559, 559, 559, 559, nil, nil, nil, nil, 559, 559, 559, 559, 559, +559, 559, nil, nil, 559, nil, nil, nil, nil, nil, 559, 559, 559, 559, 559, +559, 559, 559, 559, 559, 559, 559, 559, 559, nil, 559, 559, nil, 559, 559, +559, 421, 421, 421, 421, 421, 421, 421, nil, nil, 421, 421, nil, nil, nil, +nil, nil, 421, 421, nil, 559, nil, nil, 559, nil, nil, 559, 559, nil, nil, +559, nil, 559, 421, nil, 421, 559, 421, 421, 421, 421, 421, 421, 421, 559, +421, nil, nil, nil, 559, 559, 559, 559, 559, 559, nil, nil, nil, 559, 559, +588, 588, 588, 588, 588, 588, nil, nil, nil, 588, 588, nil, nil, nil, 588, +nil, 588, 588, 588, 588, 588, 588, 588, nil, nil, nil, nil, 588, 588, 588, +588, 588, 588, 588, nil, nil, 588, nil, nil, nil, nil, nil, 588, 588, 588, +588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, nil, 588, 588, nil, +588, 588, 588, 422, 422, 422, 422, 422, 422, 422, 422, nil, 422, 422, nil, +nil, nil, nil, nil, 422, 422, nil, 588, nil, nil, 588, nil, nil, 588, 588, +nil, nil, 588, nil, 588, 422, nil, 422, 588, 422, 422, 422, 422, 422, 422, +422, 588, 422, nil, nil, nil, 588, 588, 588, 588, 588, 588, nil, nil, nil, +588, 588, 589, 589, 589, 589, 589, 589, nil, nil, nil, 589, 589, nil, nil, +nil, 589, nil, 589, 589, 589, 589, 589, 589, 589, nil, nil, nil, nil, 589, +589, 589, 589, 589, 589, 589, nil, nil, 589, nil, nil, nil, nil, nil, 589, +589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, nil, 589, +589, nil, 589, 589, 589, 406, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 406, 406, nil, 589, nil, nil, 589, nil, nil, +589, 589, nil, nil, 589, nil, 589, 406, nil, 406, 589, 406, 406, 406, 406, +nil, nil, nil, 589, nil, nil, nil, nil, 589, 589, 589, 589, 589, 589, nil, +nil, nil, 589, 589, 606, 606, 606, 606, 606, 606, nil, nil, nil, 606, 606, +nil, nil, nil, 606, nil, 606, 606, 606, 606, 606, 606, 606, nil, nil, nil, +nil, 606, 606, 606, 606, 606, 606, 606, nil, nil, 606, nil, nil, nil, nil, +nil, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, +nil, 606, 606, nil, 606, 606, 606, 407, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 407, 407, nil, 606, nil, nil, 606, +nil, nil, 606, 606, nil, nil, 606, nil, 606, 407, nil, 407, 606, 407, 407, +407, 407, nil, nil, nil, 606, nil, nil, nil, nil, 606, 606, 606, 606, 606, +606, nil, nil, nil, 606, 606, 639, 639, 639, 639, 639, 639, nil, nil, nil, +639, 639, nil, nil, nil, 639, nil, 639, 639, 639, 639, 639, 639, 639, nil, +nil, nil, nil, 639, 639, 639, 639, 639, 639, 639, nil, nil, 639, nil, nil, +nil, nil, nil, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, +639, 639, nil, 639, 639, nil, 639, 639, 639, 408, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 408, 408, nil, 639, nil, +nil, 639, nil, nil, 639, 639, nil, nil, 639, nil, 639, 408, nil, nil, 639, +408, 408, 408, 408, nil, nil, nil, 639, nil, nil, nil, nil, 639, 639, 639, +639, 639, 639, nil, nil, nil, 639, 639, 644, 644, 644, 644, 644, 644, nil, +nil, nil, 644, 644, nil, nil, nil, 644, nil, 644, 644, 644, 644, 644, 644, +644, nil, nil, nil, nil, 644, 644, 644, 644, 644, 644, 644, nil, nil, 644, +nil, nil, nil, nil, nil, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, +644, 644, 644, 644, nil, 644, 644, nil, 644, 644, 644, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +644, nil, nil, 644, nil, nil, 644, 644, nil, nil, 644, nil, 644, nil, nil, +nil, 644, nil, nil, nil, nil, nil, nil, nil, 644, nil, nil, nil, nil, 644, +644, 644, 644, 644, 644, nil, nil, nil, 644, 644, 671, 671, 671, 671, 671, +671, nil, nil, nil, 671, 671, nil, nil, nil, 671, nil, 671, 671, 671, 671, +671, 671, 671, nil, nil, nil, nil, 671, 671, 671, 671, 671, 671, 671, nil, +nil, 671, nil, nil, nil, nil, nil, 671, 671, 671, 671, 671, 671, 671, 671, +671, 671, 671, 671, 671, 671, nil, 671, 671, nil, 671, 671, 671, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 671, nil, nil, 671, nil, nil, 671, 671, nil, nil, 671, nil, 671, +nil, nil, nil, 671, nil, nil, nil, nil, nil, nil, nil, 671, nil, nil, nil, +nil, 671, 671, 671, 671, 671, 671, nil, nil, nil, 671, 671, 706, 706, 706, +706, 706, 706, nil, nil, nil, 706, 706, nil, nil, nil, 706, nil, 706, 706, +706, 706, 706, 706, 706, nil, nil, nil, nil, 706, 706, 706, 706, 706, 706, +706, nil, nil, 706, nil, nil, nil, nil, nil, 706, 706, 706, 706, 706, 706, +706, 706, 706, 706, 706, 706, 706, 706, nil, 706, 706, nil, 706, 706, 706, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 706, nil, nil, 706, nil, nil, 706, 706, nil, nil, 706, +nil, 706, nil, nil, nil, 706, nil, nil, nil, nil, nil, nil, nil, 706, nil, +nil, nil, nil, 706, 706, 706, 706, 706, 706, nil, nil, nil, 706, 706, 724, +724, 724, 724, 724, 724, nil, nil, nil, 724, 724, nil, nil, nil, 724, nil, +724, 724, 724, 724, 724, 724, 724, nil, nil, nil, nil, 724, 724, 724, 724, +724, 724, 724, nil, nil, 724, nil, nil, nil, nil, nil, 724, 724, 724, 724, +724, 724, 724, 724, 724, 724, 724, 724, 724, 724, nil, 724, 724, nil, 724, +724, 724, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 724, nil, nil, 724, nil, nil, 724, 724, nil, +nil, 724, nil, 724, nil, nil, nil, 724, nil, nil, nil, nil, nil, nil, nil, +724, nil, nil, nil, nil, 724, 724, 724, 724, 724, 724, nil, nil, nil, 724, +724, 736, 736, 736, 736, 736, 736, nil, nil, nil, 736, 736, nil, nil, nil, +736, nil, 736, 736, 736, 736, 736, 736, 736, nil, nil, nil, nil, 736, 736, +736, 736, 736, 736, 736, nil, nil, 736, nil, nil, nil, nil, nil, 736, 736, +736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, nil, 736, 736, +nil, 736, 736, 736, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 736, nil, nil, 736, nil, nil, 736, +736, nil, nil, 736, nil, 736, nil, nil, nil, 736, nil, nil, nil, nil, nil, +nil, nil, 736, nil, nil, nil, nil, 736, 736, 736, 736, 736, 736, nil, nil, +nil, 736, 736, 737, 737, 737, 737, 737, 737, nil, nil, nil, 737, 737, nil, +nil, nil, 737, nil, 737, 737, 737, 737, 737, 737, 737, nil, nil, nil, nil, +737, 737, 737, 737, 737, 737, 737, nil, nil, 737, nil, nil, nil, nil, nil, +737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, nil, +737, 737, nil, 737, 737, 737, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 737, nil, nil, 737, nil, +nil, 737, 737, nil, nil, 737, nil, 737, nil, nil, nil, 737, nil, nil, nil, +nil, nil, nil, nil, 737, nil, nil, nil, nil, 737, 737, 737, 737, 737, 737, +nil, nil, nil, 737, 737, 741, 741, 741, 741, 741, 741, nil, nil, nil, 741, +741, nil, nil, nil, 741, nil, 741, 741, 741, 741, 741, 741, 741, nil, nil, +nil, nil, 741, 741, 741, 741, 741, 741, 741, nil, nil, 741, nil, nil, nil, +nil, nil, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, 741, +741, nil, 741, 741, nil, 741, 741, 741, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 741, nil, nil, +741, nil, nil, 741, 741, nil, nil, 741, nil, 741, nil, nil, nil, 741, nil, +nil, nil, nil, nil, nil, nil, 741, nil, nil, nil, nil, 741, 741, 741, 741, +741, 741, nil, nil, nil, 741, 741, 748, 748, 748, 748, 748, 748, nil, nil, +nil, 748, 748, nil, nil, nil, 748, nil, 748, 748, 748, 748, 748, 748, 748, +nil, nil, nil, nil, 748, 748, 748, 748, 748, 748, 748, nil, nil, 748, nil, +nil, nil, nil, nil, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, +748, 748, 748, nil, 748, 748, nil, 748, 748, 748, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 748, +nil, nil, 748, nil, nil, 748, 748, nil, nil, 748, nil, 748, nil, nil, nil, +748, nil, nil, nil, nil, nil, nil, nil, 748, nil, nil, nil, nil, 748, 748, +748, 748, 748, 748, nil, nil, nil, 748, 748, 794, 794, 794, 794, 794, 794, +nil, nil, nil, 794, 794, nil, nil, nil, 794, nil, 794, 794, 794, 794, 794, +794, 794, nil, nil, nil, nil, 794, 794, 794, 794, 794, 794, 794, nil, nil, +794, nil, nil, nil, nil, nil, 794, 794, 794, 794, 794, 794, 794, 794, 794, +794, 794, 794, 794, 794, nil, 794, 794, nil, 794, 794, 794, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 794, nil, nil, 794, nil, nil, 794, 794, nil, nil, 794, nil, 794, nil, +nil, nil, 794, nil, nil, nil, nil, nil, nil, nil, 794, nil, nil, nil, nil, +794, 794, 794, 794, 794, 794, nil, nil, nil, 794, 794, 838, 838, 838, 838, +838, 838, nil, nil, nil, 838, 838, nil, nil, nil, 838, nil, 838, 838, 838, +838, 838, 838, 838, nil, nil, nil, nil, 838, 838, 838, 838, 838, 838, 838, +nil, nil, 838, nil, nil, nil, nil, nil, 838, 838, 838, 838, 838, 838, 838, +838, 838, 838, 838, 838, 838, 838, nil, 838, 838, nil, 838, 838, 838, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 838, nil, nil, 838, nil, nil, 838, 838, nil, nil, 838, nil, +838, nil, nil, nil, 838, nil, nil, nil, nil, nil, nil, nil, 838, nil, nil, +nil, nil, 838, 838, 838, 838, 838, 838, nil, nil, nil, 838, 838, 845, 845, +845, 845, 845, 845, nil, nil, nil, 845, 845, nil, nil, nil, 845, nil, 845, +845, 845, 845, 845, 845, 845, nil, nil, nil, nil, 845, 845, 845, 845, 845, +845, 845, nil, nil, 845, nil, nil, nil, nil, nil, 845, 845, 845, 845, 845, +845, 845, 845, 845, 845, 845, 845, 845, 845, nil, 845, 845, nil, 845, 845, +845, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 845, nil, nil, 845, nil, nil, 845, 845, nil, nil, +845, nil, 845, nil, nil, nil, 845, nil, nil, nil, nil, nil, nil, nil, 845, +nil, nil, nil, nil, 845, 845, 845, 845, 845, 845, nil, nil, nil, 845, 845, +852, 852, 852, 852, 852, 852, nil, nil, nil, 852, 852, nil, nil, nil, 852, +nil, 852, 852, 852, 852, 852, 852, 852, nil, nil, nil, nil, 852, 852, 852, +852, 852, 852, 852, nil, nil, 852, nil, nil, nil, nil, nil, 852, 852, 852, +852, 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, nil, 852, 852, nil, +852, 852, 852, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 852, nil, nil, 852, nil, nil, 852, 852, +nil, nil, 852, nil, 852, nil, nil, nil, 852, nil, nil, nil, nil, nil, nil, +nil, 852, nil, nil, nil, nil, 852, 852, 852, 852, 852, 852, nil, nil, nil, +852, 852, 5, 5, 5, 5, 5, nil, nil, nil, 5, 5, nil, nil, nil, +5, nil, 5, 5, 5, 5, 5, 5, 5, nil, nil, nil, nil, 5, 5, +5, 5, 5, 5, 5, nil, nil, 5, nil, nil, nil, nil, nil, 5, 5, +5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, nil, 5, 5, +nil, 5, 5, 5, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 5, nil, nil, 5, nil, nil, 5, +5, nil, nil, 5, nil, 5, nil, nil, nil, 5, nil, nil, nil, nil, nil, +nil, nil, 5, nil, nil, nil, nil, 5, 5, 5, 5, 5, 5, nil, nil, +nil, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, +6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, nil, nil, 6, +6, 6, 6, 6, 6, 6, 6, 6, 6, nil, nil, nil, nil, nil, 6, +6, 6, 6, 6, 6, 6, 6, 6, nil, 6, nil, nil, nil, nil, nil, +nil, nil, 6, 6, nil, 6, 6, 6, 6, nil, 6, 6, nil, nil, 6, +nil, nil, nil, nil, 6, 6, 6, 6, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 6, 6, nil, 6, 6, 6, 6, 6, 6, +6, 6, 6, nil, 6, nil, nil, 6, 6, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, nil, nil, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, nil, nil, nil, nil, nil, +7, 7, 7, 7, 7, 7, 7, 7, nil, nil, 7, nil, nil, nil, nil, +nil, nil, nil, 7, 7, nil, 7, 7, 7, 7, nil, 7, 7, nil, nil, +7, nil, nil, nil, nil, 7, 7, 7, 7, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 7, 7, nil, 7, 7, 7, 7, 7, +7, 7, 7, 7, nil, 7, nil, nil, 7, 7, nil, nil, 17, 17, 17, +nil, 17, nil, nil, 7, 17, 17, nil, nil, nil, 17, nil, 17, 17, 17, +17, 17, 17, 17, nil, nil, nil, nil, 17, 17, 17, 17, 17, 17, 17, +nil, nil, 17, nil, nil, nil, nil, nil, nil, 17, nil, nil, 17, 17, 17, +17, 17, 17, 17, 17, 17, 17, nil, 17, 17, nil, 17, 17, 17, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 17, nil, nil, 17, nil, nil, 17, 17, nil, nil, 17, nil, +nil, nil, nil, nil, 17, nil, nil, nil, nil, nil, nil, nil, 17, nil, nil, +nil, nil, 17, 17, 17, 17, 17, 17, nil, nil, nil, 17, 17, 18, 18, +18, nil, 18, nil, nil, nil, 18, 18, nil, nil, nil, 18, nil, 18, 18, +18, 18, 18, 18, 18, nil, nil, nil, nil, 18, 18, 18, 18, 18, 18, +18, nil, nil, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, 18, 18, +18, 18, 18, 18, 18, 18, 18, 18, nil, 18, 18, nil, 18, 18, 18, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 18, nil, nil, 18, nil, nil, 18, 18, nil, nil, 18, +nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, nil, nil, nil, 18, nil, +nil, nil, nil, 18, 18, 18, 18, 18, 18, nil, nil, nil, 18, 18, 22, +22, 22, nil, 22, nil, nil, nil, 22, 22, nil, nil, nil, 22, nil, 22, +22, 22, 22, 22, 22, 22, nil, nil, nil, nil, 22, 22, 22, 22, 22, +22, 22, nil, nil, nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, nil, 22, 22, nil, 22, 22, +22, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 22, nil, nil, 22, nil, nil, 22, 22, nil, nil, +22, nil, 22, nil, 22, nil, 22, nil, nil, nil, nil, nil, nil, nil, 22, +nil, nil, nil, nil, 22, 22, 22, 22, 22, 22, nil, nil, nil, 22, 22, +23, 23, 23, nil, 23, nil, nil, nil, 23, 23, nil, nil, nil, 23, nil, +23, 23, 23, 23, 23, 23, 23, nil, nil, nil, nil, 23, 23, 23, 23, +23, 23, 23, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, +23, 23, 23, 23, 23, 23, 23, 23, 23, 23, nil, 23, 23, nil, 23, +23, 23, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 23, nil, nil, 23, nil, nil, 23, 23, nil, +nil, 23, nil, 23, nil, 23, nil, 23, nil, nil, nil, nil, nil, nil, nil, +23, nil, nil, nil, nil, 23, 23, 23, 23, 23, 23, nil, nil, nil, 23, +23, 24, 24, 24, nil, 24, nil, nil, nil, 24, 24, nil, nil, nil, 24, +nil, 24, 24, 24, 24, 24, 24, 24, nil, nil, nil, nil, 24, 24, 24, +24, 24, 24, 24, nil, nil, nil, nil, nil, nil, nil, nil, nil, 24, nil, +nil, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, nil, 24, 24, nil, +24, 24, 24, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 24, nil, nil, 24, nil, nil, 24, 24, +nil, nil, 24, nil, 24, nil, 24, nil, 24, nil, nil, nil, nil, nil, nil, +nil, 24, nil, nil, nil, nil, 24, 24, 24, 24, 24, 24, nil, nil, nil, +24, 24, 27, 27, 27, nil, 27, nil, nil, nil, 27, 27, nil, nil, nil, +27, nil, 27, 27, 27, 27, 27, 27, 27, nil, nil, nil, nil, 27, 27, +27, 27, 27, 27, 27, nil, nil, nil, nil, nil, nil, nil, nil, nil, 27, +nil, nil, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, nil, 27, 27, +nil, 27, 27, 27, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 27, nil, nil, 27, 27, nil, 27, +27, nil, nil, 27, nil, 27, nil, 27, nil, 27, nil, nil, nil, nil, nil, +nil, nil, 27, nil, nil, nil, nil, 27, 27, 27, 27, 27, 27, nil, nil, +nil, 27, 27, 28, 28, 28, nil, 28, nil, nil, nil, 28, 28, nil, nil, +nil, 28, nil, 28, 28, 28, 28, 28, 28, 28, nil, nil, nil, nil, 28, +28, 28, 28, 28, 28, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, +28, nil, nil, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, nil, 28, +28, nil, 28, 28, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 28, nil, nil, 28, 28, nil, +28, 28, nil, nil, 28, nil, 28, nil, 28, nil, 28, nil, nil, nil, nil, +nil, nil, nil, 28, nil, nil, nil, nil, 28, 28, 28, 28, 28, 28, nil, +nil, nil, 28, 28, 31, 31, 31, nil, 31, nil, nil, nil, 31, 31, nil, +nil, nil, 31, nil, 31, 31, 31, 31, 31, 31, 31, nil, nil, nil, nil, +31, 31, 31, 31, 31, 31, 31, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 31, nil, nil, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, nil, +31, 31, nil, nil, nil, 31, nil, 828, 828, 828, 828, 828, 828, 828, 828, +828, 828, 828, nil, 828, 828, nil, nil, 828, 828, 31, nil, nil, 31, nil, +nil, 31, 31, nil, nil, 31, nil, 31, nil, 828, nil, 828, nil, 828, 828, +828, 828, 828, 828, 828, nil, 828, nil, nil, 31, 31, 31, 31, 31, 31, +nil, nil, nil, 31, 31, 32, 32, 32, 828, 32, 828, nil, nil, 32, 32, +nil, nil, nil, 32, nil, 32, 32, 32, 32, 32, 32, 32, nil, nil, nil, +nil, 32, 32, 32, 32, 32, 32, 32, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 32, nil, nil, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, +nil, 32, 32, nil, nil, nil, 32, nil, 19, 19, 19, 19, 19, 19, 19, +19, 19, 19, 19, nil, 19, 19, nil, nil, 19, 19, 32, nil, nil, 32, +nil, nil, 32, 32, nil, nil, 32, nil, nil, nil, 19, nil, 19, nil, 19, +19, 19, 19, 19, 19, 19, nil, 19, nil, nil, 32, 32, 32, 32, 32, +32, nil, nil, nil, 32, 32, 38, 38, 38, 19, 38, nil, nil, nil, 38, +38, nil, nil, nil, 38, nil, 38, 38, 38, 38, 38, 38, 38, nil, nil, +nil, nil, 38, 38, 38, 38, 38, 38, 38, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 38, nil, nil, 38, 38, 38, 38, 38, 38, 38, 38, 38, +38, nil, 38, 38, nil, 38, 38, 38, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 38, nil, nil, +38, nil, nil, 38, 38, nil, nil, 38, nil, nil, nil, nil, nil, 38, nil, +nil, nil, nil, nil, nil, nil, 38, nil, nil, nil, nil, 38, 38, 38, 38, +38, 38, nil, nil, nil, 38, 38, 39, 39, 39, nil, 39, nil, nil, nil, +39, 39, nil, nil, nil, 39, nil, 39, 39, 39, 39, 39, 39, 39, nil, +nil, nil, nil, 39, 39, 39, 39, 39, 39, 39, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 39, nil, nil, 39, 39, 39, 39, 39, 39, 39, 39, +39, 39, nil, 39, 39, nil, 39, 39, 39, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 39, nil, +nil, 39, nil, nil, 39, 39, nil, nil, 39, nil, nil, nil, nil, nil, 39, +nil, nil, nil, nil, nil, nil, nil, 39, nil, nil, nil, nil, 39, 39, 39, +39, 39, 39, nil, nil, nil, 39, 39, 40, 40, 40, nil, 40, nil, nil, +nil, 40, 40, nil, nil, nil, 40, nil, 40, 40, 40, 40, 40, 40, 40, +nil, nil, nil, nil, 40, 40, 40, 40, 40, 40, 40, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 40, nil, nil, 40, 40, 40, 40, 40, 40, 40, +40, 40, 40, nil, 40, 40, nil, 40, 40, 40, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 40, +nil, nil, 40, nil, nil, 40, 40, nil, nil, 40, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, 40, 40, +40, 40, 40, 40, nil, nil, nil, 40, 40, 52, 52, 52, nil, 52, nil, +nil, nil, 52, 52, nil, nil, nil, 52, nil, 52, 52, 52, 52, 52, 52, +52, nil, nil, nil, nil, 52, 52, 52, 52, 52, 52, 52, nil, nil, 52, +nil, nil, nil, nil, nil, nil, 52, nil, nil, 52, 52, 52, 52, 52, 52, +52, 52, 52, 52, nil, 52, 52, nil, 52, 52, 52, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +52, nil, nil, 52, nil, nil, 52, 52, nil, nil, 52, nil, nil, nil, nil, +nil, 52, nil, nil, nil, nil, nil, nil, nil, 52, nil, nil, nil, nil, 52, +52, 52, 52, 52, 52, nil, nil, nil, 52, 52, 53, 53, 53, nil, 53, +nil, nil, nil, 53, 53, nil, nil, nil, 53, nil, 53, 53, 53, 53, 53, +53, 53, nil, nil, nil, nil, 53, 53, 53, 53, 53, 53, 53, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 53, nil, nil, 53, 53, 53, 53, 53, +53, 53, 53, 53, 53, nil, 53, 53, nil, 53, 53, 53, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 53, nil, nil, 53, nil, nil, 53, 53, nil, nil, 53, nil, 53, nil, +nil, nil, 53, nil, nil, nil, nil, nil, nil, nil, 53, nil, nil, nil, nil, +53, 53, 53, 53, 53, 53, nil, nil, nil, 53, 53, 54, 54, 54, nil, +54, nil, nil, nil, 54, 54, nil, nil, nil, 54, nil, 54, 54, 54, 54, +54, 54, 54, nil, nil, nil, nil, 54, 54, 54, 54, 54, 54, 54, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, nil, 54, 54, 54, 54, +54, 54, 54, 54, 54, 54, nil, 54, 54, nil, 54, 54, 54, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 54, nil, nil, 54, nil, nil, 54, 54, nil, nil, 54, nil, nil, +nil, nil, nil, 54, nil, nil, nil, nil, nil, nil, nil, 54, nil, nil, nil, +nil, 54, 54, 54, 54, 54, 54, nil, nil, nil, 54, 54, 56, 56, 56, +nil, 56, nil, nil, nil, 56, 56, nil, nil, nil, 56, nil, 56, 56, 56, +56, 56, 56, 56, nil, nil, nil, nil, 56, 56, 56, 56, 56, 56, 56, +nil, nil, 56, nil, nil, nil, nil, nil, nil, 56, nil, nil, 56, 56, 56, +56, 56, 56, 56, 56, 56, 56, nil, 56, 56, nil, 56, 56, 56, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 56, nil, nil, 56, nil, nil, 56, 56, nil, nil, 56, nil, +nil, nil, nil, nil, 56, nil, nil, nil, nil, nil, nil, nil, 56, nil, nil, +nil, nil, 56, 56, 56, 56, 56, 56, nil, nil, nil, 56, 56, 57, 57, +57, nil, 57, nil, nil, nil, 57, 57, nil, nil, nil, 57, nil, 57, 57, +57, 57, 57, 57, 57, nil, nil, nil, nil, 57, 57, 57, 57, 57, 57, +57, nil, nil, 57, nil, nil, nil, nil, nil, nil, 57, nil, nil, 57, 57, +57, 57, 57, 57, 57, 57, 57, 57, nil, 57, 57, nil, 57, 57, 57, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 57, nil, nil, 57, nil, nil, 57, 57, nil, nil, 57, +nil, nil, nil, nil, nil, 57, nil, nil, nil, nil, nil, nil, nil, 57, nil, +nil, nil, nil, 57, 57, 57, 57, 57, 57, nil, nil, nil, 57, 57, 61, +61, 61, nil, 61, nil, nil, nil, 61, 61, nil, nil, nil, 61, nil, 61, +61, 61, 61, 61, 61, 61, nil, nil, nil, nil, 61, 61, 61, 61, 61, +61, 61, nil, nil, nil, nil, nil, nil, nil, nil, nil, 61, nil, nil, 61, +61, 61, 61, 61, 61, 61, 61, 61, 61, nil, 61, 61, nil, nil, nil, +61, nil, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, nil, 237, +237, nil, nil, 237, 237, 61, nil, nil, 61, nil, nil, 61, 61, nil, nil, +61, nil, 61, nil, 237, nil, 237, nil, 237, 237, 237, 237, 237, 237, 237, +nil, 237, nil, nil, 61, 61, 61, 61, 61, 61, nil, nil, nil, 61, 61, +62, 62, 62, 237, 62, nil, nil, nil, 62, 62, nil, nil, nil, 62, nil, +62, 62, 62, 62, 62, 62, 62, nil, nil, nil, nil, 62, 62, 62, 62, +62, 62, 62, nil, nil, nil, nil, nil, nil, nil, nil, nil, 62, nil, nil, +62, 62, 62, 62, 62, 62, 62, 62, 62, 62, nil, 62, 62, nil, nil, +nil, 62, nil, 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, nil, +374, 374, nil, 62, 374, 374, 62, nil, nil, 62, nil, nil, 62, 62, nil, +nil, 62, nil, nil, nil, 374, nil, 374, nil, 374, 374, 374, 374, 374, 374, +374, nil, 374, nil, nil, 62, 62, 62, 62, 62, 62, nil, nil, nil, 62, +62, 63, 63, 63, 374, 63, nil, nil, nil, 63, 63, nil, nil, nil, 63, +nil, 63, 63, 63, 63, 63, 63, 63, nil, nil, nil, nil, 63, 63, 63, +63, 63, 63, 63, nil, nil, nil, nil, nil, nil, nil, nil, nil, 63, nil, +nil, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, nil, 63, 63, nil, +nil, nil, 63, nil, 388, 388, 388, 388, 388, 388, 388, 388, 388, 388, 388, +nil, 388, 388, nil, nil, 388, 388, 63, nil, nil, 63, nil, nil, 63, 63, +nil, nil, 63, nil, nil, nil, 388, nil, 388, nil, 388, 388, 388, 388, 388, +388, 388, nil, 388, nil, nil, 63, 63, 63, 63, 63, 63, nil, nil, nil, +63, 63, 82, 82, 82, 388, 82, nil, nil, nil, 82, 82, nil, nil, nil, +82, nil, 82, 82, 82, 82, 82, 82, 82, nil, 82, nil, nil, 82, 82, +82, 82, 82, 82, 82, nil, nil, nil, nil, nil, nil, nil, nil, nil, 82, +nil, nil, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, nil, 82, 82, +nil, 82, 82, 82, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 82, nil, nil, 82, 82, nil, 82, +82, nil, nil, 82, nil, 82, nil, 82, nil, 82, nil, nil, nil, nil, nil, +nil, nil, 82, nil, 82, nil, nil, 82, 82, 82, 82, 82, 82, nil, nil, +nil, 82, 82, 86, 86, 86, nil, 86, nil, nil, nil, 86, 86, nil, nil, +nil, 86, nil, 86, 86, 86, 86, 86, 86, 86, nil, 86, nil, nil, 86, +86, 86, 86, 86, 86, 86, nil, nil, nil, nil, nil, nil, nil, nil, nil, +86, nil, nil, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, nil, 86, +86, nil, 86, 86, 86, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 86, nil, nil, 86, 86, nil, +86, 86, nil, nil, 86, nil, 86, nil, 86, nil, 86, nil, nil, nil, nil, +nil, nil, nil, 86, nil, 86, nil, nil, 86, 86, 86, 86, 86, 86, nil, +nil, nil, 86, 86, 101, 101, 101, nil, 101, nil, nil, nil, 101, 101, nil, +nil, nil, 101, nil, 101, 101, 101, 101, 101, 101, 101, nil, nil, nil, nil, +101, 101, 101, 101, 101, 101, 101, nil, nil, 101, nil, nil, nil, nil, nil, +nil, 101, nil, nil, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, nil, +101, 101, nil, 101, 101, 101, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 101, nil, nil, 101, nil, +nil, 101, 101, nil, nil, 101, nil, nil, nil, nil, nil, 101, nil, nil, nil, +nil, nil, nil, nil, 101, nil, nil, nil, nil, 101, 101, 101, 101, 101, 101, +nil, nil, nil, 101, 101, 102, 102, 102, nil, 102, nil, nil, nil, 102, 102, +nil, nil, nil, 102, nil, 102, 102, 102, 102, 102, 102, 102, nil, nil, nil, +nil, 102, 102, 102, 102, 102, 102, 102, nil, nil, 102, nil, nil, nil, nil, +nil, nil, 102, nil, nil, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +nil, 102, 102, nil, 102, 102, 102, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 102, nil, nil, 102, +nil, nil, 102, 102, nil, nil, 102, nil, nil, nil, nil, nil, 102, nil, nil, +nil, nil, nil, nil, nil, 102, nil, nil, nil, nil, 102, 102, 102, 102, 102, +102, nil, nil, nil, 102, 102, 103, 103, 103, nil, 103, nil, nil, nil, 103, +103, nil, nil, nil, 103, nil, 103, 103, 103, 103, 103, 103, 103, nil, nil, +nil, nil, 103, 103, 103, 103, 103, 103, 103, nil, nil, 103, nil, nil, nil, +nil, nil, nil, 103, nil, nil, 103, 103, 103, 103, 103, 103, 103, 103, 103, +103, nil, 103, 103, nil, 103, 103, 103, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 103, nil, nil, +103, nil, nil, 103, 103, nil, nil, 103, nil, nil, nil, nil, nil, 103, nil, +nil, nil, nil, nil, nil, nil, 103, nil, nil, nil, nil, 103, 103, 103, 103, +103, 103, nil, nil, nil, 103, 103, 104, 104, 104, nil, 104, nil, nil, nil, +104, 104, nil, nil, nil, 104, nil, 104, 104, 104, 104, 104, 104, 104, nil, +nil, nil, nil, 104, 104, 104, 104, 104, 104, 104, nil, nil, 104, nil, nil, +nil, nil, nil, nil, 104, nil, nil, 104, 104, 104, 104, 104, 104, 104, 104, +104, 104, nil, 104, 104, nil, 104, 104, 104, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 104, nil, +nil, 104, nil, nil, 104, 104, nil, nil, 104, nil, nil, nil, nil, nil, 104, +nil, nil, nil, nil, nil, nil, nil, 104, nil, nil, nil, nil, 104, 104, 104, +104, 104, 104, nil, nil, nil, 104, 104, 105, 105, 105, 105, 105, nil, nil, +nil, 105, 105, nil, nil, nil, 105, nil, 105, 105, 105, 105, 105, 105, 105, +nil, nil, nil, nil, 105, 105, 105, 105, 105, 105, 105, nil, nil, 105, nil, +nil, nil, nil, nil, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, +105, 105, 105, nil, 105, 105, nil, 105, 105, 105, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, +nil, nil, 105, nil, nil, 105, 105, nil, nil, 105, nil, 105, nil, nil, nil, +105, nil, nil, nil, nil, nil, nil, nil, 105, nil, nil, nil, nil, 105, 105, +105, 105, 105, 105, nil, nil, nil, 105, 105, 188, 188, 188, nil, 188, nil, +nil, nil, 188, 188, nil, nil, nil, 188, nil, 188, 188, 188, 188, 188, 188, +188, nil, nil, nil, nil, 188, 188, 188, 188, 188, 188, 188, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 188, nil, nil, 188, 188, 188, 188, 188, 188, +188, 188, 188, 188, nil, 188, 188, nil, 188, 188, 188, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +188, nil, nil, 188, nil, nil, 188, 188, nil, nil, 188, nil, 188, nil, nil, +nil, 188, nil, nil, nil, nil, nil, nil, nil, 188, nil, nil, nil, nil, 188, +188, 188, 188, 188, 188, nil, nil, nil, 188, 188, 189, 189, 189, nil, 189, +nil, nil, nil, 189, 189, nil, nil, nil, 189, nil, 189, 189, 189, 189, 189, +189, 189, nil, nil, nil, nil, 189, 189, 189, 189, 189, 189, 189, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 189, nil, nil, 189, 189, 189, 189, 189, +189, 189, 189, 189, 189, nil, 189, 189, nil, 189, 189, 189, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 189, nil, nil, 189, nil, nil, 189, 189, nil, nil, 189, nil, 189, nil, +nil, nil, 189, nil, nil, nil, nil, nil, nil, nil, 189, nil, nil, nil, nil, +189, 189, 189, 189, 189, 189, nil, nil, nil, 189, 189, 190, 190, 190, nil, +190, nil, nil, nil, 190, 190, nil, nil, nil, 190, nil, 190, 190, 190, 190, +190, 190, 190, nil, nil, nil, nil, 190, 190, 190, 190, 190, 190, 190, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 190, nil, nil, 190, 190, 190, 190, +190, 190, 190, 190, 190, 190, nil, 190, 190, nil, 190, 190, 190, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 190, nil, nil, 190, nil, nil, 190, 190, nil, nil, 190, nil, nil, +nil, nil, nil, 190, nil, nil, nil, nil, nil, nil, nil, 190, nil, nil, nil, +nil, 190, 190, 190, 190, 190, 190, nil, nil, nil, 190, 190, 191, 191, 191, +nil, 191, nil, nil, nil, 191, 191, nil, nil, nil, 191, nil, 191, 191, 191, +191, 191, 191, 191, nil, nil, nil, nil, 191, 191, 191, 191, 191, 191, 191, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 191, nil, nil, 191, 191, 191, +191, 191, 191, 191, 191, 191, 191, nil, 191, 191, nil, 191, 191, 191, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 191, nil, nil, 191, nil, nil, 191, 191, nil, nil, 191, nil, +191, nil, nil, nil, 191, nil, nil, nil, nil, nil, nil, nil, 191, nil, nil, +nil, nil, 191, 191, 191, 191, 191, 191, nil, nil, nil, 191, 191, 194, 194, +194, nil, 194, nil, nil, nil, 194, 194, nil, nil, nil, 194, nil, 194, 194, +194, 194, 194, 194, 194, nil, nil, nil, nil, 194, 194, 194, 194, 194, 194, +194, nil, nil, nil, nil, nil, nil, nil, nil, nil, 194, nil, nil, 194, 194, +194, 194, 194, 194, 194, 194, 194, 194, nil, 194, 194, nil, 194, 194, 194, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 194, nil, nil, 194, nil, nil, 194, 194, nil, nil, 194, +nil, nil, nil, nil, nil, 194, nil, nil, nil, nil, nil, nil, nil, 194, nil, +nil, nil, nil, 194, 194, 194, 194, 194, 194, nil, nil, nil, 194, 194, 195, +195, 195, nil, 195, nil, nil, nil, 195, 195, nil, nil, nil, 195, nil, 195, +195, 195, 195, 195, 195, 195, nil, nil, nil, nil, 195, 195, 195, 195, 195, +195, 195, nil, nil, 195, nil, nil, nil, nil, nil, nil, 195, nil, nil, 195, +195, 195, 195, 195, 195, 195, 195, 195, 195, nil, 195, 195, nil, 195, 195, +195, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 195, nil, nil, 195, nil, nil, 195, 195, nil, nil, +195, nil, nil, nil, nil, nil, 195, nil, nil, nil, nil, nil, nil, nil, 195, +nil, nil, nil, nil, 195, 195, 195, 195, 195, 195, nil, nil, nil, 195, 195, +196, 196, 196, nil, 196, nil, nil, nil, 196, 196, nil, nil, nil, 196, nil, +196, 196, 196, 196, 196, 196, 196, nil, nil, nil, nil, 196, 196, 196, 196, +196, 196, 196, nil, nil, 196, nil, nil, nil, nil, nil, nil, 196, nil, nil, +196, 196, 196, 196, 196, 196, 196, 196, 196, 196, nil, 196, 196, nil, 196, +196, 196, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 196, nil, nil, 196, nil, nil, 196, 196, nil, +nil, 196, nil, nil, nil, nil, nil, 196, nil, nil, nil, nil, nil, nil, nil, +196, nil, nil, nil, nil, 196, 196, 196, 196, 196, 196, nil, nil, nil, 196, +196, 207, 207, 207, nil, 207, nil, nil, nil, 207, 207, nil, nil, nil, 207, +nil, 207, 207, 207, 207, 207, 207, 207, nil, nil, nil, nil, 207, 207, 207, +207, 207, 207, 207, nil, nil, nil, nil, nil, nil, nil, nil, nil, 207, nil, +nil, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, nil, 207, 207, nil, +207, 207, 207, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, 207, nil, nil, 207, 207, +nil, nil, 207, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, nil, nil, +nil, 207, nil, nil, nil, nil, 207, 207, 207, 207, 207, 207, nil, nil, nil, +207, 207, 208, 208, 208, nil, 208, nil, nil, nil, 208, 208, nil, nil, nil, +208, nil, 208, 208, 208, 208, 208, 208, 208, nil, nil, nil, nil, 208, 208, +208, 208, 208, 208, 208, nil, nil, nil, nil, nil, nil, nil, nil, nil, 208, +nil, nil, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, nil, 208, 208, +nil, 208, 208, 208, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 208, nil, nil, 208, nil, nil, 208, +208, nil, nil, 208, nil, nil, nil, nil, nil, 208, nil, nil, nil, nil, nil, +nil, nil, 208, nil, nil, nil, nil, 208, 208, 208, 208, 208, 208, nil, nil, +nil, 208, 208, 209, 209, 209, nil, 209, nil, nil, nil, 209, 209, nil, nil, +nil, 209, nil, 209, 209, 209, 209, 209, 209, 209, nil, nil, nil, nil, 209, +209, 209, 209, 209, 209, 209, nil, nil, nil, nil, nil, nil, nil, nil, nil, +209, nil, nil, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, nil, 209, +209, nil, 209, 209, 209, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 209, nil, nil, 209, nil, nil, +209, 209, nil, nil, 209, nil, nil, nil, nil, nil, 209, nil, nil, nil, nil, +nil, nil, nil, 209, nil, nil, nil, nil, 209, 209, 209, 209, 209, 209, nil, +nil, nil, 209, 209, 210, 210, 210, nil, 210, nil, nil, nil, 210, 210, nil, +nil, nil, 210, nil, 210, 210, 210, 210, 210, 210, 210, nil, nil, nil, nil, +210, 210, 210, 210, 210, 210, 210, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 210, nil, nil, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, nil, +210, 210, nil, 210, 210, 210, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 210, nil, +nil, 210, 210, nil, nil, 210, nil, nil, nil, nil, nil, 210, nil, nil, nil, +nil, nil, nil, nil, 210, nil, nil, nil, nil, 210, 210, 210, 210, 210, 210, +nil, nil, nil, 210, 210, 211, 211, 211, nil, 211, nil, nil, nil, 211, 211, +nil, nil, nil, 211, nil, 211, 211, 211, 211, 211, 211, 211, nil, nil, nil, +nil, 211, 211, 211, 211, 211, 211, 211, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 211, nil, nil, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, +nil, 211, 211, nil, 211, 211, 211, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 211, nil, nil, 211, +nil, nil, 211, 211, nil, nil, 211, nil, nil, nil, nil, nil, 211, nil, nil, +nil, nil, nil, nil, nil, 211, nil, nil, nil, nil, 211, 211, 211, 211, 211, +211, nil, nil, nil, 211, 211, 212, 212, 212, nil, 212, nil, nil, nil, 212, +212, nil, nil, nil, 212, nil, 212, 212, 212, 212, 212, 212, 212, nil, nil, +nil, nil, 212, 212, 212, 212, 212, 212, 212, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 212, nil, nil, 212, 212, 212, 212, 212, 212, 212, 212, 212, +212, nil, 212, 212, nil, 212, 212, 212, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 212, nil, nil, +212, nil, nil, 212, 212, nil, nil, 212, nil, nil, nil, nil, nil, 212, nil, +nil, nil, nil, nil, nil, nil, 212, nil, nil, nil, nil, 212, 212, 212, 212, +212, 212, nil, nil, nil, 212, 212, 213, 213, 213, nil, 213, nil, nil, nil, +213, 213, nil, nil, nil, 213, nil, 213, 213, 213, 213, 213, 213, 213, nil, +nil, nil, nil, 213, 213, 213, 213, 213, 213, 213, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 213, nil, nil, 213, 213, 213, 213, 213, 213, 213, 213, +213, 213, nil, 213, 213, nil, 213, 213, 213, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 213, nil, +nil, 213, nil, nil, 213, 213, nil, nil, 213, nil, nil, nil, nil, nil, 213, +nil, nil, nil, nil, nil, nil, nil, 213, nil, nil, nil, nil, 213, 213, 213, +213, 213, 213, nil, nil, nil, 213, 213, 214, 214, 214, nil, 214, nil, nil, +nil, 214, 214, nil, nil, nil, 214, nil, 214, 214, 214, 214, 214, 214, 214, +nil, nil, nil, nil, 214, 214, 214, 214, 214, 214, 214, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 214, nil, nil, 214, 214, 214, 214, 214, 214, 214, +214, 214, 214, nil, 214, 214, nil, 214, 214, 214, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 214, +nil, nil, 214, nil, nil, 214, 214, nil, nil, 214, nil, nil, nil, nil, nil, +214, nil, nil, nil, nil, nil, nil, nil, 214, nil, nil, nil, nil, 214, 214, +214, 214, 214, 214, nil, nil, nil, 214, 214, 215, 215, 215, nil, 215, nil, +nil, nil, 215, 215, nil, nil, nil, 215, nil, 215, 215, 215, 215, 215, 215, +215, nil, nil, nil, nil, 215, 215, 215, 215, 215, 215, 215, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 215, nil, nil, 215, 215, 215, 215, 215, 215, +215, 215, 215, 215, nil, 215, 215, nil, 215, 215, 215, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +215, nil, nil, 215, nil, nil, 215, 215, nil, nil, 215, nil, nil, nil, nil, +nil, 215, nil, nil, nil, nil, nil, nil, nil, 215, nil, nil, nil, nil, 215, +215, 215, 215, 215, 215, nil, nil, nil, 215, 215, 216, 216, 216, nil, 216, +nil, nil, nil, 216, 216, nil, nil, nil, 216, nil, 216, 216, 216, 216, 216, +216, 216, nil, nil, nil, nil, 216, 216, 216, 216, 216, 216, 216, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 216, nil, nil, 216, 216, 216, 216, 216, +216, 216, 216, 216, 216, nil, 216, 216, nil, 216, 216, 216, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 216, nil, nil, 216, nil, nil, 216, 216, nil, nil, 216, nil, nil, nil, +nil, nil, 216, nil, nil, nil, nil, nil, nil, nil, 216, nil, nil, nil, nil, +216, 216, 216, 216, 216, 216, nil, nil, nil, 216, 216, 217, 217, 217, nil, +217, nil, nil, nil, 217, 217, nil, nil, nil, 217, nil, 217, 217, 217, 217, +217, 217, 217, nil, nil, nil, nil, 217, 217, 217, 217, 217, 217, 217, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 217, nil, nil, 217, 217, 217, 217, +217, 217, 217, 217, 217, 217, nil, 217, 217, nil, 217, 217, 217, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 217, nil, nil, 217, nil, nil, 217, 217, nil, nil, 217, nil, nil, +nil, nil, nil, 217, nil, nil, nil, nil, nil, nil, nil, 217, nil, nil, nil, +nil, 217, 217, 217, 217, 217, 217, nil, nil, nil, 217, 217, 218, 218, 218, +nil, 218, nil, nil, nil, 218, 218, nil, nil, nil, 218, nil, 218, 218, 218, +218, 218, 218, 218, nil, nil, nil, nil, 218, 218, 218, 218, 218, 218, 218, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, 218, 218, 218, +218, 218, 218, 218, 218, 218, 218, nil, 218, 218, nil, 218, 218, 218, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 218, nil, nil, 218, nil, nil, 218, 218, nil, nil, 218, nil, +nil, nil, nil, nil, 218, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, +nil, nil, 218, 218, 218, 218, 218, 218, nil, nil, nil, 218, 218, 219, 219, +219, nil, 219, nil, nil, nil, 219, 219, nil, nil, nil, 219, nil, 219, 219, +219, 219, 219, 219, 219, nil, nil, nil, nil, 219, 219, 219, 219, 219, 219, +219, nil, nil, nil, nil, nil, nil, nil, nil, nil, 219, nil, nil, 219, 219, +219, 219, 219, 219, 219, 219, 219, 219, nil, 219, 219, nil, 219, 219, 219, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 219, nil, nil, 219, nil, nil, 219, 219, nil, nil, 219, +nil, nil, nil, nil, nil, 219, nil, nil, nil, nil, nil, nil, nil, 219, nil, +nil, nil, nil, 219, 219, 219, 219, 219, 219, nil, nil, nil, 219, 219, 220, +220, 220, nil, 220, nil, nil, nil, 220, 220, nil, nil, nil, 220, nil, 220, +220, 220, 220, 220, 220, 220, nil, nil, nil, nil, 220, 220, 220, 220, 220, +220, 220, nil, nil, nil, nil, nil, nil, nil, nil, nil, 220, nil, nil, 220, +220, 220, 220, 220, 220, 220, 220, 220, 220, nil, 220, 220, nil, 220, 220, +220, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 220, nil, nil, 220, nil, nil, 220, 220, nil, nil, +220, nil, nil, nil, nil, nil, 220, nil, nil, nil, nil, nil, nil, nil, 220, +nil, nil, nil, nil, 220, 220, 220, 220, 220, 220, nil, nil, nil, 220, 220, +221, 221, 221, nil, 221, nil, nil, nil, 221, 221, nil, nil, nil, 221, nil, +221, 221, 221, 221, 221, 221, 221, nil, nil, nil, nil, 221, 221, 221, 221, +221, 221, 221, nil, nil, nil, nil, nil, nil, nil, nil, nil, 221, nil, nil, +221, 221, 221, 221, 221, 221, 221, 221, 221, 221, nil, 221, 221, nil, 221, +221, 221, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 221, nil, nil, 221, nil, nil, 221, 221, nil, +nil, 221, nil, nil, nil, nil, nil, 221, nil, nil, nil, nil, nil, nil, nil, +221, nil, nil, nil, nil, 221, 221, 221, 221, 221, 221, nil, nil, nil, 221, +221, 222, 222, 222, nil, 222, nil, nil, nil, 222, 222, nil, nil, nil, 222, +nil, 222, 222, 222, 222, 222, 222, 222, nil, nil, nil, nil, 222, 222, 222, +222, 222, 222, 222, nil, nil, nil, nil, nil, nil, nil, nil, nil, 222, nil, +nil, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, nil, 222, 222, nil, +222, 222, 222, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 222, nil, nil, 222, nil, nil, 222, 222, +nil, nil, 222, nil, nil, nil, nil, nil, 222, nil, nil, nil, nil, nil, nil, +nil, 222, nil, nil, nil, nil, 222, 222, 222, 222, 222, 222, nil, nil, nil, +222, 222, 223, 223, 223, nil, 223, nil, nil, nil, 223, 223, nil, nil, nil, +223, nil, 223, 223, 223, 223, 223, 223, 223, nil, nil, nil, nil, 223, 223, +223, 223, 223, 223, 223, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, nil, 223, 223, +nil, 223, 223, 223, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 223, nil, nil, 223, +223, nil, nil, 223, nil, nil, nil, nil, nil, 223, nil, nil, nil, nil, nil, +nil, nil, 223, nil, nil, nil, nil, 223, 223, 223, 223, 223, 223, nil, nil, +nil, 223, 223, 224, 224, 224, nil, 224, nil, nil, nil, 224, 224, nil, nil, +nil, 224, nil, 224, 224, 224, 224, 224, 224, 224, nil, nil, nil, nil, 224, +224, 224, 224, 224, 224, 224, nil, nil, nil, nil, nil, nil, nil, nil, nil, +224, nil, nil, 224, 224, 224, 224, 224, 224, 224, 224, 224, 224, nil, 224, +224, nil, 224, 224, 224, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 224, nil, nil, 224, nil, nil, +224, 224, nil, nil, 224, nil, nil, nil, nil, nil, 224, nil, nil, nil, nil, +nil, nil, nil, 224, nil, nil, nil, nil, 224, 224, 224, 224, 224, 224, nil, +nil, nil, 224, 224, 225, 225, 225, nil, 225, nil, nil, nil, 225, 225, nil, +nil, nil, 225, nil, 225, 225, 225, 225, 225, 225, 225, nil, nil, nil, nil, +225, 225, 225, 225, 225, 225, 225, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 225, nil, nil, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, nil, +225, 225, nil, 225, 225, 225, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 225, nil, nil, 225, nil, +nil, 225, 225, nil, nil, 225, nil, nil, nil, nil, nil, 225, nil, nil, nil, +nil, nil, nil, nil, 225, nil, nil, nil, nil, 225, 225, 225, 225, 225, 225, +nil, nil, nil, 225, 225, 226, 226, 226, nil, 226, nil, nil, nil, 226, 226, +nil, nil, nil, 226, nil, 226, 226, 226, 226, 226, 226, 226, nil, nil, nil, +nil, 226, 226, 226, 226, 226, 226, 226, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 226, nil, nil, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, +nil, 226, 226, nil, 226, 226, 226, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 226, nil, nil, 226, +nil, nil, 226, 226, nil, nil, 226, nil, nil, nil, nil, nil, 226, nil, nil, +nil, nil, nil, nil, nil, 226, nil, nil, nil, nil, 226, 226, 226, 226, 226, +226, nil, nil, nil, 226, 226, 227, 227, 227, nil, 227, nil, nil, nil, 227, +227, nil, nil, nil, 227, nil, 227, 227, 227, 227, 227, 227, 227, nil, nil, +nil, nil, 227, 227, 227, 227, 227, 227, 227, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 227, nil, nil, 227, 227, 227, 227, 227, 227, 227, 227, 227, +227, nil, 227, 227, nil, 227, 227, 227, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 227, nil, nil, +227, nil, nil, 227, 227, nil, nil, 227, nil, nil, nil, nil, nil, 227, nil, +nil, nil, nil, nil, nil, nil, 227, nil, nil, nil, nil, 227, 227, 227, 227, +227, 227, nil, nil, nil, 227, 227, 228, 228, 228, nil, 228, nil, nil, nil, +228, 228, nil, nil, nil, 228, nil, 228, 228, 228, 228, 228, 228, 228, nil, +nil, nil, nil, 228, 228, 228, 228, 228, 228, 228, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 228, nil, nil, 228, 228, 228, 228, 228, 228, 228, 228, +228, 228, nil, 228, 228, nil, 228, 228, 228, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, +nil, 228, nil, nil, 228, 228, nil, nil, 228, nil, nil, nil, nil, nil, 228, +nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 228, 228, 228, +228, 228, 228, nil, nil, nil, 228, 228, 229, 229, 229, nil, 229, nil, nil, +nil, 229, 229, nil, nil, nil, 229, nil, 229, 229, 229, 229, 229, 229, 229, +nil, nil, nil, nil, 229, 229, 229, 229, 229, 229, 229, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 229, nil, nil, 229, 229, 229, 229, 229, 229, 229, +229, 229, 229, nil, 229, 229, nil, 229, 229, 229, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 229, +nil, nil, 229, nil, nil, 229, 229, nil, nil, 229, nil, nil, nil, nil, nil, +229, nil, nil, nil, nil, nil, nil, nil, 229, nil, nil, nil, nil, 229, 229, +229, 229, 229, 229, nil, nil, nil, 229, 229, 230, 230, 230, nil, 230, nil, +nil, nil, 230, 230, nil, nil, nil, 230, nil, 230, 230, 230, 230, 230, 230, +230, nil, nil, nil, nil, 230, 230, 230, 230, 230, 230, 230, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 230, nil, nil, 230, 230, 230, 230, 230, 230, +230, 230, 230, 230, nil, 230, 230, nil, 230, 230, 230, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +230, nil, nil, 230, nil, nil, 230, 230, nil, nil, 230, nil, nil, nil, nil, +nil, 230, nil, nil, nil, nil, nil, nil, nil, 230, nil, nil, nil, nil, 230, +230, 230, 230, 230, 230, nil, nil, nil, 230, 230, 231, 231, 231, nil, 231, +nil, nil, nil, 231, 231, nil, nil, nil, 231, nil, 231, 231, 231, 231, 231, +231, 231, nil, nil, nil, nil, 231, 231, 231, 231, 231, 231, 231, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 231, nil, nil, 231, 231, 231, 231, 231, +231, 231, 231, 231, 231, nil, 231, 231, nil, 231, 231, 231, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 231, nil, nil, 231, nil, nil, 231, 231, nil, nil, 231, nil, nil, nil, +nil, nil, 231, nil, nil, nil, nil, nil, nil, nil, 231, nil, nil, nil, nil, +231, 231, 231, 231, 231, 231, nil, nil, nil, 231, 231, 232, 232, 232, nil, +232, nil, nil, nil, 232, 232, nil, nil, nil, 232, nil, 232, 232, 232, 232, +232, 232, 232, nil, nil, nil, nil, 232, 232, 232, 232, 232, 232, 232, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 232, nil, nil, 232, 232, 232, 232, +232, 232, 232, 232, 232, 232, nil, 232, 232, nil, 232, 232, 232, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 232, nil, nil, 232, nil, nil, 232, 232, nil, nil, 232, nil, nil, +nil, nil, nil, 232, nil, nil, nil, nil, nil, nil, nil, 232, nil, nil, nil, +nil, 232, 232, 232, 232, 232, 232, nil, nil, nil, 232, 232, 233, 233, 233, +nil, 233, nil, nil, nil, 233, 233, nil, nil, nil, 233, nil, 233, 233, 233, +233, 233, 233, 233, nil, nil, nil, nil, 233, 233, 233, 233, 233, 233, 233, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 233, nil, nil, 233, 233, 233, +233, 233, 233, 233, 233, 233, 233, nil, 233, 233, nil, 233, 233, 233, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 233, nil, nil, 233, nil, nil, 233, 233, nil, nil, 233, nil, +nil, nil, nil, nil, 233, nil, nil, nil, nil, nil, nil, nil, 233, nil, nil, +nil, nil, 233, 233, 233, 233, 233, 233, nil, nil, nil, 233, 233, 241, 241, +241, nil, 241, nil, nil, nil, 241, 241, nil, nil, nil, 241, nil, 241, 241, +241, 241, 241, 241, 241, nil, nil, nil, nil, 241, 241, 241, 241, 241, 241, +241, nil, nil, nil, nil, nil, nil, nil, nil, nil, 241, nil, nil, 241, 241, +241, 241, 241, 241, 241, 241, 241, 241, nil, 241, 241, nil, 241, 241, 241, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 241, nil, nil, 241, nil, nil, 241, 241, nil, nil, 241, +nil, nil, nil, nil, nil, 241, nil, nil, nil, nil, nil, nil, nil, 241, nil, +nil, nil, nil, 241, 241, 241, 241, 241, 241, nil, nil, nil, 241, 241, 243, +243, 243, nil, 243, nil, nil, nil, 243, 243, nil, nil, nil, 243, nil, 243, +243, 243, 243, 243, 243, 243, nil, nil, nil, nil, 243, 243, 243, 243, 243, +243, 243, nil, nil, nil, nil, nil, nil, nil, nil, nil, 243, nil, nil, 243, +243, 243, 243, 243, 243, 243, 243, 243, 243, nil, 243, 243, nil, 243, 243, +243, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 243, nil, nil, 243, nil, nil, 243, 243, nil, nil, +243, nil, nil, nil, nil, nil, 243, nil, nil, nil, nil, nil, nil, nil, 243, +nil, nil, nil, nil, 243, 243, 243, 243, 243, 243, nil, nil, nil, 243, 243, +254, 254, 254, nil, 254, nil, nil, nil, 254, 254, nil, nil, nil, 254, nil, +254, 254, 254, 254, 254, 254, 254, nil, nil, nil, nil, 254, 254, 254, 254, +254, 254, 254, nil, nil, nil, nil, nil, nil, nil, nil, nil, 254, nil, nil, +254, 254, 254, 254, 254, 254, 254, 254, 254, 254, nil, 254, 254, nil, 254, +254, 254, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 254, nil, nil, 254, nil, nil, 254, 254, nil, +nil, 254, nil, 254, nil, 254, nil, 254, nil, nil, nil, nil, nil, nil, nil, +254, nil, nil, nil, nil, 254, 254, 254, 254, 254, 254, nil, nil, nil, 254, +254, 255, 255, 255, nil, 255, nil, nil, nil, 255, 255, nil, nil, nil, 255, +nil, 255, 255, 255, 255, 255, 255, 255, nil, nil, nil, nil, 255, 255, 255, +255, 255, 255, 255, nil, nil, nil, nil, nil, nil, nil, nil, nil, 255, nil, +nil, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, nil, 255, 255, nil, +255, 255, 255, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 255, nil, nil, 255, nil, nil, 255, 255, +nil, nil, 255, nil, 255, nil, 255, nil, 255, nil, nil, nil, nil, nil, nil, +nil, 255, nil, nil, nil, nil, 255, 255, 255, 255, 255, 255, nil, nil, nil, +255, 255, 263, 263, 263, nil, 263, nil, nil, nil, 263, 263, nil, nil, nil, +263, nil, 263, 263, 263, 263, 263, 263, 263, nil, nil, nil, nil, 263, 263, +263, 263, 263, 263, 263, nil, nil, nil, nil, nil, nil, nil, nil, nil, 263, +nil, nil, 263, 263, 263, 263, 263, 263, 263, 263, 263, 263, nil, 263, 263, +nil, 263, 263, 263, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 263, nil, nil, 263, nil, 263, 263, +263, nil, nil, 263, nil, 263, nil, 263, nil, 263, nil, nil, nil, nil, nil, +nil, nil, 263, nil, nil, nil, nil, 263, 263, 263, 263, 263, 263, nil, nil, +nil, 263, 263, 269, 269, 269, nil, 269, nil, nil, nil, 269, 269, nil, nil, +nil, 269, nil, 269, 269, 269, 269, 269, 269, 269, nil, nil, nil, nil, 269, +269, 269, 269, 269, 269, 269, nil, nil, nil, nil, nil, nil, nil, nil, nil, +269, nil, nil, 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, nil, 269, +269, nil, nil, nil, 269, nil, 468, 468, 468, 468, 468, 468, 468, 468, 468, +468, 468, nil, 468, 468, nil, nil, 468, 468, 269, nil, nil, 269, nil, nil, +269, 269, nil, nil, 269, nil, nil, nil, 468, nil, 468, nil, 468, 468, 468, +468, 468, 468, 468, nil, 468, nil, nil, 269, 269, 269, 269, 269, 269, nil, +nil, nil, 269, 269, 290, 290, 290, 468, 290, nil, nil, nil, 290, 290, nil, +nil, nil, 290, nil, 290, 290, 290, 290, 290, 290, 290, nil, nil, nil, nil, +290, 290, 290, 290, 290, 290, 290, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 290, nil, nil, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, nil, +290, 290, nil, 290, 290, 290, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 290, nil, nil, 290, 290, +nil, 290, 290, nil, nil, 290, nil, nil, nil, nil, nil, 290, nil, nil, nil, +nil, nil, nil, nil, 290, nil, nil, nil, nil, 290, 290, 290, 290, 290, 290, +nil, nil, nil, 290, 290, 299, 299, 299, nil, 299, nil, nil, nil, 299, 299, +nil, nil, nil, 299, nil, 299, 299, 299, 299, 299, 299, 299, nil, nil, nil, +nil, 299, 299, 299, 299, 299, 299, 299, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 299, nil, nil, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, +nil, 299, 299, nil, 299, 299, 299, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 299, nil, nil, 299, +nil, nil, 299, 299, nil, nil, 299, nil, nil, nil, nil, nil, 299, nil, nil, +nil, nil, nil, nil, nil, 299, nil, nil, nil, nil, 299, 299, 299, 299, 299, +299, nil, nil, nil, 299, 299, 308, 308, 308, nil, 308, nil, nil, nil, 308, +308, nil, nil, nil, 308, nil, 308, 308, 308, 308, 308, 308, 308, nil, nil, +nil, nil, 308, 308, 308, 308, 308, 308, 308, nil, nil, 308, nil, nil, nil, +nil, nil, nil, 308, nil, nil, 308, 308, 308, 308, 308, 308, 308, 308, 308, +308, nil, 308, 308, nil, 308, 308, 308, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 308, nil, nil, +308, nil, nil, 308, 308, nil, nil, 308, nil, nil, nil, nil, nil, 308, nil, +nil, nil, nil, nil, nil, nil, 308, nil, nil, nil, nil, 308, 308, 308, 308, +308, 308, nil, nil, nil, 308, 308, 309, 309, 309, nil, 309, nil, nil, nil, +309, 309, nil, nil, nil, 309, nil, 309, 309, 309, 309, 309, 309, 309, nil, +nil, nil, nil, 309, 309, 309, 309, 309, 309, 309, nil, nil, 309, nil, nil, +nil, nil, nil, nil, 309, nil, nil, 309, 309, 309, 309, 309, 309, 309, 309, +309, 309, nil, 309, 309, nil, 309, 309, 309, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 309, nil, +nil, 309, nil, nil, 309, 309, nil, nil, 309, nil, nil, nil, nil, nil, 309, +nil, nil, nil, nil, nil, nil, nil, 309, nil, nil, nil, nil, 309, 309, 309, +309, 309, 309, nil, nil, nil, 309, 309, 327, 327, 327, nil, 327, nil, nil, +nil, 327, 327, nil, nil, nil, 327, nil, 327, 327, 327, 327, 327, 327, 327, +nil, nil, nil, nil, 327, 327, 327, 327, 327, 327, 327, nil, nil, 327, nil, +nil, nil, nil, nil, nil, 327, nil, nil, 327, 327, 327, 327, 327, 327, 327, +327, 327, 327, nil, 327, 327, nil, 327, 327, 327, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 327, +nil, nil, 327, nil, nil, 327, 327, nil, nil, 327, nil, nil, nil, nil, nil, +327, nil, nil, nil, nil, nil, nil, nil, 327, nil, nil, nil, nil, 327, 327, +327, 327, 327, 327, nil, nil, nil, 327, 327, 341, 341, 341, nil, 341, nil, +nil, nil, 341, 341, nil, nil, nil, 341, nil, 341, 341, 341, 341, 341, 341, +341, nil, nil, nil, nil, 341, 341, 341, 341, 341, 341, 341, nil, nil, 341, +nil, nil, nil, nil, nil, nil, 341, nil, nil, 341, 341, 341, 341, 341, 341, +341, 341, 341, 341, nil, 341, 341, nil, 341, 341, 341, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +341, nil, nil, 341, nil, nil, 341, 341, nil, nil, 341, nil, nil, nil, nil, +nil, 341, nil, nil, nil, nil, nil, nil, nil, 341, nil, nil, nil, nil, 341, +341, 341, 341, 341, 341, nil, nil, nil, 341, 341, 357, 357, 357, 357, 357, +357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, +357, 357, 357, 357, nil, nil, 357, 357, 357, 357, 357, 357, 357, 357, 357, +357, nil, nil, nil, nil, nil, 357, 357, 357, 357, 357, 357, 357, 357, nil, +nil, 357, nil, nil, nil, nil, nil, nil, nil, 357, 357, nil, 357, 357, 357, +357, nil, 357, 357, nil, nil, 357, nil, nil, nil, nil, 357, 357, 357, 357, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 357, 357, +nil, 357, 357, 357, 357, 357, 357, 357, 357, 357, nil, 357, nil, nil, 357, +357, nil, nil, 369, 369, 369, nil, 369, nil, nil, 357, 369, 369, nil, nil, +nil, 369, nil, 369, 369, 369, 369, 369, 369, 369, nil, nil, nil, nil, 369, +369, 369, 369, 369, 369, 369, nil, nil, nil, nil, nil, nil, nil, nil, nil, +369, nil, nil, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, nil, 369, +369, nil, 369, 369, 369, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 369, nil, nil, 369, nil, nil, +369, 369, nil, nil, 369, nil, nil, nil, nil, nil, 369, nil, nil, nil, nil, +nil, nil, nil, 369, nil, nil, nil, nil, 369, 369, 369, 369, 369, 369, nil, +nil, nil, 369, 369, 378, 378, 378, nil, 378, nil, nil, nil, 378, 378, nil, +nil, nil, 378, nil, 378, 378, 378, 378, 378, 378, 378, nil, nil, nil, nil, +378, 378, 378, 378, 378, 378, 378, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 378, nil, nil, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, nil, +378, 378, nil, 378, 378, 378, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 378, nil, nil, 378, 378, +nil, 378, 378, nil, nil, 378, nil, 378, nil, 378, nil, 378, nil, nil, nil, +nil, nil, nil, nil, 378, nil, nil, nil, nil, 378, 378, 378, 378, 378, 378, +nil, nil, nil, 378, 378, 385, 385, 385, nil, 385, nil, nil, nil, 385, 385, +nil, nil, nil, 385, nil, 385, 385, 385, 385, 385, 385, 385, nil, nil, nil, +nil, 385, 385, 385, 385, 385, 385, 385, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 385, nil, nil, 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, +nil, 385, 385, nil, 385, 385, 385, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 385, nil, nil, 385, +385, nil, 385, 385, nil, nil, 385, nil, 385, nil, 385, nil, 385, nil, nil, +nil, nil, nil, nil, nil, 385, nil, nil, nil, nil, 385, 385, 385, 385, 385, +385, nil, nil, nil, 385, 385, 386, 386, 386, nil, 386, nil, nil, nil, 386, +386, nil, nil, nil, 386, nil, 386, 386, 386, 386, 386, 386, 386, nil, nil, +nil, nil, 386, 386, 386, 386, 386, 386, 386, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 386, nil, nil, 386, 386, 386, 386, 386, 386, 386, 386, 386, +386, nil, 386, 386, nil, 386, 386, 386, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 386, nil, nil, +386, 386, nil, 386, 386, nil, nil, 386, nil, 386, nil, 386, nil, 386, nil, +nil, nil, nil, nil, nil, nil, 386, nil, nil, nil, nil, 386, 386, 386, 386, +386, 386, nil, nil, nil, 386, 386, 393, 393, 393, nil, 393, nil, nil, nil, +393, 393, nil, nil, nil, 393, nil, 393, 393, 393, 393, 393, 393, 393, nil, +nil, nil, nil, 393, 393, 393, 393, 393, 393, 393, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 393, nil, nil, 393, 393, 393, 393, 393, 393, 393, 393, +393, 393, nil, 393, 393, nil, 393, 393, 393, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 393, nil, +nil, 393, nil, nil, 393, 393, nil, nil, 393, nil, 393, nil, nil, nil, 393, +nil, nil, nil, nil, nil, nil, nil, 393, nil, nil, nil, nil, 393, 393, 393, +393, 393, 393, nil, nil, nil, 393, 393, 395, 395, 395, nil, 395, nil, nil, +nil, 395, 395, nil, nil, nil, 395, nil, 395, 395, 395, 395, 395, 395, 395, +nil, nil, nil, nil, 395, 395, 395, 395, 395, 395, 395, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 395, nil, nil, 395, 395, 395, 395, 395, 395, 395, +395, 395, 395, nil, 395, 395, nil, 395, 395, 395, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 395, +nil, nil, 395, nil, nil, 395, 395, nil, nil, 395, nil, nil, nil, nil, nil, +395, nil, nil, nil, nil, nil, nil, nil, 395, nil, nil, nil, nil, 395, 395, +395, 395, 395, 395, nil, nil, nil, 395, 395, 396, 396, 396, nil, 396, nil, +nil, nil, 396, 396, nil, nil, nil, 396, nil, 396, 396, 396, 396, 396, 396, +396, nil, nil, nil, nil, 396, 396, 396, 396, 396, 396, 396, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 396, nil, nil, 396, 396, 396, 396, 396, 396, +396, 396, 396, 396, nil, 396, 396, nil, 396, 396, 396, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +396, nil, nil, 396, nil, nil, 396, 396, nil, nil, 396, nil, nil, nil, nil, +nil, 396, nil, nil, nil, nil, nil, nil, nil, 396, nil, nil, nil, nil, 396, +396, 396, 396, 396, 396, nil, nil, nil, 396, 396, 397, 397, 397, nil, 397, +nil, nil, nil, 397, 397, nil, nil, nil, 397, nil, 397, 397, 397, 397, 397, +397, 397, nil, nil, nil, nil, 397, 397, 397, 397, 397, 397, 397, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 397, nil, nil, 397, 397, 397, 397, 397, +397, 397, 397, 397, 397, nil, 397, 397, nil, 397, 397, 397, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 397, nil, nil, 397, nil, nil, 397, 397, nil, nil, 397, nil, nil, nil, +nil, nil, 397, nil, nil, nil, nil, nil, nil, nil, 397, nil, nil, nil, nil, +397, 397, 397, 397, 397, 397, nil, nil, nil, 397, 397, 426, 426, 426, nil, +426, nil, nil, nil, 426, 426, nil, nil, nil, 426, nil, 426, 426, 426, 426, +426, 426, 426, nil, nil, nil, nil, 426, 426, 426, 426, 426, 426, 426, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 426, nil, nil, 426, 426, 426, 426, +426, 426, 426, 426, 426, 426, nil, 426, 426, nil, 426, 426, 426, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 426, nil, nil, 426, nil, nil, 426, 426, nil, nil, 426, nil, 426, +nil, 426, nil, 426, nil, nil, nil, nil, nil, nil, nil, 426, nil, nil, nil, +nil, 426, 426, 426, 426, 426, 426, nil, nil, nil, 426, 426, 428, 428, 428, +nil, 428, nil, nil, nil, 428, 428, nil, nil, nil, 428, nil, 428, 428, 428, +428, 428, 428, 428, nil, nil, nil, nil, 428, 428, 428, 428, 428, 428, 428, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 428, nil, nil, 428, 428, 428, +428, 428, 428, 428, 428, 428, 428, nil, 428, 428, nil, 428, 428, 428, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 428, nil, nil, 428, nil, nil, 428, 428, nil, nil, 428, nil, +428, nil, 428, nil, 428, nil, nil, nil, nil, nil, nil, nil, 428, nil, nil, +nil, nil, 428, 428, 428, 428, 428, 428, nil, nil, nil, 428, 428, 431, 431, +431, nil, 431, nil, nil, nil, 431, 431, nil, nil, nil, 431, nil, 431, 431, +431, 431, 431, 431, 431, nil, nil, nil, nil, 431, 431, 431, 431, 431, 431, +431, nil, nil, nil, nil, nil, nil, nil, nil, nil, 431, nil, nil, 431, 431, +431, 431, 431, 431, 431, 431, 431, 431, nil, 431, 431, nil, 431, 431, 431, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 431, nil, nil, 431, nil, nil, 431, 431, nil, nil, 431, +nil, nil, nil, nil, nil, 431, nil, nil, nil, nil, nil, nil, nil, 431, nil, +nil, nil, nil, 431, 431, 431, 431, 431, 431, nil, nil, nil, 431, 431, 445, +445, 445, nil, 445, nil, nil, nil, 445, 445, nil, nil, nil, 445, nil, 445, +445, 445, 445, 445, 445, 445, nil, nil, nil, nil, 445, 445, 445, 445, 445, +445, 445, nil, nil, 445, nil, nil, nil, nil, nil, nil, 445, nil, nil, 445, +445, 445, 445, 445, 445, 445, 445, 445, 445, nil, 445, 445, nil, 445, 445, +445, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 445, nil, nil, 445, nil, nil, 445, 445, nil, nil, +445, nil, 445, nil, 445, nil, 445, nil, nil, nil, nil, nil, nil, nil, 445, +nil, nil, nil, nil, 445, 445, 445, 445, 445, 445, nil, nil, nil, 445, 445, +456, 456, 456, nil, 456, nil, nil, nil, 456, 456, nil, nil, nil, 456, nil, +456, 456, 456, 456, 456, 456, 456, nil, nil, nil, nil, 456, 456, 456, 456, +456, 456, 456, nil, nil, nil, nil, nil, nil, nil, nil, nil, 456, nil, nil, +456, 456, 456, 456, 456, 456, 456, 456, 456, 456, nil, 456, 456, nil, 456, +456, 456, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 456, nil, nil, 456, nil, nil, 456, 456, nil, +nil, 456, nil, 456, nil, nil, nil, 456, nil, nil, nil, nil, nil, nil, nil, +456, nil, nil, nil, nil, 456, 456, 456, 456, 456, 456, nil, nil, nil, 456, +456, 463, 463, 463, nil, 463, nil, nil, nil, 463, 463, nil, nil, nil, 463, +nil, 463, 463, 463, 463, 463, 463, 463, nil, nil, nil, nil, 463, 463, 463, +463, 463, 463, 463, nil, nil, nil, nil, nil, nil, nil, nil, nil, 463, nil, +nil, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, nil, 463, 463, nil, +463, 463, 463, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 463, nil, nil, 463, nil, nil, 463, 463, +nil, nil, 463, nil, nil, nil, nil, nil, 463, nil, nil, nil, nil, nil, nil, +nil, 463, nil, nil, nil, nil, 463, 463, 463, 463, 463, 463, nil, nil, nil, +463, 463, 464, 464, 464, nil, 464, nil, nil, nil, 464, 464, nil, nil, nil, +464, nil, 464, 464, 464, 464, 464, 464, 464, nil, nil, nil, nil, 464, 464, +464, 464, 464, 464, 464, nil, nil, nil, nil, nil, nil, nil, nil, nil, 464, +nil, nil, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, nil, 464, 464, +nil, 464, 464, 464, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 464, nil, nil, 464, nil, nil, 464, +464, nil, nil, 464, nil, nil, nil, nil, nil, 464, nil, nil, nil, nil, nil, +nil, nil, 464, nil, nil, nil, nil, 464, 464, 464, 464, 464, 464, nil, nil, +nil, 464, 464, 465, 465, 465, nil, 465, nil, nil, nil, 465, 465, nil, nil, +nil, 465, nil, 465, 465, 465, 465, 465, 465, 465, nil, nil, nil, nil, 465, +465, 465, 465, 465, 465, 465, nil, nil, nil, nil, nil, nil, nil, nil, nil, +465, nil, nil, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, nil, 465, +465, nil, 465, 465, 465, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 465, nil, nil, 465, nil, nil, +465, 465, nil, nil, 465, nil, nil, nil, nil, nil, 465, nil, nil, nil, nil, +nil, nil, nil, 465, nil, nil, nil, nil, 465, 465, 465, 465, 465, 465, nil, +nil, nil, 465, 465, 469, 469, 469, nil, 469, nil, nil, nil, 469, 469, nil, +nil, nil, 469, nil, 469, 469, 469, 469, 469, 469, 469, nil, nil, nil, nil, +469, 469, 469, 469, 469, 469, 469, nil, nil, 469, nil, nil, nil, nil, nil, +nil, 469, nil, nil, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, nil, +469, 469, nil, 469, 469, 469, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 469, nil, nil, 469, nil, +nil, 469, 469, nil, nil, 469, nil, nil, nil, nil, nil, 469, nil, nil, nil, +nil, nil, nil, nil, 469, nil, nil, nil, nil, 469, 469, 469, 469, 469, 469, +nil, nil, nil, 469, 469, 471, 471, 471, nil, 471, nil, nil, nil, 471, 471, +nil, nil, nil, 471, nil, 471, 471, 471, 471, 471, 471, 471, nil, nil, nil, +nil, 471, 471, 471, 471, 471, 471, 471, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 471, nil, nil, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, +nil, 471, 471, nil, 471, 471, 471, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 471, nil, nil, 471, +nil, nil, 471, 471, nil, nil, 471, nil, 471, nil, nil, nil, 471, nil, nil, +nil, nil, nil, nil, nil, 471, nil, nil, nil, nil, 471, 471, 471, 471, 471, +471, nil, nil, nil, 471, 471, 476, 476, 476, nil, 476, nil, nil, nil, 476, +476, nil, nil, nil, 476, nil, 476, 476, 476, 476, 476, 476, 476, nil, nil, +nil, nil, 476, 476, 476, 476, 476, 476, 476, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 476, nil, nil, 476, 476, 476, 476, 476, 476, 476, 476, 476, +476, nil, 476, 476, nil, 476, 476, 476, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 476, nil, nil, +476, nil, nil, 476, 476, nil, nil, 476, nil, 476, nil, nil, nil, 476, nil, +nil, nil, nil, nil, nil, nil, 476, nil, nil, nil, nil, 476, 476, 476, 476, +476, 476, nil, nil, nil, 476, 476, 479, 479, 479, nil, 479, nil, nil, nil, +479, 479, nil, nil, nil, 479, nil, 479, 479, 479, 479, 479, 479, 479, nil, +nil, nil, nil, 479, 479, 479, 479, 479, 479, 479, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 479, nil, nil, 479, 479, 479, 479, 479, 479, 479, 479, +479, 479, nil, 479, 479, nil, 479, 479, 479, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 479, nil, +nil, 479, nil, nil, 479, 479, nil, nil, 479, nil, nil, nil, nil, nil, 479, +nil, nil, nil, nil, nil, nil, nil, 479, nil, nil, nil, nil, 479, 479, 479, +479, 479, 479, nil, nil, nil, 479, 479, 482, 482, 482, nil, 482, nil, nil, +nil, 482, 482, nil, nil, nil, 482, nil, 482, 482, 482, 482, 482, 482, 482, +nil, nil, nil, nil, 482, 482, 482, 482, 482, 482, 482, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 482, nil, nil, 482, 482, 482, 482, 482, 482, 482, +482, 482, 482, nil, 482, 482, nil, 482, 482, 482, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 482, +nil, nil, 482, nil, nil, 482, 482, nil, nil, 482, nil, nil, nil, nil, nil, +482, nil, nil, nil, nil, nil, nil, nil, 482, nil, nil, nil, nil, 482, 482, +482, 482, 482, 482, nil, nil, nil, 482, 482, 496, 496, 496, nil, 496, nil, +nil, nil, 496, 496, nil, nil, nil, 496, nil, 496, 496, 496, 496, 496, 496, +496, nil, nil, nil, nil, 496, 496, 496, 496, 496, 496, 496, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 496, nil, nil, 496, 496, 496, 496, 496, 496, +496, 496, 496, 496, nil, 496, 496, nil, 496, 496, 496, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +496, nil, nil, 496, nil, nil, 496, 496, nil, nil, 496, nil, 496, nil, nil, +nil, 496, nil, nil, nil, nil, nil, nil, nil, 496, nil, nil, nil, nil, 496, +496, 496, 496, 496, 496, nil, nil, nil, 496, 496, 497, 497, 497, nil, 497, +nil, nil, nil, 497, 497, nil, nil, nil, 497, nil, 497, 497, 497, 497, 497, +497, 497, nil, nil, nil, nil, 497, 497, 497, 497, 497, 497, 497, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 497, nil, nil, 497, 497, 497, 497, 497, +497, 497, 497, 497, 497, nil, 497, 497, nil, 497, 497, 497, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 497, nil, nil, 497, nil, nil, 497, 497, nil, nil, 497, nil, 497, nil, +nil, nil, 497, nil, nil, nil, nil, nil, nil, nil, 497, nil, nil, nil, nil, +497, 497, 497, 497, 497, 497, nil, nil, nil, 497, 497, 506, 506, 506, nil, +506, nil, nil, nil, 506, 506, nil, nil, nil, 506, nil, 506, 506, 506, 506, +506, 506, 506, nil, nil, nil, nil, 506, 506, 506, 506, 506, 506, 506, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 506, nil, nil, 506, 506, 506, 506, +506, 506, 506, 506, 506, 506, nil, 506, 506, nil, 506, 506, 506, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 506, nil, nil, 506, nil, nil, 506, 506, nil, nil, 506, nil, 506, +nil, nil, nil, 506, nil, nil, nil, nil, nil, nil, nil, 506, nil, nil, nil, +nil, 506, 506, 506, 506, 506, 506, nil, nil, nil, 506, 506, 510, 510, 510, +nil, 510, nil, nil, nil, 510, 510, nil, nil, nil, 510, nil, 510, 510, 510, +510, 510, 510, 510, nil, nil, nil, nil, 510, 510, 510, 510, 510, 510, 510, +nil, nil, 510, nil, nil, nil, nil, nil, nil, 510, nil, nil, 510, 510, 510, +510, 510, 510, 510, 510, 510, 510, nil, 510, 510, nil, 510, 510, 510, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 510, nil, nil, 510, nil, nil, 510, 510, nil, nil, 510, nil, +nil, nil, nil, nil, 510, nil, nil, nil, nil, nil, nil, nil, 510, nil, nil, +nil, nil, 510, 510, 510, 510, 510, 510, nil, nil, nil, 510, 510, 534, 534, +534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, +534, 534, 534, 534, 534, 534, 534, nil, nil, 534, 534, 534, 534, 534, 534, +534, 534, 534, 534, nil, nil, nil, nil, nil, 534, 534, 534, 534, 534, 534, +534, 534, nil, nil, 534, nil, nil, nil, nil, nil, nil, nil, 534, 534, nil, +534, 534, 534, 534, nil, 534, 534, nil, nil, 534, nil, nil, nil, nil, 534, +534, 534, 534, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 534, 534, nil, 534, 534, 534, 534, 534, 534, 534, 534, 534, nil, 534, +nil, nil, 534, 534, nil, nil, 537, 537, 537, nil, 537, nil, nil, 534, 537, +537, nil, nil, nil, 537, nil, 537, 537, 537, 537, 537, 537, 537, nil, nil, +nil, nil, 537, 537, 537, 537, 537, 537, 537, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 537, nil, nil, 537, 537, 537, 537, 537, 537, 537, 537, 537, +537, nil, 537, 537, nil, 537, 537, 537, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 537, nil, nil, +537, nil, nil, 537, 537, nil, nil, 537, nil, nil, nil, nil, nil, 537, nil, +nil, nil, nil, nil, nil, nil, 537, nil, nil, nil, nil, 537, 537, 537, 537, +537, 537, nil, nil, nil, 537, 537, 538, 538, 538, nil, 538, nil, nil, nil, +538, 538, nil, nil, nil, 538, nil, 538, 538, 538, 538, 538, 538, 538, nil, +nil, nil, nil, 538, 538, 538, 538, 538, 538, 538, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 538, nil, nil, 538, 538, 538, 538, 538, 538, 538, 538, +538, 538, nil, 538, 538, nil, 538, 538, 538, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 538, nil, +nil, 538, nil, nil, 538, 538, nil, nil, 538, nil, 538, nil, nil, nil, 538, +nil, nil, nil, nil, nil, nil, nil, 538, nil, nil, nil, nil, 538, 538, 538, +538, 538, 538, nil, nil, nil, 538, 538, 541, 541, 541, nil, 541, nil, nil, +nil, 541, 541, nil, nil, nil, 541, nil, 541, 541, 541, 541, 541, 541, 541, +nil, nil, nil, nil, 541, 541, 541, 541, 541, 541, 541, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 541, nil, nil, 541, 541, 541, 541, 541, 541, 541, +541, 541, 541, nil, 541, 541, nil, 541, 541, 541, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 541, +nil, nil, 541, nil, nil, 541, 541, nil, nil, 541, nil, nil, nil, nil, nil, +541, nil, nil, nil, nil, nil, nil, nil, 541, nil, nil, nil, nil, 541, 541, +541, 541, 541, 541, nil, nil, nil, 541, 541, 542, 542, 542, nil, 542, nil, +nil, nil, 542, 542, nil, nil, nil, 542, nil, 542, 542, 542, 542, 542, 542, +542, nil, nil, nil, nil, 542, 542, 542, 542, 542, 542, 542, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 542, nil, nil, 542, 542, 542, 542, 542, 542, +542, 542, 542, 542, nil, 542, 542, nil, 542, 542, 542, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +542, nil, nil, 542, nil, nil, 542, 542, nil, nil, 542, nil, nil, nil, nil, +nil, 542, nil, nil, nil, nil, nil, nil, nil, 542, nil, nil, nil, nil, 542, +542, 542, 542, 542, 542, nil, nil, nil, 542, 542, 546, 546, 546, nil, 546, +nil, nil, nil, 546, 546, nil, nil, nil, 546, nil, 546, 546, 546, 546, 546, +546, 546, nil, nil, nil, nil, 546, 546, 546, 546, 546, 546, 546, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 546, nil, nil, 546, 546, 546, 546, 546, +546, 546, 546, 546, 546, nil, 546, 546, nil, 546, 546, 546, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 546, nil, nil, 546, nil, nil, 546, 546, nil, nil, 546, nil, nil, nil, +nil, nil, 546, nil, nil, nil, nil, nil, nil, nil, 546, nil, nil, nil, nil, +546, 546, 546, 546, 546, 546, nil, nil, nil, 546, 546, 549, 549, 549, nil, +549, nil, nil, nil, 549, 549, nil, nil, nil, 549, nil, 549, 549, 549, 549, +549, 549, 549, nil, nil, nil, nil, 549, 549, 549, 549, 549, 549, 549, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 549, nil, nil, 549, 549, 549, 549, +549, 549, 549, 549, 549, 549, nil, 549, 549, nil, 549, 549, 549, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 549, nil, nil, 549, nil, nil, 549, 549, nil, nil, 549, nil, nil, +nil, nil, nil, 549, nil, nil, nil, nil, nil, nil, nil, 549, nil, nil, nil, +nil, 549, 549, 549, 549, 549, 549, nil, nil, nil, 549, 549, 556, 556, 556, +nil, 556, nil, nil, nil, 556, 556, nil, nil, nil, 556, nil, 556, 556, 556, +556, 556, 556, 556, nil, nil, nil, nil, 556, 556, 556, 556, 556, 556, 556, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 556, nil, nil, 556, 556, 556, +556, 556, 556, 556, 556, 556, 556, nil, 556, 556, nil, 556, 556, 556, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 556, nil, nil, 556, nil, nil, 556, 556, nil, nil, 556, nil, +nil, nil, nil, nil, 556, nil, nil, nil, nil, nil, nil, nil, 556, nil, nil, +nil, nil, 556, 556, 556, 556, 556, 556, nil, nil, nil, 556, 556, 557, 557, +557, nil, 557, nil, nil, nil, 557, 557, nil, nil, nil, 557, nil, 557, 557, +557, 557, 557, 557, 557, nil, nil, nil, nil, 557, 557, 557, 557, 557, 557, +557, nil, nil, nil, nil, nil, nil, nil, nil, nil, 557, nil, nil, 557, 557, +557, 557, 557, 557, 557, 557, 557, 557, nil, 557, 557, nil, nil, nil, 557, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 557, nil, nil, 557, nil, nil, 557, 557, nil, nil, 557, +nil, 557, nil, 557, nil, nil, nil, nil, nil, nil, nil, nil, 557, nil, nil, +nil, nil, nil, 557, 557, 557, 557, 557, 557, nil, nil, nil, 557, 557, 560, +560, 560, nil, 560, nil, nil, nil, 560, 560, nil, nil, nil, 560, nil, 560, +560, 560, 560, 560, 560, 560, nil, nil, nil, nil, 560, 560, 560, 560, 560, +560, 560, nil, nil, nil, nil, nil, nil, nil, nil, nil, 560, nil, nil, 560, +560, 560, 560, 560, 560, 560, 560, 560, 560, nil, 560, 560, nil, 560, 560, +560, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 560, nil, nil, 560, nil, nil, 560, 560, nil, nil, +560, nil, nil, nil, nil, nil, 560, nil, nil, nil, nil, nil, nil, nil, 560, +nil, nil, nil, nil, 560, 560, 560, 560, 560, 560, nil, nil, nil, 560, 560, +564, 564, 564, nil, 564, nil, nil, nil, 564, 564, nil, nil, nil, 564, nil, +564, 564, 564, 564, 564, 564, 564, nil, nil, nil, nil, 564, 564, 564, 564, +564, 564, 564, nil, nil, nil, nil, nil, nil, nil, nil, nil, 564, nil, nil, +564, 564, 564, 564, 564, 564, 564, 564, 564, 564, nil, 564, 564, nil, 564, +564, 564, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 564, nil, nil, 564, nil, nil, 564, 564, nil, +nil, 564, nil, nil, nil, nil, nil, 564, nil, nil, nil, nil, nil, nil, nil, +564, nil, nil, nil, nil, 564, 564, 564, 564, 564, 564, nil, nil, nil, 564, +564, 580, 580, 580, nil, 580, nil, nil, nil, 580, 580, nil, nil, nil, 580, +nil, 580, 580, 580, 580, 580, 580, 580, nil, nil, nil, nil, 580, 580, 580, +580, 580, 580, 580, nil, nil, nil, nil, nil, nil, nil, nil, nil, 580, nil, +nil, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, nil, 580, 580, nil, +580, 580, 580, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 580, nil, nil, 580, nil, nil, 580, 580, +nil, nil, 580, nil, 580, nil, 580, nil, 580, nil, nil, nil, nil, nil, nil, +nil, 580, nil, nil, nil, nil, 580, 580, 580, 580, 580, 580, nil, nil, nil, +580, 580, 584, 584, 584, nil, 584, nil, nil, nil, 584, 584, nil, nil, nil, +584, nil, 584, 584, 584, 584, 584, 584, 584, nil, nil, nil, nil, 584, 584, +584, 584, 584, 584, 584, nil, nil, nil, nil, nil, nil, nil, nil, nil, 584, +nil, nil, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, nil, 584, 584, +nil, 584, 584, 584, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 584, nil, nil, 584, nil, nil, 584, +584, nil, nil, 584, nil, nil, nil, nil, nil, 584, nil, nil, nil, nil, nil, +nil, nil, 584, nil, nil, nil, nil, 584, 584, 584, 584, 584, 584, nil, nil, +nil, 584, 584, 612, 612, 612, nil, 612, nil, nil, nil, 612, 612, nil, nil, +nil, 612, nil, 612, 612, 612, 612, 612, 612, 612, nil, nil, nil, nil, 612, +612, 612, 612, 612, 612, 612, nil, nil, nil, nil, nil, nil, nil, nil, nil, +612, nil, nil, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, nil, 612, +612, nil, 612, 612, 612, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 612, nil, nil, 612, nil, nil, +612, 612, nil, nil, 612, nil, nil, nil, nil, nil, 612, nil, nil, nil, nil, +nil, nil, nil, 612, nil, nil, nil, nil, 612, 612, 612, 612, 612, 612, nil, +nil, nil, 612, 612, 628, 628, 628, nil, 628, nil, nil, nil, 628, 628, nil, +nil, nil, 628, nil, 628, 628, 628, 628, 628, 628, 628, nil, nil, nil, nil, +628, 628, 628, 628, 628, 628, 628, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 628, nil, nil, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, nil, +628, 628, nil, 628, 628, 628, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 628, nil, nil, 628, nil, +nil, 628, 628, nil, nil, 628, nil, nil, nil, nil, nil, 628, nil, nil, nil, +nil, nil, nil, nil, 628, nil, nil, nil, nil, 628, 628, 628, 628, 628, 628, +nil, nil, nil, 628, 628, 634, 634, 634, nil, 634, nil, nil, nil, 634, 634, +nil, nil, nil, 634, nil, 634, 634, 634, 634, 634, 634, 634, nil, nil, nil, +nil, 634, 634, 634, 634, 634, 634, 634, nil, nil, 634, nil, nil, nil, nil, +nil, nil, 634, nil, nil, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, +nil, 634, 634, nil, 634, 634, 634, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 634, nil, nil, 634, +nil, nil, 634, 634, nil, nil, 634, nil, nil, nil, nil, nil, 634, nil, nil, +nil, nil, nil, nil, nil, 634, nil, nil, nil, nil, 634, 634, 634, 634, 634, +634, nil, nil, nil, 634, 634, 679, 679, 679, nil, 679, nil, nil, nil, 679, +679, nil, nil, nil, 679, nil, 679, 679, 679, 679, 679, 679, 679, nil, nil, +nil, nil, 679, 679, 679, 679, 679, 679, 679, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 679, nil, nil, 679, 679, 679, 679, 679, 679, 679, 679, 679, +679, nil, 679, 679, nil, 679, 679, 679, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 679, nil, nil, +679, nil, nil, 679, 679, nil, nil, 679, nil, nil, nil, nil, nil, 679, nil, +nil, nil, nil, nil, nil, nil, 679, nil, nil, nil, nil, 679, 679, 679, 679, +679, 679, nil, nil, nil, 679, 679, 680, 680, 680, nil, 680, nil, nil, nil, +680, 680, nil, nil, nil, 680, nil, 680, 680, 680, 680, 680, 680, 680, nil, +nil, nil, nil, 680, 680, 680, 680, 680, 680, 680, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 680, nil, nil, 680, 680, 680, 680, 680, 680, 680, 680, +680, 680, nil, 680, 680, nil, 680, 680, 680, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 680, nil, +nil, 680, nil, nil, 680, 680, nil, nil, 680, nil, nil, nil, nil, nil, 680, +nil, nil, nil, nil, nil, nil, nil, 680, nil, nil, nil, nil, 680, 680, 680, +680, 680, 680, nil, nil, nil, 680, 680, 690, 690, 690, nil, 690, nil, nil, +nil, 690, 690, nil, nil, nil, 690, nil, 690, 690, 690, 690, 690, 690, 690, +nil, nil, nil, nil, 690, 690, 690, 690, 690, 690, 690, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 690, nil, nil, 690, 690, 690, 690, 690, 690, 690, +690, 690, 690, nil, 690, 690, nil, 690, 690, 690, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 690, +nil, nil, 690, nil, nil, 690, 690, nil, nil, 690, nil, nil, nil, nil, nil, +690, nil, nil, nil, nil, nil, nil, nil, 690, nil, nil, nil, nil, 690, 690, +690, 690, 690, 690, nil, nil, nil, 690, 690, 691, 691, 691, nil, 691, nil, +nil, nil, 691, 691, nil, nil, nil, 691, nil, 691, 691, 691, 691, 691, 691, +691, nil, nil, nil, nil, 691, 691, 691, 691, 691, 691, 691, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 691, nil, nil, 691, 691, 691, 691, 691, 691, +691, 691, 691, 691, nil, 691, 691, nil, 691, 691, 691, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +691, nil, nil, 691, nil, nil, 691, 691, nil, nil, 691, nil, nil, nil, nil, +nil, 691, nil, nil, nil, nil, nil, nil, nil, 691, nil, nil, nil, nil, 691, +691, 691, 691, 691, 691, nil, nil, nil, 691, 691, 692, 692, 692, nil, 692, +nil, nil, nil, 692, 692, nil, nil, nil, 692, nil, 692, 692, 692, 692, 692, +692, 692, nil, nil, nil, nil, 692, 692, 692, 692, 692, 692, 692, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 692, nil, nil, 692, 692, 692, 692, 692, +692, 692, 692, 692, 692, nil, 692, 692, nil, 692, 692, 692, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 692, nil, nil, 692, nil, nil, 692, 692, nil, nil, 692, nil, nil, nil, +nil, nil, 692, nil, nil, nil, nil, nil, nil, nil, 692, nil, nil, nil, nil, +692, 692, 692, 692, 692, 692, nil, nil, nil, 692, 692, 698, 698, 698, nil, +698, nil, nil, nil, 698, 698, nil, nil, nil, 698, nil, 698, 698, 698, 698, +698, 698, 698, nil, nil, nil, nil, 698, 698, 698, 698, 698, 698, 698, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 698, nil, nil, 698, 698, 698, 698, +698, 698, 698, 698, 698, 698, nil, 698, 698, nil, nil, nil, 698, nil, 600, +600, 600, 600, 600, 600, 600, 600, 600, 600, 600, nil, 600, 600, nil, nil, +600, 600, 698, nil, nil, 698, nil, nil, 698, 698, nil, nil, 698, nil, nil, +nil, 600, nil, 600, nil, 600, 600, 600, 600, 600, 600, 600, nil, 600, nil, +nil, 698, 698, 698, 698, 698, 698, nil, nil, nil, 698, 698, 704, 704, 704, +600, 704, nil, nil, nil, 704, 704, nil, nil, nil, 704, nil, 704, 704, 704, +704, 704, 704, 704, nil, nil, nil, nil, 704, 704, 704, 704, 704, 704, 704, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 704, nil, nil, 704, 704, 704, +704, 704, 704, 704, 704, 704, 704, nil, 704, 704, nil, 704, 704, 704, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 704, nil, nil, 704, nil, nil, 704, 704, nil, nil, 704, nil, +704, nil, 704, nil, 704, nil, nil, nil, nil, nil, nil, nil, 704, nil, nil, +nil, nil, 704, 704, 704, 704, 704, 704, nil, nil, nil, 704, 704, 713, 713, +713, nil, 713, nil, nil, nil, 713, 713, nil, nil, nil, 713, nil, 713, 713, +713, 713, 713, 713, 713, nil, nil, nil, nil, 713, 713, 713, 713, 713, 713, +713, nil, nil, nil, nil, nil, nil, nil, nil, nil, 713, nil, nil, 713, 713, +713, 713, 713, 713, 713, 713, 713, 713, nil, 713, 713, nil, 713, 713, 713, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 713, nil, nil, 713, nil, nil, 713, 713, nil, nil, 713, +nil, 713, nil, 713, nil, 713, nil, nil, nil, nil, nil, nil, nil, 713, nil, +nil, nil, nil, 713, 713, 713, 713, 713, 713, nil, nil, nil, 713, 713, 715, +715, 715, nil, 715, nil, nil, nil, 715, 715, nil, nil, nil, 715, nil, 715, +715, 715, 715, 715, 715, 715, nil, nil, nil, nil, 715, 715, 715, 715, 715, +715, 715, nil, nil, nil, nil, nil, nil, nil, nil, nil, 715, nil, nil, 715, +715, 715, 715, 715, 715, 715, 715, 715, 715, nil, 715, 715, nil, 715, 715, +715, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 715, nil, nil, 715, nil, nil, 715, 715, nil, nil, +715, nil, 715, nil, 715, nil, 715, nil, nil, nil, nil, nil, nil, nil, 715, +nil, nil, nil, nil, 715, 715, 715, 715, 715, 715, nil, nil, nil, 715, 715, +728, 728, 728, nil, 728, nil, nil, nil, 728, 728, nil, nil, nil, 728, nil, +728, 728, 728, 728, 728, 728, 728, nil, nil, nil, nil, 728, 728, 728, 728, +728, 728, 728, nil, nil, nil, nil, nil, nil, nil, nil, nil, 728, nil, nil, +728, 728, 728, 728, 728, 728, 728, 728, 728, 728, nil, 728, 728, nil, nil, +nil, 728, nil, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, nil, +677, 677, nil, nil, 677, 677, 728, nil, nil, 728, nil, nil, 728, 728, nil, +nil, 728, nil, nil, nil, 677, nil, 677, nil, 677, 677, 677, 677, 677, 677, +677, nil, 677, nil, nil, 728, 728, 728, 728, 728, 728, nil, nil, nil, 728, +728, 734, 734, 734, 677, 734, nil, nil, nil, 734, 734, nil, nil, nil, 734, +nil, 734, 734, 734, 734, 734, 734, 734, nil, nil, nil, nil, 734, 734, 734, +734, 734, 734, 734, nil, nil, 734, nil, nil, nil, nil, nil, nil, 734, nil, +nil, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, nil, 734, 734, nil, +734, 734, 734, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 734, nil, nil, 734, nil, nil, 734, 734, +nil, nil, 734, nil, nil, nil, nil, nil, 734, nil, nil, nil, nil, nil, nil, +nil, 734, nil, nil, nil, nil, 734, 734, 734, 734, 734, 734, nil, nil, nil, +734, 734, 740, 740, 740, nil, 740, nil, nil, nil, 740, 740, nil, nil, nil, +740, nil, 740, 740, 740, 740, 740, 740, 740, nil, nil, nil, nil, 740, 740, +740, 740, 740, 740, 740, nil, nil, nil, nil, nil, nil, nil, nil, nil, 740, +nil, nil, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, nil, 740, 740, +nil, 740, 740, 740, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 740, nil, nil, 740, nil, nil, 740, +740, nil, nil, 740, nil, 740, nil, nil, nil, 740, nil, nil, nil, nil, nil, +nil, nil, 740, nil, nil, nil, nil, 740, 740, 740, 740, 740, 740, nil, nil, +nil, 740, 740, 759, 759, 759, nil, 759, nil, nil, nil, 759, 759, nil, nil, +nil, 759, nil, 759, 759, 759, 759, 759, 759, 759, nil, nil, nil, nil, 759, +759, 759, 759, 759, 759, 759, nil, nil, nil, nil, nil, nil, nil, nil, nil, +759, nil, nil, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, nil, 759, +759, nil, 759, 759, 759, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 759, nil, nil, 759, nil, nil, +759, 759, nil, nil, 759, nil, nil, nil, nil, nil, 759, nil, nil, nil, nil, +nil, nil, nil, 759, nil, nil, nil, nil, 759, 759, 759, 759, 759, 759, nil, +nil, nil, 759, 759, 768, 768, 768, nil, 768, nil, nil, nil, 768, 768, nil, +nil, nil, 768, nil, 768, 768, 768, 768, 768, 768, 768, nil, nil, nil, nil, +768, 768, 768, 768, 768, 768, 768, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 768, nil, nil, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, nil, +768, 768, nil, 768, 768, 768, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 768, nil, nil, 768, nil, +nil, 768, 768, nil, nil, 768, nil, nil, nil, nil, nil, 768, nil, nil, nil, +nil, nil, nil, nil, 768, nil, nil, nil, nil, 768, 768, 768, 768, 768, 768, +nil, nil, nil, 768, 768, 769, 769, 769, nil, 769, nil, nil, nil, 769, 769, +nil, nil, nil, 769, nil, 769, 769, 769, 769, 769, 769, 769, nil, nil, nil, +nil, 769, 769, 769, 769, 769, 769, 769, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 769, nil, nil, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, +nil, 769, 769, nil, nil, nil, 769, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 769, nil, nil, 769, +nil, nil, 769, 769, nil, nil, 769, nil, 769, nil, 769, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 769, 769, 769, 769, 769, +769, nil, nil, nil, 769, 769, 780, 780, 780, nil, 780, nil, nil, nil, 780, +780, nil, nil, nil, 780, nil, 780, 780, 780, 780, 780, 780, 780, nil, nil, +nil, nil, 780, 780, 780, 780, 780, 780, 780, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 780, nil, nil, 780, 780, 780, 780, 780, 780, 780, 780, 780, +780, nil, 780, 780, nil, 780, 780, 780, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 780, nil, nil, +780, nil, nil, 780, 780, nil, nil, 780, nil, nil, nil, nil, nil, 780, nil, +nil, nil, nil, nil, nil, nil, 780, nil, nil, nil, nil, 780, 780, 780, 780, +780, 780, nil, nil, nil, 780, 780, 786, 786, 786, nil, 786, nil, nil, nil, +786, 786, nil, nil, nil, 786, nil, 786, 786, 786, 786, 786, 786, 786, nil, +nil, nil, nil, 786, 786, 786, 786, 786, 786, 786, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 786, nil, nil, 786, 786, 786, 786, 786, 786, 786, 786, +786, 786, nil, 786, 786, nil, 786, 786, 786, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 786, nil, +nil, 786, nil, nil, 786, 786, nil, nil, 786, nil, nil, nil, nil, nil, 786, +nil, nil, nil, nil, nil, nil, nil, 786, nil, nil, nil, nil, 786, 786, 786, +786, 786, 786, nil, nil, nil, 786, 786, 788, 788, 788, nil, 788, nil, nil, +nil, 788, 788, nil, nil, nil, 788, nil, 788, 788, 788, 788, 788, 788, 788, +nil, nil, nil, nil, 788, 788, 788, 788, 788, 788, 788, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 788, nil, nil, 788, 788, 788, 788, 788, 788, 788, +788, 788, 788, nil, 788, 788, nil, 788, 788, 788, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 788, +nil, nil, 788, nil, nil, 788, 788, nil, nil, 788, nil, nil, nil, nil, nil, +788, nil, nil, nil, nil, nil, nil, nil, 788, nil, nil, nil, nil, 788, 788, +788, 788, 788, 788, nil, nil, nil, 788, 788, 802, 802, 802, nil, 802, nil, +nil, nil, 802, 802, nil, nil, nil, 802, nil, 802, 802, 802, 802, 802, 802, +802, nil, nil, nil, nil, 802, 802, 802, 802, 802, 802, 802, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 802, nil, nil, 802, 802, 802, 802, 802, 802, +802, 802, 802, 802, nil, 802, 802, nil, 802, 802, 802, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +802, nil, nil, 802, nil, nil, 802, 802, nil, nil, 802, nil, nil, nil, nil, +nil, 802, nil, nil, nil, nil, nil, nil, nil, 802, nil, nil, nil, nil, 802, +802, 802, 802, 802, 802, nil, nil, nil, 802, 802, 820, 820, 820, nil, 820, +nil, nil, nil, 820, 820, nil, nil, nil, 820, nil, 820, 820, 820, 820, 820, +820, 820, nil, nil, nil, nil, 820, 820, 820, 820, 820, 820, 820, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 820, nil, nil, 820, 820, 820, 820, 820, +820, 820, 820, 820, 820, nil, 820, 820, nil, nil, nil, 820, nil, 682, 682, +682, 682, 682, 682, 682, 682, 682, 682, 682, nil, 682, 682, nil, nil, 682, +682, 820, nil, nil, 820, nil, nil, 820, 820, nil, nil, 820, nil, nil, nil, +682, nil, 682, nil, 682, 682, 682, 682, 682, 682, 682, nil, 682, nil, nil, +820, 820, 820, 820, 820, 820, nil, nil, nil, 820, 820, 822, 822, 822, 682, +822, nil, nil, nil, 822, 822, nil, nil, nil, 822, nil, 822, 822, 822, 822, +822, 822, 822, nil, nil, nil, nil, 822, 822, 822, 822, 822, 822, 822, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 822, nil, nil, 822, 822, 822, 822, +822, 822, 822, 822, 822, 822, nil, 822, 822, nil, 822, 822, 822, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 822, nil, nil, 822, nil, nil, 822, 822, nil, nil, 822, nil, 822, +nil, nil, nil, 822, nil, nil, nil, nil, nil, nil, nil, 822, nil, nil, nil, +nil, 822, 822, 822, 822, 822, 822, nil, nil, nil, 822, 822, 827, 827, 827, +nil, 827, nil, nil, nil, 827, 827, nil, nil, nil, 827, nil, 827, 827, 827, +827, 827, 827, 827, nil, nil, nil, nil, 827, 827, 827, 827, 827, 827, 827, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 827, nil, nil, 827, 827, 827, +827, 827, 827, 827, 827, 827, 827, nil, 827, 827, nil, nil, nil, 827, nil, +684, 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, nil, 684, 684, nil, +nil, 684, 684, 827, nil, nil, 827, nil, nil, 827, 827, nil, nil, 827, nil, +nil, nil, 684, nil, 684, nil, 684, 684, 684, 684, 684, 684, 684, nil, 684, +nil, nil, 827, 827, 827, 827, 827, 827, nil, nil, nil, 827, 827, 832, 832, +832, 684, 832, nil, nil, nil, 832, 832, nil, nil, nil, 832, nil, 832, 832, +832, 832, 832, 832, 832, nil, nil, nil, nil, 832, 832, 832, 832, 832, 832, +832, nil, nil, nil, nil, nil, nil, nil, nil, nil, 832, nil, nil, 832, 832, +832, 832, 832, 832, 832, 832, 832, 832, nil, 832, 832, nil, 832, 832, 832, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 832, nil, nil, 832, nil, nil, 832, 832, nil, nil, 832, +nil, 832, nil, 832, nil, 832, nil, nil, nil, nil, nil, nil, nil, 832, nil, +nil, nil, nil, 832, 832, 832, 832, 832, 832, nil, nil, nil, 832, 832, 835, +835, 835, nil, 835, nil, nil, nil, 835, 835, nil, nil, nil, 835, nil, 835, +835, 835, 835, 835, 835, 835, nil, nil, nil, nil, 835, 835, 835, 835, 835, +835, 835, nil, nil, nil, nil, nil, nil, nil, nil, nil, 835, nil, nil, 835, +835, 835, 835, 835, 835, 835, 835, 835, 835, nil, 835, 835, nil, 835, 835, +835, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 835, nil, nil, 835, nil, nil, 835, 835, nil, nil, +835, nil, 835, nil, 835, nil, 835, nil, nil, nil, nil, nil, nil, nil, 835, +nil, nil, nil, nil, 835, 835, 835, 835, 835, 835, nil, nil, nil, 835, 835, +861, 861, 861, nil, 861, nil, nil, nil, 861, 861, nil, nil, nil, 861, nil, +861, 861, 861, 861, 861, 861, 861, nil, nil, nil, nil, 861, 861, 861, 861, +861, 861, 861, nil, nil, nil, nil, nil, nil, nil, nil, nil, 861, nil, nil, +861, 861, 861, 861, 861, 861, 861, 861, 861, 861, nil, 861, 861, nil, nil, +nil, 861, nil, 687, 687, 687, 687, 687, 687, 687, 687, 687, 687, 687, nil, +687, 687, nil, nil, 687, 687, 861, nil, nil, 861, nil, nil, 861, 861, nil, +nil, 861, nil, nil, nil, 687, nil, 687, nil, 687, 687, 687, 687, 687, 687, +687, nil, 687, nil, nil, 861, 861, 861, 861, 861, 861, nil, nil, nil, 861, +861, 864, 864, 864, 687, 864, nil, nil, nil, 864, 864, nil, nil, nil, 864, +nil, 864, 864, 864, 864, 864, 864, 864, nil, nil, nil, nil, 864, 864, 864, +864, 864, 864, 864, nil, nil, nil, nil, nil, nil, nil, nil, nil, 864, nil, +nil, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, nil, 864, 864, nil, +864, 864, 864, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 864, nil, nil, 864, nil, nil, 864, 864, +nil, nil, 864, nil, nil, nil, nil, nil, 864, nil, nil, nil, nil, nil, nil, +nil, 864, nil, nil, nil, nil, 864, 864, 864, 864, 864, 864, nil, nil, nil, +864, 864, 867, 867, 867, nil, 867, nil, nil, nil, 867, 867, nil, nil, nil, +867, nil, 867, 867, 867, 867, 867, 867, 867, nil, nil, nil, nil, 867, 867, +867, 867, 867, 867, 867, nil, nil, nil, nil, nil, nil, nil, nil, nil, 867, +nil, nil, 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, nil, 867, 867, +nil, 867, 867, 867, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 867, nil, nil, 867, nil, nil, 867, +867, nil, nil, 867, nil, nil, nil, nil, nil, 867, nil, nil, nil, nil, nil, +nil, nil, 867, nil, nil, nil, nil, 867, 867, 867, 867, 867, 867, nil, nil, +nil, 867, 867, 875, 875, 875, nil, 875, nil, nil, nil, 875, 875, nil, nil, +nil, 875, nil, 875, 875, 875, 875, 875, 875, 875, nil, nil, nil, nil, 875, +875, 875, 875, 875, 875, 875, nil, nil, nil, nil, nil, nil, nil, nil, nil, +875, nil, nil, 875, 875, 875, 875, 875, 875, 875, 875, 875, 875, nil, 875, +875, nil, nil, nil, 875, nil, 689, 689, 689, 689, 689, 689, 689, 689, 689, +689, 689, nil, 689, 689, nil, nil, 689, 689, 875, nil, nil, 875, nil, nil, +875, 875, nil, nil, 875, nil, nil, nil, 689, nil, 689, nil, 689, 689, 689, +689, 689, 689, 689, nil, 689, nil, nil, 875, 875, 875, 875, 875, 875, nil, +nil, nil, 875, 875, 880, 880, 880, 689, 880, nil, nil, nil, 880, 880, nil, +nil, nil, 880, nil, 880, 880, 880, 880, 880, 880, 880, nil, nil, nil, nil, +880, 880, 880, 880, 880, 880, 880, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 880, nil, nil, 880, 880, 880, 880, 880, 880, 880, 880, 880, 880, nil, +880, 880, nil, 880, 880, 880, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 880, nil, nil, 880, nil, +nil, 880, 880, nil, nil, 880, nil, 880, nil, 880, nil, 880, nil, nil, nil, +nil, nil, nil, nil, 880, nil, nil, nil, nil, 880, 880, 880, 880, 880, 880, +nil, nil, nil, 880, 880, 886, 886, 886, nil, 886, nil, nil, nil, 886, 886, +nil, nil, nil, 886, nil, 886, 886, 886, 886, 886, 886, 886, nil, nil, nil, +nil, 886, 886, 886, 886, 886, 886, 886, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 886, nil, nil, 886, 886, 886, 886, 886, 886, 886, 886, 886, 886, +nil, 886, 886, nil, nil, nil, 886, nil, 694, 694, 694, 694, 694, 694, 694, +694, 694, 694, 694, nil, 694, 694, nil, nil, 694, 694, 886, nil, nil, 886, +nil, nil, 886, 886, nil, nil, 886, nil, nil, nil, 694, nil, 694, nil, 694, +694, 694, 694, 694, 694, 694, nil, 694, nil, nil, 886, 886, 886, 886, 886, +886, nil, nil, nil, 886, 886, 889, 889, 889, 694, 889, nil, nil, nil, 889, +889, nil, nil, nil, 889, nil, 889, 889, 889, 889, 889, 889, 889, nil, nil, +nil, nil, 889, 889, 889, 889, 889, 889, 889, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 889, nil, nil, 889, 889, 889, 889, 889, 889, 889, 889, 889, +889, nil, 889, 889, nil, 889, 889, 889, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 889, nil, nil, +889, nil, nil, 889, 889, nil, nil, 889, nil, nil, nil, nil, nil, 889, nil, +nil, nil, nil, nil, nil, nil, 889, nil, nil, nil, nil, 889, 889, 889, 889, +889, 889, nil, nil, nil, 889, 889, 64, 64, 64, 64, 64, 64, 64, 64, +64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, +64, nil, nil, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, nil, nil, +nil, nil, nil, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, +nil, nil, nil, nil, nil, nil, 64, 64, nil, 64, 64, 64, 64, nil, 64, +64, nil, nil, 64, nil, nil, nil, nil, 64, 64, 64, 64, nil, nil, nil, +nil, nil, 64, nil, nil, nil, nil, nil, nil, nil, 64, 64, nil, 64, 64, +64, 64, 64, 64, 64, 64, 64, nil, 64, nil, nil, 64, 664, 664, 664, +664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, +664, 664, 664, 664, 664, 664, nil, nil, 664, 664, 664, 664, 664, 664, 664, +664, 664, 664, nil, nil, nil, nil, nil, 664, 664, 664, 664, 664, 664, 664, +664, nil, nil, 664, nil, nil, nil, nil, nil, nil, nil, 664, 664, nil, 664, +664, 664, 664, nil, 664, 664, nil, nil, 664, nil, nil, nil, nil, 664, 664, +664, 664, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +664, 664, nil, 664, 664, 664, 664, 664, 664, 664, 664, 664, nil, 664, nil, +nil, 664, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, nil, 581, +581, nil, nil, 581, 581, nil, nil, nil, 581, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 581, nil, 581, nil, 581, 581, 581, 581, 581, 581, 581, +nil, 581, nil, nil, nil, nil, nil, nil, nil, 192, 192, nil, nil, 192, nil, +nil, nil, nil, 581, nil, 581, 192, 192, nil, 192, 192, 192, 192, nil, 192, +192, nil, nil, 192, nil, nil, nil, nil, 192, 192, 192, 192, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 192, 192, nil, 192, 192, +192, 192, 192, 192, 192, 192, 192, nil, 192, 193, 193, 192, nil, 193, nil, +nil, nil, nil, nil, nil, nil, 193, 193, nil, 193, 193, 193, 193, nil, 193, +193, nil, nil, 193, nil, nil, nil, nil, 193, 193, 193, 193, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 193, 193, nil, 193, 193, +193, 193, 193, 193, 193, 193, 193, nil, 193, 251, 251, 193, nil, 251, nil, +nil, nil, nil, nil, nil, nil, 251, 251, nil, 251, 251, 251, 251, nil, 251, +251, nil, nil, 251, nil, nil, nil, nil, 251, 251, 251, 251, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 251, 251, nil, 251, 251, +251, 251, 251, 251, 251, 251, 251, nil, 251, 252, 252, 251, nil, 252, nil, +nil, nil, nil, nil, nil, nil, 252, 252, nil, 252, 252, 252, 252, nil, 252, +252, nil, nil, 252, nil, nil, nil, nil, 252, 252, 252, 252, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 252, 252, nil, 252, 252, +252, 252, 252, 252, 252, 252, 252, nil, 252, 391, 391, 252, nil, 391, nil, +nil, nil, nil, nil, nil, nil, 391, 391, nil, 391, 391, 391, 391, nil, 391, +391, nil, nil, 391, nil, nil, nil, nil, 391, 391, 391, 391, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 391, 391, nil, 391, 391, +391, 391, 391, 391, 391, 391, 391, nil, 391, 392, 392, 391, nil, 392, nil, +nil, nil, nil, nil, nil, nil, 392, 392, nil, 392, 392, 392, 392, nil, 392, +392, nil, nil, 392, nil, nil, nil, nil, 392, 392, 392, 392, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 392, 392, nil, 392, 392, +392, 392, 392, 392, 392, 392, 392, nil, 392, nil, nil, 392, 423, 423, 423, +423, 423, 423, 423, 423, 423, 423, 423, nil, 423, 423, nil, nil, 423, 423, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 423, +nil, 423, nil, 423, 423, 423, 423, 423, 423, 423, nil, 423, nil, nil, nil, +nil, nil, nil, 457, 457, nil, nil, 457, nil, nil, nil, nil, nil, 423, 423, +457, 457, nil, 457, 457, 457, 457, nil, 457, 457, nil, nil, 457, nil, nil, +nil, nil, 457, 457, 457, 457, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 457, 457, nil, 457, 457, 457, 457, 457, 457, 457, 457, +457, nil, 457, 458, 458, 457, nil, 458, nil, nil, nil, nil, nil, nil, nil, +458, 458, nil, 458, 458, 458, 458, nil, 458, 458, nil, nil, 458, nil, nil, +nil, nil, 458, 458, 458, 458, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 458, 458, nil, 458, 458, 458, 458, 458, 458, 458, 458, +458, nil, 458, 466, 466, 458, nil, 466, nil, nil, nil, nil, nil, nil, nil, +466, 466, nil, 466, 466, 466, 466, nil, 466, 466, nil, nil, 466, nil, nil, +nil, nil, 466, 466, 466, 466, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 466, 466, nil, 466, 466, 466, 466, 466, 466, 466, 466, +466, nil, 466, 467, 467, 466, nil, 467, nil, nil, nil, nil, nil, nil, nil, +467, 467, nil, 467, 467, 467, 467, nil, 467, 467, nil, nil, 467, nil, nil, +nil, nil, 467, 467, 467, 467, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 467, 467, nil, 467, 467, 467, 467, 467, 467, 467, 467, +467, nil, 467, 498, 498, 467, nil, 498, nil, nil, nil, nil, nil, nil, nil, +498, 498, nil, 498, 498, 498, 498, nil, 498, 498, nil, nil, 498, nil, nil, +nil, nil, 498, 498, 498, 498, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 498, 498, nil, 498, 498, 498, 498, 498, 498, 498, 498, +498, nil, 498, 499, 499, 498, nil, 499, nil, nil, nil, nil, nil, nil, nil, +499, 499, nil, 499, 499, 499, 499, nil, 499, 499, nil, nil, 499, nil, nil, +nil, nil, 499, 499, 499, 499, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 499, 499, nil, 499, 499, 499, 499, 499, 499, 499, 499, +499, nil, 499, 505, 505, 499, nil, 505, nil, nil, nil, nil, nil, nil, nil, +505, 505, nil, 505, 505, 505, 505, nil, 505, 505, nil, nil, 505, nil, nil, +nil, nil, 505, 505, 505, 505, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 505, 505, nil, 505, 505, 505, 505, 505, 505, 505, 505, +505, nil, 505, 507, 507, 505, nil, 507, nil, nil, nil, nil, nil, nil, nil, +507, 507, nil, 507, 507, 507, 507, nil, 507, 507, nil, nil, 507, nil, nil, +nil, nil, 507, 507, 507, 507, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 507, 507, nil, 507, 507, 507, 507, 507, 507, 507, 507, +507, nil, 507, 578, 578, 507, nil, 578, nil, nil, nil, nil, nil, nil, nil, +578, 578, nil, 578, 578, 578, 578, nil, 578, 578, nil, nil, 578, nil, nil, +nil, nil, 578, 578, 578, 578, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 578, 578, nil, 578, 578, 578, 578, 578, 578, 578, 578, +578, nil, 578, 579, 579, 578, nil, 579, nil, nil, nil, nil, nil, nil, nil, +579, 579, nil, 579, 579, 579, 579, nil, 579, 579, nil, nil, 579, nil, nil, +nil, nil, 579, 579, 579, 579, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 579, 579, nil, 579, 579, 579, 579, 579, 579, 579, 579, +579, nil, 579, 823, 823, 579, nil, 823, nil, nil, nil, nil, nil, nil, nil, +823, 823, nil, 823, 823, 823, 823, nil, 823, 823, nil, nil, 823, nil, nil, +nil, nil, 823, 823, 823, 823, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 823, 823, nil, 823, 823, 823, 823, 823, 823, 823, 823, +823, nil, 823, 824, 824, 823, nil, 824, nil, nil, nil, nil, nil, nil, nil, +824, 824, nil, 824, 824, 824, 824, nil, 824, 824, nil, nil, 824, nil, nil, +nil, nil, 824, 824, 824, 824, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 824, 824, nil, 824, 824, 824, 824, 824, 824, 824, 824, +824, nil, 824, nil, nil, 824, 480, 480, 480, 480, 480, 480, 480, 480, 480, +480, 480, nil, 480, 480, nil, nil, 480, 480, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 480, nil, 480, nil, 480, 480, 480, +480, 480, 480, 480, nil, 480, nil, 731, 731, 731, 731, 731, 731, 731, 731, +731, 731, 731, nil, 731, 731, 480, 480, 731, 731, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 731, nil, 731, nil, 731, 731, +731, 731, 731, 731, 731, nil, 731, nil, 767, 767, 767, 767, 767, 767, 767, +767, 767, 767, 767, nil, 767, 767, 731, 731, 767, 767, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 767, nil, 767, nil, 767, +767, 767, 767, 767, 767, 767, nil, 767, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 767] + +racc_action_pointer = [1233, 30, nil, -98, 863, 4770, 4891, 5012, - +53, 2, 71, 90, 160, 218, 174, 130, nil, 5125, 5246, 6094, 234, nil, 5367, +5488, 5609, 292, 138, 5730, 5851, nil, 1355, 5972, 6093, nil, 146, 316, 245, 346, +6214, 6335, 6456, 183, 300, nil, nil, nil, nil, nil, nil, nil, 214, 1477, 6577, +6698, 6819, 58, 6940, 7061, nil, nil, 735, 7182, 7303, 7424, 22775, nil, nil, nil, +nil, nil, - +92, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 7545, nil, nil, +nil, 7666, nil, nil, nil, nil, nil, nil, nil, nil, 311, nil, 863, nil, nil, +nil, 7787, 7908, 8029, 8150, 8271, 981, nil, 221, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 196, nil, 1599, 1721, 8392, 8513, +8634, 8755, 23000, 23060, 8876, 8997, 9118, nil, 377, -67, 279, - +52, 212, 274, 1843, nil, nil, 9239, 9360, 9481, 9602, 9723, 9844, 9965, 10086, 10207, +10328, 10449, 10570, 10691, 10812, 10933, 11054, 11175, 11296, 11417, 11538, 11659, 11780, 11901, 12022, +12143, 12264, 12385, nil, nil, nil, 7183, nil, 242, 254, 12506, nil, 12627, 310, nil, +nil, nil, nil, nil, nil, 23120, 23180, 313, 12748, 12869, nil, nil, nil, nil, nil, +nil, nil, 12990, 325, 1965, 333, 352, 315, 13111, 2087, 399, 496, 430, 520, 411, +382, 161, nil, 443, 430, nil, nil, 335, 472, 486, 521, nil, 498, nil, 13232, +nil, 565, 566, 457, nil, 460, 119, 136, 13353, 493, 147, 479, 244, nil, 482, +-7, 8, 13474, 13595, -67, 32, 464, -9, 522, 545, - +1, 575, nil, nil, 319, 345, 115, nil, 614, nil, 9, 13716, nil, nil, 311, +419, 453, 456, 457, 478, 488, 499, nil, 519, nil, 13837, nil, 149, 207, 235, +246, - +35, 279, nil, 1103, nil, nil, nil, nil, nil, nil, 13958, nil, nil, nil, nil, +509, 511, nil, nil, 735, nil, 495, 14071, nil, 499, nil, nil, 7304, 535, 340, +342, 14192, nil, nil, 0, 541, 107, nil, 14313, 14434, nil, 7425, nil, nil, 23240, +23300, 14555, - +33, 14676, 14797, 14918, 614, 863, 377, 384, 566, 574, 575, 576, 2941, 3063, 3185, +1599, 980, 1721, 1843, 1965, 2087, 2209, 2331, 2453, 2575, 249, 465, 2697, 2819, 23348, +- +48, nil, 15039, nil, 15160, 514, nil, 15281, 321, nil, nil, 376, nil, nil, 563, +531, -64, 529, 630, nil, nil, 15402, -27, - +13, 571, nil, 572, 544, nil, nil, nil, 586, 15523, 23414, 23474, 617, 606, nil, +nil, 15644, 15765, 15886, 23534, 23594, 13112, 16007, 688, 16128, nil, 582, nil, nil, 16249, +nil, nil, 16370, 24122, nil, 16491, nil, nil, nil, 2209, 711, nil, nil, 2331, 68, +109, 708, 716, 2453, 16612, 16733, 23654, 23714, 4, nil, nil, 658, nil, 23774, 16854, +23834, nil, nil, 16975, 100, -34, 2575, 997, nil, nil, nil, - +32, nil, nil, nil, 598, nil, nil, nil, 609, nil, 147, nil, nil, 606, nil, +nil, 17096, nil, nil, 17209, 17330, nil, 349, 17451, 17572, 648, nil, nil, 17693, 649, +nil, 17814, 86, 115, 493, 614, 655, 1106, 17935, 18056, nil, 2697, 18177, 621, nil, +666, 18298, nil, 674, nil, 663, nil, nil, nil, nil, nil, 113, nil, 673, 674, +23894, 23954, 18419, 22933, 69, 643, 18540, nil, 683, nil, 2819, 2941, nil, 1, nil, +681, 63, 112, 687, 347, 735, 688, 19630, 712, 714, - +2, 772, nil, 3063, 654, 707, nil, nil, 707, 18661, nil, nil, 506, nil, 800, +nil, nil, nil, nil, nil, 810, nil, 814, 700, 15, 18782, 738, 13, 23, 25, +75, 18903, 348, 788, nil, 740, 3185, 331, nil, nil, 835, 3307, 1284, 337, 718, +719, 726, nil, nil, nil, nil, nil, 724, nil, nil, nil, nil, 806, nil, nil, +809, 22885, 773, nil, nil, nil, nil, nil, 3429, nil, nil, nil, nil, nil, 20114, +744, 19024, 19145, nil, 21324, nil, 21566, nil, nil, 21929, nil, 22292, 19266, 19387, 19508, +167, 22534, nil, 745, 984, 19629, nil, 770, 868, 760, nil, 19750, 761, 3551, nil, +nil, 802, 803, - +63, 871, 19871, nil, 19992, 772, nil, 832, 813, 933, 738, nil, nil, 3673, nil, +nil, 31, 20113, nil, nil, 24168, 938, nil, 20234, 941, 3795, 3917, nil, nil, 20355, +4039, nil, 26, 133, nil, 942, nil, 4161, nil, 946, 836, nil, 1406, nil, - +43, nil, nil, 436, 20476, nil, nil, nil, nil, 862, nil, nil, 24214, 20597, 20718, +863, 866, 920, 907, 847, 884, nil, nil, nil, nil, 20839, nil, 873, 903, 869, +nil, 20960, 870, 21081, nil, nil, nil, nil, nil, 4283, nil, nil, nil, 32, nil, +999, 1001, 21202, 332, nil, nil, 1002, nil, 936, 898, 899, nil, nil, 900, 899, +nil, nil, 1528, nil, nil, 21323, 1106, 21444, 24014, 24074, 918, 933, 21565, 5973, nil, +nil, nil, 21686, 914, nil, 21807, 918, 1046, 4405, nil, nil, nil, nil, nil, nil, +4527, nil, nil, 282, nil, nil, nil, 4649, nil, 927, 959, 965, 362, 400, 482, +977, 21928, nil, nil, 22049, 931, nil, 22170, nil, nil, 545, 1054, 938, 1057, 972, +22291, 980, nil, 945, nil, 22412, 948, nil, nil, nil, nil, 22533, nil, nil, 22654, +nil, nil, 952, nil] + +racc_action_default = [-4, -497, -1, -485, -5, -497, -497, -497, -497, -497, -497, -497, -497, -497, -271, -32, -33, -497, -497, -38, -40, -41, -282, -315, -316, -45, -249, -361, -285, -58, -4, -62, -67, -68, -497, -428, -497, -497, -497, -497, -497, -487, -214, -264, -265, -266, -267, -268, -269, -270, -475, -4, -497, -496, -467, -288, -497, -497, -292, -295, -485, -497, -497, -497, -497, -317, -318, -381, -382, -383, -384, -385, -399, -388, -401, -401, -392, -397, -411, -401, -413, -414, -417, -418, -419, -420, -421, -422, -423, -424, -425, -426, -427, -430, -431, -497, -3, -486, -492, -493, -494, -497, -497, -497, -497, -497, -6, -8, -497, -93, -94, -95, -96, -97, -98, -99, -100, -101, -105, -106, -107, -108, -109, -110, -111, -112, -113, -114, -115, -116, -117, -118, -119, -120, -121, -122, -123, -124, -125, -126, -127, -128, -129, -130, -131, -132, -133, -134, -135, -136, -137, -138, -139, -140, -141, -142, -143, -144, -145, -146, -147, -148, -149, -150, -151, -152, -153, -154, -155, -156, -157, -158, -159, -160, -161, -162, -163, -164, -165, -166, -167, -168, -169, -170, -13, -102, -4, -4, -497, -497, -497, -496, -497, -497, -497, -497, -497, -36, -497, -428, -497, -271, -497, -497, -4, -37, -206, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -497, -351, -353, -42, -215, -228, -258, -258, -497, -236, -497, -259, -282, -315, -316, -470, -43, -44, -497, -497, -50, -496, -497, -287, -356, -362, -364, -56, -360, -57, -497, -58, -4, -497, -497, -63, -65, -4, -72, -497, -497, -79, -285, -487, -497, -319, -361, -497, -66, -70, -278, -415, -416, -497, -191, -192, -207, -497, -488, -373, -497, -274, -216, -487, -489, -489, -497, -497, -489, -497, -489, -289, -39, -497, -497, -497, -497, -485, -497, -486, -428, -497, -497, -271, -497, -331, -332, -88, -89, -497, -91, -497, -271, -497, -497, -428, -308, -93, -94, -131, -132, -148, -153, -160, -163, -310, -497, -465, -497, -386, -497, -497, -497, -497, -497, -497, 894, -7, -495, -14, -15, -16, -17, -18, -497, -10, -11, -12, -103, -497, -497, -21, -29, -171, -259, -497, -497, -22, -30, -31, -23, -173, -497, -476, -477, -226, -478, -479, -476, -249, -477, -359, -481, -482, -28, -180, -34, -35, -497, -497, -496, -278, -497, -497, -497, -181, -182, -183, -184, -185, -186, -187, -188, -193, -194, -195, -196, -197, -198, -199, -200, -201, -202, -203, -204, -205, -208, -209, -210, -211, -497, -347, -229, -497, -231, -497, -258, -256, -497, -249, -476, -477, -249, -48, -51, -497, -487, -487, -258, -228, -250, -251, -252, -347, -347, -497, -284, -497, -59, -276, -71, -64, -497, -496, -497, -497, -78, -497, -415, -416, -497, -497, -497, -497, -497, -212, -497, -496, -496, -273, -487, -217, -218, -491, -490, -220, -491, -487, -280, -491, -469, -281, -468, -4, -320, -321, -322, -4, -497, -497, -497, -497, -4, -497, -496, -497, -497, -278, -301, -88, -89, -90, -497, -496, -497, -304, -432, -497, -497, -497, -4, -445, -312, -483, -484, -487, -387, -400, -403, -497, -405, -389, -402, -497, -391, -497, -394, -396, -497, -412, -9, -497, -19, -20, -497, -497, -263, -279, -497, -497, -52, -227, -357, -497, -54, -358, -497, -476, -477, -480, -277, -497, -171, -497, -497, -349, -4, -497, -258, -257, -260, -497, -471, -497, -235, -497, -472, -46, -354, -47, -355, -347, -222, -497, -497, -497, -497, -497, -38, -497, -258, -497, -248, -497, -254, -4, -4, -283, -59, -69, -497, -476, -477, -226, -75, -77, -497, -179, -189, -190, -497, -496, -329, -4, -374, -496, -375, -376, -497, -497, -260, -221, -496, -323, -496, -293, -324, -325, -326, -296, -497, -299, -497, -367, -497, -497, -497, -476, -477, -480, -277, -497, -88, -89, -92, -497, -4, -497, -434, -306, -497, -4, -445, -497, -464, -464, -464, -444, -446, -447, -448, -449, -450, -451, -454, -456, -457, -459, -460, -461, -497, -497, -497, -404, -407, -408, -409, -410, -4, -390, -393, -395, -398, -104, -172, -261, -497, -497, -25, -175, -26, -176, -53, -27, -177, -55, -178, -497, -497, -497, -279, -213, -333, -335, -345, -497, -348, -497, -497, -258, -233, -497, -258, -4, -223, -224, -226, -226, -487, -497, -497, -241, -497, -258, -253, -497, -497, -497, -73, -286, -2, -4, -380, -330, -497, -497, -378, -275, -487, -497, -327, -497, -497, -4, -4, -298, -300, -497, -4, -369, -279, -497, -279, -497, -433, -4, -309, -497, -487, -436, -497, -440, -497, -442, -443, -497, -497, -458, -462, -313, -466, -497, -262, -24, -174, -497, -336, -80, -497, -497, -87, -344, -497, -346, -350, -352, -230, -497, -232, -497, -497, -258, -238, -497, -258, -497, -247, -255, -363, -365, -379, -4, -377, -219, -290, -497, -291, -497, -497, -497, -496, -302, -305, -497, -311, -497, -464, -464, -452, -463, -464, -497, -455, -453, -445, -406, -334, -497, -341, -496, -497, -497, -86, -497, -497, -258, -49, -225, -237, -497, -258, -243, -497, -258, -373, -4, -294, -297, -368, -366, -370, -371, -4, -307, -435, -497, -438, -439, -441, -4, -337, -340, -497, -497, -82, -84, -83, -85, -497, -343, -234, -497, -258, -239, -497, -242, -372, -496, -497, -464, -497, -497, -497, -81, -342, -258, -244, -497, -258, -328, -303, -437, -314, -497, -339, -240, -497, -245, -338, -258, -246] + +racc_goto_table = [ +10, 205, 240, 240, 240, 10, 268, 438, 112, 112, 100, 300, 338, 470, 293, +644, 242, 242, 242, 440, 107, 185, 238, 238, 238, 115, 115, 117, 117, 494, +10, 486, 490, 650, 303, 437, 239, 239, 239, 253, 260, 262, 604, 290, 365, +372, 732, 618, 622, 96, 565, 10, 815, 296, 257, 261, 281, 571, 504, 520, +573, 318, 529, 236, 249, 250, 112, 100, 301, 559, 810, 264, 813, 266, 106, +475, 478, 344, 345, 483, 1, 485, 348, 723, 754, 756, 757, 326, 329, 306, +307, 588, 589, 310, 97, 13, 184, 10, 319, 357, 13, 565, 574, 534, 587, +10, 311, 443, 586, 718, 340, 302, 198, 198, 304, 317, 508, 198, 198, 198, +339, 515, 473, 308, 736, 13, 272, 272, 309, 737, 634, 278, 278, 845, 352, +353, 354, 355, 639, 748, 513, 197, 514, 664, 817, 815, 13, 198, 198, 375, +696, 198, 198, 700, 424, 198, 314, 324, 324, 446, 447, 278, 278, 278, 650, +872, 350, 627, 842, 608, 727, 364, 370, 373, 356, 342, 294, 387, 343, 346, +305, 305, 528, 347, 305, 666, 10, 10, 671, 735, 751, 296, 13, 809, 811, +386, 198, 198, 198, 198, 13, 2, 368, 368, 10, nil, nil, nil, nil, nil, +nil, 623, nil, nil, nil, nil, nil, nil, nil, 706, nil, nil, nil, 605, 610, +305, 305, 305, 305, nil, nil, 267, nil, nil, 240, 240, nil, nil, nil, nil, +nil, 637, nil, 240, 674, nil, 849, 850, 242, 242, 851, nil, nil, nil, 442, +238, nil, 242, nil, nil, nil, nil, nil, 238, nil, 10, nil, nil, 441, 239, +10, nil, nil, nil, nil, nil, nil, 239, 460, nil, nil, 13, 13, 198, 198, +198, 198, nil, nil, 198, 198, 198, 14, 454, nil, 439, 444, 14, 474, 13, +804, 882, nil, 427, 448, 257, 264, 261, 450, 884, nil, 264, nil, 455, nil, +nil, nil, 100, 852, 389, 390, nil, 14, 274, 274, 685, 565, 609, nil, 688, +nil, nil, nil, 509, 571, 573, 650, 565, nil, nil, nil, 491, 492, 14, nil, +711, nil, nil, nil, 198, 198, 554, 741, 316, 325, 325, 493, 725, 198, 112, +13, 729, nil, nil, 272, 13, nil, nil, 605, 278, 605, 533, nil, nil, nil, +843, 115, nil, 117, nil, nil, nil, nil, nil, nil, nil, nil, 362, 363, 14, +nil, 543, nil, 296, 386, 547, nil, 14, nil, nil, nil, nil, nil, 198, 198, +267, 561, nil, nil, nil, 548, nil, nil, nil, 593, nil, nil, nil, nil, nil, +nil, nil, 198, nil, nil, 583, nil, nil, nil, nil, nil, nil, 305, 305, nil, +nil, 198, nil, nil, 585, nil, 576, 577, nil, nil, 570, nil, nil, 572, nil, +nil, 512, 794, nil, nil, 629, 296, 565, nil, nil, 386, nil, nil, nil, 638, +518, 267, nil, nil, 386, nil, 267, nil, nil, nil, 611, 643, nil, 14, 14, +nil, nil, 614, nil, nil, 368, 10, nil, 198, nil, 10, nil, 567, nil, nil, +10, 14, 296, 619, 619, nil, 386, 565, nil, nil, nil, 296, 386, nil, nil, +626, nil, nil, 10, nil, nil, nil, nil, 641, 642, 665, 844, nil, 838, 681, +683, nil, nil, nil, 686, nil, nil, 695, nil, nil, nil, 112, nil, nil, nil, +198, nil, nil, 640, nil, nil, nil, nil, 676, nil, nil, 198, nil, 115, nil, +117, 605, 14, 869, 10, 561, 274, 14, nil, 198, nil, nil, nil, nil, 294, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 712, 13, nil, nil, nil, +13, nil, nil, 10, 10, 13, nil, 198, 603, nil, nil, 378, 382, 35, nil, +nil, 198, 746, 35, nil, 198, 10, 750, 13, nil, nil, nil, 762, 12, nil, +nil, nil, nil, 12, nil, nil, nil, nil, 605, 703, nil, nil, 548, 35, 271, +271, nil, nil, nil, 305, nil, 198, 198, nil, 10, nil, 198, nil, 12, 10, +nil, 714, 747, nil, 35, nil, nil, 272, 752, 13, 432, 435, 278, nil, 313, +328, 328, 328, 766, 12, nil, 112, 744, nil, nil, nil, 10, nil, nil, nil, +198, nil, nil, nil, nil, nil, nil, nil, 13, 13, nil, nil, 615, nil, nil, +nil, 617, nil, 787, nil, 35, 625, 774, 776, nil, nil, 13, nil, 35, nil, +nil, 10, 785, nil, nil, 12, 806, nil, 783, nil, nil, nil, nil, 12, nil, +nil, nil, nil, nil, 10, nil, nil, 784, 795, 198, nil, nil, nil, 796, 13, +nil, 10, 10, nil, 13, nil, 10, nil, nil, 819, nil, nil, nil, 10, nil, +nil, 619, nil, 808, nil, nil, nil, nil, 305, nil, 701, nil, nil, nil, nil, +779, 13, 798, 781, nil, nil, nil, nil, nil, nil, 198, nil, nil, 14, 789, +856, nil, 14, nil, 35, 35, nil, 14, nil, 719, 720, nil, 771, 771, 10, +378, 382, 278, 278, 12, 12, 13, 35, nil, nil, 14, nil, 726, nil, nil, +nil, nil, 865, nil, 670, 873, nil, 12, nil, 13, 853, 854, 296, 771, nil, +nil, 386, 862, 278, 198, nil, 13, 13, nil, nil, nil, 13, nil, 10, nil, +nil, nil, nil, 13, nil, 10, nil, 831, nil, 274, 834, 14, 10, nil, nil, +nil, nil, nil, 305, nil, nil, 877, 599, 35, 272, nil, nil, 271, 35, 278, +nil, 599, 764, nil, nil, 887, nil, nil, 12, nil, 14, 14, nil, 12, nil, +nil, 891, nil, nil, 13, nil, 863, nil, nil, nil, nil, 866, nil, 14, 868, +nil, nil, nil, 599, nil, nil, nil, 782, nil, 599, nil, nil, nil, nil, nil, +771, 771, 198, nil, nil, 278, 278, 771, nil, nil, 793, nil, 278, 879, nil, +nil, 14, nil, 13, nil, nil, 14, 800, 801, nil, 13, 888, 803, nil, 890, +nil, nil, 13, nil, nil, nil, nil, nil, nil, nil, 893, 771, nil, nil, nil, +nil, 278, nil, 14, nil, nil, nil, nil, nil, nil, 771, nil, nil, nil, nil, +278, nil, nil, nil, nil, nil, 771, 709, 710, nil, nil, 278, nil, nil, 773, +773, nil, nil, nil, nil, 837, nil, nil, 14, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 14, nil, nil, nil, +773, nil, nil, nil, nil, nil, nil, nil, 14, 14, nil, nil, nil, 14, nil, +nil, nil, nil, nil, 870, 14, nil, nil, nil, nil, nil, 871, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 274, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 35, nil, 14, nil, 35, nil, nil, nil, nil, 35, nil, +nil, nil, nil, nil, 12, nil, nil, nil, 12, nil, nil, nil, nil, 12, nil, +nil, 35, 773, 773, nil, nil, nil, nil, nil, 773, nil, nil, nil, nil, nil, +nil, 12, nil, nil, nil, 14, nil, nil, nil, nil, nil, nil, 14, nil, nil, +nil, nil, nil, nil, 14, nil, nil, nil, nil, nil, nil, nil, nil, 773, nil, +271, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, 773, nil, nil, +nil, nil, 12, nil, nil, nil, nil, nil, 773, nil, nil, nil, nil, nil, nil, +nil, 35, 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 12, 12, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 12, nil, nil, nil, nil, nil, nil, nil, nil, 599, nil, +nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, 35, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 12, nil, nil, nil, nil, 12, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 12, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 770, 770, nil, nil, nil, nil, nil, nil, nil, 35, +nil, nil, 206, nil, nil, nil, 237, 237, 237, nil, nil, nil, nil, nil, 12, +nil, nil, 35, nil, nil, nil, 770, 287, 288, 289, nil, nil, nil, nil, 35, +35, nil, 12, nil, 35, nil, nil, 237, 237, nil, nil, 35, nil, nil, 12, +12, nil, nil, nil, 12, nil, nil, nil, nil, 367, 371, 12, nil, nil, nil, +nil, nil, 271, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 12, nil, nil, +nil, nil, 429, nil, 430, nil, nil, nil, 770, 770, nil, nil, nil, nil, nil, +770, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, +nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, 35, 12, nil, nil, nil, +nil, nil, nil, 12, 770, nil, nil, nil, nil, nil, 12, nil, nil, nil, nil, +nil, nil, nil, 770, nil, nil, nil, 366, 237, 374, 237, nil, nil, 388, 770, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 206, 398, 399, 400, +401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, +416, 417, 418, 419, 420, 421, 422, 423, nil, nil, nil, nil, nil, nil, nil, +237, nil, 237, nil, nil, nil, nil, nil, nil, nil, 539, nil, nil, 237, 237, +nil, nil, nil, nil, nil, nil, nil, 237, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 468, nil, nil, nil, nil, nil, nil, nil, nil, 480, nil, +nil, nil, nil, nil, nil, nil, nil, 563, nil, 566, nil, nil, 569, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 582, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 607, nil, nil, nil, nil, 613, nil, nil, +566, nil, nil, 613, nil, nil, nil, nil, 237, nil, nil, nil, nil, nil, nil, +nil, nil, 367, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 237, nil, 388, 555, 374, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 678, +nil, nil, nil, nil, nil, 237, nil, 237, nil, nil, 237, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 702, nil, nil, 581, 705, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 237, nil, nil, nil, nil, nil, 563, 600, 601, 602, +716, nil, 26, nil, nil, 237, nil, 26, nil, nil, 237, nil, nil, 237, nil, +nil, 237, nil, nil, 26, 26, nil, nil, nil, 26, 26, 26, nil, nil, nil, +237, 237, 26, nil, nil, nil, nil, nil, nil, nil, 237, nil, nil, nil, 742, +nil, nil, nil, nil, nil, nil, nil, nil, 26, 26, 26, nil, nil, 26, 26, +nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, 677, 237, nil, nil, +682, 684, nil, nil, nil, 687, nil, nil, 689, nil, nil, nil, nil, nil, nil, +694, nil, nil, nil, 237, 765, nil, nil, 237, 26, nil, nil, nil, 26, 26, +26, 26, 26, nil, nil, nil, nil, nil, nil, 237, nil, nil, nil, 237, nil, +566, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 566, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 731, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 613, nil, nil, nil, nil, nil, 237, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 816, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 26, 26, 26, 26, 26, 26, nil, +nil, 26, 26, 26, nil, nil, nil, 833, nil, 836, nil, 26, nil, nil, nil, +nil, nil, nil, 237, 767, nil, nil, nil, 841, nil, nil, nil, nil, nil, 682, +684, 687, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 237, nil, +nil, nil, nil, nil, nil, nil, nil, 237, 563, 237, nil, 566, nil, nil, nil, +nil, 26, 26, nil, nil, nil, nil, nil, nil, nil, 26, nil, 26, nil, nil, +nil, nil, 26, nil, 237, nil, nil, nil, nil, nil, 878, nil, nil, 881, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 237, nil, nil, 566, nil, nil, nil, +nil, nil, 767, nil, nil, 892, nil, nil, nil, nil, 26, 26, nil, nil, 828, +nil, nil, nil, nil, nil, 237, nil, 237, nil, nil, nil, nil, nil, nil, 26, +nil, nil, nil, nil, nil, nil, 237, nil, nil, nil, nil, nil, nil, 26, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 237, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 237, nil, nil, 237, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 26, nil, nil, 237, nil, nil, 237, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 237, nil, nil, nil, nil, nil, +nil, nil, nil, 237, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 26, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, 26, nil, nil, +nil, nil, 26, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, 26, nil, +nil, nil, 26, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 26, 26, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 26, nil, nil, +nil, nil, nil, nil, nil, 26, 26, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, nil, 26, nil, nil, nil, +nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 26, nil, +nil, nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 26, nil, 26, 26, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, +26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 26, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +26, nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, 26] + +racc_goto_check = [ +14, 15, 56, 56, 56, 14, 39, 53, 45, 45, 82, 19, 44, 4, 3, +83, 60, 60, 60, 29, 11, 11, 26, 26, 26, 48, 48, 49, 49, 79, +14, 76, 76, 126, 56, 32, 54, 54, 54, 31, 31, 31, 5, 51, 21, +21, 77, 78, 78, 8, 131, 14, 128, 26, 57, 57, 40, 58, 42, 117, +58, 14, 117, 28, 28, 28, 45, 82, 54, 33, 124, 36, 124, 37, 9, +55, 55, 114, 114, 55, 1, 55, 114, 6, 125, 125, 125, 43, 43, 13, +13, 33, 33, 13, 10, 18, 12, 14, 16, 24, 18, 131, 34, 50, 61, +14, 8, 62, 64, 65, 72, 73, 18, 18, 74, 80, 81, 18, 18, 18, +84, 85, 86, 87, 88, 18, 18, 18, 89, 90, 91, 52, 52, 92, 13, +13, 13, 13, 93, 94, 95, 23, 96, 97, 98, 128, 18, 18, 18, 19, +99, 18, 18, 100, 102, 18, 18, 18, 18, 104, 105, 52, 52, 52, 126, +124, 9, 106, 107, 108, 109, 15, 15, 15, 9, 112, 23, 15, 113, 115, +23, 23, 116, 118, 23, 119, 14, 14, 120, 5, 121, 26, 18, 123, 127, +45, 18, 18, 18, 18, 18, 2, 54, 54, 14, nil, nil, nil, nil, nil, +nil, 79, nil, nil, nil, nil, nil, nil, nil, 33, nil, nil, nil, 53, 53, +23, 23, 23, 23, nil, nil, 2, nil, nil, 56, 56, nil, nil, nil, nil, +nil, 42, nil, 56, 117, nil, 125, 125, 60, 60, 125, nil, nil, nil, 26, +26, nil, 60, nil, nil, nil, nil, nil, 26, nil, 14, nil, nil, 54, 54, +14, nil, nil, nil, nil, nil, nil, 54, 51, nil, nil, 18, 18, 18, 18, +18, 18, nil, nil, 18, 18, 18, 20, 40, nil, 28, 28, 20, 51, 18, +78, 77, nil, 59, 28, 57, 36, 57, 37, 125, nil, 36, nil, 37, nil, +nil, nil, 82, 83, 23, 23, nil, 20, 20, 20, 32, 131, 21, nil, 32, +nil, nil, nil, 82, 58, 58, 126, 131, nil, nil, nil, 13, 13, 20, nil, +29, nil, nil, nil, 18, 18, 19, 76, 20, 20, 20, 8, 53, 18, 45, +18, 53, nil, nil, 18, 18, nil, nil, 53, 52, 53, 11, nil, nil, nil, +5, 48, nil, 49, nil, nil, nil, nil, nil, nil, nil, nil, 2, 2, 20, +nil, 31, nil, 26, 45, 31, nil, 20, nil, nil, nil, nil, nil, 18, 18, +2, 56, nil, nil, nil, 57, nil, nil, nil, 19, nil, nil, nil, nil, nil, +nil, nil, 18, nil, nil, 56, nil, nil, nil, nil, nil, nil, 23, 23, nil, +nil, 18, nil, nil, 60, nil, 51, 51, nil, nil, 31, nil, nil, 31, nil, +nil, 23, 76, nil, nil, 19, 26, 131, nil, nil, 45, nil, nil, nil, 19, +23, 2, nil, nil, 45, nil, 2, nil, nil, nil, 51, 3, nil, 20, 20, +nil, nil, 51, nil, nil, 54, 14, nil, 18, nil, 14, nil, 59, nil, nil, +14, 20, 26, 82, 82, nil, 45, 131, nil, nil, nil, 26, 45, nil, nil, +54, nil, nil, 14, nil, nil, nil, nil, 82, 82, 51, 79, nil, 76, 15, +15, nil, nil, nil, 15, nil, nil, 39, nil, nil, nil, 45, nil, nil, nil, +18, nil, nil, 13, nil, nil, nil, nil, 11, nil, nil, 18, nil, 48, nil, +49, 53, 20, 4, 14, 56, 20, 20, nil, 18, nil, nil, nil, nil, 23, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 26, 18, nil, nil, nil, +18, nil, nil, 14, 14, 18, nil, 18, 23, nil, nil, 30, 30, 41, nil, +nil, 18, 3, 41, nil, 18, 14, 3, 18, nil, nil, nil, 44, 17, nil, +nil, nil, nil, 17, nil, nil, nil, nil, 53, 59, nil, nil, 57, 41, 41, +41, nil, nil, nil, 23, nil, 18, 18, nil, 14, nil, 18, nil, 17, 14, +nil, 59, 82, nil, 41, nil, nil, 18, 82, 18, 30, 30, 52, nil, 41, +41, 41, 41, 15, 17, nil, 45, 13, nil, nil, nil, 14, nil, nil, nil, +18, nil, nil, nil, nil, nil, nil, nil, 18, 18, nil, nil, 2, nil, nil, +nil, 2, nil, 56, nil, 41, 2, 14, 14, nil, nil, 18, nil, 41, nil, +nil, 14, 60, nil, nil, 17, 3, nil, 51, nil, nil, nil, nil, 17, nil, +nil, nil, nil, nil, 14, nil, nil, 54, 14, 18, nil, nil, nil, 51, 18, +nil, 14, 14, nil, 18, nil, 14, nil, nil, 39, nil, nil, nil, 14, nil, +nil, 82, nil, 51, nil, nil, nil, nil, 23, nil, 2, nil, nil, nil, nil, +59, 18, 13, 59, nil, nil, nil, nil, nil, nil, 18, nil, nil, 20, 59, +19, nil, 20, nil, 41, 41, nil, 20, nil, 2, 2, nil, 18, 18, 14, +30, 30, 52, 52, 17, 17, 18, 41, nil, nil, 20, nil, 2, nil, nil, +nil, nil, 56, nil, 20, 3, nil, 17, nil, 18, 14, 14, 26, 18, nil, +nil, 45, 14, 52, 18, nil, 18, 18, nil, nil, nil, 18, nil, 14, nil, +nil, nil, nil, 18, nil, 14, nil, 59, nil, 20, 59, 20, 14, nil, nil, +nil, nil, nil, 23, nil, nil, 14, 30, 41, 18, nil, nil, 41, 41, 52, +nil, 30, 2, nil, nil, 14, nil, nil, 17, nil, 20, 20, nil, 17, nil, +nil, 14, nil, nil, 18, nil, 59, nil, nil, nil, nil, 59, nil, 20, 59, +nil, nil, nil, 30, nil, nil, nil, 2, nil, 30, nil, nil, nil, nil, nil, +18, 18, 18, nil, nil, 52, 52, 18, nil, nil, 2, nil, 52, 59, nil, +nil, 20, nil, 18, nil, nil, 20, 2, 2, nil, 18, 59, 2, nil, 59, +nil, nil, 18, nil, nil, nil, nil, nil, nil, nil, 59, 18, nil, nil, nil, +nil, 52, nil, 20, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +52, nil, nil, nil, nil, nil, 18, 30, 30, nil, nil, 52, nil, nil, 20, +20, nil, nil, nil, nil, 2, nil, nil, 20, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, +20, nil, nil, nil, nil, nil, nil, nil, 20, 20, nil, nil, nil, 20, nil, +nil, nil, nil, nil, 2, 20, nil, nil, nil, nil, nil, 2, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 41, nil, 20, nil, 41, nil, nil, nil, nil, 41, nil, +nil, nil, nil, nil, 17, nil, nil, nil, 17, nil, nil, nil, nil, 17, nil, +nil, 41, 20, 20, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, nil, +nil, 17, nil, nil, nil, 20, nil, nil, nil, nil, nil, nil, 20, nil, nil, +nil, nil, nil, nil, 20, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, +41, nil, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, +nil, nil, 17, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, nil, nil, +nil, 41, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 17, 17, nil, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 17, nil, nil, nil, nil, nil, nil, nil, nil, 30, nil, +nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, nil, nil, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 17, nil, nil, nil, nil, 17, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 17, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 41, 41, nil, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 25, nil, nil, nil, 25, 25, 25, nil, nil, nil, nil, nil, 17, +nil, nil, 41, nil, nil, nil, 41, 25, 25, 25, nil, nil, nil, nil, 41, +41, nil, 17, nil, 41, nil, nil, 25, 25, nil, nil, 41, nil, nil, 17, +17, nil, nil, nil, 17, nil, nil, nil, nil, 22, 22, 17, nil, nil, nil, +nil, nil, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 17, nil, nil, +nil, nil, 22, nil, 22, nil, nil, nil, 41, 41, nil, nil, nil, nil, nil, +41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, nil, +nil, nil, nil, 41, nil, nil, nil, nil, nil, nil, 41, 17, nil, nil, nil, +nil, nil, nil, 17, 41, nil, nil, nil, nil, nil, 17, nil, nil, nil, nil, +nil, nil, nil, 41, nil, nil, nil, 25, 25, 25, 25, nil, nil, 25, 41, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, 25, 25, 25, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +25, 25, 25, 25, 25, 25, 25, 25, nil, nil, nil, nil, nil, nil, nil, +25, nil, 25, nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, 25, 25, +nil, nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, +nil, nil, nil, nil, nil, nil, nil, 22, nil, 22, nil, nil, 22, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, nil, nil, 22, nil, nil, +22, nil, nil, 22, nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, +nil, nil, 22, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 25, nil, 25, 25, 25, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 22, +nil, nil, nil, nil, nil, 25, nil, 25, nil, nil, 25, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 22, nil, nil, 25, 22, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, 22, 25, 25, 25, +22, nil, 35, nil, nil, 25, nil, 35, nil, nil, 25, nil, nil, 25, nil, +nil, 25, nil, nil, 35, 35, nil, nil, nil, 35, 35, 35, nil, nil, nil, +25, 25, 35, nil, nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, 22, +nil, nil, nil, nil, nil, nil, nil, nil, 35, 35, 35, nil, nil, 35, 35, +nil, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, 25, 25, nil, nil, +25, 25, nil, nil, nil, 25, nil, nil, 25, nil, nil, nil, nil, nil, nil, +25, nil, nil, nil, 25, 22, nil, nil, 25, 35, nil, nil, nil, 35, 35, +35, 35, 35, nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, 25, nil, +22, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 22, nil, nil, nil, nil, nil, 25, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 35, 35, 35, 35, 35, 35, nil, +nil, 35, 35, 35, nil, nil, nil, 22, nil, 22, nil, 35, nil, nil, nil, +nil, nil, nil, 25, 25, nil, nil, nil, 22, nil, nil, nil, nil, nil, 25, +25, 25, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, +nil, nil, nil, nil, nil, nil, nil, 25, 22, 25, nil, 22, nil, nil, nil, +nil, 35, 35, nil, nil, nil, nil, nil, nil, nil, 35, nil, 35, nil, nil, +nil, nil, 35, nil, 25, nil, nil, nil, nil, nil, 22, nil, nil, 22, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, nil, 22, nil, nil, nil, +nil, nil, 25, nil, nil, 22, nil, nil, nil, nil, 35, 35, nil, nil, 25, +nil, nil, nil, nil, nil, 25, nil, 25, nil, nil, nil, nil, nil, nil, 35, +nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, 35, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 25, nil, nil, 25, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 35, nil, nil, 25, nil, nil, 25, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, +nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, 35, nil, nil, +nil, nil, 35, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, +nil, nil, 35, nil, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 35, 35, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, +nil, nil, nil, nil, nil, 35, 35, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, 35, nil, nil, nil, +nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, +nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 35, nil, 35, 35, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, +35, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 35, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +35, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, 35] + +racc_goto_pointer = [nil, 80, 201, -37, -279, -428, -521, nil, 46, 69, 91, 14, 89, 33, 0, -17, 37, 613, 95, -42, 292, -144, 1171, 124, -8, 1289, 0, nil, 41, -235, 404, 13, -218, -355, -334, 1757, 41, 43, nil, -25, 24, 598, -264, 25, -52, 2, nil, nil, 19, 21, -258, 2, 100, -247, 14, -222, -20, 28, -375, 63, -6, -341, -148, nil, -337, -478, nil, nil, nil, nil, nil, nil, 46, 57, 59, nil, -275, -569, -444, -282, 54, -210, 7, -499, 56, -218, -172, 65, -494, 69, -493, -371, -671, -370, -503, -189, -196, -372, -618, -407, -404, nil, -80, nil, -99, -99, -329, -635, -302, -438, nil, nil, 105, 106, 3, 103, -164, -284, 106, -337, -335, -455, nil, -560, -683, -563, -481, -559, -703, nil, nil, -378] + +racc_goto_default = [ +nil, nil, 292, nil, nil, 733, nil, 3, nil, 4, 312, nil, nil, nil, 202, +16, 11, 203, 286, nil, 201, nil, 244, 15, nil, 19, 20, 21, nil, 25, +596, nil, nil, nil, nil, 277, 29, nil, 31, 34, 33, 199, 323, nil, 114, +380, 113, 116, 68, 69, nil, nil, 42, 295, 297, nil, 298, 544, 545, 425, +562, nil, nil, 255, nil, nil, 43, 44, 45, 46, 47, 48, 49, nil, 256, +55, nil, nil, nil, nil, nil, nil, 487, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 235, nil, 384, nil, +nil, nil, nil, nil, nil, 67, 70, 71, nil, nil, nil, nil, 525, nil, nil, +nil, 646, 647, 648, 649, nil, 812, 656, 657, 660, 663, 248] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 133, :_reduce_1, + 4, 135, :_reduce_2, + 2, 134, :_reduce_3, + 0, 139, :_reduce_4, + 1, 139, :_reduce_5, + 2, 139, :_reduce_6, + 3, 139, :_reduce_7, + 0, 156, :_reduce_8, + 4, 141, :_reduce_9, + 3, 141, :_reduce_10, + 3, 141, :_reduce_11, + 3, 141, :_reduce_12, + 2, 141, :_reduce_13, + 3, 141, :_reduce_14, + 3, 141, :_reduce_15, + 3, 141, :_reduce_16, + 3, 141, :_reduce_17, + 3, 141, :_reduce_18, + 4, 141, :_reduce_19, + 4, 141, :_reduce_20, + 3, 141, :_reduce_21, + 3, 141, :_reduce_22, + 3, 141, :_reduce_23, + 6, 141, :_reduce_24, + 5, 141, :_reduce_25, + 5, 141, :_reduce_26, + 5, 141, :_reduce_27, + 3, 141, :_reduce_28, + 3, 141, :_reduce_29, + 3, 141, :_reduce_30, + 3, 141, :_reduce_31, + 1, 141, :_reduce_none, + 1, 155, :_reduce_none, + 3, 155, :_reduce_34, + 3, 155, :_reduce_35, + 2, 155, :_reduce_36, + 2, 155, :_reduce_37, + 1, 155, :_reduce_none, + 1, 145, :_reduce_none, + 1, 147, :_reduce_none, + 1, 147, :_reduce_none, + 2, 147, :_reduce_42, + 2, 147, :_reduce_43, + 2, 147, :_reduce_44, + 1, 159, :_reduce_none, + 4, 159, :_reduce_46, + 4, 159, :_reduce_47, + 0, 166, :_reduce_48, + 5, 164, :_reduce_49, + 2, 158, :_reduce_50, + 3, 158, :_reduce_51, + 4, 158, :_reduce_52, + 5, 158, :_reduce_53, + 4, 158, :_reduce_54, + 5, 158, :_reduce_55, + 2, 158, :_reduce_56, + 2, 158, :_reduce_57, + 1, 148, :_reduce_58, + 3, 148, :_reduce_59, + 1, 169, :_reduce_60, + 3, 169, :_reduce_61, + 1, 168, :_reduce_62, + 2, 168, :_reduce_63, + 3, 168, :_reduce_64, + 2, 168, :_reduce_65, + 2, 168, :_reduce_66, + 1, 168, :_reduce_67, + 1, 171, :_reduce_none, + 3, 171, :_reduce_69, + 2, 170, :_reduce_70, + 3, 170, :_reduce_71, + 1, 172, :_reduce_72, + 4, 172, :_reduce_73, + 3, 172, :_reduce_74, + 3, 172, :_reduce_75, + 3, 172, :_reduce_76, + 3, 172, :_reduce_77, + 2, 172, :_reduce_78, + 1, 172, :_reduce_79, + 1, 146, :_reduce_80, + 4, 146, :_reduce_81, + 3, 146, :_reduce_82, + 3, 146, :_reduce_83, + 3, 146, :_reduce_84, + 3, 146, :_reduce_85, + 2, 146, :_reduce_86, + 1, 146, :_reduce_87, + 1, 174, :_reduce_88, + 1, 174, :_reduce_none, + 2, 175, :_reduce_90, + 1, 175, :_reduce_91, + 3, 175, :_reduce_92, + 1, 176, :_reduce_none, + 1, 176, :_reduce_none, + 1, 176, :_reduce_none, + 1, 176, :_reduce_none, + 1, 176, :_reduce_none, + 1, 179, :_reduce_98, + 1, 179, :_reduce_none, + 1, 143, :_reduce_none, + 1, 143, :_reduce_none, + 1, 144, :_reduce_102, + 0, 182, :_reduce_103, + 4, 144, :_reduce_104, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 177, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 1, 178, :_reduce_none, + 3, 157, :_reduce_171, + 5, 157, :_reduce_172, + 3, 157, :_reduce_173, + 6, 157, :_reduce_174, + 5, 157, :_reduce_175, + 5, 157, :_reduce_176, + 5, 157, :_reduce_177, + 5, 157, :_reduce_178, + 4, 157, :_reduce_179, + 3, 157, :_reduce_180, + 3, 157, :_reduce_181, + 3, 157, :_reduce_182, + 3, 157, :_reduce_183, + 3, 157, :_reduce_184, + 3, 157, :_reduce_185, + 3, 157, :_reduce_186, + 3, 157, :_reduce_187, + 3, 157, :_reduce_188, + 4, 157, :_reduce_189, + 4, 157, :_reduce_190, + 2, 157, :_reduce_191, + 2, 157, :_reduce_192, + 3, 157, :_reduce_193, + 3, 157, :_reduce_194, + 3, 157, :_reduce_195, + 3, 157, :_reduce_196, + 3, 157, :_reduce_197, + 3, 157, :_reduce_198, + 3, 157, :_reduce_199, + 3, 157, :_reduce_200, + 3, 157, :_reduce_201, + 3, 157, :_reduce_202, + 3, 157, :_reduce_203, + 3, 157, :_reduce_204, + 3, 157, :_reduce_205, + 2, 157, :_reduce_206, + 2, 157, :_reduce_207, + 3, 157, :_reduce_208, + 3, 157, :_reduce_209, + 3, 157, :_reduce_210, + 3, 157, :_reduce_211, + 3, 157, :_reduce_212, + 5, 157, :_reduce_213, + 1, 157, :_reduce_none, + 1, 154, :_reduce_none, + 1, 151, :_reduce_none, + 2, 151, :_reduce_217, + 2, 151, :_reduce_218, + 5, 151, :_reduce_219, + 2, 151, :_reduce_220, + 3, 151, :_reduce_221, + 3, 189, :_reduce_222, + 4, 189, :_reduce_223, + 4, 189, :_reduce_224, + 6, 189, :_reduce_225, + 0, 190, :_reduce_226, + 1, 190, :_reduce_none, + 1, 160, :_reduce_228, + 2, 160, :_reduce_229, + 5, 160, :_reduce_230, + 2, 160, :_reduce_231, + 5, 160, :_reduce_232, + 4, 160, :_reduce_233, + 7, 160, :_reduce_234, + 3, 160, :_reduce_235, + 1, 160, :_reduce_236, + 4, 193, :_reduce_237, + 3, 193, :_reduce_238, + 5, 193, :_reduce_239, + 7, 193, :_reduce_240, + 2, 193, :_reduce_241, + 5, 193, :_reduce_242, + 4, 193, :_reduce_243, + 6, 193, :_reduce_244, + 7, 193, :_reduce_245, + 9, 193, :_reduce_246, + 3, 193, :_reduce_247, + 1, 193, :_reduce_248, + 0, 195, :_reduce_249, + 2, 163, :_reduce_250, + 1, 194, :_reduce_251, + 0, 196, :_reduce_252, + 3, 194, :_reduce_253, + 0, 197, :_reduce_254, + 4, 194, :_reduce_255, + 2, 192, :_reduce_256, + 2, 191, :_reduce_257, + 0, 191, :_reduce_258, + 1, 186, :_reduce_259, + 3, 186, :_reduce_260, + 3, 153, :_reduce_261, + 4, 153, :_reduce_262, + 2, 153, :_reduce_263, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 184, :_reduce_272, + 3, 184, :_reduce_273, + 0, 218, :_reduce_274, + 5, 184, :_reduce_275, + 3, 184, :_reduce_276, + 3, 184, :_reduce_277, + 2, 184, :_reduce_278, + 4, 184, :_reduce_279, + 3, 184, :_reduce_280, + 3, 184, :_reduce_281, + 1, 184, :_reduce_282, + 4, 184, :_reduce_283, + 3, 184, :_reduce_284, + 1, 184, :_reduce_285, + 5, 184, :_reduce_286, + 2, 184, :_reduce_287, + 1, 184, :_reduce_none, + 2, 184, :_reduce_289, + 6, 184, :_reduce_290, + 6, 184, :_reduce_291, + 0, 219, :_reduce_292, + 0, 220, :_reduce_293, + 7, 184, :_reduce_294, + 0, 221, :_reduce_295, + 0, 222, :_reduce_296, + 7, 184, :_reduce_297, + 5, 184, :_reduce_298, + 4, 184, :_reduce_299, + 5, 184, :_reduce_300, + 0, 223, :_reduce_301, + 0, 224, :_reduce_302, + 9, 184, :_reduce_303, + 0, 225, :_reduce_304, + 6, 184, :_reduce_305, + 0, 226, :_reduce_306, + 7, 184, :_reduce_307, + 0, 227, :_reduce_308, + 5, 184, :_reduce_309, + 0, 228, :_reduce_310, + 6, 184, :_reduce_311, + 0, 229, :_reduce_312, + 0, 230, :_reduce_313, + 9, 184, :_reduce_314, + 1, 184, :_reduce_315, + 1, 184, :_reduce_316, + 1, 184, :_reduce_317, + 1, 184, :_reduce_318, + 1, 150, :_reduce_none, + 1, 208, :_reduce_none, + 1, 208, :_reduce_none, + 1, 208, :_reduce_none, + 2, 208, :_reduce_323, + 1, 210, :_reduce_none, + 1, 210, :_reduce_none, + 1, 210, :_reduce_none, + 1, 209, :_reduce_none, + 5, 209, :_reduce_328, + 1, 137, :_reduce_none, + 2, 137, :_reduce_330, + 1, 212, :_reduce_none, + 1, 212, :_reduce_none, + 1, 231, :_reduce_333, + 3, 231, :_reduce_334, + 1, 232, :_reduce_none, + 2, 232, :_reduce_none, + 4, 232, :_reduce_337, + 7, 232, :_reduce_338, + 6, 232, :_reduce_339, + 4, 232, :_reduce_340, + 3, 232, :_reduce_341, + 5, 232, :_reduce_342, + 4, 232, :_reduce_343, + 2, 232, :_reduce_344, + 1, 232, :_reduce_345, + 2, 232, :_reduce_346, + 0, 165, :_reduce_347, + 2, 165, :_reduce_348, + 1, 165, :_reduce_349, + 3, 165, :_reduce_350, + 0, 234, :_reduce_351, + 5, 233, :_reduce_352, + 2, 161, :_reduce_353, + 4, 161, :_reduce_354, + 4, 161, :_reduce_355, + 2, 207, :_reduce_356, + 4, 207, :_reduce_357, + 4, 207, :_reduce_358, + 3, 207, :_reduce_359, + 2, 207, :_reduce_360, + 1, 207, :_reduce_361, + 0, 236, :_reduce_362, + 5, 206, :_reduce_363, + 0, 237, :_reduce_364, + 5, 206, :_reduce_365, + 5, 211, :_reduce_366, + 1, 238, :_reduce_none, + 4, 238, :_reduce_368, + 2, 238, :_reduce_369, + 1, 239, :_reduce_370, + 1, 239, :_reduce_none, + 6, 136, :_reduce_372, + 0, 136, :_reduce_373, + 1, 240, :_reduce_374, + 1, 240, :_reduce_none, + 1, 240, :_reduce_none, + 2, 241, :_reduce_377, + 1, 241, :_reduce_none, + 2, 138, :_reduce_379, + 1, 138, :_reduce_none, + 1, 198, :_reduce_none, + 1, 198, :_reduce_none, + 1, 198, :_reduce_none, + 1, 199, :_reduce_384, + 1, 243, :_reduce_385, + 2, 243, :_reduce_386, + 3, 244, :_reduce_387, + 1, 244, :_reduce_388, + 3, 200, :_reduce_389, + 4, 201, :_reduce_390, + 3, 202, :_reduce_391, + 0, 247, :_reduce_392, + 3, 247, :_reduce_393, + 1, 248, :_reduce_394, + 2, 248, :_reduce_395, + 3, 203, :_reduce_396, + 0, 250, :_reduce_397, + 3, 250, :_reduce_398, + 0, 245, :_reduce_399, + 2, 245, :_reduce_400, + 0, 246, :_reduce_401, + 2, 246, :_reduce_402, + 1, 249, :_reduce_403, + 2, 249, :_reduce_404, + 0, 252, :_reduce_405, + 4, 249, :_reduce_406, + 1, 251, :_reduce_407, + 1, 251, :_reduce_408, + 1, 251, :_reduce_409, + 1, 251, :_reduce_none, + 1, 180, :_reduce_411, + 3, 181, :_reduce_412, + 1, 242, :_reduce_413, + 1, 242, :_reduce_414, + 2, 242, :_reduce_415, + 2, 242, :_reduce_416, + 1, 173, :_reduce_417, + 1, 173, :_reduce_418, + 1, 173, :_reduce_419, + 1, 173, :_reduce_420, + 1, 173, :_reduce_421, + 1, 173, :_reduce_422, + 1, 173, :_reduce_423, + 1, 173, :_reduce_424, + 1, 173, :_reduce_425, + 1, 173, :_reduce_426, + 1, 173, :_reduce_427, + 1, 204, :_reduce_428, + 1, 149, :_reduce_429, + 1, 152, :_reduce_430, + 1, 152, :_reduce_431, + 1, 213, :_reduce_432, + 3, 213, :_reduce_433, + 2, 213, :_reduce_434, + 4, 215, :_reduce_435, + 2, 215, :_reduce_436, + 6, 253, :_reduce_437, + 4, 253, :_reduce_438, + 4, 253, :_reduce_439, + 2, 253, :_reduce_440, + 4, 253, :_reduce_441, + 2, 253, :_reduce_442, + 2, 253, :_reduce_443, + 1, 253, :_reduce_444, + 0, 253, :_reduce_445, + 1, 259, :_reduce_446, + 1, 259, :_reduce_447, + 1, 259, :_reduce_448, + 1, 259, :_reduce_449, + 1, 259, :_reduce_450, + 1, 254, :_reduce_451, + 3, 254, :_reduce_452, + 3, 260, :_reduce_453, + 1, 255, :_reduce_454, + 3, 255, :_reduce_455, + 1, 261, :_reduce_none, + 1, 261, :_reduce_none, + 2, 256, :_reduce_458, + 1, 256, :_reduce_459, + 1, 262, :_reduce_none, + 1, 262, :_reduce_none, + 2, 258, :_reduce_462, + 2, 257, :_reduce_463, + 0, 257, :_reduce_464, + 1, 216, :_reduce_none, + 4, 216, :_reduce_466, + 0, 205, :_reduce_467, + 2, 205, :_reduce_468, + 2, 205, :_reduce_469, + 1, 188, :_reduce_470, + 3, 188, :_reduce_471, + 3, 263, :_reduce_472, + 1, 167, :_reduce_none, + 1, 167, :_reduce_none, + 1, 167, :_reduce_none, + 1, 162, :_reduce_none, + 1, 162, :_reduce_none, + 1, 162, :_reduce_none, + 1, 162, :_reduce_none, + 1, 235, :_reduce_none, + 1, 235, :_reduce_none, + 1, 235, :_reduce_none, + 1, 217, :_reduce_none, + 1, 217, :_reduce_none, + 0, 140, :_reduce_none, + 1, 140, :_reduce_none, + 0, 183, :_reduce_none, + 1, 183, :_reduce_none, + 0, 187, :_reduce_none, + 1, 187, :_reduce_none, + 1, 187, :_reduce_none, + 1, 214, :_reduce_492, + 1, 214, :_reduce_none, + 1, 142, :_reduce_none, + 2, 142, :_reduce_none, + 0, 185, :_reduce_496 ] + +racc_reduce_n = 497 + +racc_shift_n = 894 + +racc_token_table = { + false => 0, + :error => 1, + :kCLASS => 2, + :kMODULE => 3, + :kDEF => 4, + :kUNDEF => 5, + :kBEGIN => 6, + :kRESCUE => 7, + :kENSURE => 8, + :kEND => 9, + :kIF => 10, + :kUNLESS => 11, + :kTHEN => 12, + :kELSIF => 13, + :kELSE => 14, + :kCASE => 15, + :kWHEN => 16, + :kWHILE => 17, + :kUNTIL => 18, + :kFOR => 19, + :kBREAK => 20, + :kNEXT => 21, + :kREDO => 22, + :kRETRY => 23, + :kIN => 24, + :kDO => 25, + :kDO_COND => 26, + :kDO_BLOCK => 27, + :kRETURN => 28, + :kYIELD => 29, + :kSUPER => 30, + :kSELF => 31, + :kNIL => 32, + :kTRUE => 33, + :kFALSE => 34, + :kAND => 35, + :kOR => 36, + :kNOT => 37, + :kIF_MOD => 38, + :kUNLESS_MOD => 39, + :kWHILE_MOD => 40, + :kUNTIL_MOD => 41, + :kRESCUE_MOD => 42, + :kALIAS => 43, + :kDEFINED => 44, + :klBEGIN => 45, + :klEND => 46, + :k__LINE__ => 47, + :k__FILE__ => 48, + :tIDENTIFIER => 49, + :tFID => 50, + :tGVAR => 51, + :tIVAR => 52, + :tCONSTANT => 53, + :tCVAR => 54, + :tNTH_REF => 55, + :tBACK_REF => 56, + :tSTRING_CONTENT => 57, + :tINTEGER => 58, + :tFLOAT => 59, + :tREGEXP_END => 60, + :tUPLUS => 61, + :tUMINUS => 62, + :tUMINUS_NUM => 63, + :tPOW => 64, + :tCMP => 65, + :tEQ => 66, + :tEQQ => 67, + :tNEQ => 68, + :tGEQ => 69, + :tLEQ => 70, + :tANDOP => 71, + :tOROP => 72, + :tMATCH => 73, + :tNMATCH => 74, + :tDOT => 75, + :tDOT2 => 76, + :tDOT3 => 77, + :tAREF => 78, + :tASET => 79, + :tLSHFT => 80, + :tRSHFT => 81, + :tCOLON2 => 82, + :tCOLON3 => 83, + :tOP_ASGN => 84, + :tASSOC => 85, + :tLPAREN => 86, + :tLPAREN2 => 87, + :tRPAREN => 88, + :tLPAREN_ARG => 89, + :tLBRACK => 90, + :tLBRACK2 => 91, + :tRBRACK => 92, + :tLBRACE => 93, + :tLBRACE_ARG => 94, + :tSTAR => 95, + :tSTAR2 => 96, + :tAMPER => 97, + :tAMPER2 => 98, + :tTILDE => 99, + :tPERCENT => 100, + :tDIVIDE => 101, + :tPLUS => 102, + :tMINUS => 103, + :tLT => 104, + :tGT => 105, + :tPIPE => 106, + :tBANG => 107, + :tCARET => 108, + :tLCURLY => 109, + :tRCURLY => 110, + :tBACK_REF2 => 111, + :tSYMBEG => 112, + :tSTRING_BEG => 113, + :tXSTRING_BEG => 114, + :tREGEXP_BEG => 115, + :tWORDS_BEG => 116, + :tQWORDS_BEG => 117, + :tSTRING_DBEG => 118, + :tSTRING_DVAR => 119, + :tSTRING_END => 120, + :tSTRING => 121, + :tSYMBOL => 122, + :tREGEXP_OPT => 123, + :tNL => 124, + :tEH => 125, + :tCOLON => 126, + :tCOMMA => 127, + :tSPACE => 128, + :tSEMI => 129, + :tEQL => 130, + :tLOWEST => 131 } + +racc_nt_base = 132 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "kCLASS", + "kMODULE", + "kDEF", + "kUNDEF", + "kBEGIN", + "kRESCUE", + "kENSURE", + "kEND", + "kIF", + "kUNLESS", + "kTHEN", + "kELSIF", + "kELSE", + "kCASE", + "kWHEN", + "kWHILE", + "kUNTIL", + "kFOR", + "kBREAK", + "kNEXT", + "kREDO", + "kRETRY", + "kIN", + "kDO", + "kDO_COND", + "kDO_BLOCK", + "kRETURN", + "kYIELD", + "kSUPER", + "kSELF", + "kNIL", + "kTRUE", + "kFALSE", + "kAND", + "kOR", + "kNOT", + "kIF_MOD", + "kUNLESS_MOD", + "kWHILE_MOD", + "kUNTIL_MOD", + "kRESCUE_MOD", + "kALIAS", + "kDEFINED", + "klBEGIN", + "klEND", + "k__LINE__", + "k__FILE__", + "tIDENTIFIER", + "tFID", + "tGVAR", + "tIVAR", + "tCONSTANT", + "tCVAR", + "tNTH_REF", + "tBACK_REF", + "tSTRING_CONTENT", + "tINTEGER", + "tFLOAT", + "tREGEXP_END", + "tUPLUS", + "tUMINUS", + "tUMINUS_NUM", + "tPOW", + "tCMP", + "tEQ", + "tEQQ", + "tNEQ", + "tGEQ", + "tLEQ", + "tANDOP", + "tOROP", + "tMATCH", + "tNMATCH", + "tDOT", + "tDOT2", + "tDOT3", + "tAREF", + "tASET", + "tLSHFT", + "tRSHFT", + "tCOLON2", + "tCOLON3", + "tOP_ASGN", + "tASSOC", + "tLPAREN", + "tLPAREN2", + "tRPAREN", + "tLPAREN_ARG", + "tLBRACK", + "tLBRACK2", + "tRBRACK", + "tLBRACE", + "tLBRACE_ARG", + "tSTAR", + "tSTAR2", + "tAMPER", + "tAMPER2", + "tTILDE", + "tPERCENT", + "tDIVIDE", + "tPLUS", + "tMINUS", + "tLT", + "tGT", + "tPIPE", + "tBANG", + "tCARET", + "tLCURLY", + "tRCURLY", + "tBACK_REF2", + "tSYMBEG", + "tSTRING_BEG", + "tXSTRING_BEG", + "tREGEXP_BEG", + "tWORDS_BEG", + "tQWORDS_BEG", + "tSTRING_DBEG", + "tSTRING_DVAR", + "tSTRING_END", + "tSTRING", + "tSYMBOL", + "tREGEXP_OPT", + "tNL", + "tEH", + "tCOLON", + "tCOMMA", + "tSPACE", + "tSEMI", + "tEQL", + "tLOWEST", + "$start", + "program", + "compstmt", + "bodystmt", + "opt_rescue", + "opt_else", + "opt_ensure", + "stmts", + "opt_terms", + "stmt", + "terms", + "fitem", + "undef_list", + "expr_value", + "lhs", + "command_call", + "mlhs", + "var_lhs", + "primary_value", + "aref_args", + "backref", + "mrhs", + "arg_value", + "expr", + "@1", + "arg", + "command", + "block_command", + "call_args", + "block_call", + "operation2", + "command_args", + "cmd_brace_block", + "opt_block_var", + "@2", + "operation", + "mlhs_basic", + "mlhs_entry", + "mlhs_head", + "mlhs_item", + "mlhs_node", + "variable", + "cname", + "cpath", + "fname", + "op", + "reswords", + "fsym", + "symbol", + "dsym", + "@3", + "opt_nl", + "primary", + "none", + "args", + "trailer", + "assocs", + "paren_args", + "opt_paren_args", + "opt_block_arg", + "block_arg", + "call_args2", + "open_args", + "@4", + "@5", + "@6", + "literal", + "strings", + "xstring", + "regexp", + "words", + "qwords", + "var_ref", + "assoc_list", + "brace_block", + "method_call", + "then", + "if_tail", + "do", + "case_body", + "for_var", + "superclass", + "term", + "f_arglist", + "singleton", + "dot_or_colon", + "@7", + "@8", + "@9", + "@10", + "@11", + "@12", + "@13", + "@14", + "@15", + "@16", + "@17", + "@18", + "@19", + "block_par", + "block_var", + "do_block", + "@20", + "operation3", + "@21", + "@22", + "when_args", + "cases", + "exc_list", + "exc_var", + "numeric", + "string", + "string1", + "string_contents", + "xstring_contents", + "word_list", + "word", + "string_content", + "qword_list", + "string_dvar", + "@23", + "f_args", + "f_arg", + "f_optarg", + "f_rest_arg", + "opt_f_block_arg", + "f_block_arg", + "f_norm_arg", + "f_opt", + "restarg_mark", + "blkarg_mark", + "assoc" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'ruby18.y', 73) + def _reduce_1(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 78) + def _reduce_2(val, _values, result) + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 94) + def _reduce_3(val, _values, result) + result = @builder.compstmt(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 99) + def _reduce_4(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 103) + def _reduce_5(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 107) + def _reduce_6(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 111) + def _reduce_7(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 116) + def _reduce_8(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 120) + def _reduce_9(val, _values, result) + result = @builder.alias(val[0], val[1], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 124) + def _reduce_10(val, _values, result) + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 130) + def _reduce_11(val, _values, result) + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 136) + def _reduce_12(val, _values, result) + diagnostic :error, :nth_ref_alias, nil, val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 140) + def _reduce_13(val, _values, result) + result = @builder.undef_method(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 144) + def _reduce_14(val, _values, result) + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 149) + def _reduce_15(val, _values, result) + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 154) + def _reduce_16(val, _values, result) + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 158) + def _reduce_17(val, _values, result) + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 162) + def _reduce_18(val, _values, result) + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 170) + def _reduce_19(val, _values, result) + if in_def? + diagnostic :error, :begin_in_method, nil, val[0] + end + + result = @builder.preexe(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 178) + def _reduce_20(val, _values, result) + result = @builder.postexe(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 182) + def _reduce_21(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 186) + def _reduce_22(val, _values, result) + result = @builder.multi_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 190) + def _reduce_23(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 194) + def _reduce_24(val, _values, result) + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 201) + def _reduce_25(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 208) + def _reduce_26(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 215) + def _reduce_27(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 222) + def _reduce_28(val, _values, result) + @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 226) + def _reduce_29(val, _values, result) + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 231) + def _reduce_30(val, _values, result) + result = @builder.multi_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 235) + def _reduce_31(val, _values, result) + result = @builder.multi_assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + + result + end +.,., + +# reduce 32 omitted + +# reduce 33 omitted + +module_eval(<<'.,.,', 'ruby18.y', 243) + def _reduce_34(val, _values, result) + result = @builder.logical_op(:and, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 247) + def _reduce_35(val, _values, result) + result = @builder.logical_op(:or, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 251) + def _reduce_36(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 255) + def _reduce_37(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +# reduce 38 omitted + +# reduce 39 omitted + +# reduce 40 omitted + +# reduce 41 omitted + +module_eval(<<'.,.,', 'ruby18.y', 265) + def _reduce_42(val, _values, result) + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 270) + def _reduce_43(val, _values, result) + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 275) + def _reduce_44(val, _values, result) + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + + result + end +.,., + +# reduce 45 omitted + +module_eval(<<'.,.,', 'ruby18.y', 282) + def _reduce_46(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 288) + def _reduce_47(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 295) + def _reduce_48(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 299) + def _reduce_49(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 306) + def _reduce_50(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 312) + def _reduce_51(val, _values, result) + lparen_t, args, rparen_t = val[1] + method_call = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 322) + def _reduce_52(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 329) + def _reduce_53(val, _values, result) + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 339) + def _reduce_54(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 345) + def _reduce_55(val, _values, result) + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, block_args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 355) + def _reduce_56(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 361) + def _reduce_57(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:yield, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 368) + def _reduce_58(val, _values, result) + result = @builder.multi_lhs(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 372) + def _reduce_59(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 377) + def _reduce_60(val, _values, result) + result = @builder.multi_lhs(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 381) + def _reduce_61(val, _values, result) + result = @builder.multi_lhs(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 386) + def _reduce_62(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 390) + def _reduce_63(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 394) + def _reduce_64(val, _values, result) + result = val[0] << @builder.splat(val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 398) + def _reduce_65(val, _values, result) + result = val[0] << @builder.splat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 402) + def _reduce_66(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 406) + def _reduce_67(val, _values, result) + result = [ @builder.splat(val[0]) ] + + result + end +.,., + +# reduce 68 omitted + +module_eval(<<'.,.,', 'ruby18.y', 412) + def _reduce_69(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 417) + def _reduce_70(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 421) + def _reduce_71(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 426) + def _reduce_72(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 430) + def _reduce_73(val, _values, result) + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 434) + def _reduce_74(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 438) + def _reduce_75(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 442) + def _reduce_76(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 446) + def _reduce_77(val, _values, result) + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 451) + def _reduce_78(val, _values, result) + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 456) + def _reduce_79(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 461) + def _reduce_80(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 465) + def _reduce_81(val, _values, result) + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 469) + def _reduce_82(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 473) + def _reduce_83(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 477) + def _reduce_84(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 481) + def _reduce_85(val, _values, result) + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 486) + def _reduce_86(val, _values, result) + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 491) + def _reduce_87(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 496) + def _reduce_88(val, _values, result) + diagnostic :error, :module_name_const, nil, val[0] + + result + end +.,., + +# reduce 89 omitted + +module_eval(<<'.,.,', 'ruby18.y', 502) + def _reduce_90(val, _values, result) + result = @builder.const_global(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 506) + def _reduce_91(val, _values, result) + result = @builder.const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 510) + def _reduce_92(val, _values, result) + result = @builder.const_fetch(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 93 omitted + +# reduce 94 omitted + +# reduce 95 omitted + +# reduce 96 omitted + +# reduce 97 omitted + +module_eval(<<'.,.,', 'ruby18.y', 519) + def _reduce_98(val, _values, result) + result = @builder.symbol(val[0]) + + result + end +.,., + +# reduce 99 omitted + +# reduce 100 omitted + +# reduce 101 omitted + +module_eval(<<'.,.,', 'ruby18.y', 528) + def _reduce_102(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 532) + def _reduce_103(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 536) + def _reduce_104(val, _values, result) + result = val[0] << val[3] + + result + end +.,., + +# reduce 105 omitted + +# reduce 106 omitted + +# reduce 107 omitted + +# reduce 108 omitted + +# reduce 109 omitted + +# reduce 110 omitted + +# reduce 111 omitted + +# reduce 112 omitted + +# reduce 113 omitted + +# reduce 114 omitted + +# reduce 115 omitted + +# reduce 116 omitted + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +# reduce 120 omitted + +# reduce 121 omitted + +# reduce 122 omitted + +# reduce 123 omitted + +# reduce 124 omitted + +# reduce 125 omitted + +# reduce 126 omitted + +# reduce 127 omitted + +# reduce 128 omitted + +# reduce 129 omitted + +# reduce 130 omitted + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +# reduce 136 omitted + +# reduce 137 omitted + +# reduce 138 omitted + +# reduce 139 omitted + +# reduce 140 omitted + +# reduce 141 omitted + +# reduce 142 omitted + +# reduce 143 omitted + +# reduce 144 omitted + +# reduce 145 omitted + +# reduce 146 omitted + +# reduce 147 omitted + +# reduce 148 omitted + +# reduce 149 omitted + +# reduce 150 omitted + +# reduce 151 omitted + +# reduce 152 omitted + +# reduce 153 omitted + +# reduce 154 omitted + +# reduce 155 omitted + +# reduce 156 omitted + +# reduce 157 omitted + +# reduce 158 omitted + +# reduce 159 omitted + +# reduce 160 omitted + +# reduce 161 omitted + +# reduce 162 omitted + +# reduce 163 omitted + +# reduce 164 omitted + +# reduce 165 omitted + +# reduce 166 omitted + +# reduce 167 omitted + +# reduce 168 omitted + +# reduce 169 omitted + +# reduce 170 omitted + +module_eval(<<'.,.,', 'ruby18.y', 555) + def _reduce_171(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 559) + def _reduce_172(val, _values, result) + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 569) + def _reduce_173(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 573) + def _reduce_174(val, _values, result) + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 580) + def _reduce_175(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 587) + def _reduce_176(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 594) + def _reduce_177(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 601) + def _reduce_178(val, _values, result) + diagnostic :error, :dynamic_const, nil, val[2], [ val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 605) + def _reduce_179(val, _values, result) + diagnostic :error, :dynamic_const, nil, val[1], [ val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 609) + def _reduce_180(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 613) + def _reduce_181(val, _values, result) + result = @builder.range_inclusive(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 617) + def _reduce_182(val, _values, result) + result = @builder.range_exclusive(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 621) + def _reduce_183(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 625) + def _reduce_184(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 629) + def _reduce_185(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 633) + def _reduce_186(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 637) + def _reduce_187(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 641) + def _reduce_188(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 645) + def _reduce_189(val, _values, result) + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.integer(val[1]), + val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 652) + def _reduce_190(val, _values, result) + result = @builder.unary_op(val[0], + @builder.binary_op( + @builder.float(val[1]), + val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 659) + def _reduce_191(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 663) + def _reduce_192(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 667) + def _reduce_193(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 671) + def _reduce_194(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 675) + def _reduce_195(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 679) + def _reduce_196(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 683) + def _reduce_197(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 687) + def _reduce_198(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 691) + def _reduce_199(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 695) + def _reduce_200(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 699) + def _reduce_201(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 703) + def _reduce_202(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 707) + def _reduce_203(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 711) + def _reduce_204(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 715) + def _reduce_205(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 719) + def _reduce_206(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 723) + def _reduce_207(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 727) + def _reduce_208(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 731) + def _reduce_209(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 735) + def _reduce_210(val, _values, result) + result = @builder.logical_op(:and, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 739) + def _reduce_211(val, _values, result) + result = @builder.logical_op(:or, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 743) + def _reduce_212(val, _values, result) + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 747) + def _reduce_213(val, _values, result) + result = @builder.ternary(val[0], val[1], + val[2], val[3], val[4]) + + result + end +.,., + +# reduce 214 omitted + +# reduce 215 omitted + +# reduce 216 omitted + +module_eval(<<'.,.,', 'ruby18.y', 757) + def _reduce_217(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 761) + def _reduce_218(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 765) + def _reduce_219(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 769) + def _reduce_220(val, _values, result) + result = [ @builder.associate(nil, val[0], nil) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 773) + def _reduce_221(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 778) + def _reduce_222(val, _values, result) + result = [ val[0], [], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 782) + def _reduce_223(val, _values, result) + result = [ val[0], val[1], val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 786) + def _reduce_224(val, _values, result) + result = [ val[0], [ val[1] ], val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 790) + def _reduce_225(val, _values, result) + result = [ val[0], val[1] << val[3], val[5] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 795) + def _reduce_226(val, _values, result) + result = [ nil, [], nil ] + + result + end +.,., + +# reduce 227 omitted + +module_eval(<<'.,.,', 'ruby18.y', 801) + def _reduce_228(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 805) + def _reduce_229(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 809) + def _reduce_230(val, _values, result) + result = val[0].concat( + [ @builder.splat(val[2], val[3]), + *val[4] ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 815) + def _reduce_231(val, _values, result) + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 820) + def _reduce_232(val, _values, result) + result = [ @builder.associate(nil, val[0], nil), + @builder.splat(val[2], val[3]), + *val[4] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 826) + def _reduce_233(val, _values, result) + result = val[0].concat( + [ @builder.associate(nil, val[2], nil), + *val[3] ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 832) + def _reduce_234(val, _values, result) + result = val[0].concat( + [ @builder.associate(nil, val[2], nil), + @builder.splat(val[4], val[5]), + *val[6] ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 839) + def _reduce_235(val, _values, result) + result = [ @builder.splat(val[0], val[1]), + *val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 844) + def _reduce_236(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 849) + def _reduce_237(val, _values, result) + result = [ val[0], *val[2].concat(val[3]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 853) + def _reduce_238(val, _values, result) + result = [ val[0], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 857) + def _reduce_239(val, _values, result) + result = [ val[0], + @builder.splat(val[2], val[3]), + *val[4] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 863) + def _reduce_240(val, _values, result) + result = [ val[0], + *val[2]. + push(@builder.splat(val[4], val[5])). + concat(val[6]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 870) + def _reduce_241(val, _values, result) + result = [ @builder.associate(nil, val[0], nil), + *val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 875) + def _reduce_242(val, _values, result) + result = [ @builder.associate(nil, val[0], nil), + @builder.splat(val[2], val[3]), + *val[4] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 881) + def _reduce_243(val, _values, result) + result = [ val[0], + @builder.associate(nil, val[2], nil), + *val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 887) + def _reduce_244(val, _values, result) + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + concat(val[5]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 894) + def _reduce_245(val, _values, result) + result = [ val[0], + @builder.associate(nil, val[2], nil), + @builder.splat(val[4], val[5]), + *val[6] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 901) + def _reduce_246(val, _values, result) + result = [ val[0], + *val[2]. + push(@builder.associate(nil, val[4], nil)). + push(@builder.splat(val[6], val[7])). + concat(val[8]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 909) + def _reduce_247(val, _values, result) + result = [ @builder.splat(val[0], val[1]), + *val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 914) + def _reduce_248(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 918) + def _reduce_249(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 923) + def _reduce_250(val, _values, result) + @lexer.cmdarg = val[0] + + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 930) + def _reduce_251(val, _values, result) + result = [ nil, val[0], nil ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 934) + def _reduce_252(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 938) + def _reduce_253(val, _values, result) + result = [ val[0], [], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 942) + def _reduce_254(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 946) + def _reduce_255(val, _values, result) + result = [ val[0], val[1], val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 951) + def _reduce_256(val, _values, result) + result = @builder.block_pass(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 956) + def _reduce_257(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 960) + def _reduce_258(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 965) + def _reduce_259(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 969) + def _reduce_260(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 974) + def _reduce_261(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 978) + def _reduce_262(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 982) + def _reduce_263(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +# reduce 264 omitted + +# reduce 265 omitted + +# reduce 266 omitted + +# reduce 267 omitted + +# reduce 268 omitted + +# reduce 269 omitted + +# reduce 270 omitted + +# reduce 271 omitted + +module_eval(<<'.,.,', 'ruby18.y', 995) + def _reduce_272(val, _values, result) + result = @builder.call_method(nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 999) + def _reduce_273(val, _values, result) + result = @builder.begin_keyword(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1003) + def _reduce_274(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1007) + def _reduce_275(val, _values, result) + result = @builder.begin(val[0], val[1], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1011) + def _reduce_276(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1015) + def _reduce_277(val, _values, result) + result = @builder.const_fetch(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1019) + def _reduce_278(val, _values, result) + result = @builder.const_global(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1023) + def _reduce_279(val, _values, result) + result = @builder.index(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1027) + def _reduce_280(val, _values, result) + result = @builder.array(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1031) + def _reduce_281(val, _values, result) + result = @builder.associate(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1035) + def _reduce_282(val, _values, result) + result = @builder.keyword_cmd(:return, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1039) + def _reduce_283(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1043) + def _reduce_284(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1047) + def _reduce_285(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1051) + def _reduce_286(val, _values, result) + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1056) + def _reduce_287(val, _values, result) + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +# reduce 288 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1065) + def _reduce_289(val, _values, result) + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1071) + def _reduce_290(val, _values, result) + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1078) + def _reduce_291(val, _values, result) + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1085) + def _reduce_292(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1089) + def _reduce_293(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1093) + def _reduce_294(val, _values, result) + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1098) + def _reduce_295(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1102) + def _reduce_296(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1106) + def _reduce_297(val, _values, result) + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1111) + def _reduce_298(val, _values, result) + when_bodies = val[3][0..-2] + else_t, else_body = val[3][-1] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1120) + def _reduce_299(val, _values, result) + when_bodies = val[2][0..-2] + else_t, else_body = val[2][-1] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1129) + def _reduce_300(val, _values, result) + result = @builder.case(val[0], nil, + [], val[2], val[3], + val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1135) + def _reduce_301(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1139) + def _reduce_302(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1143) + def _reduce_303(val, _values, result) + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1149) + def _reduce_304(val, _values, result) + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1153) + def _reduce_305(val, _values, result) + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1166) + def _reduce_306(val, _values, result) + result = @def_level + @def_level = 0 + + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1173) + def _reduce_307(val, _values, result) + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @static_env.unextend + + @def_level = val[4] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1182) + def _reduce_308(val, _values, result) + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1186) + def _reduce_309(val, _values, result) + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1197) + def _reduce_310(val, _values, result) + @def_level += 1 + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1202) + def _reduce_311(val, _values, result) + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @static_env.unextend + @def_level -= 1 + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1210) + def _reduce_312(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1214) + def _reduce_313(val, _values, result) + @def_level += 1 + @static_env.extend_static + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1219) + def _reduce_314(val, _values, result) + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @static_env.unextend + @def_level -= 1 + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1227) + def _reduce_315(val, _values, result) + result = @builder.keyword_cmd(:break, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1231) + def _reduce_316(val, _values, result) + result = @builder.keyword_cmd(:next, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1235) + def _reduce_317(val, _values, result) + result = @builder.keyword_cmd(:redo, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1239) + def _reduce_318(val, _values, result) + result = @builder.keyword_cmd(:retry, val[0]) + + result + end +.,., + +# reduce 319 omitted + +# reduce 320 omitted + +# reduce 321 omitted + +# reduce 322 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1249) + def _reduce_323(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 324 omitted + +# reduce 325 omitted + +# reduce 326 omitted + +# reduce 327 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1259) + def _reduce_328(val, _values, result) + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + + result + end +.,., + +# reduce 329 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1270) + def _reduce_330(val, _values, result) + result = val + + result + end +.,., + +# reduce 331 omitted + +# reduce 332 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1278) + def _reduce_333(val, _values, result) + result = [ @builder.arg_expr(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1282) + def _reduce_334(val, _values, result) + result = val[0] << @builder.arg_expr(val[2]) + + result + end +.,., + +# reduce 335 omitted + +# reduce 336 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1289) + def _reduce_337(val, _values, result) + result = val[0]. + push(@builder.blockarg_expr(val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1294) + def _reduce_338(val, _values, result) + result = val[0]. + push(@builder.restarg_expr(val[2], val[3])). + push(@builder.blockarg_expr(val[5], val[6])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1300) + def _reduce_339(val, _values, result) + result = val[0]. + push(@builder.restarg_expr(val[2])). + push(@builder.blockarg_expr(val[4], val[5])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1306) + def _reduce_340(val, _values, result) + result = val[0]. + push(@builder.restarg_expr(val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1311) + def _reduce_341(val, _values, result) + result = val[0]. + push(@builder.restarg_expr(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1316) + def _reduce_342(val, _values, result) + result = [ @builder.restarg_expr(val[0], val[1]), + @builder.blockarg_expr(val[3], val[4]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1321) + def _reduce_343(val, _values, result) + result = [ @builder.restarg_expr(val[0]), + @builder.blockarg_expr(val[2], val[3]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1326) + def _reduce_344(val, _values, result) + result = [ @builder.restarg_expr(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1330) + def _reduce_345(val, _values, result) + result = [ @builder.restarg_expr(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1334) + def _reduce_346(val, _values, result) + result = [ @builder.blockarg_expr(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1340) + def _reduce_347(val, _values, result) + result = @builder.args(nil, [], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1344) + def _reduce_348(val, _values, result) + result = @builder.args(val[0], [], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1348) + def _reduce_349(val, _values, result) + result = @builder.args(val[0], [], val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1352) + def _reduce_350(val, _values, result) + result = @builder.args(val[0], val[1], val[2], false) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1357) + def _reduce_351(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1361) + def _reduce_352(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1368) + def _reduce_353(val, _values, result) + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1374) + def _reduce_354(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1380) + def _reduce_355(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1387) + def _reduce_356(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1393) + def _reduce_357(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1399) + def _reduce_358(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1405) + def _reduce_359(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1409) + def _reduce_360(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1415) + def _reduce_361(val, _values, result) + result = @builder.keyword_cmd(:zsuper, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1420) + def _reduce_362(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1424) + def _reduce_363(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1430) + def _reduce_364(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1434) + def _reduce_365(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1441) + def _reduce_366(val, _values, result) + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + + result + end +.,., + +# reduce 367 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1448) + def _reduce_368(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1452) + def _reduce_369(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1457) + def _reduce_370(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +# reduce 371 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1463) + def _reduce_372(val, _values, result) + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1476) + def _reduce_373(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1481) + def _reduce_374(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +# reduce 375 omitted + +# reduce 376 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1488) + def _reduce_377(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +# reduce 378 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1494) + def _reduce_379(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +# reduce 380 omitted + +# reduce 381 omitted + +# reduce 382 omitted + +# reduce 383 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1504) + def _reduce_384(val, _values, result) + result = @builder.string_compose(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1509) + def _reduce_385(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1513) + def _reduce_386(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1518) + def _reduce_387(val, _values, result) + result = @builder.string_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1522) + def _reduce_388(val, _values, result) + result = @builder.string(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1527) + def _reduce_389(val, _values, result) + result = @builder.xstring_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1532) + def _reduce_390(val, _values, result) + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1538) + def _reduce_391(val, _values, result) + result = @builder.words_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1543) + def _reduce_392(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1547) + def _reduce_393(val, _values, result) + result = val[0] << @builder.word(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1552) + def _reduce_394(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1556) + def _reduce_395(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1561) + def _reduce_396(val, _values, result) + result = @builder.words_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1566) + def _reduce_397(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1570) + def _reduce_398(val, _values, result) + result = val[0] << @builder.string_internal(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1575) + def _reduce_399(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1579) + def _reduce_400(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1584) + def _reduce_401(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1588) + def _reduce_402(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1593) + def _reduce_403(val, _values, result) + result = @builder.string_internal(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1597) + def _reduce_404(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1601) + def _reduce_405(val, _values, result) + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1606) + def _reduce_406(val, _values, result) + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1614) + def _reduce_407(val, _values, result) + result = @builder.gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1618) + def _reduce_408(val, _values, result) + result = @builder.ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1622) + def _reduce_409(val, _values, result) + result = @builder.cvar(val[0]) + + result + end +.,., + +# reduce 410 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1629) + def _reduce_411(val, _values, result) + result = @builder.symbol(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1634) + def _reduce_412(val, _values, result) + result = @builder.symbol_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1639) + def _reduce_413(val, _values, result) + result = @builder.integer(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1643) + def _reduce_414(val, _values, result) + result = @builder.float(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1647) + def _reduce_415(val, _values, result) + result = @builder.negate(val[0], + @builder.integer(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1652) + def _reduce_416(val, _values, result) + result = @builder.negate(val[0], + @builder.float(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1658) + def _reduce_417(val, _values, result) + result = @builder.ident(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1662) + def _reduce_418(val, _values, result) + result = @builder.ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1666) + def _reduce_419(val, _values, result) + result = @builder.gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1670) + def _reduce_420(val, _values, result) + result = @builder.cvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1674) + def _reduce_421(val, _values, result) + result = @builder.const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1678) + def _reduce_422(val, _values, result) + result = @builder.nil(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1682) + def _reduce_423(val, _values, result) + result = @builder.self(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1686) + def _reduce_424(val, _values, result) + result = @builder.true(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1690) + def _reduce_425(val, _values, result) + result = @builder.false(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1694) + def _reduce_426(val, _values, result) + result = @builder.__FILE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1698) + def _reduce_427(val, _values, result) + result = @builder.__LINE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1703) + def _reduce_428(val, _values, result) + result = @builder.accessible(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1708) + def _reduce_429(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1713) + def _reduce_430(val, _values, result) + result = @builder.nth_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1717) + def _reduce_431(val, _values, result) + result = @builder.back_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1722) + def _reduce_432(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1726) + def _reduce_433(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1730) + def _reduce_434(val, _values, result) + yyerrok + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1736) + def _reduce_435(val, _values, result) + result = @builder.args(val[0], val[1], val[3]) + + @lexer.state = :expr_beg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1742) + def _reduce_436(val, _values, result) + result = @builder.args(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1747) + def _reduce_437(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1754) + def _reduce_438(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1760) + def _reduce_439(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1766) + def _reduce_440(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1771) + def _reduce_441(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1777) + def _reduce_442(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1782) + def _reduce_443(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1787) + def _reduce_444(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1791) + def _reduce_445(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1796) + def _reduce_446(val, _values, result) + diagnostic :error, :argument_const, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1800) + def _reduce_447(val, _values, result) + diagnostic :error, :argument_ivar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1804) + def _reduce_448(val, _values, result) + diagnostic :error, :argument_gvar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1808) + def _reduce_449(val, _values, result) + diagnostic :error, :argument_cvar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1812) + def _reduce_450(val, _values, result) + @static_env.declare val[0][0] + + result = @builder.arg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1819) + def _reduce_451(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1823) + def _reduce_452(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1828) + def _reduce_453(val, _values, result) + @static_env.declare val[0][0] + + result = @builder.optarg(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1835) + def _reduce_454(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1839) + def _reduce_455(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 456 omitted + +# reduce 457 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1846) + def _reduce_458(val, _values, result) + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1852) + def _reduce_459(val, _values, result) + result = [ @builder.restarg(val[0]) ] + + result + end +.,., + +# reduce 460 omitted + +# reduce 461 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1859) + def _reduce_462(val, _values, result) + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1866) + def _reduce_463(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1870) + def _reduce_464(val, _values, result) + result = [] + + result + end +.,., + +# reduce 465 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1876) + def _reduce_466(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1881) + def _reduce_467(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1885) + def _reduce_468(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1889) + def _reduce_469(val, _values, result) + result = @builder.pair_list_18(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1894) + def _reduce_470(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1898) + def _reduce_471(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby18.y', 1903) + def _reduce_472(val, _values, result) + result = @builder.pair(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 473 omitted + +# reduce 474 omitted + +# reduce 475 omitted + +# reduce 476 omitted + +# reduce 477 omitted + +# reduce 478 omitted + +# reduce 479 omitted + +# reduce 480 omitted + +# reduce 481 omitted + +# reduce 482 omitted + +# reduce 483 omitted + +# reduce 484 omitted + +# reduce 485 omitted + +# reduce 486 omitted + +# reduce 487 omitted + +# reduce 488 omitted + +# reduce 489 omitted + +# reduce 490 omitted + +# reduce 491 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1916) + def _reduce_492(val, _values, result) + yyerrok + + result + end +.,., + +# reduce 493 omitted + +# reduce 494 omitted + +# reduce 495 omitted + +module_eval(<<'.,.,', 'ruby18.y', 1925) + def _reduce_496(val, _values, result) + result = nil + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Ruby18 + end # module Parser diff --git a/test/regress/ruby22 b/test/regress/ruby22 new file mode 100644 index 00000000..8e3395b3 --- /dev/null +++ b/test/regress/ruby22 @@ -0,0 +1,9033 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "ruby22.y". +# + +require 'racc/parser.rb' + + +require 'parser' + +Parser.check_for_encoding_support + +module Parser + class Ruby22 < Racc::Parser + +module_eval(<<'...end ruby22.y/module_eval...', 'ruby22.y', 2374) + + def version + 22 + end + + def default_encoding + Encoding::UTF_8 + end +...end ruby22.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [-476, -97, 268, 214, 215, -98, -105, -476, -476, -476, -490, 568, -476, -476, -476, 610, -476, 580, 217, 612, -288, 581, 214, 215, -476, -491, -476, -476, -476, 647, 268, 268, 214, 215, -104, 589, -476, -476, 568, -476, -476, -476, -476, -476, 568, 568, 212, 109, 568, 815, -100, 121, -100, -83, -102, -99, 214, 215, 268, 218, -288, 806, -69, 574, 646, -102, -97, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -476, -98, 609, -476, -476, -476, 611, -476, -476, 715, 267, -476, 206, -96, -476, -476, 263, -476, 218, -476, 207, -476, -105, -476, -476, -99, -476, -476, -476, -476, -476, -88, -476, -479, -476, -89, -96, 218, 267, 267, -479, -479, -479, 263, -101, -479, -479, -479, -476, -479, 113, -476, -476, -476, -476, 112, -476, -479, -476, -479, -479, -479, 588, -476, -95, 715, 267, -101, 715, -479, -479, 218, -479, -479, -479, -479, -479, 113, 208, 814, -91, -91, 112, 113, 113, 113, 842, 113, 112, 112, 112, -100, 112, -102, -99, -93, -100, 213, -102, -99, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, -479, 113, 257, -479, -479, -479, 112, -479, -479, -574, -93, -479, 316, -103, -479, -479, 317, -479, 597, -479, -574, -479, -90, -479, -479, 444, -479, -479, -479, -479, -479, -291, -479, 218, -479, -91, 214, 215, -291, -291, -291, 647, 260, 527, -291, -291, 526, -291, -479, 261, -101, -479, -479, -479, -479, -101, -479, 113, -479, -571, 113, 113, 112, -479, -92, 112, 112, -291, -291, 386, -291, -291, -291, -291, -291, -91, 646, -93, -91, -575, 396, -105, 399, 599, 598, 398, 397, -91, 548, 597, 545, 544, 543, 747, 546, 443, 91, 92, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -476, -572, -291, -291, -291, -93, 630, -476, -93, -490, -291, -94, -571, -291, 91, 92, -476, -93, -291, 113, -291, 515, -291, -291, 112, -291, -291, -291, -291, -291, 597, -291, -578, -291, 445, -571, -491, -476, 446, -578, -578, -578, 599, 598, -476, -578, -578, -291, -578, 647, -291, -291, 749, -94, -479, -291, -88, -578, 217, 833, -578, -479, -103, 93, 94, -97, -572, 477, -578, -578, -479, -578, -578, -578, -578, -578, 548, -104, 545, 544, 543, 515, 546, -89, 646, 527, 647, 597, 529, -572, 597, 486, -98, 93, 94, 599, 598, 595, -412, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, 625, -578, -578, -578, 597, 631, -578, 646, 113, -578, 626, -574, -578, 112, -95, -578, 597, -578, 770, -578, -578, -578, -578, -104, -578, -578, -578, -578, -578, 488, -578, -578, -578, 597, -578, 490, 597, -412, 599, 598, 595, 599, 598, 600, -412, 957, -578, -91, 756, -578, -578, -578, -92, -412, -578, 662, -100, -93, -578, -578, -578, -101, 498, -578, -578, -578, -102, -578, -479, 599, 598, 602, -412, -578, -100, -479, -578, -578, -578, -578, -578, 599, 598, 604, 771, -574, -68, -578, -578, -578, -578, -578, -578, -578, -578, -90, 218, 860, 599, 598, 608, 599, 598, 613, -99, 214, 215, -486, -578, 548, -485, 545, 544, 543, -486, 546, 501, -485, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, 553, 502, -578, -578, -578, -487, 772, -578, -102, 509, -578, 556, -487, -578, -578, 701, -578, 272, -578, 218, -578, -99, -578, -578, 704, -578, -578, -578, -578, -578, 553, -578, -578, -578, 527, -484, 79, 529, 113, -481, 263, 556, -484, 112, 564, 563, -481, -578, 80, 557, -578, -578, -578, -578, 238, -578, -291, -578, 81, -482, 210, 512, -101, -291, -291, -291, -482, 211, -291, -291, -291, -334, -291, 440, 564, 563, 209, 516, -334, 557, 441, -483, -291, -291, -291, 238, 235, -334, -483, 442, 237, 236, -291, -291, 260, -291, -291, -291, -291, -291, 548, 261, 545, 544, 543, -488, 546, 548, 218, 545, 544, 543, -488, 546, 548, 530, 545, 544, 543, 527, 546, -488, 529, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, -291, 238, 701, -291, -291, -291, -489, 773, -291, 701, 238, -291, 531, -489, -291, -291, 701, -291, 704, -291, 490, -291, -489, -291, -291, 904, -291, -291, -291, -291, -291, 113, -291, 235, -291, 574, 112, 237, 236, 238, 233, 234, 235, 214, 215, 388, 237, 236, -291, 233, 234, -291, -291, -291, -291, 113, -291, 113, -291, 578, 112, 579, 112, - +103, 5, 69, 70, 71, 9, 57, 614, 235, 507, 63, 64, 237, 236, 617, +67, 508, 65, 66, 68, 30, 31, 72, 73, 218, 506, - +263, 981, 619, 29, 28, 27, 101, 100, 102, 103, 741, 742, 19, 218, 743, +107, 108, 635, 8, 45, 7, 10, 105, 104, 106, 95, 56, 97, 96, 98, +623, 99, 107, 108, 624, 91, 92, 263, 42, 43, 41, 238, 242, 247, 248, +249, 244, 246, 254, 255, 250, 251, -281, 231, 232, 517, 634, 252, 253, -281, 40, 637, 518, 33, 564, 563, 58, 59, - +281, 238, 60, 442, 35, 235, 238, 241, 44, 237, 236, 238, 233, 234, 245, +243, 239, 20, 240, 837, 806, 238, 89, 79, 82, 83, 576, 84, 86, 85, +87, 837, 806, 577, 218, 80, 88, 218, 256, 218, -240, - +83, 575, 62, 666, 81, 93, 94, 290, 69, 70, 71, 9, 57, 218, 520, +584, 63, 64, 677, 682, 683, 67, 583, 65, 66, 68, 30, 31, 72, 73, +685, 585, 689, 692, 693, 29, 28, 27, 101, 100, 102, 103, 695, 697, 19, +699, 707, 708, 709, 620, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, +96, 98, 711, 99, 107, 108, 574, 91, 92, 718, 42, 43, 41, 238, 242, +247, 248, 249, 244, 246, 254, 255, 250, 251, -292, 231, 232, -292, 736, 252, 253, -292, 40, 746, -292, 294, 750, 751, 58, 59, -292, -264, 60, - +292, 35, 235, 757, 241, 44, 237, 236, 477, 233, 234, 245, 243, 239, 20, +240, 477, 218, 257, 89, 79, 82, 83, 584, 84, 86, 85, 87, 488, 490, +939, 799, 80, 88, 677, 256, 218, 263, 263, 585, 62, 677, 81, 93, 94, +5, 69, 70, 71, 9, 57, 238, 806, 584, 63, 64, 218, 218, 831, 67, +939, 65, 66, 68, 30, 31, 72, 73, 218, 585, 806, 841, 218, 29, 28, +27, 101, 100, 102, 103, 218, 850, 19, - +265, 859, 861, 862, 635, 8, 45, 7, 10, 105, 104, 106, 95, 56, 97, +96, 98, 692, 99, 107, 108, 865, 91, 92, 867, 42, 43, 41, 238, 242, +247, 248, 249, 244, 246, 254, 255, 250, 251, -291, 231, 232, -488, 869, 252, 253, -291, 40, 871, -488, 33, -575, 218, 58, 59, -291, 873, 60, - +488, 35, 235, 874, 241, 44, 237, 236, 877, 233, 234, 245, 243, 239, 20, +240, 879, 880, 677, 89, 79, 82, 83, -489, 84, 86, 85, 87, 882, -263, -489, 886, 80, 88, 888, 256, 891, 692, 893, - +489, 62, 895, 81, 93, 94, 290, 69, 70, 71, 9, 57, 897, 899, 986, +63, 64, 899, 218, 905, 67, 987, 65, 66, 68, 30, 31, 72, 73, 907, +985, 909, 915, 918, 29, 28, 27, 101, 100, 102, 103, 218, 936, 19, 545, +544, 543, 922, 546, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, +98, - +266, 99, 107, 108, 933, 91, 92, 940, 42, 43, 41, 238, 242, 247, 248, +249, 244, 246, 254, 255, 250, 251, -291, 231, 232, -281, 941, 252, 253, -291, 40, 950, -281, 33, -575, 951, 58, 59, -291, 959, 60, - +281, 35, 235, 961, 241, 44, 237, 236, 962, 233, 234, 245, 243, 239, 20, +240, 967, 736, 692, 89, 79, 82, 83, -292, 84, 86, 85, 87, 971, 973, -292, 975, 80, 88, 977, 256, 977, 988, 989, - +292, 62, 899, 81, 93, 94, 290, 69, 70, 71, 9, 57, 899, 899, 994, +63, 64, 959, -575, - +574, 67, 682, 65, 66, 68, 30, 31, 72, 73, 116, 117, 118, 119, 120, +29, 28, 27, 101, 100, 102, 103, 959, 936, 19, 545, 544, 543, 1013, 546, +8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, 1014, 99, 107, +108, 1015, 91, 92, 977, 42, 43, 41, 238, 242, 247, 248, 249, 244, 246, +254, 255, 250, 251, -291, 231, 232, 977, 977, 252, 253, -291, 40, 218, 899, 33, -575, 959, 58, 59, - +291, 977, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, 245, +243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, +87, nil, nil, nil, nil, 80, 88, nil, 256, nil, nil, nil, nil, 62, nil, +81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, +nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, 116, 117, 118, 119, +120, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, 116, 117, 118, 119, +120, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, 42, 43, 41, 238, 242, 247, 248, 249, 244, +246, 254, 255, 250, 251, nil, 231, 232, nil, nil, 252, 253, nil, 40, nil, +nil, 294, nil, nil, 58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, +237, 236, nil, 233, 234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, 256, +nil, nil, nil, nil, 62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, +nil, nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, +72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, +nil, 19, nil, nil, nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, +56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, +238, 242, 247, 248, 249, 244, 246, 254, 255, 250, 251, nil, 231, 232, nil, +nil, 252, 253, nil, 40, nil, nil, 294, nil, nil, 58, 59, nil, nil, 60, +nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, 245, 243, 239, 20, +240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, +nil, nil, 80, 88, nil, 256, nil, nil, nil, nil, 62, nil, 81, 93, 94, +290, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, nil, 67, +nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, +27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, 8, 45, +292, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, +91, 92, nil, 42, 43, 41, 238, 242, 247, 248, 249, 244, 246, 254, 255, +250, 251, nil, 231, 232, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, +nil, 58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, +233, 234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, +84, 86, 85, 87, nil, nil, nil, nil, 80, 88, 218, 256, nil, nil, nil, +nil, 62, nil, 81, 93, 94, 5, 69, 70, 71, 9, 57, nil, nil, nil, +63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, +nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, +nil, nil, nil, nil, 8, 45, 7, 10, 105, 104, 106, 95, 56, 97, 96, +98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, 238, 242, 247, +248, 249, 244, 246, 254, 255, 250, 251, nil, 231, 232, nil, nil, 252, 253, +nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, nil, 60, nil, 35, 235, +nil, 241, 44, 237, 236, nil, 233, 234, 245, 243, 239, 20, 240, nil, nil, +nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, +88, nil, 256, nil, nil, nil, nil, 62, nil, 81, 93, 94, 290, 69, 70, +71, 9, 57, nil, nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, 66, +68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, +102, 103, nil, nil, 19, nil, nil, nil, nil, nil, 8, 45, 292, 10, 105, +104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, +42, 43, 41, 238, 242, 247, 248, 249, 244, 246, 254, 255, 250, 251, nil, +231, 232, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, 58, 59, +nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, 245, +243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, +87, nil, nil, nil, nil, 80, 88, nil, 256, nil, nil, nil, nil, 62, nil, +81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, +nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, +nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, +nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, 42, 43, 41, 238, 242, 247, 248, 249, 244, +246, 254, 255, 250, 251, nil, 231, 232, nil, nil, 252, 253, nil, 40, nil, +nil, 33, nil, nil, 58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, +237, 236, nil, 233, 234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, 256, +nil, nil, nil, nil, 62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, +nil, nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, +72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, +nil, 19, nil, nil, nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, +56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, +238, 242, 247, 248, 249, 244, 246, 254, 255, 250, 251, nil, 231, 232, nil, +nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, nil, 60, +nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, 245, 243, 239, 20, +240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, +nil, nil, 80, 88, nil, 256, nil, nil, nil, nil, 62, nil, 81, 93, 94, +290, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, nil, 67, +nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, +27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, 8, 45, +292, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, +91, 92, nil, 42, 43, 41, 238, 242, 247, 248, 249, 244, 246, 254, 255, +250, 251, nil, 231, 232, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, +nil, 58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, +233, 234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, +84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, 256, nil, nil, nil, +nil, 62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, +63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, +nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, +nil, nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, +98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, 238, 242, 247, +248, 249, 244, 246, 254, 255, 250, 251, nil, 231, 232, nil, nil, 252, 253, +nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, nil, 60, nil, 35, 235, +nil, 241, 44, 237, 236, nil, 233, 234, 245, 243, 239, 20, 240, nil, nil, +nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, +88, nil, 256, nil, nil, nil, nil, 62, nil, 81, 93, 94, 290, 69, 70, +71, 9, 57, nil, nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, 66, +68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, +102, 103, nil, nil, 19, nil, nil, nil, nil, nil, 8, 45, 292, 10, 105, +104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, +42, 43, 41, 238, 242, 247, 248, 249, 244, 246, 254, 255, 250, 251, nil, +231, 232, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, 58, 59, +nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, 245, +243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, +87, nil, nil, nil, nil, 80, 88, nil, 256, nil, nil, nil, nil, 62, nil, +81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, +nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, +nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, +nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, 42, 43, 41, 238, 242, 247, 248, 249, 244, +246, 254, 255, 250, 251, nil, 231, 232, nil, nil, 252, 253, nil, 40, nil, +nil, 33, nil, nil, 58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, +237, 236, nil, 233, 234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, 256, +nil, nil, nil, nil, 62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, +nil, nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, +72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, +nil, 19, nil, nil, nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, +56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, +238, 242, 247, 248, 249, 244, 246, 254, 255, 250, 251, nil, 231, 232, nil, +nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, nil, 60, +nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, 245, 243, 239, 20, +240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, +nil, nil, 80, 88, nil, 256, nil, nil, nil, nil, 62, nil, 81, 93, 94, +290, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, nil, 67, +nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, +27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, 8, 45, +292, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, +91, 92, nil, 42, 43, 41, 238, 242, 247, 248, 249, 244, 246, 254, 255, +250, 251, nil, -597, - +597, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, +nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, 245, 243, +239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, 62, nil, 81, +93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, +29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, +8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, 238, 242, 247, 248, 249, 244, 246, +254, 255, 250, 251, nil, -597, - +597, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, +nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, 245, 243, +239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, 62, nil, 81, +93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, +29, 28, 27, 101, 100, 102, 103, nil, 548, 19, 545, 544, 543, nil, 546, +8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, 238, -597, -597, -597, -597, 244, 246, nil, 701, -597, - +597, nil, nil, nil, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, +58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, +234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, +62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, +nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, 548, 19, 545, 544, +543, nil, 546, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, 238, nil, nil, 548, +nil, 545, 544, 543, 701, 546, nil, nil, nil, nil, nil, nil, 252, 253, nil, +40, nil, nil, 33, nil, nil, 58, 59, nil, nil, 60, nil, 35, 235, nil, +241, 44, 237, 236, nil, 233, 234, 701, nil, 239, 20, 240, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +nil, nil, nil, nil, nil, nil, 62, nil, 81, 93, 94, 290, 69, 70, 71, +9, 57, nil, nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, +103, nil, 548, 19, 545, 544, 543, nil, 546, 8, 45, 292, 10, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, 238, nil, nil, nil, nil, nil, nil, nil, 701, nil, nil, nil, nil, +nil, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, +nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, nil, nil, +239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, 62, nil, 81, +93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, +29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, +8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, 238, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 252, 253, nil, 40, nil, nil, +33, nil, nil, 58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, +236, nil, 233, 234, nil, nil, 239, 20, 240, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +nil, nil, nil, 62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, nil, +nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, +73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, +19, nil, nil, nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, +97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, 238, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +252, 253, nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, nil, 60, nil, +35, 235, nil, 241, 44, 237, 236, nil, 233, 234, nil, nil, 239, 20, 240, +nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, nil, nil, nil, nil, nil, nil, 62, nil, 81, 93, 94, 290, +69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, +101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, 8, 45, 292, +10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, 238, -597, -597, -597, -597, 244, 246, nil, nil, -597, - +597, nil, nil, nil, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, +58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, +234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, +62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, +nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, +nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, 238, -597, -597, -597, -597, 244, 246, nil, nil, -597, - +597, nil, nil, nil, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, +58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, +234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, +62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, +nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, +nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, 238, -597, -597, -597, -597, 244, 246, nil, nil, -597, - +597, nil, nil, nil, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, +58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, +234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, +62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, +nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, +nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, 238, -597, -597, -597, -597, 244, 246, nil, nil, -597, - +597, nil, nil, nil, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, +58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, +234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, +62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, +nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, +nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, 238, -597, -597, -597, -597, 244, 246, nil, nil, -597, - +597, nil, nil, nil, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, +58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, +234, 245, 243, 239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, +62, nil, 81, 93, 94, 290, 69, 70, 71, 9, 57, nil, nil, nil, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, +nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, +nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, 238, 242, 247, 248, +249, 244, 246, nil, nil, 250, 251, nil, nil, nil, nil, nil, 252, 253, nil, +40, nil, nil, 33, nil, nil, 58, 59, nil, nil, 60, nil, 35, 235, nil, +241, 44, 237, 236, nil, 233, 234, 245, 243, 239, 20, 240, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +nil, nil, nil, nil, nil, nil, 62, nil, 81, 93, 94, 290, 69, 70, 71, +9, 57, nil, nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, +103, nil, nil, 19, nil, nil, nil, nil, nil, 8, 45, 292, 10, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, 238, 242, 247, 248, 249, 244, 246, 254, nil, 250, 251, nil, nil, +nil, nil, nil, 252, 253, nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, +nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, nil, 233, 234, 245, 243, +239, 20, 240, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, 62, nil, 81, +93, 94, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, +28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, 8, +45, 7, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, 238, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 252, 253, nil, 40, nil, nil, 33, +nil, nil, 58, 59, nil, nil, 60, nil, 35, 235, nil, 241, 44, 237, 236, +nil, 233, 234, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, 42, 43, 41, 238, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 252, 253, nil, 223, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, nil, 235, nil, 241, 44, 237, 236, nil, 233, 234, +nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, +31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, +41, 238, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 252, 253, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, 281, 235, 279, nil, 44, 237, 236, 285, 233, 234, nil, nil, nil, +228, nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, +nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 230, +nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, 281, +nil, 279, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, 228, nil, nil, +nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, +nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, 284, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, 281, nil, 279, nil, +44, nil, nil, 285, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, +282, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, +306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, +307, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, nil, nil, 313, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 303, nil, nil, 299, +nil, nil, 58, 59, nil, nil, 60, nil, 298, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 307, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, nil, nil, 313, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 303, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, 548, nil, 545, 544, 543, 553, 546, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 556, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 315, nil, 551, 62, +nil, 81, 93, 94, 69, 70, 71, nil, 57, 564, 563, nil, 63, 64, 557, +nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, +nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, +nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, +nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, +nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, +nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, +nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, +312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, +nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, +91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, +nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, +nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, +84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, +71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, +68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, +102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, +104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, +42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, +nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, +nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, +87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, +81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, +72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, +nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, +56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, +nil, 281, nil, nil, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, 228, +nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, nil, +nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, +63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, +nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, +nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, +98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, +nil, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, 228, nil, nil, nil, +nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, +88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, +nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, +nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, +nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, +nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, +nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, +nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, +nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, +27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, nil, 45, +nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, +91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, +nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, +nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, nil, +84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, +71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, +68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, +102, 103, nil, nil, 19, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, +104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, +42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, +nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, +nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, +87, nil, nil, nil, nil, 80, 88, 113, nil, nil, nil, nil, 112, 62, nil, +81, 93, 94, 69, 70, 71, nil, 57, nil, nil, nil, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, +305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, +nil, 307, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, nil, nil, 313, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 348, nil, nil, +33, nil, nil, 58, 59, nil, nil, 60, nil, 35, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, +101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 307, nil, +nil, 105, 104, 106, 353, 56, 97, 96, 354, nil, 99, 107, 108, nil, 91, +92, nil, nil, nil, 313, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 360, nil, nil, 355, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, +103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 307, nil, nil, 105, 104, +106, 353, 56, 97, 96, 354, nil, 99, 107, 108, nil, 91, 92, nil, nil, +nil, 313, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 355, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, 548, nil, 545, 544, 543, 553, 546, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 556, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, 551, 62, nil, 81, +93, 94, 69, 70, 71, 9, 57, 564, 563, nil, 63, 64, 557, nil, nil, +67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, +28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, 8, +45, 7, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 40, nil, nil, 33, +nil, nil, 58, 59, nil, nil, 60, nil, 35, nil, nil, nil, 44, nil, nil, +nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, +nil, 388, 62, nil, 81, 93, 94, 69, 70, 71, nil, 57, nil, nil, nil, +63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, +nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, +nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, +98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, +nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, +nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, +88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, +nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, +nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, +nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, +nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, +nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, +nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, +nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, +27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, nil, 45, +nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, +91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, +nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, +nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, nil, +84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, +71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, +68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, +102, 103, nil, nil, 19, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, +104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, +42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, +nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, +nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, +87, nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, 62, nil, +81, 93, 94, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, +29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, +8, 45, nil, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 40, nil, nil, +33, nil, nil, 58, 59, nil, nil, 60, nil, 35, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, +101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, +nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, 404, nil, nil, nil, 44, nil, nil, nil, nil, +nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, +103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, +nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, +93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, +73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, +230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, +97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, +281, nil, 279, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, 228, nil, +nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, +nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 230, nil, nil, +nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, +nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, +29, 28, 27, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, +nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, +229, nil, nil, 58, 59, nil, nil, 60, nil, 404, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, +101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, nil, 45, nil, +nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, +nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, +103, nil, nil, 19, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, +nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, +93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, +73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, +19, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, +97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, +nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, +nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, +nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, +nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, +nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +218, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, +305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, +nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, +229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, +101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, +nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, +nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, +103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, +nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, +93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, +73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, +230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, +97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, +nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, +nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, +nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, +nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, +nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, +305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, +nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, +229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, +101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, +nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, +nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, +103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, +nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, +93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, +73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, +230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, +97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, +nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, +nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, +nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, +nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, +nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, +305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, +nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, +229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, +101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, +nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, +nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, +103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, +nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, +93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, +73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, +230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, +97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, +nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, +nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, +nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, +nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, +nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, +305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, +nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, +229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, +101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, +nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, +nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, +103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, +nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, +93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, +73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, +230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, +97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, +nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, +nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, +nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, +nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, +nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, +305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, +nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, +229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, +101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, +nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, +nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, +103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, +nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, +93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, +73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, +230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, +97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, +nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, +nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, +nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, +nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, +nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, +305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, +nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, +229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, +101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, +nil, 105, 104, 106, 95, 56, 97, 96, 98, 284, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, 281, nil, 279, nil, 44, nil, nil, 285, nil, +nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, +103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, +106, 95, 56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, 281, nil, 279, nil, 44, nil, nil, 285, nil, nil, nil, nil, +nil, 228, nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, +93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, +73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, +230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, +97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, +281, nil, 279, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, 228, nil, +nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, 218, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, +64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, +nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, +nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, +nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, +nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, +89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, +nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, +nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, +305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, +nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, +108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, +229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, +83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, +69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, +65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, +101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, +nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, +92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, +58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, +nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, +86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, +62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, +309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, +103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, +106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, +43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, +nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, +nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, +nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, nil, nil, 62, nil, 81, +93, 94, 69, 70, 71, 9, 57, nil, nil, nil, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, +28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, 8, +45, nil, 10, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 40, nil, nil, 33, +nil, nil, 58, 59, nil, nil, 60, nil, 35, nil, nil, nil, 44, nil, nil, +nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 307, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, nil, nil, 313, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 303, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, 548, nil, 545, 544, 543, 553, 546, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 556, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 504, nil, 551, 62, +nil, 81, 93, 94, 69, 70, 71, nil, 57, 564, 563, nil, 63, 64, 557, +nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, +nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, +nil, nil, 307, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, nil, nil, 313, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 303, nil, +nil, 299, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, +nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, +nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, +312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, +nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, +91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, 520, +nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, +nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, +84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, +71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, +68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, +102, 103, nil, nil, 19, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, +104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, +42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, +nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, +nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, +87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, +81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, +72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, +nil, 19, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, +56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, +nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 20, +nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, +nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, +63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, +nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, +nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, +98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, +nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, +nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, +88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, +nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, +nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, +nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, +nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, +nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, +nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, +nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, +27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, nil, 45, +nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, +91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, +nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, +nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, nil, +84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, +71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, +68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, +102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, +104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, +42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, +nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, +nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, +87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, +81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, +72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, +nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, +56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, +nil, 281, nil, 279, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, 228, +nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, nil, +nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, +63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, +nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, +nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, +98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, +nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, +nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, +88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, +nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, +nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, +nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, +nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, +nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, +nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, +nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, +312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, +nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, +91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, +nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, +nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, +84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, +71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, +68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, +102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, +104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, +42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, +nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, +nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, +87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, +81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, +72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, +nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, +56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, +nil, 659, nil, 279, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, 228, +nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, nil, +nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, +63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, +nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, +nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, +98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, +279, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, 228, nil, nil, nil, +nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, +88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, +nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, +nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, +nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, +107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, +nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, +nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, +82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, +nil, nil, nil, nil, 62, nil, 81, 93, 94, 69, 70, 71, 9, 57, nil, +nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, +73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, +19, nil, nil, nil, nil, nil, 8, 45, 292, 10, 105, 104, 106, 95, 56, +97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 40, nil, nil, 33, nil, nil, 58, 59, nil, nil, 60, nil, +35, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, +nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, +nil, 80, 88, nil, nil, nil, nil, nil, 388, 62, nil, 81, 93, 94, 69, +70, 71, nil, 57, nil, nil, nil, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 307, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, nil, nil, 313, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 303, nil, nil, 299, nil, nil, 58, +59, nil, nil, 60, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, +31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, +41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, 281, nil, 279, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, +228, nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, +nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, +nil, nil, nil, nil, nil, nil, 307, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, nil, 99, 107, 108, nil, 91, 92, nil, nil, nil, 313, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 303, nil, nil, 299, nil, nil, 58, 59, nil, nil, 60, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, +nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, +44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, +79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, +306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, +45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, +nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, +nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, +100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, nil, 45, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, +nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, +310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, +41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, 659, nil, nil, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, +228, nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, +nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, +nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, +nil, nil, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, 228, nil, nil, +nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, +nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, +44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, +79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, +306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, +45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, +nil, nil, 58, 59, nil, nil, 60, nil, 281, nil, nil, nil, 44, nil, nil, +nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, +nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, 281, nil, 279, nil, 44, nil, nil, 285, nil, nil, +nil, nil, nil, 228, nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, +31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, nil, 42, 43, +41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, 281, nil, 279, nil, 44, nil, nil, 285, nil, nil, nil, nil, nil, +228, nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, +nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, +nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, 754, +nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, +nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, +nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, +44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, +79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, +306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, +45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, 284, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, +nil, nil, 58, 59, nil, nil, 60, nil, 659, nil, 279, nil, 44, nil, nil, +285, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 282, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, 284, 99, 107, 108, nil, 91, 92, +nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, nil, nil, 279, nil, 44, nil, nil, 285, nil, nil, +nil, nil, nil, 228, nil, nil, nil, nil, 89, 282, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, +31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, +41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, +228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, +nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 230, +nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, +nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, +nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, +nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, +44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, +79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, +28, 27, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, +45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, +nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, +nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, +nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, +310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, +41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, +228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, +nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, +nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, +nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, +nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, +nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, +44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, +79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, +306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, +307, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, nil, nil, 313, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 303, nil, nil, 299, +nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 307, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, nil, nil, 313, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 303, nil, nil, 299, nil, nil, 58, +59, nil, nil, 60, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, +310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, +41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, 404, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, +228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, +nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, +nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, +nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, +nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, +nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, +44, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, +79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, +28, 27, 101, 100, 102, 103, nil, nil, 19, nil, nil, nil, nil, nil, nil, +45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, +nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, +nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, +nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, +31, 72, 73, nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, +41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, +228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, +nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, +nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, +nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, +nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, +nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, +44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, +79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, +306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, +45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, +nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, +nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, +nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, +310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 307, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, nil, nil, +313, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 876, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 30, 31, 72, 73, +nil, nil, nil, nil, nil, 29, 28, 27, 101, 100, 102, 103, nil, nil, 19, +nil, nil, nil, nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, nil, 99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 223, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, +nil, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, +nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, +nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, 659, nil, nil, nil, +44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, +79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, +306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, +45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, 284, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, +nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, 279, nil, 44, nil, nil, +285, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 282, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, +70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, +66, 68, 309, 310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, +100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, 45, nil, nil, +105, 104, 106, 95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, +nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, nil, nil, 58, +59, nil, nil, 60, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, nil, +nil, nil, nil, 228, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, +85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, +57, 81, 93, 94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, +310, 72, 73, nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, +nil, nil, 230, nil, nil, nil, nil, nil, nil, 307, nil, nil, 105, 104, 106, +95, 56, 97, 96, 98, nil, 99, 107, 108, nil, 91, 92, nil, nil, nil, +313, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 876, nil, nil, 229, nil, nil, 58, 59, nil, nil, +60, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, +nil, nil, nil, 80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, +94, 63, 64, nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, +nil, nil, nil, nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, +nil, nil, nil, nil, nil, nil, 307, nil, nil, 105, 104, 106, 95, 56, 97, +96, 98, nil, 99, 107, 108, nil, 91, 92, nil, nil, nil, 313, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 947, nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 89, 79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, +80, 88, nil, nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, +nil, nil, nil, 67, nil, 65, 66, 68, 309, 310, 72, 73, nil, nil, nil, +nil, nil, 305, 306, 312, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, +nil, nil, nil, 45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, nil, +99, 107, 108, nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, +nil, nil, 229, nil, nil, 58, 59, nil, nil, 60, nil, nil, nil, nil, nil, +44, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, +79, 82, 83, nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, +nil, nil, 69, 70, 71, 62, 57, 81, 93, 94, 63, 64, nil, nil, nil, +67, nil, 65, 66, 68, 30, 31, 72, 73, nil, nil, nil, nil, nil, 29, +28, 27, 101, 100, 102, 103, nil, nil, 230, nil, nil, nil, nil, nil, nil, +45, nil, nil, 105, 104, 106, 95, 56, 97, 96, 98, 284, 99, 107, 108, +nil, 91, 92, nil, 42, 43, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 229, +nil, nil, 58, 59, nil, nil, 60, nil, 281, nil, 279, nil, 44, nil, nil, +285, nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 89, 282, 82, 83, +nil, 84, 86, 85, 87, nil, nil, nil, nil, 80, 88, nil, nil, nil, nil, +-282, nil, 62, nil, 81, 93, 94, -282, -282, -282, nil, nil, -282, -282, -282, nil, -282, nil, nil, nil, nil, nil, nil, nil, nil, nil, -282, -282, -282, nil, nil, nil, nil, nil, nil, nil, -282, -282, nil, -282, -282, -282, -282, - +282, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, -282, nil, nil, -282, -282, -282, nil, nil, -282, nil, nil, -282, nil, nil, -282, -282, nil, -282, nil, -282, nil, -282, nil, -282, -282, nil, -282, -282, -282, -282, -282, nil, -282, nil, -282, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -282, nil, nil, -282, -282, -282, -282, -579, -282, nil, -282, nil, nil, nil, -579, -579, -579, nil, nil, -579, -579, -579, nil, -579, nil, nil, nil, nil, nil, nil, nil, nil, -579, -579, -579, -579, nil, nil, nil, nil, nil, nil, nil, -579, -579, nil, -579, -579, -579, -579, - +579, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, -579, nil, nil, -579, -579, -579, nil, nil, -579, nil, nil, -579, nil, nil, -579, -579, nil, -579, nil, -579, nil, -579, nil, -579, -579, nil, -579, -579, -579, -579, -579, nil, -579, -579, -579, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -579, nil, nil, -579, -579, -579, -579, -580, -579, nil, -579, nil, nil, nil, -580, -580, -580, nil, nil, -580, -580, -580, nil, -580, nil, nil, nil, nil, nil, nil, nil, nil, -580, -580, -580, -580, nil, nil, nil, nil, nil, nil, nil, -580, -580, nil, -580, -580, -580, -580, - +580, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, -580, nil, nil, -580, -580, -580, nil, nil, -580, nil, nil, -580, nil, nil, -580, -580, nil, -580, nil, -580, nil, -580, nil, -580, -580, nil, -580, -580, -580, -580, -580, nil, -580, -580, -580, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -580, nil, nil, -580, -580, -580, -580, -411, -580, nil, -580, nil, nil, nil, -411, -411, -411, nil, nil, -411, -411, -411, nil, -411, nil, nil, nil, nil, nil, nil, nil, nil, -411, -411, -411, nil, nil, nil, nil, nil, nil, nil, nil, -411, -411, nil, -411, -411, -411, -411, - +411, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, -411, nil, nil, -411, -411, -411, nil, nil, -411, nil, 263, -411, nil, nil, -411, -411, nil, -411, nil, -411, nil, -411, nil, -411, -411, nil, -411, -411, -411, -411, -411, -298, -411, -411, -411, nil, nil, nil, -298, -298, -298, nil, nil, -298, -298, -298, nil, -298, -411, nil, nil, -411, -411, nil, -411, nil, -411, -298, -298, nil, nil, nil, nil, nil, nil, nil, nil, -298, -298, nil, -298, -298, -298, -298, - +298, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, -298, nil, nil, -298, -298, -298, nil, nil, -298, nil, 272, -298, nil, nil, -298, -298, nil, -298, nil, -298, nil, -298, nil, -298, -298, nil, -298, -298, -298, -298, -298, nil, -298, -246, -298, nil, nil, nil, nil, nil, -246, -246, -246, nil, nil, -246, -246, -246, -298, -246, nil, -298, -298, nil, -298, nil, -298, nil, -246, -246, -246, nil, nil, nil, nil, nil, nil, nil, nil, -246, -246, nil, -246, -246, -246, -246, - +246, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, -246, nil, nil, -246, -246, -246, nil, nil, -246, nil, 263, -246, nil, nil, -246, -246, nil, -246, nil, -246, nil, -246, nil, -246, -246, nil, -246, -246, -246, -246, -246, nil, -246, -246, -246, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -246, nil, -246, -246, -246, nil, -246, nil, -246, -246, -246, -246, nil, nil, -246, -246, -246, 548, -246, 545, 544, 543, 553, 546, nil, nil, nil, -246, -246, nil, nil, nil, nil, 556, nil, nil, nil, nil, -246, -246, nil, -246, -246, -246, -246, - +246, nil, nil, nil, nil, nil, nil, nil, nil, nil, 551, 548, nil, 545, 544, +543, 553, 546, nil, 561, 560, 564, 563, nil, nil, nil, 557, 556, 548, nil, +545, 544, 543, 553, 546, -246, nil, nil, nil, nil, nil, nil, -246, nil, 556, nil, nil, 263, - +246, 551, 534, nil, 218, nil, nil, nil, nil, nil, 561, 560, 564, 563, nil, +nil, nil, 557, 551, nil, nil, nil, -246, -246, nil, nil, nil, 561, 560, 564, 563, nil, nil, nil, 557, nil, nil, -246, nil, nil, -246, nil, nil, nil, nil, - +246, 173, 184, 174, 197, 170, 190, 180, 179, 200, 201, 195, 178, 177, 172, +198, 202, 203, 182, 171, 185, 189, 191, 183, 176, nil, nil, nil, 192, 199, +194, 193, 186, 196, 181, 169, 188, 187, nil, nil, nil, nil, nil, 168, 175, +166, 167, 163, 164, 165, 124, 126, 123, nil, 125, nil, nil, nil, nil, nil, +nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, 144, nil, nil, +139, 140, nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, 152, 161, +148, 149, 143, 141, 133, 155, 134, nil, nil, 162, 89, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 88, 173, 184, 174, 197, 170, +190, 180, 179, 200, 201, 195, 178, 177, 172, 198, 202, 203, 182, 171, 185, +189, 191, 183, 176, nil, nil, nil, 192, 199, 194, 193, 186, 196, 181, 169, +188, 187, nil, nil, nil, nil, nil, 168, 175, 166, 167, 163, 164, 165, 124, +126, nil, nil, 125, nil, nil, nil, nil, nil, nil, nil, nil, 157, 158, nil, +154, 136, 137, 138, 145, 142, 144, nil, nil, 139, 140, nil, nil, nil, 159, +160, 146, 147, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 151, 150, nil, 135, 156, 153, 152, 161, 148, 149, 143, 141, 133, 155, +134, nil, nil, 162, 89, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 88, 173, 184, 174, 197, 170, 190, 180, 179, 200, 201, 195, +178, 177, 172, 198, 202, 203, 182, 171, 185, 189, 191, 183, 176, nil, nil, +nil, 192, 199, 194, 193, 186, 196, 181, 169, 188, 187, nil, nil, nil, nil, +nil, 168, 175, 166, 167, 163, 164, 165, 124, 126, nil, nil, 125, nil, nil, +nil, nil, nil, nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, +144, nil, nil, 139, 140, nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, +153, 152, 161, 148, 149, 143, 141, 133, 155, 134, nil, nil, 162, 89, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 88, 173, 184, +174, 197, 170, 190, 180, 179, 200, 201, 195, 178, 177, 172, 198, 202, 203, +182, 171, 185, 189, 191, 183, 176, nil, nil, nil, 192, 199, 194, 193, 186, +196, 181, 169, 188, 187, nil, nil, nil, nil, nil, 168, 175, 166, 167, 163, +164, 165, 124, 126, nil, nil, 125, nil, nil, nil, nil, nil, nil, nil, nil, +157, 158, nil, 154, 136, 137, 138, 145, 142, 144, nil, nil, 139, 140, nil, +nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, 152, 161, 148, 149, 143, +141, 133, 155, 134, nil, nil, 162, 89, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 88, 173, 184, 174, 197, 170, 190, 180, 179, +200, 201, 195, 178, 177, 172, 198, 202, 203, 182, 171, 185, 189, 191, 183, +176, nil, nil, nil, 192, 199, 194, 371, 370, 372, 369, 169, 188, 187, nil, +nil, nil, nil, nil, 168, 175, 166, 167, 366, 367, 368, 364, 126, 97, 96, +365, nil, 99, nil, nil, nil, nil, nil, nil, 157, 158, nil, 154, 136, 137, +138, 145, 142, 144, nil, nil, 139, 140, nil, nil, nil, 159, 160, 146, 147, +nil, nil, nil, nil, nil, 376, nil, nil, nil, nil, nil, nil, nil, 151, 150, +nil, 135, 156, 153, 152, 161, 148, 149, 143, 141, 133, 155, 134, nil, nil, +162, 173, 184, 174, 197, 170, 190, 180, 179, 200, 201, 195, 178, 177, 172, +198, 202, 203, 182, 171, 185, 189, 191, 183, 176, nil, nil, nil, 192, 199, +194, 193, 186, 196, 181, 169, 188, 187, nil, nil, nil, nil, nil, 168, 175, +166, 167, 163, 164, 165, 124, 126, nil, nil, 125, nil, nil, nil, nil, nil, +nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, 144, nil, nil, +139, 140, nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, 152, 161, +148, 149, 143, 141, 133, 155, 134, 413, 417, 162, nil, 414, nil, nil, nil, +nil, nil, nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, 144, +nil, nil, 139, 140, nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, +nil, 263, nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, +152, 161, 148, 149, 143, 141, 133, 155, 134, 420, 424, 162, nil, 419, nil, +nil, nil, nil, nil, nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, +142, 144, nil, nil, 139, 140, nil, nil, nil, 159, 160, 146, 147, nil, nil, +nil, nil, nil, 263, nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, +156, 153, 152, 161, 148, 149, 143, 141, 133, 155, 134, 475, 417, 162, nil, +476, nil, nil, nil, nil, nil, nil, nil, nil, 157, 158, nil, 154, 136, 137, +138, 145, 142, 144, nil, nil, 139, 140, nil, nil, nil, 159, 160, 146, 147, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 151, 150, +nil, 135, 156, 153, 152, 161, 148, 149, 143, 141, 133, 155, 134, 638, 417, +162, nil, 639, nil, nil, nil, nil, nil, nil, nil, nil, 157, 158, nil, 154, +136, 137, 138, 145, 142, 144, nil, nil, 139, 140, nil, nil, nil, 159, 160, +146, 147, nil, nil, nil, nil, nil, 263, nil, nil, nil, nil, nil, nil, nil, +151, 150, nil, 135, 156, 153, 152, 161, 148, 149, 143, 141, 133, 155, 134, +640, 424, 162, nil, 641, nil, nil, nil, nil, nil, nil, nil, nil, 157, 158, +nil, 154, 136, 137, 138, 145, 142, 144, nil, nil, 139, 140, nil, nil, nil, +159, 160, 146, 147, nil, nil, nil, nil, nil, 263, nil, nil, nil, nil, nil, +nil, nil, 151, 150, nil, 135, 156, 153, 152, 161, 148, 149, 143, 141, 133, +155, 134, 670, 417, 162, nil, 671, nil, nil, nil, nil, nil, nil, nil, nil, +157, 158, nil, 154, 136, 137, 138, 145, 142, 144, nil, nil, 139, 140, nil, +nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, nil, 263, nil, nil, nil, +nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, 152, 161, 148, 149, 143, +141, 133, 155, 134, 673, 424, 162, nil, 674, nil, nil, nil, nil, nil, nil, +nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, 144, nil, nil, 139, +140, nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, nil, 263, nil, +nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, 152, 161, 148, +149, 143, 141, 133, 155, 134, 638, 417, 162, nil, 639, nil, nil, nil, nil, +nil, nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, 144, nil, +nil, 139, 140, nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, nil, +263, nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, 152, +161, 148, 149, 143, 141, 133, 155, 134, 640, 424, 162, nil, 641, nil, nil, +nil, nil, nil, nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, +144, nil, nil, 139, 140, nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, +nil, nil, 263, nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, +153, 152, 161, 148, 149, 143, 141, 133, 155, 134, 721, 417, 162, nil, 722, +nil, nil, nil, nil, nil, nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, +145, 142, 144, nil, nil, 139, 140, nil, nil, nil, 159, 160, 146, 147, nil, +nil, nil, nil, nil, 263, nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, +135, 156, 153, 152, 161, 148, 149, 143, 141, 133, 155, 134, 723, 424, 162, +nil, 724, nil, nil, nil, nil, nil, nil, nil, nil, 157, 158, nil, 154, 136, +137, 138, 145, 142, 144, nil, nil, 139, 140, nil, nil, nil, 159, 160, 146, +147, nil, nil, nil, nil, nil, 263, nil, nil, nil, nil, nil, nil, nil, 151, +150, nil, 135, 156, 153, 152, 161, 148, 149, 143, 141, 133, 155, 134, 726, +424, 162, nil, 727, nil, nil, nil, nil, nil, nil, nil, nil, 157, 158, nil, +154, 136, 137, 138, 145, 142, 144, nil, nil, 139, 140, nil, nil, nil, 159, +160, 146, 147, nil, nil, nil, nil, nil, 263, nil, nil, nil, nil, nil, nil, +nil, 151, 150, nil, 135, 156, 153, 152, 161, 148, 149, 143, 141, 133, 155, +134, 475, 417, 162, nil, 476, nil, nil, nil, nil, nil, nil, nil, nil, 157, +158, nil, 154, 136, 137, 138, 145, 142, 144, nil, nil, 139, 140, nil, nil, +nil, 159, 160, 146, 147, nil, nil, nil, nil, nil, 263, nil, nil, nil, nil, +nil, nil, nil, 151, 150, nil, 135, 156, 153, 152, 161, 148, 149, 143, 141, +133, 155, 134, 983, 424, 162, nil, 982, nil, nil, nil, nil, nil, nil, nil, +nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, 144, nil, nil, 139, 140, +nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, nil, 263, nil, nil, +nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, 152, 161, 148, 149, +143, 141, 133, 155, 134, 1006, 417, 162, nil, 1007, nil, nil, nil, nil, nil, +nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, 144, nil, nil, +139, 140, nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, nil, 263, +nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, 152, 161, +148, 149, 143, 141, 133, 155, 134, 1008, 424, 162, nil, 1009, nil, nil, nil, +nil, nil, nil, nil, nil, 157, 158, nil, 154, 136, 137, 138, 145, 142, 144, +nil, nil, 139, 140, nil, nil, nil, 159, 160, 146, 147, nil, nil, nil, nil, +nil, 263, nil, nil, nil, nil, nil, nil, nil, 151, 150, nil, 135, 156, 153, +152, 161, 148, 149, 143, 141, 133, 155, 134, nil, 548, 162, 545, 544, 543, +553, 546, nil, 548, nil, 545, 544, 543, 553, 546, nil, 556, nil, nil, nil, +nil, nil, nil, 548, 556, 545, 544, 543, 553, 546, nil, nil, nil, nil, nil, +nil, nil, nil, 551, 556, nil, nil, nil, nil, nil, nil, 551, 561, 560, 564, +563, nil, nil, nil, 557, 561, 560, 564, 563, nil, nil, 551, 557, 548, nil, +545, 544, 543, 553, 546, 561, 560, 564, 563, nil, nil, nil, 557, 548, 556, +545, 544, 543, 553, 546, nil, 548, nil, 545, 544, 543, 553, 546, nil, 556, +nil, nil, nil, nil, nil, nil, 551, 556, 548, nil, 545, 544, 543, 553, 546, +561, 560, 564, 563, nil, nil, 551, 557, nil, 556, nil, nil, nil, nil, 551, +561, 560, 564, 563, nil, nil, nil, 557, 561, 560, 564, 563, nil, nil, nil, +557, 551, 548, nil, 545, 544, 543, 553, 546, nil, 561, 560, 564, 563, nil, +nil, nil, 557, 556, 548, nil, 545, 544, 543, 553, 546, nil, 548, nil, 545, +544, 543, 553, 546, nil, 556, nil, nil, nil, nil, 551, nil, 548, 556, 545, +544, 543, 553, 546, nil, nil, 564, 563, nil, nil, nil, 557, 551, 556, nil, +nil, nil, nil, nil, nil, 551, nil, nil, 564, 563, nil, nil, nil, 557, 561, +560, 564, 563, nil, nil, 551, 557, 548, nil, 545, 544, 543, 553, 546, nil, +nil, 564, 563, nil, nil, nil, 557, 548, 556, 545, 544, 543, 553, 546, nil, +548, nil, 545, 544, 543, 553, 546, 548, 556, 545, 544, 543, 553, 546, nil, +551, 556, nil, nil, nil, nil, nil, nil, 556, nil, nil, 564, 563, nil, nil, +551, 557, nil, nil, nil, nil, nil, nil, 551, nil, nil, 564, 563, nil, nil, +551, 557, nil, nil, 564, 563, nil, nil, nil, 557, nil, 564, 563, nil, nil, +nil, 557] + +racc_action_check = [ +95, 345, 61, 437, 437, 346, 349, 95, 95, 95, 221, 338, 95, 95, 95, +383, 95, 355, 19, 384, 58, 355, 594, 594, 95, 222, 95, 95, 95, 473, +650, 26, 17, 17, 578, 359, 95, 95, 339, 95, 95, 95, 95, 95, 719, +885, 15, 1, 908, 687, 721, 7, 1006, 665, 1007, 1020, 680, 680, 308, 19, +58, 913, 665, 913, 473, 722, 221, 95, 95, 95, 95, 95, 95, 95, 95, +95, 95, 95, 95, 95, 95, 222, 383, 95, 95, 95, 384, 95, 95, 570, +61, 95, 10, 15, 95, 95, 26, 95, 437, 95, 12, 95, 15, 95, 95, +844, 95, 95, 95, 95, 95, 345, 95, 98, 95, 346, 349, 594, 650, 26, +98, 98, 98, 308, 1008, 98, 98, 98, 95, 98, 338, 95, 95, 95, 95, +338, 95, 98, 95, 98, 98, 98, 359, 95, 578, 571, 308, 723, 845, 98, +98, 680, 98, 98, 98, 98, 98, 339, 13, 687, 721, 670, 339, 719, 885, +359, 719, 908, 719, 885, 359, 1006, 908, 1007, 1020, 722, 1006, 16, 1007, 1020, +98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 570, +22, 98, 98, 98, 570, 98, 98, 1008, 671, 98, 37, 724, 98, 98, 40, +98, 605, 98, 723, 98, 844, 98, 98, 224, 98, 98, 98, 98, 98, 419, +98, 45, 98, 670, 590, 590, 419, 419, 419, 481, 24, 328, 419, 419, 328, +419, 98, 24, 1008, 98, 98, 98, 98, 1008, 98, 571, 98, 353, 845, 3, +571, 98, 723, 845, 3, 419, 419, 109, 419, 419, 419, 419, 419, 670, 481, +671, 670, 724, 123, 224, 204, 605, 605, 123, 123, 670, 704, 607, 704, 704, +704, 605, 704, 223, 41, 41, 419, 419, 419, 419, 419, 419, 419, 419, 419, +419, 419, 419, 419, 419, 353, 354, 419, 419, 419, 671, 419, 353, 671, 38, +419, 724, 353, 419, 313, 313, 353, 671, 419, 590, 419, 443, 419, 419, 590, +419, 419, 419, 419, 419, 378, 419, 420, 419, 225, 353, 39, 364, 226, 420, +420, 420, 607, 607, 364, 420, 420, 419, 420, 482, 419, 419, 607, 419, 354, +419, 38, 420, 230, 704, 673, 354, 419, 41, 41, 38, 354, 262, 420, 420, +354, 420, 420, 420, 420, 420, 904, 443, 904, 904, 904, 317, 904, 39, 482, +329, 651, 492, 329, 354, 379, 276, 39, 313, 313, 378, 378, 378, 801, 420, +420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 673, 413, +420, 420, 420, 380, 420, 673, 651, 288, 420, 414, 673, 420, 288, 317, 673, +381, 420, 638, 420, 726, 420, 420, 317, 420, 420, 420, 420, 420, 277, 420, +420, 420, 382, 673, 280, 385, 801, 492, 492, 492, 379, 379, 379, 801, 904, +420, 413, 621, 420, 420, 640, 420, 801, 420, 492, 413, 414, 640, 640, 640, +420, 292, 640, 640, 640, 414, 640, 365, 380, 380, 380, 801, 726, 638, 365, +640, 640, 640, 640, 726, 381, 381, 381, 639, 726, 293, 640, 640, 726, 640, +640, 640, 640, 640, 621, 295, 774, 382, 382, 382, 385, 385, 385, 621, 337, +337, 366, 726, 551, 367, 551, 551, 551, 366, 551, 296, 367, 640, 640, 640, +640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 689, 297, 640, 640, +640, 368, 640, 640, 639, 303, 640, 689, 368, 640, 640, 551, 640, 306, 640, +307, 640, 774, 640, 640, 551, 640, 640, 640, 640, 640, 862, 640, 640, 640, +332, 369, 77, 332, 342, 370, 312, 862, 369, 342, 689, 689, 370, 640, 77, +689, 640, 640, 640, 640, 449, 640, 641, 640, 77, 371, 14, 314, 640, 641, +641, 641, 371, 14, 641, 641, 641, 46, 641, 220, 862, 862, 14, 318, 46, +862, 220, 372, 641, 641, 641, 321, 449, 46, 372, 220, 449, 449, 641, 641, +374, 641, 641, 641, 641, 641, 833, 374, 833, 833, 833, 300, 833, 701, 326, +701, 701, 701, 300, 701, 831, 330, 831, 831, 831, 686, 831, 300, 686, 641, +641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 468, 833, +641, 641, 641, 301, 641, 641, 701, 469, 641, 331, 301, 641, 641, 831, 641, +701, 641, 333, 641, 301, 641, 641, 831, 641, 641, 641, 641, 641, 589, 641, +468, 641, 343, 589, 468, 468, 450, 468, 468, 469, 523, 523, 344, 469, 469, +641, 469, 469, 641, 641, 641, 641, 848, 641, 853, 641, 348, 848, 350, 853, +641, 0, 0, 0, 0, 0, 0, 394, 450, 302, 0, 0, 450, 450, 400, +0, 302, 0, 0, 0, 0, 0, 0, 0, 934, 302, 403, 934, 405, 0, +0, 0, 0, 0, 0, 0, 598, 598, 0, 409, 598, 598, 598, 432, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, +412, 0, 0, 421, 0, 0, 0, 432, 432, 432, 432, 432, 432, 432, 432, +432, 432, 432, 304, 432, 432, 319, 429, 432, 432, 304, 0, 439, 319, 0, +692, 692, 0, 0, 304, 451, 0, 319, 0, 432, 452, 432, 0, 432, 432, +453, 432, 432, 432, 432, 432, 0, 432, 710, 710, 454, 0, 0, 0, 0, +347, 0, 0, 0, 0, 996, 996, 347, 479, 0, 0, 483, 432, 499, 432, +500, 347, 0, 503, 0, 0, 0, 33, 33, 33, 33, 33, 33, 505, 510, +357, 33, 33, 513, 521, 522, 33, 357, 33, 33, 33, 33, 33, 33, 33, +524, 357, 536, 537, 539, 33, 33, 33, 33, 33, 33, 33, 540, 541, 33, +550, 558, 562, 565, 408, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, +33, 33, 567, 33, 33, 33, 572, 33, 33, 573, 33, 33, 33, 408, 408, +408, 408, 408, 408, 408, 408, 408, 408, 408, 509, 408, 408, 581, 592, 408, +408, 509, 33, 602, 581, 33, 610, 612, 33, 33, 509, 618, 33, 581, 33, +408, 622, 408, 33, 408, 408, 627, 408, 408, 408, 408, 408, 33, 408, 632, +642, 649, 33, 33, 33, 33, 875, 33, 33, 33, 33, 656, 658, 875, 664, +33, 33, 667, 408, 669, 672, 675, 875, 33, 676, 33, 33, 33, 121, 121, +121, 121, 121, 121, 679, 681, 938, 121, 121, 684, 688, 703, 121, 938, 121, +121, 121, 121, 121, 121, 121, 705, 938, 712, 717, 720, 121, 121, 121, 121, +121, 121, 121, 729, 734, 121, 753, 758, 775, 776, 643, 121, 121, 121, 121, +121, 121, 121, 121, 121, 121, 121, 121, 777, 121, 121, 121, 779, 121, 121, +780, 121, 121, 121, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, +674, 643, 643, 944, 781, 643, 643, 674, 121, 783, 944, 121, 674, 784, 121, +121, 674, 785, 121, 944, 121, 643, 786, 643, 121, 643, 643, 790, 643, 643, +643, 643, 643, 121, 643, 794, 795, 800, 121, 121, 121, 121, 945, 121, 121, +121, 121, 804, 807, 945, 808, 121, 121, 811, 643, 816, 817, 821, 945, 121, +822, 121, 121, 121, 206, 206, 206, 206, 206, 206, 824, 825, 946, 206, 206, +827, 830, 832, 206, 946, 206, 206, 206, 206, 206, 206, 206, 835, 946, 838, +847, 851, 206, 206, 206, 206, 206, 206, 206, 852, 873, 206, 873, 873, 873, +855, 873, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 856, +206, 206, 206, 872, 206, 206, 876, 206, 206, 206, 21, 21, 21, 21, 21, +21, 21, 21, 21, 21, 21, 727, 21, 21, 948, 878, 21, 21, 727, 206, +889, 948, 206, 727, 890, 206, 206, 727, 906, 206, 948, 206, 21, 910, 21, +206, 21, 21, 911, 21, 21, 21, 21, 21, 206, 21, 917, 921, 924, 206, +206, 206, 206, 988, 206, 206, 206, 206, 927, 928, 988, 929, 206, 206, 930, +21, 932, 947, 952, 988, 206, 953, 206, 206, 206, 229, 229, 229, 229, 229, +229, 954, 955, 956, 229, 229, 958, 982, 983, 229, 984, 229, 229, 229, 229, +229, 229, 229, 6, 6, 6, 6, 6, 229, 229, 229, 229, 229, 229, 229, +995, 981, 229, 981, 981, 981, 997, 981, 229, 229, 229, 229, 229, 229, 229, +229, 229, 229, 229, 229, 998, 229, 229, 229, 999, 229, 229, 1000, 229, 229, +229, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 1009, 274, 274, +1001, 1002, 274, 274, 1009, 229, 1005, 1010, 229, 1009, 1011, 229, 229, 1009, 1022, +229, nil, 229, 274, nil, 274, 229, 274, 274, nil, 274, 274, 274, 274, 274, +229, 274, nil, nil, nil, 229, 229, 229, 229, nil, 229, 229, 229, 229, nil, +nil, nil, nil, 229, 229, nil, 274, nil, nil, nil, nil, 229, nil, 229, 229, +229, 294, 294, 294, 294, 294, 294, nil, nil, nil, 294, 294, nil, nil, nil, +294, nil, 294, 294, 294, 294, 294, 294, 294, 291, 291, 291, 291, 291, 294, +294, 294, 294, 294, 294, 294, nil, nil, 294, 497, 497, 497, 497, 497, 294, +294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, nil, 294, 294, 294, +nil, 294, 294, nil, 294, 294, 294, 427, 427, 427, 427, 427, 427, 427, 427, +427, 427, 427, nil, 427, 427, nil, nil, 427, 427, nil, 294, nil, nil, 294, +nil, nil, 294, 294, nil, nil, 294, nil, 294, 427, nil, 427, 294, 427, 427, +nil, 427, 427, 427, 427, 427, 294, 427, nil, nil, nil, 294, 294, 294, 294, +nil, 294, 294, 294, 294, nil, nil, nil, nil, 294, 294, nil, 427, nil, nil, +nil, nil, 294, nil, 294, 294, 294, 299, 299, 299, 299, 299, 299, nil, nil, +nil, 299, 299, nil, nil, nil, 299, nil, 299, 299, 299, 299, 299, 299, 299, +nil, nil, nil, nil, nil, 299, 299, 299, 299, 299, 299, 299, nil, nil, 299, +nil, nil, nil, nil, nil, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, +299, 299, nil, 299, 299, 299, nil, 299, 299, nil, 299, 299, 299, 519, 519, +519, 519, 519, 519, 519, 519, 519, 519, 519, nil, 519, 519, nil, nil, 519, +519, nil, 299, nil, nil, 299, nil, nil, 299, 299, nil, nil, 299, nil, 299, +519, nil, 519, 299, 519, 519, nil, 519, 519, 519, 519, 519, 299, 519, nil, +nil, nil, 299, 299, 299, 299, nil, 299, 299, 299, 299, nil, nil, nil, nil, +299, 299, nil, 519, nil, nil, nil, nil, 299, nil, 299, 299, 299, 324, 324, +324, 324, 324, 324, nil, nil, nil, 324, 324, nil, nil, nil, 324, nil, 324, +324, 324, 324, 324, 324, 324, nil, nil, nil, nil, nil, 324, 324, 324, 324, +324, 324, 324, nil, nil, 324, nil, nil, nil, nil, nil, 324, 324, 324, 324, +324, 324, 324, 324, 324, 324, 324, 324, nil, 324, 324, 324, nil, 324, 324, +nil, 324, 324, 324, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, +nil, 644, 644, nil, nil, 644, 644, nil, 324, nil, nil, 324, nil, nil, 324, +324, nil, nil, 324, nil, 324, 644, nil, 644, 324, 644, 644, nil, 644, 644, +644, 644, 644, 324, 644, nil, nil, nil, 324, 324, 324, 324, nil, 324, 324, +324, 324, nil, nil, nil, nil, 324, 324, 644, 644, nil, nil, nil, nil, 324, +nil, 324, 324, 324, 498, 498, 498, 498, 498, 498, nil, nil, nil, 498, 498, +nil, nil, nil, 498, nil, 498, 498, 498, 498, 498, 498, 498, nil, nil, nil, +nil, nil, 498, 498, 498, 498, 498, 498, 498, nil, nil, 498, nil, nil, nil, +nil, nil, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, nil, +498, 498, 498, nil, 498, 498, nil, 498, 498, 498, 678, 678, 678, 678, 678, +678, 678, 678, 678, 678, 678, nil, 678, 678, nil, nil, 678, 678, nil, 498, +nil, nil, 498, nil, nil, 498, 498, nil, nil, 498, nil, 498, 678, nil, 678, +498, 678, 678, nil, 678, 678, 678, 678, 678, 498, 678, nil, nil, nil, 498, +498, 498, 498, nil, 498, 498, 498, 498, nil, nil, nil, nil, 498, 498, nil, +678, nil, nil, nil, nil, 498, nil, 498, 498, 498, 566, 566, 566, 566, 566, +566, nil, nil, nil, 566, 566, nil, nil, nil, 566, nil, 566, 566, 566, 566, +566, 566, 566, nil, nil, nil, nil, nil, 566, 566, 566, 566, 566, 566, 566, +nil, nil, 566, nil, nil, nil, nil, nil, 566, 566, 566, 566, 566, 566, 566, +566, 566, 566, 566, 566, nil, 566, 566, 566, nil, 566, 566, nil, 566, 566, +566, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, nil, 755, 755, +nil, nil, 755, 755, nil, 566, nil, nil, 566, nil, nil, 566, 566, nil, nil, +566, nil, 566, 755, nil, 755, 566, 755, 755, nil, 755, 755, 755, 755, 755, +566, 755, nil, nil, nil, 566, 566, 566, 566, nil, 566, 566, 566, 566, nil, +nil, nil, nil, 566, 566, nil, 755, nil, nil, nil, nil, 566, nil, 566, 566, +566, 569, 569, 569, 569, 569, 569, nil, nil, nil, 569, 569, nil, nil, nil, +569, nil, 569, 569, 569, 569, 569, 569, 569, nil, nil, nil, nil, nil, 569, +569, 569, 569, 569, 569, 569, nil, nil, 569, nil, nil, nil, nil, nil, 569, +569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, nil, 569, 569, 569, +nil, 569, 569, nil, 569, 569, 569, 760, 760, 760, 760, 760, 760, 760, 760, +760, 760, 760, nil, 760, 760, nil, nil, 760, 760, nil, 569, nil, nil, 569, +nil, nil, 569, 569, nil, nil, 569, nil, 569, 760, nil, 760, 569, 760, 760, +nil, 760, 760, 760, 760, 760, 569, 760, nil, nil, nil, 569, 569, 569, 569, +nil, 569, 569, 569, 569, nil, nil, nil, nil, 569, 569, nil, 760, nil, nil, +nil, nil, 569, nil, 569, 569, 569, 591, 591, 591, 591, 591, 591, nil, nil, +nil, 591, 591, nil, nil, nil, 591, nil, 591, 591, 591, 591, 591, 591, 591, +nil, nil, nil, nil, nil, 591, 591, 591, 591, 591, 591, 591, nil, nil, 591, +nil, nil, nil, nil, nil, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, +591, 591, nil, 591, 591, 591, nil, 591, 591, nil, 591, 591, 591, 762, 762, +762, 762, 762, 762, 762, 762, 762, 762, 762, nil, 762, 762, nil, nil, 762, +762, nil, 591, nil, nil, 591, nil, nil, 591, 591, nil, nil, 591, nil, 591, +762, nil, 762, 591, 762, 762, nil, 762, 762, 762, 762, 762, 591, 762, nil, +nil, nil, 591, 591, 591, 591, nil, 591, 591, 591, 591, nil, nil, nil, nil, +591, 591, nil, 762, nil, nil, nil, nil, 591, nil, 591, 591, 591, 648, 648, +648, 648, 648, 648, nil, nil, nil, 648, 648, nil, nil, nil, 648, nil, 648, +648, 648, 648, 648, 648, 648, nil, nil, nil, nil, nil, 648, 648, 648, 648, +648, 648, 648, nil, nil, 648, nil, nil, nil, nil, nil, 648, 648, 648, 648, +648, 648, 648, 648, 648, 648, 648, 648, nil, 648, 648, 648, nil, 648, 648, +nil, 648, 648, 648, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, +nil, 765, 765, nil, nil, 765, 765, nil, 648, nil, nil, 648, nil, nil, 648, +648, nil, nil, 648, nil, 648, 765, nil, 765, 648, 765, 765, nil, 765, 765, +765, 765, 765, 648, 765, nil, nil, nil, 648, 648, 648, 648, nil, 648, 648, +648, 648, nil, nil, nil, nil, 648, 648, nil, 765, nil, nil, nil, nil, 648, +nil, 648, 648, 648, 653, 653, 653, 653, 653, 653, nil, nil, nil, 653, 653, +nil, nil, nil, 653, nil, 653, 653, 653, 653, 653, 653, 653, nil, nil, nil, +nil, nil, 653, 653, 653, 653, 653, 653, 653, nil, nil, 653, nil, nil, nil, +nil, nil, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, nil, +653, 653, 653, nil, 653, 653, nil, 653, 653, 653, 767, 767, 767, 767, 767, +767, 767, 767, 767, 767, 767, nil, 767, 767, nil, nil, 767, 767, nil, 653, +nil, nil, 653, nil, nil, 653, 653, nil, nil, 653, nil, 653, 767, nil, 767, +653, 767, 767, nil, 767, 767, 767, 767, 767, 653, 767, nil, nil, nil, 653, +653, 653, 653, nil, 653, 653, 653, 653, nil, nil, nil, nil, 653, 653, nil, +767, nil, nil, nil, nil, 653, nil, 653, 653, 653, 654, 654, 654, 654, 654, +654, nil, nil, nil, 654, 654, nil, nil, nil, 654, nil, 654, 654, 654, 654, +654, 654, 654, nil, nil, nil, nil, nil, 654, 654, 654, 654, 654, 654, 654, +nil, nil, 654, nil, nil, nil, nil, nil, 654, 654, 654, 654, 654, 654, 654, +654, 654, 654, 654, 654, nil, 654, 654, 654, nil, 654, 654, nil, 654, 654, +654, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, nil, 769, 769, +nil, nil, 769, 769, nil, 654, nil, nil, 654, nil, nil, 654, 654, nil, nil, +654, nil, 654, 769, nil, 769, 654, 769, 769, nil, 769, 769, 769, 769, 769, +654, 769, nil, nil, nil, 654, 654, 654, 654, nil, 654, 654, 654, 654, nil, +nil, nil, nil, 654, 654, nil, 769, nil, nil, nil, nil, 654, nil, 654, 654, +654, 730, 730, 730, 730, 730, 730, nil, nil, nil, 730, 730, nil, nil, nil, +730, nil, 730, 730, 730, 730, 730, 730, 730, nil, nil, nil, nil, nil, 730, +730, 730, 730, 730, 730, 730, nil, nil, 730, nil, nil, nil, nil, nil, 730, +730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, nil, 730, 730, 730, +nil, 730, 730, nil, 730, 730, 730, 858, 858, 858, 858, 858, 858, 858, 858, +858, 858, 858, nil, 858, 858, nil, nil, 858, 858, nil, 730, nil, nil, 730, +nil, nil, 730, 730, nil, nil, 730, nil, 730, 858, nil, 858, 730, 858, 858, +nil, 858, 858, 858, 858, 858, 730, 858, nil, nil, nil, 730, 730, 730, 730, +nil, 730, 730, 730, 730, nil, nil, nil, nil, 730, 730, nil, 858, nil, nil, +nil, nil, 730, nil, 730, 730, 730, 735, 735, 735, 735, 735, 735, nil, nil, +nil, 735, 735, nil, nil, nil, 735, nil, 735, 735, 735, 735, 735, 735, 735, +nil, nil, nil, nil, nil, 735, 735, 735, 735, 735, 735, 735, nil, nil, 735, +nil, nil, nil, nil, nil, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, +735, 735, nil, 735, 735, 735, nil, 735, 735, nil, 735, 735, 735, 969, 969, +969, 969, 969, 969, 969, 969, 969, 969, 969, nil, 969, 969, nil, nil, 969, +969, nil, 735, nil, nil, 735, nil, nil, 735, 735, nil, nil, 735, nil, 735, +969, nil, 969, 735, 969, 969, nil, 969, 969, 969, 969, 969, 735, 969, nil, +nil, nil, 735, 735, 735, 735, nil, 735, 735, 735, 735, nil, nil, nil, nil, +735, 735, nil, 969, nil, nil, nil, nil, 735, nil, 735, 735, 735, 745, 745, +745, 745, 745, 745, nil, nil, nil, 745, 745, nil, nil, nil, 745, nil, 745, +745, 745, 745, 745, 745, 745, nil, nil, nil, nil, nil, 745, 745, 745, 745, +745, 745, 745, nil, nil, 745, nil, nil, nil, nil, nil, 745, 745, 745, 745, +745, 745, 745, 745, 745, 745, 745, 745, nil, 745, 745, 745, nil, 745, 745, +nil, 745, 745, 745, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, +nil, 447, 447, nil, nil, 447, 447, nil, 745, nil, nil, 745, nil, nil, 745, +745, nil, nil, 745, nil, 745, 447, nil, 447, 745, 447, 447, nil, 447, 447, +447, 447, 447, 745, 447, nil, nil, nil, 745, 745, 745, 745, nil, 745, 745, +745, 745, nil, nil, nil, nil, 745, 745, nil, nil, nil, nil, nil, nil, 745, +nil, 745, 745, 745, 793, 793, 793, 793, 793, 793, nil, nil, nil, 793, 793, +nil, nil, nil, 793, nil, 793, 793, 793, 793, 793, 793, 793, nil, nil, nil, +nil, nil, 793, 793, 793, 793, 793, 793, 793, nil, nil, 793, nil, nil, nil, +nil, nil, 793, 793, 793, 793, 793, 793, 793, 793, 793, 793, 793, 793, nil, +793, 793, 793, nil, 793, 793, nil, 793, 793, 793, 448, 448, 448, 448, 448, +448, 448, 448, 448, 448, 448, nil, 448, 448, nil, nil, 448, 448, nil, 793, +nil, nil, 793, nil, nil, 793, 793, nil, nil, 793, nil, 793, 448, nil, 448, +793, 448, 448, nil, 448, 448, 448, 448, 448, 793, 448, nil, nil, nil, 793, +793, 793, 793, nil, 793, 793, 793, 793, nil, nil, nil, nil, 793, 793, nil, +nil, nil, nil, nil, nil, 793, nil, 793, 793, 793, 806, 806, 806, 806, 806, +806, nil, nil, nil, 806, 806, nil, nil, nil, 806, nil, 806, 806, 806, 806, +806, 806, 806, nil, nil, nil, nil, nil, 806, 806, 806, 806, 806, 806, 806, +nil, 905, 806, 905, 905, 905, nil, 905, 806, 806, 806, 806, 806, 806, 806, +806, 806, 806, 806, 806, nil, 806, 806, 806, nil, 806, 806, nil, 806, 806, +806, 458, 458, 458, 458, 458, 458, 458, nil, 905, 458, 458, nil, nil, nil, +nil, nil, 458, 458, nil, 806, nil, nil, 806, nil, nil, 806, 806, nil, nil, +806, nil, 806, 458, nil, 458, 806, 458, 458, nil, 458, 458, 458, 458, 458, +806, 458, nil, nil, nil, 806, 806, 806, 806, nil, 806, 806, 806, 806, nil, +nil, nil, nil, 806, 806, nil, nil, nil, nil, nil, nil, 806, nil, 806, 806, +806, 814, 814, 814, 814, 814, 814, nil, nil, nil, 814, 814, nil, nil, nil, +814, nil, 814, 814, 814, 814, 814, 814, 814, nil, nil, nil, nil, nil, 814, +814, 814, 814, 814, 814, 814, nil, 957, 814, 957, 957, 957, nil, 957, 814, +814, 814, 814, 814, 814, 814, 814, 814, 814, 814, 814, nil, 814, 814, 814, +nil, 814, 814, nil, 814, 814, 814, 459, nil, nil, 959, nil, 959, 959, 959, +957, 959, nil, nil, nil, nil, nil, nil, 459, 459, nil, 814, nil, nil, 814, +nil, nil, 814, 814, nil, nil, 814, nil, 814, 459, nil, 459, 814, 459, 459, +nil, 459, 459, 959, nil, 459, 814, 459, nil, nil, nil, 814, 814, 814, 814, +nil, 814, 814, 814, 814, nil, nil, nil, nil, 814, 814, nil, nil, nil, nil, +nil, nil, 814, nil, 814, 814, 814, 815, 815, 815, 815, 815, 815, nil, nil, +nil, 815, 815, nil, nil, nil, 815, nil, 815, 815, 815, 815, 815, 815, 815, +nil, nil, nil, nil, nil, 815, 815, 815, 815, 815, 815, 815, nil, 994, 815, +994, 994, 994, nil, 994, 815, 815, 815, 815, 815, 815, 815, 815, 815, 815, +815, 815, nil, 815, 815, 815, nil, 815, 815, nil, 815, 815, 815, 460, nil, +nil, nil, nil, nil, nil, nil, 994, nil, nil, nil, nil, nil, nil, nil, 460, +460, nil, 815, nil, nil, 815, nil, nil, 815, 815, nil, nil, 815, nil, 815, +460, nil, 460, 815, 460, 460, nil, 460, 460, nil, nil, 460, 815, 460, nil, +nil, nil, 815, 815, 815, 815, nil, 815, 815, 815, 815, nil, nil, nil, nil, +815, 815, nil, nil, nil, nil, nil, nil, 815, nil, 815, 815, 815, 839, 839, +839, 839, 839, 839, nil, nil, nil, 839, 839, nil, nil, nil, 839, nil, 839, +839, 839, 839, 839, 839, 839, nil, nil, nil, nil, nil, 839, 839, 839, 839, +839, 839, 839, nil, nil, 839, nil, nil, nil, nil, nil, 839, 839, 839, 839, +839, 839, 839, 839, 839, 839, 839, 839, nil, 839, 839, 839, nil, 839, 839, +nil, 839, 839, 839, 461, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 461, 461, nil, 839, nil, nil, 839, nil, nil, 839, +839, nil, nil, 839, nil, 839, 461, nil, 461, 839, 461, 461, nil, 461, 461, +nil, nil, 461, 839, 461, nil, nil, nil, 839, 839, 839, 839, nil, 839, 839, +839, 839, nil, nil, nil, nil, 839, 839, nil, nil, nil, nil, nil, nil, 839, +nil, 839, 839, 839, 840, 840, 840, 840, 840, 840, nil, nil, nil, 840, 840, +nil, nil, nil, 840, nil, 840, 840, 840, 840, 840, 840, 840, nil, nil, nil, +nil, nil, 840, 840, 840, 840, 840, 840, 840, nil, nil, 840, nil, nil, nil, +nil, nil, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, nil, +840, 840, 840, nil, 840, 840, nil, 840, 840, 840, 462, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 462, 462, nil, 840, +nil, nil, 840, nil, nil, 840, 840, nil, nil, 840, nil, 840, 462, nil, 462, +840, 462, 462, nil, 462, 462, nil, nil, 462, 840, 462, nil, nil, nil, 840, +840, 840, 840, nil, 840, 840, 840, 840, nil, nil, nil, nil, 840, 840, nil, +nil, nil, nil, nil, nil, 840, nil, 840, 840, 840, 843, 843, 843, 843, 843, +843, nil, nil, nil, 843, 843, nil, nil, nil, 843, nil, 843, 843, 843, 843, +843, 843, 843, nil, nil, nil, nil, nil, 843, 843, 843, 843, 843, 843, 843, +nil, nil, 843, nil, nil, nil, nil, nil, 843, 843, 843, 843, 843, 843, 843, +843, 843, 843, 843, 843, nil, 843, 843, 843, nil, 843, 843, nil, 843, 843, +843, 463, 463, 463, 463, 463, 463, 463, nil, nil, 463, 463, nil, nil, nil, +nil, nil, 463, 463, nil, 843, nil, nil, 843, nil, nil, 843, 843, nil, nil, +843, nil, 843, 463, nil, 463, 843, 463, 463, nil, 463, 463, 463, 463, 463, +843, 463, nil, nil, nil, 843, 843, 843, 843, nil, 843, 843, 843, 843, nil, +nil, nil, nil, 843, 843, nil, nil, nil, nil, nil, nil, 843, nil, 843, 843, +843, 849, 849, 849, 849, 849, 849, nil, nil, nil, 849, 849, nil, nil, nil, +849, nil, 849, 849, 849, 849, 849, 849, 849, nil, nil, nil, nil, nil, 849, +849, 849, 849, 849, 849, 849, nil, nil, 849, nil, nil, nil, nil, nil, 849, +849, 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, nil, 849, 849, 849, +nil, 849, 849, nil, 849, 849, 849, 464, 464, 464, 464, 464, 464, 464, nil, +nil, 464, 464, nil, nil, nil, nil, nil, 464, 464, nil, 849, nil, nil, 849, +nil, nil, 849, 849, nil, nil, 849, nil, 849, 464, nil, 464, 849, 464, 464, +nil, 464, 464, 464, 464, 464, 849, 464, nil, nil, nil, 849, 849, 849, 849, +nil, 849, 849, 849, 849, nil, nil, nil, nil, 849, 849, nil, nil, nil, nil, +nil, nil, 849, nil, 849, 849, 849, 882, 882, 882, 882, 882, 882, nil, nil, +nil, 882, 882, nil, nil, nil, 882, nil, 882, 882, 882, 882, 882, 882, 882, +nil, nil, nil, nil, nil, 882, 882, 882, 882, 882, 882, 882, nil, nil, 882, +nil, nil, nil, nil, nil, 882, 882, 882, 882, 882, 882, 882, 882, 882, 882, +882, 882, nil, 882, 882, 882, nil, 882, 882, nil, 882, 882, 882, 465, 465, +465, 465, 465, 465, 465, nil, nil, 465, 465, nil, nil, nil, nil, nil, 465, +465, nil, 882, nil, nil, 882, nil, nil, 882, 882, nil, nil, 882, nil, 882, +465, nil, 465, 882, 465, 465, nil, 465, 465, 465, 465, 465, 882, 465, nil, +nil, nil, 882, 882, 882, 882, nil, 882, 882, 882, 882, nil, nil, nil, nil, +882, 882, nil, nil, nil, nil, nil, nil, 882, nil, 882, 882, 882, 943, 943, +943, 943, 943, 943, nil, nil, nil, 943, 943, nil, nil, nil, 943, nil, 943, +943, 943, 943, 943, 943, 943, nil, nil, nil, nil, nil, 943, 943, 943, 943, +943, 943, 943, nil, nil, 943, nil, nil, nil, nil, nil, 943, 943, 943, 943, +943, 943, 943, 943, 943, 943, 943, 943, nil, 943, 943, 943, nil, 943, 943, +nil, 943, 943, 943, 466, 466, 466, 466, 466, 466, 466, nil, nil, 466, 466, +nil, nil, nil, nil, nil, 466, 466, nil, 943, nil, nil, 943, nil, nil, 943, +943, nil, nil, 943, nil, 943, 466, nil, 466, 943, 466, 466, nil, 466, 466, +466, 466, 466, 943, 466, nil, nil, nil, 943, 943, 943, 943, nil, 943, 943, +943, 943, nil, nil, nil, nil, 943, 943, nil, nil, nil, nil, nil, nil, 943, +nil, 943, 943, 943, 960, 960, 960, 960, 960, 960, nil, nil, nil, 960, 960, +nil, nil, nil, 960, nil, 960, 960, 960, 960, 960, 960, 960, nil, nil, nil, +nil, nil, 960, 960, 960, 960, 960, 960, 960, nil, nil, 960, nil, nil, nil, +nil, nil, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, 960, nil, +960, 960, 960, nil, 960, 960, nil, 960, 960, 960, 467, 467, 467, 467, 467, +467, 467, nil, nil, 467, 467, nil, nil, nil, nil, nil, 467, 467, nil, 960, +nil, nil, 960, nil, nil, 960, 960, nil, nil, 960, nil, 960, 467, nil, 467, +960, 467, 467, nil, 467, 467, 467, 467, 467, 960, 467, nil, nil, nil, 960, +960, 960, 960, nil, 960, 960, 960, 960, nil, nil, nil, nil, 960, 960, nil, +nil, nil, nil, nil, nil, 960, nil, 960, 960, 960, 966, 966, 966, 966, 966, +966, nil, nil, nil, 966, 966, nil, nil, nil, 966, nil, 966, 966, 966, 966, +966, 966, 966, nil, nil, nil, nil, nil, 966, 966, 966, 966, 966, 966, 966, +nil, nil, 966, nil, nil, nil, nil, nil, 966, 966, 966, 966, 966, 966, 966, +966, 966, 966, 966, 966, nil, 966, 966, 966, nil, 966, 966, nil, 966, 966, +966, 470, 470, 470, 470, 470, 470, 470, nil, nil, 470, 470, nil, nil, nil, +nil, nil, 470, 470, nil, 966, nil, nil, 966, nil, nil, 966, 966, nil, nil, +966, nil, 966, 470, nil, 470, 966, 470, 470, nil, 470, 470, 470, 470, 470, +966, 470, nil, nil, nil, 966, 966, 966, 966, nil, 966, 966, 966, 966, nil, +nil, nil, nil, 966, 966, nil, nil, nil, nil, nil, nil, 966, nil, 966, 966, +966, 968, 968, 968, 968, 968, 968, nil, nil, nil, 968, 968, nil, nil, nil, +968, nil, 968, 968, 968, 968, 968, 968, 968, nil, nil, nil, nil, nil, 968, +968, 968, 968, 968, 968, 968, nil, nil, 968, nil, nil, nil, nil, nil, 968, +968, 968, 968, 968, 968, 968, 968, 968, 968, 968, 968, nil, 968, 968, 968, +nil, 968, 968, nil, 968, 968, 968, 471, 471, 471, 471, 471, 471, 471, 471, +nil, 471, 471, nil, nil, nil, nil, nil, 471, 471, nil, 968, nil, nil, 968, +nil, nil, 968, 968, nil, nil, 968, nil, 968, 471, nil, 471, 968, 471, 471, +nil, 471, 471, 471, 471, 471, 968, 471, nil, nil, nil, 968, 968, 968, 968, +nil, 968, 968, 968, 968, nil, nil, nil, nil, 968, 968, nil, nil, nil, nil, +nil, nil, 968, nil, 968, 968, 968, 5, 5, 5, 5, 5, nil, nil, nil, +5, 5, nil, nil, nil, 5, nil, 5, 5, 5, 5, 5, 5, 5, nil, +nil, nil, nil, nil, 5, 5, 5, 5, 5, 5, 5, nil, nil, 5, nil, +nil, nil, nil, nil, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, +5, nil, 5, 5, 5, nil, 5, 5, nil, 5, 5, 5, 455, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 455, 455, +nil, 5, nil, nil, 5, nil, nil, 5, 5, nil, nil, 5, nil, 5, 455, +nil, 455, 5, 455, 455, nil, 455, 455, nil, nil, nil, 5, nil, nil, nil, +nil, 5, 5, 5, 5, nil, 5, 5, 5, 5, nil, nil, nil, nil, 5, +5, nil, nil, nil, 20, 20, 20, 5, 20, 5, 5, 5, 20, 20, nil, +nil, nil, 20, nil, 20, 20, 20, 20, 20, 20, 20, nil, nil, nil, nil, +nil, 20, 20, 20, 20, 20, 20, 20, nil, nil, 20, nil, nil, nil, nil, +nil, nil, 20, nil, nil, 20, 20, 20, 20, 20, 20, 20, 20, nil, 20, +20, 20, nil, 20, 20, nil, 20, 20, 20, 456, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 456, 456, nil, 20, nil, +nil, 20, nil, nil, 20, 20, nil, nil, 20, nil, nil, 456, nil, 456, 20, +456, 456, nil, 456, 456, nil, nil, nil, 20, nil, nil, nil, nil, 20, 20, +20, 20, nil, 20, 20, 20, 20, nil, nil, nil, nil, 20, 20, nil, nil, +nil, 29, 29, 29, 20, 29, 20, 20, 20, 29, 29, nil, nil, nil, 29, +nil, 29, 29, 29, 29, 29, 29, 29, nil, nil, nil, nil, nil, 29, 29, +29, 29, 29, 29, 29, nil, nil, 29, nil, nil, nil, nil, nil, nil, 29, +nil, nil, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, nil, +29, 29, nil, 29, 29, 29, 457, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 457, 457, nil, 29, nil, nil, 29, nil, +nil, 29, 29, nil, nil, 29, nil, 29, 457, 29, nil, 29, 457, 457, 29, +457, 457, nil, nil, nil, 29, nil, nil, nil, nil, 29, 29, 29, 29, nil, +29, 29, 29, 29, nil, nil, nil, nil, 29, 29, nil, nil, nil, 30, 30, +30, 29, 30, 29, 29, 29, 30, 30, nil, nil, nil, 30, nil, 30, 30, +30, 30, 30, 30, 30, nil, nil, nil, nil, nil, 30, 30, 30, 30, 30, +30, 30, nil, nil, 30, nil, nil, nil, nil, nil, nil, 30, nil, nil, 30, +30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, nil, 30, 30, nil, +30, 30, 30, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 30, nil, nil, 30, nil, nil, 30, 30, +nil, nil, 30, nil, 30, nil, 30, nil, 30, nil, nil, 30, nil, nil, nil, +nil, nil, 30, nil, nil, nil, nil, 30, 30, 30, 30, nil, 30, 30, 30, +30, nil, nil, nil, nil, 30, 30, nil, nil, nil, 31, 31, 31, 30, 31, +30, 30, 30, 31, 31, nil, nil, nil, 31, nil, 31, 31, 31, 31, 31, +31, 31, nil, nil, nil, nil, nil, 31, 31, 31, 31, 31, 31, 31, nil, +nil, 31, nil, nil, nil, nil, nil, nil, 31, nil, nil, 31, 31, 31, 31, +31, 31, 31, 31, 31, 31, 31, 31, nil, 31, 31, nil, 31, 31, 31, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 31, nil, nil, 31, nil, nil, 31, 31, nil, nil, 31, +nil, 31, nil, 31, nil, 31, nil, nil, 31, nil, nil, nil, nil, nil, 31, +nil, nil, nil, nil, 31, 31, 31, 31, nil, 31, 31, 31, 31, nil, nil, +nil, nil, 31, 31, nil, nil, nil, 34, 34, 34, 31, 34, 31, 31, 31, +34, 34, nil, nil, nil, 34, nil, 34, 34, 34, 34, 34, 34, 34, nil, +nil, nil, nil, nil, 34, 34, 34, 34, 34, 34, 34, nil, nil, 34, nil, +nil, nil, nil, nil, nil, 34, nil, nil, 34, 34, 34, 34, 34, 34, 34, +34, nil, 34, 34, 34, nil, 34, 34, nil, nil, nil, 34, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 34, nil, nil, 34, nil, nil, 34, 34, nil, nil, 34, nil, 34, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 34, 34, 34, 34, nil, 34, 34, 34, 34, nil, nil, nil, nil, 34, +34, nil, nil, nil, 35, 35, 35, 34, 35, 34, 34, 34, 35, 35, nil, +nil, nil, 35, nil, 35, 35, 35, 35, 35, 35, 35, nil, nil, nil, nil, +nil, 35, 35, 35, 35, 35, 35, 35, nil, nil, 35, nil, nil, nil, nil, +nil, nil, 35, nil, nil, 35, 35, 35, 35, 35, 35, 35, 35, nil, 35, +35, 35, nil, 35, 35, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, +nil, 35, nil, nil, 35, 35, nil, nil, 35, nil, 697, nil, 697, 697, 697, +697, 697, nil, nil, nil, nil, nil, nil, nil, nil, nil, 697, nil, 35, 35, +35, 35, nil, 35, 35, 35, 35, nil, nil, nil, nil, 35, 35, nil, nil, +nil, 35, nil, 697, 35, nil, 35, 35, 35, 42, 42, 42, nil, 42, 697, +697, nil, 42, 42, 697, nil, nil, 42, nil, 42, 42, 42, 42, 42, 42, +42, nil, nil, nil, nil, nil, 42, 42, 42, 42, 42, 42, 42, nil, nil, +42, nil, nil, nil, nil, nil, nil, 42, nil, nil, 42, 42, 42, 42, 42, +42, 42, 42, nil, 42, 42, 42, nil, 42, 42, nil, 42, 42, 42, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 42, nil, nil, 42, nil, nil, 42, 42, nil, nil, 42, nil, +nil, nil, nil, nil, 42, nil, nil, nil, nil, nil, nil, nil, nil, 42, nil, +nil, nil, nil, 42, 42, 42, 42, nil, 42, 42, 42, 42, nil, nil, nil, +nil, 42, 42, nil, nil, nil, 43, 43, 43, 42, 43, 42, 42, 42, 43, +43, nil, nil, nil, 43, nil, 43, 43, 43, 43, 43, 43, 43, nil, nil, +nil, nil, nil, 43, 43, 43, 43, 43, 43, 43, nil, nil, 43, nil, nil, +nil, nil, nil, nil, 43, nil, nil, 43, 43, 43, 43, 43, 43, 43, 43, +nil, 43, 43, 43, nil, 43, 43, nil, 43, 43, 43, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +43, nil, nil, 43, nil, nil, 43, 43, nil, nil, 43, nil, nil, nil, nil, +nil, 43, nil, nil, nil, nil, nil, nil, nil, nil, 43, nil, nil, nil, nil, +43, 43, 43, 43, nil, 43, 43, 43, 43, nil, nil, nil, nil, 43, 43, +nil, nil, nil, 44, 44, 44, 43, 44, 43, 43, 43, 44, 44, nil, nil, +nil, 44, nil, 44, 44, 44, 44, 44, 44, 44, nil, nil, nil, nil, nil, +44, 44, 44, 44, 44, 44, 44, nil, nil, 44, nil, nil, nil, nil, nil, +nil, 44, nil, nil, 44, 44, 44, 44, 44, 44, 44, 44, nil, 44, 44, +44, nil, 44, 44, nil, 44, 44, 44, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, nil, nil, +44, nil, nil, 44, 44, nil, nil, 44, nil, nil, nil, nil, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, 44, 44, 44, +44, nil, 44, 44, 44, 44, nil, nil, nil, nil, 44, 44, nil, nil, nil, +59, 59, 59, 44, 59, 44, 44, 44, 59, 59, nil, nil, nil, 59, nil, +59, 59, 59, 59, 59, 59, 59, nil, nil, nil, nil, nil, 59, 59, 59, +59, 59, 59, 59, nil, nil, 59, nil, nil, nil, nil, nil, nil, 59, nil, +nil, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, nil, 59, +59, nil, 59, 59, 59, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 59, nil, nil, 59, nil, nil, +59, 59, nil, nil, 59, nil, 59, nil, nil, nil, 59, nil, nil, 59, nil, +nil, nil, nil, nil, 59, nil, nil, nil, nil, 59, 59, 59, 59, nil, 59, +59, 59, 59, nil, nil, nil, nil, 59, 59, nil, nil, nil, 60, 60, 60, +59, 60, 59, 59, 59, 60, 60, nil, nil, nil, 60, nil, 60, 60, 60, +60, 60, 60, 60, nil, nil, nil, nil, nil, 60, 60, 60, 60, 60, 60, +60, nil, nil, 60, nil, nil, nil, nil, nil, nil, 60, nil, nil, 60, 60, +60, 60, 60, 60, 60, 60, 60, 60, 60, 60, nil, 60, 60, nil, 60, +60, 60, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 60, nil, nil, 60, nil, nil, 60, 60, nil, +nil, 60, nil, nil, nil, nil, nil, 60, nil, nil, 60, nil, nil, nil, nil, +nil, 60, nil, nil, nil, nil, 60, 60, 60, 60, nil, 60, 60, 60, 60, +nil, nil, nil, nil, 60, 60, nil, nil, nil, 63, 63, 63, 60, 63, 60, +60, 60, 63, 63, nil, nil, nil, 63, nil, 63, 63, 63, 63, 63, 63, +63, nil, nil, nil, nil, nil, 63, 63, 63, 63, 63, 63, 63, nil, nil, +63, nil, nil, nil, nil, nil, nil, 63, nil, nil, 63, 63, 63, 63, 63, +63, 63, 63, nil, 63, 63, 63, nil, 63, 63, nil, 63, 63, 63, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 63, nil, nil, 63, nil, nil, 63, 63, nil, nil, 63, nil, +nil, nil, nil, nil, 63, nil, nil, nil, nil, nil, nil, nil, nil, 63, nil, +nil, nil, nil, 63, 63, 63, 63, nil, 63, 63, 63, 63, nil, nil, nil, +nil, 63, 63, nil, nil, nil, 64, 64, 64, 63, 64, 63, 63, 63, 64, +64, nil, nil, nil, 64, nil, 64, 64, 64, 64, 64, 64, 64, nil, nil, +nil, nil, nil, 64, 64, 64, 64, 64, 64, 64, nil, nil, 64, nil, nil, +nil, nil, nil, nil, 64, nil, nil, 64, 64, 64, 64, 64, 64, 64, 64, +nil, 64, 64, 64, nil, 64, 64, nil, 64, 64, 64, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +64, nil, nil, 64, nil, nil, 64, 64, nil, nil, 64, nil, nil, nil, nil, +nil, 64, nil, nil, nil, nil, nil, nil, nil, nil, 64, nil, nil, nil, nil, +64, 64, 64, 64, nil, 64, 64, 64, 64, nil, nil, nil, nil, 64, 64, +nil, nil, nil, 67, 67, 67, 64, 67, 64, 64, 64, 67, 67, nil, nil, +nil, 67, nil, 67, 67, 67, 67, 67, 67, 67, nil, nil, nil, nil, nil, +67, 67, 67, 67, 67, 67, 67, nil, nil, 67, nil, nil, nil, nil, nil, +nil, 67, nil, nil, 67, 67, 67, 67, 67, 67, 67, 67, nil, 67, 67, +67, nil, 67, 67, nil, 67, 67, 67, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 67, nil, nil, +67, nil, nil, 67, 67, nil, nil, 67, nil, nil, nil, nil, nil, 67, nil, +nil, nil, nil, nil, nil, nil, nil, 67, nil, nil, nil, nil, 67, 67, 67, +67, nil, 67, 67, 67, 67, nil, nil, nil, nil, 67, 67, 67, nil, nil, +nil, nil, 67, 67, nil, 67, 67, 67, 68, 68, 68, nil, 68, nil, nil, +nil, 68, 68, nil, nil, nil, 68, nil, 68, 68, 68, 68, 68, 68, 68, +nil, nil, nil, nil, nil, 68, 68, 68, 68, 68, 68, 68, nil, nil, 68, +nil, nil, nil, nil, nil, nil, 68, nil, nil, 68, 68, 68, 68, 68, 68, +68, 68, nil, 68, 68, 68, nil, 68, 68, nil, nil, nil, 68, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 68, nil, nil, 68, nil, nil, 68, 68, nil, nil, 68, nil, 68, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 68, 68, 68, 68, nil, 68, 68, 68, 68, nil, nil, nil, nil, +68, 68, nil, nil, nil, 69, 69, 69, 68, 69, 68, 68, 68, 69, 69, +nil, nil, nil, 69, nil, 69, 69, 69, 69, 69, 69, 69, nil, nil, nil, +nil, nil, 69, 69, 69, 69, 69, 69, 69, nil, nil, 69, nil, nil, nil, +nil, nil, nil, 69, nil, nil, 69, 69, 69, 69, 69, 69, 69, 69, nil, +69, 69, 69, nil, 69, 69, nil, nil, nil, 69, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 69, nil, nil, 69, +nil, nil, 69, nil, nil, 69, 69, nil, nil, 69, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 69, +69, 69, 69, nil, 69, 69, 69, 69, nil, nil, nil, nil, 69, 69, nil, +nil, nil, 70, 70, 70, 69, 70, 69, 69, 69, 70, 70, nil, nil, nil, +70, nil, 70, 70, 70, 70, 70, 70, 70, nil, nil, nil, nil, nil, 70, +70, 70, 70, 70, 70, 70, nil, nil, 70, nil, nil, nil, nil, nil, nil, +70, nil, nil, 70, 70, 70, 70, 70, 70, 70, 70, nil, 70, 70, 70, +nil, 70, 70, nil, nil, nil, 70, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 70, nil, nil, 70, +nil, nil, 70, 70, nil, nil, 70, nil, 869, nil, 869, 869, 869, 869, 869, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 869, nil, 70, 70, 70, 70, +nil, 70, 70, 70, 70, nil, nil, nil, nil, 70, 70, nil, nil, nil, nil, +nil, 869, 70, nil, 70, 70, 70, 111, 111, 111, 111, 111, 869, 869, nil, +111, 111, 869, nil, nil, 111, nil, 111, 111, 111, 111, 111, 111, 111, nil, +nil, nil, nil, nil, 111, 111, 111, 111, 111, 111, 111, nil, nil, 111, nil, +nil, nil, nil, nil, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, +111, nil, 111, 111, 111, nil, 111, 111, nil, 111, 111, 111, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 111, nil, nil, 111, nil, nil, 111, 111, nil, nil, 111, nil, 111, nil, +nil, nil, 111, nil, nil, nil, nil, nil, nil, nil, nil, 111, nil, nil, nil, +nil, 111, 111, 111, 111, nil, 111, 111, 111, 111, nil, nil, nil, nil, 111, +111, nil, nil, nil, nil, nil, 111, 111, nil, 111, 111, 111, 116, 116, 116, +nil, 116, nil, nil, nil, 116, 116, nil, nil, nil, 116, nil, 116, 116, 116, +116, 116, 116, 116, nil, nil, nil, nil, nil, 116, 116, 116, 116, 116, 116, +116, nil, nil, 116, nil, nil, nil, nil, nil, nil, 116, nil, nil, 116, 116, +116, 116, 116, 116, 116, 116, nil, 116, 116, 116, nil, 116, 116, nil, 116, +116, 116, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 116, nil, nil, 116, nil, nil, 116, 116, nil, +nil, 116, nil, nil, nil, nil, nil, 116, nil, nil, nil, nil, nil, nil, nil, +nil, 116, nil, nil, nil, nil, 116, 116, 116, 116, nil, 116, 116, 116, 116, +nil, nil, nil, nil, 116, 116, nil, nil, nil, 117, 117, 117, 116, 117, 116, +116, 116, 117, 117, nil, nil, nil, 117, nil, 117, 117, 117, 117, 117, 117, +117, nil, nil, nil, nil, nil, 117, 117, 117, 117, 117, 117, 117, nil, nil, +117, nil, nil, nil, nil, nil, nil, 117, nil, nil, 117, 117, 117, 117, 117, +117, 117, 117, nil, 117, 117, 117, nil, 117, 117, nil, 117, 117, 117, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 117, nil, nil, 117, nil, nil, 117, 117, nil, nil, 117, nil, +nil, nil, nil, nil, 117, nil, nil, nil, nil, nil, nil, nil, nil, 117, nil, +nil, nil, nil, 117, 117, 117, 117, nil, 117, 117, 117, 117, nil, nil, nil, +nil, 117, 117, nil, nil, nil, 118, 118, 118, 117, 118, 117, 117, 117, 118, +118, nil, nil, nil, 118, nil, 118, 118, 118, 118, 118, 118, 118, nil, nil, +nil, nil, nil, 118, 118, 118, 118, 118, 118, 118, nil, nil, 118, nil, nil, +nil, nil, nil, nil, 118, nil, nil, 118, 118, 118, 118, 118, 118, 118, 118, +nil, 118, 118, 118, nil, 118, 118, nil, 118, 118, 118, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +118, nil, nil, 118, nil, nil, 118, 118, nil, nil, 118, nil, nil, nil, nil, +nil, 118, nil, nil, nil, nil, nil, nil, nil, nil, 118, nil, nil, nil, nil, +118, 118, 118, 118, nil, 118, 118, 118, 118, nil, nil, nil, nil, 118, 118, +nil, nil, nil, 119, 119, 119, 118, 119, 118, 118, 118, 119, 119, nil, nil, +nil, 119, nil, 119, 119, 119, 119, 119, 119, 119, nil, nil, nil, nil, nil, +119, 119, 119, 119, 119, 119, 119, nil, nil, 119, nil, nil, nil, nil, nil, +nil, 119, nil, nil, 119, 119, 119, 119, 119, 119, 119, 119, nil, 119, 119, +119, nil, 119, 119, nil, 119, 119, 119, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 119, nil, nil, +119, nil, nil, 119, 119, nil, nil, 119, nil, nil, nil, nil, nil, 119, nil, +nil, nil, nil, nil, nil, nil, nil, 119, nil, nil, nil, nil, 119, 119, 119, +119, nil, 119, 119, 119, 119, nil, nil, nil, nil, 119, 119, nil, nil, nil, +nil, nil, nil, 119, nil, 119, 119, 119, 120, 120, 120, 120, 120, nil, nil, +nil, 120, 120, nil, nil, nil, 120, nil, 120, 120, 120, 120, 120, 120, 120, +nil, nil, nil, nil, nil, 120, 120, 120, 120, 120, 120, 120, nil, nil, 120, +nil, nil, nil, nil, nil, 120, 120, nil, 120, 120, 120, 120, 120, 120, 120, +120, 120, nil, 120, 120, 120, nil, 120, 120, nil, 120, 120, 120, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 120, nil, nil, 120, nil, nil, 120, 120, nil, nil, 120, nil, 120, +nil, nil, nil, 120, nil, nil, nil, nil, nil, nil, nil, nil, 120, nil, nil, +nil, nil, 120, 120, 120, 120, nil, 120, 120, 120, 120, nil, nil, nil, nil, +120, 120, nil, nil, nil, 207, 207, 207, 120, 207, 120, 120, 120, 207, 207, +nil, nil, nil, 207, nil, 207, 207, 207, 207, 207, 207, 207, nil, nil, nil, +nil, nil, 207, 207, 207, 207, 207, 207, 207, nil, nil, 207, nil, nil, nil, +nil, nil, nil, 207, nil, nil, 207, 207, 207, 207, 207, 207, 207, 207, nil, +207, 207, 207, nil, 207, 207, nil, 207, 207, 207, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 207, +nil, nil, 207, nil, nil, 207, 207, nil, nil, 207, nil, 207, nil, nil, nil, +207, nil, nil, nil, nil, nil, nil, nil, nil, 207, nil, nil, nil, nil, 207, +207, 207, 207, nil, 207, 207, 207, 207, nil, nil, nil, nil, 207, 207, nil, +nil, nil, 208, 208, 208, 207, 208, 207, 207, 207, 208, 208, nil, nil, nil, +208, nil, 208, 208, 208, 208, 208, 208, 208, nil, nil, nil, nil, nil, 208, +208, 208, 208, 208, 208, 208, nil, nil, 208, nil, nil, nil, nil, nil, nil, +208, nil, nil, 208, 208, 208, 208, 208, 208, 208, 208, nil, 208, 208, 208, +nil, 208, 208, nil, 208, 208, 208, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 208, nil, nil, 208, +nil, nil, 208, 208, nil, nil, 208, nil, nil, nil, nil, nil, 208, nil, nil, +nil, nil, nil, nil, nil, nil, 208, nil, nil, nil, nil, 208, 208, 208, 208, +nil, 208, 208, 208, 208, nil, nil, nil, nil, 208, 208, nil, nil, nil, 209, +209, 209, 208, 209, 208, 208, 208, 209, 209, nil, nil, nil, 209, nil, 209, +209, 209, 209, 209, 209, 209, nil, nil, nil, nil, nil, 209, 209, 209, 209, +209, 209, 209, nil, nil, 209, nil, nil, nil, nil, nil, nil, 209, nil, nil, +209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, nil, 209, 209, +nil, 209, 209, 209, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 209, nil, nil, 209, nil, nil, 209, +209, nil, nil, 209, nil, 209, nil, 209, nil, 209, nil, nil, 209, nil, nil, +nil, nil, nil, 209, nil, nil, nil, nil, 209, 209, 209, 209, nil, 209, 209, +209, 209, nil, nil, nil, nil, 209, 209, nil, nil, nil, 212, 212, 212, 209, +212, 209, 209, 209, 212, 212, nil, nil, nil, 212, nil, 212, 212, 212, 212, +212, 212, 212, nil, nil, nil, nil, nil, 212, 212, 212, 212, 212, 212, 212, +nil, nil, 212, nil, nil, nil, nil, nil, nil, 212, nil, nil, 212, 212, 212, +212, 212, 212, 212, 212, nil, 212, 212, 212, nil, 212, 212, nil, 212, 212, +212, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 212, nil, nil, 212, nil, nil, 212, 212, nil, nil, +212, nil, nil, nil, nil, nil, 212, nil, nil, nil, nil, nil, nil, nil, nil, +212, nil, nil, nil, nil, 212, 212, 212, 212, nil, 212, 212, 212, 212, nil, +nil, nil, nil, 212, 212, nil, nil, nil, 213, 213, 213, 212, 213, 212, 212, +212, 213, 213, nil, nil, nil, 213, nil, 213, 213, 213, 213, 213, 213, 213, +nil, nil, nil, nil, nil, 213, 213, 213, 213, 213, 213, 213, nil, nil, 213, +nil, nil, nil, nil, nil, nil, 213, nil, nil, 213, 213, 213, 213, 213, 213, +213, 213, nil, 213, 213, 213, nil, 213, 213, nil, 213, 213, 213, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 213, nil, nil, 213, nil, nil, 213, 213, nil, nil, 213, nil, 213, +nil, nil, nil, 213, nil, nil, nil, nil, nil, nil, nil, nil, 213, nil, nil, +nil, nil, 213, 213, 213, 213, nil, 213, 213, 213, 213, nil, nil, nil, nil, +213, 213, nil, nil, nil, 214, 214, 214, 213, 214, 213, 213, 213, 214, 214, +nil, nil, nil, 214, nil, 214, 214, 214, 214, 214, 214, 214, nil, nil, nil, +nil, nil, 214, 214, 214, 214, 214, 214, 214, nil, nil, 214, nil, nil, nil, +nil, nil, nil, 214, nil, nil, 214, 214, 214, 214, 214, 214, 214, 214, nil, +214, 214, 214, nil, 214, 214, nil, 214, 214, 214, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 214, +nil, nil, 214, nil, nil, 214, 214, nil, nil, 214, nil, nil, nil, nil, nil, +214, nil, nil, nil, nil, nil, nil, nil, nil, 214, nil, nil, nil, nil, 214, +214, 214, 214, nil, 214, 214, 214, 214, nil, nil, nil, nil, 214, 214, nil, +nil, nil, 215, 215, 215, 214, 215, 214, 214, 214, 215, 215, nil, nil, nil, +215, nil, 215, 215, 215, 215, 215, 215, 215, nil, nil, nil, nil, nil, 215, +215, 215, 215, 215, 215, 215, nil, nil, 215, nil, nil, nil, nil, nil, nil, +215, nil, nil, 215, 215, 215, 215, 215, 215, 215, 215, nil, 215, 215, 215, +nil, 215, 215, nil, 215, 215, 215, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 215, nil, nil, 215, +nil, nil, 215, 215, nil, nil, 215, nil, nil, nil, nil, nil, 215, nil, nil, +nil, nil, nil, nil, nil, nil, 215, nil, nil, nil, nil, 215, 215, 215, 215, +nil, 215, 215, 215, 215, nil, nil, nil, nil, 215, 215, nil, nil, nil, 216, +216, 216, 215, 216, 215, 215, 215, 216, 216, nil, nil, nil, 216, nil, 216, +216, 216, 216, 216, 216, 216, nil, nil, nil, nil, nil, 216, 216, 216, 216, +216, 216, 216, nil, nil, 216, nil, nil, nil, nil, nil, nil, 216, nil, nil, +216, 216, 216, 216, 216, 216, 216, 216, nil, 216, 216, 216, nil, 216, 216, +nil, 216, 216, 216, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 216, nil, nil, 216, nil, nil, 216, +216, nil, nil, 216, nil, nil, nil, nil, nil, 216, nil, nil, nil, nil, nil, +nil, nil, nil, 216, nil, nil, nil, nil, 216, 216, 216, 216, nil, 216, 216, +216, 216, nil, nil, nil, nil, 216, 216, nil, nil, nil, 217, 217, 217, 216, +217, 216, 216, 216, 217, 217, nil, nil, nil, 217, nil, 217, 217, 217, 217, +217, 217, 217, nil, nil, nil, nil, nil, 217, 217, 217, 217, 217, 217, 217, +nil, nil, 217, nil, nil, nil, nil, nil, nil, 217, nil, nil, 217, 217, 217, +217, 217, 217, 217, 217, nil, 217, 217, 217, nil, 217, 217, nil, 217, 217, +217, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 217, nil, nil, 217, nil, nil, 217, 217, nil, nil, +217, nil, nil, nil, nil, nil, 217, nil, nil, nil, nil, nil, nil, nil, nil, +217, nil, nil, nil, nil, 217, 217, 217, 217, nil, 217, 217, 217, 217, nil, +nil, nil, nil, 217, 217, 217, nil, nil, 228, 228, 228, 217, 228, 217, 217, +217, 228, 228, nil, nil, nil, 228, nil, 228, 228, 228, 228, 228, 228, 228, +nil, nil, nil, nil, nil, 228, 228, 228, 228, 228, 228, 228, nil, nil, 228, +nil, nil, nil, nil, nil, nil, 228, nil, nil, 228, 228, 228, 228, 228, 228, +228, 228, nil, 228, 228, 228, nil, 228, 228, nil, 228, 228, 228, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 228, nil, nil, 228, nil, nil, 228, 228, nil, nil, 228, nil, nil, +nil, nil, nil, 228, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, +nil, nil, 228, 228, 228, 228, nil, 228, 228, 228, 228, nil, nil, nil, nil, +228, 228, nil, nil, nil, 231, 231, 231, 228, 231, 228, 228, 228, 231, 231, +nil, nil, nil, 231, nil, 231, 231, 231, 231, 231, 231, 231, nil, nil, nil, +nil, nil, 231, 231, 231, 231, 231, 231, 231, nil, nil, 231, nil, nil, nil, +nil, nil, nil, 231, nil, nil, 231, 231, 231, 231, 231, 231, 231, 231, nil, +231, 231, 231, nil, 231, 231, nil, 231, 231, 231, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 231, +nil, nil, 231, nil, nil, 231, 231, nil, nil, 231, nil, nil, nil, nil, nil, +231, nil, nil, nil, nil, nil, nil, nil, nil, 231, nil, nil, nil, nil, 231, +231, 231, 231, nil, 231, 231, 231, 231, nil, nil, nil, nil, 231, 231, nil, +nil, nil, 232, 232, 232, 231, 232, 231, 231, 231, 232, 232, nil, nil, nil, +232, nil, 232, 232, 232, 232, 232, 232, 232, nil, nil, nil, nil, nil, 232, +232, 232, 232, 232, 232, 232, nil, nil, 232, nil, nil, nil, nil, nil, nil, +232, nil, nil, 232, 232, 232, 232, 232, 232, 232, 232, nil, 232, 232, 232, +nil, 232, 232, nil, 232, 232, 232, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 232, nil, nil, 232, +nil, nil, 232, 232, nil, nil, 232, nil, nil, nil, nil, nil, 232, nil, nil, +nil, nil, nil, nil, nil, nil, 232, nil, nil, nil, nil, 232, 232, 232, 232, +nil, 232, 232, 232, 232, nil, nil, nil, nil, 232, 232, nil, nil, nil, 233, +233, 233, 232, 233, 232, 232, 232, 233, 233, nil, nil, nil, 233, nil, 233, +233, 233, 233, 233, 233, 233, nil, nil, nil, nil, nil, 233, 233, 233, 233, +233, 233, 233, nil, nil, 233, nil, nil, nil, nil, nil, nil, 233, nil, nil, +233, 233, 233, 233, 233, 233, 233, 233, nil, 233, 233, 233, nil, 233, 233, +nil, 233, 233, 233, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 233, nil, nil, 233, nil, nil, 233, +233, nil, nil, 233, nil, nil, nil, nil, nil, 233, nil, nil, nil, nil, nil, +nil, nil, nil, 233, nil, nil, nil, nil, 233, 233, 233, 233, nil, 233, 233, +233, 233, nil, nil, nil, nil, 233, 233, nil, nil, nil, 234, 234, 234, 233, +234, 233, 233, 233, 234, 234, nil, nil, nil, 234, nil, 234, 234, 234, 234, +234, 234, 234, nil, nil, nil, nil, nil, 234, 234, 234, 234, 234, 234, 234, +nil, nil, 234, nil, nil, nil, nil, nil, nil, 234, nil, nil, 234, 234, 234, +234, 234, 234, 234, 234, nil, 234, 234, 234, nil, 234, 234, nil, 234, 234, +234, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 234, nil, nil, 234, nil, nil, 234, 234, nil, nil, +234, nil, nil, nil, nil, nil, 234, nil, nil, nil, nil, nil, nil, nil, nil, +234, nil, nil, nil, nil, 234, 234, 234, 234, nil, 234, 234, 234, 234, nil, +nil, nil, nil, 234, 234, nil, nil, nil, 235, 235, 235, 234, 235, 234, 234, +234, 235, 235, nil, nil, nil, 235, nil, 235, 235, 235, 235, 235, 235, 235, +nil, nil, nil, nil, nil, 235, 235, 235, 235, 235, 235, 235, nil, nil, 235, +nil, nil, nil, nil, nil, nil, 235, nil, nil, 235, 235, 235, 235, 235, 235, +235, 235, nil, 235, 235, 235, nil, 235, 235, nil, 235, 235, 235, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 235, nil, nil, 235, nil, nil, 235, 235, nil, nil, 235, nil, nil, +nil, nil, nil, 235, nil, nil, nil, nil, nil, nil, nil, nil, 235, nil, nil, +nil, nil, 235, 235, 235, 235, nil, 235, 235, 235, 235, nil, nil, nil, nil, +235, 235, nil, nil, nil, 236, 236, 236, 235, 236, 235, 235, 235, 236, 236, +nil, nil, nil, 236, nil, 236, 236, 236, 236, 236, 236, 236, nil, nil, nil, +nil, nil, 236, 236, 236, 236, 236, 236, 236, nil, nil, 236, nil, nil, nil, +nil, nil, nil, 236, nil, nil, 236, 236, 236, 236, 236, 236, 236, 236, nil, +236, 236, 236, nil, 236, 236, nil, 236, 236, 236, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 236, +nil, nil, 236, nil, nil, 236, 236, nil, nil, 236, nil, nil, nil, nil, nil, +236, nil, nil, nil, nil, nil, nil, nil, nil, 236, nil, nil, nil, nil, 236, +236, 236, 236, nil, 236, 236, 236, 236, nil, nil, nil, nil, 236, 236, nil, +nil, nil, 237, 237, 237, 236, 237, 236, 236, 236, 237, 237, nil, nil, nil, +237, nil, 237, 237, 237, 237, 237, 237, 237, nil, nil, nil, nil, nil, 237, +237, 237, 237, 237, 237, 237, nil, nil, 237, nil, nil, nil, nil, nil, nil, +237, nil, nil, 237, 237, 237, 237, 237, 237, 237, 237, nil, 237, 237, 237, +nil, 237, 237, nil, 237, 237, 237, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 237, nil, nil, 237, +nil, nil, 237, 237, nil, nil, 237, nil, nil, nil, nil, nil, 237, nil, nil, +nil, nil, nil, nil, nil, nil, 237, nil, nil, nil, nil, 237, 237, 237, 237, +nil, 237, 237, 237, 237, nil, nil, nil, nil, 237, 237, nil, nil, nil, 238, +238, 238, 237, 238, 237, 237, 237, 238, 238, nil, nil, nil, 238, nil, 238, +238, 238, 238, 238, 238, 238, nil, nil, nil, nil, nil, 238, 238, 238, 238, +238, 238, 238, nil, nil, 238, nil, nil, nil, nil, nil, nil, 238, nil, nil, +238, 238, 238, 238, 238, 238, 238, 238, nil, 238, 238, 238, nil, 238, 238, +nil, 238, 238, 238, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 238, nil, nil, 238, nil, nil, 238, +238, nil, nil, 238, nil, nil, nil, nil, nil, 238, nil, nil, nil, nil, nil, +nil, nil, nil, 238, nil, nil, nil, nil, 238, 238, 238, 238, nil, 238, 238, +238, 238, nil, nil, nil, nil, 238, 238, nil, nil, nil, 239, 239, 239, 238, +239, 238, 238, 238, 239, 239, nil, nil, nil, 239, nil, 239, 239, 239, 239, +239, 239, 239, nil, nil, nil, nil, nil, 239, 239, 239, 239, 239, 239, 239, +nil, nil, 239, nil, nil, nil, nil, nil, nil, 239, nil, nil, 239, 239, 239, +239, 239, 239, 239, 239, nil, 239, 239, 239, nil, 239, 239, nil, 239, 239, +239, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 239, nil, nil, 239, nil, nil, 239, 239, nil, nil, +239, nil, nil, nil, nil, nil, 239, nil, nil, nil, nil, nil, nil, nil, nil, +239, nil, nil, nil, nil, 239, 239, 239, 239, nil, 239, 239, 239, 239, nil, +nil, nil, nil, 239, 239, nil, nil, nil, 240, 240, 240, 239, 240, 239, 239, +239, 240, 240, nil, nil, nil, 240, nil, 240, 240, 240, 240, 240, 240, 240, +nil, nil, nil, nil, nil, 240, 240, 240, 240, 240, 240, 240, nil, nil, 240, +nil, nil, nil, nil, nil, nil, 240, nil, nil, 240, 240, 240, 240, 240, 240, +240, 240, nil, 240, 240, 240, nil, 240, 240, nil, 240, 240, 240, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 240, nil, nil, 240, nil, nil, 240, 240, nil, nil, 240, nil, nil, +nil, nil, nil, 240, nil, nil, nil, nil, nil, nil, nil, nil, 240, nil, nil, +nil, nil, 240, 240, 240, 240, nil, 240, 240, 240, 240, nil, nil, nil, nil, +240, 240, nil, nil, nil, 241, 241, 241, 240, 241, 240, 240, 240, 241, 241, +nil, nil, nil, 241, nil, 241, 241, 241, 241, 241, 241, 241, nil, nil, nil, +nil, nil, 241, 241, 241, 241, 241, 241, 241, nil, nil, 241, nil, nil, nil, +nil, nil, nil, 241, nil, nil, 241, 241, 241, 241, 241, 241, 241, 241, nil, +241, 241, 241, nil, 241, 241, nil, 241, 241, 241, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 241, +nil, nil, 241, nil, nil, 241, 241, nil, nil, 241, nil, nil, nil, nil, nil, +241, nil, nil, nil, nil, nil, nil, nil, nil, 241, nil, nil, nil, nil, 241, +241, 241, 241, nil, 241, 241, 241, 241, nil, nil, nil, nil, 241, 241, nil, +nil, nil, 242, 242, 242, 241, 242, 241, 241, 241, 242, 242, nil, nil, nil, +242, nil, 242, 242, 242, 242, 242, 242, 242, nil, nil, nil, nil, nil, 242, +242, 242, 242, 242, 242, 242, nil, nil, 242, nil, nil, nil, nil, nil, nil, +242, nil, nil, 242, 242, 242, 242, 242, 242, 242, 242, nil, 242, 242, 242, +nil, 242, 242, nil, 242, 242, 242, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 242, nil, nil, 242, +nil, nil, 242, 242, nil, nil, 242, nil, nil, nil, nil, nil, 242, nil, nil, +nil, nil, nil, nil, nil, nil, 242, nil, nil, nil, nil, 242, 242, 242, 242, +nil, 242, 242, 242, 242, nil, nil, nil, nil, 242, 242, nil, nil, nil, 243, +243, 243, 242, 243, 242, 242, 242, 243, 243, nil, nil, nil, 243, nil, 243, +243, 243, 243, 243, 243, 243, nil, nil, nil, nil, nil, 243, 243, 243, 243, +243, 243, 243, nil, nil, 243, nil, nil, nil, nil, nil, nil, 243, nil, nil, +243, 243, 243, 243, 243, 243, 243, 243, nil, 243, 243, 243, nil, 243, 243, +nil, 243, 243, 243, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 243, nil, nil, 243, nil, nil, 243, +243, nil, nil, 243, nil, nil, nil, nil, nil, 243, nil, nil, nil, nil, nil, +nil, nil, nil, 243, nil, nil, nil, nil, 243, 243, 243, 243, nil, 243, 243, +243, 243, nil, nil, nil, nil, 243, 243, nil, nil, nil, 244, 244, 244, 243, +244, 243, 243, 243, 244, 244, nil, nil, nil, 244, nil, 244, 244, 244, 244, +244, 244, 244, nil, nil, nil, nil, nil, 244, 244, 244, 244, 244, 244, 244, +nil, nil, 244, nil, nil, nil, nil, nil, nil, 244, nil, nil, 244, 244, 244, +244, 244, 244, 244, 244, nil, 244, 244, 244, nil, 244, 244, nil, 244, 244, +244, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 244, nil, nil, 244, nil, nil, 244, 244, nil, nil, +244, nil, nil, nil, nil, nil, 244, nil, nil, nil, nil, nil, nil, nil, nil, +244, nil, nil, nil, nil, 244, 244, 244, 244, nil, 244, 244, 244, 244, nil, +nil, nil, nil, 244, 244, nil, nil, nil, 245, 245, 245, 244, 245, 244, 244, +244, 245, 245, nil, nil, nil, 245, nil, 245, 245, 245, 245, 245, 245, 245, +nil, nil, nil, nil, nil, 245, 245, 245, 245, 245, 245, 245, nil, nil, 245, +nil, nil, nil, nil, nil, nil, 245, nil, nil, 245, 245, 245, 245, 245, 245, +245, 245, nil, 245, 245, 245, nil, 245, 245, nil, 245, 245, 245, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 245, nil, nil, 245, nil, nil, 245, 245, nil, nil, 245, nil, nil, +nil, nil, nil, 245, nil, nil, nil, nil, nil, nil, nil, nil, 245, nil, nil, +nil, nil, 245, 245, 245, 245, nil, 245, 245, 245, 245, nil, nil, nil, nil, +245, 245, nil, nil, nil, 246, 246, 246, 245, 246, 245, 245, 245, 246, 246, +nil, nil, nil, 246, nil, 246, 246, 246, 246, 246, 246, 246, nil, nil, nil, +nil, nil, 246, 246, 246, 246, 246, 246, 246, nil, nil, 246, nil, nil, nil, +nil, nil, nil, 246, nil, nil, 246, 246, 246, 246, 246, 246, 246, 246, nil, +246, 246, 246, nil, 246, 246, nil, 246, 246, 246, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 246, +nil, nil, 246, nil, nil, 246, 246, nil, nil, 246, nil, nil, nil, nil, nil, +246, nil, nil, nil, nil, nil, nil, nil, nil, 246, nil, nil, nil, nil, 246, +246, 246, 246, nil, 246, 246, 246, 246, nil, nil, nil, nil, 246, 246, nil, +nil, nil, 247, 247, 247, 246, 247, 246, 246, 246, 247, 247, nil, nil, nil, +247, nil, 247, 247, 247, 247, 247, 247, 247, nil, nil, nil, nil, nil, 247, +247, 247, 247, 247, 247, 247, nil, nil, 247, nil, nil, nil, nil, nil, nil, +247, nil, nil, 247, 247, 247, 247, 247, 247, 247, 247, nil, 247, 247, 247, +nil, 247, 247, nil, 247, 247, 247, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 247, nil, nil, 247, +nil, nil, 247, 247, nil, nil, 247, nil, nil, nil, nil, nil, 247, nil, nil, +nil, nil, nil, nil, nil, nil, 247, nil, nil, nil, nil, 247, 247, 247, 247, +nil, 247, 247, 247, 247, nil, nil, nil, nil, 247, 247, nil, nil, nil, 248, +248, 248, 247, 248, 247, 247, 247, 248, 248, nil, nil, nil, 248, nil, 248, +248, 248, 248, 248, 248, 248, nil, nil, nil, nil, nil, 248, 248, 248, 248, +248, 248, 248, nil, nil, 248, nil, nil, nil, nil, nil, nil, 248, nil, nil, +248, 248, 248, 248, 248, 248, 248, 248, nil, 248, 248, 248, nil, 248, 248, +nil, 248, 248, 248, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 248, nil, nil, 248, nil, nil, 248, +248, nil, nil, 248, nil, nil, nil, nil, nil, 248, nil, nil, nil, nil, nil, +nil, nil, nil, 248, nil, nil, nil, nil, 248, 248, 248, 248, nil, 248, 248, +248, 248, nil, nil, nil, nil, 248, 248, nil, nil, nil, 249, 249, 249, 248, +249, 248, 248, 248, 249, 249, nil, nil, nil, 249, nil, 249, 249, 249, 249, +249, 249, 249, nil, nil, nil, nil, nil, 249, 249, 249, 249, 249, 249, 249, +nil, nil, 249, nil, nil, nil, nil, nil, nil, 249, nil, nil, 249, 249, 249, +249, 249, 249, 249, 249, nil, 249, 249, 249, nil, 249, 249, nil, 249, 249, +249, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 249, nil, nil, 249, nil, nil, 249, 249, nil, nil, +249, nil, nil, nil, nil, nil, 249, nil, nil, nil, nil, nil, nil, nil, nil, +249, nil, nil, nil, nil, 249, 249, 249, 249, nil, 249, 249, 249, 249, nil, +nil, nil, nil, 249, 249, nil, nil, nil, 250, 250, 250, 249, 250, 249, 249, +249, 250, 250, nil, nil, nil, 250, nil, 250, 250, 250, 250, 250, 250, 250, +nil, nil, nil, nil, nil, 250, 250, 250, 250, 250, 250, 250, nil, nil, 250, +nil, nil, nil, nil, nil, nil, 250, nil, nil, 250, 250, 250, 250, 250, 250, +250, 250, nil, 250, 250, 250, nil, 250, 250, nil, 250, 250, 250, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 250, nil, nil, 250, nil, nil, 250, 250, nil, nil, 250, nil, nil, +nil, nil, nil, 250, nil, nil, nil, nil, nil, nil, nil, nil, 250, nil, nil, +nil, nil, 250, 250, 250, 250, nil, 250, 250, 250, 250, nil, nil, nil, nil, +250, 250, nil, nil, nil, 251, 251, 251, 250, 251, 250, 250, 250, 251, 251, +nil, nil, nil, 251, nil, 251, 251, 251, 251, 251, 251, 251, nil, nil, nil, +nil, nil, 251, 251, 251, 251, 251, 251, 251, nil, nil, 251, nil, nil, nil, +nil, nil, nil, 251, nil, nil, 251, 251, 251, 251, 251, 251, 251, 251, nil, +251, 251, 251, nil, 251, 251, nil, 251, 251, 251, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 251, +nil, nil, 251, nil, nil, 251, 251, nil, nil, 251, nil, nil, nil, nil, nil, +251, nil, nil, nil, nil, nil, nil, nil, nil, 251, nil, nil, nil, nil, 251, +251, 251, 251, nil, 251, 251, 251, 251, nil, nil, nil, nil, 251, 251, nil, +nil, nil, 252, 252, 252, 251, 252, 251, 251, 251, 252, 252, nil, nil, nil, +252, nil, 252, 252, 252, 252, 252, 252, 252, nil, nil, nil, nil, nil, 252, +252, 252, 252, 252, 252, 252, nil, nil, 252, nil, nil, nil, nil, nil, nil, +252, nil, nil, 252, 252, 252, 252, 252, 252, 252, 252, nil, 252, 252, 252, +nil, 252, 252, nil, 252, 252, 252, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 252, nil, nil, 252, +nil, nil, 252, 252, nil, nil, 252, nil, nil, nil, nil, nil, 252, nil, nil, +nil, nil, nil, nil, nil, nil, 252, nil, nil, nil, nil, 252, 252, 252, 252, +nil, 252, 252, 252, 252, nil, nil, nil, nil, 252, 252, nil, nil, nil, 253, +253, 253, 252, 253, 252, 252, 252, 253, 253, nil, nil, nil, 253, nil, 253, +253, 253, 253, 253, 253, 253, nil, nil, nil, nil, nil, 253, 253, 253, 253, +253, 253, 253, nil, nil, 253, nil, nil, nil, nil, nil, nil, 253, nil, nil, +253, 253, 253, 253, 253, 253, 253, 253, nil, 253, 253, 253, nil, 253, 253, +nil, 253, 253, 253, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 253, nil, nil, 253, nil, nil, 253, +253, nil, nil, 253, nil, nil, nil, nil, nil, 253, nil, nil, nil, nil, nil, +nil, nil, nil, 253, nil, nil, nil, nil, 253, 253, 253, 253, nil, 253, 253, +253, 253, nil, nil, nil, nil, 253, 253, nil, nil, nil, 254, 254, 254, 253, +254, 253, 253, 253, 254, 254, nil, nil, nil, 254, nil, 254, 254, 254, 254, +254, 254, 254, nil, nil, nil, nil, nil, 254, 254, 254, 254, 254, 254, 254, +nil, nil, 254, nil, nil, nil, nil, nil, nil, 254, nil, nil, 254, 254, 254, +254, 254, 254, 254, 254, nil, 254, 254, 254, nil, 254, 254, nil, 254, 254, +254, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 254, nil, nil, 254, nil, nil, 254, 254, nil, nil, +254, nil, nil, nil, nil, nil, 254, nil, nil, nil, nil, nil, nil, nil, nil, +254, nil, nil, nil, nil, 254, 254, 254, 254, nil, 254, 254, 254, 254, nil, +nil, nil, nil, 254, 254, nil, nil, nil, 255, 255, 255, 254, 255, 254, 254, +254, 255, 255, nil, nil, nil, 255, nil, 255, 255, 255, 255, 255, 255, 255, +nil, nil, nil, nil, nil, 255, 255, 255, 255, 255, 255, 255, nil, nil, 255, +nil, nil, nil, nil, nil, nil, 255, nil, nil, 255, 255, 255, 255, 255, 255, +255, 255, nil, 255, 255, 255, nil, 255, 255, nil, 255, 255, 255, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 255, nil, nil, 255, nil, nil, 255, 255, nil, nil, 255, nil, nil, +nil, nil, nil, 255, nil, nil, nil, nil, nil, nil, nil, nil, 255, nil, nil, +nil, nil, 255, 255, 255, 255, nil, 255, 255, 255, 255, nil, nil, nil, nil, +255, 255, nil, nil, nil, 263, 263, 263, 255, 263, 255, 255, 255, 263, 263, +nil, nil, nil, 263, nil, 263, 263, 263, 263, 263, 263, 263, nil, nil, nil, +nil, nil, 263, 263, 263, 263, 263, 263, 263, nil, nil, 263, nil, nil, nil, +nil, nil, nil, 263, nil, nil, 263, 263, 263, 263, 263, 263, 263, 263, 263, +263, 263, 263, nil, 263, 263, nil, 263, 263, 263, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 263, +nil, nil, 263, nil, nil, 263, 263, nil, nil, 263, nil, 263, nil, 263, nil, +263, nil, nil, 263, nil, nil, nil, nil, nil, 263, nil, nil, nil, nil, 263, +263, 263, 263, nil, 263, 263, 263, 263, nil, nil, nil, nil, 263, 263, nil, +nil, nil, 264, 264, 264, 263, 264, 263, 263, 263, 264, 264, nil, nil, nil, +264, nil, 264, 264, 264, 264, 264, 264, 264, nil, nil, nil, nil, nil, 264, +264, 264, 264, 264, 264, 264, nil, nil, 264, nil, nil, nil, nil, nil, nil, +264, nil, nil, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, +nil, 264, 264, nil, 264, 264, 264, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 264, nil, nil, 264, +nil, nil, 264, 264, nil, nil, 264, nil, 264, nil, 264, nil, 264, nil, nil, +264, nil, nil, nil, nil, nil, 264, nil, nil, nil, nil, 264, 264, 264, 264, +nil, 264, 264, 264, 264, nil, nil, nil, nil, 264, 264, nil, nil, nil, 272, +272, 272, 264, 272, 264, 264, 264, 272, 272, nil, nil, nil, 272, nil, 272, +272, 272, 272, 272, 272, 272, nil, nil, nil, nil, nil, 272, 272, 272, 272, +272, 272, 272, nil, nil, 272, nil, nil, nil, nil, nil, nil, 272, nil, nil, +272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, nil, 272, 272, +nil, 272, 272, 272, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 272, nil, nil, 272, nil, nil, 272, +272, nil, nil, 272, nil, 272, nil, 272, nil, 272, nil, nil, 272, nil, nil, +nil, nil, nil, 272, nil, nil, nil, nil, 272, 272, 272, 272, nil, 272, 272, +272, 272, nil, nil, nil, nil, 272, 272, 272, nil, nil, 279, 279, 279, 272, +279, 272, 272, 272, 279, 279, nil, nil, nil, 279, nil, 279, 279, 279, 279, +279, 279, 279, nil, nil, nil, nil, nil, 279, 279, 279, 279, 279, 279, 279, +nil, nil, 279, nil, nil, nil, nil, nil, nil, 279, nil, nil, 279, 279, 279, +279, 279, 279, 279, 279, nil, 279, 279, 279, nil, 279, 279, nil, 279, 279, +279, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 279, nil, nil, 279, nil, nil, 279, 279, nil, nil, +279, nil, nil, nil, nil, nil, 279, nil, nil, nil, nil, nil, nil, nil, nil, +279, nil, nil, nil, nil, 279, 279, 279, 279, nil, 279, 279, 279, 279, nil, +nil, nil, nil, 279, 279, nil, nil, nil, 281, 281, 281, 279, 281, 279, 279, +279, 281, 281, nil, nil, nil, 281, nil, 281, 281, 281, 281, 281, 281, 281, +nil, nil, nil, nil, nil, 281, 281, 281, 281, 281, 281, 281, nil, nil, 281, +nil, nil, nil, nil, nil, nil, 281, nil, nil, 281, 281, 281, 281, 281, 281, +281, 281, nil, 281, 281, 281, nil, 281, 281, nil, 281, 281, 281, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 281, nil, nil, 281, nil, nil, 281, 281, nil, nil, 281, nil, nil, +nil, nil, nil, 281, nil, nil, nil, nil, nil, nil, nil, nil, 281, nil, nil, +nil, nil, 281, 281, 281, 281, nil, 281, 281, 281, 281, nil, nil, nil, nil, +281, 281, nil, nil, nil, 284, 284, 284, 281, 284, 281, 281, 281, 284, 284, +nil, nil, nil, 284, nil, 284, 284, 284, 284, 284, 284, 284, nil, nil, nil, +nil, nil, 284, 284, 284, 284, 284, 284, 284, nil, nil, 284, nil, nil, nil, +nil, nil, nil, 284, nil, nil, 284, 284, 284, 284, 284, 284, 284, 284, nil, +284, 284, 284, nil, 284, 284, nil, 284, 284, 284, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 284, +nil, nil, 284, nil, nil, 284, 284, nil, nil, 284, nil, nil, nil, nil, nil, +284, nil, nil, nil, nil, nil, nil, nil, nil, 284, nil, nil, nil, nil, 284, +284, 284, 284, nil, 284, 284, 284, 284, nil, nil, nil, nil, 284, 284, nil, +nil, nil, 285, 285, 285, 284, 285, 284, 284, 284, 285, 285, nil, nil, nil, +285, nil, 285, 285, 285, 285, 285, 285, 285, nil, nil, nil, nil, nil, 285, +285, 285, 285, 285, 285, 285, nil, nil, 285, nil, nil, nil, nil, nil, nil, +285, nil, nil, 285, 285, 285, 285, 285, 285, 285, 285, nil, 285, 285, 285, +nil, 285, 285, nil, 285, 285, 285, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 285, nil, nil, 285, +nil, nil, 285, 285, nil, nil, 285, nil, nil, nil, nil, nil, 285, nil, nil, +nil, nil, nil, nil, nil, nil, 285, nil, nil, nil, nil, 285, 285, 285, 285, +nil, 285, 285, 285, 285, nil, nil, nil, nil, 285, 285, nil, nil, nil, nil, +nil, nil, 285, nil, 285, 285, 285, 290, 290, 290, 290, 290, nil, nil, nil, +290, 290, nil, nil, nil, 290, nil, 290, 290, 290, 290, 290, 290, 290, nil, +nil, nil, nil, nil, 290, 290, 290, 290, 290, 290, 290, nil, nil, 290, nil, +nil, nil, nil, nil, 290, 290, nil, 290, 290, 290, 290, 290, 290, 290, 290, +290, nil, 290, 290, 290, nil, 290, 290, nil, 290, 290, 290, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 290, nil, nil, 290, nil, nil, 290, 290, nil, nil, 290, nil, 290, nil, +nil, nil, 290, nil, nil, nil, nil, nil, nil, nil, nil, 290, nil, nil, nil, +nil, 290, 290, 290, 290, nil, 290, 290, 290, 290, nil, nil, nil, nil, 290, +290, nil, nil, nil, 298, 298, 298, 290, 298, 290, 290, 290, 298, 298, nil, +nil, nil, 298, nil, 298, 298, 298, 298, 298, 298, 298, nil, nil, nil, nil, +nil, 298, 298, 298, 298, 298, 298, 298, nil, nil, 298, nil, nil, nil, nil, +nil, nil, 298, nil, nil, 298, 298, 298, 298, 298, 298, 298, 298, nil, 298, +298, 298, nil, 298, 298, nil, nil, nil, 298, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 298, nil, +nil, 298, nil, nil, 298, 298, nil, nil, 298, nil, 895, nil, 895, 895, 895, +895, 895, nil, nil, nil, nil, nil, nil, nil, nil, nil, 895, nil, 298, 298, +298, 298, nil, 298, 298, 298, 298, nil, nil, nil, nil, 298, 298, nil, nil, +nil, 298, nil, 895, 298, nil, 298, 298, 298, 315, 315, 315, nil, 315, 895, +895, nil, 315, 315, 895, nil, nil, 315, nil, 315, 315, 315, 315, 315, 315, +315, nil, nil, nil, nil, nil, 315, 315, 315, 315, 315, 315, 315, nil, nil, +315, nil, nil, nil, nil, nil, nil, 315, nil, nil, 315, 315, 315, 315, 315, +315, 315, 315, nil, 315, 315, 315, nil, 315, 315, nil, nil, nil, 315, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 315, nil, nil, 315, nil, nil, 315, 315, nil, nil, 315, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 315, 315, 315, 315, nil, 315, 315, 315, 315, nil, nil, nil, +nil, 315, 315, nil, nil, nil, 323, 323, 323, 315, 323, 315, 315, 315, 323, +323, nil, nil, nil, 323, nil, 323, 323, 323, 323, 323, 323, 323, nil, nil, +nil, nil, nil, 323, 323, 323, 323, 323, 323, 323, nil, nil, 323, nil, nil, +nil, nil, nil, nil, 323, nil, nil, 323, 323, 323, 323, 323, 323, 323, 323, +nil, 323, 323, 323, nil, 323, 323, nil, 323, 323, 323, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +323, nil, nil, 323, 323, nil, 323, 323, nil, nil, 323, nil, nil, nil, nil, +nil, 323, nil, nil, nil, nil, nil, nil, nil, nil, 323, nil, nil, nil, nil, +323, 323, 323, 323, nil, 323, 323, 323, 323, nil, nil, nil, nil, 323, 323, +nil, nil, nil, 325, 325, 325, 323, 325, 323, 323, 323, 325, 325, nil, nil, +nil, 325, nil, 325, 325, 325, 325, 325, 325, 325, nil, nil, nil, nil, nil, +325, 325, 325, 325, 325, 325, 325, nil, nil, 325, nil, nil, nil, nil, nil, +nil, 325, nil, nil, 325, 325, 325, 325, 325, 325, 325, 325, nil, 325, 325, +325, nil, 325, 325, nil, 325, 325, 325, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 325, nil, nil, +325, nil, nil, 325, 325, nil, nil, 325, nil, nil, nil, nil, nil, 325, nil, +nil, nil, nil, nil, nil, nil, nil, 325, nil, nil, nil, nil, 325, 325, 325, +325, nil, 325, 325, 325, 325, nil, nil, nil, nil, 325, 325, nil, nil, nil, +340, 340, 340, 325, 340, 325, 325, 325, 340, 340, nil, nil, nil, 340, nil, +340, 340, 340, 340, 340, 340, 340, nil, nil, nil, nil, nil, 340, 340, 340, +340, 340, 340, 340, nil, nil, 340, nil, nil, nil, nil, nil, nil, 340, nil, +nil, 340, 340, 340, 340, 340, 340, 340, 340, nil, 340, 340, 340, nil, 340, +340, nil, 340, 340, 340, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 340, nil, nil, 340, nil, nil, +340, 340, nil, nil, 340, nil, nil, nil, nil, nil, 340, nil, nil, nil, nil, +nil, nil, nil, nil, 340, nil, nil, nil, nil, 340, 340, 340, 340, nil, 340, +340, 340, 340, nil, nil, nil, nil, 340, 340, nil, nil, nil, 341, 341, 341, +340, 341, 340, 340, 340, 341, 341, nil, nil, nil, 341, nil, 341, 341, 341, +341, 341, 341, 341, nil, nil, nil, nil, nil, 341, 341, 341, 341, 341, 341, +341, nil, nil, 341, nil, nil, nil, nil, nil, nil, 341, nil, nil, 341, 341, +341, 341, 341, 341, 341, 341, nil, 341, 341, 341, nil, 341, 341, nil, 341, +341, 341, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 341, nil, nil, 341, nil, nil, 341, 341, nil, +nil, 341, nil, nil, nil, nil, nil, 341, nil, nil, nil, nil, nil, nil, nil, +nil, 341, nil, nil, nil, nil, 341, 341, 341, 341, nil, 341, 341, 341, 341, +nil, nil, nil, nil, 341, 341, nil, nil, nil, 360, 360, 360, 341, 360, 341, +341, 341, 360, 360, nil, nil, nil, 360, nil, 360, 360, 360, 360, 360, 360, +360, nil, nil, nil, nil, nil, 360, 360, 360, 360, 360, 360, 360, nil, nil, +360, nil, nil, nil, nil, nil, nil, 360, nil, nil, 360, 360, 360, 360, 360, +360, 360, 360, nil, 360, 360, 360, nil, 360, 360, nil, 360, 360, 360, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 360, nil, nil, 360, nil, nil, 360, 360, nil, nil, 360, nil, +nil, nil, nil, nil, 360, nil, nil, nil, nil, nil, nil, nil, nil, 360, nil, +nil, nil, nil, 360, 360, 360, 360, nil, 360, 360, 360, 360, nil, nil, nil, +nil, 360, 360, nil, nil, nil, 376, 376, 376, 360, 376, 360, 360, 360, 376, +376, nil, nil, nil, 376, nil, 376, 376, 376, 376, 376, 376, 376, nil, nil, +nil, nil, nil, 376, 376, 376, 376, 376, 376, 376, nil, nil, 376, nil, nil, +nil, nil, nil, nil, 376, nil, nil, 376, 376, 376, 376, 376, 376, 376, 376, +nil, 376, 376, 376, nil, 376, 376, nil, 376, 376, 376, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +376, nil, nil, 376, nil, nil, 376, 376, nil, nil, 376, nil, nil, nil, nil, +nil, 376, nil, nil, nil, nil, nil, nil, nil, nil, 376, nil, nil, nil, nil, +376, 376, 376, 376, nil, 376, 376, 376, 376, nil, nil, nil, nil, 376, 376, +nil, nil, nil, 404, 404, 404, 376, 404, 376, 376, 376, 404, 404, nil, nil, +nil, 404, nil, 404, 404, 404, 404, 404, 404, 404, nil, nil, nil, nil, nil, +404, 404, 404, 404, 404, 404, 404, nil, nil, 404, nil, nil, nil, nil, nil, +nil, 404, nil, nil, 404, 404, 404, 404, 404, 404, 404, 404, nil, 404, 404, +404, nil, 404, 404, nil, 404, 404, 404, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 404, nil, nil, +404, nil, nil, 404, 404, nil, nil, 404, nil, nil, nil, nil, nil, 404, nil, +nil, nil, nil, nil, nil, nil, nil, 404, nil, nil, nil, nil, 404, 404, 404, +404, nil, 404, 404, 404, 404, nil, nil, nil, nil, 404, 404, nil, nil, nil, +442, 442, 442, 404, 442, 404, 404, 404, 442, 442, nil, nil, nil, 442, nil, +442, 442, 442, 442, 442, 442, 442, nil, nil, nil, nil, nil, 442, 442, 442, +442, 442, 442, 442, nil, nil, 442, nil, nil, nil, nil, nil, nil, 442, nil, +nil, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, nil, 442, +442, nil, 442, 442, 442, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 442, nil, nil, 442, nil, nil, +442, 442, nil, nil, 442, nil, 442, nil, 442, nil, 442, nil, nil, 442, nil, +nil, nil, nil, nil, 442, nil, nil, nil, nil, 442, 442, 442, 442, nil, 442, +442, 442, 442, nil, nil, nil, nil, 442, 442, nil, nil, nil, 444, 444, 444, +442, 444, 442, 442, 442, 444, 444, nil, nil, nil, 444, nil, 444, 444, 444, +444, 444, 444, 444, nil, nil, nil, nil, nil, 444, 444, 444, 444, 444, 444, +444, nil, nil, 444, nil, nil, nil, nil, nil, nil, 444, nil, nil, 444, 444, +444, 444, 444, 444, 444, 444, nil, 444, 444, 444, nil, 444, 444, nil, 444, +444, 444, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 444, nil, nil, 444, nil, nil, 444, 444, nil, +nil, 444, nil, nil, nil, nil, nil, 444, nil, nil, nil, nil, nil, nil, nil, +nil, 444, nil, nil, nil, nil, 444, 444, 444, 444, nil, 444, 444, 444, 444, +nil, nil, nil, nil, 444, 444, nil, nil, nil, 445, 445, 445, 444, 445, 444, +444, 444, 445, 445, nil, nil, nil, 445, nil, 445, 445, 445, 445, 445, 445, +445, nil, nil, nil, nil, nil, 445, 445, 445, 445, 445, 445, 445, nil, nil, +445, nil, nil, nil, nil, nil, nil, 445, nil, nil, 445, 445, 445, 445, 445, +445, 445, 445, nil, 445, 445, 445, nil, 445, 445, nil, 445, 445, 445, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 445, nil, nil, 445, nil, nil, 445, 445, nil, nil, 445, nil, +nil, nil, nil, nil, 445, nil, nil, nil, nil, nil, nil, nil, nil, 445, nil, +nil, nil, nil, 445, 445, 445, 445, nil, 445, 445, 445, 445, nil, nil, nil, +nil, 445, 445, nil, nil, nil, 446, 446, 446, 445, 446, 445, 445, 445, 446, +446, nil, nil, nil, 446, nil, 446, 446, 446, 446, 446, 446, 446, nil, nil, +nil, nil, nil, 446, 446, 446, 446, 446, 446, 446, nil, nil, 446, nil, nil, +nil, nil, nil, nil, 446, nil, nil, 446, 446, 446, 446, 446, 446, 446, 446, +nil, 446, 446, 446, nil, 446, 446, nil, 446, 446, 446, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +446, nil, nil, 446, nil, nil, 446, 446, nil, nil, 446, nil, nil, nil, nil, +nil, 446, nil, nil, nil, nil, nil, nil, nil, nil, 446, nil, nil, nil, nil, +446, 446, 446, 446, nil, 446, 446, 446, 446, nil, nil, nil, nil, 446, 446, +nil, nil, nil, 472, 472, 472, 446, 472, 446, 446, 446, 472, 472, nil, nil, +nil, 472, nil, 472, 472, 472, 472, 472, 472, 472, nil, nil, nil, nil, nil, +472, 472, 472, 472, 472, 472, 472, nil, nil, 472, nil, nil, nil, nil, nil, +nil, 472, nil, nil, 472, 472, 472, 472, 472, 472, 472, 472, nil, 472, 472, +472, nil, 472, 472, nil, 472, 472, 472, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 472, nil, nil, +472, nil, nil, 472, 472, nil, nil, 472, nil, nil, nil, nil, nil, 472, nil, +nil, nil, nil, nil, nil, nil, nil, 472, nil, nil, nil, nil, 472, 472, 472, +472, nil, 472, 472, 472, 472, nil, nil, nil, nil, 472, 472, nil, nil, nil, +486, 486, 486, 472, 486, 472, 472, 472, 486, 486, nil, nil, nil, 486, nil, +486, 486, 486, 486, 486, 486, 486, nil, nil, nil, nil, nil, 486, 486, 486, +486, 486, 486, 486, nil, nil, 486, nil, nil, nil, nil, nil, nil, 486, nil, +nil, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, nil, 486, +486, nil, 486, 486, 486, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 486, nil, nil, 486, nil, nil, +486, 486, nil, nil, 486, nil, 486, nil, 486, nil, 486, nil, nil, 486, nil, +nil, nil, nil, nil, 486, nil, nil, nil, nil, 486, 486, 486, 486, nil, 486, +486, 486, 486, nil, nil, nil, nil, 486, 486, nil, nil, nil, 488, 488, 488, +486, 488, 486, 486, 486, 488, 488, nil, nil, nil, 488, nil, 488, 488, 488, +488, 488, 488, 488, nil, nil, nil, nil, nil, 488, 488, 488, 488, 488, 488, +488, nil, nil, 488, nil, nil, nil, nil, nil, nil, 488, nil, nil, 488, 488, +488, 488, 488, 488, 488, 488, 488, 488, 488, 488, nil, 488, 488, nil, 488, +488, 488, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 488, nil, nil, 488, nil, nil, 488, 488, nil, +nil, 488, nil, nil, nil, 488, nil, 488, nil, nil, 488, nil, nil, nil, nil, +nil, 488, nil, nil, nil, nil, 488, 488, 488, 488, nil, 488, 488, 488, 488, +nil, nil, nil, nil, 488, 488, nil, nil, nil, 490, 490, 490, 488, 490, 488, +488, 488, 490, 490, nil, nil, nil, 490, nil, 490, 490, 490, 490, 490, 490, +490, nil, nil, nil, nil, nil, 490, 490, 490, 490, 490, 490, 490, nil, nil, +490, nil, nil, nil, nil, nil, nil, 490, nil, nil, 490, 490, 490, 490, 490, +490, 490, 490, nil, 490, 490, 490, nil, 490, 490, nil, 490, 490, 490, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 490, nil, nil, 490, nil, nil, 490, 490, nil, nil, 490, nil, +nil, nil, nil, nil, 490, nil, nil, nil, nil, nil, nil, nil, nil, 490, nil, +nil, nil, nil, 490, 490, 490, 490, nil, 490, 490, 490, 490, nil, nil, nil, +nil, 490, 490, nil, nil, nil, nil, nil, nil, 490, nil, 490, 490, 490, 496, +496, 496, 496, 496, nil, nil, nil, 496, 496, nil, nil, nil, 496, nil, 496, +496, 496, 496, 496, 496, 496, nil, nil, nil, nil, nil, 496, 496, 496, 496, +496, 496, 496, nil, nil, 496, nil, nil, nil, nil, nil, 496, 496, 496, 496, +496, 496, 496, 496, 496, 496, 496, 496, nil, 496, 496, 496, nil, 496, 496, +nil, 496, 496, 496, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 496, nil, nil, 496, nil, nil, 496, +496, nil, nil, 496, nil, 496, nil, nil, nil, 496, nil, nil, nil, nil, nil, +nil, nil, nil, 496, nil, nil, nil, nil, 496, 496, 496, 496, nil, 496, 496, +496, 496, nil, nil, nil, nil, 496, 496, nil, nil, nil, nil, nil, 496, 496, +nil, 496, 496, 496, 504, 504, 504, nil, 504, nil, nil, nil, 504, 504, nil, +nil, nil, 504, nil, 504, 504, 504, 504, 504, 504, 504, nil, nil, nil, nil, +nil, 504, 504, 504, 504, 504, 504, 504, nil, nil, 504, nil, nil, nil, nil, +nil, nil, 504, nil, nil, 504, 504, 504, 504, 504, 504, 504, 504, nil, 504, +504, 504, nil, 504, 504, nil, nil, nil, 504, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 504, nil, +nil, 504, nil, nil, 504, 504, nil, nil, 504, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 504, 504, +504, 504, nil, 504, 504, 504, 504, nil, nil, nil, nil, 504, 504, nil, nil, +nil, 506, 506, 506, 504, 506, 504, 504, 504, 506, 506, nil, nil, nil, 506, +nil, 506, 506, 506, 506, 506, 506, 506, nil, nil, nil, nil, nil, 506, 506, +506, 506, 506, 506, 506, nil, nil, 506, nil, nil, nil, nil, nil, nil, 506, +nil, nil, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, nil, +506, 506, nil, 506, 506, 506, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 506, nil, nil, 506, nil, +nil, 506, 506, nil, nil, 506, nil, 506, nil, 506, nil, 506, nil, nil, 506, +nil, nil, nil, nil, nil, 506, nil, nil, nil, nil, 506, 506, 506, 506, nil, +506, 506, 506, 506, nil, nil, nil, nil, 506, 506, nil, nil, nil, 512, 512, +512, 506, 512, 506, 506, 506, 512, 512, nil, nil, nil, 512, nil, 512, 512, +512, 512, 512, 512, 512, nil, nil, nil, nil, nil, 512, 512, 512, 512, 512, +512, 512, nil, nil, 512, nil, nil, nil, nil, nil, nil, 512, nil, nil, 512, +512, 512, 512, 512, 512, 512, 512, nil, 512, 512, 512, nil, 512, 512, nil, +nil, nil, 512, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 512, nil, nil, 512, nil, nil, 512, 512, +nil, nil, 512, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 512, 512, 512, 512, nil, 512, 512, 512, +512, nil, nil, nil, nil, 512, 512, nil, nil, nil, 515, 515, 515, 512, 515, +512, 512, 512, 515, 515, nil, nil, nil, 515, nil, 515, 515, 515, 515, 515, +515, 515, nil, nil, nil, nil, nil, 515, 515, 515, 515, 515, 515, 515, nil, +nil, 515, nil, nil, nil, nil, nil, nil, 515, nil, nil, 515, 515, 515, 515, +515, 515, 515, 515, nil, 515, 515, 515, nil, 515, 515, nil, 515, 515, 515, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 515, nil, nil, 515, nil, nil, 515, 515, nil, nil, 515, +nil, nil, nil, nil, nil, 515, nil, nil, nil, nil, nil, nil, nil, nil, 515, +nil, nil, nil, nil, 515, 515, 515, 515, nil, 515, 515, 515, 515, nil, nil, +nil, nil, 515, 515, nil, nil, nil, 516, 516, 516, 515, 516, 515, 515, 515, +516, 516, nil, nil, nil, 516, nil, 516, 516, 516, 516, 516, 516, 516, nil, +nil, nil, nil, nil, 516, 516, 516, 516, 516, 516, 516, nil, nil, 516, nil, +nil, nil, nil, nil, nil, 516, nil, nil, 516, 516, 516, 516, 516, 516, 516, +516, nil, 516, 516, 516, nil, 516, 516, nil, 516, 516, 516, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 516, nil, nil, 516, nil, nil, 516, 516, nil, nil, 516, nil, nil, nil, +nil, nil, 516, nil, nil, nil, nil, nil, nil, nil, nil, 516, nil, nil, nil, +nil, 516, 516, 516, 516, nil, 516, 516, 516, 516, nil, nil, nil, nil, 516, +516, nil, nil, nil, 520, 520, 520, 516, 520, 516, 516, 516, 520, 520, nil, +nil, nil, 520, nil, 520, 520, 520, 520, 520, 520, 520, nil, nil, nil, nil, +nil, 520, 520, 520, 520, 520, 520, 520, nil, nil, 520, nil, nil, nil, nil, +nil, nil, 520, nil, nil, 520, 520, 520, 520, 520, 520, 520, 520, nil, 520, +520, 520, nil, 520, 520, nil, 520, 520, 520, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 520, nil, +nil, 520, nil, nil, 520, 520, nil, nil, 520, nil, nil, nil, nil, nil, 520, +nil, nil, nil, nil, nil, nil, nil, nil, 520, nil, nil, nil, nil, 520, 520, +520, 520, nil, 520, 520, 520, 520, nil, nil, nil, nil, 520, 520, nil, nil, +nil, 526, 526, 526, 520, 526, 520, 520, 520, 526, 526, nil, nil, nil, 526, +nil, 526, 526, 526, 526, 526, 526, 526, nil, nil, nil, nil, nil, 526, 526, +526, 526, 526, 526, 526, nil, nil, 526, nil, nil, nil, nil, nil, nil, 526, +nil, nil, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, nil, +526, 526, nil, 526, 526, 526, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 526, nil, nil, 526, nil, +nil, 526, 526, nil, nil, 526, nil, 526, nil, nil, nil, 526, nil, nil, 526, +nil, nil, nil, nil, nil, 526, nil, nil, nil, nil, 526, 526, 526, 526, nil, +526, 526, 526, 526, nil, nil, nil, nil, 526, 526, nil, nil, nil, 529, 529, +529, 526, 529, 526, 526, 526, 529, 529, nil, nil, nil, 529, nil, 529, 529, +529, 529, 529, 529, 529, nil, nil, nil, nil, nil, 529, 529, 529, 529, 529, +529, 529, nil, nil, 529, nil, nil, nil, nil, nil, nil, 529, nil, nil, 529, +529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, nil, 529, 529, nil, +529, 529, 529, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 529, nil, nil, 529, nil, nil, 529, 529, +nil, nil, 529, nil, nil, nil, nil, nil, 529, nil, nil, 529, nil, nil, nil, +nil, nil, 529, nil, nil, nil, nil, 529, 529, 529, 529, nil, 529, 529, 529, +529, nil, nil, nil, nil, 529, 529, nil, nil, nil, 554, 554, 554, 529, 554, +529, 529, 529, 554, 554, nil, nil, nil, 554, nil, 554, 554, 554, 554, 554, +554, 554, nil, nil, nil, nil, nil, 554, 554, 554, 554, 554, 554, 554, nil, +nil, 554, nil, nil, nil, nil, nil, nil, 554, nil, nil, 554, 554, 554, 554, +554, 554, 554, 554, nil, 554, 554, 554, nil, 554, 554, nil, 554, 554, 554, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 554, nil, nil, 554, nil, nil, 554, 554, nil, nil, 554, +nil, nil, nil, nil, nil, 554, nil, nil, nil, nil, nil, nil, nil, nil, 554, +nil, nil, nil, nil, 554, 554, 554, 554, nil, 554, 554, 554, 554, nil, nil, +nil, nil, 554, 554, nil, nil, nil, 574, 574, 574, 554, 574, 554, 554, 554, +574, 574, nil, nil, nil, 574, nil, 574, 574, 574, 574, 574, 574, 574, nil, +nil, nil, nil, nil, 574, 574, 574, 574, 574, 574, 574, nil, nil, 574, nil, +nil, nil, nil, nil, nil, 574, nil, nil, 574, 574, 574, 574, 574, 574, 574, +574, nil, 574, 574, 574, nil, 574, 574, nil, 574, 574, 574, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 574, nil, nil, 574, nil, nil, 574, 574, nil, nil, 574, nil, 574, nil, +nil, nil, 574, nil, nil, nil, nil, nil, nil, nil, nil, 574, nil, nil, nil, +nil, 574, 574, 574, 574, nil, 574, 574, 574, 574, nil, nil, nil, nil, 574, +574, nil, nil, nil, 575, 575, 575, 574, 575, 574, 574, 574, 575, 575, nil, +nil, nil, 575, nil, 575, 575, 575, 575, 575, 575, 575, nil, nil, nil, nil, +nil, 575, 575, 575, 575, 575, 575, 575, nil, nil, 575, nil, nil, nil, nil, +nil, nil, 575, nil, nil, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, +575, 575, nil, 575, 575, nil, 575, 575, 575, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 575, nil, +nil, 575, nil, nil, 575, 575, nil, nil, 575, nil, 575, nil, 575, nil, 575, +nil, nil, 575, nil, nil, nil, nil, nil, 575, nil, nil, nil, nil, 575, 575, +575, 575, nil, 575, 575, 575, 575, nil, nil, nil, nil, 575, 575, nil, nil, +nil, 585, 585, 585, 575, 585, 575, 575, 575, 585, 585, nil, nil, nil, 585, +nil, 585, 585, 585, 585, 585, 585, 585, nil, nil, nil, nil, nil, 585, 585, +585, 585, 585, 585, 585, nil, nil, 585, nil, nil, nil, nil, nil, nil, 585, +nil, nil, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, nil, +585, 585, nil, 585, 585, 585, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 585, nil, nil, 585, nil, +nil, 585, 585, nil, nil, 585, nil, 585, nil, 585, nil, 585, nil, nil, 585, +nil, nil, nil, nil, nil, 585, nil, nil, nil, nil, 585, 585, 585, 585, nil, +585, 585, 585, 585, nil, nil, nil, nil, 585, 585, nil, nil, nil, 619, 619, +619, 585, 619, 585, 585, 585, 619, 619, nil, nil, nil, 619, nil, 619, 619, +619, 619, 619, 619, 619, nil, nil, nil, nil, nil, 619, 619, 619, 619, 619, +619, 619, nil, nil, 619, nil, nil, nil, nil, nil, nil, 619, nil, nil, 619, +619, 619, 619, 619, 619, 619, 619, nil, 619, 619, 619, nil, 619, 619, nil, +619, 619, 619, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 619, nil, nil, 619, nil, nil, 619, 619, +nil, nil, 619, nil, 619, nil, nil, nil, 619, nil, nil, nil, nil, nil, nil, +nil, nil, 619, nil, nil, nil, nil, 619, 619, 619, 619, nil, 619, 619, 619, +619, nil, nil, nil, nil, 619, 619, nil, nil, nil, 620, 620, 620, 619, 620, +619, 619, 619, 620, 620, nil, nil, nil, 620, nil, 620, 620, 620, 620, 620, +620, 620, nil, nil, nil, nil, nil, 620, 620, 620, 620, 620, 620, 620, nil, +nil, 620, nil, nil, nil, nil, nil, nil, 620, nil, nil, 620, 620, 620, 620, +620, 620, 620, 620, nil, 620, 620, 620, nil, 620, 620, nil, 620, 620, 620, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 620, nil, nil, 620, nil, nil, 620, 620, nil, nil, 620, +nil, nil, nil, nil, nil, 620, nil, nil, nil, nil, nil, nil, nil, nil, 620, +nil, nil, nil, nil, 620, 620, 620, 620, nil, 620, 620, 620, 620, nil, nil, +nil, nil, 620, 620, nil, nil, nil, 623, 623, 623, 620, 623, 620, 620, 620, +623, 623, nil, nil, nil, 623, nil, 623, 623, 623, 623, 623, 623, 623, nil, +nil, nil, nil, nil, 623, 623, 623, 623, 623, 623, 623, nil, nil, 623, nil, +nil, nil, nil, nil, nil, 623, nil, nil, 623, 623, 623, 623, 623, 623, 623, +623, 623, 623, 623, 623, nil, 623, 623, nil, 623, 623, 623, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 623, nil, nil, 623, nil, nil, 623, 623, nil, nil, 623, nil, 623, nil, +623, nil, 623, nil, nil, 623, nil, nil, nil, nil, nil, 623, nil, nil, nil, +nil, 623, 623, 623, 623, nil, 623, 623, 623, 623, nil, nil, nil, nil, 623, +623, nil, nil, nil, 624, 624, 624, 623, 624, 623, 623, 623, 624, 624, nil, +nil, nil, 624, nil, 624, 624, 624, 624, 624, 624, 624, nil, nil, nil, nil, +nil, 624, 624, 624, 624, 624, 624, 624, nil, nil, 624, nil, nil, nil, nil, +nil, nil, 624, nil, nil, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, +624, 624, nil, 624, 624, nil, 624, 624, 624, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 624, nil, +nil, 624, nil, nil, 624, 624, nil, nil, 624, nil, nil, nil, 624, nil, 624, +nil, nil, 624, nil, nil, nil, nil, nil, 624, nil, nil, nil, nil, 624, 624, +624, 624, nil, 624, 624, 624, 624, nil, nil, nil, nil, 624, 624, nil, nil, +nil, 625, 625, 625, 624, 625, 624, 624, 624, 625, 625, nil, nil, nil, 625, +nil, 625, 625, 625, 625, 625, 625, 625, nil, nil, nil, nil, nil, 625, 625, +625, 625, 625, 625, 625, nil, nil, 625, nil, nil, nil, nil, nil, nil, 625, +nil, nil, 625, 625, 625, 625, 625, 625, 625, 625, nil, 625, 625, 625, nil, +625, 625, nil, 625, 625, 625, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 625, nil, nil, 625, nil, +nil, 625, 625, nil, nil, 625, nil, nil, nil, nil, nil, 625, nil, nil, nil, +nil, nil, nil, nil, nil, 625, nil, nil, nil, nil, 625, 625, 625, 625, nil, +625, 625, 625, 625, nil, nil, nil, nil, 625, 625, nil, nil, nil, 626, 626, +626, 625, 626, 625, 625, 625, 626, 626, nil, nil, nil, 626, nil, 626, 626, +626, 626, 626, 626, 626, nil, nil, nil, nil, nil, 626, 626, 626, 626, 626, +626, 626, nil, nil, 626, nil, nil, nil, nil, nil, nil, 626, nil, nil, 626, +626, 626, 626, 626, 626, 626, 626, nil, 626, 626, 626, nil, 626, 626, nil, +626, 626, 626, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 626, nil, nil, 626, nil, nil, 626, 626, +nil, nil, 626, nil, nil, nil, nil, nil, 626, nil, nil, nil, nil, nil, nil, +nil, nil, 626, nil, nil, nil, nil, 626, 626, 626, 626, nil, 626, 626, 626, +626, nil, nil, nil, nil, 626, 626, nil, nil, nil, 630, 630, 630, 626, 630, +626, 626, 626, 630, 630, nil, nil, nil, 630, nil, 630, 630, 630, 630, 630, +630, 630, nil, nil, nil, nil, nil, 630, 630, 630, 630, 630, 630, 630, nil, +nil, 630, nil, nil, nil, nil, nil, nil, 630, nil, nil, 630, 630, 630, 630, +630, 630, 630, 630, nil, 630, 630, 630, nil, 630, 630, nil, 630, 630, 630, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 630, nil, nil, 630, nil, nil, 630, 630, nil, nil, 630, +nil, nil, nil, nil, nil, 630, nil, nil, nil, nil, nil, nil, nil, nil, 630, +nil, nil, nil, nil, 630, 630, 630, 630, nil, 630, 630, 630, 630, nil, nil, +nil, nil, 630, 630, nil, nil, nil, 631, 631, 631, 630, 631, 630, 630, 630, +631, 631, nil, nil, nil, 631, nil, 631, 631, 631, 631, 631, 631, 631, nil, +nil, nil, nil, nil, 631, 631, 631, 631, 631, 631, 631, nil, nil, 631, nil, +nil, nil, nil, nil, nil, 631, nil, nil, 631, 631, 631, 631, 631, 631, 631, +631, nil, 631, 631, 631, nil, 631, 631, nil, 631, 631, 631, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 631, nil, nil, 631, nil, nil, 631, 631, nil, nil, 631, nil, nil, nil, +nil, nil, 631, nil, nil, nil, nil, nil, nil, nil, nil, 631, nil, nil, nil, +nil, 631, 631, 631, 631, nil, 631, 631, 631, 631, nil, nil, nil, nil, 631, +631, nil, nil, nil, 634, 634, 634, 631, 634, 631, 631, 631, 634, 634, nil, +nil, nil, 634, nil, 634, 634, 634, 634, 634, 634, 634, nil, nil, nil, nil, +nil, 634, 634, 634, 634, 634, 634, 634, nil, nil, 634, nil, nil, nil, nil, +nil, nil, 634, nil, nil, 634, 634, 634, 634, 634, 634, 634, 634, nil, 634, +634, 634, nil, 634, 634, nil, 634, 634, 634, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 634, nil, +nil, 634, nil, nil, 634, 634, nil, nil, 634, nil, nil, nil, nil, nil, 634, +nil, nil, nil, nil, nil, nil, nil, nil, 634, nil, nil, nil, nil, 634, 634, +634, 634, nil, 634, 634, 634, 634, nil, nil, nil, nil, 634, 634, nil, nil, +nil, 635, 635, 635, 634, 635, 634, 634, 634, 635, 635, nil, nil, nil, 635, +nil, 635, 635, 635, 635, 635, 635, 635, nil, nil, nil, nil, nil, 635, 635, +635, 635, 635, 635, 635, nil, nil, 635, nil, nil, nil, nil, nil, nil, 635, +nil, nil, 635, 635, 635, 635, 635, 635, 635, 635, nil, 635, 635, 635, nil, +635, 635, nil, 635, 635, 635, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 635, nil, nil, 635, nil, +nil, 635, 635, nil, nil, 635, nil, nil, nil, nil, nil, 635, nil, nil, nil, +nil, nil, nil, nil, nil, 635, nil, nil, nil, nil, 635, 635, 635, 635, nil, +635, 635, 635, 635, nil, nil, nil, nil, 635, 635, nil, nil, nil, 659, 659, +659, 635, 659, 635, 635, 635, 659, 659, nil, nil, nil, 659, nil, 659, 659, +659, 659, 659, 659, 659, nil, nil, nil, nil, nil, 659, 659, 659, 659, 659, +659, 659, nil, nil, 659, nil, nil, nil, nil, nil, nil, 659, nil, nil, 659, +659, 659, 659, 659, 659, 659, 659, nil, 659, 659, 659, nil, 659, 659, nil, +659, 659, 659, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 659, nil, nil, 659, nil, nil, 659, 659, +nil, nil, 659, nil, nil, nil, nil, nil, 659, nil, nil, nil, nil, nil, nil, +nil, nil, 659, nil, nil, nil, nil, 659, 659, 659, 659, nil, 659, 659, 659, +659, nil, nil, nil, nil, 659, 659, nil, nil, nil, 662, 662, 662, 659, 662, +659, 659, 659, 662, 662, nil, nil, nil, 662, nil, 662, 662, 662, 662, 662, +662, 662, nil, nil, nil, nil, nil, 662, 662, 662, 662, 662, 662, 662, nil, +nil, 662, nil, nil, nil, nil, nil, nil, 662, nil, nil, 662, 662, 662, 662, +662, 662, 662, 662, nil, 662, 662, 662, nil, 662, 662, nil, 662, 662, 662, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 662, nil, nil, 662, nil, nil, 662, 662, nil, nil, 662, +nil, nil, nil, nil, nil, 662, nil, nil, nil, nil, nil, nil, nil, nil, 662, +nil, nil, nil, nil, 662, 662, 662, 662, nil, 662, 662, 662, 662, nil, nil, +nil, nil, 662, 662, nil, nil, nil, 666, 666, 666, 662, 666, 662, 662, 662, +666, 666, nil, nil, nil, 666, nil, 666, 666, 666, 666, 666, 666, 666, nil, +nil, nil, nil, nil, 666, 666, 666, 666, 666, 666, 666, nil, nil, 666, nil, +nil, nil, nil, nil, nil, 666, nil, nil, 666, 666, 666, 666, 666, 666, 666, +666, nil, 666, 666, 666, nil, 666, 666, nil, nil, nil, 666, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 666, nil, nil, 666, nil, nil, 666, 666, nil, nil, 666, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 666, 666, 666, 666, nil, 666, 666, 666, 666, nil, nil, nil, nil, 666, +666, nil, nil, nil, 677, 677, 677, 666, 677, 666, 666, 666, 677, 677, nil, +nil, nil, 677, nil, 677, 677, 677, 677, 677, 677, 677, nil, nil, nil, nil, +nil, 677, 677, 677, 677, 677, 677, 677, nil, nil, 677, nil, nil, nil, nil, +nil, nil, 677, nil, nil, 677, 677, 677, 677, 677, 677, 677, 677, nil, 677, +677, 677, nil, 677, 677, nil, nil, nil, 677, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 677, nil, +nil, 677, nil, nil, 677, 677, nil, nil, 677, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 677, 677, +677, 677, nil, 677, 677, 677, 677, nil, nil, nil, nil, 677, 677, nil, nil, +nil, 682, 682, 682, 677, 682, 677, 677, 677, 682, 682, nil, nil, nil, 682, +nil, 682, 682, 682, 682, 682, 682, 682, nil, nil, nil, nil, nil, 682, 682, +682, 682, 682, 682, 682, nil, nil, 682, nil, nil, nil, nil, nil, nil, 682, +nil, nil, 682, 682, 682, 682, 682, 682, 682, 682, nil, 682, 682, 682, nil, +682, 682, nil, 682, 682, 682, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 682, nil, nil, 682, nil, +nil, 682, 682, nil, nil, 682, nil, 682, nil, nil, nil, 682, nil, nil, nil, +nil, nil, nil, nil, nil, 682, nil, nil, nil, nil, 682, 682, 682, 682, nil, +682, 682, 682, 682, nil, nil, nil, nil, 682, 682, nil, nil, nil, 699, 699, +699, 682, 699, 682, 682, 682, 699, 699, nil, nil, nil, 699, nil, 699, 699, +699, 699, 699, 699, 699, nil, nil, nil, nil, nil, 699, 699, 699, 699, 699, +699, 699, nil, nil, 699, nil, nil, nil, nil, nil, nil, 699, nil, nil, 699, +699, 699, 699, 699, 699, 699, 699, nil, 699, 699, 699, nil, 699, 699, nil, +699, 699, 699, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 699, nil, nil, 699, nil, nil, 699, 699, +nil, nil, 699, nil, nil, nil, nil, nil, 699, nil, nil, nil, nil, nil, nil, +nil, nil, 699, nil, nil, nil, nil, 699, 699, 699, 699, nil, 699, 699, 699, +699, nil, nil, nil, nil, 699, 699, nil, nil, nil, 725, 725, 725, 699, 725, +699, 699, 699, 725, 725, nil, nil, nil, 725, nil, 725, 725, 725, 725, 725, +725, 725, nil, nil, nil, nil, nil, 725, 725, 725, 725, 725, 725, 725, nil, +nil, 725, nil, nil, nil, nil, nil, nil, 725, nil, nil, 725, 725, 725, 725, +725, 725, 725, 725, nil, 725, 725, 725, nil, 725, 725, nil, 725, 725, 725, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 725, nil, nil, 725, nil, nil, 725, 725, nil, nil, 725, +nil, nil, nil, nil, nil, 725, nil, nil, nil, nil, nil, nil, nil, nil, 725, +nil, nil, nil, nil, 725, 725, 725, 725, nil, 725, 725, 725, 725, nil, nil, +nil, nil, 725, 725, nil, nil, nil, 731, 731, 731, 725, 731, 725, 725, 725, +731, 731, nil, nil, nil, 731, nil, 731, 731, 731, 731, 731, 731, 731, nil, +nil, nil, nil, nil, 731, 731, 731, 731, 731, 731, 731, nil, nil, 731, nil, +nil, nil, nil, nil, nil, 731, nil, nil, 731, 731, 731, 731, 731, 731, 731, +731, nil, 731, 731, 731, nil, 731, 731, nil, 731, 731, 731, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 731, nil, nil, 731, nil, nil, 731, 731, nil, nil, 731, nil, nil, nil, +nil, nil, 731, nil, nil, nil, nil, nil, nil, nil, nil, 731, nil, nil, nil, +nil, 731, 731, 731, 731, nil, 731, 731, 731, 731, nil, nil, nil, nil, 731, +731, nil, nil, nil, 754, 754, 754, 731, 754, 731, 731, 731, 754, 754, nil, +nil, nil, 754, nil, 754, 754, 754, 754, 754, 754, 754, nil, nil, nil, nil, +nil, 754, 754, 754, 754, 754, 754, 754, nil, nil, 754, nil, nil, nil, nil, +nil, nil, 754, nil, nil, 754, 754, 754, 754, 754, 754, 754, 754, nil, 754, +754, 754, nil, 754, 754, nil, 754, 754, 754, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 754, nil, +nil, 754, nil, nil, 754, 754, nil, nil, 754, nil, nil, nil, nil, nil, 754, +nil, nil, nil, nil, nil, nil, nil, nil, 754, nil, nil, nil, nil, 754, 754, +754, 754, nil, 754, 754, 754, 754, nil, nil, nil, nil, 754, 754, nil, nil, +nil, 756, 756, 756, 754, 756, 754, 754, 754, 756, 756, nil, nil, nil, 756, +nil, 756, 756, 756, 756, 756, 756, 756, nil, nil, nil, nil, nil, 756, 756, +756, 756, 756, 756, 756, nil, nil, 756, nil, nil, nil, nil, nil, nil, 756, +nil, nil, 756, 756, 756, 756, 756, 756, 756, 756, nil, 756, 756, 756, nil, +756, 756, nil, 756, 756, 756, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 756, nil, nil, 756, nil, +nil, 756, 756, nil, nil, 756, nil, nil, nil, nil, nil, 756, nil, nil, nil, +nil, nil, nil, nil, nil, 756, nil, nil, nil, nil, 756, 756, 756, 756, nil, +756, 756, 756, 756, nil, nil, nil, nil, 756, 756, nil, nil, nil, 770, 770, +770, 756, 770, 756, 756, 756, 770, 770, nil, nil, nil, 770, nil, 770, 770, +770, 770, 770, 770, 770, nil, nil, nil, nil, nil, 770, 770, 770, 770, 770, +770, 770, nil, nil, 770, nil, nil, nil, nil, nil, nil, 770, nil, nil, 770, +770, 770, 770, 770, 770, 770, 770, nil, 770, 770, 770, nil, 770, 770, nil, +770, 770, 770, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 770, nil, nil, 770, nil, nil, 770, 770, +nil, nil, 770, nil, nil, nil, nil, nil, 770, nil, nil, nil, nil, nil, nil, +nil, nil, 770, nil, nil, nil, nil, 770, 770, 770, 770, nil, 770, 770, 770, +770, nil, nil, nil, nil, 770, 770, nil, nil, nil, 771, 771, 771, 770, 771, +770, 770, 770, 771, 771, nil, nil, nil, 771, nil, 771, 771, 771, 771, 771, +771, 771, nil, nil, nil, nil, nil, 771, 771, 771, 771, 771, 771, 771, nil, +nil, 771, nil, nil, nil, nil, nil, nil, 771, nil, nil, 771, 771, 771, 771, +771, 771, 771, 771, nil, 771, 771, 771, nil, 771, 771, nil, 771, 771, 771, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 771, nil, nil, 771, nil, nil, 771, 771, nil, nil, 771, +nil, nil, nil, nil, nil, 771, nil, nil, nil, nil, nil, nil, nil, nil, 771, +nil, nil, nil, nil, 771, 771, 771, 771, nil, 771, 771, 771, 771, nil, nil, +nil, nil, 771, 771, nil, nil, nil, 772, 772, 772, 771, 772, 771, 771, 771, +772, 772, nil, nil, nil, 772, nil, 772, 772, 772, 772, 772, 772, 772, nil, +nil, nil, nil, nil, 772, 772, 772, 772, 772, 772, 772, nil, nil, 772, nil, +nil, nil, nil, nil, nil, 772, nil, nil, 772, 772, 772, 772, 772, 772, 772, +772, nil, 772, 772, 772, nil, 772, 772, nil, 772, 772, 772, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 772, nil, nil, 772, nil, nil, 772, 772, nil, nil, 772, nil, nil, nil, +nil, nil, 772, nil, nil, nil, nil, nil, nil, nil, nil, 772, nil, nil, nil, +nil, 772, 772, 772, 772, nil, 772, 772, 772, 772, nil, nil, nil, nil, 772, +772, nil, nil, nil, 773, 773, 773, 772, 773, 772, 772, 772, 773, 773, nil, +nil, nil, 773, nil, 773, 773, 773, 773, 773, 773, 773, nil, nil, nil, nil, +nil, 773, 773, 773, 773, 773, 773, 773, nil, nil, 773, nil, nil, nil, nil, +nil, nil, 773, nil, nil, 773, 773, 773, 773, 773, 773, 773, 773, nil, 773, +773, 773, nil, 773, 773, nil, 773, 773, 773, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 773, nil, +nil, 773, nil, nil, 773, 773, nil, nil, 773, nil, nil, nil, nil, nil, 773, +nil, nil, nil, nil, nil, nil, nil, nil, 773, nil, nil, nil, nil, 773, 773, +773, 773, nil, 773, 773, 773, 773, nil, nil, nil, nil, 773, 773, nil, nil, +nil, 787, 787, 787, 773, 787, 773, 773, 773, 787, 787, nil, nil, nil, 787, +nil, 787, 787, 787, 787, 787, 787, 787, nil, nil, nil, nil, nil, 787, 787, +787, 787, 787, 787, 787, nil, nil, 787, nil, nil, nil, nil, nil, nil, 787, +nil, nil, 787, 787, 787, 787, 787, 787, 787, 787, nil, 787, 787, 787, nil, +787, 787, nil, nil, nil, 787, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 787, nil, nil, 787, nil, +nil, 787, 787, nil, nil, 787, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 787, 787, 787, 787, nil, +787, 787, 787, 787, nil, nil, nil, nil, 787, 787, nil, nil, nil, 837, 837, +837, 787, 837, 787, 787, 787, 837, 837, nil, nil, nil, 837, nil, 837, 837, +837, 837, 837, 837, 837, nil, nil, nil, nil, nil, 837, 837, 837, 837, 837, +837, 837, nil, nil, 837, nil, nil, nil, nil, nil, nil, 837, nil, nil, 837, +837, 837, 837, 837, 837, 837, 837, nil, 837, 837, 837, nil, 837, 837, nil, +837, 837, 837, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 837, nil, nil, 837, nil, nil, 837, 837, +nil, nil, 837, nil, nil, nil, nil, nil, 837, nil, nil, nil, nil, nil, nil, +nil, nil, 837, nil, nil, nil, nil, 837, 837, 837, 837, nil, 837, 837, 837, +837, nil, nil, nil, nil, 837, 837, nil, nil, nil, 842, 842, 842, 837, 842, +837, 837, 837, 842, 842, nil, nil, nil, 842, nil, 842, 842, 842, 842, 842, +842, 842, nil, nil, nil, nil, nil, 842, 842, 842, 842, 842, 842, 842, nil, +nil, 842, nil, nil, nil, nil, nil, nil, 842, nil, nil, 842, 842, 842, 842, +842, 842, 842, 842, nil, 842, 842, 842, nil, 842, 842, nil, 842, 842, 842, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 842, nil, nil, 842, nil, nil, 842, 842, nil, nil, 842, +nil, 842, nil, nil, nil, 842, nil, nil, nil, nil, nil, nil, nil, nil, 842, +nil, nil, nil, nil, 842, 842, 842, 842, nil, 842, 842, 842, 842, nil, nil, +nil, nil, 842, 842, nil, nil, nil, 859, 859, 859, 842, 859, 842, 842, 842, +859, 859, nil, nil, nil, 859, nil, 859, 859, 859, 859, 859, 859, 859, nil, +nil, nil, nil, nil, 859, 859, 859, 859, 859, 859, 859, nil, nil, 859, nil, +nil, nil, nil, nil, nil, 859, nil, nil, 859, 859, 859, 859, 859, 859, 859, +859, 859, 859, 859, 859, nil, 859, 859, nil, 859, 859, 859, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 859, nil, nil, 859, nil, nil, 859, 859, nil, nil, 859, nil, nil, nil, +859, nil, 859, nil, nil, 859, nil, nil, nil, nil, nil, 859, nil, nil, nil, +nil, 859, 859, 859, 859, nil, 859, 859, 859, 859, nil, nil, nil, nil, 859, +859, nil, nil, nil, 860, 860, 860, 859, 860, 859, 859, 859, 860, 860, nil, +nil, nil, 860, nil, 860, 860, 860, 860, 860, 860, 860, nil, nil, nil, nil, +nil, 860, 860, 860, 860, 860, 860, 860, nil, nil, 860, nil, nil, nil, nil, +nil, nil, 860, nil, nil, 860, 860, 860, 860, 860, 860, 860, 860, nil, 860, +860, 860, nil, 860, 860, nil, 860, 860, 860, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 860, nil, +nil, 860, nil, nil, 860, 860, nil, nil, 860, nil, nil, nil, nil, nil, 860, +nil, nil, nil, nil, nil, nil, nil, nil, 860, nil, nil, nil, nil, 860, 860, +860, 860, nil, 860, 860, 860, 860, nil, nil, nil, nil, 860, 860, nil, nil, +nil, 874, 874, 874, 860, 874, 860, 860, 860, 874, 874, nil, nil, nil, 874, +nil, 874, 874, 874, 874, 874, 874, 874, nil, nil, nil, nil, nil, 874, 874, +874, 874, 874, 874, 874, nil, nil, 874, nil, nil, nil, nil, nil, nil, 874, +nil, nil, 874, 874, 874, 874, 874, 874, 874, 874, nil, 874, 874, 874, nil, +874, 874, nil, nil, nil, 874, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 874, nil, nil, 874, nil, +nil, 874, 874, nil, nil, 874, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 874, 874, 874, 874, nil, +874, 874, 874, 874, nil, nil, nil, nil, 874, 874, nil, nil, nil, 886, 886, +886, 874, 886, 874, 874, 874, 886, 886, nil, nil, nil, 886, nil, 886, 886, +886, 886, 886, 886, 886, nil, nil, nil, nil, nil, 886, 886, 886, 886, 886, +886, 886, nil, nil, 886, nil, nil, nil, nil, nil, nil, 886, nil, nil, 886, +886, 886, 886, 886, 886, 886, 886, nil, 886, 886, 886, nil, 886, 886, nil, +nil, nil, 886, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 886, nil, nil, 886, nil, nil, 886, 886, +nil, nil, 886, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 886, 886, 886, 886, nil, 886, 886, 886, +886, nil, nil, nil, nil, 886, 886, nil, nil, nil, 923, 923, 923, 886, 923, +886, 886, 886, 923, 923, nil, nil, nil, 923, nil, 923, 923, 923, 923, 923, +923, 923, nil, nil, nil, nil, nil, 923, 923, 923, 923, 923, 923, 923, nil, +nil, 923, nil, nil, nil, nil, nil, nil, 923, nil, nil, 923, 923, 923, 923, +923, 923, 923, 923, nil, 923, 923, 923, nil, 923, 923, nil, 923, 923, 923, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 923, nil, nil, 923, nil, nil, 923, 923, nil, nil, 923, +nil, nil, nil, nil, nil, 923, nil, nil, nil, nil, nil, nil, nil, nil, 923, +nil, nil, nil, nil, 923, 923, 923, 923, nil, 923, 923, 923, 923, nil, nil, +nil, nil, 923, 923, nil, nil, nil, 985, 985, 985, 923, 985, 923, 923, 923, +985, 985, nil, nil, nil, 985, nil, 985, 985, 985, 985, 985, 985, 985, nil, +nil, nil, nil, nil, 985, 985, 985, 985, 985, 985, 985, nil, nil, 985, nil, +nil, nil, nil, nil, nil, 985, nil, nil, 985, 985, 985, 985, 985, 985, 985, +985, 985, 985, 985, 985, nil, 985, 985, nil, 985, 985, 985, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 985, nil, nil, 985, nil, nil, 985, 985, nil, nil, 985, nil, 985, nil, +985, nil, 985, nil, nil, 985, nil, nil, nil, nil, nil, 985, nil, nil, nil, +nil, 985, 985, 985, 985, nil, 985, 985, 985, 985, nil, nil, nil, nil, 985, +985, nil, nil, nil, nil, 56, nil, 985, nil, 985, 985, 985, 56, 56, 56, +nil, nil, 56, 56, 56, nil, 56, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 56, 56, 56, nil, nil, nil, nil, nil, nil, nil, 56, 56, nil, 56, +56, 56, 56, 56, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 56, 56, 56, +56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, nil, nil, 56, 56, +56, nil, nil, 56, nil, nil, 56, nil, nil, 56, 56, nil, 56, nil, 56, +nil, 56, nil, 56, 56, nil, 56, 56, 56, 56, 56, nil, 56, nil, 56, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 56, nil, +nil, 56, 56, 56, 56, 424, 56, nil, 56, nil, nil, nil, 424, 424, 424, +nil, nil, 424, 424, 424, nil, 424, nil, nil, nil, nil, nil, nil, nil, nil, +424, 424, 424, 424, nil, nil, nil, nil, nil, nil, nil, 424, 424, nil, 424, +424, 424, 424, 424, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 424, 424, 424, +424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, nil, nil, 424, 424, +424, nil, nil, 424, nil, nil, 424, nil, nil, 424, 424, nil, 424, nil, 424, +nil, 424, nil, 424, 424, nil, 424, 424, 424, 424, 424, nil, 424, 424, 424, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 424, nil, +nil, 424, 424, 424, 424, 425, 424, nil, 424, nil, nil, nil, 425, 425, 425, +nil, nil, 425, 425, 425, nil, 425, nil, nil, nil, nil, nil, nil, nil, nil, +425, 425, 425, 425, nil, nil, nil, nil, nil, nil, nil, 425, 425, nil, 425, +425, 425, 425, 425, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 425, 425, 425, +425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, nil, nil, 425, 425, +425, nil, nil, 425, nil, nil, 425, nil, nil, 425, 425, nil, 425, nil, 425, +nil, 425, nil, 425, 425, nil, 425, 425, 425, 425, 425, nil, 425, 425, 425, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 425, nil, +nil, 425, 425, 425, 425, 27, 425, nil, 425, nil, nil, nil, 27, 27, 27, +nil, nil, 27, 27, 27, nil, 27, nil, nil, nil, nil, nil, nil, nil, nil, +27, 27, 27, nil, nil, nil, nil, nil, nil, nil, nil, 27, 27, nil, 27, +27, 27, 27, 27, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, nil, nil, 27, 27, +27, nil, nil, 27, nil, 27, 27, nil, nil, 27, 27, nil, 27, nil, 27, +nil, 27, nil, 27, 27, nil, 27, 27, 27, 27, 27, 28, 27, 27, 27, +nil, nil, nil, 28, 28, 28, nil, nil, 28, 28, 28, nil, 28, 27, nil, +nil, 27, 27, nil, 27, nil, 27, 28, 28, nil, nil, nil, nil, nil, nil, +nil, nil, 28, 28, nil, 28, 28, 28, 28, 28, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, nil, nil, 28, 28, 28, nil, nil, 28, nil, 28, 28, nil, nil, +28, 28, nil, 28, nil, 28, nil, 28, nil, 28, 28, nil, 28, 28, 28, +28, 28, nil, 28, 415, 28, nil, nil, nil, nil, nil, 415, 415, 415, nil, +nil, 415, 415, 415, 28, 415, nil, 28, 28, nil, 28, nil, 28, nil, 415, +415, 415, nil, nil, nil, nil, nil, nil, nil, nil, 415, 415, nil, 415, 415, +415, 415, 415, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 415, 415, 415, 415, +415, 415, 415, 415, 415, 415, 415, 415, 415, 415, nil, nil, 415, 415, 415, +nil, nil, 415, nil, 415, 415, nil, nil, 415, 415, nil, 415, nil, 415, nil, +415, nil, 415, 415, nil, 415, 415, 415, 415, 415, nil, 415, 415, 415, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 415, nil, 474, +415, 415, nil, 415, nil, 415, 474, 474, 474, nil, nil, 474, 474, 474, 646, +474, 646, 646, 646, 646, 646, nil, nil, nil, 474, 474, nil, nil, nil, nil, +646, nil, nil, nil, nil, 474, 474, nil, 474, 474, 474, 474, 474, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 646, 336, nil, 336, 336, 336, 336, 336, +nil, 646, 646, 646, 646, nil, nil, nil, 646, 336, 534, nil, 534, 534, 534, +534, 534, 474, nil, nil, nil, nil, nil, nil, 474, nil, 534, nil, nil, 474, +474, 336, 336, nil, 646, nil, nil, nil, nil, nil, 336, 336, 336, 336, nil, +nil, nil, 336, 534, nil, nil, nil, 474, 474, nil, nil, nil, 534, 534, 534, +534, nil, nil, nil, 534, nil, nil, 474, nil, nil, 474, nil, nil, nil, nil, +474, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, nil, nil, nil, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, nil, nil, nil, nil, nil, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, nil, 8, nil, nil, nil, nil, nil, +nil, nil, nil, 8, 8, nil, 8, 8, 8, 8, 8, 8, 8, nil, nil, +8, 8, nil, nil, nil, 8, 8, 8, 8, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 8, 8, nil, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, nil, nil, 8, 8, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 8, 9, 9, 9, 9, 9, +9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, +9, 9, 9, 9, nil, nil, nil, 9, 9, 9, 9, 9, 9, 9, 9, +9, 9, nil, nil, nil, nil, nil, 9, 9, 9, 9, 9, 9, 9, 9, +9, nil, nil, 9, nil, nil, nil, nil, nil, nil, nil, nil, 9, 9, nil, +9, 9, 9, 9, 9, 9, 9, nil, nil, 9, 9, nil, nil, nil, 9, +9, 9, 9, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 9, 9, nil, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, +9, nil, nil, 9, 9, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 9, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, +395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, nil, nil, +nil, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, nil, nil, nil, nil, +nil, 395, 395, 395, 395, 395, 395, 395, 395, 395, nil, nil, 395, nil, nil, +nil, nil, nil, nil, nil, nil, 395, 395, nil, 395, 395, 395, 395, 395, 395, +395, nil, nil, 395, 395, nil, nil, nil, 395, 395, 395, 395, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 395, 395, nil, 395, 395, +395, 395, 395, 395, 395, 395, 395, 395, 395, 395, nil, nil, 395, 395, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 395, 616, 616, +616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, +616, 616, 616, 616, 616, 616, 616, nil, nil, nil, 616, 616, 616, 616, 616, +616, 616, 616, 616, 616, nil, nil, nil, nil, nil, 616, 616, 616, 616, 616, +616, 616, 616, 616, nil, nil, 616, nil, nil, nil, nil, nil, nil, nil, nil, +616, 616, nil, 616, 616, 616, 616, 616, 616, 616, nil, nil, 616, 616, nil, +nil, nil, 616, 616, 616, 616, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 616, 616, nil, 616, 616, 616, 616, 616, 616, 616, 616, +616, 616, 616, 616, nil, nil, 616, 616, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 616, 71, 71, 71, 71, 71, 71, 71, 71, +71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, +71, nil, nil, nil, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, nil, +nil, nil, nil, nil, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, +71, nil, 71, nil, nil, nil, nil, nil, nil, 71, 71, nil, 71, 71, 71, +71, 71, 71, 71, nil, nil, 71, 71, nil, nil, nil, 71, 71, 71, 71, +nil, nil, nil, nil, nil, 71, nil, nil, nil, nil, nil, nil, nil, 71, 71, +nil, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, nil, nil, +71, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, +738, 738, 738, 738, 738, 738, 738, 738, 738, 738, nil, nil, nil, 738, 738, +738, 738, 738, 738, 738, 738, 738, 738, nil, nil, nil, nil, nil, 738, 738, +738, 738, 738, 738, 738, 738, 738, nil, nil, 738, nil, nil, nil, nil, nil, +nil, nil, nil, 738, 738, nil, 738, 738, 738, 738, 738, 738, 738, nil, nil, +738, 738, nil, nil, nil, 738, 738, 738, 738, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 738, 738, nil, 738, 738, 738, 738, 738, +738, 738, 738, 738, 738, 738, 738, 210, 210, 738, nil, 210, nil, nil, nil, +nil, nil, nil, nil, nil, 210, 210, nil, 210, 210, 210, 210, 210, 210, 210, +nil, nil, 210, 210, nil, nil, nil, 210, 210, 210, 210, nil, nil, nil, nil, +nil, 210, nil, nil, nil, nil, nil, nil, nil, 210, 210, nil, 210, 210, 210, +210, 210, 210, 210, 210, 210, 210, 210, 210, 211, 211, 210, nil, 211, nil, +nil, nil, nil, nil, nil, nil, nil, 211, 211, nil, 211, 211, 211, 211, 211, +211, 211, nil, nil, 211, 211, nil, nil, nil, 211, 211, 211, 211, nil, nil, +nil, nil, nil, 211, nil, nil, nil, nil, nil, nil, nil, 211, 211, nil, 211, +211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 259, 259, 211, nil, +259, nil, nil, nil, nil, nil, nil, nil, nil, 259, 259, nil, 259, 259, 259, +259, 259, 259, 259, nil, nil, 259, 259, nil, nil, nil, 259, 259, 259, 259, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 259, 259, +nil, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 440, 440, +259, nil, 440, nil, nil, nil, nil, nil, nil, nil, nil, 440, 440, nil, 440, +440, 440, 440, 440, 440, 440, nil, nil, 440, 440, nil, nil, nil, 440, 440, +440, 440, nil, nil, nil, nil, nil, 440, nil, nil, nil, nil, nil, nil, nil, +440, 440, nil, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, +441, 441, 440, nil, 441, nil, nil, nil, nil, nil, nil, nil, nil, 441, 441, +nil, 441, 441, 441, 441, 441, 441, 441, nil, nil, 441, 441, nil, nil, nil, +441, 441, 441, 441, nil, nil, nil, nil, nil, 441, nil, nil, nil, nil, nil, +nil, nil, 441, 441, nil, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, +441, 441, 507, 507, 441, nil, 507, nil, nil, nil, nil, nil, nil, nil, nil, +507, 507, nil, 507, 507, 507, 507, 507, 507, 507, nil, nil, 507, 507, nil, +nil, nil, 507, 507, 507, 507, nil, nil, nil, nil, nil, 507, nil, nil, nil, +nil, nil, nil, nil, 507, 507, nil, 507, 507, 507, 507, 507, 507, 507, 507, +507, 507, 507, 507, 508, 508, 507, nil, 508, nil, nil, nil, nil, nil, nil, +nil, nil, 508, 508, nil, 508, 508, 508, 508, 508, 508, 508, nil, nil, 508, +508, nil, nil, nil, 508, 508, 508, 508, nil, nil, nil, nil, nil, 508, nil, +nil, nil, nil, nil, nil, nil, 508, 508, nil, 508, 508, 508, 508, 508, 508, +508, 508, 508, 508, 508, 508, 517, 517, 508, nil, 517, nil, nil, nil, nil, +nil, nil, nil, nil, 517, 517, nil, 517, 517, 517, 517, 517, 517, 517, nil, +nil, 517, 517, nil, nil, nil, 517, 517, 517, 517, nil, nil, nil, nil, nil, +517, nil, nil, nil, nil, nil, nil, nil, 517, 517, nil, 517, 517, 517, 517, +517, 517, 517, 517, 517, 517, 517, 517, 518, 518, 517, nil, 518, nil, nil, +nil, nil, nil, nil, nil, nil, 518, 518, nil, 518, 518, 518, 518, 518, 518, +518, nil, nil, 518, 518, nil, nil, nil, 518, 518, 518, 518, nil, nil, nil, +nil, nil, 518, nil, nil, nil, nil, nil, nil, nil, 518, 518, nil, 518, 518, +518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 576, 576, 518, nil, 576, +nil, nil, nil, nil, nil, nil, nil, nil, 576, 576, nil, 576, 576, 576, 576, +576, 576, 576, nil, nil, 576, 576, nil, nil, nil, 576, 576, 576, 576, nil, +nil, nil, nil, nil, 576, nil, nil, nil, nil, nil, nil, nil, 576, 576, nil, +576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 577, 577, 576, +nil, 577, nil, nil, nil, nil, nil, nil, nil, nil, 577, 577, nil, 577, 577, +577, 577, 577, 577, 577, nil, nil, 577, 577, nil, nil, nil, 577, 577, 577, +577, nil, nil, nil, nil, nil, 577, nil, nil, nil, nil, nil, nil, nil, 577, +577, nil, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 583, +583, 577, nil, 583, nil, nil, nil, nil, nil, nil, nil, nil, 583, 583, nil, +583, 583, 583, 583, 583, 583, 583, nil, nil, 583, 583, nil, nil, nil, 583, +583, 583, 583, nil, nil, nil, nil, nil, 583, nil, nil, nil, nil, nil, nil, +nil, 583, 583, nil, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, +583, 584, 584, 583, nil, 584, nil, nil, nil, nil, nil, nil, nil, nil, 584, +584, nil, 584, 584, 584, 584, 584, 584, 584, nil, nil, 584, 584, nil, nil, +nil, 584, 584, 584, 584, nil, nil, nil, nil, nil, 584, nil, nil, nil, nil, +nil, nil, nil, 584, 584, nil, 584, 584, 584, 584, 584, 584, 584, 584, 584, +584, 584, 584, 939, 939, 584, nil, 939, nil, nil, nil, nil, nil, nil, nil, +nil, 939, 939, nil, 939, 939, 939, 939, 939, 939, 939, nil, nil, 939, 939, +nil, nil, nil, 939, 939, 939, 939, nil, nil, nil, nil, nil, 939, nil, nil, +nil, nil, nil, nil, nil, 939, 939, nil, 939, 939, 939, 939, 939, 939, 939, +939, 939, 939, 939, 939, 986, 986, 939, nil, 986, nil, nil, nil, nil, nil, +nil, nil, nil, 986, 986, nil, 986, 986, 986, 986, 986, 986, 986, nil, nil, +986, 986, nil, nil, nil, 986, 986, 986, 986, nil, nil, nil, nil, nil, 986, +nil, nil, nil, nil, nil, nil, nil, 986, 986, nil, 986, 986, 986, 986, 986, +986, 986, 986, 986, 986, 986, 986, 987, 987, 986, nil, 987, nil, nil, nil, +nil, nil, nil, nil, nil, 987, 987, nil, 987, 987, 987, 987, 987, 987, 987, +nil, nil, 987, 987, nil, nil, nil, 987, 987, 987, 987, nil, nil, nil, nil, +nil, 987, nil, nil, nil, nil, nil, nil, nil, 987, 987, nil, 987, 987, 987, +987, 987, 987, 987, 987, 987, 987, 987, 987, nil, 693, 987, 693, 693, 693, +693, 693, nil, 695, nil, 695, 695, 695, 695, 695, nil, 693, nil, nil, nil, +nil, nil, nil, 736, 695, 736, 736, 736, 736, 736, nil, nil, nil, nil, nil, +nil, nil, nil, 693, 736, nil, nil, nil, nil, nil, nil, 695, 693, 693, 693, +693, nil, nil, nil, 693, 695, 695, 695, 695, nil, nil, 736, 695, 737, nil, +737, 737, 737, 737, 737, 736, 736, 736, 736, nil, nil, nil, 736, 865, 737, +865, 865, 865, 865, 865, nil, 867, nil, 867, 867, 867, 867, 867, nil, 865, +nil, nil, nil, nil, nil, nil, 737, 867, 893, nil, 893, 893, 893, 893, 893, +737, 737, 737, 737, nil, nil, 865, 737, nil, 893, nil, nil, nil, nil, 867, +865, 865, 865, 865, nil, nil, nil, 865, 867, 867, 867, 867, nil, nil, nil, +867, 893, 897, nil, 897, 897, 897, 897, 897, nil, 893, 893, 893, 893, nil, +nil, nil, 893, 897, 899, nil, 899, 899, 899, 899, 899, nil, 971, nil, 971, +971, 971, 971, 971, nil, 899, nil, nil, nil, nil, 897, nil, 973, 971, 973, +973, 973, 973, 973, nil, nil, 897, 897, nil, nil, nil, 897, 899, 973, nil, +nil, nil, nil, nil, nil, 971, nil, nil, 899, 899, nil, nil, nil, 899, 971, +971, 971, 971, nil, nil, 973, 971, 975, nil, 975, 975, 975, 975, 975, nil, +nil, 973, 973, nil, nil, nil, 973, 977, 975, 977, 977, 977, 977, 977, nil, +989, nil, 989, 989, 989, 989, 989, 1015, 977, 1015, 1015, 1015, 1015, 1015, nil, +975, 989, nil, nil, nil, nil, nil, nil, 1015, nil, nil, 975, 975, nil, nil, +977, 975, nil, nil, nil, nil, nil, nil, 989, nil, nil, 977, 977, nil, nil, +1015, 977, nil, nil, 989, 989, nil, nil, nil, 989, nil, 1015, 1015, nil, nil, +nil, 1015] + +racc_action_pointer = [750, 47, nil, 123, nil, 5120, 1299, -62, 23249, 23378, -21, nil, -43, 71, 533, -41, 34, -4, nil, - +72, 5252, 1173, 168, nil, 157, nil, 6, 22760, 22871, 5384, 5516, 5648, nil, 891, +5780, 5912, nil, 71, 227, 254, 154, 228, 6052, 6184, 6316, 95, 544, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 22355, nil, -71, 6448, 6580, - +23, nil, 6712, 6844, nil, nil, 6976, 7116, 7248, 7380, 23765, nil, nil, nil, nil, +nil, 470, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 0, nil, nil, 113, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 262, nil, 7520, nil, nil, nil, nil, 7660, 7792, 7924, 8056, 8196, +1032, nil, 220, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 141, nil, 1173, 8328, 8460, 8592, 23941, +24003, 8724, 8856, 8988, 9120, 9252, 9384, nil, nil, 546, -77, - +62, 233, 131, 196, 256, nil, 9516, 1314, 273, 9648, 9780, 9912, 10044, 10176, 10308, +10440, 10572, 10704, 10836, 10968, 11100, 11232, 11364, 11496, 11628, 11760, 11892, 12024, 12156, 12288, +12420, 12552, 12684, 12816, nil, nil, nil, 24065, nil, nil, 275, 12948, 13080, nil, nil, +nil, nil, nil, nil, nil, 13212, nil, 1314, nil, 262, 314, nil, 13344, 366, 13476, +nil, nil, 13608, 13740, nil, nil, 296, nil, 13880, 1440, 368, 362, 1455, 384, 444, +418, 14012, 1596, 578, 615, 681, 505, 750, nil, 478, 439, 33, nil, nil, nil, +501, 258, 478, 14152, nil, 299, 561, 753, nil, 569, nil, 14284, 1737, 14416, 528, +nil, 105, 259, 571, 585, 454, 619, nil, nil, 23117, 488, -1, 26, 14548, 14680, 458, 706, 596, -23, -19, 792, 691, -18, 724, nil, nil, 227, 281, - +34, nil, 822, nil, 34, 14812, nil, nil, nil, 264, 409, 448, 451, 478, 508, +512, 532, 554, nil, 567, nil, 14944, nil, 275, 335, 363, 375, 392, -45, - +41, 395, nil, nil, nil, nil, nil, nil, nil, nil, 643, 23507, nil, nil, nil, +nil, 650, nil, nil, 642, 15076, 644, nil, nil, 891, 658, nil, 672, 676, 332, +342, 22984, nil, nil, nil, 224, 337, 723, nil, nil, 22490, 22625, nil, 1455, nil, +689, nil, nil, 750, nil, nil, nil, nil, - +33, nil, 746, 24127, 24189, 15208, 239, 15340, 15472, 15604, 3147, 3288, 538, 659, 778, +783, 788, 798, 5120, 5252, 5384, 3429, 3570, 3711, 3852, 3993, 4134, 4275, 4416, 4557, +4698, 621, 630, 4839, 4980, 15736, - +46, 23114, nil, nil, nil, nil, 747, nil, 159, 279, 750, nil, nil, 15868, nil, +16000, nil, 16132, nil, 332, nil, nil, nil, 16272, 1455, 1878, 752, 751, nil, nil, +754, 16412, 767, 16544, 24251, 24313, 891, 809, nil, 16676, 769, nil, 16808, 16940, 24375, +24437, 1596, 17072, 897, 896, 694, 824, nil, 17204, nil, nil, 17336, nil, nil, nil, +nil, 23134, nil, 783, 784, nil, 785, 793, 794, nil, nil, nil, nil, nil, nil, +nil, nil, 787, 477, nil, nil, 17468, nil, nil, nil, 880, nil, nil, nil, 881, +nil, nil, 882, 2019, 935, nil, 2160, 63, 119, 935, 945, 17600, 17732, 24499, 24561, +10, nil, nil, 894, nil, 24623, 24685, 17864, nil, nil, nil, 587, 193, 2301, 883, +nil, - +14, nil, nil, nil, 733, nil, nil, nil, 858, nil, nil, 151, nil, 222, nil, +nil, 846, nil, 847, nil, nil, nil, 23636, nil, 852, 17996, 18128, 380, 896, 18260, +18392, 18524, 18656, 899, nil, nil, 18788, 18920, 907, nil, 19052, 19184, nil, nil, 350, +416, 470, 607, 874, 1032, 1737, nil, 23078, nil, 2442, 979, 5, 316, nil, 2583, +2724, nil, 882, nil, 929, 19316, nil, nil, 19448, nil, 905, - +81, 19580, 888, nil, 893, 137, 179, 935, 340, 1032, 936, 895, 19712, 1878, 972, +20, 1026, 19844, nil, 913, nil, 539, 21, 914, 495, nil, nil, 740, 24934, nil, +24942, nil, 5959, nil, 19976, nil, 607, nil, 912, 230, 925, nil, nil, nil, nil, +850, nil, 1044, nil, nil, nil, nil, 1050, nil, 32, 929, 26, 41, 123, 182, +20108, 414, 1173, nil, 937, 2865, 20240, nil, nil, 1060, 3006, 24957, 24997, 23879, nil, +nil, nil, nil, nil, nil, 3147, nil, nil, nil, nil, nil, nil, nil, 937, 20372, +2019, 20504, nil, 938, nil, 2160, nil, 2301, nil, nil, 2442, nil, 2583, nil, 2724, +20636, 20768, 20900, 21032, 429, 940, 940, 954, nil, 958, 961, 980, nil, 1009, 992, +991, 989, 21164, nil, nil, 1128, nil, nil, 3288, 1031, 1137, nil, nil, nil, nil, +1013, 378, nil, nil, 1149, nil, 3429, 1024, 1072, nil, nil, 1072, nil, nil, 3570, +3711, 1074, 1032, nil, nil, nil, 1033, 1036, nil, 1046, 1047, nil, 1051, nil, nil, +1055, 614, 1053, 600, nil, 1188, nil, 21296, 1190, 3852, 3993, nil, 21428, 4134, 81, +122, nil, 1191, 611, 4275, nil, 1192, 1078, 613, nil, 1087, 1095, nil, 2865, 21560, +21692, nil, 525, nil, nil, 25012, nil, 25020, nil, 7427, nil, nil, 1123, 1159, 21824, +933, 1181, nil, 1141, nil, nil, nil, 4416, nil, nil, 33, 21956, nil, nil, 1146, +1255, nil, nil, 25037, nil, 14059, nil, 25076, nil, 25093, nil, nil, nil, nil, 330, +3415, 1134, nil, 36, nil, 1264, 1269, nil, 47, nil, nil, nil, 1277, nil, nil, +nil, 1197, nil, 22088, 1154, nil, nil, 1164, 1165, 1167, 1170, nil, 1172, nil, 643, +nil, nil, nil, 963, 24747, nil, nil, nil, 4557, 1035, 1074, 1104, 1252, 1176, nil, +nil, nil, 1174, 1177, 1187, 1188, 1189, 3556, 1192, 3589, 4698, nil, nil, nil, nil, +nil, 4839, nil, 4980, 3006, nil, 25101, nil, 25116, nil, 25156, nil, 25171, nil, nil, +nil, 1300, 1237, 1238, 1323, 22220, 24809, 24871, 1215, 25179, nil, nil, nil, nil, 3697, +1216, 862, 1347, 1361, 1240, 1243, 1261, 1262, nil, nil, 1270, 40, 42, 112, 1314, +1268, 1271, nil, nil, nil, 25186, nil, nil, nil, nil, 43, nil, 1275, nil] + +racc_action_default = [-3, -597, -1, -583, -4, -597, -7, -597, -597, -597, -597, -29, -597, -597, -597, -281, -597, -40, -43, -585, -597, -48, -50, -51, -52, -56, -258, -258, -258, -295, -330, -331, -68, -11, -72, -80, -82, -597, -488, -489, -597, -597, -597, -597, -597, -585, -239, -272, -273, -274, -275, -276, -277, -278, -279, -280, -573, -283, -285, -596, -563, -303, -391, -597, -597, -308, -311, -583, -597, -597, -597, -597, -332, -333, -429, -430, -431, -432, -433, -454, -436, -437, -456, -458, -441, -446, -450, -452, -468, -456, -470, -472, -473, -474, -475, -571, -477, -478, -572, -480, -481, -482, -483, -484, -485, -486, -487, -492, -493, -597, -2, -584, -592, -593, -594, -6, -597, -597, -597, -597, -597, -3, -17, -597, -111, -112, -113, -114, -115, -116, -117, -118, -119, -123, -124, -125, -126, -127, -128, -129, -130, -131, -132, -133, -134, -135, -136, -137, -138, -139, -140, -141, -142, -143, -144, -145, -146, -147, -148, -149, -150, -151, -152, -153, -154, -155, -156, -157, -158, -159, -160, -161, -162, -163, -164, -165, -166, -167, -168, -169, -170, -171, -172, -173, -174, -175, -176, -177, -178, -179, -180, -181, -182, -183, -184, -185, -186, -187, -188, -189, -190, -191, -192, -193, -22, -120, -11, -597, -597, -248, -597, -597, -597, -597, -597, -597, -597, -585, -586, -47, -597, -488, -489, -597, -281, -597, -597, -229, -597, -11, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -597, -236, -398, -400, -597, -581, -582, -57, -248, -597, -302, -404, -413, -415, -63, -410, -64, -585, -65, -240, -253, -262, -262, -257, -597, -263, -597, -454, -565, -597, -597, -66, -67, -583, -12, -597, -15, -597, -70, -11, -585, -597, -73, -76, -11, -88, -89, -597, -597, -96, -295, -298, -585, -597, -330, -331, -334, -411, -597, -78, -597, -84, -292, -471, -597, -214, -215, -230, -597, -11, -597, -585, -241, -589, -589, -597, -597, -589, -597, -304, -305, -521, -49, -597, -597, -597, -597, -583, -597, -584, -488, -489, -597, -597, -281, -597, -344, -345, -106, -107, -597, -109, -597, -281, -597, -597, -488, -489, -323, -111, -112, -153, -154, -155, -171, -176, -183, -186, -325, -597, -561, -597, -434, -597, -597, -597, -597, -597, -597, -597, -597, 1024, -5, -595, -23, -24, -25, -26, -27, -597, -597, -19, -20, -21, -121, -597, -30, -39, -268, -597, -597, -267, -31, -196, -585, -249, -262, -262, -574, -575, -258, -408, -576, -577, -575, -574, -258, -407, -409, -576, -577, -37, -204, -38, -597, -41, -42, -194, -263, -44, -45, -46, -585, -301, -597, -597, -597, -248, -292, -597, -597, -597, -205, -206, -207, -208, -209, -210, -211, -212, -216, -217, -218, -219, -220, -221, -222, -223, -224, -225, -226, -227, -228, -231, -232, -233, -234, -597, -380, -258, -574, -575, -54, -58, -585, -259, -380, -380, -585, -297, -254, -597, -255, -597, -260, -597, -264, -597, -568, -570, -10, -584, -14, -3, -585, -69, -290, -85, -74, -597, -585, -248, -597, -597, -95, -597, -471, -597, -81, -86, -597, -597, -597, -597, -235, -597, -421, -597, -286, -597, -242, -591, -590, -244, -591, -293, -294, -564, -392, -521, -395, -560, -560, -504, -506, -506, -506, -520, -522, -523, -524, -525, -526, -527, -528, -529, -597, -531, -533, -535, -540, -542, -543, -545, -550, -552, -553, -555, -556, -557, -597, -11, -335, -336, -11, -597, -597, -597, -597, -597, -248, -597, -597, -292, -316, -106, -107, -108, -597, -597, -248, -319, -494, -495, -597, -597, -11, -499, -327, -585, -435, -455, -460, -597, -462, -438, -457, -597, -459, -440, -597, -443, -597, -445, -448, -597, -449, -597, -469, -8, -18, -597, -28, -271, -597, -597, -412, -597, -250, -252, -597, -597, -59, -247, -405, -597, -597, -61, -406, -597, -597, -300, -587, -574, -575, -574, -575, -585, -194, -585, -381, -585, -383, -11, -53, -401, -380, -245, -11, -11, -296, -262, -261, -265, -597, -566, -567, -597, -13, -597, -71, -597, -77, -83, -585, -574, -575, -246, -92, -94, -597, -79, -597, -203, -213, -585, -596, -596, -284, -585, -289, -589, -597, -585, -597, -502, -503, -597, -597, -513, -597, -516, -597, -518, -597, -346, -597, -348, -350, -357, -585, -534, -544, -554, -558, -596, -337, -596, -309, -338, -339, -312, -597, -315, -597, -585, -574, -575, -578, -291, -597, -106, -107, -110, -585, -11, -597, -497, -321, -597, -11, -521, -521, -597, -562, -461, -464, -465, -466, -467, -11, -439, -442, -444, -447, -451, -453, -122, -269, -597, -197, -597, -588, -262, -33, -199, -34, -200, -60, -35, -202, -36, -201, -62, -195, -597, -597, -597, -597, -412, -597, -560, -560, -362, -364, -364, -364, -379, -597, -585, -385, -529, -537, -538, -548, -597, -403, -402, -11, -597, -597, -256, -266, -569, -16, -75, -90, -87, -299, -596, -342, -11, -422, -596, -423, -424, -597, -243, -393, -11, -11, -597, -560, -541, -559, -505, -506, -506, -532, -506, -506, -551, -506, -529, -546, -585, -597, -355, -597, -530, -597, -340, -597, -597, -11, -11, -314, -597, -11, -412, -597, -412, -597, -597, -11, -324, -597, -585, -597, -328, -597, -270, -32, -198, -251, -597, -237, -597, -360, -361, -370, -372, -597, -375, -597, -377, -382, -597, -597, -597, -536, -597, -399, -597, -414, -416, -9, -11, -428, -343, -597, -597, -426, -287, -597, -597, -394, -501, -597, -509, -597, -511, -597, -514, -597, -517, -519, -347, -349, -353, -597, -358, -306, -597, -307, -597, -597, -265, -596, -317, -320, -496, -597, -326, -498, -500, -499, -463, -597, -560, -539, -363, -364, -364, -364, -364, -549, -364, -384, -585, -387, -389, -390, -547, -597, -292, -55, -427, -11, -97, -98, -597, -597, -105, -425, -396, -397, -506, -506, -506, -506, -351, -597, -356, -597, -11, -310, -313, -417, -418, -419, -11, -322, -11, -238, -359, -597, -367, -597, -369, -597, -373, -597, -376, -378, -386, -597, -291, -578, -421, -248, -597, -597, -104, -597, -507, -510, -512, -515, -597, -354, -596, -597, -597, -364, -364, -364, -364, -388, -420, -585, -574, -575, -578, -103, -506, -352, -341, -318, -329, -597, -365, -368, -371, -374, -412, -508, -364, -366] + +racc_goto_table = [ +216, 275, 275, 275, 14, 327, 373, 409, 573, 14, 522, 276, 276, 276, 266, +270, 311, 311, 258, 2, 415, 421, 334, 431, 220, 681, 323, 259, 122, 205, +535, 127, 127, 220, 220, 220, 406, 14, 302, 302, 550, 328, 428, 478, 297, +130, 130, 132, 132, 542, 311, 311, 311, 110, 114, 338, 339, 487, 438, 342, +513, 479, 735, 835, 582, 318, 660, 220, 220, 474, 111, 220, 347, 357, 357, +705, 621, 826, 219, 6, 314, 690, 691, 804, 6, 783, 566, 569, 713, 716, +378, 293, 295, 780, 127, 262, 269, 271, 906, 903, 525, 528, 115, 931, 532, +379, 935, 660, 389, 390, 391, 392, 385, 484, 838, 14, 937, 343, 114, 1, +220, 220, 220, 220, 14, 14, 881, 816, 359, 363, 648, 273, 286, 287, 605, +607, 500, 663, 653, 654, 394, 823, 204, 352, 402, 395, 277, 277, 277, 651, +616, 472, 657, 13, 657, 923, 330, 650, 13, 375, 331, 335, 350, 586, 374, +324, 325, 684, 326, 340, 958, 694, 696, 698, 839, 341, 329, 332, 840, 725, +966, 275, 730, 849, 591, 592, 13, 738, 921, 405, 6, 782, 487, 784, 934, +405, 533, 813, 416, 393, 6, 700, 660, 336, 687, 473, 481, 931, 387, 482, +14, 220, 220, 220, 1003, 963, 220, 220, 220, 220, 220, 220, 995, 872, 937, +830, 808, 903, 688, 885, 377, 296, 380, 14, 425, 275, 275, 717, 550, 381, +642, 382, 383, 384, 275, 740, 276, 542, 745, 667, 415, 421, 731, 821, 276, +818, 925, 676, nil, 1011, nil, nil, nil, nil, 13, 401, 407, 220, 220, nil, +426, 430, nil, 13, 13, 826, 220, 734, 636, nil, 311, 601, 603, 606, 606, +nil, nil, 601, 510, 657, 657, nil, 728, 492, 14, nil, 266, 311, 14, nil, +270, nil, 302, 14, 669, nil, nil, 524, 793, 774, nil, nil, 927, 823, nil, +964, nil, 672, nil, 302, 652, 863, 864, nil, 655, 514, nil, 672, 14, 220, +nil, nil, 570, 571, nil, nil, 801, 511, 495, 114, 665, nil, nil, 503, 220, +220, 668, 823, nil, 1012, 786, 700, 293, 499, 832, 496, nil, 293, 505, 13, +nil, nil, 892, 914, 220, nil, 480, nil, nil, 497, nil, nil, nil, 720, 483, +nil, nil, 593, nil, nil, 220, 277, 13, 729, nil, nil, 672, 844, nil, 277, +622, 968, 572, 114, 672, nil, 846, 550, nil, 550, nil, nil, nil, 628, 400, +nil, nil, nil, 763, 633, 587, 800, nil, 768, 275, 615, 847, nil, 127, nil, +nil, 851, nil, nil, nil, 823, nil, 296, 416, nil, 852, 853, 130, nil, 132, +739, 796, 660, nil, nil, 550, 550, nil, 13, 431, nil, 220, 13, nil, 542, +542, nil, 13, 894, 896, nil, 898, 900, 812, 901, nil, 333, 628, nil, 425, +nil, nil, 843, nil, 970, nil, nil, nil, nil, nil, nil, nil, 13, 275, nil, +nil, 700, nil, 700, 627, nil, 311, nil, 1004, nil, 632, nil, 296, nil, 311, +416, nil, 296, nil, 26, 14, nil, 14, nil, 26, 416, nil, 748, 302, 748, +220, 809, 781, nil, 514, nil, 302, 664, nil, 26, nil, 803, 514, nil, 220, +657, nil, nil, 26, 26, 26, 425, 26, nil, nil, 917, nil, nil, 796, nil, +nil, 425, nil, 649, nil, nil, 834, 275, nil, nil, nil, nil, nil, nil, 956, +700, 719, 275, nil, 822, nil, 824, 26, 26, 416, nil, 26, nil, nil, 786, +14, 786, 416, 14, nil, nil, nil, 6, 965, 220, nil, nil, nil, nil, 990, +991, 992, 993, nil, 220, nil, nil, nil, nil, nil, 14, nil, 550, nil, nil, +425, nil, nil, 656, nil, nil, 425, 700, 403, 700, 26, 792, nil, nil, 433, +26, 26, 26, 26, 26, 26, 714, 714, 622, nil, 775, nil, 785, 810, 220, +220, nil, nil, 943, 220, 220, 752, nil, 220, 127, 732, 733, 1021, 686, 700, +791, nil, nil, 311, 13, 622, 13, 14, 130, 998, 132, 960, 14, 14, 311, +628, nil, nil, 633, 405, 811, nil, nil, nil, 785, 302, 902, 1020, 854, nil, +786, 514, nil, nil, nil, 489, 302, 491, 759, 761, 493, 494, 802, 764, 766, +nil, nil, 430, 919, nil, nil, nil, nil, nil, nil, nil, 622, nil, nil, nil, +26, 26, 26, 26, nil, 622, 26, 26, 26, 26, 26, 26, 845, nil, 13, +nil, nil, 13, 848, nil, nil, nil, nil, 26, 220, nil, 928, nil, 929, 14, +220, nil, nil, nil, 14, 758, nil, nil, nil, 13, nil, nil, nil, nil, 14, +883, nil, 15, nil, 887, nil, nil, 15, nil, 952, 220, 127, 26, 26, 710, +785, nil, 712, nil, 311, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 1005, nil, 15, 304, 304, nil, 26, nil, 875, nil, 26, nil, +nil, 672, 14, 26, nil, nil, 13, nil, 16, nil, 618, 13, 13, 16, nil, +14, nil, nil, nil, 857, nil, nil, nil, 14, 14, 349, 358, 358, 26, 26, +nil, nil, nil, nil, 908, nil, nil, nil, nil, nil, nil, 16, 999, nil, 26, +26, 220, nil, 14, 14, nil, 790, 14, nil, nil, nil, 794, 795, 14, 777, +nil, 311, nil, nil, 26, nil, nil, nil, 15, nil, nil, 778, nil, 311, nil, +nil, 351, 15, 15, nil, 26, nil, nil, 938, nil, nil, nil, nil, 13, nil, +nil, 14, 658, 13, 333, 946, 661, nil, 779, nil, nil, 714, 817, 13, 916, +nil, nil, nil, nil, 920, nil, nil, nil, nil, 819, nil, nil, 819, nil, 16, +980, nil, nil, nil, nil, nil, nil, nil, 16, 16, nil, nil, 658, nil, nil, +333, nil, nil, nil, nil, nil, nil, nil, 787, nil, nil, 26, 825, 855, 827, +nil, 13, 14, nil, nil, nil, nil, nil, nil, nil, 706, nil, 275, 15, 13, +nil, nil, 425, nil, 14, nil, nil, 13, 13, nil, 14, nil, 14, nil, 416, +433, nil, nil, nil, nil, nil, 15, nil, nil, nil, nil, 622, nil, nil, 220, +nil, 878, 13, 13, nil, 26, 13, 26, nil, nil, nil, nil, 13, nil, 884, +26, nil, nil, nil, 16, 425, nil, 889, 890, nil, nil, 429, nil, nil, 26, +753, nil, nil, nil, 658, 333, nil, nil, nil, nil, nil, nil, 16, nil, nil, +13, nil, 910, 911, nil, nil, 913, 15, nil, nil, nil, 15, nil, nil, nil, +304, 15, nil, nil, nil, 337, 337, nil, nil, 337, 797, nil, nil, 798, nil, +26, nil, 304, 26, nil, 924, nil, nil, 777, 26, 777, 15, 777, nil, nil, +942, nil, 819, 807, 26, 778, nil, 778, nil, 778, 26, nil, nil, 16, nil, +nil, 13, 16, nil, nil, 829, nil, 16, nil, nil, nil, nil, nil, 337, 337, +337, 337, nil, 13, 930, nil, 932, nil, nil, 13, nil, 13, nil, nil, 26, +26, nil, 16, nil, 26, 26, nil, nil, 26, 866, 868, 870, nil, nil, nil, +953, 984, 954, nil, 955, nil, nil, 26, nil, nil, nil, nil, 26, 26, 787, +856, nil, 787, 996, 787, nil, 787, nil, nil, 997, nil, nil, nil, nil, nil, +38, nil, nil, nil, nil, 38, nil, nil, nil, 777, nil, 777, nil, 777, nil, +777, nil, nil, nil, nil, nil, 778, nil, 778, nil, 778, nil, 778, nil, nil, +nil, nil, nil, 38, 300, 300, 434, 435, 436, 437, nil, nil, nil, nil, nil, +nil, nil, nil, 1000, nil, 1001, nil, 1002, 777, 26, nil, nil, nil, nil, 26, +26, nil, nil, nil, 26, 778, 1010, nil, 345, 361, 361, 361, nil, 912, 26, +nil, nil, nil, 15, nil, 15, nil, nil, nil, nil, 26, 304, nil, nil, nil, +333, nil, 1022, 787, 304, 787, nil, 787, nil, 787, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 38, 972, 974, 976, 978, nil, 979, nil, nil, +38, 38, 26, nil, nil, nil, nil, nil, nil, 16, nil, 16, nil, nil, nil, +26, nil, 787, nil, nil, nil, nil, nil, 26, 26, nil, nil, 523, 15, nil, +nil, 15, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 337, 337, nil, +nil, 26, nil, 26, 26, nil, nil, 26, 15, nil, nil, nil, nil, 26, nil, +744, nil, 590, nil, 1016, 1017, 1018, 1019, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 594, 16, nil, nil, 16, nil, nil, nil, 38, 1023, nil, nil, +nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 16, +nil, nil, nil, nil, 38, 15, nil, nil, nil, nil, 15, 15, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 304, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 304, nil, nil, nil, nil, nil, nil, nil, 429, nil, nil, +nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, 16, nil, nil, nil, +nil, 16, 16, 39, 26, 38, nil, nil, 39, 38, 26, nil, 26, 300, 38, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 15, nil, 26, +300, nil, 15, nil, nil, nil, 39, 301, 301, 38, nil, nil, 15, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 680, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 346, 362, 362, 362, +nil, nil, nil, 16, nil, nil, nil, nil, 16, 358, nil, nil, nil, nil, nil, +15, nil, nil, 16, nil, nil, nil, nil, nil, nil, nil, nil, nil, 15, nil, +nil, nil, nil, nil, nil, nil, 15, 15, nil, 39, nil, nil, nil, nil, nil, +nil, nil, nil, 39, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 15, 15, nil, nil, 15, 16, nil, nil, nil, nil, 15, nil, nil, nil, +nil, nil, nil, nil, 16, nil, nil, nil, nil, nil, nil, nil, 16, 16, nil, +nil, nil, nil, nil, nil, nil, 358, nil, nil, nil, nil, nil, nil, nil, 15, +nil, nil, nil, 948, nil, nil, nil, 16, 16, nil, nil, 16, nil, nil, nil, +nil, nil, 16, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 39, +nil, 38, nil, 38, nil, nil, nil, nil, nil, 300, nil, nil, nil, nil, nil, +nil, nil, 300, nil, nil, 16, nil, 39, nil, 949, nil, nil, nil, nil, nil, +15, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 15, nil, nil, nil, nil, 337, 15, nil, 15, nil, nil, 337, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 38, nil, nil, 38, +nil, nil, nil, nil, nil, nil, 16, nil, 39, nil, nil, nil, 39, nil, nil, +nil, 301, 39, nil, nil, nil, 38, nil, 16, nil, nil, nil, nil, nil, 16, +nil, 16, nil, 301, nil, nil, nil, nil, nil, nil, nil, nil, 39, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 38, nil, nil, nil, nil, 38, 38, nil, nil, nil, nil, 337, +nil, nil, nil, nil, nil, nil, 300, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 300, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 38, nil, nil, nil, nil, +38, nil, nil, nil, nil, nil, nil, nil, nil, nil, 38, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 39, nil, 39, 361, nil, nil, nil, nil, 301, 38, nil, +nil, nil, nil, nil, nil, 301, nil, nil, nil, nil, nil, 38, nil, nil, nil, +nil, nil, nil, nil, 38, 38, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 38, +38, nil, nil, 38, nil, nil, nil, nil, nil, 38, nil, nil, nil, nil, 39, +nil, nil, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 361, nil, nil, nil, nil, 39, nil, nil, 38, nil, nil, +nil, 944, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 39, nil, nil, nil, nil, 39, 39, 38, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 301, nil, nil, nil, nil, nil, +38, nil, nil, nil, 227, 301, 38, nil, 38, nil, nil, nil, nil, 274, 274, +274, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 320, 321, 322, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 274, 274, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 39, nil, +nil, nil, nil, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 362, nil, nil, nil, nil, +nil, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 39, +nil, nil, nil, nil, nil, nil, nil, 39, 39, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 39, 39, nil, nil, 39, nil, nil, nil, nil, nil, 39, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 274, 408, 274, nil, +nil, 427, 432, nil, nil, nil, nil, 362, nil, nil, nil, nil, nil, nil, nil, +39, nil, 227, nil, 945, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, +457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, +nil, nil, nil, nil, nil, nil, nil, 274, 274, nil, nil, nil, nil, nil, nil, +nil, 274, nil, nil, nil, nil, nil, nil, 274, nil, 274, nil, nil, 274, 274, +nil, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 39, nil, nil, nil, nil, nil, 39, nil, 39, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 519, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 274, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 274, nil, 427, 643, 408, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 644, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 274, nil, 274, nil, 274, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 274, nil, nil, nil, nil, +nil, nil, nil, nil, 678, 679, nil, nil, nil, nil, nil, nil, nil, nil, nil, +274, nil, nil, 274, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 274, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 274, 274, nil, nil, nil, nil, nil, nil, nil, nil, nil, 274, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 274, 755, nil, nil, 274, 274, 760, 762, nil, nil, nil, 765, +767, nil, nil, 643, 769, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 274, nil, +nil, 274, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 274, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 274, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 274, nil, 858, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 760, 762, 767, 765, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 274, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 274, 858, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 969, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 274] + +racc_goto_check = [ +31, 33, 33, 33, 22, 69, 56, 23, 94, 22, 8, 70, 70, 70, 73, +73, 64, 64, 140, 2, 37, 37, 88, 18, 22, 10, 31, 36, 15, 15, +139, 57, 57, 22, 22, 22, 27, 22, 22, 22, 168, 70, 27, 39, 49, +60, 60, 61, 61, 163, 64, 64, 64, 4, 97, 17, 17, 75, 47, 17, +51, 23, 98, 92, 54, 63, 178, 22, 22, 37, 6, 22, 22, 22, 22, +118, 24, 174, 20, 7, 50, 123, 123, 11, 7, 131, 91, 91, 93, 93, +151, 45, 46, 128, 57, 38, 38, 38, 119, 116, 71, 71, 5, 175, 71, +152, 133, 178, 17, 17, 17, 17, 152, 47, 11, 22, 134, 4, 97, 1, +22, 22, 22, 22, 22, 22, 12, 131, 55, 55, 40, 44, 44, 44, 155, +155, 47, 14, 40, 40, 2, 169, 16, 19, 28, 30, 72, 72, 72, 42, +62, 66, 76, 21, 76, 67, 68, 74, 21, 86, 87, 90, 95, 96, 99, +100, 101, 102, 103, 104, 119, 166, 166, 166, 105, 106, 72, 72, 107, 108, +109, 33, 110, 111, 112, 113, 21, 114, 115, 70, 7, 120, 75, 126, 132, +70, 135, 136, 73, 7, 7, 117, 178, 137, 138, 141, 143, 175, 5, 144, +22, 22, 22, 22, 133, 145, 22, 22, 22, 22, 22, 22, 119, 131, 134, +118, 146, 116, 139, 147, 150, 9, 153, 22, 57, 33, 33, 94, 168, 154, +23, 157, 158, 159, 33, 160, 70, 163, 161, 51, 37, 37, 162, 167, 70, +171, 172, 51, nil, 119, nil, nil, nil, nil, 21, 20, 20, 22, 22, nil, +20, 20, nil, 21, 21, 174, 22, 8, 47, nil, 64, 156, 156, 156, 156, +nil, nil, 156, 31, 76, 76, nil, 54, 151, 22, nil, 73, 64, 22, nil, +73, nil, 22, 22, 23, nil, nil, 31, 40, 24, nil, nil, 128, 169, nil, +11, nil, 37, nil, 22, 47, 123, 123, nil, 47, 49, nil, 37, 22, 22, +nil, nil, 17, 17, nil, nil, 24, 63, 4, 97, 47, nil, nil, 50, 22, +22, 47, 169, nil, 92, 168, 117, 45, 46, 117, 6, nil, 45, 46, 21, +nil, nil, 123, 93, 22, nil, 44, nil, nil, 7, nil, nil, nil, 23, 44, +nil, nil, 36, nil, nil, 22, 72, 21, 23, nil, nil, 37, 24, nil, 72, +31, 98, 4, 97, 37, nil, 24, 168, nil, 168, nil, nil, nil, 73, 9, +nil, nil, nil, 39, 73, 97, 51, nil, 39, 33, 15, 8, nil, 57, nil, +nil, 8, nil, nil, nil, 169, nil, 9, 73, nil, 139, 139, 60, nil, 61, +47, 75, 178, nil, nil, 168, 168, nil, 21, 18, nil, 22, 21, nil, 163, +163, nil, 21, 166, 166, nil, 166, 166, 71, 166, nil, 65, 73, nil, 57, +nil, nil, 91, nil, 123, nil, nil, nil, nil, nil, nil, nil, 21, 33, nil, +nil, 117, nil, 117, 38, nil, 64, nil, 10, nil, 38, nil, 9, nil, 64, +73, nil, 9, nil, 41, 22, nil, 22, nil, 41, 73, nil, 156, 22, 156, +22, 27, 129, nil, 49, nil, 22, 2, nil, 41, nil, 47, 49, nil, 22, +76, nil, nil, 41, 41, 41, 57, 41, nil, nil, 8, nil, nil, 75, nil, +nil, 57, nil, 38, nil, nil, 47, 33, nil, nil, nil, nil, nil, nil, 117, +117, 70, 33, nil, 129, nil, 129, 41, 41, 73, nil, 41, nil, nil, 168, +22, 168, 73, 22, nil, nil, nil, 7, 94, 22, nil, nil, nil, nil, 166, +166, 166, 166, nil, 22, nil, nil, nil, nil, nil, 22, nil, 168, nil, nil, +57, nil, nil, 72, nil, nil, 57, 117, 65, 117, 41, 88, nil, nil, 65, +41, 41, 41, 41, 41, 41, 97, 97, 31, nil, 31, nil, 31, 69, 22, +22, nil, nil, 91, 22, 22, 15, nil, 22, 57, 97, 97, 166, 72, 117, +140, nil, nil, 64, 21, 31, 21, 22, 60, 8, 61, 91, 22, 22, 64, +73, nil, nil, 73, 70, 31, nil, nil, nil, 31, 22, 47, 24, 56, nil, +168, 49, nil, nil, nil, 65, 22, 65, 20, 20, 65, 65, 49, 20, 20, +nil, nil, 20, 47, nil, nil, nil, nil, nil, nil, nil, 31, nil, nil, nil, +41, 41, 41, 41, nil, 31, 41, 41, 41, 41, 41, 41, 17, nil, 21, +nil, nil, 21, 17, nil, nil, nil, nil, 41, 22, nil, 129, nil, 129, 22, +22, nil, nil, nil, 22, 72, nil, nil, nil, 21, nil, nil, nil, nil, 22, +69, nil, 25, nil, 69, nil, nil, 25, nil, 129, 22, 57, 41, 41, 9, +31, nil, 9, nil, 64, nil, 41, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 23, nil, 25, 25, 25, nil, 41, nil, 22, nil, 41, nil, +nil, 37, 22, 41, nil, nil, 21, nil, 26, nil, 65, 21, 21, 26, nil, +22, nil, nil, nil, 20, nil, nil, nil, 22, 22, 25, 25, 25, 41, 41, +nil, nil, nil, nil, 17, nil, nil, nil, nil, nil, nil, 26, 129, nil, 41, +41, 22, nil, 22, 22, nil, 9, 22, nil, nil, nil, 9, 9, 22, 122, +nil, 64, nil, nil, 41, nil, nil, nil, 25, nil, nil, 124, nil, 64, nil, +nil, 26, 25, 25, nil, 41, nil, nil, 22, nil, nil, nil, nil, 21, nil, +nil, 22, 65, 21, 65, 22, 65, nil, 127, nil, nil, 97, 122, 21, 97, +nil, nil, nil, nil, 97, nil, nil, nil, nil, 124, nil, nil, 124, nil, 26, +31, nil, nil, nil, nil, nil, nil, nil, 26, 26, nil, nil, 65, nil, nil, +65, nil, nil, nil, nil, nil, nil, nil, 170, nil, nil, 41, 127, 9, 127, +nil, 21, 22, nil, nil, nil, nil, nil, nil, nil, 65, nil, 33, 25, 21, +nil, nil, 57, nil, 22, nil, nil, 21, 21, nil, 22, nil, 22, nil, 73, +65, nil, nil, nil, nil, nil, 25, nil, nil, nil, nil, 31, nil, nil, 22, +nil, 9, 21, 21, nil, 41, 21, 41, nil, nil, nil, nil, 21, nil, 9, +41, nil, nil, nil, 26, 57, nil, 9, 9, nil, nil, 26, nil, nil, 41, +65, nil, nil, nil, 65, 65, nil, nil, nil, nil, nil, nil, 26, nil, nil, +21, nil, 9, 9, nil, nil, 9, 25, nil, nil, nil, 25, nil, nil, nil, +25, 25, nil, nil, nil, 29, 29, nil, nil, 29, 65, nil, nil, 65, nil, +41, nil, 25, 41, nil, 122, nil, nil, 122, 41, 122, 25, 122, nil, nil, +9, nil, 124, 65, 41, 124, nil, 124, nil, 124, 41, nil, nil, 26, nil, +nil, 21, 26, nil, nil, 65, nil, 26, nil, nil, nil, nil, nil, 29, 29, +29, 29, nil, 21, 127, nil, 127, nil, nil, 21, nil, 21, nil, nil, 41, +41, nil, 26, nil, 41, 41, nil, nil, 41, 125, 125, 125, nil, nil, nil, +127, 9, 127, nil, 127, nil, nil, 41, nil, nil, nil, nil, 41, 41, 170, +65, nil, 170, 9, 170, nil, 170, nil, nil, 9, nil, nil, nil, nil, nil, +52, nil, nil, nil, nil, 52, nil, nil, nil, 122, nil, 122, nil, 122, nil, +122, nil, nil, nil, nil, nil, 124, nil, 124, nil, 124, nil, 124, nil, nil, +nil, nil, nil, 52, 52, 52, 29, 29, 29, 29, nil, nil, nil, nil, nil, +nil, nil, nil, 127, nil, 127, nil, 127, 122, 41, nil, nil, nil, nil, 41, +41, nil, nil, nil, 41, 124, 127, nil, 52, 52, 52, 52, nil, 65, 41, +nil, nil, nil, 25, nil, 25, nil, nil, nil, nil, 41, 25, nil, nil, nil, +65, nil, 127, 170, 25, 170, nil, 170, nil, 170, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 52, 125, 125, 125, 125, nil, 125, nil, nil, +52, 52, 41, nil, nil, nil, nil, nil, nil, 26, nil, 26, nil, nil, nil, +41, nil, 170, nil, nil, nil, nil, nil, 41, 41, nil, nil, 29, 25, nil, +nil, 25, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 29, 29, nil, +nil, 41, nil, 41, 41, nil, nil, 41, 25, nil, nil, nil, nil, 41, nil, +25, nil, 29, nil, 125, 125, 125, 125, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 29, 26, nil, nil, 26, nil, nil, nil, 52, 125, nil, nil, +nil, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 26, +nil, nil, nil, nil, 52, 25, nil, nil, nil, nil, 25, 25, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, nil, 26, nil, nil, +nil, nil, 41, nil, nil, nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, +nil, 26, 26, 53, 41, 52, nil, nil, 53, 52, 41, nil, 41, 52, 52, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, 41, +52, nil, 25, nil, nil, nil, 53, 53, 53, 52, nil, nil, 25, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 29, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, 53, 53, 53, +nil, nil, nil, 26, nil, nil, nil, nil, 26, 25, nil, nil, nil, nil, nil, +25, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, +nil, nil, nil, nil, nil, nil, 25, 25, nil, 53, nil, nil, nil, nil, nil, +nil, nil, nil, 53, 53, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 25, 25, nil, nil, 25, 26, nil, nil, nil, nil, 25, nil, nil, nil, +nil, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, 26, 26, nil, +nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, nil, 25, +nil, nil, nil, 25, nil, nil, nil, 26, 26, nil, nil, 26, nil, nil, nil, +nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, +nil, 52, nil, 52, nil, nil, nil, nil, nil, 52, nil, nil, nil, nil, nil, +nil, nil, 52, nil, nil, 26, nil, 53, nil, 26, nil, nil, nil, nil, nil, +25, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 25, nil, nil, nil, nil, 29, 25, nil, 25, nil, nil, 29, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 52, nil, nil, 52, +nil, nil, nil, nil, nil, nil, 26, nil, 53, nil, nil, nil, 53, nil, nil, +nil, 53, 53, nil, nil, nil, 52, nil, 26, nil, nil, nil, nil, nil, 26, +nil, 26, nil, 53, nil, nil, nil, nil, nil, nil, nil, nil, 53, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 52, nil, nil, nil, nil, 52, 52, nil, nil, nil, nil, 29, +nil, nil, nil, nil, nil, nil, 52, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 52, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 52, nil, nil, nil, nil, +52, nil, nil, nil, nil, nil, nil, nil, nil, nil, 52, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 53, nil, 53, 52, nil, nil, nil, nil, 53, 52, nil, +nil, nil, nil, nil, nil, 53, nil, nil, nil, nil, nil, 52, nil, nil, nil, +nil, nil, nil, nil, 52, 52, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 52, +52, nil, nil, 52, nil, nil, nil, nil, nil, 52, nil, nil, nil, nil, 53, +nil, nil, 53, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 52, nil, nil, nil, nil, 53, nil, nil, 52, nil, nil, +nil, 52, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 53, nil, nil, nil, nil, 53, 53, 52, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, nil, nil, nil, nil, nil, +52, nil, nil, nil, 32, 53, 52, nil, 52, nil, nil, nil, nil, 32, 32, +32, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 32, 32, 32, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 32, 32, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, nil, +nil, nil, nil, 53, nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, nil, nil, nil, nil, +nil, 53, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, +nil, nil, nil, nil, nil, nil, nil, 53, 53, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 53, 53, nil, nil, 53, nil, nil, nil, nil, nil, 53, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 32, 32, 32, nil, +nil, 32, 32, nil, nil, nil, nil, 53, nil, nil, nil, nil, nil, nil, nil, +53, nil, 32, nil, 53, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, +32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, +nil, nil, nil, nil, nil, nil, nil, 32, 32, nil, nil, nil, nil, nil, nil, +nil, 32, nil, nil, nil, nil, nil, nil, 32, nil, 32, nil, nil, 32, 32, +nil, 53, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 53, nil, nil, nil, nil, nil, 53, nil, 53, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 32, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 32, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 32, nil, 32, 32, 32, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 32, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 32, nil, 32, nil, 32, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 32, nil, nil, nil, nil, +nil, nil, nil, nil, 32, 32, nil, nil, nil, nil, nil, nil, nil, nil, nil, +32, nil, nil, 32, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 32, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 32, 32, nil, nil, nil, nil, nil, nil, nil, nil, nil, 32, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 32, 32, nil, nil, 32, 32, 32, 32, nil, nil, nil, 32, +32, nil, nil, 32, 32, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 32, nil, +nil, 32, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 32, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 32, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 32, nil, 32, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 32, 32, 32, 32, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 32, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 32, 32, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 32, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 32] + +racc_goto_pointer = [nil, 119, 19, nil, 50, 97, 67, 79, -314, 198, -496, -598, -678, nil, -359, 20, 133, -8, -190, 75, 58, 153, 4, -202, -333, 752, 803, -171, -63, 992, 23, -19, 2114, -28, nil, nil, 3, -190, 69, -219, -343, 499, -328, nil, 102, 58, 59, -159, nil, 10, 45, -255, 1170, 1458, -291, 59, -65, 23, nil, nil, 37, 39, -249, 24, -18, 401, -105, -706, 97, -54, -18, -228, 117, -12, -317, -220, -334, nil, nil, nil, nil, nil, nil, nil, nil, nil, 88, 100, -39, nil, 99, -252, -647, -482, -335, 94, -196, 51, -530, 93, 108, 108, -356, 110, 104, -539, 109, -538, -400, -734, -404, -550, -179, -188, -406, -666, -732, -350, -476, -735, -455, nil, 208, -455, 220, 355, -453, 247, -553, -134, nil, -561, -679, -767, -757, -140, -490, 141, -329, -306, -4, -52, nil, -61, -59, -698, -456, -579, nil, nil, 153, 11, 23, 149, 155, -247, -98, 156, 156, 156, -353, -351, -336, -287, nil, nil, -368, -440, -296, -552, 292, -434, -606, nil, -618, -764, nil, nil, -422] + +racc_goto_default = [ +nil, nil, nil, 3, nil, 4, 344, 291, nil, 521, nil, 836, nil, 288, 289, +nil, nil, nil, 11, 12, 18, 226, 319, nil, nil, 224, 225, nil, nil, 17, +nil, 439, 21, 22, 23, 24, nil, 675, nil, nil, nil, 308, nil, 25, 410, +32, nil, nil, 34, 37, 36, nil, 221, 222, 356, nil, 129, 418, 128, 131, +75, 76, nil, 90, 46, 280, nil, nil, nil, 805, 411, nil, 412, 423, 629, +485, 278, 264, 47, 48, 49, 50, 51, 52, 53, 54, 55, nil, 265, 61, +nil, nil, nil, nil, nil, nil, nil, 567, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 702, 549, nil, 703, +926, 776, 537, nil, 538, nil, nil, 539, nil, 541, 645, nil, nil, nil, 547, +nil, nil, nil, nil, nil, nil, nil, 422, nil, nil, nil, nil, nil, 74, 77, +78, nil, nil, nil, nil, nil, 596, nil, nil, nil, nil, nil, nil, 820, 737, +536, nil, 540, 828, 552, 554, 555, 788, 558, 559, 789, 562, 565, 283] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 146, :_reduce_none, + 2, 147, :_reduce_2, + 0, 148, :_reduce_3, + 1, 148, :_reduce_4, + 3, 148, :_reduce_5, + 2, 148, :_reduce_6, + 1, 150, :_reduce_none, + 4, 150, :_reduce_8, + 4, 153, :_reduce_9, + 2, 154, :_reduce_10, + 0, 158, :_reduce_11, + 1, 158, :_reduce_12, + 3, 158, :_reduce_13, + 2, 158, :_reduce_14, + 1, 159, :_reduce_none, + 4, 159, :_reduce_16, + 0, 175, :_reduce_17, + 4, 152, :_reduce_18, + 3, 152, :_reduce_19, + 3, 152, :_reduce_20, + 3, 152, :_reduce_21, + 2, 152, :_reduce_22, + 3, 152, :_reduce_23, + 3, 152, :_reduce_24, + 3, 152, :_reduce_25, + 3, 152, :_reduce_26, + 3, 152, :_reduce_27, + 4, 152, :_reduce_28, + 1, 152, :_reduce_none, + 3, 152, :_reduce_30, + 3, 152, :_reduce_31, + 6, 152, :_reduce_32, + 5, 152, :_reduce_33, + 5, 152, :_reduce_34, + 5, 152, :_reduce_35, + 5, 152, :_reduce_36, + 3, 152, :_reduce_37, + 3, 152, :_reduce_38, + 3, 152, :_reduce_39, + 1, 152, :_reduce_none, + 3, 163, :_reduce_41, + 3, 163, :_reduce_42, + 1, 174, :_reduce_none, + 3, 174, :_reduce_44, + 3, 174, :_reduce_45, + 3, 174, :_reduce_46, + 2, 174, :_reduce_47, + 1, 174, :_reduce_none, + 1, 162, :_reduce_none, + 1, 165, :_reduce_none, + 1, 165, :_reduce_none, + 1, 179, :_reduce_none, + 4, 179, :_reduce_53, + 0, 187, :_reduce_54, + 5, 184, :_reduce_55, + 1, 186, :_reduce_none, + 2, 178, :_reduce_57, + 3, 178, :_reduce_58, + 4, 178, :_reduce_59, + 5, 178, :_reduce_60, + 4, 178, :_reduce_61, + 5, 178, :_reduce_62, + 2, 178, :_reduce_63, + 2, 178, :_reduce_64, + 2, 178, :_reduce_65, + 2, 178, :_reduce_66, + 2, 178, :_reduce_67, + 1, 164, :_reduce_68, + 3, 164, :_reduce_69, + 1, 191, :_reduce_70, + 3, 191, :_reduce_71, + 1, 190, :_reduce_none, + 2, 190, :_reduce_73, + 3, 190, :_reduce_74, + 5, 190, :_reduce_75, + 2, 190, :_reduce_76, + 4, 190, :_reduce_77, + 2, 190, :_reduce_78, + 4, 190, :_reduce_79, + 1, 190, :_reduce_80, + 3, 190, :_reduce_81, + 1, 194, :_reduce_none, + 3, 194, :_reduce_83, + 2, 193, :_reduce_84, + 3, 193, :_reduce_85, + 1, 196, :_reduce_86, + 3, 196, :_reduce_87, + 1, 195, :_reduce_88, + 1, 195, :_reduce_89, + 4, 195, :_reduce_90, + 3, 195, :_reduce_91, + 3, 195, :_reduce_92, + 3, 195, :_reduce_93, + 3, 195, :_reduce_94, + 2, 195, :_reduce_95, + 1, 195, :_reduce_96, + 1, 171, :_reduce_97, + 1, 171, :_reduce_98, + 4, 171, :_reduce_99, + 3, 171, :_reduce_100, + 3, 171, :_reduce_101, + 3, 171, :_reduce_102, + 3, 171, :_reduce_103, + 2, 171, :_reduce_104, + 1, 171, :_reduce_105, + 1, 199, :_reduce_106, + 1, 199, :_reduce_none, + 2, 200, :_reduce_108, + 1, 200, :_reduce_109, + 3, 200, :_reduce_110, + 1, 201, :_reduce_none, + 1, 201, :_reduce_none, + 1, 201, :_reduce_none, + 1, 201, :_reduce_none, + 1, 201, :_reduce_none, + 1, 204, :_reduce_116, + 1, 204, :_reduce_none, + 1, 160, :_reduce_none, + 1, 160, :_reduce_none, + 1, 161, :_reduce_120, + 0, 207, :_reduce_121, + 4, 161, :_reduce_122, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 202, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 1, 203, :_reduce_none, + 3, 177, :_reduce_194, + 5, 177, :_reduce_195, + 3, 177, :_reduce_196, + 5, 177, :_reduce_197, + 6, 177, :_reduce_198, + 5, 177, :_reduce_199, + 5, 177, :_reduce_200, + 5, 177, :_reduce_201, + 5, 177, :_reduce_202, + 4, 177, :_reduce_203, + 3, 177, :_reduce_204, + 3, 177, :_reduce_205, + 3, 177, :_reduce_206, + 3, 177, :_reduce_207, + 3, 177, :_reduce_208, + 3, 177, :_reduce_209, + 3, 177, :_reduce_210, + 3, 177, :_reduce_211, + 3, 177, :_reduce_212, + 4, 177, :_reduce_213, + 2, 177, :_reduce_214, + 2, 177, :_reduce_215, + 3, 177, :_reduce_216, + 3, 177, :_reduce_217, + 3, 177, :_reduce_218, + 3, 177, :_reduce_219, + 3, 177, :_reduce_220, + 3, 177, :_reduce_221, + 3, 177, :_reduce_222, + 3, 177, :_reduce_223, + 3, 177, :_reduce_224, + 3, 177, :_reduce_225, + 3, 177, :_reduce_226, + 3, 177, :_reduce_227, + 3, 177, :_reduce_228, + 2, 177, :_reduce_229, + 2, 177, :_reduce_230, + 3, 177, :_reduce_231, + 3, 177, :_reduce_232, + 3, 177, :_reduce_233, + 3, 177, :_reduce_234, + 3, 177, :_reduce_235, + 0, 211, :_reduce_236, + 0, 212, :_reduce_237, + 8, 177, :_reduce_238, + 1, 177, :_reduce_none, + 1, 210, :_reduce_none, + 1, 213, :_reduce_none, + 2, 213, :_reduce_none, + 4, 213, :_reduce_243, + 2, 213, :_reduce_244, + 3, 218, :_reduce_245, + 0, 219, :_reduce_246, + 1, 219, :_reduce_none, + 0, 168, :_reduce_248, + 1, 168, :_reduce_none, + 2, 168, :_reduce_none, + 4, 168, :_reduce_251, + 2, 168, :_reduce_252, + 1, 189, :_reduce_253, + 2, 189, :_reduce_254, + 2, 189, :_reduce_255, + 4, 189, :_reduce_256, + 1, 189, :_reduce_257, + 0, 222, :_reduce_258, + 2, 183, :_reduce_259, + 2, 221, :_reduce_260, + 2, 220, :_reduce_261, + 0, 220, :_reduce_262, + 1, 215, :_reduce_263, + 2, 215, :_reduce_264, + 3, 215, :_reduce_265, + 4, 215, :_reduce_266, + 1, 173, :_reduce_267, + 1, 173, :_reduce_none, + 3, 172, :_reduce_269, + 4, 172, :_reduce_270, + 2, 172, :_reduce_271, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_none, + 1, 209, :_reduce_282, + 0, 245, :_reduce_283, + 4, 209, :_reduce_284, + 0, 246, :_reduce_285, + 0, 247, :_reduce_286, + 6, 209, :_reduce_287, + 0, 248, :_reduce_288, + 4, 209, :_reduce_289, + 3, 209, :_reduce_290, + 3, 209, :_reduce_291, + 2, 209, :_reduce_292, + 3, 209, :_reduce_293, + 3, 209, :_reduce_294, + 1, 209, :_reduce_295, + 4, 209, :_reduce_296, + 3, 209, :_reduce_297, + 1, 209, :_reduce_298, + 5, 209, :_reduce_299, + 4, 209, :_reduce_300, + 3, 209, :_reduce_301, + 2, 209, :_reduce_302, + 1, 209, :_reduce_none, + 2, 209, :_reduce_304, + 2, 209, :_reduce_305, + 6, 209, :_reduce_306, + 6, 209, :_reduce_307, + 0, 249, :_reduce_308, + 0, 250, :_reduce_309, + 7, 209, :_reduce_310, + 0, 251, :_reduce_311, + 0, 252, :_reduce_312, + 7, 209, :_reduce_313, + 5, 209, :_reduce_314, + 4, 209, :_reduce_315, + 0, 253, :_reduce_316, + 0, 254, :_reduce_317, + 9, 209, :_reduce_318, + 0, 255, :_reduce_319, + 6, 209, :_reduce_320, + 0, 256, :_reduce_321, + 7, 209, :_reduce_322, + 0, 257, :_reduce_323, + 5, 209, :_reduce_324, + 0, 258, :_reduce_325, + 6, 209, :_reduce_326, + 0, 259, :_reduce_327, + 0, 260, :_reduce_328, + 9, 209, :_reduce_329, + 1, 209, :_reduce_330, + 1, 209, :_reduce_331, + 1, 209, :_reduce_332, + 1, 209, :_reduce_333, + 1, 167, :_reduce_none, + 1, 236, :_reduce_none, + 1, 236, :_reduce_none, + 2, 236, :_reduce_337, + 1, 238, :_reduce_none, + 1, 238, :_reduce_none, + 1, 237, :_reduce_none, + 5, 237, :_reduce_341, + 1, 156, :_reduce_none, + 2, 156, :_reduce_343, + 1, 240, :_reduce_none, + 1, 240, :_reduce_none, + 1, 261, :_reduce_346, + 3, 261, :_reduce_347, + 1, 264, :_reduce_348, + 3, 264, :_reduce_349, + 1, 263, :_reduce_none, + 4, 263, :_reduce_351, + 6, 263, :_reduce_352, + 3, 263, :_reduce_353, + 5, 263, :_reduce_354, + 2, 263, :_reduce_355, + 4, 263, :_reduce_356, + 1, 263, :_reduce_357, + 3, 263, :_reduce_358, + 4, 265, :_reduce_359, + 2, 265, :_reduce_360, + 2, 265, :_reduce_361, + 1, 265, :_reduce_362, + 2, 270, :_reduce_363, + 0, 270, :_reduce_364, + 6, 271, :_reduce_365, + 8, 271, :_reduce_366, + 4, 271, :_reduce_367, + 6, 271, :_reduce_368, + 4, 271, :_reduce_369, + 2, 271, :_reduce_none, + 6, 271, :_reduce_371, + 2, 271, :_reduce_372, + 4, 271, :_reduce_373, + 6, 271, :_reduce_374, + 2, 271, :_reduce_375, + 4, 271, :_reduce_376, + 2, 271, :_reduce_377, + 4, 271, :_reduce_378, + 1, 271, :_reduce_none, + 0, 185, :_reduce_380, + 1, 185, :_reduce_381, + 3, 275, :_reduce_382, + 1, 275, :_reduce_383, + 4, 275, :_reduce_384, + 1, 276, :_reduce_385, + 4, 276, :_reduce_386, + 1, 277, :_reduce_387, + 3, 277, :_reduce_388, + 1, 278, :_reduce_389, + 1, 278, :_reduce_none, + 0, 282, :_reduce_391, + 0, 283, :_reduce_392, + 4, 235, :_reduce_393, + 4, 280, :_reduce_394, + 1, 280, :_reduce_395, + 3, 281, :_reduce_396, + 3, 281, :_reduce_397, + 0, 286, :_reduce_398, + 5, 285, :_reduce_399, + 2, 180, :_reduce_400, + 4, 180, :_reduce_401, + 5, 180, :_reduce_402, + 5, 180, :_reduce_403, + 2, 234, :_reduce_404, + 4, 234, :_reduce_405, + 4, 234, :_reduce_406, + 3, 234, :_reduce_407, + 3, 234, :_reduce_408, + 3, 234, :_reduce_409, + 2, 234, :_reduce_410, + 1, 234, :_reduce_411, + 4, 234, :_reduce_412, + 0, 288, :_reduce_413, + 5, 233, :_reduce_414, + 0, 289, :_reduce_415, + 5, 233, :_reduce_416, + 5, 239, :_reduce_417, + 1, 290, :_reduce_418, + 1, 290, :_reduce_none, + 6, 155, :_reduce_420, + 0, 155, :_reduce_421, + 1, 291, :_reduce_422, + 1, 291, :_reduce_none, + 1, 291, :_reduce_none, + 2, 292, :_reduce_425, + 1, 292, :_reduce_none, + 2, 157, :_reduce_427, + 1, 157, :_reduce_none, + 1, 223, :_reduce_none, + 1, 223, :_reduce_none, + 1, 223, :_reduce_none, + 1, 224, :_reduce_432, + 1, 294, :_reduce_433, + 2, 294, :_reduce_434, + 3, 295, :_reduce_435, + 1, 295, :_reduce_436, + 1, 295, :_reduce_437, + 3, 225, :_reduce_438, + 4, 226, :_reduce_439, + 3, 227, :_reduce_440, + 0, 299, :_reduce_441, + 3, 299, :_reduce_442, + 1, 300, :_reduce_443, + 2, 300, :_reduce_444, + 3, 229, :_reduce_445, + 0, 302, :_reduce_446, + 3, 302, :_reduce_447, + 3, 228, :_reduce_448, + 3, 230, :_reduce_449, + 0, 303, :_reduce_450, + 3, 303, :_reduce_451, + 0, 304, :_reduce_452, + 3, 304, :_reduce_453, + 0, 296, :_reduce_454, + 2, 296, :_reduce_455, + 0, 297, :_reduce_456, + 2, 297, :_reduce_457, + 0, 298, :_reduce_458, + 2, 298, :_reduce_459, + 1, 301, :_reduce_460, + 2, 301, :_reduce_461, + 0, 306, :_reduce_462, + 4, 301, :_reduce_463, + 1, 305, :_reduce_464, + 1, 305, :_reduce_465, + 1, 305, :_reduce_466, + 1, 305, :_reduce_none, + 1, 205, :_reduce_468, + 3, 206, :_reduce_469, + 1, 293, :_reduce_470, + 2, 293, :_reduce_471, + 1, 208, :_reduce_472, + 1, 208, :_reduce_473, + 1, 208, :_reduce_474, + 1, 208, :_reduce_475, + 1, 197, :_reduce_476, + 1, 197, :_reduce_477, + 1, 197, :_reduce_478, + 1, 197, :_reduce_479, + 1, 197, :_reduce_480, + 1, 198, :_reduce_481, + 1, 198, :_reduce_482, + 1, 198, :_reduce_483, + 1, 198, :_reduce_484, + 1, 198, :_reduce_485, + 1, 198, :_reduce_486, + 1, 198, :_reduce_487, + 1, 231, :_reduce_488, + 1, 231, :_reduce_489, + 1, 166, :_reduce_490, + 1, 166, :_reduce_491, + 1, 170, :_reduce_492, + 1, 170, :_reduce_493, + 1, 241, :_reduce_494, + 0, 307, :_reduce_495, + 4, 241, :_reduce_496, + 2, 241, :_reduce_497, + 3, 243, :_reduce_498, + 0, 309, :_reduce_499, + 3, 243, :_reduce_500, + 4, 308, :_reduce_501, + 2, 308, :_reduce_502, + 2, 308, :_reduce_503, + 1, 308, :_reduce_504, + 2, 311, :_reduce_505, + 0, 311, :_reduce_506, + 6, 284, :_reduce_507, + 8, 284, :_reduce_508, + 4, 284, :_reduce_509, + 6, 284, :_reduce_510, + 4, 284, :_reduce_511, + 6, 284, :_reduce_512, + 2, 284, :_reduce_513, + 4, 284, :_reduce_514, + 6, 284, :_reduce_515, + 2, 284, :_reduce_516, + 4, 284, :_reduce_517, + 2, 284, :_reduce_518, + 4, 284, :_reduce_519, + 1, 284, :_reduce_520, + 0, 284, :_reduce_521, + 1, 279, :_reduce_522, + 1, 279, :_reduce_523, + 1, 279, :_reduce_524, + 1, 279, :_reduce_525, + 1, 262, :_reduce_none, + 1, 262, :_reduce_527, + 1, 313, :_reduce_528, + 1, 314, :_reduce_529, + 3, 314, :_reduce_530, + 1, 272, :_reduce_531, + 3, 272, :_reduce_532, + 1, 315, :_reduce_533, + 2, 316, :_reduce_534, + 1, 316, :_reduce_535, + 2, 317, :_reduce_536, + 1, 317, :_reduce_537, + 1, 266, :_reduce_538, + 3, 266, :_reduce_539, + 1, 310, :_reduce_540, + 3, 310, :_reduce_541, + 1, 318, :_reduce_none, + 1, 318, :_reduce_none, + 2, 267, :_reduce_544, + 1, 267, :_reduce_545, + 3, 319, :_reduce_546, + 3, 320, :_reduce_547, + 1, 273, :_reduce_548, + 3, 273, :_reduce_549, + 1, 312, :_reduce_550, + 3, 312, :_reduce_551, + 1, 321, :_reduce_none, + 1, 321, :_reduce_none, + 2, 274, :_reduce_554, + 1, 274, :_reduce_555, + 1, 322, :_reduce_none, + 1, 322, :_reduce_none, + 2, 269, :_reduce_558, + 2, 268, :_reduce_559, + 0, 268, :_reduce_560, + 1, 244, :_reduce_none, + 3, 244, :_reduce_562, + 0, 232, :_reduce_563, + 2, 232, :_reduce_none, + 1, 217, :_reduce_565, + 3, 217, :_reduce_566, + 3, 323, :_reduce_567, + 2, 323, :_reduce_568, + 4, 323, :_reduce_569, + 2, 323, :_reduce_570, + 1, 188, :_reduce_none, + 1, 188, :_reduce_none, + 1, 188, :_reduce_none, + 1, 182, :_reduce_none, + 1, 182, :_reduce_none, + 1, 182, :_reduce_none, + 1, 182, :_reduce_none, + 1, 287, :_reduce_none, + 1, 287, :_reduce_none, + 1, 287, :_reduce_none, + 1, 181, :_reduce_none, + 1, 181, :_reduce_none, + 0, 149, :_reduce_none, + 1, 149, :_reduce_none, + 0, 176, :_reduce_none, + 1, 176, :_reduce_none, + 2, 192, :_reduce_587, + 2, 169, :_reduce_588, + 0, 216, :_reduce_none, + 1, 216, :_reduce_none, + 1, 216, :_reduce_none, + 1, 242, :_reduce_592, + 1, 242, :_reduce_none, + 1, 151, :_reduce_none, + 2, 151, :_reduce_none, + 0, 214, :_reduce_596 ] + +racc_reduce_n = 597 + +racc_shift_n = 1024 + +racc_token_table = { + false => 0, + :error => 1, + :kCLASS => 2, + :kMODULE => 3, + :kDEF => 4, + :kUNDEF => 5, + :kBEGIN => 6, + :kRESCUE => 7, + :kENSURE => 8, + :kEND => 9, + :kIF => 10, + :kUNLESS => 11, + :kTHEN => 12, + :kELSIF => 13, + :kELSE => 14, + :kCASE => 15, + :kWHEN => 16, + :kWHILE => 17, + :kUNTIL => 18, + :kFOR => 19, + :kBREAK => 20, + :kNEXT => 21, + :kREDO => 22, + :kRETRY => 23, + :kIN => 24, + :kDO => 25, + :kDO_COND => 26, + :kDO_BLOCK => 27, + :kDO_LAMBDA => 28, + :kRETURN => 29, + :kYIELD => 30, + :kSUPER => 31, + :kSELF => 32, + :kNIL => 33, + :kTRUE => 34, + :kFALSE => 35, + :kAND => 36, + :kOR => 37, + :kNOT => 38, + :kIF_MOD => 39, + :kUNLESS_MOD => 40, + :kWHILE_MOD => 41, + :kUNTIL_MOD => 42, + :kRESCUE_MOD => 43, + :kALIAS => 44, + :kDEFINED => 45, + :klBEGIN => 46, + :klEND => 47, + :k__LINE__ => 48, + :k__FILE__ => 49, + :k__ENCODING__ => 50, + :tIDENTIFIER => 51, + :tFID => 52, + :tGVAR => 53, + :tIVAR => 54, + :tCONSTANT => 55, + :tLABEL => 56, + :tCVAR => 57, + :tNTH_REF => 58, + :tBACK_REF => 59, + :tSTRING_CONTENT => 60, + :tINTEGER => 61, + :tFLOAT => 62, + :tREGEXP_END => 63, + :tUPLUS => 64, + :tUMINUS => 65, + :tUMINUS_NUM => 66, + :tPOW => 67, + :tCMP => 68, + :tEQ => 69, + :tEQQ => 70, + :tNEQ => 71, + :tGEQ => 72, + :tLEQ => 73, + :tANDOP => 74, + :tOROP => 75, + :tMATCH => 76, + :tNMATCH => 77, + :tDOT => 78, + :tDOT2 => 79, + :tDOT3 => 80, + :tAREF => 81, + :tASET => 82, + :tLSHFT => 83, + :tRSHFT => 84, + :tCOLON2 => 85, + :tCOLON3 => 86, + :tOP_ASGN => 87, + :tASSOC => 88, + :tLPAREN => 89, + :tLPAREN2 => 90, + :tRPAREN => 91, + :tLPAREN_ARG => 92, + :tLBRACK => 93, + :tLBRACK2 => 94, + :tRBRACK => 95, + :tLBRACE => 96, + :tLBRACE_ARG => 97, + :tSTAR => 98, + :tSTAR2 => 99, + :tAMPER => 100, + :tAMPER2 => 101, + :tTILDE => 102, + :tPERCENT => 103, + :tDIVIDE => 104, + :tDSTAR => 105, + :tPLUS => 106, + :tMINUS => 107, + :tLT => 108, + :tGT => 109, + :tPIPE => 110, + :tBANG => 111, + :tCARET => 112, + :tLCURLY => 113, + :tRCURLY => 114, + :tBACK_REF2 => 115, + :tSYMBEG => 116, + :tSTRING_BEG => 117, + :tXSTRING_BEG => 118, + :tREGEXP_BEG => 119, + :tREGEXP_OPT => 120, + :tWORDS_BEG => 121, + :tQWORDS_BEG => 122, + :tSYMBOLS_BEG => 123, + :tQSYMBOLS_BEG => 124, + :tSTRING_DBEG => 125, + :tSTRING_DVAR => 126, + :tSTRING_END => 127, + :tSTRING_DEND => 128, + :tSTRING => 129, + :tSYMBOL => 130, + :tNL => 131, + :tEH => 132, + :tCOLON => 133, + :tCOMMA => 134, + :tSPACE => 135, + :tSEMI => 136, + :tLAMBDA => 137, + :tLAMBEG => 138, + :tCHARACTER => 139, + :tRATIONAL => 140, + :tIMAGINARY => 141, + :tLABEL_END => 142, + :tEQL => 143, + :tLOWEST => 144 } + +racc_nt_base = 145 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "kCLASS", + "kMODULE", + "kDEF", + "kUNDEF", + "kBEGIN", + "kRESCUE", + "kENSURE", + "kEND", + "kIF", + "kUNLESS", + "kTHEN", + "kELSIF", + "kELSE", + "kCASE", + "kWHEN", + "kWHILE", + "kUNTIL", + "kFOR", + "kBREAK", + "kNEXT", + "kREDO", + "kRETRY", + "kIN", + "kDO", + "kDO_COND", + "kDO_BLOCK", + "kDO_LAMBDA", + "kRETURN", + "kYIELD", + "kSUPER", + "kSELF", + "kNIL", + "kTRUE", + "kFALSE", + "kAND", + "kOR", + "kNOT", + "kIF_MOD", + "kUNLESS_MOD", + "kWHILE_MOD", + "kUNTIL_MOD", + "kRESCUE_MOD", + "kALIAS", + "kDEFINED", + "klBEGIN", + "klEND", + "k__LINE__", + "k__FILE__", + "k__ENCODING__", + "tIDENTIFIER", + "tFID", + "tGVAR", + "tIVAR", + "tCONSTANT", + "tLABEL", + "tCVAR", + "tNTH_REF", + "tBACK_REF", + "tSTRING_CONTENT", + "tINTEGER", + "tFLOAT", + "tREGEXP_END", + "tUPLUS", + "tUMINUS", + "tUMINUS_NUM", + "tPOW", + "tCMP", + "tEQ", + "tEQQ", + "tNEQ", + "tGEQ", + "tLEQ", + "tANDOP", + "tOROP", + "tMATCH", + "tNMATCH", + "tDOT", + "tDOT2", + "tDOT3", + "tAREF", + "tASET", + "tLSHFT", + "tRSHFT", + "tCOLON2", + "tCOLON3", + "tOP_ASGN", + "tASSOC", + "tLPAREN", + "tLPAREN2", + "tRPAREN", + "tLPAREN_ARG", + "tLBRACK", + "tLBRACK2", + "tRBRACK", + "tLBRACE", + "tLBRACE_ARG", + "tSTAR", + "tSTAR2", + "tAMPER", + "tAMPER2", + "tTILDE", + "tPERCENT", + "tDIVIDE", + "tDSTAR", + "tPLUS", + "tMINUS", + "tLT", + "tGT", + "tPIPE", + "tBANG", + "tCARET", + "tLCURLY", + "tRCURLY", + "tBACK_REF2", + "tSYMBEG", + "tSTRING_BEG", + "tXSTRING_BEG", + "tREGEXP_BEG", + "tREGEXP_OPT", + "tWORDS_BEG", + "tQWORDS_BEG", + "tSYMBOLS_BEG", + "tQSYMBOLS_BEG", + "tSTRING_DBEG", + "tSTRING_DVAR", + "tSTRING_END", + "tSTRING_DEND", + "tSTRING", + "tSYMBOL", + "tNL", + "tEH", + "tCOLON", + "tCOMMA", + "tSPACE", + "tSEMI", + "tLAMBDA", + "tLAMBEG", + "tCHARACTER", + "tRATIONAL", + "tIMAGINARY", + "tLABEL_END", + "tEQL", + "tLOWEST", + "$start", + "program", + "top_compstmt", + "top_stmts", + "opt_terms", + "top_stmt", + "terms", + "stmt", + "bodystmt", + "compstmt", + "opt_rescue", + "opt_else", + "opt_ensure", + "stmts", + "stmt_or_begin", + "fitem", + "undef_list", + "expr_value", + "command_asgn", + "mlhs", + "command_call", + "var_lhs", + "primary_value", + "opt_call_args", + "rbracket", + "backref", + "lhs", + "mrhs", + "mrhs_arg", + "expr", + "@1", + "opt_nl", + "arg", + "command", + "block_command", + "block_call", + "dot_or_colon", + "operation2", + "command_args", + "cmd_brace_block", + "opt_block_param", + "fcall", + "@2", + "operation", + "call_args", + "mlhs_basic", + "mlhs_inner", + "rparen", + "mlhs_head", + "mlhs_item", + "mlhs_node", + "mlhs_post", + "user_variable", + "keyword_variable", + "cname", + "cpath", + "fname", + "op", + "reswords", + "fsym", + "symbol", + "dsym", + "@3", + "simple_numeric", + "primary", + "arg_value", + "@4", + "@5", + "aref_args", + "none", + "args", + "trailer", + "assocs", + "paren_args", + "opt_paren_args", + "opt_block_arg", + "block_arg", + "@6", + "literal", + "strings", + "xstring", + "regexp", + "words", + "qwords", + "symbols", + "qsymbols", + "var_ref", + "assoc_list", + "brace_block", + "method_call", + "lambda", + "then", + "if_tail", + "do", + "case_body", + "for_var", + "superclass", + "term", + "f_arglist", + "singleton", + "@7", + "@8", + "@9", + "@10", + "@11", + "@12", + "@13", + "@14", + "@15", + "@16", + "@17", + "@18", + "@19", + "@20", + "@21", + "@22", + "f_marg", + "f_norm_arg", + "f_margs", + "f_marg_list", + "block_args_tail", + "f_block_kwarg", + "f_kwrest", + "opt_f_block_arg", + "f_block_arg", + "opt_block_args_tail", + "block_param", + "f_arg", + "f_block_optarg", + "f_rest_arg", + "block_param_def", + "opt_bv_decl", + "bv_decls", + "bvar", + "f_bad_arg", + "f_larglist", + "lambda_body", + "@23", + "@24", + "f_args", + "do_block", + "@25", + "operation3", + "@26", + "@27", + "cases", + "exc_list", + "exc_var", + "numeric", + "string", + "string1", + "string_contents", + "xstring_contents", + "regexp_contents", + "word_list", + "word", + "string_content", + "symbol_list", + "qword_list", + "qsym_list", + "string_dvar", + "@28", + "@29", + "args_tail", + "@30", + "f_kwarg", + "opt_args_tail", + "f_optarg", + "f_arg_asgn", + "f_arg_item", + "f_label", + "f_kw", + "f_block_kw", + "kwrest_mark", + "f_opt", + "f_block_opt", + "restarg_mark", + "blkarg_mark", + "assoc" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'ruby22.y', 78) + def _reduce_2(val, _values, result) + result = @builder.compstmt(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 83) + def _reduce_3(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 87) + def _reduce_4(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 91) + def _reduce_5(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 95) + def _reduce_6(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +# reduce 7 omitted + +module_eval(<<'.,.,', 'ruby22.y', 101) + def _reduce_8(val, _values, result) + result = @builder.preexe(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 106) + def _reduce_9(val, _values, result) + rescue_bodies = val[1] + else_t, else_ = val[2] + ensure_t, ensure_ = val[3] + + if rescue_bodies.empty? && !else_.nil? + diagnostic :warning, :useless_else, nil, else_t + end + + result = @builder.begin_body(val[0], + rescue_bodies, + else_t, else_, + ensure_t, ensure_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 122) + def _reduce_10(val, _values, result) + result = @builder.compstmt(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 127) + def _reduce_11(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 131) + def _reduce_12(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 135) + def _reduce_13(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 139) + def _reduce_14(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +# reduce 15 omitted + +module_eval(<<'.,.,', 'ruby22.y', 145) + def _reduce_16(val, _values, result) + diagnostic :error, :begin_in_method, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 150) + def _reduce_17(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 154) + def _reduce_18(val, _values, result) + result = @builder.alias(val[0], val[1], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 158) + def _reduce_19(val, _values, result) + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.gvar(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 164) + def _reduce_20(val, _values, result) + result = @builder.alias(val[0], + @builder.gvar(val[1]), + @builder.back_ref(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 170) + def _reduce_21(val, _values, result) + diagnostic :error, :nth_ref_alias, nil, val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 174) + def _reduce_22(val, _values, result) + result = @builder.undef_method(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 178) + def _reduce_23(val, _values, result) + result = @builder.condition_mod(val[0], nil, + val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 183) + def _reduce_24(val, _values, result) + result = @builder.condition_mod(nil, val[0], + val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 188) + def _reduce_25(val, _values, result) + result = @builder.loop_mod(:while, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 192) + def _reduce_26(val, _values, result) + result = @builder.loop_mod(:until, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 196) + def _reduce_27(val, _values, result) + rescue_body = @builder.rescue_body(val[1], + nil, nil, nil, + nil, val[2]) + + result = @builder.begin_body(val[0], [ rescue_body ]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 204) + def _reduce_28(val, _values, result) + result = @builder.postexe(val[0], val[1], val[2], val[3]) + + result + end +.,., + +# reduce 29 omitted + +module_eval(<<'.,.,', 'ruby22.y', 209) + def _reduce_30(val, _values, result) + result = @builder.multi_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 213) + def _reduce_31(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 217) + def _reduce_32(val, _values, result) + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 224) + def _reduce_33(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 231) + def _reduce_34(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 238) + def _reduce_35(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 245) + def _reduce_36(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 252) + def _reduce_37(val, _values, result) + @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 256) + def _reduce_38(val, _values, result) + result = @builder.assign(val[0], val[1], + @builder.array(nil, val[2], nil)) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 261) + def _reduce_39(val, _values, result) + result = @builder.multi_assign(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 40 omitted + +module_eval(<<'.,.,', 'ruby22.y', 267) + def _reduce_41(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 271) + def _reduce_42(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 43 omitted + +module_eval(<<'.,.,', 'ruby22.y', 277) + def _reduce_44(val, _values, result) + result = @builder.logical_op(:and, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 281) + def _reduce_45(val, _values, result) + result = @builder.logical_op(:or, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 285) + def _reduce_46(val, _values, result) + result = @builder.not_op(val[0], nil, val[2], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 289) + def _reduce_47(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +# reduce 48 omitted + +# reduce 49 omitted + +# reduce 50 omitted + +# reduce 51 omitted + +# reduce 52 omitted + +module_eval(<<'.,.,', 'ruby22.y', 301) + def _reduce_53(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 307) + def _reduce_54(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 311) + def _reduce_55(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +# reduce 56 omitted + +module_eval(<<'.,.,', 'ruby22.y', 320) + def _reduce_57(val, _values, result) + result = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 325) + def _reduce_58(val, _values, result) + method_call = @builder.call_method(nil, nil, val[0], + nil, val[1], nil) + + begin_t, args, body, end_t = val[2] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 334) + def _reduce_59(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 339) + def _reduce_60(val, _values, result) + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 348) + def _reduce_61(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 353) + def _reduce_62(val, _values, result) + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 362) + def _reduce_63(val, _values, result) + result = @builder.keyword_cmd(:super, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 367) + def _reduce_64(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 372) + def _reduce_65(val, _values, result) + result = @builder.keyword_cmd(:return, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 377) + def _reduce_66(val, _values, result) + result = @builder.keyword_cmd(:break, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 382) + def _reduce_67(val, _values, result) + result = @builder.keyword_cmd(:next, val[0], + nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 388) + def _reduce_68(val, _values, result) + result = @builder.multi_lhs(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 392) + def _reduce_69(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 397) + def _reduce_70(val, _values, result) + result = @builder.multi_lhs(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 401) + def _reduce_71(val, _values, result) + result = @builder.multi_lhs(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 72 omitted + +module_eval(<<'.,.,', 'ruby22.y', 407) + def _reduce_73(val, _values, result) + result = val[0]. + push(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 412) + def _reduce_74(val, _values, result) + result = val[0]. + push(@builder.splat(val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 417) + def _reduce_75(val, _values, result) + result = val[0]. + push(@builder.splat(val[1], val[2])). + concat(val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 423) + def _reduce_76(val, _values, result) + result = val[0]. + push(@builder.splat(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 428) + def _reduce_77(val, _values, result) + result = val[0]. + push(@builder.splat(val[1])). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 434) + def _reduce_78(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 438) + def _reduce_79(val, _values, result) + result = [ @builder.splat(val[0], val[1]), + *val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 443) + def _reduce_80(val, _values, result) + result = [ @builder.splat(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 447) + def _reduce_81(val, _values, result) + result = [ @builder.splat(val[0]), + *val[2] ] + + result + end +.,., + +# reduce 82 omitted + +module_eval(<<'.,.,', 'ruby22.y', 454) + def _reduce_83(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 459) + def _reduce_84(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 463) + def _reduce_85(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 468) + def _reduce_86(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 472) + def _reduce_87(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 477) + def _reduce_88(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 481) + def _reduce_89(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 485) + def _reduce_90(val, _values, result) + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 489) + def _reduce_91(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 493) + def _reduce_92(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 497) + def _reduce_93(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 501) + def _reduce_94(val, _values, result) + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 506) + def _reduce_95(val, _values, result) + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 511) + def _reduce_96(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 516) + def _reduce_97(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 520) + def _reduce_98(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 524) + def _reduce_99(val, _values, result) + result = @builder.index_asgn(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 528) + def _reduce_100(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 532) + def _reduce_101(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 536) + def _reduce_102(val, _values, result) + result = @builder.attr_asgn(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 540) + def _reduce_103(val, _values, result) + result = @builder.assignable( + @builder.const_fetch(val[0], val[1], val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 545) + def _reduce_104(val, _values, result) + result = @builder.assignable( + @builder.const_global(val[0], val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 550) + def _reduce_105(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 555) + def _reduce_106(val, _values, result) + diagnostic :error, :module_name_const, nil, val[0] + + result + end +.,., + +# reduce 107 omitted + +module_eval(<<'.,.,', 'ruby22.y', 561) + def _reduce_108(val, _values, result) + result = @builder.const_global(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 565) + def _reduce_109(val, _values, result) + result = @builder.const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 569) + def _reduce_110(val, _values, result) + result = @builder.const_fetch(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 111 omitted + +# reduce 112 omitted + +# reduce 113 omitted + +# reduce 114 omitted + +# reduce 115 omitted + +module_eval(<<'.,.,', 'ruby22.y', 578) + def _reduce_116(val, _values, result) + result = @builder.symbol(val[0]) + + result + end +.,., + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +module_eval(<<'.,.,', 'ruby22.y', 587) + def _reduce_120(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 591) + def _reduce_121(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 595) + def _reduce_122(val, _values, result) + result = val[0] << val[3] + + result + end +.,., + +# reduce 123 omitted + +# reduce 124 omitted + +# reduce 125 omitted + +# reduce 126 omitted + +# reduce 127 omitted + +# reduce 128 omitted + +# reduce 129 omitted + +# reduce 130 omitted + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +# reduce 136 omitted + +# reduce 137 omitted + +# reduce 138 omitted + +# reduce 139 omitted + +# reduce 140 omitted + +# reduce 141 omitted + +# reduce 142 omitted + +# reduce 143 omitted + +# reduce 144 omitted + +# reduce 145 omitted + +# reduce 146 omitted + +# reduce 147 omitted + +# reduce 148 omitted + +# reduce 149 omitted + +# reduce 150 omitted + +# reduce 151 omitted + +# reduce 152 omitted + +# reduce 153 omitted + +# reduce 154 omitted + +# reduce 155 omitted + +# reduce 156 omitted + +# reduce 157 omitted + +# reduce 158 omitted + +# reduce 159 omitted + +# reduce 160 omitted + +# reduce 161 omitted + +# reduce 162 omitted + +# reduce 163 omitted + +# reduce 164 omitted + +# reduce 165 omitted + +# reduce 166 omitted + +# reduce 167 omitted + +# reduce 168 omitted + +# reduce 169 omitted + +# reduce 170 omitted + +# reduce 171 omitted + +# reduce 172 omitted + +# reduce 173 omitted + +# reduce 174 omitted + +# reduce 175 omitted + +# reduce 176 omitted + +# reduce 177 omitted + +# reduce 178 omitted + +# reduce 179 omitted + +# reduce 180 omitted + +# reduce 181 omitted + +# reduce 182 omitted + +# reduce 183 omitted + +# reduce 184 omitted + +# reduce 185 omitted + +# reduce 186 omitted + +# reduce 187 omitted + +# reduce 188 omitted + +# reduce 189 omitted + +# reduce 190 omitted + +# reduce 191 omitted + +# reduce 192 omitted + +# reduce 193 omitted + +module_eval(<<'.,.,', 'ruby22.y', 616) + def _reduce_194(val, _values, result) + result = @builder.assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 620) + def _reduce_195(val, _values, result) + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.assign(val[0], val[1], rescue_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 630) + def _reduce_196(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 634) + def _reduce_197(val, _values, result) + rescue_body = @builder.rescue_body(val[3], + nil, nil, nil, + nil, val[4]) + + rescue_ = @builder.begin_body(val[2], [ rescue_body ]) + + result = @builder.op_assign(val[0], val[1], rescue_) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 644) + def _reduce_198(val, _values, result) + result = @builder.op_assign( + @builder.index( + val[0], val[1], val[2], val[3]), + val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 651) + def _reduce_199(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 658) + def _reduce_200(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 665) + def _reduce_201(val, _values, result) + result = @builder.op_assign( + @builder.call_method( + val[0], val[1], val[2]), + val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 672) + def _reduce_202(val, _values, result) + const = @builder.const_op_assignable( + @builder.const_fetch(val[0], val[1], val[2])) + result = @builder.op_assign(const, val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 678) + def _reduce_203(val, _values, result) + const = @builder.const_op_assignable( + @builder.const_global(val[0], val[1])) + result = @builder.op_assign(const, val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 684) + def _reduce_204(val, _values, result) + result = @builder.op_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 688) + def _reduce_205(val, _values, result) + result = @builder.range_inclusive(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 692) + def _reduce_206(val, _values, result) + result = @builder.range_exclusive(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 696) + def _reduce_207(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 700) + def _reduce_208(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 704) + def _reduce_209(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 708) + def _reduce_210(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 712) + def _reduce_211(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 716) + def _reduce_212(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 720) + def _reduce_213(val, _values, result) + result = @builder.unary_op(val[0], + @builder.binary_op( + val[1], val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 726) + def _reduce_214(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 730) + def _reduce_215(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 734) + def _reduce_216(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 738) + def _reduce_217(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 742) + def _reduce_218(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 746) + def _reduce_219(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 750) + def _reduce_220(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 754) + def _reduce_221(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 758) + def _reduce_222(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 762) + def _reduce_223(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 766) + def _reduce_224(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 770) + def _reduce_225(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 774) + def _reduce_226(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 778) + def _reduce_227(val, _values, result) + result = @builder.match_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 782) + def _reduce_228(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 786) + def _reduce_229(val, _values, result) + result = @builder.not_op(val[0], nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 790) + def _reduce_230(val, _values, result) + result = @builder.unary_op(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 794) + def _reduce_231(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 798) + def _reduce_232(val, _values, result) + result = @builder.binary_op(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 802) + def _reduce_233(val, _values, result) + result = @builder.logical_op(:and, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 806) + def _reduce_234(val, _values, result) + result = @builder.logical_op(:or, val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 810) + def _reduce_235(val, _values, result) + result = @builder.keyword_cmd(:defined?, val[0], nil, [ val[2] ], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 820) + def _reduce_236(val, _values, result) + @lexer.push_cond + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 825) + def _reduce_237(val, _values, result) + @lexer.pop_cond + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 829) + def _reduce_238(val, _values, result) + result = @builder.ternary(val[0], val[1], + val[3], val[5], val[7]) + + result + end +.,., + +# reduce 239 omitted + +# reduce 240 omitted + +# reduce 241 omitted + +# reduce 242 omitted + +module_eval(<<'.,.,', 'ruby22.y', 840) + def _reduce_243(val, _values, result) + result = val[0] << @builder.associate(nil, val[2], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 844) + def _reduce_244(val, _values, result) + result = [ @builder.associate(nil, val[0], nil) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 849) + def _reduce_245(val, _values, result) + result = val + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 854) + def _reduce_246(val, _values, result) + result = [ nil, [], nil ] + + result + end +.,., + +# reduce 247 omitted + +module_eval(<<'.,.,', 'ruby22.y', 860) + def _reduce_248(val, _values, result) + result = [] + + result + end +.,., + +# reduce 249 omitted + +# reduce 250 omitted + +module_eval(<<'.,.,', 'ruby22.y', 866) + def _reduce_251(val, _values, result) + result = val[0] << @builder.associate(nil, val[2], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 870) + def _reduce_252(val, _values, result) + result = [ @builder.associate(nil, val[0], nil) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 875) + def _reduce_253(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 879) + def _reduce_254(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 883) + def _reduce_255(val, _values, result) + result = [ @builder.associate(nil, val[0], nil) ] + result.concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 888) + def _reduce_256(val, _values, result) + assocs = @builder.associate(nil, val[2], nil) + result = val[0] << assocs + result.concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 894) + def _reduce_257(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 898) + def _reduce_258(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 903) + def _reduce_259(val, _values, result) + @lexer.cmdarg = val[0] + + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 910) + def _reduce_260(val, _values, result) + result = @builder.block_pass(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 915) + def _reduce_261(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 919) + def _reduce_262(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 924) + def _reduce_263(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 928) + def _reduce_264(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 932) + def _reduce_265(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 936) + def _reduce_266(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 941) + def _reduce_267(val, _values, result) + result = @builder.array(nil, val[0], nil) + + result + end +.,., + +# reduce 268 omitted + +module_eval(<<'.,.,', 'ruby22.y', 947) + def _reduce_269(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 951) + def _reduce_270(val, _values, result) + result = val[0] << @builder.splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 955) + def _reduce_271(val, _values, result) + result = [ @builder.splat(val[0], val[1]) ] + + result + end +.,., + +# reduce 272 omitted + +# reduce 273 omitted + +# reduce 274 omitted + +# reduce 275 omitted + +# reduce 276 omitted + +# reduce 277 omitted + +# reduce 278 omitted + +# reduce 279 omitted + +# reduce 280 omitted + +# reduce 281 omitted + +module_eval(<<'.,.,', 'ruby22.y', 970) + def _reduce_282(val, _values, result) + result = @builder.call_method(nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 974) + def _reduce_283(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 979) + def _reduce_284(val, _values, result) + @lexer.cmdarg = val[1] + + result = @builder.begin_keyword(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 985) + def _reduce_285(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 990) + def _reduce_286(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 994) + def _reduce_287(val, _values, result) + @lexer.cmdarg = val[1] + + result = @builder.begin(val[0], val[2], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1000) + def _reduce_288(val, _values, result) + @lexer.state = :expr_endarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1004) + def _reduce_289(val, _values, result) + result = @builder.begin(val[0], nil, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1008) + def _reduce_290(val, _values, result) + result = @builder.begin(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1012) + def _reduce_291(val, _values, result) + result = @builder.const_fetch(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1016) + def _reduce_292(val, _values, result) + result = @builder.const_global(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1020) + def _reduce_293(val, _values, result) + result = @builder.array(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1024) + def _reduce_294(val, _values, result) + result = @builder.associate(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1028) + def _reduce_295(val, _values, result) + result = @builder.keyword_cmd(:return, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1032) + def _reduce_296(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1036) + def _reduce_297(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0], val[1], [], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1040) + def _reduce_298(val, _values, result) + result = @builder.keyword_cmd(:yield, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1044) + def _reduce_299(val, _values, result) + result = @builder.keyword_cmd(:defined?, val[0], + val[2], [ val[3] ], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1049) + def _reduce_300(val, _values, result) + result = @builder.not_op(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1053) + def _reduce_301(val, _values, result) + result = @builder.not_op(val[0], val[1], nil, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1057) + def _reduce_302(val, _values, result) + method_call = @builder.call_method(nil, nil, val[0]) + + begin_t, args, body, end_t = val[1] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +# reduce 303 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1066) + def _reduce_304(val, _values, result) + begin_t, args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1072) + def _reduce_305(val, _values, result) + lambda_call = @builder.call_lambda(val[0]) + + args, (begin_t, body, end_t) = val[1] + result = @builder.block(lambda_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1080) + def _reduce_306(val, _values, result) + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1087) + def _reduce_307(val, _values, result) + else_t, else_ = val[4] + result = @builder.condition(val[0], val[1], val[2], + else_, else_t, + val[3], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1094) + def _reduce_308(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1098) + def _reduce_309(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1102) + def _reduce_310(val, _values, result) + result = @builder.loop(:while, val[0], val[2], val[3], + val[5], val[6]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1107) + def _reduce_311(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1111) + def _reduce_312(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1115) + def _reduce_313(val, _values, result) + result = @builder.loop(:until, val[0], val[2], val[3], + val[5], val[6]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1120) + def _reduce_314(val, _values, result) + *when_bodies, (else_t, else_body) = *val[3] + + result = @builder.case(val[0], val[1], + when_bodies, else_t, else_body, + val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1128) + def _reduce_315(val, _values, result) + *when_bodies, (else_t, else_body) = *val[2] + + result = @builder.case(val[0], nil, + when_bodies, else_t, else_body, + val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1136) + def _reduce_316(val, _values, result) + @lexer.cond.push(true) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1140) + def _reduce_317(val, _values, result) + @lexer.cond.pop + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1144) + def _reduce_318(val, _values, result) + result = @builder.for(val[0], val[1], + val[2], val[4], + val[5], val[7], val[8]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1150) + def _reduce_319(val, _values, result) + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1155) + def _reduce_320(val, _values, result) + if in_def? + diagnostic :error, :class_in_def, nil, val[0] + end + + lt_t, superclass = val[2] + result = @builder.def_class(val[0], val[1], + lt_t, superclass, + val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1169) + def _reduce_321(val, _values, result) + result = @def_level + @def_level = 0 + + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1177) + def _reduce_322(val, _values, result) + result = @builder.def_sclass(val[0], val[1], val[2], + val[5], val[6]) + + @lexer.pop_cmdarg + @static_env.unextend + + @def_level = val[4] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1187) + def _reduce_323(val, _values, result) + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1192) + def _reduce_324(val, _values, result) + if in_def? + diagnostic :error, :module_in_def, nil, val[0] + end + + result = @builder.def_module(val[0], val[1], + val[3], val[4]) + + @lexer.pop_cmdarg + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1204) + def _reduce_325(val, _values, result) + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1210) + def _reduce_326(val, _values, result) + result = @builder.def_method(val[0], val[1], + val[3], val[4], val[5]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1219) + def _reduce_327(val, _values, result) + @lexer.state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1223) + def _reduce_328(val, _values, result) + @def_level += 1 + @static_env.extend_static + @lexer.push_cmdarg + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1229) + def _reduce_329(val, _values, result) + result = @builder.def_singleton(val[0], val[1], val[2], + val[4], val[6], val[7], val[8]) + + @lexer.pop_cmdarg + @static_env.unextend + @def_level -= 1 + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1238) + def _reduce_330(val, _values, result) + result = @builder.keyword_cmd(:break, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1242) + def _reduce_331(val, _values, result) + result = @builder.keyword_cmd(:next, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1246) + def _reduce_332(val, _values, result) + result = @builder.keyword_cmd(:redo, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1250) + def _reduce_333(val, _values, result) + result = @builder.keyword_cmd(:retry, val[0]) + + result + end +.,., + +# reduce 334 omitted + +# reduce 335 omitted + +# reduce 336 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1259) + def _reduce_337(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 338 omitted + +# reduce 339 omitted + +# reduce 340 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1268) + def _reduce_341(val, _values, result) + else_t, else_ = val[4] + result = [ val[0], + @builder.condition(val[0], val[1], val[2], + val[3], else_t, + else_, nil), + ] + + result + end +.,., + +# reduce 342 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1279) + def _reduce_343(val, _values, result) + result = val + + result + end +.,., + +# reduce 344 omitted + +# reduce 345 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1287) + def _reduce_346(val, _values, result) + result = @builder.arg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1291) + def _reduce_347(val, _values, result) + result = @builder.multi_lhs(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1296) + def _reduce_348(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1300) + def _reduce_349(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 350 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1306) + def _reduce_351(val, _values, result) + result = val[0]. + push(@builder.restarg(val[2], val[3])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1311) + def _reduce_352(val, _values, result) + result = val[0]. + push(@builder.restarg(val[2], val[3])). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1317) + def _reduce_353(val, _values, result) + result = val[0]. + push(@builder.restarg(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1322) + def _reduce_354(val, _values, result) + result = val[0]. + push(@builder.restarg(val[2])). + concat(val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1328) + def _reduce_355(val, _values, result) + result = [ @builder.restarg(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1332) + def _reduce_356(val, _values, result) + result = [ @builder.restarg(val[0], val[1]), + *val[3] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1337) + def _reduce_357(val, _values, result) + result = [ @builder.restarg(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1341) + def _reduce_358(val, _values, result) + result = [ @builder.restarg(val[0]), + *val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1347) + def _reduce_359(val, _values, result) + result = val[0].concat(val[2]).concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1351) + def _reduce_360(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1355) + def _reduce_361(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1359) + def _reduce_362(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1365) + def _reduce_363(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1369) + def _reduce_364(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1374) + def _reduce_365(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1381) + def _reduce_366(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1389) + def _reduce_367(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1395) + def _reduce_368(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1402) + def _reduce_369(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +# reduce 370 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1409) + def _reduce_371(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1416) + def _reduce_372(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1420) + def _reduce_373(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1426) + def _reduce_374(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1433) + def _reduce_375(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1438) + def _reduce_376(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1444) + def _reduce_377(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1449) + def _reduce_378(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +# reduce 379 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1457) + def _reduce_380(val, _values, result) + result = @builder.args(nil, [], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1461) + def _reduce_381(val, _values, result) + @lexer.state = :expr_value + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1466) + def _reduce_382(val, _values, result) + result = @builder.args(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1470) + def _reduce_383(val, _values, result) + result = @builder.args(val[0], [], val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1474) + def _reduce_384(val, _values, result) + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1479) + def _reduce_385(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1483) + def _reduce_386(val, _values, result) + result = val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1488) + def _reduce_387(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1492) + def _reduce_388(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1497) + def _reduce_389(val, _values, result) + result = @builder.shadowarg(val[0]) + + result + end +.,., + +# reduce 390 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1502) + def _reduce_391(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1506) + def _reduce_392(val, _values, result) + result = @lexer.cmdarg.dup + @lexer.cmdarg.clear + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1511) + def _reduce_393(val, _values, result) + @lexer.cmdarg = val[2] + @lexer.cmdarg.lexpop + + result = [ val[1], val[3] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1521) + def _reduce_394(val, _values, result) + result = @builder.args(val[0], val[1].concat(val[2]), val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1525) + def _reduce_395(val, _values, result) + result = @builder.args(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1530) + def _reduce_396(val, _values, result) + result = [ val[0], val[1], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1534) + def _reduce_397(val, _values, result) + result = [ val[0], val[1], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1539) + def _reduce_398(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1543) + def _reduce_399(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1550) + def _reduce_400(val, _values, result) + begin_t, block_args, body, end_t = val[1] + result = @builder.block(val[0], + begin_t, block_args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1556) + def _reduce_401(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1562) + def _reduce_402(val, _values, result) + lparen_t, args, rparen_t = val[3] + method_call = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1572) + def _reduce_403(val, _values, result) + method_call = @builder.call_method(val[0], val[1], val[2], + nil, val[3], nil) + + begin_t, args, body, end_t = val[4] + result = @builder.block(method_call, + begin_t, args, body, end_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1582) + def _reduce_404(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.call_method(nil, nil, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1588) + def _reduce_405(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1594) + def _reduce_406(val, _values, result) + lparen_t, args, rparen_t = val[3] + result = @builder.call_method(val[0], val[1], val[2], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1600) + def _reduce_407(val, _values, result) + result = @builder.call_method(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1604) + def _reduce_408(val, _values, result) + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1610) + def _reduce_409(val, _values, result) + lparen_t, args, rparen_t = val[2] + result = @builder.call_method(val[0], val[1], nil, + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1616) + def _reduce_410(val, _values, result) + lparen_t, args, rparen_t = val[1] + result = @builder.keyword_cmd(:super, val[0], + lparen_t, args, rparen_t) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1622) + def _reduce_411(val, _values, result) + result = @builder.keyword_cmd(:zsuper, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1626) + def _reduce_412(val, _values, result) + result = @builder.index(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1631) + def _reduce_413(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1635) + def _reduce_414(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1641) + def _reduce_415(val, _values, result) + @static_env.extend_dynamic + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1645) + def _reduce_416(val, _values, result) + result = [ val[0], val[2], val[3], val[4] ] + + @static_env.unextend + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1652) + def _reduce_417(val, _values, result) + result = [ @builder.when(val[0], val[1], val[2], val[3]), + *val[4] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1658) + def _reduce_418(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +# reduce 419 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1664) + def _reduce_420(val, _values, result) + assoc_t, exc_var = val[2] + + if val[1] + exc_list = @builder.array(nil, val[1], nil) + end + + result = [ @builder.rescue_body(val[0], + exc_list, assoc_t, exc_var, + val[3], val[4]), + *val[5] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1677) + def _reduce_421(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1682) + def _reduce_422(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +# reduce 423 omitted + +# reduce 424 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1689) + def _reduce_425(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +# reduce 426 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1695) + def _reduce_427(val, _values, result) + result = [ val[0], val[1] ] + + result + end +.,., + +# reduce 428 omitted + +# reduce 429 omitted + +# reduce 430 omitted + +# reduce 431 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1705) + def _reduce_432(val, _values, result) + result = @builder.string_compose(nil, val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1710) + def _reduce_433(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1714) + def _reduce_434(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1719) + def _reduce_435(val, _values, result) + result = @builder.string_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1723) + def _reduce_436(val, _values, result) + result = @builder.string(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1727) + def _reduce_437(val, _values, result) + result = @builder.character(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1732) + def _reduce_438(val, _values, result) + result = @builder.xstring_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1737) + def _reduce_439(val, _values, result) + opts = @builder.regexp_options(val[3]) + result = @builder.regexp_compose(val[0], val[1], val[2], opts) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1743) + def _reduce_440(val, _values, result) + result = @builder.words_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1748) + def _reduce_441(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1752) + def _reduce_442(val, _values, result) + result = val[0] << @builder.word(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1757) + def _reduce_443(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1761) + def _reduce_444(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1766) + def _reduce_445(val, _values, result) + result = @builder.symbols_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1771) + def _reduce_446(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1775) + def _reduce_447(val, _values, result) + result = val[0] << @builder.word(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1780) + def _reduce_448(val, _values, result) + result = @builder.words_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1785) + def _reduce_449(val, _values, result) + result = @builder.symbols_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1790) + def _reduce_450(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1794) + def _reduce_451(val, _values, result) + result = val[0] << @builder.string_internal(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1799) + def _reduce_452(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1803) + def _reduce_453(val, _values, result) + result = val[0] << @builder.symbol_internal(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1808) + def _reduce_454(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1812) + def _reduce_455(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1817) + def _reduce_456(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1821) + def _reduce_457(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1826) + def _reduce_458(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1830) + def _reduce_459(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1835) + def _reduce_460(val, _values, result) + result = @builder.string_internal(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1839) + def _reduce_461(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1843) + def _reduce_462(val, _values, result) + @lexer.cond.push(false) + @lexer.cmdarg.push(false) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1848) + def _reduce_463(val, _values, result) + @lexer.cond.lexpop + @lexer.cmdarg.lexpop + + result = @builder.begin(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1856) + def _reduce_464(val, _values, result) + result = @builder.gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1860) + def _reduce_465(val, _values, result) + result = @builder.ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1864) + def _reduce_466(val, _values, result) + result = @builder.cvar(val[0]) + + result + end +.,., + +# reduce 467 omitted + +module_eval(<<'.,.,', 'ruby22.y', 1871) + def _reduce_468(val, _values, result) + result = @builder.symbol(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1876) + def _reduce_469(val, _values, result) + result = @builder.symbol_compose(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1881) + def _reduce_470(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1885) + def _reduce_471(val, _values, result) + result = @builder.negate(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1890) + def _reduce_472(val, _values, result) + result = @builder.integer(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1894) + def _reduce_473(val, _values, result) + result = @builder.float(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1898) + def _reduce_474(val, _values, result) + result = @builder.rational(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1902) + def _reduce_475(val, _values, result) + result = @builder.complex(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1907) + def _reduce_476(val, _values, result) + result = @builder.ident(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1911) + def _reduce_477(val, _values, result) + result = @builder.ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1915) + def _reduce_478(val, _values, result) + result = @builder.gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1919) + def _reduce_479(val, _values, result) + result = @builder.const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1923) + def _reduce_480(val, _values, result) + result = @builder.cvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1928) + def _reduce_481(val, _values, result) + result = @builder.nil(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1932) + def _reduce_482(val, _values, result) + result = @builder.self(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1936) + def _reduce_483(val, _values, result) + result = @builder.true(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1940) + def _reduce_484(val, _values, result) + result = @builder.false(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1944) + def _reduce_485(val, _values, result) + result = @builder.__FILE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1948) + def _reduce_486(val, _values, result) + result = @builder.__LINE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1952) + def _reduce_487(val, _values, result) + result = @builder.__ENCODING__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1957) + def _reduce_488(val, _values, result) + result = @builder.accessible(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1961) + def _reduce_489(val, _values, result) + result = @builder.accessible(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1966) + def _reduce_490(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1970) + def _reduce_491(val, _values, result) + result = @builder.assignable(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1975) + def _reduce_492(val, _values, result) + result = @builder.nth_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1979) + def _reduce_493(val, _values, result) + result = @builder.back_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1984) + def _reduce_494(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1988) + def _reduce_495(val, _values, result) + @lexer.state = :expr_value + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1992) + def _reduce_496(val, _values, result) + result = [ val[0], val[2] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 1996) + def _reduce_497(val, _values, result) + yyerrok + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2002) + def _reduce_498(val, _values, result) + result = @builder.args(val[0], val[1], val[2]) + + @lexer.state = :expr_value + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2007) + def _reduce_499(val, _values, result) + result = @lexer.in_kwarg + @lexer.in_kwarg = true + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2012) + def _reduce_500(val, _values, result) + @lexer.in_kwarg = val[0] + result = @builder.args(nil, val[1], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2018) + def _reduce_501(val, _values, result) + result = val[0].concat(val[2]).concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2022) + def _reduce_502(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2026) + def _reduce_503(val, _values, result) + result = val[0].concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2030) + def _reduce_504(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2035) + def _reduce_505(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2039) + def _reduce_506(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2044) + def _reduce_507(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2051) + def _reduce_508(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[6]). + concat(val[7]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2059) + def _reduce_509(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2065) + def _reduce_510(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2072) + def _reduce_511(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2078) + def _reduce_512(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2085) + def _reduce_513(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2090) + def _reduce_514(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2096) + def _reduce_515(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[4]). + concat(val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2103) + def _reduce_516(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2108) + def _reduce_517(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2114) + def _reduce_518(val, _values, result) + result = val[0]. + concat(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2119) + def _reduce_519(val, _values, result) + result = val[0]. + concat(val[2]). + concat(val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2125) + def _reduce_520(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2129) + def _reduce_521(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2134) + def _reduce_522(val, _values, result) + diagnostic :error, :argument_const, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2138) + def _reduce_523(val, _values, result) + diagnostic :error, :argument_ivar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2142) + def _reduce_524(val, _values, result) + diagnostic :error, :argument_gvar, nil, val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2146) + def _reduce_525(val, _values, result) + diagnostic :error, :argument_cvar, nil, val[0] + + result + end +.,., + +# reduce 526 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2152) + def _reduce_527(val, _values, result) + @static_env.declare val[0][0] + + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2159) + def _reduce_528(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2164) + def _reduce_529(val, _values, result) + result = @builder.arg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2168) + def _reduce_530(val, _values, result) + result = @builder.multi_lhs(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2173) + def _reduce_531(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2177) + def _reduce_532(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2182) + def _reduce_533(val, _values, result) + check_kwarg_name(val[0]) + + @static_env.declare val[0][0] + + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2191) + def _reduce_534(val, _values, result) + result = @builder.kwoptarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2195) + def _reduce_535(val, _values, result) + result = @builder.kwarg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2200) + def _reduce_536(val, _values, result) + result = @builder.kwoptarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2204) + def _reduce_537(val, _values, result) + result = @builder.kwarg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2209) + def _reduce_538(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2213) + def _reduce_539(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2218) + def _reduce_540(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2222) + def _reduce_541(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 542 omitted + +# reduce 543 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2229) + def _reduce_544(val, _values, result) + @static_env.declare val[1][0] + + result = [ @builder.kwrestarg(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2235) + def _reduce_545(val, _values, result) + result = [ @builder.kwrestarg(val[0]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2240) + def _reduce_546(val, _values, result) + result = @builder.optarg(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2245) + def _reduce_547(val, _values, result) + result = @builder.optarg(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2250) + def _reduce_548(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2254) + def _reduce_549(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2259) + def _reduce_550(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2263) + def _reduce_551(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 552 omitted + +# reduce 553 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2270) + def _reduce_554(val, _values, result) + @static_env.declare val[1][0] + + result = [ @builder.restarg(val[0], val[1]) ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2276) + def _reduce_555(val, _values, result) + result = [ @builder.restarg(val[0]) ] + + result + end +.,., + +# reduce 556 omitted + +# reduce 557 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2283) + def _reduce_558(val, _values, result) + @static_env.declare val[1][0] + + result = @builder.blockarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2290) + def _reduce_559(val, _values, result) + result = [ val[1] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2294) + def _reduce_560(val, _values, result) + result = [] + + result + end +.,., + +# reduce 561 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2300) + def _reduce_562(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2305) + def _reduce_563(val, _values, result) + result = [] + + result + end +.,., + +# reduce 564 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2311) + def _reduce_565(val, _values, result) + result = [ val[0] ] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2315) + def _reduce_566(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2320) + def _reduce_567(val, _values, result) + result = @builder.pair(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2324) + def _reduce_568(val, _values, result) + result = @builder.pair_keyword(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2328) + def _reduce_569(val, _values, result) + result = @builder.pair_quoted(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2332) + def _reduce_570(val, _values, result) + result = @builder.kwsplat(val[0], val[1]) + + result + end +.,., + +# reduce 571 omitted + +# reduce 572 omitted + +# reduce 573 omitted + +# reduce 574 omitted + +# reduce 575 omitted + +# reduce 576 omitted + +# reduce 577 omitted + +# reduce 578 omitted + +# reduce 579 omitted + +# reduce 580 omitted + +# reduce 581 omitted + +# reduce 582 omitted + +# reduce 583 omitted + +# reduce 584 omitted + +# reduce 585 omitted + +# reduce 586 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2343) + def _reduce_587(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'ruby22.y', 2347) + def _reduce_588(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 589 omitted + +# reduce 590 omitted + +# reduce 591 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2353) + def _reduce_592(val, _values, result) + yyerrok + + result + end +.,., + +# reduce 593 omitted + +# reduce 594 omitted + +# reduce 595 omitted + +module_eval(<<'.,.,', 'ruby22.y', 2362) + def _reduce_596(val, _values, result) + result = nil + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Ruby22 + end # module Parser diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 842a575c..a3034327 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -152,18 +152,18 @@ def test_unterm_y } end - # .y files from `parser` gem + # .y files from parser gem def test_ruby18 assert_compile 'ruby18.y' assert_debugfile 'ruby18.y', [] - assert_exec 'ruby18.y' + assert_output 'ruby18.y' end def test_ruby22 assert_compile 'ruby22.y' assert_debugfile 'ruby22.y', [] - assert_exec 'ruby22.y' + assert_output 'ruby22.y' end end end From 2a667abf98daaf8ff92713ceb677cd2dcb55e02f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 08:25:55 +0200 Subject: [PATCH 088/619] Add regression test based on parser.y from csspool gem tenderlove seems to be the original author of this code, and we don't care about asking him for permission. --- Manifest.txt | 2 + test/assets/csspool.y | 729 +++++++++++++ test/regress/csspool | 2185 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 2924 insertions(+) create mode 100644 test/assets/csspool.y create mode 100644 test/regress/csspool diff --git a/Manifest.txt b/Manifest.txt index 21574bd6..f1619ecd 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -56,6 +56,7 @@ tasks/doc.rb tasks/email.rb test/assets/chk.y test/assets/conf.y +test/assets/csspool.y test/assets/digraph.y test/assets/echk.y test/assets/err.y @@ -89,6 +90,7 @@ test/assets/yyerr.y test/bench.y test/helper.rb test/infini.y +test/regress/csspool test/regress/ruby18 test/regress/ruby22 test/scandata/brace diff --git a/test/assets/csspool.y b/test/assets/csspool.y new file mode 100644 index 00000000..3d6af25d --- /dev/null +++ b/test/assets/csspool.y @@ -0,0 +1,729 @@ +class CSSPool::CSS::Parser + +token CHARSET_SYM IMPORT_SYM STRING SEMI IDENT S COMMA LBRACE RBRACE STAR HASH +token LSQUARE RSQUARE EQUAL INCLUDES DASHMATCH LPAREN RPAREN FUNCTION GREATER PLUS +token SLASH NUMBER MINUS LENGTH PERCENTAGE ANGLE TIME FREQ URI +token IMPORTANT_SYM MEDIA_SYM NOT ONLY AND NTH_PSEUDO_CLASS +token DOCUMENT_QUERY_SYM FUNCTION_NO_QUOTE +token TILDE +token PREFIXMATCH SUFFIXMATCH SUBSTRINGMATCH +token NOT_PSEUDO_CLASS +token KEYFRAMES_SYM +token MATCHES_PSEUDO_CLASS +token NAMESPACE_SYM +token MOZ_PSEUDO_ELEMENT +token RESOLUTION +token COLON +token SUPPORTS_SYM +token OR +token VARIABLE_NAME +token CALC_SYM +token FONTFACE_SYM +token UNICODE_RANGE +token RATIO + +rule + document + : { @handler.start_document } + stylesheet + { @handler.end_document } + ; + stylesheet + : charset stylesheet + | import stylesheet + | namespace stylesheet + | charset + | import + | namespace + | body + | + ; + charset + : CHARSET_SYM STRING SEMI { @handler.charset interpret_string(val[1]), {} } + ; + import + : IMPORT_SYM import_location medium SEMI { + @handler.import_style val[2], val[1] + } + | IMPORT_SYM import_location SEMI { + @handler.import_style [], val[1] + } + ; + import_location + : import_location S + | STRING { result = Terms::String.new interpret_string val.first } + | URI { result = Terms::URI.new interpret_uri val.first } + ; + namespace + : NAMESPACE_SYM ident import_location SEMI { + @handler.namespace val[1], val[2] + } + | NAMESPACE_SYM import_location SEMI { + @handler.namespace nil, val[1] + } + ; + medium + : medium COMMA IDENT { + result = val[0] << MediaType.new(val[2]) + } + | IDENT { + result = [MediaType.new(val[0])] + } + ; + media_query_list + : media_query { result = MediaQueryList.new([ val[0] ]) } + | media_query_list COMMA media_query { result = val[0] << val[2] } + | { result = MediaQueryList.new } + ; + media_query + : optional_only_or_not media_type optional_and_exprs { result = MediaQuery.new(val[0], val[1], val[2]) } + | media_expr optional_and_exprs { result = MediaQuery.new(nil, val[0], val[1]) } + ; + optional_only_or_not + : ONLY { result = :only } + | NOT { result = :not } + | { result = nil } + ; + media_type + : IDENT { result = MediaType.new(val[0]) } + ; + media_expr + : LPAREN optional_space IDENT optional_space RPAREN { result = MediaType.new(val[2]) } + | LPAREN optional_space IDENT optional_space COLON optional_space expr RPAREN { result = MediaFeature.new(val[2], val[6][0]) } + ; + optional_space + : S { result = val[0] } + | { result = nil } + ; + optional_and_exprs + : optional_and_exprs AND media_expr { result = val[0] << val[2] } + | { result = [] } + ; + resolution + : RESOLUTION { + unit = val.first.gsub(/[\s\d.]/, '') + number = numeric(val.first) + result = Terms::Resolution.new(number, unit) + } + ; + body + : ruleset body + | conditional_rule body + | keyframes_rule body + | fontface_rule body + | ruleset + | conditional_rule + | keyframes_rule + | fontface_rule + ; + conditional_rule + : media + | document_query + | supports + ; + body_in_media + : body + | empty_ruleset + ; + media + : start_media body_in_media RBRACE { @handler.end_media val.first } + ; + start_media + : MEDIA_SYM media_query_list LBRACE { + result = val[1] + @handler.start_media result + } + ; + document_query + : start_document_query body RBRACE { @handler.end_document_query(before_pos(val), after_pos(val)) } + | start_document_query RBRACE { @handler.end_document_query(before_pos(val), after_pos(val)) } + ; + start_document_query + : start_document_query_pos url_match_fns LBRACE { + @handler.start_document_query(val[1], after_pos(val)) + } + ; + start_document_query_pos + : DOCUMENT_QUERY_SYM { + @handler.node_start_pos = before_pos(val) + } + ; + url_match_fns + : url_match_fn COMMA url_match_fns { + result = [val[0], val[2]].flatten + } + | url_match_fn { + result = val + } + ; + url_match_fn + : function_no_quote + | function + | uri + ; + supports + : start_supports body RBRACE { @handler.end_supports } + | start_supports RBRACE { @handler.end_supports } + ; + start_supports + : SUPPORTS_SYM supports_condition_root LBRACE { + @handler.start_supports val[1] + } + ; + supports_condition_root + : supports_negation { result = val.join('') } + | supports_conjunction_or_disjunction { result = val.join('') } + | supports_condition_in_parens { result = val.join('') } + ; + supports_condition + : supports_negation { result = val.join('') } + | supports_conjunction_or_disjunction { result = val.join('') } + | supports_condition_in_parens { result = val.join('') } + ; + supports_condition_in_parens + : LPAREN supports_condition RPAREN { result = val.join('') } + | supports_declaration_condition { result = val.join('') } + ; + supports_negation + : NOT supports_condition_in_parens { result = val.join('') } + ; + supports_conjunction_or_disjunction + : supports_conjunction + | supports_disjunction + ; + supports_conjunction + : supports_condition_in_parens AND supports_condition_in_parens { result = val.join('') } + | supports_conjunction_or_disjunction AND supports_condition_in_parens { result = val.join('') } + ; + supports_disjunction + : supports_condition_in_parens OR supports_condition_in_parens { result = val.join('') } + | supports_conjunction_or_disjunction OR supports_condition_in_parens { result = val.join('') } + ; + supports_declaration_condition + : LPAREN declaration_internal RPAREN { result = val.join('') } + | LPAREN S declaration_internal RPAREN { result = val.join('') } + ; + keyframes_rule + : start_keyframes_rule keyframes_blocks RBRACE + | start_keyframes_rule RBRACE + ; + start_keyframes_rule + : KEYFRAMES_SYM IDENT LBRACE { + @handler.start_keyframes_rule val[1] + } + ; + keyframes_blocks + : keyframes_block keyframes_blocks + | keyframes_block + ; + keyframes_block + : start_keyframes_block declarations RBRACE { @handler.end_keyframes_block } + | start_keyframes_block RBRACE { @handler.end_keyframes_block } + ; + start_keyframes_block + : keyframes_selectors LBRACE { + @handler.start_keyframes_block val[0] + } + ; + keyframes_selectors + | keyframes_selector COMMA keyframes_selectors { + result = val[0] + ', ' + val[2] + } + | keyframes_selector + ; + keyframes_selector + : IDENT + | PERCENTAGE { result = val[0].strip } + ; + fontface_rule + : start_fontface_rule declarations RBRACE { @handler.end_fontface_rule } + | start_fontface_rule RBRACE { @handler.end_fontface_rule } + ; + start_fontface_rule + : FONTFACE_SYM LBRACE { + @handler.start_fontface_rule + } + ; + ruleset + : start_selector declarations RBRACE { + @handler.end_selector val.first + } + | start_selector RBRACE { + @handler.end_selector val.first + } + ; + empty_ruleset + : optional_space { + start = @handler.start_selector([]) + @handler.end_selector(start) + } + ; + start_selector + : S start_selector { result = val.last } + | selectors LBRACE { + @handler.start_selector val.first + } + ; + selectors + : selector COMMA selectors + { + sel = Selector.new(val.first, {}) + result = [sel].concat(val[2]) + } + | selector + { + result = [Selector.new(val.first, {})] + } + ; + selector + : simple_selector combinator selector + { + val.flatten! + val[2].combinator = val.delete_at 1 + result = val + } + | simple_selector + ; + combinator + : S { result = :s } + | GREATER { result = :> } + | PLUS { result = :+ } + | TILDE { result = :~ } + ; + simple_selector + : element_name hcap { + selector = val.first + selector.additional_selectors = val.last + result = [selector] + } + | element_name { result = val } + | hcap + { + ss = Selectors::Simple.new nil, nil + ss.additional_selectors = val.flatten + result = [ss] + } + ; + simple_selectors + : simple_selector COMMA simple_selectors { result = [val[0], val[2]].flatten } + | simple_selector + ; + ident_with_namespace + : IDENT { result = [interpret_identifier(val[0]), nil] } + | IDENT '|' IDENT { result = [interpret_identifier(val[2]), interpret_identifier(val[0])] } + | '|' IDENT { result = [interpret_identifier(val[1]), nil] } + | STAR '|' IDENT { result = [interpret_identifier(val[2]), '*'] } + ; + element_name + : ident_with_namespace { result = Selectors::Type.new val.first[0], nil, val.first[1] } + | STAR { result = Selectors::Universal.new val.first } + | '|' STAR { result = Selectors::Universal.new val[1] } + | STAR '|' STAR { result = Selectors::Universal.new val[2], nil, val[0] } + | IDENT '|' STAR { result = Selectors::Universal.new val[2], nil, interpret_identifier(val[0]) } + ; + hcap + : hash { result = val } + | class { result = val } + | attrib { result = val } + | pseudo { result = val } + | hash hcap { result = val.flatten } + | class hcap { result = val.flatten } + | attrib hcap { result = val.flatten } + | pseudo hcap { result = val.flatten } + ; + hash + : HASH { + result = Selectors::Id.new interpret_identifier val.first.sub(/^#/, '') + } + class + : '.' IDENT { + result = Selectors::Class.new interpret_identifier val.last + } + ; + attrib + : LSQUARE ident_with_namespace EQUAL IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::EQUALS, + val[1][1] + ) + } + | LSQUARE ident_with_namespace EQUAL STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::EQUALS, + val[1][1] + ) + } + | LSQUARE ident_with_namespace INCLUDES STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::INCLUDES, + val[1][1] + ) + } + | LSQUARE ident_with_namespace INCLUDES IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::INCLUDES, + val[1][1] + ) + } + | LSQUARE ident_with_namespace DASHMATCH IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::DASHMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace DASHMATCH STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::DASHMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace PREFIXMATCH IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::PREFIXMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace PREFIXMATCH STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::PREFIXMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace SUFFIXMATCH IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::SUFFIXMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace SUFFIXMATCH STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::SUFFIXMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace SUBSTRINGMATCH IDENT RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::SUBSTRINGMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace SUBSTRINGMATCH STRING RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::SUBSTRINGMATCH, + val[1][1] + ) + } + | LSQUARE ident_with_namespace RSQUARE { + result = Selectors::Attribute.new( + val[1][0], + nil, + Selectors::Attribute::SET, + val[1][1] + ) + } + ; + pseudo + : COLON IDENT { + result = Selectors::pseudo interpret_identifier(val[1]) + } + | COLON COLON IDENT { + result = Selectors::PseudoElement.new( + interpret_identifier(val[2]) + ) + } + | COLON FUNCTION RPAREN { + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\($/, '')), + '' + ) + } + | COLON FUNCTION IDENT RPAREN { + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\($/, '')), + interpret_identifier(val[2]) + ) + } + | COLON NOT_PSEUDO_CLASS simple_selector RPAREN { + result = Selectors::PseudoClass.new( + 'not', + val[2].first.to_s + ) + } + | COLON NTH_PSEUDO_CLASS { + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\(.*/, '')), + interpret_identifier(val[1].sub(/.*\(/, '').sub(/\).*/, '')) + ) + } + | COLON MATCHES_PSEUDO_CLASS simple_selectors RPAREN { + result = Selectors::PseudoClass.new( + val[1].split('(').first.strip, + val[2].join(', ') + ) + } + | COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN { + result = Selectors::PseudoElement.new( + interpret_identifier(val[1].sub(/\($/, '')) + ) + } + | COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN { + result = Selectors::PseudoElement.new( + interpret_identifier(val[2].sub(/\($/, '')) + ) + } + ; + any_number_of_idents + : + | multiple_idents + ; + multiple_idents + : IDENT + | IDENT COMMA multiple_idents + ; + # declarations can be separated by one *or more* semicolons. semi-colons at the start or end of a ruleset are also allowed + one_or_more_semis + : SEMI + | SEMI one_or_more_semis + ; + declarations + : declaration one_or_more_semis declarations + | one_or_more_semis declarations + | declaration one_or_more_semis + | declaration + | one_or_more_semis + ; + declaration + : declaration_internal { @handler.property val.first } + ; + declaration_internal + : property COLON expr prio + { result = Declaration.new(val.first, val[2], val[3]) } + | property COLON S expr prio + { result = Declaration.new(val.first, val[3], val[4]) } + | property S COLON expr prio + { result = Declaration.new(val.first, val[3], val[4]) } + | property S COLON S expr prio + { result = Declaration.new(val.first, val[4], val[5]) } + ; + prio + : IMPORTANT_SYM { result = true } + | { result = false } + ; + property + : IDENT { result = interpret_identifier val[0] } + | STAR IDENT { result = interpret_identifier val.join } + | VARIABLE_NAME { result = interpret_identifier val[0] } + ; + operator + : COMMA + | SLASH + | EQUAL + ; + expr + : term operator expr { + result = [val.first, val.last].flatten + val.last.first.operator = val[1] + } + | term expr { result = val.flatten } + | term { result = val } + ; + term + : ident + | ratio + | numeric + | string + | uri + | hexcolor + | calc + | function + | resolution + | VARIABLE_NAME + | uranges + ; + function + : function S { result = val.first } + | FUNCTION expr RPAREN { + name = interpret_identifier val.first.sub(/\($/, '') + if name == 'rgb' + result = Terms::Rgb.new(*val[1]) + else + result = Terms::Function.new name, val[1] + end + } + | FUNCTION RPAREN { + name = interpret_identifier val.first.sub(/\($/, '') + result = Terms::Function.new name + } + ; + function_no_quote + : function_no_quote S { result = val.first } + | FUNCTION_NO_QUOTE { + parts = val.first.split('(') + name = interpret_identifier parts.first + result = Terms::Function.new(name, [Terms::String.new(interpret_string_no_quote(parts.last))]) + } + ; + uranges + : UNICODE_RANGE COMMA uranges + | UNICODE_RANGE + ; + calc + : CALC_SYM calc_sum RPAREN optional_space { + result = Terms::Math.new(val.first.split('(').first, val[1]) + } + ; + # plus and minus are supposed to have whitespace around them, per http://dev.w3.org/csswg/css-values/#calc-syntax, but the numbers are eating trailing whitespace, so we inject it back in + calc_sum + : calc_product + | calc_product PLUS calc_sum { val.insert(1, ' '); result = val.join('') } + | calc_product MINUS calc_sum { val.insert(1, ' '); result = val.join('') } + ; + calc_product + : calc_value + | calc_value optional_space STAR calc_value { result = val.join('') } + | calc_value optional_space SLASH calc_value { result = val.join('') } + ; + calc_value + : numeric { result = val.join('') } + | function { result = val.join('') } # for var() variable references + | LPAREN calc_sum RPAREN { result = val.join('') } + ; + hexcolor + : hexcolor S { result = val.first } + | HASH { result = Terms::Hash.new val.first.sub(/^#/, '') } + ; + uri + : uri S { result = val.first } + | URI { result = Terms::URI.new interpret_uri val.first } + ; + string + : string S { result = val.first } + | STRING { result = Terms::String.new interpret_string val.first } + ; + numeric + : unary_operator numeric { + result = val[1] + val[1].unary_operator = val.first + } + | NUMBER { + result = Terms::Number.new numeric val.first + } + | PERCENTAGE { + result = Terms::Number.new numeric(val.first), nil, '%' + } + | LENGTH { + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + } + | ANGLE { + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + } + | TIME { + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + } + | FREQ { + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + } + ; + ratio + : RATIO { + result = Terms::Ratio.new(val[0], val[1]) + } + ; + unary_operator + : MINUS { result = :minus } + | PLUS { result = :plus } + ; + ident + : ident S { result = val.first } + | IDENT { result = Terms::Ident.new interpret_identifier val.first } + ; + +---- inner + +def numeric thing + thing = thing.gsub(/[^\d.]/, '') + Integer(thing) rescue Float(thing) +end + +def interpret_identifier s + interpret_escapes s +end + +def interpret_uri s + interpret_escapes s.match(/^url\((.*)\)$/mui)[1].strip.match(/^(['"]?)((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_string_no_quote s + interpret_escapes s.match(/^(.*)\)$/mu)[1].strip.match(/^(['"]?)((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_string s + interpret_escapes s.match(/^(['"])((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_escapes s + token_exp = /\\(?:([0-9a-fA-F]{1,6}(?:\r\n|\s)?)|(.))/mu + return s.gsub(token_exp) do |escape_sequence| + if !$1.nil? + code = $1.chomp.to_i 16 + code = 0xFFFD if code > 0x10FFFF + next [code].pack('U') + end + next '' if $2 == "\n" + next $2 + end +end + +# override racc's on_error so we can have context in our error messages +def on_error(t, val, vstack) + errcontext = (@ss.pre_match[-10..-1] || @ss.pre_match) + + @ss.matched + @ss.post_match[0..9] + line_number = @ss.pre_match.lines.count + raise ParseError, sprintf("parse error on value %s (%s) " + + "on line %s around \"%s\"", + val.inspect, token_to_str(t) || '?', + line_number, errcontext) +end + +def before_pos(val) + # don't include leading whitespace + return current_pos - val.last.length + val.last[/\A\s*/].size +end + +def after_pos(val) + # don't include trailing whitespace + return current_pos - val.last[/\s*\z/].size +end + +# charpos will work with multibyte strings but is not available until ruby 2 +def current_pos + @ss.respond_to?('charpos') ? @ss.charpos : @ss.pos +end diff --git a/test/regress/csspool b/test/regress/csspool new file mode 100644 index 00000000..f0b70461 --- /dev/null +++ b/test/regress/csspool @@ -0,0 +1,2185 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "csspool.y". +# + +require 'racc/parser.rb' +module CSSPool + module CSS + class Parser < Racc::Parser + +module_eval(<<'...end csspool.y/module_eval...', 'csspool.y', 670) + +def numeric thing + thing = thing.gsub(/[^\d.]/, '') + Integer(thing) rescue Float(thing) +end + +def interpret_identifier s + interpret_escapes s +end + +def interpret_uri s + interpret_escapes s.match(/^url\((.*)\)$/mui)[1].strip.match(/^(['"]?)((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_string_no_quote s + interpret_escapes s.match(/^(.*)\)$/mu)[1].strip.match(/^(['"]?)((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_string s + interpret_escapes s.match(/^(['"])((?:\\.|.)*)\1$/mu)[2] +end + +def interpret_escapes s + token_exp = /\\(?:([0-9a-fA-F]{1,6}(?:\r\n|\s)?)|(.))/mu + return s.gsub(token_exp) do |escape_sequence| + if !$1.nil? + code = $1.chomp.to_i 16 + code = 0xFFFD if code > 0x10FFFF + next [code].pack('U') + end + next '' if $2 == "\n" + next $2 + end +end + +# override racc's on_error so we can have context in our error messages +def on_error(t, val, vstack) + errcontext = (@ss.pre_match[-10..-1] || @ss.pre_match) + + @ss.matched + @ss.post_match[0..9] + line_number = @ss.pre_match.lines.count + raise ParseError, sprintf("parse error on value %s (%s) " + + "on line %s around \"%s\"", + val.inspect, token_to_str(t) || '?', + line_number, errcontext) +end + +def before_pos(val) + # don't include leading whitespace + return current_pos - val.last.length + val.last[/\A\s*/].size +end + +def after_pos(val) + # don't include trailing whitespace + return current_pos - val.last[/\s*\z/].size +end + +# charpos will work with multibyte strings but is not available until ruby 2 +def current_pos + @ss.respond_to?('charpos') ? @ss.charpos : @ss.pos +end +...end csspool.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +9, 10, 137, 129, 37, 31, 55, 139, 130, 39, 45, 47, 45, 47, 123, +9, 10, 103, 3, 37, 31, 98, 229, 103, 39, 45, 47, 230, 124, 125, +224, 20, 113, 56, 37, 31, 23, 114, 104, 39, 45, 47, 245, 27, 104, +11, 20, 126, 48, 25, 48, 23, 242, 29, 138, 244, 38, 46, 27, 46, +11, 108, 113, 48, 25, 9, 10, 114, 29, 37, 31, 38, 46, 223, 39, +45, 47, 49, 48, 115, 9, 10, 108, 113, 37, 31, 38, 46, 114, 39, +45, 47, 55, 339, 243, 155, 20, 108, 113, 37, 31, 23, 107, 114, 39, +45, 47, 231, 27, 115, 11, 20, 232, 48, 25, 55, 23, 59, 29, 56, +344, 38, 46, 27, 340, 11, 20, 53, 48, 25, 115, 23, 345, 29, 37, +31, 38, 46, 27, 39, 45, 47, 56, 48, 25, 115, - +28, 105, 29, 37, 31, 38, 46, 116, 39, 45, 47, 250, 75, 120, 251, +20, 108, 113, 37, 31, 23, 118, 114, 39, 45, 47, 121, 27, 74, 73, +20, 313, 48, 25, 314, 23, 128, 29, 108, 113, 38, 46, 27, 215, 114, +20, 131, 48, 25, 75, 23, 136, 29, 37, 64, 38, 46, 27, 39, 45, +47, 92, 48, 25, 115, 74, 73, 29, 37, 31, 38, 46, 77, 39, 45, +47, 148, 94, 103, 156, 20, - +89, 83, 37, 31, 23, 115, 87, 39, 45, 47, 160, 27, 85, 153, 20, +151, 48, 25, 104, 23, 84, 29, 157, 158, 38, 46, 27, 163, 252, 20, +151, 48, 25, 201, 23, 164, 29, 37, 31, 38, 46, 27, 39, 45, 47, +203, 48, 25, 188, 202, 59, 29, 37, 165, 38, 46, 187, 39, 45, 47, +201, 204, 166, 184, 83, 288, 198, 287, 190, 197, 192, 191, 193, 194, 195, +85, 202, 37, 45, 47, 37, 48, 39, 45, 47, 39, 45, 47, 167, 38, +46, 168, 83, 170, 113, 210, 48, 181, 186, 114, 185, 196, 37, 85, 38, +46, 92, 39, 45, 47, 203, 84, 150, 152, 151, 289, 48, 290, 292, 163, +291, 48, 94, -33, 48, 46, 204, 169, 199, 38, 46, 37, 38, 46, 200, - +33, 39, 45, 47, 92, 188, 115, 59, 294, 258, 293, 48, 296, 187, 295, +298, 260, 297, 212, 38, 46, 83, 216, 198, 259, 190, 197, 192, 191, 193, +194, 195, 85, 45, 47, 45, 47, 45, 47, 217, 48, 218, 219, 188, 108, +59, 285, 108, 38, 46, 170, 187, 225, 226, 181, 186, 233, 185, 196, 83, +129, 198, 234, 190, 197, 192, 191, 193, 194, 195, 85, 48, 163, 48, 255, +48, 256, 155, 263, 169, 46, 188, 46, 59, 46, 264, 168, 265, 170, 187, +266, 92, 181, 186, 92, 185, 196, 83, 92, 198, 92, 190, 197, 192, 191, +193, 194, 195, 85, 198, 278, 190, 197, 192, 191, 193, 194, 195, 279, 188, +281, 59, 241, 235, 236, 237, 170, 187, 286, 229, 181, 186, 231, 185, 196, +83, 163, 198, 300, 190, 197, 192, 191, 193, 194, 195, 85, 301, 302, 238, +239, 240, 303, 306, 307, 255, 141, 188, 75, 59, 322, 163, 185, 168, 170, +187, 312, 317, 181, 186, 143, 185, 196, 83, 319, 198, 323, 190, 197, 192, +191, 193, 194, 195, 85, 324, 325, 145, 326, 327, 328, 329, 330, 331, 144, +188, 146, 59, 147, 332, 142, 333, 170, 187, 334, 306, 181, 186, 163, 185, +196, 83, 338, 198, 163, 190, 197, 192, 191, 193, 194, 195, 85, 346, 319, +319, 163, 351, 306, 163, 319, 357, 359, 188, nil, 59, nil, nil, nil, nil, +170, 187, nil, nil, 181, 186, nil, 185, 196, 83, nil, 198, nil, 190, 197, +192, 191, 193, 194, 195, 85, 272, nil, 83, nil, 198, nil, 190, 197, 192, +191, 193, 194, 195, nil, nil, nil, nil, 170, nil, nil, nil, 181, 186, nil, +185, 196, 272, nil, 83, nil, 198, nil, 190, 197, 192, 191, 193, 194, 195, +272, nil, 83, nil, 198, nil, 190, 197, 192, 191, 193, 194, 195, 272, nil, +83, nil, 198, nil, 190, 197, 192, 191, 193, 194, 195, 272, nil, 83, nil, +198, nil, 190, 197, 192, 191, 193, 194, 195, 272, nil, 83, nil, 198, nil, +190, 197, 192, 191, 193, 194, 195] + +racc_action_check = [ +2, 2, 47, 38, 2, 2, 10, 47, 38, 2, 2, 2, 35, 35, 34, +5, 5, 26, 1, 5, 5, 26, 128, 217, 5, 5, 5, 128, 34, 34, +112, 2, 210, 10, 31, 31, 2, 210, 26, 31, 31, 31, 143, 2, 217, +2, 5, 34, 2, 2, 35, 5, 142, 2, 47, 143, 2, 2, 5, 35, +5, 110, 110, 5, 5, 6, 6, 110, 5, 6, 6, 5, 5, 112, 6, +6, 6, 3, 31, 210, 7, 7, 221, 221, 7, 7, 31, 31, 221, 7, +7, 7, 58, 309, 142, 58, 6, 28, 28, 12, 12, 6, 28, 28, 12, +12, 12, 131, 6, 110, 6, 7, 131, 6, 6, 11, 7, 11, 6, 58, +315, 6, 6, 7, 309, 7, 12, 9, 7, 7, 221, 12, 315, 7, 13, +13, 7, 7, 12, 13, 13, 13, 11, 12, 12, 28, 20, 27, 12, 14, +14, 12, 12, 29, 14, 14, 14, 149, 20, 32, 149, 13, 30, 30, 15, +15, 13, 30, 30, 15, 15, 15, 33, 13, 20, 20, 14, 269, 13, 13, +269, 14, 37, 13, 100, 100, 13, 13, 14, 100, 100, 15, 39, 14, 14, +157, 15, 46, 14, 19, 19, 14, 14, 15, 19, 19, 19, 25, 15, 15, +30, 157, 157, 15, 21, 21, 15, 15, 21, 21, 21, 21, 53, 25, 99, +67, 19, 99, 22, 24, 24, 19, 100, 24, 24, 24, 24, 71, 19, 22, +57, 21, 57, 19, 19, 99, 21, 22, 19, 70, 70, 19, 19, 21, 75, +154, 24, 154, 21, 21, 90, 24, 76, 21, 64, 64, 21, 21, 24, 64, +64, 64, 91, 24, 24, 83, 90, 83, 24, 121, 78, 24, 24, 83, 121, +121, 121, 206, 91, 79, 83, 83, 235, 83, 235, 83, 83, 83, 83, 83, +83, 83, 83, 206, 122, 41, 41, 144, 64, 122, 122, 122, 144, 144, 144, +80, 64, 64, 81, 166, 83, 92, 92, 121, 83, 83, 92, 83, 83, 146, +166, 121, 121, 92, 146, 146, 146, 207, 166, 54, 54, 54, 236, 41, 236, +237, 270, 237, 122, 92, 270, 144, 41, 207, 82, 86, 122, 122, 302, 144, +144, 88, 270, 302, 302, 302, 94, 171, 92, 171, 238, 171, 238, 146, 239, +171, 239, 240, 171, 240, 97, 146, 146, 171, 101, 171, 171, 171, 171, 171, +171, 171, 171, 171, 171, 42, 42, 43, 43, 44, 44, 102, 302, 105, 106, +223, 108, 223, 223, 109, 302, 302, 171, 223, 114, 117, 171, 171, 137, 171, +171, 223, 138, 223, 139, 223, 223, 223, 223, 223, 223, 223, 223, 42, 147, +43, 161, 44, 162, 172, 175, 176, 42, 261, 43, 261, 44, 177, 179, 183, +223, 261, 185, 201, 223, 223, 202, 223, 223, 261, 203, 261, 204, 261, 261, +261, 261, 261, 261, 261, 261, 189, 208, 189, 189, 189, 189, 189, 189, 189, +209, 285, 214, 285, 140, 140, 140, 140, 261, 285, 224, 233, 261, 261, 234, +261, 261, 285, 243, 285, 245, 285, 285, 285, 285, 285, 285, 285, 285, 246, +247, 140, 140, 140, 248, 249, 251, 254, 48, 286, 255, 286, 286, 256, 266, +267, 285, 286, 268, 280, 285, 285, 48, 285, 285, 286, 284, 286, 287, 286, +286, 286, 286, 286, 286, 286, 286, 288, 289, 48, 290, 291, 292, 293, 294, +295, 48, 322, 48, 322, 48, 296, 48, 297, 286, 322, 298, 299, 286, 286, +304, 286, 286, 322, 306, 322, 312, 322, 322, 322, 322, 322, 322, 322, 322, +316, 320, 321, 335, 337, 338, 340, 349, 350, 358, 353, nil, 353, nil, nil, +nil, nil, 322, 353, nil, nil, 322, 322, nil, 322, 322, 353, nil, 353, nil, +353, 353, 353, 353, 353, 353, 353, 353, 186, nil, 186, nil, 186, nil, 186, +186, 186, 186, 186, 186, 186, nil, nil, nil, nil, 353, nil, nil, nil, 353, +353, nil, 353, 353, 272, nil, 272, nil, 272, nil, 272, 272, 272, 272, 272, +272, 272, 313, nil, 313, nil, 313, nil, 313, 313, 313, 313, 313, 313, 313, +314, nil, 314, nil, 314, nil, 314, 314, 314, 314, 314, 314, 314, 344, nil, +344, nil, 344, nil, 344, 344, 344, 344, 344, 344, 344, 345, nil, 345, nil, +345, nil, 345, 345, 345, 345, 345, 345, 345] + +racc_action_pointer = [nil, 18, - +2, 77, nil, 13, 63, 78, nil, 123, 2, 111, 93, 128, 143, 158, nil, +nil, nil, 193, 140, 208, 208, nil, 223, 189, 11, 141, 92, 144, 157, 28, +150, 164, 7, 0, nil, 124, -3, 134, nil, 293, 383, 385, 387, nil, 191, - +4, 512, nil, nil, nil, nil, 217, 334, nil, nil, 235, 88, nil, nil, nil, +nil, nil, 258, nil, nil, 215, nil, nil, 241, 231, nil, nil, nil, 247, 252, +nil, 271, 281, 308, 311, 347, 271, nil, nil, 345, nil, 352, nil, 224, 236, +315, nil, 348, nil, nil, 370, nil, 218, 179, 375, 393, nil, nil, 394, 394, +nil, 401, 404, 56, nil, 23, nil, 408, nil, nil, 405, nil, nil, nil, 273, +298, nil, nil, nil, nil, nil, 16, nil, nil, 101, nil, nil, nil, nil, nil, +360, 416, 366, 470, nil, 46, 36, 301, nil, 323, 427, nil, 152, nil, nil, +nil, nil, 250, nil, nil, 177, nil, nil, nil, 400, 432, nil, nil, nil, 299, +nil, nil, nil, nil, 363, 432, nil, nil, 433, 434, 440, nil, 441, nil, nil, +nil, 430, nil, 444, 605, nil, nil, 449, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 435, 438, 442, 444, nil, 251, 301, 453, 461, 26, nil, +nil, nil, 472, nil, nil, 17, nil, nil, nil, 77, nil, 401, 440, nil, nil, +nil, nil, nil, nil, nil, nil, 485, 488, 288, 338, 341, 366, 370, 373, nil, +nil, 491, nil, 481, 490, 502, 495, 509, nil, 510, nil, nil, 481, 502, 516, +nil, nil, nil, nil, 439, nil, nil, nil, nil, 468, 518, 509, 155, 339, nil, +631, nil, nil, nil, nil, nil, nil, nil, 510, nil, nil, nil, 504, 477, 515, +524, 533, 534, 536, 537, 538, 539, 540, 541, 547, 549, 552, 561, nil, nil, +352, nil, 563, nil, 566, nil, nil, 74, nil, nil, 569, 644, 657, 109, 566, +nil, nil, nil, 554, 555, 553, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 581, nil, 570, 584, nil, 584, nil, nil, nil, 670, 683, nil, +nil, nil, 560, 574, nil, nil, 591, nil, nil, nil, nil, 575, nil] + +racc_action_default = [-1, -229, -10, -229, -2, -6, -7, -8, -9, -229, -229, -229, -41, -42, -43, -44, -45, -46, -47, -33, -23, -229, -229, -55, -229, -229, -89, -229, -229, -229, -229, -229, -229, -103, -105, -111, -112, -115, -229, -120, -119, -124, -125, -126, -127, -132, -229, -229, -229, 360, -3, -4, -5, -229, -229, -15, -16, -229, -229, -228, -37, -38, -39, -40, -32, -48, -49, -229, -99, -21, -229, -229, -35, -26, -27, -33, -229, -53, -229, -57, -58, -59, -60, -229, -198, -214, -229, -62, -229, -64, -65, -66, -229, -71, -229, -73, -74, -229, -82, -85, -229, -229, -91, -92, -93, -229, -229, -95, -160, -165, -166, -167, -229, -174, -229, -176, -96, -229, -98, -100, -101, -229, -229, -106, -107, -108, -109, -110, -229, -117, -121, -229, -128, -129, -130, -131, -133, -115, -229, -229, -229, -147, -229, -229, -229, -152, -229, -33, -11, -229, -13, -14, -20, -18, -229, -227, -50, -28, -51, -35, -29, -25, -229, -32, -52, -54, -229, -197, -194, -213, -36, -182, -183, -184, -185, -186, -187, -188, -189, -190, -191, -192, -193, -229, -196, -200, -229, -212, -216, -229, -218, -219, -220, -221, -222, -223, -224, -225, -226, -61, -63, -229, -229, -229, -229, -67, -68, -69, -229, -229, -229, -72, -81, -84, -229, -87, -88, -89, -83, -94, -161, -164, -163, -229, -229, -175, -97, -102, -104, -116, -123, -118, -122, -229, -229, -229, -229, -229, -229, -229, -229, -146, -148, -33, -149, -229, -229, -114, -229, -156, -12, -229, -17, -22, -24, -229, -33, -56, -177, -178, -179, -229, -181, -215, -211, -195, -229, -209, -229, -202, -205, -208, -229, -217, -76, -78, -75, -77, -70, -79, -229, -86, -90, -162, -173, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -229, -156, -150, -151, -229, -153, -33, -157, -158, -19, -34, -229, -180, -199, -33, -229, -229, -229, -229, -80, -168, -172, -173, -173, -229, -134, -135, -136, -137, -138, -139, -140, -141, -142, -143, -144, -145, -33, -113, -229, -229, -30, -33, -201, -203, -204, -229, -229, -210, -169, -170, -173, -229, -154, -159, -229, -206, -207, -171, -155, -229, -31] + +racc_goto_table = [ +81, 248, 183, 68, 106, 91, 117, 271, 78, 246, 273, 247, 82, 69, 209, +161, 97, 89, 268, 304, 90, 119, 54, 57, 220, 221, 318, 60, 61, 62, +63, 354, 355, 1, 65, 127, 76, 2, 149, 86, 58, 132, 133, 134, 135, +4, 70, 159, 50, 51, 52, 308, 67, 66, 119, 88, 208, 282, 227, 162, +228, 122, 347, 348, 140, 352, 261, 311, nil, 335, 154, nil, 207, nil, 211, +nil, 214, nil, nil, nil, nil, nil, nil, nil, 205, nil, 222, 206, nil, 213, +262, 356, nil, 271, nil, nil, nil, nil, nil, nil, nil, nil, 254, nil, 316, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 249, 280, nil, 271, +271, nil, nil, nil, nil, nil, nil, 284, nil, 81, 342, 343, nil, nil, nil, +253, nil, 257, nil, nil, nil, 82, 336, nil, nil, nil, nil, nil, nil, 267, +271, 271, 247, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +310, 274, 275, 276, 277, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 283, nil, nil, nil, nil, nil, nil, 320, 321, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 299, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +309, 349, nil, nil, nil, nil, nil, nil, nil, nil, 267, nil, nil, nil, 315, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 358, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 337, nil, nil, 267, 267, nil, nil, nil, 341, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 350, nil, nil, 267, 267, 353] + +racc_goto_check = [ +35, 62, 18, 17, 51, 41, 51, 77, 32, 58, 77, 58, 36, 12, 46, +15, 48, 39, 82, 68, 40, 55, 8, 8, 70, 70, 73, 7, 7, 7, +7, 84, 84, 1, 7, 61, 7, 3, 9, 7, 10, 61, 61, 61, 61, +2, 11, 14, 2, 2, 2, 16, 27, 28, 55, 38, 42, 52, 56, 17, +57, 59, 73, 73, 63, 69, 74, 81, nil, 68, 8, nil, 41, nil, 41, +nil, 51, nil, nil, nil, nil, nil, nil, nil, 39, nil, 51, 40, nil, 48, +18, 73, nil, 77, nil, nil, nil, nil, nil, nil, nil, nil, 15, nil, 82, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 17, 46, nil, 77, +77, nil, nil, nil, nil, nil, nil, 18, nil, 35, 82, 82, nil, nil, nil, +12, nil, 32, nil, nil, nil, 36, 62, nil, nil, nil, nil, nil, nil, 35, +77, 77, 58, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +18, 41, 41, 41, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 51, nil, nil, nil, nil, nil, nil, 18, 18, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 17, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +17, 18, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, 17, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 18, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 17, nil, nil, 35, 35, nil, nil, nil, 17, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 17, nil, nil, 35, 35, 17] + +racc_goto_pointer = [nil, 33, 43, 37, nil, nil, nil, 15, 12, -16, 29, 26, -7, nil, -24, -57, -204, -16, -81, nil, nil, nil, nil, nil, nil, nil, nil, 33, 34, nil, nil, nil, -14, nil, nil, -22, -10, nil, 30, -8, -5, -20, -36, nil, nil, nil, -78, nil, -10, nil, nil, -24, -160, nil, nil, -10, -63, -62, -135, 27, nil, 0, -145, 17, nil, nil, nil, nil, -230, -273, -84, nil, nil, -258, -105, nil, nil, -179, nil, nil, nil, -199, -168, nil, -313, nil] + +racc_goto_default = [ +nil, nil, nil, nil, 5, 6, 7, 8, nil, nil, 172, nil, nil, 71, nil, +nil, 72, nil, nil, 180, 12, 13, 14, 15, 16, 17, 18, nil, nil, 19, +21, 22, nil, 79, 80, 179, 176, 24, nil, nil, nil, nil, nil, 93, 95, +96, 111, 26, nil, 99, 100, nil, 101, 102, 28, 30, 32, 33, 34, nil, +35, 36, nil, 40, 41, 42, 43, 44, nil, 305, 110, 109, 112, nil, nil, +171, 173, 174, 175, 177, 178, 182, nil, 269, 270, 189] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 63, :_reduce_1, + 2, 61, :_reduce_2, + 2, 62, :_reduce_none, + 2, 62, :_reduce_none, + 2, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 0, 62, :_reduce_none, + 3, 64, :_reduce_11, + 4, 65, :_reduce_12, + 3, 65, :_reduce_13, + 2, 68, :_reduce_none, + 1, 68, :_reduce_15, + 1, 68, :_reduce_16, + 4, 66, :_reduce_17, + 3, 66, :_reduce_18, + 3, 69, :_reduce_19, + 1, 69, :_reduce_20, + 1, 71, :_reduce_21, + 3, 71, :_reduce_22, + 0, 71, :_reduce_23, + 3, 72, :_reduce_24, + 2, 72, :_reduce_25, + 1, 73, :_reduce_26, + 1, 73, :_reduce_27, + 0, 73, :_reduce_28, + 1, 74, :_reduce_29, + 5, 76, :_reduce_30, + 8, 76, :_reduce_31, + 1, 77, :_reduce_32, + 0, 77, :_reduce_33, + 3, 75, :_reduce_34, + 0, 75, :_reduce_35, + 1, 79, :_reduce_36, + 2, 67, :_reduce_none, + 2, 67, :_reduce_none, + 2, 67, :_reduce_none, + 2, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 81, :_reduce_none, + 1, 81, :_reduce_none, + 1, 81, :_reduce_none, + 1, 87, :_reduce_none, + 1, 87, :_reduce_none, + 3, 84, :_reduce_50, + 3, 89, :_reduce_51, + 3, 85, :_reduce_52, + 2, 85, :_reduce_53, + 3, 90, :_reduce_54, + 1, 91, :_reduce_55, + 3, 92, :_reduce_56, + 1, 92, :_reduce_57, + 1, 93, :_reduce_none, + 1, 93, :_reduce_none, + 1, 93, :_reduce_none, + 3, 86, :_reduce_61, + 2, 86, :_reduce_62, + 3, 97, :_reduce_63, + 1, 98, :_reduce_64, + 1, 98, :_reduce_65, + 1, 98, :_reduce_66, + 1, 102, :_reduce_67, + 1, 102, :_reduce_68, + 1, 102, :_reduce_69, + 3, 101, :_reduce_70, + 1, 101, :_reduce_71, + 2, 99, :_reduce_72, + 1, 100, :_reduce_none, + 1, 100, :_reduce_none, + 3, 104, :_reduce_75, + 3, 104, :_reduce_76, + 3, 105, :_reduce_77, + 3, 105, :_reduce_78, + 3, 103, :_reduce_79, + 4, 103, :_reduce_80, + 3, 82, :_reduce_none, + 2, 82, :_reduce_none, + 3, 107, :_reduce_83, + 2, 108, :_reduce_none, + 1, 108, :_reduce_none, + 3, 109, :_reduce_86, + 2, 109, :_reduce_87, + 2, 110, :_reduce_88, + 0, 112, :_reduce_none, + 3, 112, :_reduce_90, + 1, 112, :_reduce_none, + 1, 113, :_reduce_none, + 1, 113, :_reduce_93, + 3, 83, :_reduce_94, + 2, 83, :_reduce_95, + 2, 114, :_reduce_96, + 3, 80, :_reduce_97, + 2, 80, :_reduce_98, + 1, 88, :_reduce_99, + 2, 115, :_reduce_100, + 2, 115, :_reduce_101, + 3, 116, :_reduce_102, + 1, 116, :_reduce_103, + 3, 117, :_reduce_104, + 1, 117, :_reduce_none, + 1, 119, :_reduce_106, + 1, 119, :_reduce_107, + 1, 119, :_reduce_108, + 1, 119, :_reduce_109, + 2, 118, :_reduce_110, + 1, 118, :_reduce_111, + 1, 118, :_reduce_112, + 3, 122, :_reduce_113, + 1, 122, :_reduce_none, + 1, 123, :_reduce_115, + 3, 123, :_reduce_116, + 2, 123, :_reduce_117, + 3, 123, :_reduce_118, + 1, 120, :_reduce_119, + 1, 120, :_reduce_120, + 2, 120, :_reduce_121, + 3, 120, :_reduce_122, + 3, 120, :_reduce_123, + 1, 121, :_reduce_124, + 1, 121, :_reduce_125, + 1, 121, :_reduce_126, + 1, 121, :_reduce_127, + 2, 121, :_reduce_128, + 2, 121, :_reduce_129, + 2, 121, :_reduce_130, + 2, 121, :_reduce_131, + 1, 124, :_reduce_132, + 2, 125, :_reduce_133, + 5, 126, :_reduce_134, + 5, 126, :_reduce_135, + 5, 126, :_reduce_136, + 5, 126, :_reduce_137, + 5, 126, :_reduce_138, + 5, 126, :_reduce_139, + 5, 126, :_reduce_140, + 5, 126, :_reduce_141, + 5, 126, :_reduce_142, + 5, 126, :_reduce_143, + 5, 126, :_reduce_144, + 5, 126, :_reduce_145, + 3, 126, :_reduce_146, + 2, 127, :_reduce_147, + 3, 127, :_reduce_148, + 3, 127, :_reduce_149, + 4, 127, :_reduce_150, + 4, 127, :_reduce_151, + 2, 127, :_reduce_152, + 4, 127, :_reduce_153, + 6, 127, :_reduce_154, + 7, 127, :_reduce_155, + 0, 128, :_reduce_none, + 1, 128, :_reduce_none, + 1, 129, :_reduce_none, + 3, 129, :_reduce_none, + 1, 130, :_reduce_none, + 2, 130, :_reduce_none, + 3, 111, :_reduce_none, + 2, 111, :_reduce_none, + 2, 111, :_reduce_none, + 1, 111, :_reduce_none, + 1, 111, :_reduce_none, + 1, 131, :_reduce_167, + 4, 106, :_reduce_168, + 5, 106, :_reduce_169, + 5, 106, :_reduce_170, + 6, 106, :_reduce_171, + 1, 133, :_reduce_172, + 0, 133, :_reduce_173, + 1, 132, :_reduce_174, + 2, 132, :_reduce_175, + 1, 132, :_reduce_176, + 1, 134, :_reduce_none, + 1, 134, :_reduce_none, + 1, 134, :_reduce_none, + 3, 78, :_reduce_180, + 2, 78, :_reduce_181, + 1, 78, :_reduce_182, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 1, 135, :_reduce_none, + 2, 95, :_reduce_194, + 3, 95, :_reduce_195, + 2, 95, :_reduce_196, + 2, 94, :_reduce_197, + 1, 94, :_reduce_198, + 3, 141, :_reduce_none, + 1, 141, :_reduce_none, + 4, 140, :_reduce_201, + 1, 142, :_reduce_none, + 3, 142, :_reduce_203, + 3, 142, :_reduce_204, + 1, 143, :_reduce_none, + 4, 143, :_reduce_206, + 4, 143, :_reduce_207, + 1, 144, :_reduce_208, + 1, 144, :_reduce_209, + 3, 144, :_reduce_210, + 2, 139, :_reduce_211, + 1, 139, :_reduce_212, + 2, 96, :_reduce_213, + 1, 96, :_reduce_214, + 2, 138, :_reduce_215, + 1, 138, :_reduce_216, + 2, 137, :_reduce_217, + 1, 137, :_reduce_218, + 1, 137, :_reduce_219, + 1, 137, :_reduce_220, + 1, 137, :_reduce_221, + 1, 137, :_reduce_222, + 1, 137, :_reduce_223, + 1, 136, :_reduce_224, + 1, 145, :_reduce_225, + 1, 145, :_reduce_226, + 2, 70, :_reduce_227, + 1, 70, :_reduce_228 ] + +racc_reduce_n = 229 + +racc_shift_n = 360 + +racc_token_table = { + false => 0, + :error => 1, + :CHARSET_SYM => 2, + :IMPORT_SYM => 3, + :STRING => 4, + :SEMI => 5, + :IDENT => 6, + :S => 7, + :COMMA => 8, + :LBRACE => 9, + :RBRACE => 10, + :STAR => 11, + :HASH => 12, + :LSQUARE => 13, + :RSQUARE => 14, + :EQUAL => 15, + :INCLUDES => 16, + :DASHMATCH => 17, + :LPAREN => 18, + :RPAREN => 19, + :FUNCTION => 20, + :GREATER => 21, + :PLUS => 22, + :SLASH => 23, + :NUMBER => 24, + :MINUS => 25, + :LENGTH => 26, + :PERCENTAGE => 27, + :ANGLE => 28, + :TIME => 29, + :FREQ => 30, + :URI => 31, + :IMPORTANT_SYM => 32, + :MEDIA_SYM => 33, + :NOT => 34, + :ONLY => 35, + :AND => 36, + :NTH_PSEUDO_CLASS => 37, + :DOCUMENT_QUERY_SYM => 38, + :FUNCTION_NO_QUOTE => 39, + :TILDE => 40, + :PREFIXMATCH => 41, + :SUFFIXMATCH => 42, + :SUBSTRINGMATCH => 43, + :NOT_PSEUDO_CLASS => 44, + :KEYFRAMES_SYM => 45, + :MATCHES_PSEUDO_CLASS => 46, + :NAMESPACE_SYM => 47, + :MOZ_PSEUDO_ELEMENT => 48, + :RESOLUTION => 49, + :COLON => 50, + :SUPPORTS_SYM => 51, + :OR => 52, + :VARIABLE_NAME => 53, + :CALC_SYM => 54, + :FONTFACE_SYM => 55, + :UNICODE_RANGE => 56, + :RATIO => 57, + "|" => 58, + "." => 59 } + +racc_nt_base = 60 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "CHARSET_SYM", + "IMPORT_SYM", + "STRING", + "SEMI", + "IDENT", + "S", + "COMMA", + "LBRACE", + "RBRACE", + "STAR", + "HASH", + "LSQUARE", + "RSQUARE", + "EQUAL", + "INCLUDES", + "DASHMATCH", + "LPAREN", + "RPAREN", + "FUNCTION", + "GREATER", + "PLUS", + "SLASH", + "NUMBER", + "MINUS", + "LENGTH", + "PERCENTAGE", + "ANGLE", + "TIME", + "FREQ", + "URI", + "IMPORTANT_SYM", + "MEDIA_SYM", + "NOT", + "ONLY", + "AND", + "NTH_PSEUDO_CLASS", + "DOCUMENT_QUERY_SYM", + "FUNCTION_NO_QUOTE", + "TILDE", + "PREFIXMATCH", + "SUFFIXMATCH", + "SUBSTRINGMATCH", + "NOT_PSEUDO_CLASS", + "KEYFRAMES_SYM", + "MATCHES_PSEUDO_CLASS", + "NAMESPACE_SYM", + "MOZ_PSEUDO_ELEMENT", + "RESOLUTION", + "COLON", + "SUPPORTS_SYM", + "OR", + "VARIABLE_NAME", + "CALC_SYM", + "FONTFACE_SYM", + "UNICODE_RANGE", + "RATIO", + "\"|\"", + "\".\"", + "$start", + "document", + "stylesheet", + "@1", + "charset", + "import", + "namespace", + "body", + "import_location", + "medium", + "ident", + "media_query_list", + "media_query", + "optional_only_or_not", + "media_type", + "optional_and_exprs", + "media_expr", + "optional_space", + "expr", + "resolution", + "ruleset", + "conditional_rule", + "keyframes_rule", + "fontface_rule", + "media", + "document_query", + "supports", + "body_in_media", + "empty_ruleset", + "start_media", + "start_document_query", + "start_document_query_pos", + "url_match_fns", + "url_match_fn", + "function_no_quote", + "function", + "uri", + "start_supports", + "supports_condition_root", + "supports_negation", + "supports_conjunction_or_disjunction", + "supports_condition_in_parens", + "supports_condition", + "supports_declaration_condition", + "supports_conjunction", + "supports_disjunction", + "declaration_internal", + "start_keyframes_rule", + "keyframes_blocks", + "keyframes_block", + "start_keyframes_block", + "declarations", + "keyframes_selectors", + "keyframes_selector", + "start_fontface_rule", + "start_selector", + "selectors", + "selector", + "simple_selector", + "combinator", + "element_name", + "hcap", + "simple_selectors", + "ident_with_namespace", + "hash", + "class", + "attrib", + "pseudo", + "any_number_of_idents", + "multiple_idents", + "one_or_more_semis", + "declaration", + "property", + "prio", + "operator", + "term", + "ratio", + "numeric", + "string", + "hexcolor", + "calc", + "uranges", + "calc_sum", + "calc_product", + "calc_value", + "unary_operator" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'csspool.y', 26) + def _reduce_1(val, _values, result) + @handler.start_document + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 28) + def _reduce_2(val, _values, result) + @handler.end_document + result + end +.,., + +# reduce 3 omitted + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +# reduce 7 omitted + +# reduce 8 omitted + +# reduce 9 omitted + +# reduce 10 omitted + +module_eval(<<'.,.,', 'csspool.y', 41) + def _reduce_11(val, _values, result) + @handler.charset interpret_string(val[1]), {} + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 45) + def _reduce_12(val, _values, result) + @handler.import_style val[2], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 48) + def _reduce_13(val, _values, result) + @handler.import_style [], val[1] + + result + end +.,., + +# reduce 14 omitted + +module_eval(<<'.,.,', 'csspool.y', 53) + def _reduce_15(val, _values, result) + result = Terms::String.new interpret_string val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 54) + def _reduce_16(val, _values, result) + result = Terms::URI.new interpret_uri val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 58) + def _reduce_17(val, _values, result) + @handler.namespace val[1], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 61) + def _reduce_18(val, _values, result) + @handler.namespace nil, val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 66) + def _reduce_19(val, _values, result) + result = val[0] << MediaType.new(val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 69) + def _reduce_20(val, _values, result) + result = [MediaType.new(val[0])] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 73) + def _reduce_21(val, _values, result) + result = MediaQueryList.new([ val[0] ]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 74) + def _reduce_22(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 75) + def _reduce_23(val, _values, result) + result = MediaQueryList.new + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 78) + def _reduce_24(val, _values, result) + result = MediaQuery.new(val[0], val[1], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 79) + def _reduce_25(val, _values, result) + result = MediaQuery.new(nil, val[0], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 82) + def _reduce_26(val, _values, result) + result = :only + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 83) + def _reduce_27(val, _values, result) + result = :not + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 84) + def _reduce_28(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 87) + def _reduce_29(val, _values, result) + result = MediaType.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 90) + def _reduce_30(val, _values, result) + result = MediaType.new(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 91) + def _reduce_31(val, _values, result) + result = MediaFeature.new(val[2], val[6][0]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 94) + def _reduce_32(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 95) + def _reduce_33(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 98) + def _reduce_34(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 99) + def _reduce_35(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 103) + def _reduce_36(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + number = numeric(val.first) + result = Terms::Resolution.new(number, unit) + + result + end +.,., + +# reduce 37 omitted + +# reduce 38 omitted + +# reduce 39 omitted + +# reduce 40 omitted + +# reduce 41 omitted + +# reduce 42 omitted + +# reduce 43 omitted + +# reduce 44 omitted + +# reduce 45 omitted + +# reduce 46 omitted + +# reduce 47 omitted + +# reduce 48 omitted + +# reduce 49 omitted + +module_eval(<<'.,.,', 'csspool.y', 128) + def _reduce_50(val, _values, result) + @handler.end_media val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 132) + def _reduce_51(val, _values, result) + result = val[1] + @handler.start_media result + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 137) + def _reduce_52(val, _values, result) + @handler.end_document_query(before_pos(val), after_pos(val)) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 138) + def _reduce_53(val, _values, result) + @handler.end_document_query(before_pos(val), after_pos(val)) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 142) + def _reduce_54(val, _values, result) + @handler.start_document_query(val[1], after_pos(val)) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 147) + def _reduce_55(val, _values, result) + @handler.node_start_pos = before_pos(val) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 152) + def _reduce_56(val, _values, result) + result = [val[0], val[2]].flatten + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 155) + def _reduce_57(val, _values, result) + result = val + + result + end +.,., + +# reduce 58 omitted + +# reduce 59 omitted + +# reduce 60 omitted + +module_eval(<<'.,.,', 'csspool.y', 164) + def _reduce_61(val, _values, result) + @handler.end_supports + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 165) + def _reduce_62(val, _values, result) + @handler.end_supports + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 169) + def _reduce_63(val, _values, result) + @handler.start_supports val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 173) + def _reduce_64(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 174) + def _reduce_65(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 175) + def _reduce_66(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 178) + def _reduce_67(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 179) + def _reduce_68(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 180) + def _reduce_69(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 183) + def _reduce_70(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 184) + def _reduce_71(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 187) + def _reduce_72(val, _values, result) + result = val.join('') + result + end +.,., + +# reduce 73 omitted + +# reduce 74 omitted + +module_eval(<<'.,.,', 'csspool.y', 194) + def _reduce_75(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 195) + def _reduce_76(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 198) + def _reduce_77(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 199) + def _reduce_78(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 202) + def _reduce_79(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 203) + def _reduce_80(val, _values, result) + result = val.join('') + result + end +.,., + +# reduce 81 omitted + +# reduce 82 omitted + +module_eval(<<'.,.,', 'csspool.y', 211) + def _reduce_83(val, _values, result) + @handler.start_keyframes_rule val[1] + + result + end +.,., + +# reduce 84 omitted + +# reduce 85 omitted + +module_eval(<<'.,.,', 'csspool.y', 219) + def _reduce_86(val, _values, result) + @handler.end_keyframes_block + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 220) + def _reduce_87(val, _values, result) + @handler.end_keyframes_block + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 224) + def _reduce_88(val, _values, result) + @handler.start_keyframes_block val[0] + + result + end +.,., + +# reduce 89 omitted + +module_eval(<<'.,.,', 'csspool.y', 229) + def _reduce_90(val, _values, result) + result = val[0] + ', ' + val[2] + + result + end +.,., + +# reduce 91 omitted + +# reduce 92 omitted + +module_eval(<<'.,.,', 'csspool.y', 235) + def _reduce_93(val, _values, result) + result = val[0].strip + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 238) + def _reduce_94(val, _values, result) + @handler.end_fontface_rule + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 239) + def _reduce_95(val, _values, result) + @handler.end_fontface_rule + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 243) + def _reduce_96(val, _values, result) + @handler.start_fontface_rule + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 248) + def _reduce_97(val, _values, result) + @handler.end_selector val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 251) + def _reduce_98(val, _values, result) + @handler.end_selector val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 256) + def _reduce_99(val, _values, result) + start = @handler.start_selector([]) + @handler.end_selector(start) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 261) + def _reduce_100(val, _values, result) + result = val.last + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 263) + def _reduce_101(val, _values, result) + @handler.start_selector val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 269) + def _reduce_102(val, _values, result) + sel = Selector.new(val.first, {}) + result = [sel].concat(val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 274) + def _reduce_103(val, _values, result) + result = [Selector.new(val.first, {})] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 280) + def _reduce_104(val, _values, result) + val.flatten! + val[2].combinator = val.delete_at 1 + result = val + + result + end +.,., + +# reduce 105 omitted + +module_eval(<<'.,.,', 'csspool.y', 287) + def _reduce_106(val, _values, result) + result = :s + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 288) + def _reduce_107(val, _values, result) + result = :> + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 289) + def _reduce_108(val, _values, result) + result = :+ + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 290) + def _reduce_109(val, _values, result) + result = :~ + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 294) + def _reduce_110(val, _values, result) + selector = val.first + selector.additional_selectors = val.last + result = [selector] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 298) + def _reduce_111(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 301) + def _reduce_112(val, _values, result) + ss = Selectors::Simple.new nil, nil + ss.additional_selectors = val.flatten + result = [ss] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 307) + def _reduce_113(val, _values, result) + result = [val[0], val[2]].flatten + result + end +.,., + +# reduce 114 omitted + +module_eval(<<'.,.,', 'csspool.y', 311) + def _reduce_115(val, _values, result) + result = [interpret_identifier(val[0]), nil] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 312) + def _reduce_116(val, _values, result) + result = [interpret_identifier(val[2]), interpret_identifier(val[0])] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 313) + def _reduce_117(val, _values, result) + result = [interpret_identifier(val[1]), nil] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 314) + def _reduce_118(val, _values, result) + result = [interpret_identifier(val[2]), '*'] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 317) + def _reduce_119(val, _values, result) + result = Selectors::Type.new val.first[0], nil, val.first[1] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 318) + def _reduce_120(val, _values, result) + result = Selectors::Universal.new val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 319) + def _reduce_121(val, _values, result) + result = Selectors::Universal.new val[1] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 320) + def _reduce_122(val, _values, result) + result = Selectors::Universal.new val[2], nil, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 321) + def _reduce_123(val, _values, result) + result = Selectors::Universal.new val[2], nil, interpret_identifier(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 324) + def _reduce_124(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 325) + def _reduce_125(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 326) + def _reduce_126(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 327) + def _reduce_127(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 328) + def _reduce_128(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 329) + def _reduce_129(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 330) + def _reduce_130(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 331) + def _reduce_131(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 335) + def _reduce_132(val, _values, result) + result = Selectors::Id.new interpret_identifier val.first.sub(/^#/, '') + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 339) + def _reduce_133(val, _values, result) + result = Selectors::Class.new interpret_identifier val.last + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 344) + def _reduce_134(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::EQUALS, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 352) + def _reduce_135(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::EQUALS, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 360) + def _reduce_136(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::INCLUDES, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 368) + def _reduce_137(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::INCLUDES, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 376) + def _reduce_138(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::DASHMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 384) + def _reduce_139(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::DASHMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 392) + def _reduce_140(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::PREFIXMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 400) + def _reduce_141(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::PREFIXMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 408) + def _reduce_142(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::SUFFIXMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 416) + def _reduce_143(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::SUFFIXMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 424) + def _reduce_144(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_identifier(val[3]), + Selectors::Attribute::SUBSTRINGMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 432) + def _reduce_145(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + interpret_string(val[3]), + Selectors::Attribute::SUBSTRINGMATCH, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 440) + def _reduce_146(val, _values, result) + result = Selectors::Attribute.new( + val[1][0], + nil, + Selectors::Attribute::SET, + val[1][1] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 450) + def _reduce_147(val, _values, result) + result = Selectors::pseudo interpret_identifier(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 453) + def _reduce_148(val, _values, result) + result = Selectors::PseudoElement.new( + interpret_identifier(val[2]) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 458) + def _reduce_149(val, _values, result) + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\($/, '')), + '' + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 464) + def _reduce_150(val, _values, result) + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\($/, '')), + interpret_identifier(val[2]) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 470) + def _reduce_151(val, _values, result) + result = Selectors::PseudoClass.new( + 'not', + val[2].first.to_s + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 476) + def _reduce_152(val, _values, result) + result = Selectors::PseudoClass.new( + interpret_identifier(val[1].sub(/\(.*/, '')), + interpret_identifier(val[1].sub(/.*\(/, '').sub(/\).*/, '')) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 482) + def _reduce_153(val, _values, result) + result = Selectors::PseudoClass.new( + val[1].split('(').first.strip, + val[2].join(', ') + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 488) + def _reduce_154(val, _values, result) + result = Selectors::PseudoElement.new( + interpret_identifier(val[1].sub(/\($/, '')) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 493) + def _reduce_155(val, _values, result) + result = Selectors::PseudoElement.new( + interpret_identifier(val[2].sub(/\($/, '')) + ) + + result + end +.,., + +# reduce 156 omitted + +# reduce 157 omitted + +# reduce 158 omitted + +# reduce 159 omitted + +# reduce 160 omitted + +# reduce 161 omitted + +# reduce 162 omitted + +# reduce 163 omitted + +# reduce 164 omitted + +# reduce 165 omitted + +# reduce 166 omitted + +module_eval(<<'.,.,', 'csspool.y', 519) + def _reduce_167(val, _values, result) + @handler.property val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 523) + def _reduce_168(val, _values, result) + result = Declaration.new(val.first, val[2], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 525) + def _reduce_169(val, _values, result) + result = Declaration.new(val.first, val[3], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 527) + def _reduce_170(val, _values, result) + result = Declaration.new(val.first, val[3], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 529) + def _reduce_171(val, _values, result) + result = Declaration.new(val.first, val[4], val[5]) + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 532) + def _reduce_172(val, _values, result) + result = true + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 533) + def _reduce_173(val, _values, result) + result = false + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 536) + def _reduce_174(val, _values, result) + result = interpret_identifier val[0] + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 537) + def _reduce_175(val, _values, result) + result = interpret_identifier val.join + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 538) + def _reduce_176(val, _values, result) + result = interpret_identifier val[0] + result + end +.,., + +# reduce 177 omitted + +# reduce 178 omitted + +# reduce 179 omitted + +module_eval(<<'.,.,', 'csspool.y', 547) + def _reduce_180(val, _values, result) + result = [val.first, val.last].flatten + val.last.first.operator = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 550) + def _reduce_181(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 551) + def _reduce_182(val, _values, result) + result = val + result + end +.,., + +# reduce 183 omitted + +# reduce 184 omitted + +# reduce 185 omitted + +# reduce 186 omitted + +# reduce 187 omitted + +# reduce 188 omitted + +# reduce 189 omitted + +# reduce 190 omitted + +# reduce 191 omitted + +# reduce 192 omitted + +# reduce 193 omitted + +module_eval(<<'.,.,', 'csspool.y', 567) + def _reduce_194(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 569) + def _reduce_195(val, _values, result) + name = interpret_identifier val.first.sub(/\($/, '') + if name == 'rgb' + result = Terms::Rgb.new(*val[1]) + else + result = Terms::Function.new name, val[1] + end + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 577) + def _reduce_196(val, _values, result) + name = interpret_identifier val.first.sub(/\($/, '') + result = Terms::Function.new name + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 582) + def _reduce_197(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 584) + def _reduce_198(val, _values, result) + parts = val.first.split('(') + name = interpret_identifier parts.first + result = Terms::Function.new(name, [Terms::String.new(interpret_string_no_quote(parts.last))]) + + result + end +.,., + +# reduce 199 omitted + +# reduce 200 omitted + +module_eval(<<'.,.,', 'csspool.y', 595) + def _reduce_201(val, _values, result) + result = Terms::Math.new(val.first.split('(').first, val[1]) + + result + end +.,., + +# reduce 202 omitted + +module_eval(<<'.,.,', 'csspool.y', 601) + def _reduce_203(val, _values, result) + val.insert(1, ' '); result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 602) + def _reduce_204(val, _values, result) + val.insert(1, ' '); result = val.join('') + result + end +.,., + +# reduce 205 omitted + +module_eval(<<'.,.,', 'csspool.y', 606) + def _reduce_206(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 607) + def _reduce_207(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 610) + def _reduce_208(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 611) + def _reduce_209(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 612) + def _reduce_210(val, _values, result) + result = val.join('') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 615) + def _reduce_211(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 616) + def _reduce_212(val, _values, result) + result = Terms::Hash.new val.first.sub(/^#/, '') + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 619) + def _reduce_213(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 620) + def _reduce_214(val, _values, result) + result = Terms::URI.new interpret_uri val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 623) + def _reduce_215(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 624) + def _reduce_216(val, _values, result) + result = Terms::String.new interpret_string val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 628) + def _reduce_217(val, _values, result) + result = val[1] + val[1].unary_operator = val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 632) + def _reduce_218(val, _values, result) + result = Terms::Number.new numeric val.first + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 635) + def _reduce_219(val, _values, result) + result = Terms::Number.new numeric(val.first), nil, '%' + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 638) + def _reduce_220(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 642) + def _reduce_221(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 646) + def _reduce_222(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 650) + def _reduce_223(val, _values, result) + unit = val.first.gsub(/[\s\d.]/, '') + result = Terms::Number.new numeric(val.first), nil, unit + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 656) + def _reduce_224(val, _values, result) + result = Terms::Ratio.new(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 660) + def _reduce_225(val, _values, result) + result = :minus + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 661) + def _reduce_226(val, _values, result) + result = :plus + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 664) + def _reduce_227(val, _values, result) + result = val.first + result + end +.,., + +module_eval(<<'.,.,', 'csspool.y', 665) + def _reduce_228(val, _values, result) + result = Terms::Ident.new interpret_identifier val.first + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module CSS + end # module CSSPool diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index a3034327..03997e55 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -165,5 +165,13 @@ def test_ruby22 assert_debugfile 'ruby22.y', [] assert_output 'ruby22.y' end + + # .y file from csspool gem + + def test_csspool + assert_compile 'csspool.y' + assert_debugfile 'csspool.y', [5, 3] + assert_output 'csspool.y' + end end end From 55cfdf5d08cd38b30b9cc9ec198440fcc32706f9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 09:23:41 +0200 Subject: [PATCH 089/619] Add regression test based on grammar.y from opal gem Upon request to use this grammar, the author, Adam Beynon, said: Yep, that is fine with me. A copy of the original license has been prepended to the top of the file. --- Manifest.txt | 2 + test/assets/opal.y | 1807 +++++++++ test/regress/opal | 7994 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 9811 insertions(+) create mode 100644 test/assets/opal.y create mode 100644 test/regress/opal diff --git a/Manifest.txt b/Manifest.txt index f1619ecd..7b97be46 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -73,6 +73,7 @@ test/assets/normal.y test/assets/norule.y test/assets/nullbug1.y test/assets/nullbug2.y +test/assets/opal.y test/assets/opt.y test/assets/percent.y test/assets/recv.y @@ -91,6 +92,7 @@ test/bench.y test/helper.rb test/infini.y test/regress/csspool +test/regress/opal test/regress/ruby18 test/regress/ruby22 test/scandata/brace diff --git a/test/assets/opal.y b/test/assets/opal.y new file mode 100644 index 00000000..ae6a5a6b --- /dev/null +++ b/test/assets/opal.y @@ -0,0 +1,1807 @@ +# Copyright (C) 2013 by Adam Beynon +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +class Opal::Parser + +token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS + kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT + kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER + kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD + kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__ + k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT + tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT + tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ tGEQ tLEQ tANDOP + tOROP tMATCH tNMATCH tJSDOT tDOT tDOT2 tDOT3 tAREF tASET tLSHFT tRSHFT + tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN tLPAREN2 tRPAREN tLPAREN_ARG + ARRAY_BEG tRBRACK tLBRACE tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 + tTILDE tPERCENT tDIVIDE tPLUS tMINUS tLT tGT tPIPE tBANG tCARET + tLCURLY tRCURLY tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG + tWORDS_BEG tAWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END tSTRING + tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA tLAMBEG + tLBRACK2 tLBRACK tJSLBRACK tDSTAR + +prechigh + right tBANG tTILDE tUPLUS + right tPOW + right tUMINUS_NUM tUMINUS + left tSTAR2 tDIVIDE tPERCENT + left tPLUS tMINUS + left tLSHFT tRSHFT + left tAMPER2 + left tPIPE tCARET + left tGT tGEQ tLT tLEQ + nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH + left tANDOP + left tOROP + nonassoc tDOT2 tDOT3 + right tEH tCOLON + left kRESCUE_MOD + right tEQL tOP_ASGN + nonassoc kDEFINED + right kNOT + left kOR kAND + nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD + nonassoc tLBRACE_ARG + nonassoc tLOWEST +preclow + +rule + + program: top_compstmt + + top_compstmt: top_stmts opt_terms + { + result = new_compstmt val[0] + } + + top_stmts: # none + { + result = new_block + } + | top_stmt + { + result = new_block val[0] + } + | top_stmts terms top_stmt + { + val[0] << val[2] + result = val[0] + } + + top_stmt: stmt + | klBEGIN tLCURLY top_compstmt tRCURLY + { + result = val[2] + } + + bodystmt: compstmt opt_rescue opt_else opt_ensure + { + result = new_body(val[0], val[1], val[2], val[3]) + } + + compstmt: stmts opt_terms + { + result = new_compstmt val[0] + } + + stmts: # none + { + result = new_block + } + | stmt + { + result = new_block val[0] + } + | stmts terms stmt + { + val[0] << val[2] + result = val[0] + } + + stmt: kALIAS fitem + { + lexer.lex_state = :expr_fname + } + fitem + { + result = new_alias(val[0], val[1], val[3]) + } + | kALIAS tGVAR tGVAR + { + result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) + } + | kALIAS tGVAR tBACK_REF + | kALIAS tGVAR tNTH_REF + { + result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) + } + | kUNDEF undef_list + { + result = val[1] + } + | stmt kIF_MOD expr_value + { + result = new_if(val[1], val[2], val[0], nil) + } + | stmt kUNLESS_MOD expr_value + { + result = new_if(val[1], val[2], nil, val[0]) + } + | stmt kWHILE_MOD expr_value + { + result = new_while(val[1], val[2], val[0]) + } + | stmt kUNTIL_MOD expr_value + { + result = new_until(val[1], val[2], val[0]) + } + | stmt kRESCUE_MOD stmt + { + result = new_rescue_mod(val[1], val[0], val[2]) + } + | klEND tLCURLY compstmt tRCURLY + | lhs tEQL command_call + { + result = new_assign(val[0], val[1], val[2]) + } + | mlhs tEQL command_call + { + result = s(:masgn, val[0], s(:to_ary, val[2])) + } + | var_lhs tOP_ASGN command_call + { + result = new_op_asgn val[1], val[0], val[2] + } + | primary_value tLBRACK2 aref_args tRBRACK tOP_ASGN command_call + | primary_value tJSLBRACK aref_args tRBRACK tOP_ASGN command_call + | primary_value tDOT tIDENTIFIER tOP_ASGN command_call + { + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN command_call + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_call + | backref tOP_ASGN command_call + | lhs tEQL mrhs + { + result = new_assign val[0], val[1], s(:svalue, val[2]) + } + | mlhs tEQL arg_value + { + result = s(:masgn, val[0], s(:to_ary, val[2])) + } + | mlhs tEQL mrhs + { + result = s(:masgn, val[0], val[2]) + } + | expr + + expr: command_call + | expr kAND expr + { + result = s(:and, val[0], val[2]) + } + | expr kOR expr + { + result = s(:or, val[0], val[2]) + } + | kNOT expr + { + result = new_unary_call(['!', []], val[1]) + } + | tBANG command_call + { + result = new_unary_call(val[0], val[1]) + } + | arg + + expr_value: expr + + command_call: command + | block_command + | kRETURN call_args + { + result = new_return(val[0], val[1]) + } + | kBREAK call_args + { + result = new_break(val[0], val[1]) + } + | kNEXT call_args + { + result = new_next(val[0], val[1]) + } + + block_command: block_call + | block_call tJSDOT operation2 command_args + | block_call tDOT operation2 command_args + | block_call tCOLON2 operation2 command_args + + cmd_brace_block: tLBRACE_ARG opt_block_var compstmt tRCURLY + + command: operation command_args =tLOWEST + { + result = new_call(nil, val[0], val[1]) + } + | operation command_args cmd_brace_block + | primary_value tJSDOT operation2 command_args =tLOWEST + { + result = new_js_call(val[0], val[2], val[3]) + } + | primary_value tJSDOT operation2 command_args cmd_brace_block + | primary_value tDOT operation2 command_args =tLOWEST + { + result = new_call(val[0], val[2], val[3]) + } + | primary_value tDOT operation2 command_args cmd_brace_block + | primary_value tCOLON2 operation2 command_args =tLOWEST + { + result = new_call(val[0], val[2], val[3]) + } + | primary_value tCOLON2 operation2 command_args cmd_brace_block + | kSUPER command_args + { + result = new_super(val[0], val[1]) + } + | kYIELD command_args + { + result = new_yield val[1] + } + + mlhs: mlhs_basic + { + result = val[0] + } + | tLPAREN mlhs_entry tRPAREN + { + result = val[1] + } + + mlhs_entry: mlhs_basic + { + result = val[0] + } + | tLPAREN mlhs_entry tRPAREN + { + result = val[1] + } + + mlhs_basic: mlhs_head + { + result = val[0] + } + | mlhs_head mlhs_item + { + result = val[0] << val[1] + } + | mlhs_head tSTAR mlhs_node + { + result = val[0] << s(:splat, val[2]) + } + | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post + | mlhs_head tSTAR + { + result = val[0] << s(:splat) + } + | mlhs_head tSTAR tCOMMA mlhs_post + | tSTAR mlhs_node + { + result = s(:array, s(:splat, val[1])) + } + | tSTAR + { + result = s(:array, s(:splat)) + } + | tSTAR tCOMMA mlhs_post + + mlhs_item: mlhs_node + { + result = val[0] + } + | tLPAREN mlhs_entry tRPAREN + { + result = val[1] + } + + mlhs_head: mlhs_item tCOMMA + { + result = s(:array, val[0]) + } + | mlhs_head mlhs_item tCOMMA + { + result = val[0] << val[1] + } + + mlhs_post: mlhs_item + | mlhs_post tCOMMA mlhs_item + + mlhs_node: variable + { + result = new_assignable val[0] + } + | primary_value tLBRACK2 aref_args tRBRACK + { + args = val[2] ? val[2] : [] + result = s(:attrasgn, val[0], :[]=, s(:arglist, *args)) + } + | primary_value tDOT tIDENTIFIER + { + result = new_call val[0], val[2], [] + } + | primary_value tCOLON2 tIDENTIFIER + | primary_value tDOT tCONSTANT + | primary_value tCOLON2 tCONSTANT + | tCOLON3 tCONSTANT + | backref + + lhs: variable + { + result = new_assignable val[0] + } + | primary_value tJSLBRACK aref_args tRBRACK + { + result = new_js_attrasgn(val[0], val[2]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = new_attrasgn(val[0], :[]=, val[2]) + } + | primary_value tDOT tIDENTIFIER + { + result = new_attrasgn(val[0], op_to_setter(val[2])) + } + | primary_value tCOLON2 tIDENTIFIER + { + result = new_attrasgn(val[0], op_to_setter(val[2])) + } + | primary_value tDOT tCONSTANT + { + result = new_attrasgn(val[0], op_to_setter(val[2])) + } + | primary_value tCOLON2 tCONSTANT + { + result = new_colon2(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = new_colon3(val[0], val[1]) + } + | backref + + cname: tCONSTANT + + cpath: tCOLON3 cname + { + result = new_colon3(val[0], val[1]) + } + | cname + { + result = new_const(val[0]) + } + | primary_value tCOLON2 cname + { + result = new_colon2(val[0], val[1], val[2]) + } + + fname: tIDENTIFIER + | tCONSTANT + | tFID + | op + { + lexer.lex_state = :expr_end + result = val[0] + } + | reswords + { + lexer.lex_state = :expr_end + result = val[0] + } + + fitem: fname + { + result = new_sym(val[0]) + } + | symbol + + undef_list: fitem + { + result = s(:undef, val[0]) + } + | undef_list tCOMMA fitem + { + result = val[0] << val[2] + } + + op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ + | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ + | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2 + | tSTAR | tDIVIDE | tPERCENT | tPOW | tBANG | tTILDE + | tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2 + + reswords: k__LINE__ | k__FILE__ | klBEGIN | klEND | kALIAS | kAND + | kBEGIN | kBREAK | kCASE | kCLASS | kDEF | kDEFINED + | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE + | kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT + | kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF + | kSUPER | kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD + | kIF_MOD | kUNLESS_MOD | kWHILE_MOD | kUNTIL_MOD | kRESCUE_MOD + | kIF | kWHILE | kUNTIL | kUNLESS + + arg: lhs tEQL arg + { + result = new_assign(val[0], val[1], val[2]) + } + | lhs tEQL arg kRESCUE_MOD arg + { + result = new_assign val[0], val[1], s(:rescue_mod, val[2], val[4]) + } + | var_lhs tOP_ASGN arg + { + result = new_op_asgn val[1], val[0], val[2] + } + | primary_value tLBRACK2 aref_args tRBRACK tOP_ASGN arg + { + result = new_op_asgn1(val[0], val[2], val[4], val[5]) + } + | primary_value tJSLBRACK aref_args tRBRACK tOP_ASGN arg + { + raise ".JS[...] #{val[4]} is not supported" + } + | primary_value tDOT tIDENTIFIER tOP_ASGN arg + { + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) + } + | primary_value tDOT tCONSTANT tOP_ASGN arg + | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg + | primary_value tCOLON2 tCONSTANT tOP_ASGN arg + | tCOLON3 tCONSTANT tOP_ASGN arg + | backref tOP_ASGN arg + | arg tDOT2 arg + { + result = new_irange(val[0], val[1], val[2]) + } + | arg tDOT3 arg + { + result = new_erange(val[0], val[1], val[2]) + } + | arg tPLUS arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tMINUS arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tSTAR2 arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tDIVIDE arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tPERCENT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tPOW arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | '-@NUM' tINTEGER tPOW arg + { + result = new_call new_binary_call(new_int(val[1]), val[2], val[3]), [:"-@", []], [] + } + | '-@NUM' tFLOAT tPOW arg + { + result = new_call new_binary_call(new_float(val[1]), val[2], val[3]), [:"-@", []], [] + } + | tUPLUS arg + { + result = new_call val[1], [:"+@", []], [] + if [:int, :float].include? val[1].type + result = val[1] + end + } + | tUMINUS arg + { + result = new_call val[1], [:"-@", []], [] + if val[1].type == :int + val[1][1] = -val[1][1] + result = val[1] + elsif val[1].type == :float + val[1][1] = -val[1][1].to_f + result = val[1] + end + } + | arg tPIPE arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tCARET arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tAMPER2 arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tCMP arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tGT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tGEQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tLT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tLEQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tEQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tEQQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tNEQ arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tMATCH arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tNMATCH arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | tBANG arg + { + result = new_unary_call(val[0], val[1]) + } + | tTILDE arg + { + result = new_unary_call(val[0], val[1]) + } + | arg tLSHFT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tRSHFT arg + { + result = new_binary_call(val[0], val[1], val[2]) + } + | arg tANDOP arg + { + result = new_and(val[0], val[1], val[2]) + } + | arg tOROP arg + { + result = new_or(val[0], val[1], val[2]) + } + | kDEFINED opt_nl arg + { + result = s(:defined, val[2]) + } + | arg tEH arg tCOLON arg + { + result = new_if(val[1], val[0], val[2], val[4]) + } + | primary + + arg_value: arg + + aref_args: none + { + result = nil + } + | command opt_nl + { + result = [val[0]] + } + | args trailer + { + result = val[0] + } + | args tCOMMA assocs trailer + { + val[0] << s(:hash, *val[2]) + result = val[0] + } + | assocs trailer + { + result = [s(:hash, *val[0])] + } + + paren_args: tLPAREN2 opt_call_args rparen + { + result = val[1] + } + + rparen: opt_nl tRPAREN + + opt_paren_args: none + { + result = [] + } + | paren_args + + opt_call_args: none + { + result = [] + } + | call_args + | args tCOMMA + { + result = val[0] + } + | args tCOMMA assocs tCOMMA + { + result = val[0] + result << new_hash(nil, val[2], nil) + } + | assocs tCOMMA + { + result = [new_hash(nil, val[0], nil)] + } + + call_args: command + { + result = [val[0]] + } + | args opt_block_arg + { + result = val[0] + add_block_pass val[0], val[1] + } + | assocs opt_block_arg + { + result = [new_hash(nil, val[0], nil)] + add_block_pass result, val[1] + } + | args tCOMMA assocs opt_block_arg + { + result = val[0] + result << new_hash(nil, val[2], nil) + result << val[3] if val[3] + } + | block_arg + { + result = [] + add_block_pass result, val[0] + } + + call_args2: arg_value tCOMMA args opt_block_arg + | block_arg + + command_args: { + lexer.cmdarg_push 1 + } + open_args + { + lexer.cmdarg_pop + result = val[1] + } + + open_args: call_args + | tLPAREN_ARG tRPAREN + { + result = nil + } + | tLPAREN_ARG call_args2 tRPAREN + { + result = val[1] + } + + block_arg: tAMPER arg_value + { + result = new_block_pass(val[0], val[1]) + } + + opt_block_arg: tCOMMA block_arg + { + result = val[1] + } + | # none + { + result = nil + } + + args: arg_value + { + result = [val[0]] + } + | tSTAR arg_value + { + result = [new_splat(val[0], val[1])] + } + | args tCOMMA arg_value + { + result = val[0] << val[2] + } + | args tCOMMA tSTAR arg_value + { + result = val[0] << new_splat(val[2], val[3]) + } + + mrhs: args tCOMMA arg_value + { + val[0] << val[2] + result = s(:array, *val[0]) + } + | args tCOMMA tSTAR arg_value + { + val[0] << s(:splat, val[3]) + result = s(:array, *val[0]) + } + | tSTAR arg_value + { + result = s(:splat, val[1]) + } + + primary: literal + | strings + | xstring + | regexp + | words + | awords + | var_ref + | backref + | tFID + | kBEGIN + { + result = lexer.line + } + bodystmt kEND + { + result = s(:begin, val[2]) + } + | tLPAREN_ARG expr opt_nl tRPAREN + { + result = val[1] + } + | tLPAREN compstmt tRPAREN + { + result = new_paren(val[0], val[1], val[2]) + } + | primary_value tCOLON2 tCONSTANT + { + result = new_colon2(val[0], val[1], val[2]) + } + | tCOLON3 tCONSTANT + { + result = new_colon3(val[0], val[1]) + } + | primary_value tLBRACK2 aref_args tRBRACK + { + result = new_call val[0], [:[], []], val[2] + } + | primary_value tJSLBRACK aref_args tRBRACK + { + result = new_js_call val[0], [:[], []], val[2] + } + | tLBRACK aref_args tRBRACK + { + result = new_array(val[0], val[1], val[2]) + } + | tLBRACE assoc_list tRCURLY + { + result = new_hash(val[0], val[1], val[2]) + } + | kRETURN + { + result = new_return(val[0]) + } + | kYIELD tLPAREN2 call_args tRPAREN + { + result = new_yield val[2] + } + | kYIELD tLPAREN2 tRPAREN + { + result = s(:yield) + } + | kYIELD + { + result = s(:yield) + } + | kDEFINED opt_nl tLPAREN2 expr tRPAREN + { + result = s(:defined, val[3]) + } + | kNOT tLPAREN2 expr tRPAREN + { + result = new_unary_call(['!', []], val[2]) + } + | kNOT tLPAREN2 tRPAREN + { + result = new_unary_call(['!', []], new_nil(val[0])) + } + | operation brace_block + { + result = new_call(nil, val[0], []) + result << val[1] + } + | method_call + | method_call brace_block + { + val[0] << val[1] + result = val[0] + } + | tLAMBDA lambda + { + result = val[1] + } + | kIF expr_value then compstmt if_tail kEND + { + result = new_if(val[0], val[1], val[3], val[4]) + } + | kUNLESS expr_value then compstmt opt_else kEND + { + result = new_if(val[0], val[1], val[4], val[3]) + } + | kWHILE + { + lexer.cond_push 1 + result = lexer.line + } + expr_value do + { + lexer.cond_pop + } + compstmt kEND + { + result = s(:while, val[2], val[5]) + } + | kUNTIL + { + lexer.cond_push 1 + result = lexer.line + } + expr_value do + { + lexer.cond_pop + } + compstmt kEND + { + result = s(:until, val[2], val[5]) + } + | kCASE expr_value opt_terms case_body kEND + { + result = s(:case, val[1], *val[3]) + } + | kCASE opt_terms case_body kEND + { + result = s(:case, nil, *val[2]) + } + | kCASE opt_terms kELSE compstmt kEND + { + result = s(:case, nil, val[3]) + } + | kFOR for_var kIN + { + lexer.cond_push 1 + result = lexer.line + } + expr_value do + { + lexer.cond_pop + } + compstmt kEND + { + result = s(:for, val[4], val[1], val[7]) + } + | kCLASS cpath superclass + { + # ... + } + bodystmt kEND + { + result = new_class val[0], val[1], val[2], val[4], val[5] + } + | kCLASS tLSHFT + { + result = lexer.line + } + expr term + { + # ... + } + bodystmt kEND + { + result = new_sclass(val[0], val[3], val[6], val[7]) + } + | kMODULE + { + result = lexer.line + } + cpath + { + # ... + } + bodystmt kEND + { + result = new_module(val[0], val[2], val[4], val[5]) + } + | kDEF fname + { + push_scope + lexer.lex_state = :expr_endfn + } + f_arglist bodystmt kEND + { + result = new_def(val[0], nil, val[1], val[3], val[4], val[5]) + pop_scope + } + | kDEF singleton dot_or_colon + { + lexer.lex_state = :expr_fname + } + fname + { + push_scope + lexer.lex_state = :expr_endfn + } + f_arglist bodystmt kEND + { + result = new_def(val[0], val[1], val[4], val[6], val[7], val[8]) + pop_scope + } + | kBREAK + { + result = new_break(val[0]) + } + | kNEXT + { + result = s(:next) + } + | kREDO + { + result = s(:redo) + } + | kRETRY + + primary_value: primary + + then: term + | tCOLON + | kTHEN + | term kTHEN + + do: term + | tCOLON + | kDO_COND + + lambda: f_larglist lambda_body + { + result = new_call nil, [:lambda, []], [] + result << new_iter(val[0], val[1]) + } + + f_larglist: tLPAREN2 block_param tRPAREN + { + result = val[1] + } + | tLPAREN2 tRPAREN + { + result = nil + } + | block_param + | none + + lambda_body: tLAMBEG compstmt tRCURLY + { + result = val[1] + } + | kDO_LAMBDA compstmt kEND + { + result = val[1] + } + + if_tail: opt_else + { + result = val[0] + } + | kELSIF expr_value then compstmt if_tail + { + result = new_if(val[0], val[1], val[3], val[4]) + } + + opt_else: none + | kELSE compstmt + { + result = val[1] + } + + f_block_optarg: f_block_opt + { + result = s(:block, val[0]) + } + | f_block_optarg tCOMMA f_block_opt + { + val[0] << val[2] + result = val[0] + } + + f_block_opt: tIDENTIFIER tEQL primary_value + { + result = new_assign(new_assignable(new_ident( + val[0])), val[1], val[2]) + } + + opt_block_var: none + | tPIPE tPIPE + { + result = nil + } + | tOROP + { + result = nil + } + | tPIPE block_param tPIPE + { + result = val[1] + } + + block_args_tail: f_block_arg + { + result = val[0] + } + +opt_block_args_tail: tCOMMA block_args_tail + { + result = val[1] + } + | none + { + nil + } + + block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = new_block_args(val[0], val[2], val[4], val[5]) + } + | f_arg tCOMMA f_block_optarg opt_block_args_tail + { + result = new_block_args(val[0], val[2], nil, val[3]) + } + | f_arg tCOMMA f_rest_arg opt_block_args_tail + { + result = new_block_args(val[0], nil, val[2], val[3]) + } + | f_arg tCOMMA + { + result = new_block_args(val[0], nil, nil, nil) + } + | f_arg opt_block_args_tail + { + result = new_block_args(val[0], nil, nil, val[1]) + } + | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail + { + result = new_block_args(nil, val[0], val[2], val[3]) + } + | f_block_optarg opt_block_args_tail + { + result = new_block_args(nil, val[0], nil, val[1]) + } + | f_rest_arg opt_block_args_tail + { + result = new_block_args(nil, nil, val[0], val[1]) + } + | block_args_tail + { + result = new_block_args(nil, nil, nil, val[0]) + } + + do_block: kDO_BLOCK + { + push_scope :block + result = lexer.line + } + opt_block_var compstmt kEND + { + result = new_iter val[2], val[3] + pop_scope + } + + block_call: command do_block + { + val[0] << val[1] + result = val[0] + } + | block_call tJSDOT operation2 opt_paren_args + | block_call tDOT operation2 opt_paren_args + | block_call tCOLON2 operation2 opt_paren_args + + method_call: operation paren_args + { + result = new_call(nil, val[0], val[1]) + } + | primary_value tDOT operation2 opt_paren_args + { + result = new_call(val[0], val[2], val[3]) + } + | primary_value tJSDOT operation2 opt_paren_args + { + result = new_js_call(val[0], val[2], val[3]) + } + | primary_value tDOT paren_args + { + result = new_call(val[0], [:call, []], val[2]) + } + | primary_value tCOLON2 operation2 paren_args + { + result = new_call(val[0], val[2], val[3]) + } + | primary_value tCOLON2 operation3 + { + result = new_call(val[0], val[2]) + } + | kSUPER paren_args + { + result = new_super(val[0], val[1]) + } + | kSUPER + { + result = new_super(val[0], nil) + } + + brace_block: tLCURLY + { + push_scope :block + result = lexer.line + } + opt_block_var compstmt tRCURLY + { + result = new_iter val[2], val[3] + pop_scope + } + | kDO + { + push_scope :block + result = lexer.line + } + opt_block_var compstmt kEND + { + result = new_iter val[2], val[3] + pop_scope + } + + case_body: kWHEN + { + result = lexer.line + } + args then compstmt cases + { + part = s(:when, s(:array, *val[2]), val[4]) + result = [part] + result.push(*val[5]) if val[5] + } + + cases: opt_else + { + result = [val[0]] + } + | case_body + + opt_rescue: kRESCUE exc_list exc_var then compstmt opt_rescue + { + exc = val[1] || s(:array) + exc << new_assign(val[2], val[2], s(:gvar, '$!'.intern)) if val[2] + result = [s(:resbody, exc, val[4])] + result.push val[5].first if val[5] + } + | # none + { + result = nil + } + + exc_list: arg_value + { + result = s(:array, val[0]) + } + | mrhs + | none + + exc_var: tASSOC lhs + { + result = val[1] + } + | none + { + result = nil + } + + opt_ensure: kENSURE compstmt + { + result = val[1].nil? ? s(:nil) : val[1] + } + | none + + literal: numeric + | symbol + | dsym + + strings: string + { + result = new_str val[0] + } + + string: string1 + | string string1 + { + result = str_append val[0], val[1] + } + + string1: tSTRING_BEG string_contents tSTRING_END + { + result = val[1] + } + | tSTRING + { + result = s(:str, value(val[0])) + } + + xstring: tXSTRING_BEG xstring_contents tSTRING_END + { + result = new_xstr(val[0], val[1], val[2]) + } + + regexp: tREGEXP_BEG xstring_contents tREGEXP_END + { + result = new_regexp val[1], val[2] + } + + words: tWORDS_BEG tSPACE tSTRING_END + { + result = s(:array) + } + | tWORDS_BEG word_list tSTRING_END + { + result = val[1] + } + + word_list: none + { + result = s(:array) + } + | word_list word tSPACE + { + part = val[1] + part = s(:dstr, "", val[1]) if part.type == :evstr + result = val[0] << part + } + + word: string_content + { + result = val[0] + } + | word string_content + { + result = val[0].concat([val[1]]) + } + + awords: tAWORDS_BEG tSPACE tSTRING_END + { + result = s(:array) + } + | tAWORDS_BEG qword_list tSTRING_END + { + result = val[1] + } + + qword_list: none + { + result = s(:array) + } + | qword_list tSTRING_CONTENT tSPACE + { + result = val[0] << s(:str, value(val[1])) + } + + string_contents: none + { + result = nil + } + | string_contents string_content + { + result = str_append val[0], val[1] + } + +xstring_contents: none + { + result = nil + } + | xstring_contents string_content + { + result = str_append val[0], val[1] + } + + string_content: tSTRING_CONTENT + { + result = new_str_content(val[0]) + } + | tSTRING_DVAR + { + result = lexer.strterm + lexer.strterm = nil + } + string_dvar + { + lexer.strterm = val[1] + result = new_evstr(val[2]) + } + | tSTRING_DBEG + { + lexer.cond_push 0 + lexer.cmdarg_push 0 + result = lexer.strterm + lexer.strterm = nil + lexer.lex_state = :expr_beg + } + compstmt tRCURLY + { + lexer.strterm = val[1] + lexer.cond_lexpop + lexer.cmdarg_lexpop + result = new_evstr(val[2]) + } + + string_dvar: tGVAR + { + result = new_gvar(val[0]) + } + | tIVAR + { + result = new_ivar(val[0]) + } + | tCVAR + { + result = new_cvar(val[0]) + } + | backref + + + symbol: tSYMBEG sym + { + result = new_sym(val[1]) + lexer.lex_state = :expr_end + } + | tSYMBOL + { + result = new_sym(val[0]) + } + + sym: fname + | tIVAR + | tGVAR + | tCVAR + + dsym: tSYMBEG xstring_contents tSTRING_END + { + result = new_dsym val[1] + } + + numeric: tINTEGER + { + result = new_int(val[0]) + } + | tFLOAT + { + result = new_float(val[0]) + } + | '-@NUM' tINTEGER =tLOWEST + { + result = negate_num(new_int(val[1])) + } + | '-@NUM' tFLOAT =tLOWEST + { + result = negate_num(new_float(val[1])) + } + | '+@NUM' tINTEGER =tLOWEST + { + result = new_int(val[1]) + } + | '+@NUM' tFLOAT =tLOWEST + { + result = new_float(val[1]) + } + + variable: tIDENTIFIER + { + result = new_ident(val[0]) + } + | tIVAR + { + result = new_ivar(val[0]) + } + | tGVAR + { + result = new_gvar(val[0]) + } + | tCONSTANT + { + result = new_const(val[0]) + } + | tCVAR + { + result = new_cvar(val[0]) + } + | kNIL + { + result = new_nil(val[0]) + } + | kSELF + { + result = new_self(val[0]) + } + | kTRUE + { + result = new_true(val[0]) + } + | kFALSE + { + result = new_false(val[0]) + } + | k__FILE__ + { + result = new___FILE__(val[0]) + } + | k__LINE__ + { + result = new___LINE__(val[0]) + } + + var_ref: variable + { + result = new_var_ref(val[0]) + } + + var_lhs: variable + { + result = new_assignable val[0] + } + + backref: tNTH_REF + { + result = s(:nth_ref, value(val[0])) + } + | tBACK_REF + + superclass: term + { + result = nil + } + | tLT expr_value term + { + result = val[1] + } + | error term + { + result = nil + } + + f_arglist: tLPAREN2 f_args opt_nl tRPAREN + { + result = val[1] + lexer.lex_state = :expr_beg + } + | f_args term + { + result = val[0] + lexer.lex_state = :expr_beg + } + + kwrest_mark: tPOW + | tDSTAR + + f_kwrest: kwrest_mark tIDENTIFIER + { + result = new_kwrestarg(val[1]) + } + | kwrest_mark + { + result = new_kwrestarg() + } + + f_label: tLABEL + { + result = new_sym(val[0]) + } + + f_kw: f_label arg_value + { + result = new_kwoptarg(val[0], val[1]) + } + | f_label + { + result = new_kwarg(val[0]) + } + + f_kwarg: f_kw + { + result = [val[0]] + } + | f_kwarg tCOMMA f_kw + { + result = val[0] + result << val[2] + } + + args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg + { + result = new_args_tail(val[0], val[2], val[3]) + } + | f_kwarg opt_f_block_arg + { + result = new_args_tail(val[0], nil, val[1]) + } + | f_kwrest opt_f_block_arg + { + result = new_args_tail(nil, val[0], val[1]) + } + | f_block_arg + { + result = new_args_tail(nil, nil, val[0]) + } + + opt_args_tail: tCOMMA args_tail + { + result = val[1] + } + | # none + { + result = new_args_tail(nil, nil, nil) + } + + f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = new_args(val[0], val[2], val[4], val[5]) + } + | f_arg tCOMMA f_optarg opt_args_tail + { + result = new_args(val[0], val[2], nil, val[3]) + } + | f_arg tCOMMA f_rest_arg opt_args_tail + { + result = new_args(val[0], nil, val[2], val[3]) + } + | f_arg opt_args_tail + { + result = new_args(val[0], nil, nil, val[1]) + } + | f_optarg tCOMMA f_rest_arg opt_args_tail + { + result = new_args(nil, val[0], val[2], val[3]) + } + | f_optarg opt_args_tail + { + result = new_args(nil, val[0], nil, val[1]) + } + | f_rest_arg opt_args_tail + { + result = new_args(nil, nil, val[0], val[1]) + } + | args_tail + { + result = new_args(nil, nil, nil, val[0]) + } + | # none + { + result = new_args(nil, nil, nil, nil) + } + + f_norm_arg: f_bad_arg + | tIDENTIFIER + { + result = value(val[0]).to_sym + scope.add_local result + } + + f_bad_arg: tCONSTANT + { + raise 'formal argument cannot be a constant' + } + | tIVAR + { + raise 'formal argument cannot be an instance variable' + } + | tCVAR + { + raise 'formal argument cannot be a class variable' + } + | tGVAR + { + raise 'formal argument cannot be a global variable' + } + + f_arg_item: f_norm_arg + { + result = val[0] + } + | tLPAREN f_margs tRPAREN + { + result = val[1] + } + + for_var: lhs + | mlhs + + f_marg: f_norm_arg + { + result = s(:lasgn, val[0]) + } + | tLPAREN f_margs tRPAREN + + f_marg_list: f_marg + { + result = s(:array, val[0]) + } + | f_marg_list tCOMMA f_marg + { + val[0] << val[2] + result = val[0] + } + + f_margs: f_marg_list + | f_marg_list tCOMMA tSTAR f_norm_arg + | f_marg_list tCOMMA tSTAR + | tSTAR f_norm_arg + | tSTAR + + f_arg: f_arg_item + { + result = [val[0]] + } + | f_arg tCOMMA f_arg_item + { + val[0] << val[2] + result = val[0] + } + + f_opt: tIDENTIFIER tEQL arg_value + { + result = new_assign(new_assignable(new_ident(val[0])), val[1], val[2]) + } + + f_optarg: f_opt + { + result = s(:block, val[0]) + } + | f_optarg tCOMMA f_opt + { + result = val[0] + val[0] << val[2] + } + + restarg_mark: tSTAR2 + | tSTAR + + f_rest_arg: restarg_mark tIDENTIFIER + { + result = "*#{value(val[1])}".to_sym + } + | restarg_mark + { + result = :"*" + } + + blkarg_mark: tAMPER2 + | tAMPER + + f_block_arg: blkarg_mark tIDENTIFIER + { + result = "&#{value(val[1])}".to_sym + } + + opt_f_block_arg: tCOMMA f_block_arg + { + result = val[1] + } + | # none + { + result = nil + } + + singleton: var_ref + { + result = val[0] + } + | tLPAREN2 expr opt_nl tRPAREN + { + result = val[1] + } + + assoc_list: # none + { + result = [] + } + | assocs trailer + { + result = val[0] + } + + assocs: assoc + { + result = val[0] + } + | assocs tCOMMA assoc + { + result = val[0].push(*val[2]) + } + + assoc: arg_value tASSOC arg_value + { + result = [val[0], val[2]] + } + | tLABEL arg_value + { + result = [new_sym(val[0]), val[1]] + } + + operation: tIDENTIFIER + | tCONSTANT + | tFID + + operation2: tIDENTIFIER + | tCONSTANT + | tFID + | op + + operation3: tIDENTIFIER + | tFID + | op + + dot_or_colon: tDOT + | tCOLON2 + + opt_terms: # none + | terms + + opt_nl: # none + | tNL + + trailer: # none + | tNL + | tCOMMA + + term: tSEMI + | tNL + + terms: term + | terms tSEMI + + none: # none + { + result = nil + } +end + +---- inner diff --git a/test/regress/opal b/test/regress/opal new file mode 100644 index 00000000..6c84c828 --- /dev/null +++ b/test/regress/opal @@ -0,0 +1,7994 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "opal.y". +# + +require 'racc/parser.rb' +module Opal + class Parser < Racc::Parser + +module_eval(<<'...end opal.y/module_eval...', 'opal.y', 1808) + +...end opal.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [63, 64, 65, 8, 51, 575, 552, - +92, 57, 58, 619, 205, 206, 61, 73, 59, 60, 62, 23, 24, 66, 67, +74, 544, 754, 607, 543, 22, 28, 27, 90, 89, 91, 92, 97, 751, 17, +607, 273, - +458, 612, 653, 7, 41, 6, 9, 94, 93, 575, 84, 50, 86, 85, 87, +273, 88, 95, 96, 653, 81, 82, -100, 38, 39, -99, -68, 597, -446, 344, 343, -95, 205, 206, 618, -446, 652, -97, 581, 575, 582, -94, 205, 206, -96, 575, 36, 609, 608, 30, -92, 575, 52, 652, 108, 54, 770, 32, -84, 609, 608, 40, 101, -79, -92, 268, 752, 100, 195, 18, -100, -99, 551, -84, 79, 73, 75, 76, 77, 78, 101, -95, 574, 74, 80, 100, 272, -98, 63, 64, 65, 56, 51, - +97, 53, 653, 57, 58, 196, 37, 83, 61, 272, 59, 60, 62, 23, 24, +66, 67, 454, - +534, 205, 206, 197, 22, 28, 27, 90, 89, 91, 92, 308, 101, 17, 574, +-84, -91, 100, 652, -90, 41, 308, 596, 94, 93, -86, 84, 50, 86, 85, 87, -88, 88, 95, 96, -85, 81, 82, -87, 38, 39, 101, 101, -535, 574, 900, 100, 100, 101, -100, 574, -449, -84, 100, 101, 198, 574, 649, -449, 100, -96, -84, 210, 246, -98, 214, 215, -92, 52, -92, -91, 54, -92, -100, -99, -100, -99, 40, -100, -99, -94, -89, 273, 607, -95, 18, -95, 299, 726, -95, 79, 73, 75, 76, 77, 78, -97, -90, -97, 74, 80, -97, -86, 726, 63, 64, 65, 56, 51, - +88, 53, 544, 57, 58, 546, 37, 83, 61, 531, 59, 60, 62, 23, 24, +66, 67, 205, 206, 653, 205, 206, 22, 28, 27, 90, 89, 91, 92, -91, -534, 219, 777, 300, - +535, 609, 608, 605, 41, 268, 227, 94, 93, 308, 84, 50, 86, 85, 87, +388, 88, 95, 96, 652, 81, 82, -90, 38, 39, -99, 272, -86, 726, 301, 302, -96, -91, -96, -88, -98, -96, -98, 224, 810, -98, -91, 226, 225, -87, 101, 210, 725, -93, 214, 100, -94, 52, -94, -85, 54, -94, 391, -89, -90, 101, 40, 725, 788, -86, 100, 402, 101, -90, 218, 415, -88, 100, -86, 79, 73, 75, 76, 77, 78, - +88, 453, 101, 74, 80, 455, 204, 100, 63, 64, 65, 56, 51, 607, 53, +544, 57, 58, 546, 37, 83, 61, 789, 59, 60, 62, 258, 259, 66, 67, +876, -534, -87, -95, 877, 257, 28, 27, 90, 89, 91, 92, -85, 456, 219, -535, -89, -91, 101, 607, 725, 41, 607, 100, 94, 93, -100, 84, 50, 86, 85, 87, 261, 88, 95, 96, -456, 81, 82, -87, 38, 39, -97, -456, 609, 608, 610, 101, -87, -85, -93, 215, 100, -89, -94, 487, 264, 265, -85, 754, -455, -454, -89, 210, 266, 489, 214, -455, -454, 52, 751, 813, 54, 582, 256, 491, 254, 497, 40, - +67, 609, 608, 614, 609, 608, 620, 218, 400, 401, 203, 201, 79, 73, 75, +76, 77, 78, 202, 514, 544, 74, 80, 546, 344, 343, 63, 64, 65, 56, +51, 101, 53, -451, 57, 58, 100, 37, 83, 61, -451, 59, 60, 62, 258, 259, 66, 67, 515, -532, 527, 528, 516, 257, 28, 27, 90, 89, 91, 92, 101, 752, 219, -331, -331, 100, 199, 625, 200, 41, 525, - +331, 94, 93, 277, 84, 50, 86, 85, 87, 261, 88, 95, 96, 308, 81, +82, 268, 38, 39, 532, 227, 231, 236, 237, 238, 233, 235, 243, 244, 239, +240, -449, -449, 220, 221, -452, 101, 241, 242, -449, 210, 100, -452, 214, -532, 533, 52, 227, -331, 54, - +331, 256, 224, 254, 230, 40, 226, 225, 222, 223, 234, 232, 228, 218, 229, +-532, 203, 449, 79, 73, 75, 76, 77, 78, 450, 308, -458, 74, 80, 547, 245, 548, 63, 64, 65, 56, 51, -449, 53, - +449, 57, 58, 491, 37, 83, 61, 555, 59, 60, 62, 258, 259, 66, 67, +103, 104, 105, 106, 107, 257, 28, 27, 90, 89, 91, 92, -453, -84, 219, 524, 521, 531, 452, -453, 451, 41, - +92, 522, 94, 93, 558, 84, 50, 86, 85, 87, 261, 88, 95, 96, 559, +81, 82, 561, 38, 39, 570, 227, 231, 236, 237, 238, 233, 235, 243, 244, +239, 240, 524, 534, 220, 221, -90, 412, 241, 242, 535, 210, 414, 413, 214, - +99, 571, 52, 404, 520, 54, 523, 256, 224, 254, 230, 40, 226, 225, 222, +223, 234, 232, 228, 218, 229, 587, 524, 584, 79, 73, 75, 76, 77, 78, +585, 588, 630, 74, 80, 589, 245, 650, -255, -255, -255, 56, -255, 452, 53, 451, -255, -255, 613, 37, 83, -255, 617, -255, -255, -255, -255, -255, -255, -255, 103, 104, 105, 106, 107, -255, -255, -255, -255, -255, -255, -255, 621, -86, -255, 524, 593, 624, 583, 625, 586, -255, -95, 591, -255, -255, 627, -255, -255, -255, -255, -255, -255, -255, -255, -255, -263, -255, -255, 628, -255, -255, 629, 227, 231, 236, 237, 238, 233, 235, 243, 244, 239, 240, -284, -284, 220, 221, 205, 206, 241, 242, -284, -255, 268, 631, -255, 268, 227, -255, 227, 592, -255, 523, -255, 224, -255, 230, -255, 226, 225, 222, 223, 234, 232, 228, -255, 229, 344, 343, 602, -255, -255, -255, -255, -255, -255, 603, 832, 813, -255, -255, 776, 245, 227, -233, -88, 227, -255, 915, -284, -255, -284, 308, 754, -97, -255, - +255, 63, 64, 65, 8, 51, 344, 343, 751, 57, 58, 832, 813, 670, 61, +671, 59, 60, 62, 23, 24, 66, 67, 679, 681, -79, -85, 682, 22, 28, 27, 90, 89, 91, 92, - +94, 684, 17, 537, 341, 340, 344, 343, 7, 41, 227, 9, 94, 93, 694, +84, 50, 86, 85, 87, 700, 88, 95, 96, 701, 81, 82, 702, 38, 39, +706, 227, 231, 236, 237, 238, 233, 235, 243, 244, 239, 240, 224, 752, 220, +221, 226, 225, 241, 242, 716, 36, 718, 721, 281, 582, 729, 52, 772, - +264, 54, 497, 32, 224, 497, 230, 40, 226, 225, 222, 223, 234, 232, 228, +18, 229, 497, 524, 593, 79, 73, 75, 76, 77, 78, 822, 791, 792, 74, +80, 489, 245, 491, 63, 64, 65, 56, 51, 800, 53, 802, 57, 58, 803, +37, 83, 61, 694, 59, 60, 62, 258, 259, 66, 67, 708, 807, 268, 268, +808, 257, 291, 295, 90, 89, 91, 92, 268, 227, 219, -286, -286, 227, 592, 813, 523, 292, 819, - +286, 94, 93, 820, 84, 50, 86, 85, 87, 558, 88, 95, 96, 561, 81, +82, 823, 327, 824, 336, 334, 333, 561, 335, 341, 340, 344, 343, 827, 866, +867, -283, -283, 868, 95, 96, 813, 836, 837, -283, 289, 839, 840, 286, -535, -534, 52, 842, -286, 54, -286, 285, 850, 852, 855, 856, 338, 858, 915, 860, 862, 864, - +265, 754, 341, 340, 344, 343, 79, 73, 75, 76, 77, 78, 751, 794, 878, +74, 80, 879, 880, 881, 63, 64, 65, 56, 51, -283, 53, - +283, 57, 58, 883, 296, 83, 61, 884, 59, 60, 62, 258, 259, 66, 67, +708, 341, 340, 344, 343, 257, 291, 295, 90, 89, 91, 92, 524, 946, 219, +103, 104, 105, 106, 107, 947, 292, 227, 694, 94, 93, 886, 84, 50, 86, +85, 87, - +263, 88, 95, 96, 890, 81, 82, 764, 752, 336, 334, 333, 754, 335, 895, +341, 340, 344, 343, 897, 903, 905, 224, 751, 906, 308, 226, 225, 222, 223, +919, 289, -266, 921, 214, - +535, 945, 52, 586, 563, 54, 336, 334, 333, 561, 335, 338, 749, 931, 932, +937, 855, 939, 860, 341, 340, 344, 343, 860, 79, 73, 75, 76, 77, 78, +862, 948, 954, 74, 80, 700, 964, 860, 298, 966, 967, 56, nil, nil, 53, +nil, nil, nil, nil, 296, 83, 63, 64, 65, 227, 51, nil, nil, 752, 57, +58, nil, nil, nil, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, +nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, 224, 219, nil, nil, +226, 225, 222, 223, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, +nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, 227, 231, 236, 237, +238, 233, 235, 243, 244, 239, 240, nil, nil, 220, 221, nil, nil, 241, 242, +nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, 224, nil, +230, 40, 226, 225, 222, 223, 234, 232, 228, 218, 229, nil, nil, nil, 79, +73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, 245, nil, 63, 64, +65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, +62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, +91, 92, nil, 563, 219, 336, 334, 333, nil, 335, nil, 41, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, 227, 231, 236, 237, 238, 233, 235, 243, 244, 239, 240, nil, +nil, 220, 221, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, nil, 52, +nil, nil, 54, nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, 234, 232, +228, 218, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, +74, 80, nil, 245, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, +nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, +nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, +88, 95, 96, nil, 81, 82, nil, 38, 39, nil, 227, 231, 236, 237, 238, +233, 235, 243, 244, 239, 240, nil, nil, 220, 221, nil, nil, 241, 242, nil, +210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, 224, nil, 230, +40, 226, 225, 222, 223, 234, 232, 228, 218, 229, nil, nil, nil, 79, 73, +75, 76, 77, 78, nil, nil, nil, 74, 80, nil, 245, nil, 63, 64, 65, +56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, +23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, +92, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, +nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, +39, nil, 227, 231, 236, 237, 238, 233, 235, 243, 244, 239, 240, nil, nil, +220, 221, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, nil, 52, nil, +nil, 54, nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, 234, 232, 228, +18, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, +80, nil, 245, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, +37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, +nil, 257, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, 261, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, 227, 231, 236, 237, 238, 233, +235, 243, 244, 239, 240, nil, nil, 220, 221, nil, nil, 241, 242, nil, 210, +nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, 256, 224, nil, 230, 40, +226, 225, 222, 223, 234, 232, 228, 218, 229, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, 245, nil, 63, 64, 65, 56, +51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, +259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, +nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, +84, 50, 86, 85, 87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, +nil, 227, 231, 236, 237, 238, 233, 235, 243, 244, 239, 240, nil, nil, 220, +221, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, +54, nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, 234, 232, 228, 218, +229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, 245, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, +83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, +22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, 227, 231, 236, 237, 238, 233, 235, +243, 244, 239, 240, nil, nil, 220, 221, nil, nil, 241, 242, nil, 210, nil, +nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, 224, nil, 230, 40, 226, +225, 222, 223, 234, 232, 228, 18, 229, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, 245, nil, 63, 64, 65, 56, 51, +nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, +66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, +nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, +50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +227, 231, 236, 237, 238, 233, 235, 243, 244, 239, 240, nil, nil, 220, 221, +nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, +nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, 234, 232, 228, 18, 229, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +245, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, +61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, +28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, nil, +41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, 227, 231, 236, 237, 238, 233, 235, 243, +244, 239, 240, nil, nil, 220, 221, nil, nil, 241, 242, nil, 210, nil, nil, +214, nil, nil, 52, nil, nil, 54, nil, nil, 224, nil, 230, 40, 226, 225, +222, 223, 234, 232, 228, 18, 229, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, 101, 245, nil, - +233, nil, 100, 56, nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, +65, nil, 51, nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, +62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, +91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 292, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, 227, +231, 236, 237, 238, 233, 235, 243, 244, 239, 240, 227, nil, 220, 221, nil, +nil, 241, 242, nil, nil, nil, nil, nil, 356, nil, nil, 30, 241, 242, 52, +nil, 224, 54, 230, 32, 226, 225, 222, 223, 234, 232, 228, 224, 229, 230, +nil, 226, 225, 222, 223, nil, 79, 73, 75, 76, 77, 78, nil, nil, 245, +74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, +nil, 296, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, +nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, +nil, nil, nil, 292, nil, nil, 94, 93, nil, 84, 50, 86, 85, 361, nil, +88, 95, 96, nil, 81, 82, 227, 231, 236, 237, 238, 233, 235, 243, 244, +239, 240, 227, nil, 220, 221, nil, nil, 241, 242, nil, nil, 367, nil, nil, +362, nil, nil, 214, 241, 242, 52, nil, 224, 54, 230, nil, 226, 225, 222, +223, 234, 232, 228, 224, 229, 230, nil, 226, 225, 222, 223, nil, 79, 73, +75, 76, 77, 78, nil, nil, 245, 74, 80, nil, nil, nil, -531, -531, -531, 56, -531, nil, 53, nil, -531, -531, nil, 296, 83, -531, nil, -531, -531, -531, -531, -531, -531, -531, nil, -531, nil, nil, nil, -531, -531, -531, -531, -531, -531, -531, nil, nil, -531, nil, nil, nil, nil, nil, nil, -531, nil, nil, -531, -531, nil, -531, -531, -531, -531, -531, -531, -531, -531, -531, nil, -531, -531, nil, -531, - +531, nil, 227, 231, 236, 237, 238, 233, 235, 243, 244, 239, 240, nil, nil, +220, 221, nil, nil, 241, 242, nil, -531, nil, nil, -531, -531, nil, -531, nil, nil, -531, nil, -531, 224, -531, 230, -531, 226, 225, 222, 223, 234, 232, 228, -531, 229, -531, nil, nil, -531, -531, -531, -531, -531, -531, nil, nil, nil, -531, -531, nil, 245, nil, -532, -532, -532, -531, -532, nil, -531, nil, -532, -532, nil, -531, -531, -532, nil, -532, -532, -532, -532, -532, -532, -532, nil, -532, nil, nil, nil, -532, -532, -532, -532, -532, -532, -532, nil, nil, -532, nil, nil, nil, nil, nil, nil, -532, nil, nil, -532, -532, nil, -532, -532, -532, -532, -532, -532, -532, -532, -532, nil, -532, -532, nil, -532, - +532, nil, 227, 231, 236, 237, 238, 233, 235, 243, 244, 239, 240, nil, nil, +220, 221, nil, nil, 241, 242, nil, -532, nil, nil, -532, -532, nil, -532, nil, nil, -532, nil, -532, 224, -532, 230, -532, 226, 225, 222, 223, 234, 232, 228, -532, 229, -532, nil, nil, -532, -532, -532, -532, -532, -532, nil, nil, nil, -532, -532, nil, 245, nil, nil, nil, nil, -532, nil, nil, -532, nil, nil, nil, nil, -532, - +532, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, nil, nil, 61, +nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, +27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, 7, 41, +6, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, +81, 82, nil, 38, 39, nil, 227, 231, 236, 237, 238, 233, 235, 243, 244, +239, 240, nil, nil, 220, 221, nil, nil, 241, 242, nil, 36, nil, nil, 30, +nil, nil, 52, nil, nil, 54, nil, 32, 224, nil, 230, 40, 226, 225, 222, +223, 234, 232, 228, 18, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, +nil, nil, nil, 74, 80, nil, 245, nil, nil, nil, 404, 56, nil, nil, 53, +nil, nil, nil, nil, 37, 83, 63, 64, 65, nil, 51, nil, nil, nil, 57, +58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, +nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, 563, 17, 336, 334, +333, nil, 335, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, +nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, 563, nil, 336, 334, 333, +nil, 335, nil, nil, 563, 566, 336, 334, 333, nil, 335, nil, nil, 569, nil, +nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, 566, nil, nil, nil, nil, 18, nil, nil, 569, 566, 79, +73, 75, 76, 77, 78, nil, 829, nil, 74, 80, nil, nil, nil, 63, 64, +65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, +62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, +91, 92, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, 227, 231, 236, 237, 238, 233, 235, 243, 244, 239, 240, nil, +nil, -555, - +555, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, +54, nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, 234, 232, 228, 18, +229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, +83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, +22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, 227, 231, 236, 237, 238, 233, 235, +243, 244, 239, 240, nil, nil, -555, - +555, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, +54, nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, 234, 232, 228, 18, +229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, +83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, +22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, 227, -555, -555, -555, -555, 233, 235, nil, nil, -555, - +555, nil, nil, nil, nil, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, +234, 232, 228, 18, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, +nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, +nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, +nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, +nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, +88, 95, 96, nil, 81, 82, nil, 38, 39, nil, 227, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 241, 242, nil, +36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, 224, nil, 230, +40, 226, 225, 222, 223, nil, nil, 228, 18, 229, nil, nil, nil, 79, 73, +75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, +56, nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, +nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, +66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, +nil, 17, nil, nil, nil, nil, nil, 7, 41, 6, 9, 94, 93, nil, 84, +50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +227, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 241, 242, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, +nil, 32, 224, nil, 230, 40, 226, 225, 222, 223, nil, nil, 228, 18, 229, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, 37, 83, +63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, +59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, +90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, +9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, +82, nil, 38, 39, nil, 227, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 241, 242, nil, 36, nil, nil, 30, nil, +nil, 52, nil, nil, 54, nil, 32, 224, nil, 230, 40, 226, 225, 222, 223, +nil, nil, 228, 18, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, 227, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 241, +242, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, 421, 224, +nil, 230, 40, 226, 225, 222, 223, nil, nil, 228, 218, 229, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, +89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, 227, -555, -555, -555, -555, 233, 235, nil, nil, -555, - +555, nil, nil, nil, nil, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, 421, 224, nil, 230, 40, 226, 225, 222, 223, +234, 232, 228, 218, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, 227, -555, -555, -555, -555, 233, 235, nil, nil, -555, - +555, nil, nil, nil, nil, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, +234, 232, 228, 218, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, +nil, nil, nil, nil, 257, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, 227, -555, -555, -555, -555, 233, 235, nil, nil, -555, - +555, nil, nil, nil, nil, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, 256, 224, nil, 230, 40, 226, 225, 222, 223, +234, 232, 228, 218, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, +nil, nil, nil, nil, 257, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, 227, -555, -555, -555, -555, 233, 235, nil, nil, -555, - +555, nil, nil, nil, nil, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, 256, 224, nil, 230, 40, 226, 225, 222, 223, +234, 232, 228, 218, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, 227, -555, -555, -555, -555, 233, 235, nil, nil, -555, - +555, nil, nil, nil, nil, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, +234, 232, 228, 218, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, 227, 231, 236, +237, 238, 233, 235, nil, nil, 239, 240, nil, nil, nil, nil, nil, nil, 241, +242, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, 224, +nil, 230, 40, 226, 225, 222, 223, 234, 232, 228, 18, 229, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, +89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, 227, 231, 236, 237, 238, 233, 235, 243, nil, 239, 240, +nil, nil, nil, nil, nil, nil, 241, 242, nil, 210, nil, nil, 214, nil, nil, +52, nil, nil, 54, nil, nil, 224, nil, 230, 40, 226, 225, 222, 223, 234, +232, 228, 18, 229, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, +nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, +nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, +nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, +nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, 227, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 241, 242, nil, 36, +nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, 224, nil, nil, 40, +226, 225, 222, 223, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, +51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 23, +24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, +nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, +84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, 458, 52, nil, nil, +54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, +nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, +83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, +257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, +nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, +nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, +66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, +nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, +50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, +nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, +61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, +291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, +41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, +214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, +53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, +67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, +219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, +86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, +nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, +nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, +nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, +295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, +81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, +nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, +nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, +nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, +nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, +85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, +nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, +63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, +59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, +90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, +82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, +nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, +89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, +52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, +58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, +nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, +nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, +73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, +65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, +62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, +91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, +74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, +nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, +nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, +88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, +75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, +56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, +258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, +92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, +nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, +39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, +80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, +37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, +nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, +nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, +51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, +259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, +nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, +84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, +54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, +nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, +83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, +257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, +nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, +nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, +66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, +nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, +50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, +nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, +61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, +291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, +41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, +214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, +53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, +67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, +219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, +86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, +nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, +nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, +nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, +295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, +81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, +nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, +nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, +nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, +nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, +85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, +nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, +63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, +59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, +90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, +82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, +nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, +89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, +52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, +58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, +nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, +nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, +73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, +65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, +62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, +91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, +74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, +nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, +nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, +88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, +75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, +56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, +258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, +92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, +nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, +39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, +80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, +37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, +nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, +nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, +51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, +259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, +nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, +84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, +54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, +nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, +83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, +257, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, 261, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, +nil, 214, nil, nil, 52, nil, nil, 54, nil, 256, nil, 254, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, +nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, +66, 67, nil, nil, nil, nil, nil, 257, 28, 27, 90, 89, 91, 92, nil, +nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, +50, 86, 85, 87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 506, nil, nil, 54, +nil, 256, nil, 254, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, +61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, +28, 27, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, +41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, 261, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, +214, nil, 510, 52, nil, nil, 54, nil, 256, nil, 254, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, +53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, +57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, +nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 36, nil, nil, 281, nil, nil, 52, nil, nil, 54, nil, 32, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, +89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 292, nil, nil, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +764, nil, 336, 334, 333, 754, 335, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 751, nil, nil, nil, nil, nil, nil, nil, 289, nil, nil, 214, nil, nil, +52, nil, nil, 54, nil, nil, nil, nil, nil, 338, nil, nil, nil, nil, nil, +nil, nil, 341, 340, 344, 343, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, 518, nil, nil, 56, nil, nil, 53, nil, nil, +nil, nil, 296, 83, 63, 64, 65, 8, 51, nil, nil, 752, 57, 58, nil, +nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, +nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, +nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, +nil, nil, 281, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, +51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, +259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, +nil, nil, 219, nil, nil, nil, nil, nil, nil, 292, nil, nil, 94, 93, nil, +84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, 327, nil, 336, +334, 333, nil, 335, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 289, nil, nil, 286, nil, nil, 52, nil, nil, +54, nil, nil, nil, nil, nil, 338, 322, nil, nil, nil, nil, nil, nil, 341, +340, 344, 343, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 296, +83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, +257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, +nil, 214, 537, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, +nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, +nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, +nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, +nil, nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, +85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, +nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, +63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, +59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, +90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, +82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, +89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 292, nil, nil, +94, 93, nil, 84, 50, 86, 85, 361, nil, 88, 95, 96, nil, 81, 82, +327, nil, 336, 334, 333, nil, 335, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 362, nil, nil, 214, nil, nil, +52, nil, nil, 54, nil, nil, nil, nil, nil, 338, nil, 554, nil, nil, nil, +nil, nil, 341, 340, 344, 343, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, +58, nil, 296, 83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, +nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, +nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, +73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, +65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, +62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, +91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, +74, 80, nil, nil, nil, -255, -255, -255, 56, -255, nil, 53, nil, -255, -255, nil, 37, 83, -255, nil, -255, -255, -255, -255, -255, -255, -255, nil, nil, nil, nil, nil, -255, -255, -255, -255, -255, -255, -255, nil, nil, -255, nil, nil, nil, nil, nil, nil, -255, nil, nil, -255, -255, nil, -255, -255, -255, -255, -255, -255, -255, -255, -255, nil, -255, -255, nil, -255, - +255, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, -255, nil, nil, -255, 268, nil, -255, nil, nil, -255, nil, -255, nil, -255, nil, -255, nil, nil, nil, nil, nil, nil, nil, -255, nil, nil, nil, nil, -255, -255, -255, -255, -255, -255, nil, nil, nil, -255, -255, nil, nil, nil, -536, -536, -536, -255, -536, nil, -255, nil, -536, -536, nil, -255, -255, -536, nil, -536, -536, -536, -536, -536, -536, -536, nil, nil, nil, nil, nil, -536, -536, -536, -536, -536, -536, -536, nil, nil, -536, nil, nil, nil, nil, nil, nil, -536, nil, nil, -536, -536, nil, -536, -536, -536, -536, -536, -536, -536, -536, -536, nil, -536, -536, nil, -536, - +536, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, -536, nil, nil, -536, -536, nil, -536, nil, nil, -536, nil, -536, nil, -536, nil, -536, nil, nil, nil, nil, nil, nil, nil, -536, nil, nil, nil, nil, -536, -536, -536, -536, -536, -536, nil, nil, nil, -536, -536, nil, nil, nil, -537, -537, -537, -536, -537, nil, -536, nil, -537, -537, nil, -536, -536, -537, nil, -537, -537, -537, -537, -537, -537, -537, nil, nil, nil, nil, nil, -537, -537, -537, -537, -537, -537, -537, nil, nil, -537, nil, nil, nil, nil, nil, nil, -537, nil, nil, -537, -537, nil, -537, -537, -537, -537, -537, -537, -537, -537, -537, nil, -537, -537, nil, -537, - +537, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, -537, nil, nil, -537, -537, nil, -537, nil, nil, -537, nil, -537, nil, -537, nil, -537, nil, nil, nil, nil, nil, nil, nil, -537, nil, nil, nil, nil, -537, -537, -537, -537, -537, -537, nil, nil, nil, -537, -537, nil, nil, nil, -255, -255, -255, -537, -255, nil, -537, nil, -255, -255, nil, -537, -537, -255, nil, -255, -255, -255, -255, -255, -255, -255, nil, nil, nil, nil, nil, -255, -255, -255, -255, -255, -255, -255, nil, nil, -255, nil, nil, nil, nil, nil, nil, -255, nil, nil, -255, -255, nil, -255, -255, -255, -255, -255, -255, -255, -255, -255, nil, -255, -255, nil, -255, - +255, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, -255, nil, nil, -255, 268, nil, -255, nil, nil, -255, nil, -255, nil, -255, nil, -255, nil, nil, nil, nil, nil, nil, nil, -255, nil, nil, nil, nil, -255, -255, -255, -255, -255, -255, nil, nil, nil, -255, -255, nil, nil, nil, 63, 64, 65, -255, 51, nil, -255, nil, 57, 58, nil, -255, - +255, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, +257, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, 261, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, +nil, 214, nil, nil, 52, nil, nil, 54, nil, 256, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, +nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, +66, 67, nil, nil, nil, nil, nil, 257, 28, 27, 90, 89, 91, 92, nil, +nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, +50, 86, 85, 87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, +nil, 256, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, +61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, +291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, +41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, +214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, +53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, +67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, +219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, +86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, +nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, +nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, +nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, +295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, +81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, +nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, +nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, +nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, +nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, +85, 87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, 658, +nil, 254, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, +nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, +63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, +59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, +90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 94, 93, nil, 84, 50, 86, 85, 87, 261, 88, 95, 96, nil, 81, +82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, nil, nil, 254, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, +nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, +89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, 675, +52, nil, nil, 54, nil, nil, nil, 254, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, +nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, +nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, +nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, +nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, +nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, 404, 56, +nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, 65, nil, 51, nil, +nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 258, 259, 66, +67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, +219, nil, nil, nil, nil, nil, nil, 292, nil, nil, 94, 93, nil, 84, 50, +86, 85, 87, nil, 88, 95, 96, nil, 81, 82, 327, nil, 336, 334, 333, +nil, 335, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 289, nil, nil, 286, nil, nil, 52, nil, nil, 54, nil, +nil, nil, nil, nil, 338, nil, nil, nil, nil, nil, nil, nil, 341, 340, 344, +343, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, +nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 296, 83, 61, +nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 28, +27, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, 261, 88, 95, 96, nil, +81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, +nil, nil, 52, nil, nil, 54, nil, 256, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, +nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, +nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, +nil, nil, nil, nil, nil, 257, 28, 27, 90, 89, 91, 92, nil, nil, 219, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, +85, 87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, 256, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, +nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, +63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, +59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, +90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, +82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, +nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, +89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, +52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, +58, nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, +nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, +nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, +73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, +65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, +62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, +91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, 261, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, +nil, nil, 54, nil, 658, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, +74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, +nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, +nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, 261, +88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, +75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, +56, nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, +nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, +66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, +nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, +50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, +nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, 37, 83, +63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, +59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, +90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, +9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, +82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, +nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, +57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, +nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, +nil, nil, nil, nil, nil, 292, nil, nil, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, 764, nil, 336, 334, 333, 754, 335, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 751, nil, nil, nil, nil, nil, +nil, nil, 712, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, +nil, nil, 338, nil, nil, nil, nil, nil, nil, nil, 341, 340, 344, 343, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, +nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, 296, 83, 63, 64, 65, +8, 51, nil, nil, 752, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, +23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, +92, nil, nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, +nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, +39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, +nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, +80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, +37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, nil, nil, +61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, +28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, 7, +41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, +30, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, +53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, +57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, +nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 28, 27, 90, +89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, +94, 93, nil, 84, 50, 86, 85, 87, 261, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, +52, nil, nil, 54, nil, 256, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, +58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, +nil, nil, nil, 257, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, +261, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, 256, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, +73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, +65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, +62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 28, 27, 90, 89, +91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, 261, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, +nil, nil, 54, nil, 256, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, +74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, +nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, +nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, +88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, +75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, +56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, +23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, +92, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, +nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, +39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, +80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, +37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, +nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, +nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, +51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, +259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, +nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, +84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, +54, nil, 775, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, +nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, +83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, +22, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, +nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, +nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, +66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, +nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, +50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, +nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, +61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, +28, 27, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, +41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, +214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, +53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, +67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, +219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, +86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, +nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, +nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, +nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, +295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, +81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, +nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, +nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, +nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, +58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, +nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, +nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, +nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, +73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, +65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, +62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, +91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, +74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, nil, +nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, nil, +nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, +22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, +7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, +nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, +nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, +66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, +nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, +50, 86, 85, 87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, +nil, 658, nil, 254, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, +61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, +291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, +41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, 261, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, +214, nil, nil, 52, nil, nil, 54, nil, nil, nil, 254, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, +53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, +57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, +nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, +nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, 65, +8, 51, nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, +23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, +92, nil, nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, +nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, +39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, +nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, +80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, +37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, +nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, +nil, nil, 292, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 289, +nil, nil, 286, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, +51, nil, 53, nil, 57, 58, nil, 296, 83, 61, nil, 59, 60, 62, 258, +259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, +nil, nil, 219, nil, nil, nil, nil, nil, nil, 292, nil, nil, 94, 93, nil, +84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 289, nil, nil, 286, nil, nil, 52, nil, nil, +54, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 296, +83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, +257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, +nil, 214, nil, nil, 52, nil, nil, 54, nil, 421, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, +nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, +66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, +nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, +50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, +nil, 256, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, +61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, +28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, nil, +41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, +214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, +53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, +57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, +nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, +nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, 65, +8, 51, nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, +23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, +92, nil, nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, +nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, +39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, +nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, +80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, +37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, nil, nil, +61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, +28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, 7, +41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, +30, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, +53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, +67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, +219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, +86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, +nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, +nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, +64, 65, 8, 51, nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, +60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, +89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, 9, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, +52, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, +58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, +nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, +nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, +nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, +nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, +73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, +65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, +62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, +91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, +93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, +nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, +74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, +nil, 37, 83, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, +nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, +nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, +88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, +75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, +56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, +258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, +92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, +nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, +39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, +nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, +80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, +37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, +nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, +nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, +nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, +51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, +259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, +nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, +84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, +54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, +nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, +nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, +83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, +257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, +nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, +96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, +nil, 214, nil, nil, 52, nil, nil, 54, nil, 256, nil, nil, nil, 40, nil, +nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, +77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, +nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, +nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, +nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, +nil, nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, +85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, +nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, +63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, +59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, +90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, nil, 41, nil, +nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, +82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, +nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, nil, +nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, +nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, +nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, +nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, +nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, +nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, +88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, +40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, +75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, +56, nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, +nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, +66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, +nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, +50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, +nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, +nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, +nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, +61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, +291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, +41, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, +214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, +53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, +67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, +219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, +86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, +nil, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, +nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, +nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, +nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, +295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, +nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, +81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, +nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, 40, nil, nil, nil, +nil, nil, nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, +nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, +nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, +nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, +nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, 84, 50, 86, +85, 87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, +nil, 254, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, nil, +nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, +nil, nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, +65, 8, 51, nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, +62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, +91, 92, nil, nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, 9, 94, +93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, +38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, +nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, +nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, +74, 80, nil, nil, nil, 63, 64, 65, 56, 51, nil, 53, nil, 57, 58, +nil, 37, 83, 61, nil, 59, 60, 62, 258, 259, 66, 67, nil, nil, nil, +nil, nil, 257, 291, 295, 90, 89, 91, 92, nil, nil, 219, nil, nil, nil, +nil, nil, nil, 292, nil, nil, 94, 93, nil, 84, 50, 86, 85, 87, nil, +88, 95, 96, nil, 81, 82, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +926, nil, nil, 214, nil, nil, 52, nil, nil, 54, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 79, 73, +75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, +56, 51, nil, 53, nil, 57, 58, nil, 296, 83, 61, nil, 59, 60, 62, +258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, 89, 91, +92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, +nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, +39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, +nil, 54, nil, 658, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, +218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, +80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, +37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, nil, nil, +61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, +28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, 7, +41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, +nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, +30, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, +nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, +78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, +53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, +57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, +nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, +nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, +87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, +nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, +79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, +64, 65, 56, 51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, +60, 62, 258, 259, 66, 67, nil, nil, nil, nil, nil, 257, 291, 295, 90, +89, 91, 92, nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, +52, nil, nil, 54, nil, 658, nil, 254, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 218, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, +nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, +nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, +nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, +nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, +nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, +nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, +nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, +67, nil, nil, nil, nil, nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, +17, nil, nil, nil, nil, nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, +86, 85, 87, nil, 88, 95, 96, nil, 81, 82, nil, 38, 39, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, +32, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, +nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, nil, 74, 80, nil, nil, +nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, nil, nil, 37, 83, 63, +64, 65, 8, 51, nil, nil, nil, 57, 58, nil, nil, nil, 61, nil, 59, +60, 62, 23, 24, 66, 67, nil, nil, nil, nil, nil, 22, 28, 27, 90, +89, 91, 92, nil, nil, 17, nil, nil, nil, nil, nil, 7, 41, nil, 9, +94, 93, nil, 84, 50, 86, 85, 87, nil, 88, 95, 96, nil, 81, 82, +nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 30, nil, nil, +52, nil, nil, 54, nil, 32, nil, nil, nil, 40, nil, nil, nil, nil, nil, +nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, 76, 77, 78, nil, nil, +nil, 74, 80, nil, nil, nil, nil, nil, nil, 56, nil, nil, 53, nil, nil, +nil, nil, 37, 83, 63, 64, 65, 8, 51, nil, nil, nil, 57, 58, nil, +nil, nil, 61, nil, 59, 60, 62, 23, 24, 66, 67, nil, nil, nil, nil, +nil, 22, 28, 27, 90, 89, 91, 92, nil, nil, 17, nil, nil, nil, nil, +nil, 7, 41, nil, 9, 94, 93, nil, 84, 50, 86, 85, 87, nil, 88, +95, 96, nil, 81, 82, nil, 38, 39, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, +nil, nil, 30, nil, nil, 52, nil, nil, 54, nil, 32, nil, nil, nil, 40, +nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, 79, 73, 75, +76, 77, 78, nil, nil, nil, 74, 80, nil, nil, nil, 63, 64, 65, 56, +51, nil, 53, nil, 57, 58, nil, 37, 83, 61, nil, 59, 60, 62, 258, +259, 66, 67, nil, nil, nil, nil, nil, 257, 28, 27, 90, 89, 91, 92, +nil, nil, 219, nil, nil, nil, nil, nil, nil, 41, nil, nil, 94, 93, nil, +84, 50, 86, 85, 87, 261, 88, 95, 96, nil, 81, 82, nil, 38, 39, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 210, nil, nil, 214, nil, nil, 52, nil, nil, +54, nil, 256, nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, 218, +nil, nil, nil, -538, 79, 73, 75, 76, 77, 78, -538, -538, -538, 74, 80, nil, -538, -538, nil, -538, nil, 56, nil, nil, 53, nil, nil, nil, -538, 37, 83, nil, nil, nil, nil, nil, nil, nil, nil, -538, -538, nil, -538, -538, -538, -538, - +538, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -283, nil, -538, -538, -538, nil, 636, -283, -283, -283, -538, nil, nil, -283, -283, nil, -283, -538, nil, -538, nil, -538, -538, -538, -538, -538, -538, -538, nil, -538, -538, -538, nil, nil, nil, nil, -283, -283, nil, -283, -283, -283, -283, -283, -538, -538, nil, -87, nil, -538, nil, nil, -538, nil, -538, nil, -96, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, nil, nil, -283, -283, -283, nil, 639, nil, nil, nil, -283, nil, nil, nil, nil, nil, nil, -283, nil, -283, nil, -283, -283, -283, -283, -283, -283, -283, nil, -283, nil, -283, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -283, -283, nil, -89, nil, -283, -538, nil, -283, nil, -283, nil, -98, -538, -538, -538, nil, nil, -538, -538, -538, nil, -538, nil, nil, nil, nil, nil, nil, nil, nil, -538, -538, -538, nil, nil, nil, nil, nil, nil, nil, nil, -538, -538, nil, -538, -538, -538, -538, - +538, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, -538, nil, nil, -538, -538, -538, nil, 790, -538, nil, nil, -538, nil, nil, -538, nil, -538, nil, -538, nil, -538, nil, -538, -538, -538, -538, -538, -538, -538, nil, -538, -538, -538, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -538, -538, -538, -538, nil, -538, -283, nil, -538, nil, -538, nil, -96, -283, -283, -283, nil, nil, -283, -283, -283, nil, -283, nil, nil, nil, nil, nil, nil, nil, nil, nil, -283, -283, nil, nil, nil, nil, nil, nil, nil, nil, -283, -283, nil, -283, -283, -283, -283, - +283, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, -283, nil, nil, -283, -283, -283, nil, 639, -283, nil, nil, -283, nil, nil, -283, nil, -283, nil, -283, nil, -283, nil, -283, -283, -283, -283, -283, -283, -283, nil, -283, nil, -283, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -283, -283, -283, -283, nil, -283, -292, nil, -283, nil, -283, nil, -98, -292, -292, -292, nil, nil, -292, -292, -292, nil, -292, nil, nil, nil, nil, nil, nil, nil, nil, nil, -292, -292, nil, nil, nil, nil, nil, nil, nil, nil, -292, -292, nil, -292, -292, -292, -292, - +292, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, -292, nil, nil, -292, -292, -292, nil, nil, -292, nil, 277, -292, nil, nil, -292, nil, -292, nil, -292, nil, -292, nil, -292, -292, -292, -292, -292, -292, -292, nil, -292, nil, -292, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -292, -292, -292, -292, -278, -292, nil, nil, -292, nil, -292, -278, -278, -278, nil, nil, -278, -278, -278, nil, -278, nil, nil, nil, nil, nil, nil, nil, nil, nil, -278, -278, -278, nil, nil, nil, nil, nil, nil, nil, -278, -278, nil, -278, -278, -278, -278, - +278, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, -278, nil, nil, -278, -278, -278, nil, nil, -278, nil, nil, -278, nil, nil, -278, nil, -278, nil, -278, nil, -278, nil, -278, -278, -278, -278, -278, -278, -278, nil, -278, nil, -278, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -278, -278, -278, -278, -554, -278, nil, -278, -278, nil, -278, -554, -554, -554, nil, nil, -554, -554, -554, nil, -554, nil, nil, nil, nil, nil, nil, nil, nil, nil, -554, nil, nil, nil, nil, nil, nil, nil, nil, nil, -554, -554, nil, -554, -554, -554, -554, -554, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -554, nil, nil, nil, nil, nil, nil, -554, -554, -554, nil, nil, -554, -554, -554, nil, -554, nil, nil, nil, nil, -554, -554, nil, nil, nil, -554, nil, nil, -554, nil, nil, nil, nil, 268, -554, -554, -554, nil, -554, -554, -554, -554, -554, nil, nil, nil, nil, 764, nil, 336, 334, 333, 754, 335, nil, -554, nil, nil, nil, nil, nil, nil, nil, 751, nil, nil, nil, -554, -554, nil, -554, nil, nil, -554, -554, -554, -554, -554, -554, -554, -554, -554, nil, -554, nil, -554, 338, 749, nil, nil, 268, -554, nil, -554, 341, 340, 344, 343, nil, nil, nil, nil, nil, -554, -554, nil, -554, -554, -554, -554, -554, nil, -554, nil, nil, nil, nil, nil, 436, 440, nil, nil, 438, nil, nil, -554, nil, -554, nil, nil, - +554, 142, 143, 752, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, +-554, -554, nil, nil, 144, 145, 131, 132, -554, nil, nil, nil, nil, 268, - +554, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, +128, 126, 118, 140, 119, nil, -554, 146, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -554, nil, -554, nil, nil, - +554, 156, 167, 157, 180, 153, 173, 163, 162, 188, 191, 178, 161, 160, 155, +181, 189, 190, 165, 154, 168, 172, 174, 166, 159, nil, nil, nil, 175, 182, +177, 176, 169, 179, 164, 152, 171, 170, 183, 184, 185, 186, 187, 151, 158, +149, 150, 147, 148, nil, 111, 113, 110, nil, 112, nil, nil, nil, nil, nil, +nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, +124, 125, nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, +134, 128, 126, 118, 140, 119, nil, nil, 146, 192, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 80, 156, 167, 157, 180, 153, 173, 163, 162, 188, 191, +178, 161, 160, 155, 181, 189, 190, 165, 154, 168, 172, 174, 166, 159, nil, +nil, nil, 175, 182, 177, 176, 169, 179, 164, 152, 171, 170, 183, 184, 185, +186, 187, 151, 158, 149, 150, 147, 148, nil, 111, 113, nil, nil, 112, nil, +nil, nil, nil, nil, nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, +127, 129, nil, nil, 124, 125, nil, nil, nil, nil, 144, 145, 131, 132, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, +141, 138, 137, 133, 134, 128, 126, 118, 140, 119, nil, nil, 146, 192, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 80, 156, 167, 157, 180, 153, 173, +163, 162, 188, 191, 178, 161, 160, 155, 181, 189, 190, 165, 154, 168, 172, +174, 166, 159, nil, nil, nil, 175, 182, 177, 176, 169, 179, 164, 152, 171, +170, 183, 184, 185, 186, 187, 151, 158, 149, 150, 147, 148, nil, 111, 113, +nil, nil, 112, nil, nil, nil, nil, nil, nil, nil, nil, 142, 143, nil, 139, +121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, nil, nil, nil, 144, +145, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, 140, 119, nil, +nil, 146, 192, nil, nil, nil, nil, nil, nil, nil, nil, nil, 80, 156, 167, +157, 180, 153, 173, 163, 162, 188, 191, 178, 161, 160, 155, 181, 189, 190, +165, 154, 168, 172, 174, 166, 159, nil, nil, nil, 175, 182, 177, 176, 169, +179, 164, 152, 171, 170, 183, 184, 185, 186, 187, 151, 158, 149, 150, 147, +148, nil, 111, 113, nil, nil, 112, nil, nil, nil, nil, nil, nil, nil, nil, +142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, +nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, +118, 140, 119, nil, nil, 146, 192, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 80, 156, 167, 157, 180, 153, 173, 163, 162, 188, 191, 178, 161, 160, +155, 181, 189, 190, 165, 154, 168, 172, 174, 166, 159, nil, nil, nil, 175, +182, 177, 376, 375, 377, 374, 152, 171, 170, 183, 184, 185, 186, 187, 151, +158, 149, 150, 372, 373, nil, 370, 113, 86, 85, 371, nil, 88, nil, nil, +nil, nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, +nil, 124, 125, nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, +nil, 381, nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, +133, 134, 128, 126, 118, 140, 119, nil, nil, 146, 156, 167, 157, 180, 153, +173, 163, 162, 188, 191, 178, 161, 160, 155, 181, 189, 190, 165, 154, 168, +172, 174, 166, 159, nil, nil, nil, 175, 182, 177, 176, 169, 179, 164, 152, +171, 170, 183, 184, 185, 186, 187, 151, 158, 149, 150, 147, 148, nil, 111, +113, 398, 397, 112, nil, 399, nil, nil, nil, nil, nil, nil, 142, 143, nil, +139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, nil, nil, nil, +144, 145, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, 140, 119, +nil, nil, 146, 156, 167, 157, 180, 153, 173, 163, 162, 188, 191, 178, 161, +160, 155, 181, 189, 190, 165, 154, 168, 172, 174, 166, 159, nil, nil, nil, +175, 182, 177, 176, 169, 179, 164, 152, 171, 170, 183, 184, 185, 186, 187, +151, 158, 149, 150, 147, 148, nil, 111, 113, 398, 397, 112, nil, 399, nil, +nil, nil, nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, +nil, nil, 124, 125, nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, +137, 133, 134, 128, 126, 118, 140, 119, nil, nil, 146, 156, 167, 157, 180, +153, 173, 163, 162, 188, 191, 178, 161, 160, 155, 181, 189, 190, 165, 154, +168, 172, 174, 166, 159, nil, nil, nil, 175, 182, 177, 176, 169, 179, 164, +152, 171, 170, 183, 184, 185, 186, 187, 151, 158, 149, 150, 147, 148, nil, +111, 113, nil, nil, 112, nil, nil, nil, nil, nil, nil, nil, nil, 142, 143, +nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, nil, nil, +nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, 140, +119, 430, 434, 146, nil, 431, nil, nil, nil, nil, nil, nil, nil, nil, 142, +143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, nil, +nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, 268, nil, nil, nil, +nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, +140, 119, 443, 434, 146, nil, 444, nil, nil, nil, nil, nil, nil, nil, nil, +142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, +nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, +118, 140, 119, 443, 434, 146, nil, 444, nil, nil, nil, nil, nil, nil, nil, +nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, +nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, +126, 118, 140, 119, 443, 434, 146, nil, 444, nil, nil, nil, nil, nil, nil, +nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, +125, nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, +128, 126, 118, 140, 119, 443, 434, 146, nil, 444, nil, nil, nil, nil, nil, +nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, +124, 125, nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, +134, 128, 126, 118, 140, 119, 642, 434, 146, nil, 643, nil, nil, nil, nil, +nil, nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, +nil, 124, 125, nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, +nil, 268, nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, +133, 134, 128, 126, 118, 140, 119, 644, 440, 146, nil, 645, nil, nil, nil, +nil, nil, nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, +nil, nil, 124, 125, nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, +137, 133, 134, 128, 126, 118, 140, 119, 686, 434, 146, nil, 687, nil, nil, +nil, nil, nil, nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, +129, nil, nil, 124, 125, nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, +nil, nil, nil, 268, nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, +138, 137, 133, 134, 128, 126, 118, 140, 119, 689, 440, 146, nil, 690, nil, +nil, nil, nil, nil, nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, +127, 129, nil, nil, 124, 125, nil, nil, nil, nil, 144, 145, 131, 132, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, +141, 138, 137, 133, 134, 128, 126, 118, 140, 119, 443, 434, 146, nil, 444, +nil, nil, nil, nil, nil, nil, nil, nil, 142, 143, nil, 139, 121, 122, 123, +130, 127, 129, nil, nil, 124, 125, nil, nil, nil, nil, 144, 145, 131, 132, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 136, 135, nil, +120, 141, 138, 137, 133, 134, 128, 126, 118, 140, 119, 642, 434, 146, nil, +643, nil, nil, nil, nil, nil, nil, nil, nil, 142, 143, nil, 139, 121, 122, +123, 130, 127, 129, nil, nil, 124, 125, nil, nil, nil, nil, 144, 145, 131, +132, nil, nil, nil, nil, nil, 268, nil, nil, nil, nil, nil, nil, 136, 135, +nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, 140, 119, 644, 440, 146, +nil, 645, nil, nil, nil, nil, nil, nil, nil, nil, 142, 143, nil, 139, 121, +122, 123, 130, 127, 129, nil, nil, 124, 125, nil, nil, nil, nil, 144, 145, +131, 132, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 136, +135, nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, 140, 119, 733, 434, +146, nil, 734, nil, nil, nil, nil, nil, nil, nil, nil, 142, 143, nil, 139, +121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, nil, nil, nil, 144, +145, 131, 132, nil, nil, nil, nil, nil, 268, nil, nil, nil, nil, nil, nil, +136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, 140, 119, 735, +440, 146, nil, 736, nil, nil, nil, nil, nil, nil, nil, nil, 142, 143, nil, +139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, nil, nil, nil, +144, 145, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, 140, 119, +741, 440, 146, nil, 739, nil, nil, nil, nil, nil, nil, nil, nil, 142, 143, +nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, nil, nil, +nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, 140, +119, 443, 434, 146, nil, 444, nil, nil, nil, nil, nil, nil, nil, nil, 142, +143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, nil, +nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, 268, nil, nil, nil, +nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, 118, +140, 119, 741, 440, 146, nil, 892, nil, nil, nil, nil, nil, nil, nil, nil, +142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, nil, +nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, 126, +118, 140, 119, 959, 434, 146, nil, 960, nil, nil, nil, nil, nil, nil, nil, +nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, 125, +nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, 268, nil, +nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, 128, +126, 118, 140, 119, 961, 440, 146, nil, 962, nil, nil, nil, nil, nil, nil, +nil, nil, 142, 143, nil, 139, 121, 122, 123, 130, 127, 129, nil, nil, 124, +125, nil, nil, nil, nil, 144, 145, 131, 132, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 136, 135, nil, 120, 141, 138, 137, 133, 134, +128, 126, 118, 140, 119, nil, nil, 146] + +racc_action_check = [ +0, 0, 0, 0, 0, 347, 321, 354, 0, 0, 392, 746, 746, 0, 71, +0, 0, 0, 0, 0, 0, 0, 71, 313, 852, 615, 313, 0, 0, 0, +0, 0, 0, 0, 1, 852, 0, 387, 26, 209, 387, 485, 0, 0, 0, +0, 0, 0, 348, 0, 0, 0, 0, 0, 55, 0, 0, 0, 497, 0, +0, 357, 0, 0, 587, 681, 366, 370, 852, 852, 733, 310, 310, 392, 370, +485, 734, 352, 838, 352, 839, 604, 604, 735, 889, 0, 615, 615, 0, 209, +896, 0, 497, 6, 0, 615, 0, 287, 387, 387, 0, 746, 681, 924, 26, +852, 746, 9, 0, 927, 948, 321, 354, 0, 0, 0, 0, 0, 0, 347, +959, 347, 0, 0, 347, 26, 736, 17, 17, 17, 0, 17, 960, 0, 507, +17, 17, 10, 0, 0, 17, 55, 17, 17, 17, 17, 17, 17, 17, 211, +735, 457, 457, 11, 17, 17, 17, 17, 17, 17, 17, 310, 348, 17, 348, +287, 357, 348, 507, 587, 17, 604, 366, 17, 17, 733, 17, 17, 17, 17, +17, 734, 17, 17, 17, 839, 17, 17, 735, 17, 17, 366, 838, 736, 838, +838, 366, 838, 889, 211, 889, 371, 287, 889, 896, 12, 896, 457, 371, 896, +961, 287, 17, 20, 962, 17, 17, 924, 17, 924, 290, 17, 924, 927, 948, +927, 948, 17, 927, 948, 967, 736, 293, 383, 959, 17, 959, 34, 577, 959, +17, 17, 17, 17, 17, 17, 960, 525, 960, 17, 17, 960, 686, 578, 18, +18, 18, 17, 18, 687, 17, 314, 18, 18, 314, 17, 17, 18, 453, 18, +18, 18, 18, 18, 18, 18, 698, 698, 508, 15, 15, 18, 18, 18, 18, +18, 18, 18, 290, 961, 18, 629, 36, 962, 383, 383, 383, 18, 293, 461, +18, 18, 41, 18, 18, 18, 18, 18, 77, 18, 18, 18, 508, 18, 18, +525, 18, 18, 453, 293, 686, 841, 37, 37, 961, 290, 961, 687, 962, 961, +962, 461, 698, 962, 290, 461, 461, 689, 577, 18, 577, 629, 18, 577, 967, +18, 967, 807, 18, 967, 78, 690, 525, 578, 18, 578, 642, 686, 578, 97, +3, 525, 18, 193, 687, 3, 686, 18, 18, 18, 18, 18, 18, 687, 210, +278, 18, 18, 212, 14, 278, 22, 22, 22, 18, 22, 385, 18, 317, 22, +22, 317, 18, 18, 22, 643, 22, 22, 22, 22, 22, 22, 22, 791, 689, +689, 642, 792, 22, 22, 22, 22, 22, 22, 22, 807, 213, 22, 690, 690, +14, 841, 389, 841, 22, 394, 841, 22, 22, 14, 22, 22, 22, 22, 22, +22, 22, 22, 22, 372, 22, 22, 689, 22, 22, 643, 372, 385, 385, 385, +351, 689, 807, 791, 219, 351, 690, 792, 251, 25, 25, 807, 860, 373, 374, +690, 22, 25, 252, 22, 373, 374, 22, 860, 934, 22, 934, 22, 255, 22, +267, 22, 280, 389, 389, 389, 394, 394, 394, 22, 83, 83, 13, 13, 22, +22, 22, 22, 22, 22, 13, 282, 703, 22, 22, 703, 860, 860, 23, 23, +23, 22, 23, 597, 22, 375, 23, 23, 597, 22, 22, 23, 375, 23, 23, +23, 23, 23, 23, 23, 283, 361, 296, 296, 284, 23, 23, 23, 23, 23, +23, 23, 744, 860, 23, 42, 42, 744, 13, 648, 13, 23, 289, 42, 23, +23, 291, 23, 23, 23, 23, 23, 23, 23, 23, 23, 292, 23, 23, 295, +23, 23, 301, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 361, +361, 648, 648, 376, 750, 648, 648, 361, 23, 750, 376, 23, 361, 302, 23, +305, 42, 23, 42, 23, 648, 23, 648, 23, 648, 648, 648, 648, 648, 648, +648, 23, 648, 361, 208, 208, 23, 23, 23, 23, 23, 23, 208, 312, 35, +23, 23, 315, 648, 316, 24, 24, 24, 23, 24, 361, 23, 361, 24, 24, +318, 23, 23, 24, 326, 24, 24, 24, 24, 24, 24, 24, 5, 5, 5, +5, 5, 24, 24, 24, 24, 24, 24, 24, 377, 35, 24, 288, 288, 300, +208, 377, 208, 24, 35, 288, 24, 24, 327, 24, 24, 24, 24, 24, 24, +24, 24, 24, 329, 24, 24, 330, 24, 24, 342, 484, 484, 484, 484, 484, +484, 484, 484, 484, 484, 484, 303, 303, 484, 484, 300, 110, 484, 484, 303, +24, 110, 110, 24, 300, 345, 24, 353, 288, 24, 288, 24, 484, 24, 484, +24, 484, 484, 484, 484, 484, 484, 484, 24, 484, 356, 355, 355, 24, 24, +24, 24, 24, 24, 355, 358, 430, 24, 24, 362, 484, 484, 27, 27, 27, +24, 27, 303, 24, 303, 27, 27, 388, 24, 24, 27, 391, 27, 27, 27, +27, 27, 27, 27, 279, 279, 279, 279, 279, 27, 27, 27, 27, 27, 27, +27, 410, 430, 27, 364, 364, 416, 355, 419, 355, 27, 430, 364, 27, 27, +422, 27, 27, 27, 27, 27, 27, 27, 27, 27, 424, 27, 27, 428, 27, +27, 429, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 589, 589, +419, 419, 346, 346, 419, 419, 589, 27, 437, 431, 27, 27, 463, 27, 464, +364, 27, 364, 27, 419, 27, 419, 27, 419, 419, 419, 419, 419, 419, 419, +27, 419, 561, 561, 379, 27, 27, 27, 27, 27, 27, 379, 720, 720, 27, +27, 628, 419, 465, 419, 431, 466, 27, 858, 589, 27, 589, 499, 858, 431, +27, 27, 30, 30, 30, 30, 30, 855, 855, 858, 30, 30, 949, 949, 502, +30, 503, 30, 30, 30, 30, 30, 30, 30, 509, 513, 514, 628, 517, 30, +30, 30, 30, 30, 30, 30, 628, 519, 30, 526, 858, 858, 858, 858, 30, +30, 462, 30, 30, 30, 529, 30, 30, 30, 30, 30, 538, 30, 30, 30, +539, 30, 30, 540, 30, 30, 553, 19, 19, 19, 19, 19, 19, 19, 19, +19, 19, 19, 462, 858, 19, 19, 462, 462, 19, 19, 564, 30, 568, 573, +30, 579, 580, 30, 619, 626, 30, 632, 30, 19, 637, 19, 30, 19, 19, +19, 19, 19, 19, 19, 30, 19, 640, 711, 711, 30, 30, 30, 30, 30, +30, 711, 646, 647, 30, 30, 655, 19, 657, 31, 31, 31, 30, 31, 669, +30, 673, 31, 31, 676, 30, 30, 31, 683, 31, 31, 31, 31, 31, 31, +31, 555, 685, 688, 691, 692, 31, 31, 31, 31, 31, 31, 31, 693, 696, +31, 840, 840, 697, 711, 699, 711, 31, 704, 840, 31, 31, 705, 31, 31, +31, 31, 31, 708, 31, 31, 31, 710, 31, 31, 712, 652, 713, 652, 652, +652, 714, 652, 555, 555, 555, 555, 717, 768, 768, 739, 739, 768, 768, 768, +722, 728, 730, 739, 31, 732, 737, 31, 739, 741, 31, 742, 840, 31, 840, +31, 753, 757, 758, 760, 652, 761, 939, 762, 764, 767, 774, 939, 652, 652, +652, 652, 31, 31, 31, 31, 31, 31, 939, 652, 795, 31, 31, 796, 799, +801, 32, 32, 32, 31, 32, 739, 31, 739, 32, 32, 804, 31, 31, 32, +805, 32, 32, 32, 32, 32, 32, 32, 824, 939, 939, 939, 939, 32, 32, +32, 32, 32, 32, 32, 925, 925, 32, 680, 680, 680, 680, 680, 925, 32, +480, 806, 32, 32, 811, 32, 32, 32, 32, 32, 814, 32, 32, 32, 815, +32, 32, 600, 939, 600, 600, 600, 600, 600, 830, 824, 824, 824, 824, 833, +843, 846, 480, 600, 847, 848, 480, 480, 480, 480, 870, 32, 871, 882, 32, +892, 925, 32, 925, 569, 32, 569, 569, 569, 893, 569, 600, 600, 898, 899, +907, 909, 912, 913, 600, 600, 600, 600, 914, 32, 32, 32, 32, 32, 32, +915, 926, 936, 32, 32, 944, 953, 955, 32, 956, 958, 32, nil, nil, 32, +nil, nil, nil, nil, 32, 32, 38, 38, 38, 481, 38, nil, nil, 600, 38, +38, nil, nil, nil, 38, nil, 38, 38, 38, 38, 38, 38, 38, nil, nil, +nil, nil, nil, 38, 38, 38, 38, 38, 38, 38, nil, 481, 38, nil, nil, +481, 481, 481, 481, 38, nil, nil, 38, 38, nil, 38, 38, 38, 38, 38, +nil, 38, 38, 38, nil, 38, 38, nil, 38, 38, nil, 249, 249, 249, 249, +249, 249, 249, 249, 249, 249, 249, nil, nil, 249, 249, nil, nil, 249, 249, +nil, 38, nil, nil, 38, nil, nil, 38, nil, nil, 38, nil, nil, 249, nil, +249, 38, 249, 249, 249, 249, 249, 249, 249, 38, 249, nil, nil, nil, 38, +38, 38, 38, 38, 38, nil, nil, nil, 38, 38, nil, 249, nil, 39, 39, +39, 38, 39, nil, 38, nil, 39, 39, nil, 38, 38, 39, nil, 39, 39, +39, 39, 39, 39, 39, nil, nil, nil, nil, nil, 39, 39, 39, 39, 39, +39, 39, nil, 829, 39, 829, 829, 829, nil, 829, nil, 39, nil, nil, 39, +39, nil, 39, 39, 39, 39, 39, nil, 39, 39, 39, nil, 39, 39, nil, +39, 39, nil, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, nil, +nil, 427, 427, nil, nil, 427, 427, nil, 39, nil, nil, 39, nil, nil, 39, +nil, nil, 39, nil, nil, 427, nil, 427, 39, 427, 427, 427, 427, 427, 427, +427, 39, 427, nil, nil, nil, 39, 39, 39, 39, 39, 39, nil, nil, nil, +39, 39, nil, 427, nil, 40, 40, 40, 39, 40, nil, 39, nil, 40, 40, +nil, 39, 39, 40, nil, 40, 40, 40, 40, 40, 40, 40, nil, nil, nil, +nil, nil, 40, 40, 40, 40, 40, 40, 40, nil, nil, 40, nil, nil, nil, +nil, nil, nil, 40, nil, nil, 40, 40, nil, 40, 40, 40, 40, 40, nil, +40, 40, 40, nil, 40, 40, nil, 40, 40, nil, 446, 446, 446, 446, 446, +446, 446, 446, 446, 446, 446, nil, nil, 446, 446, nil, nil, 446, 446, nil, +40, nil, nil, 40, nil, nil, 40, nil, nil, 40, nil, nil, 446, nil, 446, +40, 446, 446, 446, 446, 446, 446, 446, 40, 446, nil, nil, nil, 40, 40, +40, 40, 40, 40, nil, nil, nil, 40, 40, nil, 446, nil, 52, 52, 52, +40, 52, nil, 40, nil, 52, 52, nil, 40, 40, 52, nil, 52, 52, 52, +52, 52, 52, 52, nil, nil, nil, nil, nil, 52, 52, 52, 52, 52, 52, +52, nil, nil, 52, nil, nil, nil, nil, nil, nil, 52, nil, nil, 52, 52, +nil, 52, 52, 52, 52, 52, nil, 52, 52, 52, nil, 52, 52, nil, 52, +52, nil, 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, nil, nil, +536, 536, nil, nil, 536, 536, nil, 52, nil, nil, 52, nil, nil, 52, nil, +nil, 52, nil, nil, 536, nil, 536, 52, 536, 536, 536, 536, 536, 536, 536, +52, 536, nil, nil, nil, 52, 52, 52, 52, 52, 52, nil, nil, nil, 52, +52, nil, 536, nil, 53, 53, 53, 52, 53, nil, 52, nil, 53, 53, nil, +52, 52, 53, nil, 53, 53, 53, 53, 53, 53, 53, nil, nil, nil, nil, +nil, 53, 53, 53, 53, 53, 53, 53, nil, nil, 53, nil, nil, nil, nil, +nil, nil, 53, nil, nil, 53, 53, nil, 53, 53, 53, 53, 53, 53, 53, +53, 53, nil, 53, 53, nil, 53, 53, nil, 695, 695, 695, 695, 695, 695, +695, 695, 695, 695, 695, nil, nil, 695, 695, nil, nil, 695, 695, nil, 53, +nil, nil, 53, nil, nil, 53, nil, nil, 53, nil, 53, 695, nil, 695, 53, +695, 695, 695, 695, 695, 695, 695, 53, 695, nil, nil, nil, 53, 53, 53, +53, 53, 53, nil, nil, nil, 53, 53, nil, 695, nil, 54, 54, 54, 53, +54, nil, 53, nil, 54, 54, nil, 53, 53, 54, nil, 54, 54, 54, 54, +54, 54, 54, nil, nil, nil, nil, nil, 54, 54, 54, 54, 54, 54, 54, +nil, nil, 54, nil, nil, nil, nil, nil, nil, 54, nil, nil, 54, 54, nil, +54, 54, 54, 54, 54, 54, 54, 54, 54, nil, 54, 54, nil, 54, 54, +nil, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, nil, nil, 773, +773, nil, nil, 773, 773, nil, 54, nil, nil, 54, nil, nil, 54, nil, nil, +54, nil, nil, 773, nil, 773, 54, 773, 773, 773, 773, 773, 773, 773, 54, +773, nil, nil, nil, 54, 54, 54, 54, 54, 54, nil, nil, nil, 54, 54, +nil, 773, nil, 57, 57, 57, 54, 57, nil, 54, nil, 57, 57, nil, 54, +54, 57, nil, 57, 57, 57, 57, 57, 57, 57, nil, nil, nil, nil, nil, +57, 57, 57, 57, 57, 57, 57, nil, nil, 57, nil, nil, nil, nil, nil, +nil, 57, nil, nil, 57, 57, nil, 57, 57, 57, 57, 57, nil, 57, 57, +57, nil, 57, 57, nil, 57, 57, nil, 779, 779, 779, 779, 779, 779, 779, +779, 779, 779, 779, nil, nil, 779, 779, nil, nil, 779, 779, nil, 57, nil, +nil, 57, nil, nil, 57, nil, nil, 57, nil, nil, 779, nil, 779, 57, 779, +779, 779, 779, 779, 779, 779, 57, 779, nil, nil, nil, 57, 57, 57, 57, +57, 57, nil, nil, nil, 57, 57, nil, 779, nil, 58, 58, 58, 57, 58, +nil, 57, nil, 58, 58, nil, 57, 57, 58, nil, 58, 58, 58, 58, 58, +58, 58, nil, nil, nil, nil, nil, 58, 58, 58, 58, 58, 58, 58, nil, +nil, 58, nil, nil, nil, nil, nil, nil, 58, nil, nil, 58, 58, nil, 58, +58, 58, 58, 58, nil, 58, 58, 58, nil, 58, 58, nil, 58, 58, nil, +781, 781, 781, 781, 781, 781, 781, 781, 781, 781, 781, nil, nil, 781, 781, +nil, nil, 781, 781, nil, 58, nil, nil, 58, nil, nil, 58, nil, nil, 58, +nil, nil, 781, nil, 781, 58, 781, 781, 781, 781, 781, 781, 781, 58, 781, +nil, nil, nil, 58, 58, 58, 58, 58, 58, nil, nil, nil, 58, 58, nil, +781, nil, 61, 61, 61, 58, 61, nil, 58, nil, 61, 61, nil, 58, 58, +61, nil, 61, 61, 61, 61, 61, 61, 61, nil, nil, nil, nil, nil, 61, +61, 61, 61, 61, 61, 61, nil, nil, 61, nil, nil, nil, nil, nil, nil, +61, nil, nil, 61, 61, nil, 61, 61, 61, 61, 61, nil, 61, 61, 61, +nil, 61, 61, nil, 61, 61, nil, 672, 672, 672, 672, 672, 672, 672, 672, +672, 672, 672, nil, nil, 672, 672, nil, nil, 672, 672, nil, 61, nil, nil, +61, nil, nil, 61, nil, nil, 61, nil, nil, 672, nil, 672, 61, 672, 672, +672, 672, 672, 672, 672, 61, 672, nil, nil, nil, 61, 61, 61, 61, 61, +61, nil, nil, nil, 61, 61, 61, 672, nil, 672, nil, 61, 61, nil, nil, +61, nil, nil, nil, nil, 61, 61, 62, 62, 62, nil, 62, nil, nil, nil, +62, 62, nil, nil, nil, 62, nil, 62, 62, 62, 62, 62, 62, 62, nil, +nil, nil, nil, nil, 62, 62, 62, 62, 62, 62, 62, nil, nil, 62, nil, +nil, nil, nil, nil, nil, 62, nil, nil, 62, 62, nil, 62, 62, 62, 62, +62, nil, 62, 62, 62, nil, 62, 62, 784, 784, 784, 784, 784, 784, 784, +784, 784, 784, 784, 467, nil, 784, 784, nil, nil, 784, 784, nil, nil, nil, +nil, nil, 62, nil, nil, 62, 467, 467, 62, nil, 784, 62, 784, 62, 784, +784, 784, 784, 784, 784, 784, 467, 784, 467, nil, 467, 467, 467, 467, nil, +62, 62, 62, 62, 62, 62, nil, nil, 784, 62, 62, nil, nil, nil, 63, +63, 63, 62, 63, nil, 62, nil, 63, 63, nil, 62, 62, 63, nil, 63, +63, 63, 63, 63, 63, 63, nil, nil, nil, nil, nil, 63, 63, 63, 63, +63, 63, 63, nil, nil, 63, nil, nil, nil, nil, nil, nil, 63, nil, nil, +63, 63, nil, 63, 63, 63, 63, 63, nil, 63, 63, 63, nil, 63, 63, +786, 786, 786, 786, 786, 786, 786, 786, 786, 786, 786, 468, nil, 786, 786, +nil, nil, 786, 786, nil, nil, 63, nil, nil, 63, nil, nil, 63, 468, 468, +63, nil, 786, 63, 786, nil, 786, 786, 786, 786, 786, 786, 786, 468, 786, +468, nil, 468, 468, 468, 468, nil, 63, 63, 63, 63, 63, 63, nil, nil, +786, 63, 63, nil, nil, nil, 84, 84, 84, 63, 84, nil, 63, nil, 84, +84, nil, 63, 63, 84, nil, 84, 84, 84, 84, 84, 84, 84, nil, 84, +nil, nil, nil, 84, 84, 84, 84, 84, 84, 84, nil, nil, 84, nil, nil, +nil, nil, nil, nil, 84, nil, nil, 84, 84, nil, 84, 84, 84, 84, 84, +84, 84, 84, 84, nil, 84, 84, nil, 84, 84, nil, 793, 793, 793, 793, +793, 793, 793, 793, 793, 793, 793, nil, nil, 793, 793, nil, nil, 793, 793, +nil, 84, nil, nil, 84, 84, nil, 84, nil, nil, 84, nil, 84, 793, 84, +793, 84, 793, 793, 793, 793, 793, 793, 793, 84, 793, 84, nil, nil, 84, +84, 84, 84, 84, 84, nil, nil, nil, 84, 84, nil, 793, nil, 87, 87, +87, 84, 87, nil, 84, nil, 87, 87, nil, 84, 84, 87, nil, 87, 87, +87, 87, 87, 87, 87, nil, 87, nil, nil, nil, 87, 87, 87, 87, 87, +87, 87, nil, nil, 87, nil, nil, nil, nil, nil, nil, 87, nil, nil, 87, +87, nil, 87, 87, 87, 87, 87, 87, 87, 87, 87, nil, 87, 87, nil, +87, 87, nil, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, 873, nil, +nil, 873, 873, nil, nil, 873, 873, nil, 87, nil, nil, 87, 87, nil, 87, +nil, nil, 87, nil, 87, 873, 87, 873, 87, 873, 873, 873, 873, 873, 873, +873, 87, 873, 87, nil, nil, 87, 87, 87, 87, 87, 87, nil, nil, nil, +87, 87, nil, 873, nil, nil, nil, nil, 87, nil, nil, 87, nil, nil, nil, +nil, 87, 87, 99, 99, 99, 99, 99, nil, nil, nil, 99, 99, nil, nil, +nil, 99, nil, 99, 99, 99, 99, 99, 99, 99, nil, nil, nil, nil, nil, +99, 99, 99, 99, 99, 99, 99, nil, nil, 99, nil, nil, nil, nil, nil, +99, 99, 99, 99, 99, 99, nil, 99, 99, 99, 99, 99, nil, 99, 99, +99, nil, 99, 99, nil, 99, 99, nil, 875, 875, 875, 875, 875, 875, 875, +875, 875, 875, 875, nil, nil, 875, 875, nil, nil, 875, 875, nil, 99, nil, +nil, 99, nil, nil, 99, nil, nil, 99, nil, 99, 875, nil, 875, 99, 875, +875, 875, 875, 875, 875, 875, 99, 875, nil, nil, nil, 99, 99, 99, 99, +99, 99, nil, nil, nil, 99, 99, nil, 875, nil, nil, nil, 99, 99, nil, +nil, 99, nil, nil, nil, nil, 99, 99, 103, 103, 103, nil, 103, nil, nil, +nil, 103, 103, nil, nil, nil, 103, nil, 103, 103, 103, 103, 103, 103, 103, +nil, nil, nil, nil, nil, 103, 103, 103, 103, 103, 103, 103, nil, 338, 103, +338, 338, 338, nil, 338, nil, 103, nil, nil, 103, 103, nil, 103, 103, 103, +103, 103, nil, 103, 103, 103, nil, 103, 103, nil, 103, 103, 566, nil, 566, +566, 566, nil, 566, nil, nil, 718, 338, 718, 718, 718, nil, 718, nil, nil, +338, nil, nil, 103, nil, nil, 103, nil, nil, 103, nil, nil, 103, nil, nil, +nil, nil, nil, 103, nil, nil, 566, nil, nil, nil, nil, 103, nil, nil, 566, +718, 103, 103, 103, 103, 103, 103, nil, 718, nil, 103, 103, nil, nil, nil, +104, 104, 104, 103, 104, nil, 103, nil, 104, 104, nil, 103, 103, 104, nil, +104, 104, 104, 104, 104, 104, 104, nil, nil, nil, nil, nil, 104, 104, 104, +104, 104, 104, 104, nil, nil, 104, nil, nil, nil, nil, nil, nil, 104, nil, +nil, 104, 104, nil, 104, 104, 104, 104, 104, nil, 104, 104, 104, nil, 104, +104, nil, 104, 104, nil, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, +459, nil, nil, 459, 459, nil, nil, 459, 459, nil, 104, nil, nil, 104, nil, +nil, 104, nil, nil, 104, nil, nil, 459, nil, 459, 104, 459, 459, 459, 459, +459, 459, 459, 104, 459, nil, nil, nil, 104, 104, 104, 104, 104, 104, nil, +nil, nil, 104, 104, nil, nil, nil, 105, 105, 105, 104, 105, nil, 104, nil, +105, 105, nil, 104, 104, 105, nil, 105, 105, 105, 105, 105, 105, 105, nil, +nil, nil, nil, nil, 105, 105, 105, 105, 105, 105, 105, nil, nil, 105, nil, +nil, nil, nil, nil, nil, 105, nil, nil, 105, 105, nil, 105, 105, 105, 105, +105, nil, 105, 105, 105, nil, 105, 105, nil, 105, 105, nil, 460, 460, 460, +460, 460, 460, 460, 460, 460, 460, 460, nil, nil, 460, 460, nil, nil, 460, +460, nil, 105, nil, nil, 105, nil, nil, 105, nil, nil, 105, nil, nil, 460, +nil, 460, 105, 460, 460, 460, 460, 460, 460, 460, 105, 460, nil, nil, nil, +105, 105, 105, 105, 105, 105, nil, nil, nil, 105, 105, nil, nil, nil, 106, +106, 106, 105, 106, nil, 105, nil, 106, 106, nil, 105, 105, 106, nil, 106, +106, 106, 106, 106, 106, 106, nil, nil, nil, nil, nil, 106, 106, 106, 106, +106, 106, 106, nil, nil, 106, nil, nil, nil, nil, nil, nil, 106, nil, nil, +106, 106, nil, 106, 106, 106, 106, 106, nil, 106, 106, 106, nil, 106, 106, +nil, 106, 106, nil, 470, 470, 470, 470, 470, 470, 470, nil, nil, 470, 470, +nil, nil, nil, nil, nil, nil, 470, 470, nil, 106, nil, nil, 106, nil, nil, +106, nil, nil, 106, nil, nil, 470, nil, 470, 106, 470, 470, 470, 470, 470, +470, 470, 106, 470, nil, nil, nil, 106, 106, 106, 106, 106, 106, nil, nil, +nil, 106, 106, nil, nil, nil, nil, nil, nil, 106, nil, nil, 106, nil, nil, +nil, nil, 106, 106, 107, 107, 107, 107, 107, nil, nil, nil, 107, 107, nil, +nil, nil, 107, nil, 107, 107, 107, 107, 107, 107, 107, nil, nil, nil, nil, +nil, 107, 107, 107, 107, 107, 107, 107, nil, nil, 107, nil, nil, nil, nil, +nil, 107, 107, nil, 107, 107, 107, nil, 107, 107, 107, 107, 107, nil, 107, +107, 107, nil, 107, 107, nil, 107, 107, nil, 471, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 471, 471, nil, 107, +nil, nil, 107, nil, nil, 107, nil, nil, 107, nil, 107, 471, nil, 471, 107, +471, 471, 471, 471, nil, nil, 471, 107, 471, nil, nil, nil, 107, 107, 107, +107, 107, 107, nil, nil, nil, 107, 107, nil, nil, nil, nil, nil, nil, 107, +nil, nil, 107, nil, nil, nil, nil, 107, 107, 108, 108, 108, 108, 108, nil, +nil, nil, 108, 108, nil, nil, nil, 108, nil, 108, 108, 108, 108, 108, 108, +108, nil, nil, nil, nil, nil, 108, 108, 108, 108, 108, 108, 108, nil, nil, +108, nil, nil, nil, nil, nil, 108, 108, 108, 108, 108, 108, nil, 108, 108, +108, 108, 108, nil, 108, 108, 108, nil, 108, 108, nil, 108, 108, nil, 472, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 472, 472, nil, 108, nil, nil, 108, nil, nil, 108, nil, nil, 108, nil, +108, 472, nil, 472, 108, 472, 472, 472, 472, nil, nil, 472, 108, 472, nil, +nil, nil, 108, 108, 108, 108, 108, 108, nil, nil, nil, 108, 108, nil, nil, +nil, nil, nil, nil, 108, nil, nil, 108, nil, nil, nil, nil, 108, 108, 195, +195, 195, 195, 195, nil, nil, nil, 195, 195, nil, nil, nil, 195, nil, 195, +195, 195, 195, 195, 195, 195, nil, nil, nil, nil, nil, 195, 195, 195, 195, +195, 195, 195, nil, nil, 195, nil, nil, nil, nil, nil, 195, 195, nil, 195, +195, 195, nil, 195, 195, 195, 195, 195, nil, 195, 195, 195, nil, 195, 195, +nil, 195, 195, nil, 473, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 473, 473, nil, 195, nil, nil, 195, nil, nil, +195, nil, nil, 195, nil, 195, 473, nil, 473, 195, 473, 473, 473, 473, nil, +nil, 473, 195, 473, nil, nil, nil, 195, 195, 195, 195, 195, 195, nil, nil, +nil, 195, 195, nil, nil, nil, 196, 196, 196, 195, 196, nil, 195, nil, 196, +196, nil, 195, 195, 196, nil, 196, 196, 196, 196, 196, 196, 196, nil, nil, +nil, nil, nil, 196, 196, 196, 196, 196, 196, 196, nil, nil, 196, nil, nil, +nil, nil, nil, nil, 196, nil, nil, 196, 196, nil, 196, 196, 196, 196, 196, +nil, 196, 196, 196, nil, 196, 196, nil, 196, 196, nil, 474, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 474, 474, +nil, 196, nil, nil, 196, nil, nil, 196, nil, nil, 196, nil, 196, 474, nil, +474, 196, 474, 474, 474, 474, nil, nil, 474, 196, 474, nil, nil, nil, 196, +196, 196, 196, 196, 196, nil, nil, nil, 196, 196, nil, nil, nil, 197, 197, +197, 196, 197, nil, 196, nil, 197, 197, nil, 196, 196, 197, nil, 197, 197, +197, 197, 197, 197, 197, nil, nil, nil, nil, nil, 197, 197, 197, 197, 197, +197, 197, nil, nil, 197, nil, nil, nil, nil, nil, nil, 197, nil, nil, 197, +197, nil, 197, 197, 197, 197, 197, nil, 197, 197, 197, nil, 197, 197, nil, +197, 197, nil, 475, 475, 475, 475, 475, 475, 475, nil, nil, 475, 475, nil, +nil, nil, nil, nil, nil, 475, 475, nil, 197, nil, nil, 197, nil, nil, 197, +nil, nil, 197, nil, 197, 475, nil, 475, 197, 475, 475, 475, 475, 475, 475, +475, 197, 475, nil, nil, nil, 197, 197, 197, 197, 197, 197, nil, nil, nil, +197, 197, nil, nil, nil, 198, 198, 198, 197, 198, nil, 197, nil, 198, 198, +nil, 197, 197, 198, nil, 198, 198, 198, 198, 198, 198, 198, nil, nil, nil, +nil, nil, 198, 198, 198, 198, 198, 198, 198, nil, nil, 198, nil, nil, nil, +nil, nil, nil, 198, nil, nil, 198, 198, nil, 198, 198, 198, 198, 198, nil, +198, 198, 198, nil, 198, 198, nil, 198, 198, nil, 476, 476, 476, 476, 476, +476, 476, nil, nil, 476, 476, nil, nil, nil, nil, nil, nil, 476, 476, nil, +198, nil, nil, 198, nil, nil, 198, nil, nil, 198, nil, nil, 476, nil, 476, +198, 476, 476, 476, 476, 476, 476, 476, 198, 476, nil, nil, nil, 198, 198, +198, 198, 198, 198, nil, nil, nil, 198, 198, nil, nil, nil, 199, 199, 199, +198, 199, nil, 198, nil, 199, 199, nil, 198, 198, 199, nil, 199, 199, 199, +199, 199, 199, 199, nil, nil, nil, nil, nil, 199, 199, 199, 199, 199, 199, +199, nil, nil, 199, nil, nil, nil, nil, nil, nil, 199, nil, nil, 199, 199, +nil, 199, 199, 199, 199, 199, 199, 199, 199, 199, nil, 199, 199, nil, 199, +199, nil, 477, 477, 477, 477, 477, 477, 477, nil, nil, 477, 477, nil, nil, +nil, nil, nil, nil, 477, 477, nil, 199, nil, nil, 199, nil, nil, 199, nil, +nil, 199, nil, 199, 477, nil, 477, 199, 477, 477, 477, 477, 477, 477, 477, +199, 477, nil, nil, nil, 199, 199, 199, 199, 199, 199, nil, nil, nil, 199, +199, nil, nil, nil, 200, 200, 200, 199, 200, nil, 199, nil, 200, 200, nil, +199, 199, 200, nil, 200, 200, 200, 200, 200, 200, 200, nil, nil, nil, nil, +nil, 200, 200, 200, 200, 200, 200, 200, nil, nil, 200, nil, nil, nil, nil, +nil, nil, 200, nil, nil, 200, 200, nil, 200, 200, 200, 200, 200, 200, 200, +200, 200, nil, 200, 200, nil, 200, 200, nil, 478, 478, 478, 478, 478, 478, +478, nil, nil, 478, 478, nil, nil, nil, nil, nil, nil, 478, 478, nil, 200, +nil, nil, 200, nil, nil, 200, nil, nil, 200, nil, 200, 478, nil, 478, 200, +478, 478, 478, 478, 478, 478, 478, 200, 478, nil, nil, nil, 200, 200, 200, +200, 200, 200, nil, nil, nil, 200, 200, nil, nil, nil, 204, 204, 204, 200, +204, nil, 200, nil, 204, 204, nil, 200, 200, 204, nil, 204, 204, 204, 204, +204, 204, 204, nil, nil, nil, nil, nil, 204, 204, 204, 204, 204, 204, 204, +nil, nil, 204, nil, nil, nil, nil, nil, nil, 204, nil, nil, 204, 204, nil, +204, 204, 204, 204, 204, nil, 204, 204, 204, nil, 204, 204, nil, 204, 204, +nil, 479, 479, 479, 479, 479, 479, 479, nil, nil, 479, 479, nil, nil, nil, +nil, nil, nil, 479, 479, nil, 204, nil, nil, 204, nil, nil, 204, nil, nil, +204, nil, nil, 479, nil, 479, 204, 479, 479, 479, 479, 479, 479, 479, 204, +479, nil, nil, nil, 204, 204, 204, 204, 204, 204, nil, nil, nil, 204, 204, +nil, nil, nil, 205, 205, 205, 204, 205, nil, 204, nil, 205, 205, nil, 204, +204, 205, nil, 205, 205, 205, 205, 205, 205, 205, nil, nil, nil, nil, nil, +205, 205, 205, 205, 205, 205, 205, nil, nil, 205, nil, nil, nil, nil, nil, +nil, 205, nil, nil, 205, 205, nil, 205, 205, 205, 205, 205, nil, 205, 205, +205, nil, 205, 205, nil, 205, 205, nil, 482, 482, 482, 482, 482, 482, 482, +nil, nil, 482, 482, nil, nil, nil, nil, nil, nil, 482, 482, nil, 205, nil, +nil, 205, nil, nil, 205, nil, nil, 205, nil, nil, 482, nil, 482, 205, 482, +482, 482, 482, 482, 482, 482, 205, 482, nil, nil, nil, 205, 205, 205, 205, +205, 205, nil, nil, nil, 205, 205, nil, nil, nil, 206, 206, 206, 205, 206, +nil, 205, nil, 206, 206, nil, 205, 205, 206, nil, 206, 206, 206, 206, 206, +206, 206, nil, nil, nil, nil, nil, 206, 206, 206, 206, 206, 206, 206, nil, +nil, 206, nil, nil, nil, nil, nil, nil, 206, nil, nil, 206, 206, nil, 206, +206, 206, 206, 206, nil, 206, 206, 206, nil, 206, 206, nil, 206, 206, nil, +483, 483, 483, 483, 483, 483, 483, 483, nil, 483, 483, nil, nil, nil, nil, +nil, nil, 483, 483, nil, 206, nil, nil, 206, nil, nil, 206, nil, nil, 206, +nil, nil, 483, nil, 483, 206, 483, 483, 483, 483, 483, 483, 483, 206, 483, +nil, nil, nil, 206, 206, 206, 206, 206, 206, nil, nil, nil, 206, 206, nil, +nil, nil, nil, nil, nil, 206, nil, nil, 206, nil, nil, nil, nil, 206, 206, +214, 214, 214, 214, 214, nil, nil, nil, 214, 214, nil, nil, nil, 214, nil, +214, 214, 214, 214, 214, 214, 214, nil, nil, nil, nil, nil, 214, 214, 214, +214, 214, 214, 214, nil, nil, 214, nil, nil, nil, nil, nil, 214, 214, nil, +214, 214, 214, nil, 214, 214, 214, 214, 214, nil, 214, 214, 214, nil, 214, +214, nil, 214, 214, nil, 469, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 469, 469, nil, 214, nil, nil, 214, nil, +nil, 214, nil, nil, 214, nil, 214, 469, nil, nil, 214, 469, 469, 469, 469, +nil, nil, nil, 214, nil, nil, nil, nil, 214, 214, 214, 214, 214, 214, nil, +nil, nil, 214, 214, nil, nil, nil, 215, 215, 215, 214, 215, nil, 214, nil, +215, 215, nil, 214, 214, 215, nil, 215, 215, 215, 215, 215, 215, 215, nil, +nil, nil, nil, nil, 215, 215, 215, 215, 215, 215, 215, nil, nil, 215, nil, +nil, nil, nil, nil, nil, 215, nil, nil, 215, 215, nil, 215, 215, 215, 215, +215, nil, 215, 215, 215, nil, 215, 215, nil, 215, 215, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 215, nil, nil, 215, nil, 215, 215, nil, nil, 215, nil, nil, nil, +nil, nil, 215, nil, nil, nil, nil, nil, nil, nil, 215, nil, nil, nil, nil, +215, 215, 215, 215, 215, 215, nil, nil, nil, 215, 215, nil, nil, nil, 218, +218, 218, 215, 218, nil, 215, nil, 218, 218, nil, 215, 215, 218, nil, 218, +218, 218, 218, 218, 218, 218, nil, nil, nil, nil, nil, 218, 218, 218, 218, +218, 218, 218, nil, nil, 218, nil, nil, nil, nil, nil, nil, 218, nil, nil, +218, 218, nil, 218, 218, 218, 218, 218, nil, 218, 218, 218, nil, 218, 218, +nil, 218, 218, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 218, nil, nil, 218, nil, nil, +218, nil, nil, 218, nil, nil, nil, nil, nil, 218, nil, nil, nil, nil, nil, +nil, nil, 218, nil, nil, nil, nil, 218, 218, 218, 218, 218, 218, nil, nil, +nil, 218, 218, nil, nil, nil, 220, 220, 220, 218, 220, nil, 218, nil, 220, +220, nil, 218, 218, 220, nil, 220, 220, 220, 220, 220, 220, 220, nil, nil, +nil, nil, nil, 220, 220, 220, 220, 220, 220, 220, nil, nil, 220, nil, nil, +nil, nil, nil, nil, 220, nil, nil, 220, 220, nil, 220, 220, 220, 220, 220, +nil, 220, 220, 220, nil, 220, 220, nil, 220, 220, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 220, nil, nil, 220, nil, nil, 220, nil, nil, 220, nil, nil, nil, nil, +nil, 220, nil, nil, nil, nil, nil, nil, nil, 220, nil, nil, nil, nil, 220, +220, 220, 220, 220, 220, nil, nil, nil, 220, 220, nil, nil, nil, 221, 221, +221, 220, 221, nil, 220, nil, 221, 221, nil, 220, 220, 221, nil, 221, 221, +221, 221, 221, 221, 221, nil, nil, nil, nil, nil, 221, 221, 221, 221, 221, +221, 221, nil, nil, 221, nil, nil, nil, nil, nil, nil, 221, nil, nil, 221, +221, nil, 221, 221, 221, 221, 221, nil, 221, 221, 221, nil, 221, 221, nil, +221, 221, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 221, nil, nil, 221, nil, nil, 221, +nil, nil, 221, nil, nil, nil, nil, nil, 221, nil, nil, nil, nil, nil, nil, +nil, 221, nil, nil, nil, nil, 221, 221, 221, 221, 221, 221, nil, nil, nil, +221, 221, nil, nil, nil, 222, 222, 222, 221, 222, nil, 221, nil, 222, 222, +nil, 221, 221, 222, nil, 222, 222, 222, 222, 222, 222, 222, nil, nil, nil, +nil, nil, 222, 222, 222, 222, 222, 222, 222, nil, nil, 222, nil, nil, nil, +nil, nil, nil, 222, nil, nil, 222, 222, nil, 222, 222, 222, 222, 222, nil, +222, 222, 222, nil, 222, 222, nil, 222, 222, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +222, nil, nil, 222, nil, nil, 222, nil, nil, 222, nil, nil, nil, nil, nil, +222, nil, nil, nil, nil, nil, nil, nil, 222, nil, nil, nil, nil, 222, 222, +222, 222, 222, 222, nil, nil, nil, 222, 222, nil, nil, nil, 223, 223, 223, +222, 223, nil, 222, nil, 223, 223, nil, 222, 222, 223, nil, 223, 223, 223, +223, 223, 223, 223, nil, nil, nil, nil, nil, 223, 223, 223, 223, 223, 223, +223, nil, nil, 223, nil, nil, nil, nil, nil, nil, 223, nil, nil, 223, 223, +nil, 223, 223, 223, 223, 223, nil, 223, 223, 223, nil, 223, 223, nil, 223, +223, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 223, nil, nil, 223, nil, nil, 223, nil, +nil, 223, nil, nil, nil, nil, nil, 223, nil, nil, nil, nil, nil, nil, nil, +223, nil, nil, nil, nil, 223, 223, 223, 223, 223, 223, nil, nil, nil, 223, +223, nil, nil, nil, 224, 224, 224, 223, 224, nil, 223, nil, 224, 224, nil, +223, 223, 224, nil, 224, 224, 224, 224, 224, 224, 224, nil, nil, nil, nil, +nil, 224, 224, 224, 224, 224, 224, 224, nil, nil, 224, nil, nil, nil, nil, +nil, nil, 224, nil, nil, 224, 224, nil, 224, 224, 224, 224, 224, nil, 224, +224, 224, nil, 224, 224, nil, 224, 224, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 224, +nil, nil, 224, nil, nil, 224, nil, nil, 224, nil, nil, nil, nil, nil, 224, +nil, nil, nil, nil, nil, nil, nil, 224, nil, nil, nil, nil, 224, 224, 224, +224, 224, 224, nil, nil, nil, 224, 224, nil, nil, nil, 225, 225, 225, 224, +225, nil, 224, nil, 225, 225, nil, 224, 224, 225, nil, 225, 225, 225, 225, +225, 225, 225, nil, nil, nil, nil, nil, 225, 225, 225, 225, 225, 225, 225, +nil, nil, 225, nil, nil, nil, nil, nil, nil, 225, nil, nil, 225, 225, nil, +225, 225, 225, 225, 225, nil, 225, 225, 225, nil, 225, 225, nil, 225, 225, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 225, nil, nil, 225, nil, nil, 225, nil, nil, +225, nil, nil, nil, nil, nil, 225, nil, nil, nil, nil, nil, nil, nil, 225, +nil, nil, nil, nil, 225, 225, 225, 225, 225, 225, nil, nil, nil, 225, 225, +nil, nil, nil, 226, 226, 226, 225, 226, nil, 225, nil, 226, 226, nil, 225, +225, 226, nil, 226, 226, 226, 226, 226, 226, 226, nil, nil, nil, nil, nil, +226, 226, 226, 226, 226, 226, 226, nil, nil, 226, nil, nil, nil, nil, nil, +nil, 226, nil, nil, 226, 226, nil, 226, 226, 226, 226, 226, nil, 226, 226, +226, nil, 226, 226, nil, 226, 226, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 226, nil, +nil, 226, nil, nil, 226, nil, nil, 226, nil, nil, nil, nil, nil, 226, nil, +nil, nil, nil, nil, nil, nil, 226, nil, nil, nil, nil, 226, 226, 226, 226, +226, 226, nil, nil, nil, 226, 226, nil, nil, nil, 227, 227, 227, 226, 227, +nil, 226, nil, 227, 227, nil, 226, 226, 227, nil, 227, 227, 227, 227, 227, +227, 227, nil, nil, nil, nil, nil, 227, 227, 227, 227, 227, 227, 227, nil, +nil, 227, nil, nil, nil, nil, nil, nil, 227, nil, nil, 227, 227, nil, 227, +227, 227, 227, 227, nil, 227, 227, 227, nil, 227, 227, nil, 227, 227, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 227, nil, nil, 227, nil, nil, 227, nil, nil, 227, +nil, nil, nil, nil, nil, 227, nil, nil, nil, nil, nil, nil, nil, 227, nil, +nil, nil, nil, 227, 227, 227, 227, 227, 227, nil, nil, nil, 227, 227, nil, +nil, nil, 228, 228, 228, 227, 228, nil, 227, nil, 228, 228, nil, 227, 227, +228, nil, 228, 228, 228, 228, 228, 228, 228, nil, nil, nil, nil, nil, 228, +228, 228, 228, 228, 228, 228, nil, nil, 228, nil, nil, nil, nil, nil, nil, +228, nil, nil, 228, 228, nil, 228, 228, 228, 228, 228, nil, 228, 228, 228, +nil, 228, 228, nil, 228, 228, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 228, nil, nil, +228, nil, nil, 228, nil, nil, 228, nil, nil, nil, nil, nil, 228, nil, nil, +nil, nil, nil, nil, nil, 228, nil, nil, nil, nil, 228, 228, 228, 228, 228, +228, nil, nil, nil, 228, 228, nil, nil, nil, 229, 229, 229, 228, 229, nil, +228, nil, 229, 229, nil, 228, 228, 229, nil, 229, 229, 229, 229, 229, 229, +229, nil, nil, nil, nil, nil, 229, 229, 229, 229, 229, 229, 229, nil, nil, +229, nil, nil, nil, nil, nil, nil, 229, nil, nil, 229, 229, nil, 229, 229, +229, 229, 229, nil, 229, 229, 229, nil, 229, 229, nil, 229, 229, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 229, nil, nil, 229, nil, nil, 229, nil, nil, 229, nil, +nil, nil, nil, nil, 229, nil, nil, nil, nil, nil, nil, nil, 229, nil, nil, +nil, nil, 229, 229, 229, 229, 229, 229, nil, nil, nil, 229, 229, nil, nil, +nil, 230, 230, 230, 229, 230, nil, 229, nil, 230, 230, nil, 229, 229, 230, +nil, 230, 230, 230, 230, 230, 230, 230, nil, nil, nil, nil, nil, 230, 230, +230, 230, 230, 230, 230, nil, nil, 230, nil, nil, nil, nil, nil, nil, 230, +nil, nil, 230, 230, nil, 230, 230, 230, 230, 230, nil, 230, 230, 230, nil, +230, 230, nil, 230, 230, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 230, nil, nil, 230, +nil, nil, 230, nil, nil, 230, nil, nil, nil, nil, nil, 230, nil, nil, nil, +nil, nil, nil, nil, 230, nil, nil, nil, nil, 230, 230, 230, 230, 230, 230, +nil, nil, nil, 230, 230, nil, nil, nil, 231, 231, 231, 230, 231, nil, 230, +nil, 231, 231, nil, 230, 230, 231, nil, 231, 231, 231, 231, 231, 231, 231, +nil, nil, nil, nil, nil, 231, 231, 231, 231, 231, 231, 231, nil, nil, 231, +nil, nil, nil, nil, nil, nil, 231, nil, nil, 231, 231, nil, 231, 231, 231, +231, 231, nil, 231, 231, 231, nil, 231, 231, nil, 231, 231, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 231, nil, nil, 231, nil, nil, 231, nil, nil, 231, nil, nil, +nil, nil, nil, 231, nil, nil, nil, nil, nil, nil, nil, 231, nil, nil, nil, +nil, 231, 231, 231, 231, 231, 231, nil, nil, nil, 231, 231, nil, nil, nil, +232, 232, 232, 231, 232, nil, 231, nil, 232, 232, nil, 231, 231, 232, nil, +232, 232, 232, 232, 232, 232, 232, nil, nil, nil, nil, nil, 232, 232, 232, +232, 232, 232, 232, nil, nil, 232, nil, nil, nil, nil, nil, nil, 232, nil, +nil, 232, 232, nil, 232, 232, 232, 232, 232, nil, 232, 232, 232, nil, 232, +232, nil, 232, 232, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 232, nil, nil, 232, nil, +nil, 232, nil, nil, 232, nil, nil, nil, nil, nil, 232, nil, nil, nil, nil, +nil, nil, nil, 232, nil, nil, nil, nil, 232, 232, 232, 232, 232, 232, nil, +nil, nil, 232, 232, nil, nil, nil, 233, 233, 233, 232, 233, nil, 232, nil, +233, 233, nil, 232, 232, 233, nil, 233, 233, 233, 233, 233, 233, 233, nil, +nil, nil, nil, nil, 233, 233, 233, 233, 233, 233, 233, nil, nil, 233, nil, +nil, nil, nil, nil, nil, 233, nil, nil, 233, 233, nil, 233, 233, 233, 233, +233, nil, 233, 233, 233, nil, 233, 233, nil, 233, 233, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 233, nil, nil, 233, nil, nil, 233, nil, nil, 233, nil, nil, nil, +nil, nil, 233, nil, nil, nil, nil, nil, nil, nil, 233, nil, nil, nil, nil, +233, 233, 233, 233, 233, 233, nil, nil, nil, 233, 233, nil, nil, nil, 234, +234, 234, 233, 234, nil, 233, nil, 234, 234, nil, 233, 233, 234, nil, 234, +234, 234, 234, 234, 234, 234, nil, nil, nil, nil, nil, 234, 234, 234, 234, +234, 234, 234, nil, nil, 234, nil, nil, nil, nil, nil, nil, 234, nil, nil, +234, 234, nil, 234, 234, 234, 234, 234, nil, 234, 234, 234, nil, 234, 234, +nil, 234, 234, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 234, nil, nil, 234, nil, nil, +234, nil, nil, 234, nil, nil, nil, nil, nil, 234, nil, nil, nil, nil, nil, +nil, nil, 234, nil, nil, nil, nil, 234, 234, 234, 234, 234, 234, nil, nil, +nil, 234, 234, nil, nil, nil, 235, 235, 235, 234, 235, nil, 234, nil, 235, +235, nil, 234, 234, 235, nil, 235, 235, 235, 235, 235, 235, 235, nil, nil, +nil, nil, nil, 235, 235, 235, 235, 235, 235, 235, nil, nil, 235, nil, nil, +nil, nil, nil, nil, 235, nil, nil, 235, 235, nil, 235, 235, 235, 235, 235, +nil, 235, 235, 235, nil, 235, 235, nil, 235, 235, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 235, nil, nil, 235, nil, nil, 235, nil, nil, 235, nil, nil, nil, nil, +nil, 235, nil, nil, nil, nil, nil, nil, nil, 235, nil, nil, nil, nil, 235, +235, 235, 235, 235, 235, nil, nil, nil, 235, 235, nil, nil, nil, 236, 236, +236, 235, 236, nil, 235, nil, 236, 236, nil, 235, 235, 236, nil, 236, 236, +236, 236, 236, 236, 236, nil, nil, nil, nil, nil, 236, 236, 236, 236, 236, +236, 236, nil, nil, 236, nil, nil, nil, nil, nil, nil, 236, nil, nil, 236, +236, nil, 236, 236, 236, 236, 236, nil, 236, 236, 236, nil, 236, 236, nil, +236, 236, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 236, nil, nil, 236, nil, nil, 236, +nil, nil, 236, nil, nil, nil, nil, nil, 236, nil, nil, nil, nil, nil, nil, +nil, 236, nil, nil, nil, nil, 236, 236, 236, 236, 236, 236, nil, nil, nil, +236, 236, nil, nil, nil, 237, 237, 237, 236, 237, nil, 236, nil, 237, 237, +nil, 236, 236, 237, nil, 237, 237, 237, 237, 237, 237, 237, nil, nil, nil, +nil, nil, 237, 237, 237, 237, 237, 237, 237, nil, nil, 237, nil, nil, nil, +nil, nil, nil, 237, nil, nil, 237, 237, nil, 237, 237, 237, 237, 237, nil, +237, 237, 237, nil, 237, 237, nil, 237, 237, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +237, nil, nil, 237, nil, nil, 237, nil, nil, 237, nil, nil, nil, nil, nil, +237, nil, nil, nil, nil, nil, nil, nil, 237, nil, nil, nil, nil, 237, 237, +237, 237, 237, 237, nil, nil, nil, 237, 237, nil, nil, nil, 238, 238, 238, +237, 238, nil, 237, nil, 238, 238, nil, 237, 237, 238, nil, 238, 238, 238, +238, 238, 238, 238, nil, nil, nil, nil, nil, 238, 238, 238, 238, 238, 238, +238, nil, nil, 238, nil, nil, nil, nil, nil, nil, 238, nil, nil, 238, 238, +nil, 238, 238, 238, 238, 238, nil, 238, 238, 238, nil, 238, 238, nil, 238, +238, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 238, nil, nil, 238, nil, nil, 238, nil, +nil, 238, nil, nil, nil, nil, nil, 238, nil, nil, nil, nil, nil, nil, nil, +238, nil, nil, nil, nil, 238, 238, 238, 238, 238, 238, nil, nil, nil, 238, +238, nil, nil, nil, 239, 239, 239, 238, 239, nil, 238, nil, 239, 239, nil, +238, 238, 239, nil, 239, 239, 239, 239, 239, 239, 239, nil, nil, nil, nil, +nil, 239, 239, 239, 239, 239, 239, 239, nil, nil, 239, nil, nil, nil, nil, +nil, nil, 239, nil, nil, 239, 239, nil, 239, 239, 239, 239, 239, nil, 239, +239, 239, nil, 239, 239, nil, 239, 239, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 239, +nil, nil, 239, nil, nil, 239, nil, nil, 239, nil, nil, nil, nil, nil, 239, +nil, nil, nil, nil, nil, nil, nil, 239, nil, nil, nil, nil, 239, 239, 239, +239, 239, 239, nil, nil, nil, 239, 239, nil, nil, nil, 240, 240, 240, 239, +240, nil, 239, nil, 240, 240, nil, 239, 239, 240, nil, 240, 240, 240, 240, +240, 240, 240, nil, nil, nil, nil, nil, 240, 240, 240, 240, 240, 240, 240, +nil, nil, 240, nil, nil, nil, nil, nil, nil, 240, nil, nil, 240, 240, nil, +240, 240, 240, 240, 240, nil, 240, 240, 240, nil, 240, 240, nil, 240, 240, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 240, nil, nil, 240, nil, nil, 240, nil, nil, +240, nil, nil, nil, nil, nil, 240, nil, nil, nil, nil, nil, nil, nil, 240, +nil, nil, nil, nil, 240, 240, 240, 240, 240, 240, nil, nil, nil, 240, 240, +nil, nil, nil, 241, 241, 241, 240, 241, nil, 240, nil, 241, 241, nil, 240, +240, 241, nil, 241, 241, 241, 241, 241, 241, 241, nil, nil, nil, nil, nil, +241, 241, 241, 241, 241, 241, 241, nil, nil, 241, nil, nil, nil, nil, nil, +nil, 241, nil, nil, 241, 241, nil, 241, 241, 241, 241, 241, nil, 241, 241, +241, nil, 241, 241, nil, 241, 241, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 241, nil, +nil, 241, nil, nil, 241, nil, nil, 241, nil, nil, nil, nil, nil, 241, nil, +nil, nil, nil, nil, nil, nil, 241, nil, nil, nil, nil, 241, 241, 241, 241, +241, 241, nil, nil, nil, 241, 241, nil, nil, nil, 242, 242, 242, 241, 242, +nil, 241, nil, 242, 242, nil, 241, 241, 242, nil, 242, 242, 242, 242, 242, +242, 242, nil, nil, nil, nil, nil, 242, 242, 242, 242, 242, 242, 242, nil, +nil, 242, nil, nil, nil, nil, nil, nil, 242, nil, nil, 242, 242, nil, 242, +242, 242, 242, 242, nil, 242, 242, 242, nil, 242, 242, nil, 242, 242, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 242, nil, nil, 242, nil, nil, 242, nil, nil, 242, +nil, nil, nil, nil, nil, 242, nil, nil, nil, nil, nil, nil, nil, 242, nil, +nil, nil, nil, 242, 242, 242, 242, 242, 242, nil, nil, nil, 242, 242, nil, +nil, nil, 243, 243, 243, 242, 243, nil, 242, nil, 243, 243, nil, 242, 242, +243, nil, 243, 243, 243, 243, 243, 243, 243, nil, nil, nil, nil, nil, 243, +243, 243, 243, 243, 243, 243, nil, nil, 243, nil, nil, nil, nil, nil, nil, +243, nil, nil, 243, 243, nil, 243, 243, 243, 243, 243, nil, 243, 243, 243, +nil, 243, 243, nil, 243, 243, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 243, nil, nil, +243, nil, nil, 243, nil, nil, 243, nil, nil, nil, nil, nil, 243, nil, nil, +nil, nil, nil, nil, nil, 243, nil, nil, nil, nil, 243, 243, 243, 243, 243, +243, nil, nil, nil, 243, 243, nil, nil, nil, 244, 244, 244, 243, 244, nil, +243, nil, 244, 244, nil, 243, 243, 244, nil, 244, 244, 244, 244, 244, 244, +244, nil, nil, nil, nil, nil, 244, 244, 244, 244, 244, 244, 244, nil, nil, +244, nil, nil, nil, nil, nil, nil, 244, nil, nil, 244, 244, nil, 244, 244, +244, 244, 244, nil, 244, 244, 244, nil, 244, 244, nil, 244, 244, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 244, nil, nil, 244, nil, nil, 244, nil, nil, 244, nil, +nil, nil, nil, nil, 244, nil, nil, nil, nil, nil, nil, nil, 244, nil, nil, +nil, nil, 244, 244, 244, 244, 244, 244, nil, nil, nil, 244, 244, nil, nil, +nil, 245, 245, 245, 244, 245, nil, 244, nil, 245, 245, nil, 244, 244, 245, +nil, 245, 245, 245, 245, 245, 245, 245, nil, nil, nil, nil, nil, 245, 245, +245, 245, 245, 245, 245, nil, nil, 245, nil, nil, nil, nil, nil, nil, 245, +nil, nil, 245, 245, nil, 245, 245, 245, 245, 245, nil, 245, 245, 245, nil, +245, 245, nil, 245, 245, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 245, nil, nil, 245, +nil, nil, 245, nil, nil, 245, nil, nil, nil, nil, nil, 245, nil, nil, nil, +nil, nil, nil, nil, 245, nil, nil, nil, nil, 245, 245, 245, 245, 245, 245, +nil, nil, nil, 245, 245, nil, nil, nil, 254, 254, 254, 245, 254, nil, 245, +nil, 254, 254, nil, 245, 245, 254, nil, 254, 254, 254, 254, 254, 254, 254, +nil, nil, nil, nil, nil, 254, 254, 254, 254, 254, 254, 254, nil, nil, 254, +nil, nil, nil, nil, nil, nil, 254, nil, nil, 254, 254, nil, 254, 254, 254, +254, 254, nil, 254, 254, 254, nil, 254, 254, nil, 254, 254, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 254, nil, nil, 254, nil, nil, 254, nil, nil, 254, nil, nil, +nil, nil, nil, 254, nil, nil, nil, nil, nil, nil, nil, 254, nil, nil, nil, +nil, 254, 254, 254, 254, 254, 254, nil, nil, nil, 254, 254, nil, nil, nil, +256, 256, 256, 254, 256, nil, 254, nil, 256, 256, nil, 254, 254, 256, nil, +256, 256, 256, 256, 256, 256, 256, nil, nil, nil, nil, nil, 256, 256, 256, +256, 256, 256, 256, nil, nil, 256, nil, nil, nil, nil, nil, nil, 256, nil, +nil, 256, 256, nil, 256, 256, 256, 256, 256, nil, 256, 256, 256, nil, 256, +256, nil, 256, 256, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 256, nil, nil, 256, nil, +nil, 256, nil, nil, 256, nil, nil, nil, nil, nil, 256, nil, nil, nil, nil, +nil, nil, nil, 256, nil, nil, nil, nil, 256, 256, 256, 256, 256, 256, nil, +nil, nil, 256, 256, nil, nil, nil, 261, 261, 261, 256, 261, nil, 256, nil, +261, 261, nil, 256, 256, 261, nil, 261, 261, 261, 261, 261, 261, 261, nil, +nil, nil, nil, nil, 261, 261, 261, 261, 261, 261, 261, nil, nil, 261, nil, +nil, nil, nil, nil, nil, 261, nil, nil, 261, 261, nil, 261, 261, 261, 261, +261, nil, 261, 261, 261, nil, 261, 261, nil, 261, 261, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 261, nil, nil, 261, nil, nil, 261, nil, nil, 261, nil, nil, nil, +nil, nil, 261, nil, nil, nil, nil, nil, nil, nil, 261, nil, nil, nil, nil, +261, 261, 261, 261, 261, 261, nil, nil, nil, 261, 261, nil, nil, nil, 268, +268, 268, 261, 268, nil, 261, nil, 268, 268, nil, 261, 261, 268, nil, 268, +268, 268, 268, 268, 268, 268, nil, nil, nil, nil, nil, 268, 268, 268, 268, +268, 268, 268, nil, nil, 268, nil, nil, nil, nil, nil, nil, 268, nil, nil, +268, 268, nil, 268, 268, 268, 268, 268, 268, 268, 268, 268, nil, 268, 268, +nil, 268, 268, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 268, nil, nil, 268, nil, nil, +268, nil, nil, 268, nil, 268, nil, 268, nil, 268, nil, nil, nil, nil, nil, +nil, nil, 268, nil, nil, nil, nil, 268, 268, 268, 268, 268, 268, nil, nil, +nil, 268, 268, nil, nil, nil, 269, 269, 269, 268, 269, nil, 268, nil, 269, +269, nil, 268, 268, 269, nil, 269, 269, 269, 269, 269, 269, 269, nil, nil, +nil, nil, nil, 269, 269, 269, 269, 269, 269, 269, nil, nil, 269, nil, nil, +nil, nil, nil, nil, 269, nil, nil, 269, 269, nil, 269, 269, 269, 269, 269, +269, 269, 269, 269, nil, 269, 269, nil, 269, 269, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 269, nil, nil, 269, nil, nil, 269, nil, nil, 269, nil, 269, nil, 269, +nil, 269, nil, nil, nil, nil, nil, nil, nil, 269, nil, nil, nil, nil, 269, +269, 269, 269, 269, 269, nil, nil, nil, 269, 269, nil, nil, nil, 277, 277, +277, 269, 277, nil, 269, nil, 277, 277, nil, 269, 269, 277, nil, 277, 277, +277, 277, 277, 277, 277, nil, nil, nil, nil, nil, 277, 277, 277, 277, 277, +277, 277, nil, nil, 277, nil, nil, nil, nil, nil, nil, 277, nil, nil, 277, +277, nil, 277, 277, 277, 277, 277, 277, 277, 277, 277, nil, 277, 277, nil, +277, 277, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 277, nil, nil, 277, nil, 277, 277, +nil, nil, 277, nil, 277, nil, 277, nil, 277, nil, nil, nil, nil, nil, nil, +nil, 277, nil, nil, nil, nil, 277, 277, 277, 277, 277, 277, nil, nil, nil, +277, 277, nil, nil, nil, nil, nil, nil, 277, nil, nil, 277, nil, nil, nil, +nil, 277, 277, 281, 281, 281, 281, 281, nil, nil, nil, 281, 281, nil, nil, +nil, 281, nil, 281, 281, 281, 281, 281, 281, 281, nil, nil, nil, nil, nil, +281, 281, 281, 281, 281, 281, 281, nil, nil, 281, nil, nil, nil, nil, nil, +281, 281, nil, 281, 281, 281, nil, 281, 281, 281, 281, 281, nil, 281, 281, +281, nil, 281, 281, nil, 281, 281, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 281, nil, +nil, 281, nil, nil, 281, nil, nil, 281, nil, 281, nil, nil, nil, 281, nil, +nil, nil, nil, nil, nil, nil, 281, nil, nil, nil, nil, 281, 281, 281, 281, +281, 281, nil, nil, nil, 281, 281, nil, nil, nil, 285, 285, 285, 281, 285, +nil, 281, nil, 285, 285, nil, 281, 281, 285, nil, 285, 285, 285, 285, 285, +285, 285, nil, nil, nil, nil, nil, 285, 285, 285, 285, 285, 285, 285, nil, +nil, 285, nil, nil, nil, nil, nil, nil, 285, nil, nil, 285, 285, nil, 285, +285, 285, 285, 285, nil, 285, 285, 285, nil, 285, 285, 749, nil, 749, 749, +749, 749, 749, nil, nil, nil, nil, nil, nil, nil, nil, nil, 749, nil, nil, +nil, nil, nil, nil, nil, 285, nil, nil, 285, nil, nil, 285, nil, nil, 285, +nil, nil, nil, nil, nil, 749, nil, nil, nil, nil, nil, nil, nil, 749, 749, +749, 749, nil, 285, 285, 285, 285, 285, 285, nil, nil, nil, 285, 285, nil, +nil, nil, 285, nil, nil, 285, nil, nil, 285, nil, nil, nil, nil, 285, 285, +286, 286, 286, 286, 286, nil, nil, 749, 286, 286, nil, nil, nil, 286, nil, +286, 286, 286, 286, 286, 286, 286, nil, nil, nil, nil, nil, 286, 286, 286, +286, 286, 286, 286, nil, nil, 286, nil, nil, nil, nil, nil, 286, 286, nil, +286, 286, 286, nil, 286, 286, 286, 286, 286, nil, 286, 286, 286, nil, 286, +286, nil, 286, 286, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 286, nil, nil, 286, nil, +nil, 286, nil, nil, 286, nil, 286, nil, nil, nil, 286, nil, nil, nil, nil, +nil, nil, nil, 286, nil, nil, nil, nil, 286, 286, 286, 286, 286, 286, nil, +nil, nil, 286, 286, nil, nil, nil, 298, 298, 298, 286, 298, nil, 286, nil, +298, 298, nil, 286, 286, 298, nil, 298, 298, 298, 298, 298, 298, 298, nil, +nil, nil, nil, nil, 298, 298, 298, 298, 298, 298, 298, nil, nil, 298, nil, +nil, nil, nil, nil, nil, 298, nil, nil, 298, 298, nil, 298, 298, 298, 298, +298, nil, 298, 298, 298, nil, 298, 298, 56, nil, 56, 56, 56, nil, 56, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 298, nil, nil, 298, nil, nil, 298, nil, nil, 298, nil, nil, nil, +nil, nil, 56, 56, nil, nil, nil, nil, nil, nil, 56, 56, 56, 56, nil, +298, 298, 298, 298, 298, 298, nil, nil, nil, 298, 298, nil, nil, nil, 307, +307, 307, 298, 307, nil, 298, nil, 307, 307, nil, 298, 298, 307, nil, 307, +307, 307, 307, 307, 307, 307, nil, nil, nil, nil, nil, 307, 307, 307, 307, +307, 307, 307, nil, nil, 307, nil, nil, nil, nil, nil, nil, 307, nil, nil, +307, 307, nil, 307, 307, 307, 307, 307, nil, 307, 307, 307, nil, 307, 307, +nil, 307, 307, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 307, nil, nil, 307, 307, nil, +307, nil, nil, 307, nil, nil, nil, nil, nil, 307, nil, nil, nil, nil, nil, +nil, nil, 307, nil, nil, nil, nil, 307, 307, 307, 307, 307, 307, nil, nil, +nil, 307, 307, nil, nil, nil, nil, nil, nil, 307, nil, nil, 307, nil, nil, +nil, nil, 307, 307, 309, 309, 309, 309, 309, nil, nil, nil, 309, 309, nil, +nil, nil, 309, nil, 309, 309, 309, 309, 309, 309, 309, nil, nil, nil, nil, +nil, 309, 309, 309, 309, 309, 309, 309, nil, nil, 309, nil, nil, nil, nil, +nil, 309, 309, nil, 309, 309, 309, nil, 309, 309, 309, 309, 309, nil, 309, +309, 309, nil, 309, 309, nil, 309, 309, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 309, +nil, nil, 309, nil, nil, 309, nil, nil, 309, nil, 309, nil, nil, nil, 309, +nil, nil, nil, nil, nil, nil, nil, 309, nil, nil, nil, nil, 309, 309, 309, +309, 309, 309, nil, nil, nil, 309, 309, nil, nil, nil, 349, 349, 349, 309, +349, nil, 309, nil, 349, 349, nil, 309, 309, 349, nil, 349, 349, 349, 349, +349, 349, 349, nil, nil, nil, nil, nil, 349, 349, 349, 349, 349, 349, 349, +nil, nil, 349, nil, nil, nil, nil, nil, nil, 349, nil, nil, 349, 349, nil, +349, 349, 349, 349, 349, nil, 349, 349, 349, nil, 349, 349, nil, 349, 349, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 349, nil, nil, 349, nil, nil, 349, nil, nil, +349, nil, nil, nil, nil, nil, 349, nil, nil, nil, nil, nil, nil, nil, 349, +nil, nil, nil, nil, 349, 349, 349, 349, 349, 349, nil, nil, nil, 349, 349, +nil, nil, nil, 350, 350, 350, 349, 350, nil, 349, nil, 350, 350, nil, 349, +349, 350, nil, 350, 350, 350, 350, 350, 350, 350, nil, nil, nil, nil, nil, +350, 350, 350, 350, 350, 350, 350, nil, nil, 350, nil, nil, nil, nil, nil, +nil, 350, nil, nil, 350, 350, nil, 350, 350, 350, 350, 350, nil, 350, 350, +350, nil, 350, 350, nil, 350, 350, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 350, nil, +nil, 350, nil, nil, 350, nil, nil, 350, nil, nil, nil, nil, nil, 350, nil, +nil, nil, nil, nil, nil, nil, 350, nil, nil, nil, nil, 350, 350, 350, 350, +350, 350, nil, nil, nil, 350, 350, nil, nil, nil, 369, 369, 369, 350, 369, +nil, 350, nil, 369, 369, nil, 350, 350, 369, nil, 369, 369, 369, 369, 369, +369, 369, nil, nil, nil, nil, nil, 369, 369, 369, 369, 369, 369, 369, nil, +nil, 369, nil, nil, nil, nil, nil, nil, 369, nil, nil, 369, 369, nil, 369, +369, 369, 369, 369, nil, 369, 369, 369, nil, 369, 369, 322, nil, 322, 322, +322, nil, 322, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 369, nil, nil, 369, nil, nil, 369, nil, nil, 369, +nil, nil, nil, nil, nil, 322, nil, 322, nil, nil, nil, nil, nil, 322, 322, +322, 322, nil, 369, 369, 369, 369, 369, 369, nil, nil, nil, 369, 369, nil, +nil, nil, 381, 381, 381, 369, 381, nil, 369, nil, 381, 381, nil, 369, 369, +381, nil, 381, 381, 381, 381, 381, 381, 381, nil, nil, nil, nil, nil, 381, +381, 381, 381, 381, 381, 381, nil, nil, 381, nil, nil, nil, nil, nil, nil, +381, nil, nil, 381, 381, nil, 381, 381, 381, 381, 381, nil, 381, 381, 381, +nil, 381, 381, nil, 381, 381, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 381, nil, nil, +381, nil, nil, 381, nil, nil, 381, nil, nil, nil, nil, nil, 381, nil, nil, +nil, nil, nil, nil, nil, 381, nil, nil, nil, nil, 381, 381, 381, 381, 381, +381, nil, nil, nil, 381, 381, nil, nil, nil, 421, 421, 421, 381, 421, nil, +381, nil, 421, 421, nil, 381, 381, 421, nil, 421, 421, 421, 421, 421, 421, +421, nil, nil, nil, nil, nil, 421, 421, 421, 421, 421, 421, 421, nil, nil, +421, nil, nil, nil, nil, nil, nil, 421, nil, nil, 421, 421, nil, 421, 421, +421, 421, 421, nil, 421, 421, 421, nil, 421, 421, nil, 421, 421, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 421, nil, nil, 421, nil, nil, 421, nil, nil, 421, nil, +nil, nil, nil, nil, 421, nil, nil, nil, nil, nil, nil, nil, 421, nil, nil, +nil, nil, 421, 421, 421, 421, 421, 421, nil, nil, nil, 421, 421, nil, nil, +nil, 432, 432, 432, 421, 432, nil, 421, nil, 432, 432, nil, 421, 421, 432, +nil, 432, 432, 432, 432, 432, 432, 432, nil, nil, nil, nil, nil, 432, 432, +432, 432, 432, 432, 432, nil, nil, 432, nil, nil, nil, nil, nil, nil, 432, +nil, nil, 432, 432, nil, 432, 432, 432, 432, 432, 432, 432, 432, 432, nil, +432, 432, nil, 432, 432, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 432, nil, nil, 432, +432, nil, 432, nil, nil, 432, nil, 432, nil, 432, nil, 432, nil, nil, nil, +nil, nil, nil, nil, 432, nil, nil, nil, nil, 432, 432, 432, 432, 432, 432, +nil, nil, nil, 432, 432, nil, nil, nil, 440, 440, 440, 432, 440, nil, 432, +nil, 440, 440, nil, 432, 432, 440, nil, 440, 440, 440, 440, 440, 440, 440, +nil, nil, nil, nil, nil, 440, 440, 440, 440, 440, 440, 440, nil, nil, 440, +nil, nil, nil, nil, nil, nil, 440, nil, nil, 440, 440, nil, 440, 440, 440, +440, 440, 440, 440, 440, 440, nil, 440, 440, nil, 440, 440, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 440, nil, nil, 440, 440, nil, 440, nil, nil, 440, nil, 440, +nil, 440, nil, 440, nil, nil, nil, nil, nil, nil, nil, 440, nil, nil, nil, +nil, 440, 440, 440, 440, 440, 440, nil, nil, nil, 440, 440, nil, nil, nil, +441, 441, 441, 440, 441, nil, 440, nil, 441, 441, nil, 440, 440, 441, nil, +441, 441, 441, 441, 441, 441, 441, nil, nil, nil, nil, nil, 441, 441, 441, +441, 441, 441, 441, nil, nil, 441, nil, nil, nil, nil, nil, nil, 441, nil, +nil, 441, 441, nil, 441, 441, 441, 441, 441, 441, 441, 441, 441, nil, 441, +441, nil, 441, 441, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 441, nil, nil, 441, 441, +nil, 441, nil, nil, 441, nil, 441, nil, 441, nil, 441, nil, nil, nil, nil, +nil, nil, nil, 441, nil, nil, nil, nil, 441, 441, 441, 441, 441, 441, nil, +nil, nil, 441, 441, nil, nil, nil, 442, 442, 442, 441, 442, nil, 441, nil, +442, 442, nil, 441, 441, 442, nil, 442, 442, 442, 442, 442, 442, 442, nil, +nil, nil, nil, nil, 442, 442, 442, 442, 442, 442, 442, nil, nil, 442, nil, +nil, nil, nil, nil, nil, 442, nil, nil, 442, 442, nil, 442, 442, 442, 442, +442, 442, 442, 442, 442, nil, 442, 442, nil, 442, 442, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 442, nil, nil, 442, 442, nil, 442, nil, nil, 442, nil, 442, nil, +442, nil, 442, nil, nil, nil, nil, nil, nil, nil, 442, nil, nil, nil, nil, +442, 442, 442, 442, 442, 442, nil, nil, nil, 442, 442, nil, nil, nil, 451, +451, 451, 442, 451, nil, 442, nil, 451, 451, nil, 442, 442, 451, nil, 451, +451, 451, 451, 451, 451, 451, nil, nil, nil, nil, nil, 451, 451, 451, 451, +451, 451, 451, nil, nil, 451, nil, nil, nil, nil, nil, nil, 451, nil, nil, +451, 451, nil, 451, 451, 451, 451, 451, 451, 451, 451, 451, nil, 451, 451, +nil, 451, 451, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 451, nil, nil, 451, nil, nil, +451, nil, nil, 451, nil, 451, nil, nil, nil, 451, nil, nil, nil, nil, nil, +nil, nil, 451, nil, nil, nil, nil, 451, 451, 451, 451, 451, 451, nil, nil, +nil, 451, 451, nil, nil, nil, 452, 452, 452, 451, 452, nil, 451, nil, 452, +452, nil, 451, 451, 452, nil, 452, 452, 452, 452, 452, 452, 452, nil, nil, +nil, nil, nil, 452, 452, 452, 452, 452, 452, 452, nil, nil, 452, nil, nil, +nil, nil, nil, nil, 452, nil, nil, 452, 452, nil, 452, 452, 452, 452, 452, +452, 452, 452, 452, nil, 452, 452, nil, 452, 452, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 452, nil, nil, 452, nil, nil, 452, nil, nil, 452, nil, 452, nil, nil, +nil, 452, nil, nil, nil, nil, nil, nil, nil, 452, nil, nil, nil, nil, 452, +452, 452, 452, 452, 452, nil, nil, nil, 452, 452, nil, nil, nil, 454, 454, +454, 452, 454, nil, 452, nil, 454, 454, nil, 452, 452, 454, nil, 454, 454, +454, 454, 454, 454, 454, nil, nil, nil, nil, nil, 454, 454, 454, 454, 454, +454, 454, nil, nil, 454, nil, nil, nil, nil, nil, nil, 454, nil, nil, 454, +454, nil, 454, 454, 454, 454, 454, nil, 454, 454, 454, nil, 454, 454, nil, +454, 454, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 454, nil, nil, 454, nil, nil, 454, +nil, nil, 454, nil, nil, nil, nil, nil, 454, nil, nil, nil, nil, nil, nil, +nil, 454, nil, nil, nil, nil, 454, 454, 454, 454, 454, 454, nil, nil, nil, +454, 454, nil, nil, nil, 455, 455, 455, 454, 455, nil, 454, nil, 455, 455, +nil, 454, 454, 455, nil, 455, 455, 455, 455, 455, 455, 455, nil, nil, nil, +nil, nil, 455, 455, 455, 455, 455, 455, 455, nil, nil, 455, nil, nil, nil, +nil, nil, nil, 455, nil, nil, 455, 455, nil, 455, 455, 455, 455, 455, nil, +455, 455, 455, nil, 455, 455, nil, 455, 455, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +455, nil, nil, 455, nil, nil, 455, nil, nil, 455, nil, nil, nil, nil, nil, +455, nil, nil, nil, nil, nil, nil, nil, 455, nil, nil, nil, nil, 455, 455, +455, 455, 455, 455, nil, nil, nil, 455, 455, nil, nil, nil, 456, 456, 456, +455, 456, nil, 455, nil, 456, 456, nil, 455, 455, 456, nil, 456, 456, 456, +456, 456, 456, 456, nil, nil, nil, nil, nil, 456, 456, 456, 456, 456, 456, +456, nil, nil, 456, nil, nil, nil, nil, nil, nil, 456, nil, nil, 456, 456, +nil, 456, 456, 456, 456, 456, nil, 456, 456, 456, nil, 456, 456, nil, 456, +456, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 456, nil, nil, 456, nil, nil, 456, nil, +nil, 456, nil, nil, nil, nil, nil, 456, nil, nil, nil, nil, nil, nil, nil, +456, nil, nil, nil, nil, 456, 456, 456, 456, 456, 456, nil, nil, nil, 456, +456, nil, nil, nil, 487, 487, 487, 456, 487, nil, 456, nil, 487, 487, nil, +456, 456, 487, nil, 487, 487, 487, 487, 487, 487, 487, nil, nil, nil, nil, +nil, 487, 487, 487, 487, 487, 487, 487, nil, nil, 487, nil, nil, nil, nil, +nil, nil, 487, nil, nil, 487, 487, nil, 487, 487, 487, 487, 487, 487, 487, +487, 487, nil, 487, 487, nil, 487, 487, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 487, +nil, nil, 487, nil, nil, 487, nil, nil, 487, nil, 487, nil, 487, nil, 487, +nil, nil, nil, nil, nil, nil, nil, 487, nil, nil, nil, nil, 487, 487, 487, +487, 487, 487, nil, nil, nil, 487, 487, nil, nil, nil, 489, 489, 489, 487, +489, nil, 487, nil, 489, 489, nil, 487, 487, 489, nil, 489, 489, 489, 489, +489, 489, 489, nil, nil, nil, nil, nil, 489, 489, 489, 489, 489, 489, 489, +nil, nil, 489, nil, nil, nil, nil, nil, nil, 489, nil, nil, 489, 489, nil, +489, 489, 489, 489, 489, 489, 489, 489, 489, nil, 489, 489, nil, 489, 489, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 489, nil, nil, 489, nil, nil, 489, nil, nil, +489, nil, nil, nil, 489, nil, 489, nil, nil, nil, nil, nil, nil, nil, 489, +nil, nil, nil, nil, 489, 489, 489, 489, 489, 489, nil, nil, nil, 489, 489, +nil, nil, nil, 491, 491, 491, 489, 491, nil, 489, nil, 491, 491, nil, 489, +489, 491, nil, 491, 491, 491, 491, 491, 491, 491, nil, nil, nil, nil, nil, +491, 491, 491, 491, 491, 491, 491, nil, nil, 491, nil, nil, nil, nil, nil, +nil, 491, nil, nil, 491, 491, nil, 491, 491, 491, 491, 491, nil, 491, 491, +491, nil, 491, 491, nil, 491, 491, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 491, nil, +nil, 491, nil, nil, 491, nil, nil, 491, nil, nil, nil, nil, nil, 491, nil, +nil, nil, nil, nil, nil, nil, 491, nil, nil, nil, nil, 491, 491, 491, 491, +491, 491, nil, nil, nil, 491, 491, nil, nil, nil, 506, 506, 506, 491, 506, +nil, 491, nil, 506, 506, nil, 491, 491, 506, nil, 506, 506, 506, 506, 506, +506, 506, nil, nil, nil, nil, nil, 506, 506, 506, 506, 506, 506, 506, nil, +nil, 506, nil, nil, nil, nil, nil, nil, 506, nil, nil, 506, 506, nil, 506, +506, 506, 506, 506, nil, 506, 506, 506, nil, 506, 506, nil, 506, 506, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 506, nil, nil, 506, nil, 506, 506, nil, nil, 506, +nil, nil, nil, 506, nil, 506, nil, nil, nil, nil, nil, nil, nil, 506, nil, +nil, nil, nil, 506, 506, 506, 506, 506, 506, nil, nil, nil, 506, 506, nil, +nil, nil, nil, nil, nil, 506, nil, nil, 506, nil, nil, nil, nil, 506, 506, +512, 512, 512, 512, 512, nil, nil, nil, 512, 512, nil, nil, nil, 512, nil, +512, 512, 512, 512, 512, 512, 512, nil, nil, nil, nil, nil, 512, 512, 512, +512, 512, 512, 512, nil, nil, 512, nil, nil, nil, nil, nil, 512, 512, nil, +512, 512, 512, nil, 512, 512, 512, 512, 512, nil, 512, 512, 512, nil, 512, +512, nil, 512, 512, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 512, nil, nil, 512, nil, +nil, 512, nil, nil, 512, nil, 512, nil, nil, nil, 512, nil, nil, nil, nil, +nil, nil, nil, 512, nil, nil, nil, nil, 512, 512, 512, 512, 512, 512, nil, +nil, nil, 512, 512, nil, nil, nil, nil, nil, 512, 512, nil, nil, 512, nil, +nil, nil, nil, 512, 512, 518, 518, 518, nil, 518, nil, nil, nil, 518, 518, +nil, nil, nil, 518, nil, 518, 518, 518, 518, 518, 518, 518, nil, nil, nil, +nil, nil, 518, 518, 518, 518, 518, 518, 518, nil, nil, 518, nil, nil, nil, +nil, nil, nil, 518, nil, nil, 518, 518, nil, 518, 518, 518, 518, 518, nil, +518, 518, 518, nil, 518, 518, 559, nil, 559, 559, 559, nil, 559, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +518, nil, nil, 518, nil, nil, 518, nil, nil, 518, nil, nil, nil, nil, nil, +559, nil, nil, nil, nil, nil, nil, nil, 559, 559, 559, 559, nil, 518, 518, +518, 518, 518, 518, nil, nil, nil, 518, 518, nil, nil, nil, 520, 520, 520, +518, 520, nil, 518, nil, 520, 520, nil, 518, 518, 520, nil, 520, 520, 520, +520, 520, 520, 520, nil, nil, nil, nil, nil, 520, 520, 520, 520, 520, 520, +520, nil, nil, 520, nil, nil, nil, nil, nil, nil, 520, nil, nil, 520, 520, +nil, 520, 520, 520, 520, 520, 520, 520, 520, 520, nil, 520, 520, nil, 520, +520, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 520, nil, nil, 520, nil, nil, 520, nil, +nil, 520, nil, 520, nil, nil, nil, 520, nil, nil, nil, nil, nil, nil, nil, +520, nil, nil, nil, nil, 520, 520, 520, 520, 520, 520, nil, nil, nil, 520, +520, nil, nil, nil, 523, 523, 523, 520, 523, nil, 520, nil, 523, 523, nil, +520, 520, 523, nil, 523, 523, 523, 523, 523, 523, 523, nil, nil, nil, nil, +nil, 523, 523, 523, 523, 523, 523, 523, nil, nil, 523, nil, nil, nil, nil, +nil, nil, 523, nil, nil, 523, 523, nil, 523, 523, 523, 523, 523, 523, 523, +523, 523, nil, 523, 523, nil, 523, 523, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 523, +nil, nil, 523, nil, nil, 523, nil, nil, 523, nil, 523, nil, nil, nil, 523, +nil, nil, nil, nil, nil, nil, nil, 523, nil, nil, nil, nil, 523, 523, 523, +523, 523, 523, nil, nil, nil, 523, 523, nil, nil, nil, 531, 531, 531, 523, +531, nil, 523, nil, 531, 531, nil, 523, 523, 531, nil, 531, 531, 531, 531, +531, 531, 531, nil, nil, nil, nil, nil, 531, 531, 531, 531, 531, 531, 531, +nil, nil, 531, nil, nil, nil, nil, nil, nil, 531, nil, nil, 531, 531, nil, +531, 531, 531, 531, 531, nil, 531, 531, 531, nil, 531, 531, nil, 531, 531, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 531, nil, nil, 531, nil, nil, 531, nil, nil, +531, nil, nil, nil, nil, nil, 531, nil, nil, nil, nil, nil, nil, nil, 531, +nil, nil, nil, nil, 531, 531, 531, 531, 531, 531, nil, nil, nil, 531, 531, +nil, nil, nil, 532, 532, 532, 531, 532, nil, 531, nil, 532, 532, nil, 531, +531, 532, nil, 532, 532, 532, 532, 532, 532, 532, nil, nil, nil, nil, nil, +532, 532, 532, 532, 532, 532, 532, nil, nil, 532, nil, nil, nil, nil, nil, +nil, 532, nil, nil, 532, 532, nil, 532, 532, 532, 532, 532, nil, 532, 532, +532, nil, 532, 532, nil, 532, 532, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 532, nil, +nil, 532, nil, nil, 532, nil, nil, 532, nil, nil, nil, nil, nil, 532, nil, +nil, nil, nil, nil, nil, nil, 532, nil, nil, nil, nil, 532, 532, 532, 532, +532, 532, nil, nil, nil, 532, 532, nil, nil, nil, 533, 533, 533, 532, 533, +nil, 532, nil, 533, 533, nil, 532, 532, 533, nil, 533, 533, 533, 533, 533, +533, 533, nil, nil, nil, nil, nil, 533, 533, 533, 533, 533, 533, 533, nil, +nil, 533, nil, nil, nil, nil, nil, nil, 533, nil, nil, 533, 533, nil, 533, +533, 533, 533, 533, nil, 533, 533, 533, nil, 533, 533, nil, 533, 533, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 533, nil, nil, 533, nil, nil, 533, nil, nil, 533, +nil, nil, nil, nil, nil, 533, nil, nil, nil, nil, nil, nil, nil, 533, nil, +nil, nil, nil, 533, 533, 533, 533, 533, 533, nil, nil, nil, 533, 533, nil, +nil, nil, 537, 537, 537, 533, 537, nil, 533, nil, 537, 537, nil, 533, 533, +537, nil, 537, 537, 537, 537, 537, 537, 537, nil, nil, nil, nil, nil, 537, +537, 537, 537, 537, 537, 537, nil, nil, 537, nil, nil, nil, nil, nil, nil, +537, nil, nil, 537, 537, nil, 537, 537, 537, 537, 537, nil, 537, 537, 537, +nil, 537, 537, nil, 537, 537, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 537, nil, nil, +537, nil, nil, 537, nil, nil, 537, nil, nil, nil, nil, nil, 537, nil, nil, +nil, nil, nil, nil, nil, 537, nil, nil, nil, nil, 537, 537, 537, 537, 537, +537, nil, nil, nil, 537, 537, nil, nil, nil, 543, 543, 543, 537, 543, nil, +537, nil, 543, 543, nil, 537, 537, 543, nil, 543, 543, 543, 543, 543, 543, +543, nil, nil, nil, nil, nil, 543, 543, 543, 543, 543, 543, 543, nil, nil, +543, nil, nil, nil, nil, nil, nil, 543, nil, nil, 543, 543, nil, 543, 543, +543, 543, 543, 543, 543, 543, 543, nil, 543, 543, nil, 543, 543, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 543, nil, nil, 543, nil, nil, 543, nil, nil, 543, nil, +543, nil, nil, nil, 543, nil, nil, nil, nil, nil, nil, nil, 543, nil, nil, +nil, nil, 543, 543, 543, 543, 543, 543, nil, nil, nil, 543, 543, nil, nil, +nil, 546, 546, 546, 543, 546, nil, 543, nil, 546, 546, nil, 543, 543, 546, +nil, 546, 546, 546, 546, 546, 546, 546, nil, nil, nil, nil, nil, 546, 546, +546, 546, 546, 546, 546, nil, nil, 546, nil, nil, nil, nil, nil, nil, 546, +nil, nil, 546, 546, nil, 546, 546, 546, 546, 546, 546, 546, 546, 546, nil, +546, 546, nil, 546, 546, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 546, nil, nil, 546, +nil, nil, 546, nil, nil, 546, nil, nil, nil, nil, nil, 546, nil, nil, nil, +nil, nil, nil, nil, 546, nil, nil, nil, nil, 546, 546, 546, 546, 546, 546, +nil, nil, nil, 546, 546, nil, nil, nil, nil, nil, nil, 546, nil, nil, 546, +nil, nil, nil, nil, 546, 546, 551, 551, 551, 551, 551, nil, nil, nil, 551, +551, nil, nil, nil, 551, nil, 551, 551, 551, 551, 551, 551, 551, nil, nil, +nil, nil, nil, 551, 551, 551, 551, 551, 551, 551, nil, nil, 551, nil, nil, +nil, nil, nil, 551, 551, nil, 551, 551, 551, nil, 551, 551, 551, 551, 551, +nil, 551, 551, 551, nil, 551, 551, nil, 551, 551, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 551, nil, nil, 551, nil, nil, 551, nil, nil, 551, nil, 551, nil, nil, +nil, 551, nil, nil, nil, nil, nil, nil, nil, 551, nil, nil, nil, nil, 551, +551, 551, 551, 551, 551, nil, nil, nil, 551, 551, nil, nil, nil, nil, nil, +nil, 551, nil, nil, 551, nil, nil, nil, nil, 551, 551, 552, 552, 552, 552, +552, nil, nil, nil, 552, 552, nil, nil, nil, 552, nil, 552, 552, 552, 552, +552, 552, 552, nil, nil, nil, nil, nil, 552, 552, 552, 552, 552, 552, 552, +nil, nil, 552, nil, nil, nil, nil, nil, 552, 552, nil, 552, 552, 552, nil, +552, 552, 552, 552, 552, nil, 552, 552, 552, nil, 552, 552, nil, 552, 552, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 552, nil, nil, 552, nil, nil, 552, nil, nil, +552, nil, 552, nil, nil, nil, 552, nil, nil, nil, nil, nil, nil, nil, 552, +nil, nil, nil, nil, 552, 552, 552, 552, 552, 552, nil, nil, nil, 552, 552, +nil, nil, nil, 558, 558, 558, 552, 558, nil, 552, nil, 558, 558, nil, 552, +552, 558, nil, 558, 558, 558, 558, 558, 558, 558, nil, nil, nil, nil, nil, +558, 558, 558, 558, 558, 558, 558, nil, nil, 558, nil, nil, nil, nil, nil, +nil, 558, nil, nil, 558, 558, nil, 558, 558, 558, 558, 558, nil, 558, 558, +558, nil, 558, 558, 856, nil, 856, 856, 856, 856, 856, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 856, nil, nil, nil, nil, nil, nil, nil, 558, nil, +nil, 558, nil, nil, 558, nil, nil, 558, nil, nil, nil, nil, nil, 856, nil, +nil, nil, nil, nil, nil, nil, 856, 856, 856, 856, nil, 558, 558, 558, 558, +558, 558, nil, nil, nil, 558, 558, nil, nil, nil, nil, nil, nil, 558, nil, +nil, 558, nil, nil, nil, nil, 558, 558, 572, 572, 572, 572, 572, nil, nil, +856, 572, 572, nil, nil, nil, 572, nil, 572, 572, 572, 572, 572, 572, 572, +nil, nil, nil, nil, nil, 572, 572, 572, 572, 572, 572, 572, nil, nil, 572, +nil, nil, nil, nil, nil, 572, 572, nil, 572, 572, 572, nil, 572, 572, 572, +572, 572, nil, 572, 572, 572, nil, 572, 572, nil, 572, 572, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 572, nil, nil, 572, nil, nil, 572, nil, nil, 572, nil, 572, +nil, nil, nil, 572, nil, nil, nil, nil, nil, nil, nil, 572, nil, nil, nil, +nil, 572, 572, 572, 572, 572, 572, nil, nil, nil, 572, 572, nil, nil, nil, +nil, nil, nil, 572, nil, nil, 572, nil, nil, nil, nil, 572, 572, 576, 576, +576, 576, 576, nil, nil, nil, 576, 576, nil, nil, nil, 576, nil, 576, 576, +576, 576, 576, 576, 576, nil, nil, nil, nil, nil, 576, 576, 576, 576, 576, +576, 576, nil, nil, 576, nil, nil, nil, nil, nil, 576, 576, nil, 576, 576, +576, nil, 576, 576, 576, 576, 576, nil, 576, 576, 576, nil, 576, 576, nil, +576, 576, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 576, nil, nil, 576, nil, nil, 576, +nil, nil, 576, nil, 576, nil, nil, nil, 576, nil, nil, nil, nil, nil, nil, +nil, 576, nil, nil, nil, nil, 576, 576, 576, 576, 576, 576, nil, nil, nil, +576, 576, nil, nil, nil, nil, nil, nil, 576, nil, nil, 576, nil, nil, nil, +nil, 576, 576, 581, 581, 581, 581, 581, nil, nil, nil, 581, 581, nil, nil, +nil, 581, nil, 581, 581, 581, 581, 581, 581, 581, nil, nil, nil, nil, nil, +581, 581, 581, 581, 581, 581, 581, nil, nil, 581, nil, nil, nil, nil, nil, +581, 581, nil, 581, 581, 581, nil, 581, 581, 581, 581, 581, nil, 581, 581, +581, nil, 581, 581, nil, 581, 581, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 581, nil, +nil, 581, nil, nil, 581, nil, nil, 581, nil, 581, nil, nil, nil, 581, nil, +nil, nil, nil, nil, nil, nil, 581, nil, nil, nil, nil, 581, 581, 581, 581, +581, 581, nil, nil, nil, 581, 581, nil, nil, nil, 583, 583, 583, 581, 583, +nil, 581, nil, 583, 583, nil, 581, 581, 583, nil, 583, 583, 583, 583, 583, +583, 583, nil, nil, nil, nil, nil, 583, 583, 583, 583, 583, 583, 583, nil, +nil, 583, nil, nil, nil, nil, nil, nil, 583, nil, nil, 583, 583, nil, 583, +583, 583, 583, 583, 583, 583, 583, 583, nil, 583, 583, nil, 583, 583, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 583, nil, nil, 583, nil, nil, 583, nil, nil, 583, +nil, 583, nil, nil, nil, 583, nil, nil, nil, nil, nil, nil, nil, 583, nil, +nil, nil, nil, 583, 583, 583, 583, 583, 583, nil, nil, nil, 583, 583, nil, +nil, nil, 586, 586, 586, 583, 586, nil, 583, nil, 586, 586, nil, 583, 583, +586, nil, 586, 586, 586, 586, 586, 586, 586, nil, nil, nil, nil, nil, 586, +586, 586, 586, 586, 586, 586, nil, nil, 586, nil, nil, nil, nil, nil, nil, +586, nil, nil, 586, 586, nil, 586, 586, 586, 586, 586, 586, 586, 586, 586, +nil, 586, 586, nil, 586, 586, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 586, nil, nil, +586, nil, nil, 586, nil, nil, 586, nil, 586, nil, nil, nil, 586, nil, nil, +nil, nil, nil, nil, nil, 586, nil, nil, nil, nil, 586, 586, 586, 586, 586, +586, nil, nil, nil, 586, 586, nil, nil, nil, 592, 592, 592, 586, 592, nil, +586, nil, 592, 592, nil, 586, 586, 592, nil, 592, 592, 592, 592, 592, 592, +592, nil, nil, nil, nil, nil, 592, 592, 592, 592, 592, 592, 592, nil, nil, +592, nil, nil, nil, nil, nil, nil, 592, nil, nil, 592, 592, nil, 592, 592, +592, 592, 592, 592, 592, 592, 592, nil, 592, 592, nil, 592, 592, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 592, nil, nil, 592, nil, nil, 592, nil, nil, 592, nil, +592, nil, nil, nil, 592, nil, nil, nil, nil, nil, nil, nil, 592, nil, nil, +nil, nil, 592, 592, 592, 592, 592, 592, nil, nil, nil, 592, 592, nil, nil, +nil, 596, 596, 596, 592, 596, nil, 592, nil, 596, 596, nil, 592, 592, 596, +nil, 596, 596, 596, 596, 596, 596, 596, nil, nil, nil, nil, nil, 596, 596, +596, 596, 596, 596, 596, nil, nil, 596, nil, nil, nil, nil, nil, nil, 596, +nil, nil, 596, 596, nil, 596, 596, 596, 596, 596, nil, 596, 596, 596, nil, +596, 596, nil, 596, 596, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 596, nil, nil, 596, +nil, nil, 596, nil, nil, 596, nil, nil, nil, nil, nil, 596, nil, nil, nil, +nil, nil, nil, nil, 596, nil, nil, nil, nil, 596, 596, 596, 596, 596, 596, +nil, nil, nil, 596, 596, nil, nil, nil, 598, 598, 598, 596, 598, nil, 596, +nil, 598, 598, nil, 596, 596, 598, nil, 598, 598, 598, 598, 598, 598, 598, +nil, nil, nil, nil, nil, 598, 598, 598, 598, 598, 598, 598, nil, nil, 598, +nil, nil, nil, nil, nil, nil, 598, nil, nil, 598, 598, nil, 598, 598, 598, +598, 598, nil, 598, 598, 598, nil, 598, 598, nil, 598, 598, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 598, nil, nil, 598, nil, nil, 598, nil, nil, 598, nil, nil, +nil, nil, nil, 598, nil, nil, nil, nil, nil, nil, nil, 598, nil, nil, nil, +nil, 598, 598, 598, 598, 598, 598, nil, nil, nil, 598, 598, nil, nil, nil, +625, 625, 625, 598, 625, nil, 598, nil, 625, 625, nil, 598, 598, 625, nil, +625, 625, 625, 625, 625, 625, 625, nil, nil, nil, nil, nil, 625, 625, 625, +625, 625, 625, 625, nil, nil, 625, nil, nil, nil, nil, nil, nil, 625, nil, +nil, 625, 625, nil, 625, 625, 625, 625, 625, nil, 625, 625, 625, nil, 625, +625, nil, 625, 625, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 625, nil, nil, 625, nil, +nil, 625, nil, nil, 625, nil, nil, nil, nil, nil, 625, nil, nil, nil, nil, +nil, nil, nil, 625, nil, nil, nil, nil, 625, 625, 625, 625, 625, 625, nil, +nil, nil, 625, 625, nil, nil, nil, 627, 627, 627, 625, 627, nil, 625, nil, +627, 627, nil, 625, 625, 627, nil, 627, 627, 627, 627, 627, 627, 627, nil, +nil, nil, nil, nil, 627, 627, 627, 627, 627, 627, 627, nil, nil, 627, nil, +nil, nil, nil, nil, nil, 627, nil, nil, 627, 627, nil, 627, 627, 627, 627, +627, nil, 627, 627, 627, nil, 627, 627, nil, 627, 627, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 627, nil, nil, 627, nil, nil, 627, nil, nil, 627, nil, 627, nil, +nil, nil, 627, nil, nil, nil, nil, nil, nil, nil, 627, nil, nil, nil, nil, +627, 627, 627, 627, 627, 627, nil, nil, nil, 627, 627, nil, nil, nil, 630, +630, 630, 627, 630, nil, 627, nil, 630, 630, nil, 627, 627, 630, nil, 630, +630, 630, 630, 630, 630, 630, nil, nil, nil, nil, nil, 630, 630, 630, 630, +630, 630, 630, nil, nil, 630, nil, nil, nil, nil, nil, nil, 630, nil, nil, +630, 630, nil, 630, 630, 630, 630, 630, nil, 630, 630, 630, nil, 630, 630, +nil, 630, 630, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 630, nil, nil, 630, nil, nil, +630, nil, nil, 630, nil, nil, nil, nil, nil, 630, nil, nil, nil, nil, nil, +nil, nil, 630, nil, nil, nil, nil, 630, 630, 630, 630, 630, 630, nil, nil, +nil, 630, 630, nil, nil, nil, 631, 631, 631, 630, 631, nil, 630, nil, 631, +631, nil, 630, 630, 631, nil, 631, 631, 631, 631, 631, 631, 631, nil, nil, +nil, nil, nil, 631, 631, 631, 631, 631, 631, 631, nil, nil, 631, nil, nil, +nil, nil, nil, nil, 631, nil, nil, 631, 631, nil, 631, 631, 631, 631, 631, +nil, 631, 631, 631, nil, 631, 631, nil, 631, 631, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 631, nil, nil, 631, nil, nil, 631, nil, nil, 631, nil, nil, nil, nil, +nil, 631, nil, nil, nil, nil, nil, nil, nil, 631, nil, nil, nil, nil, 631, +631, 631, 631, 631, 631, nil, nil, nil, 631, 631, nil, nil, nil, 636, 636, +636, 631, 636, nil, 631, nil, 636, 636, nil, 631, 631, 636, nil, 636, 636, +636, 636, 636, 636, 636, nil, nil, nil, nil, nil, 636, 636, 636, 636, 636, +636, 636, nil, nil, 636, nil, nil, nil, nil, nil, nil, 636, nil, nil, 636, +636, nil, 636, 636, 636, 636, 636, nil, 636, 636, 636, nil, 636, 636, nil, +636, 636, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 636, nil, nil, 636, nil, nil, 636, +nil, nil, 636, nil, nil, nil, nil, nil, 636, nil, nil, nil, nil, nil, nil, +nil, 636, nil, nil, nil, nil, 636, 636, 636, 636, 636, 636, nil, nil, nil, +636, 636, nil, nil, nil, 639, 639, 639, 636, 639, nil, 636, nil, 639, 639, +nil, 636, 636, 639, nil, 639, 639, 639, 639, 639, 639, 639, nil, nil, nil, +nil, nil, 639, 639, 639, 639, 639, 639, 639, nil, nil, 639, nil, nil, nil, +nil, nil, nil, 639, nil, nil, 639, 639, nil, 639, 639, 639, 639, 639, nil, +639, 639, 639, nil, 639, 639, nil, 639, 639, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +639, nil, nil, 639, nil, nil, 639, nil, nil, 639, nil, nil, nil, nil, nil, +639, nil, nil, nil, nil, nil, nil, nil, 639, nil, nil, nil, nil, 639, 639, +639, 639, 639, 639, nil, nil, nil, 639, 639, nil, nil, nil, 650, 650, 650, +639, 650, nil, 639, nil, 650, 650, nil, 639, 639, 650, nil, 650, 650, 650, +650, 650, 650, 650, nil, nil, nil, nil, nil, 650, 650, 650, 650, 650, 650, +650, nil, nil, 650, nil, nil, nil, nil, nil, nil, 650, nil, nil, 650, 650, +nil, 650, 650, 650, 650, 650, nil, 650, 650, 650, nil, 650, 650, nil, 650, +650, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 650, nil, nil, 650, nil, nil, 650, nil, +nil, 650, nil, nil, nil, nil, nil, 650, nil, nil, nil, nil, nil, nil, nil, +650, nil, nil, nil, nil, 650, 650, 650, 650, 650, 650, nil, nil, nil, 650, +650, nil, nil, nil, nil, nil, nil, 650, nil, nil, 650, nil, nil, nil, nil, +650, 650, 654, 654, 654, 654, 654, nil, nil, nil, 654, 654, nil, nil, nil, +654, nil, 654, 654, 654, 654, 654, 654, 654, nil, nil, nil, nil, nil, 654, +654, 654, 654, 654, 654, 654, nil, nil, 654, nil, nil, nil, nil, nil, 654, +654, nil, 654, 654, 654, nil, 654, 654, 654, 654, 654, nil, 654, 654, 654, +nil, 654, 654, nil, 654, 654, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 654, nil, nil, +654, nil, nil, 654, nil, nil, 654, nil, 654, nil, nil, nil, 654, nil, nil, +nil, nil, nil, nil, nil, 654, nil, nil, nil, nil, 654, 654, 654, 654, 654, +654, nil, nil, nil, 654, 654, nil, nil, nil, 658, 658, 658, 654, 658, nil, +654, nil, 658, 658, nil, 654, 654, 658, nil, 658, 658, 658, 658, 658, 658, +658, nil, nil, nil, nil, nil, 658, 658, 658, 658, 658, 658, 658, nil, nil, +658, nil, nil, nil, nil, nil, nil, 658, nil, nil, 658, 658, nil, 658, 658, +658, 658, 658, nil, 658, 658, 658, nil, 658, 658, nil, 658, 658, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 658, nil, nil, 658, nil, nil, 658, nil, nil, 658, nil, +nil, nil, nil, nil, 658, nil, nil, nil, nil, nil, nil, nil, 658, nil, nil, +nil, nil, 658, 658, 658, 658, 658, 658, nil, nil, nil, 658, 658, nil, nil, +nil, nil, nil, nil, 658, nil, nil, 658, nil, nil, nil, nil, 658, 658, 667, +667, 667, 667, 667, nil, nil, nil, 667, 667, nil, nil, nil, 667, nil, 667, +667, 667, 667, 667, 667, 667, nil, nil, nil, nil, nil, 667, 667, 667, 667, +667, 667, 667, nil, nil, 667, nil, nil, nil, nil, nil, 667, 667, nil, 667, +667, 667, nil, 667, 667, 667, 667, 667, nil, 667, 667, 667, nil, 667, 667, +nil, 667, 667, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 667, nil, nil, 667, nil, nil, +667, nil, nil, 667, nil, 667, nil, nil, nil, 667, nil, nil, nil, nil, nil, +nil, nil, 667, nil, nil, nil, nil, 667, 667, 667, 667, 667, 667, nil, nil, +nil, 667, 667, nil, nil, nil, 670, 670, 670, 667, 670, nil, 667, nil, 670, +670, nil, 667, 667, 670, nil, 670, 670, 670, 670, 670, 670, 670, nil, nil, +nil, nil, nil, 670, 670, 670, 670, 670, 670, 670, nil, nil, 670, nil, nil, +nil, nil, nil, nil, 670, nil, nil, 670, 670, nil, 670, 670, 670, 670, 670, +670, 670, 670, 670, nil, 670, 670, nil, 670, 670, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 670, nil, nil, 670, nil, nil, 670, nil, nil, 670, nil, 670, nil, 670, +nil, 670, nil, nil, nil, nil, nil, nil, nil, 670, nil, nil, nil, nil, 670, +670, 670, 670, 670, 670, nil, nil, nil, 670, 670, nil, nil, nil, 671, 671, +671, 670, 671, nil, 670, nil, 671, 671, nil, 670, 670, 671, nil, 671, 671, +671, 671, 671, 671, 671, nil, nil, nil, nil, nil, 671, 671, 671, 671, 671, +671, 671, nil, nil, 671, nil, nil, nil, nil, nil, nil, 671, nil, nil, 671, +671, nil, 671, 671, 671, 671, 671, 671, 671, 671, 671, nil, 671, 671, nil, +671, 671, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 671, nil, nil, 671, nil, nil, 671, +nil, nil, 671, nil, nil, nil, 671, nil, 671, nil, nil, nil, nil, nil, nil, +nil, 671, nil, nil, nil, nil, 671, 671, 671, 671, 671, 671, nil, nil, nil, +671, 671, nil, nil, nil, nil, nil, nil, 671, nil, nil, 671, nil, nil, nil, +nil, 671, 671, 677, 677, 677, 677, 677, nil, nil, nil, 677, 677, nil, nil, +nil, 677, nil, 677, 677, 677, 677, 677, 677, 677, nil, nil, nil, nil, nil, +677, 677, 677, 677, 677, 677, 677, nil, nil, 677, nil, nil, nil, nil, nil, +677, 677, nil, 677, 677, 677, nil, 677, 677, 677, 677, 677, nil, 677, 677, +677, nil, 677, 677, nil, 677, 677, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 677, nil, +nil, 677, nil, nil, 677, nil, nil, 677, nil, 677, nil, nil, nil, 677, nil, +nil, nil, nil, nil, nil, nil, 677, nil, nil, nil, nil, 677, 677, 677, 677, +677, 677, nil, nil, nil, 677, 677, nil, nil, nil, nil, nil, nil, 677, nil, +nil, 677, nil, nil, nil, nil, 677, 677, 678, 678, 678, 678, 678, nil, nil, +nil, 678, 678, nil, nil, nil, 678, nil, 678, 678, 678, 678, 678, 678, 678, +nil, nil, nil, nil, nil, 678, 678, 678, 678, 678, 678, 678, nil, nil, 678, +nil, nil, nil, nil, nil, 678, 678, nil, 678, 678, 678, nil, 678, 678, 678, +678, 678, nil, 678, 678, 678, nil, 678, 678, nil, 678, 678, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 678, nil, nil, 678, nil, nil, 678, nil, nil, 678, nil, 678, +nil, nil, nil, 678, nil, nil, nil, nil, nil, nil, nil, 678, nil, nil, nil, +nil, 678, 678, 678, 678, 678, 678, nil, nil, nil, 678, 678, nil, nil, nil, +682, 682, 682, 678, 682, nil, 678, nil, 682, 682, nil, 678, 678, 682, nil, +682, 682, 682, 682, 682, 682, 682, nil, nil, nil, nil, nil, 682, 682, 682, +682, 682, 682, 682, nil, nil, 682, nil, nil, nil, nil, nil, nil, 682, nil, +nil, 682, 682, nil, 682, 682, 682, 682, 682, nil, 682, 682, 682, nil, 682, +682, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 682, nil, nil, 682, nil, +nil, 682, nil, nil, 682, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 682, 682, 682, 682, 682, 682, nil, +nil, nil, 682, 682, nil, nil, nil, 694, 694, 694, 682, 694, nil, 682, nil, +694, 694, nil, 682, 682, 694, nil, 694, 694, 694, 694, 694, 694, 694, nil, +nil, nil, nil, nil, 694, 694, 694, 694, 694, 694, 694, nil, nil, 694, nil, +nil, nil, nil, nil, nil, 694, nil, nil, 694, 694, nil, 694, 694, 694, 694, +694, nil, 694, 694, 694, nil, 694, 694, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 694, nil, nil, 694, nil, nil, 694, nil, nil, 694, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +694, 694, 694, 694, 694, 694, nil, nil, nil, 694, 694, nil, nil, nil, 700, +700, 700, 694, 700, nil, 694, nil, 700, 700, nil, 694, 694, 700, nil, 700, +700, 700, 700, 700, 700, 700, nil, nil, nil, nil, nil, 700, 700, 700, 700, +700, 700, 700, nil, nil, 700, nil, nil, nil, nil, nil, nil, 700, nil, nil, +700, 700, nil, 700, 700, 700, 700, 700, nil, 700, 700, 700, nil, 700, 700, +nil, 700, 700, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 700, nil, nil, 700, nil, nil, +700, nil, nil, 700, nil, 700, nil, nil, nil, 700, nil, nil, nil, nil, nil, +nil, nil, 700, nil, nil, nil, nil, 700, 700, 700, 700, 700, 700, nil, nil, +nil, 700, 700, nil, nil, nil, 731, 731, 731, 700, 731, nil, 700, nil, 731, +731, nil, 700, 700, 731, nil, 731, 731, 731, 731, 731, 731, 731, nil, nil, +nil, nil, nil, 731, 731, 731, 731, 731, 731, 731, nil, nil, 731, nil, nil, +nil, nil, nil, nil, 731, nil, nil, 731, 731, nil, 731, 731, 731, 731, 731, +nil, 731, 731, 731, nil, 731, 731, nil, 731, 731, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 731, nil, nil, 731, nil, nil, 731, nil, nil, 731, nil, 731, nil, nil, +nil, 731, nil, nil, nil, nil, nil, nil, nil, 731, nil, nil, nil, nil, 731, +731, 731, 731, 731, 731, nil, nil, nil, 731, 731, nil, nil, nil, 738, 738, +738, 731, 738, nil, 731, nil, 738, 738, nil, 731, 731, 738, nil, 738, 738, +738, 738, 738, 738, 738, nil, nil, nil, nil, nil, 738, 738, 738, 738, 738, +738, 738, nil, nil, 738, nil, nil, nil, nil, nil, nil, 738, nil, nil, 738, +738, nil, 738, 738, 738, 738, 738, nil, 738, 738, 738, nil, 738, 738, nil, +738, 738, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 738, nil, nil, 738, nil, nil, 738, +nil, nil, 738, nil, nil, nil, nil, nil, 738, nil, nil, nil, nil, nil, nil, +nil, 738, nil, nil, nil, nil, 738, 738, 738, 738, 738, 738, nil, nil, nil, +738, 738, nil, nil, nil, nil, nil, nil, 738, nil, nil, 738, nil, nil, nil, +nil, 738, 738, 743, 743, 743, 743, 743, nil, nil, nil, 743, 743, nil, nil, +nil, 743, nil, 743, 743, 743, 743, 743, 743, 743, nil, nil, nil, nil, nil, +743, 743, 743, 743, 743, 743, 743, nil, nil, 743, nil, nil, nil, nil, nil, +743, 743, nil, 743, 743, 743, nil, 743, 743, 743, 743, 743, nil, 743, 743, +743, nil, 743, 743, nil, 743, 743, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 743, nil, +nil, 743, nil, nil, 743, nil, nil, 743, nil, 743, nil, nil, nil, 743, nil, +nil, nil, nil, nil, nil, nil, 743, nil, nil, nil, nil, 743, 743, 743, 743, +743, 743, nil, nil, nil, 743, 743, nil, nil, nil, nil, nil, nil, 743, nil, +nil, 743, nil, nil, nil, nil, 743, 743, 747, 747, 747, 747, 747, nil, nil, +nil, 747, 747, nil, nil, nil, 747, nil, 747, 747, 747, 747, 747, 747, 747, +nil, nil, nil, nil, nil, 747, 747, 747, 747, 747, 747, 747, nil, nil, 747, +nil, nil, nil, nil, nil, 747, 747, nil, 747, 747, 747, nil, 747, 747, 747, +747, 747, nil, 747, 747, 747, nil, 747, 747, nil, 747, 747, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 747, nil, nil, 747, nil, nil, 747, nil, nil, 747, nil, 747, +nil, nil, nil, 747, nil, nil, nil, nil, nil, nil, nil, 747, nil, nil, nil, +nil, 747, 747, 747, 747, 747, 747, nil, nil, nil, 747, 747, nil, nil, nil, +nil, nil, nil, 747, nil, nil, 747, nil, nil, nil, nil, 747, 747, 748, 748, +748, 748, 748, nil, nil, nil, 748, 748, nil, nil, nil, 748, nil, 748, 748, +748, 748, 748, 748, 748, nil, nil, nil, nil, nil, 748, 748, 748, 748, 748, +748, 748, nil, nil, 748, nil, nil, nil, nil, nil, 748, 748, nil, 748, 748, +748, nil, 748, 748, 748, 748, 748, nil, 748, 748, 748, nil, 748, 748, nil, +748, 748, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 748, nil, nil, 748, nil, nil, 748, +nil, nil, 748, nil, 748, nil, nil, nil, 748, nil, nil, nil, nil, nil, nil, +nil, 748, nil, nil, nil, nil, 748, 748, 748, 748, 748, 748, nil, nil, nil, +748, 748, nil, nil, nil, 755, 755, 755, 748, 755, nil, 748, nil, 755, 755, +nil, 748, 748, 755, nil, 755, 755, 755, 755, 755, 755, 755, nil, nil, nil, +nil, nil, 755, 755, 755, 755, 755, 755, 755, nil, nil, 755, nil, nil, nil, +nil, nil, nil, 755, nil, nil, 755, 755, nil, 755, 755, 755, 755, 755, nil, +755, 755, 755, nil, 755, 755, nil, 755, 755, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +755, nil, nil, 755, nil, nil, 755, nil, nil, 755, nil, nil, nil, nil, nil, +755, nil, nil, nil, nil, nil, nil, nil, 755, nil, nil, nil, nil, 755, 755, +755, 755, 755, 755, nil, nil, nil, 755, 755, nil, nil, nil, nil, nil, nil, +755, nil, nil, 755, nil, nil, nil, nil, 755, 755, 769, 769, 769, 769, 769, +nil, nil, nil, 769, 769, nil, nil, nil, 769, nil, 769, 769, 769, 769, 769, +769, 769, nil, nil, nil, nil, nil, 769, 769, 769, 769, 769, 769, 769, nil, +nil, 769, nil, nil, nil, nil, nil, 769, 769, nil, 769, 769, 769, nil, 769, +769, 769, 769, 769, nil, 769, 769, 769, nil, 769, 769, nil, 769, 769, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 769, nil, nil, 769, nil, nil, 769, nil, nil, 769, +nil, 769, nil, nil, nil, 769, nil, nil, nil, nil, nil, nil, nil, 769, nil, +nil, nil, nil, 769, 769, 769, 769, 769, 769, nil, nil, nil, 769, 769, nil, +nil, nil, 775, 775, 775, 769, 775, nil, 769, nil, 775, 775, nil, 769, 769, +775, nil, 775, 775, 775, 775, 775, 775, 775, nil, nil, nil, nil, nil, 775, +775, 775, 775, 775, 775, 775, nil, nil, 775, nil, nil, nil, nil, nil, nil, +775, nil, nil, 775, 775, nil, 775, 775, 775, 775, 775, nil, 775, 775, 775, +nil, 775, 775, nil, 775, 775, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 775, nil, nil, +775, nil, nil, 775, nil, nil, 775, nil, nil, nil, nil, nil, 775, nil, nil, +nil, nil, nil, nil, nil, 775, nil, nil, nil, nil, 775, 775, 775, 775, 775, +775, nil, nil, nil, 775, 775, nil, nil, nil, 776, 776, 776, 775, 776, nil, +775, nil, 776, 776, nil, 775, 775, 776, nil, 776, 776, 776, 776, 776, 776, +776, nil, nil, nil, nil, nil, 776, 776, 776, 776, 776, 776, 776, nil, nil, +776, nil, nil, nil, nil, nil, nil, 776, nil, nil, 776, 776, nil, 776, 776, +776, 776, 776, nil, 776, 776, 776, nil, 776, 776, nil, 776, 776, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 776, nil, nil, 776, nil, nil, 776, nil, nil, 776, nil, +nil, nil, nil, nil, 776, nil, nil, nil, nil, nil, nil, nil, 776, nil, nil, +nil, nil, 776, 776, 776, 776, 776, 776, nil, nil, nil, 776, 776, nil, nil, +nil, 777, 777, 777, 776, 777, nil, 776, nil, 777, 777, nil, 776, 776, 777, +nil, 777, 777, 777, 777, 777, 777, 777, nil, nil, nil, nil, nil, 777, 777, +777, 777, 777, 777, 777, nil, nil, 777, nil, nil, nil, nil, nil, nil, 777, +nil, nil, 777, 777, nil, 777, 777, 777, 777, 777, nil, 777, 777, 777, nil, +777, 777, nil, 777, 777, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 777, nil, nil, 777, +nil, nil, 777, nil, nil, 777, nil, nil, nil, nil, nil, 777, nil, nil, nil, +nil, nil, nil, nil, 777, nil, nil, nil, nil, 777, 777, 777, 777, 777, 777, +nil, nil, nil, 777, 777, nil, nil, nil, 788, 788, 788, 777, 788, nil, 777, +nil, 788, 788, nil, 777, 777, 788, nil, 788, 788, 788, 788, 788, 788, 788, +nil, nil, nil, nil, nil, 788, 788, 788, 788, 788, 788, 788, nil, nil, 788, +nil, nil, nil, nil, nil, nil, 788, nil, nil, 788, 788, nil, 788, 788, 788, +788, 788, nil, 788, 788, 788, nil, 788, 788, nil, 788, 788, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 788, nil, nil, 788, nil, nil, 788, nil, nil, 788, nil, nil, +nil, nil, nil, 788, nil, nil, nil, nil, nil, nil, nil, 788, nil, nil, nil, +nil, 788, 788, 788, 788, 788, 788, nil, nil, nil, 788, 788, nil, nil, nil, +789, 789, 789, 788, 789, nil, 788, nil, 789, 789, nil, 788, 788, 789, nil, +789, 789, 789, 789, 789, 789, 789, nil, nil, nil, nil, nil, 789, 789, 789, +789, 789, 789, 789, nil, nil, 789, nil, nil, nil, nil, nil, nil, 789, nil, +nil, 789, 789, nil, 789, 789, 789, 789, 789, nil, 789, 789, 789, nil, 789, +789, nil, 789, 789, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 789, nil, nil, 789, nil, +nil, 789, nil, nil, 789, nil, nil, nil, nil, nil, 789, nil, nil, nil, nil, +nil, nil, nil, 789, nil, nil, nil, nil, 789, 789, 789, 789, 789, 789, nil, +nil, nil, 789, 789, nil, nil, nil, 790, 790, 790, 789, 790, nil, 789, nil, +790, 790, nil, 789, 789, 790, nil, 790, 790, 790, 790, 790, 790, 790, nil, +nil, nil, nil, nil, 790, 790, 790, 790, 790, 790, 790, nil, nil, 790, nil, +nil, nil, nil, nil, nil, 790, nil, nil, 790, 790, nil, 790, 790, 790, 790, +790, nil, 790, 790, 790, nil, 790, 790, nil, 790, 790, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 790, nil, nil, 790, nil, nil, 790, nil, nil, 790, nil, nil, nil, +nil, nil, 790, nil, nil, nil, nil, nil, nil, nil, 790, nil, nil, nil, nil, +790, 790, 790, 790, 790, 790, nil, nil, nil, 790, 790, nil, nil, nil, 802, +802, 802, 790, 802, nil, 790, nil, 802, 802, nil, 790, 790, 802, nil, 802, +802, 802, 802, 802, 802, 802, nil, nil, nil, nil, nil, 802, 802, 802, 802, +802, 802, 802, nil, nil, 802, nil, nil, nil, nil, nil, nil, 802, nil, nil, +802, 802, nil, 802, 802, 802, 802, 802, nil, 802, 802, 802, nil, 802, 802, +nil, 802, 802, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 802, nil, nil, 802, nil, nil, +802, nil, nil, 802, nil, 802, nil, nil, nil, 802, nil, nil, nil, nil, nil, +nil, nil, 802, nil, nil, nil, nil, 802, 802, 802, 802, 802, 802, nil, nil, +nil, 802, 802, nil, nil, nil, nil, nil, nil, 802, nil, nil, 802, nil, nil, +nil, nil, 802, 802, 813, 813, 813, 813, 813, nil, nil, nil, 813, 813, nil, +nil, nil, 813, nil, 813, 813, 813, 813, 813, 813, 813, nil, nil, nil, nil, +nil, 813, 813, 813, 813, 813, 813, 813, nil, nil, 813, nil, nil, nil, nil, +nil, 813, 813, nil, 813, 813, 813, nil, 813, 813, 813, 813, 813, nil, 813, +813, 813, nil, 813, 813, nil, 813, 813, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 813, +nil, nil, 813, nil, nil, 813, nil, nil, 813, nil, 813, nil, nil, nil, 813, +nil, nil, nil, nil, nil, nil, nil, 813, nil, nil, nil, nil, 813, 813, 813, +813, 813, 813, nil, nil, nil, 813, 813, nil, nil, nil, 832, 832, 832, 813, +832, nil, 813, nil, 832, 832, nil, 813, 813, 832, nil, 832, 832, 832, 832, +832, 832, 832, nil, nil, nil, nil, nil, 832, 832, 832, 832, 832, 832, 832, +nil, nil, 832, nil, nil, nil, nil, nil, nil, 832, nil, nil, 832, 832, nil, +832, 832, 832, 832, 832, nil, 832, 832, 832, nil, 832, 832, nil, 832, 832, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 832, nil, nil, 832, nil, nil, 832, nil, nil, +832, nil, nil, nil, nil, nil, 832, nil, nil, nil, nil, nil, nil, nil, 832, +nil, nil, nil, nil, 832, 832, 832, 832, 832, 832, nil, nil, nil, 832, 832, +nil, nil, nil, nil, nil, nil, 832, nil, nil, 832, nil, nil, nil, nil, 832, +832, 834, 834, 834, 834, 834, nil, nil, nil, 834, 834, nil, nil, nil, 834, +nil, 834, 834, 834, 834, 834, 834, 834, nil, nil, nil, nil, nil, 834, 834, +834, 834, 834, 834, 834, nil, nil, 834, nil, nil, nil, nil, nil, 834, 834, +nil, 834, 834, 834, nil, 834, 834, 834, 834, 834, nil, 834, 834, 834, nil, +834, 834, nil, 834, 834, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 834, nil, nil, 834, +nil, nil, 834, nil, nil, 834, nil, 834, nil, nil, nil, 834, nil, nil, nil, +nil, nil, nil, nil, 834, nil, nil, nil, nil, 834, 834, 834, 834, 834, 834, +nil, nil, nil, 834, 834, nil, nil, nil, nil, nil, nil, 834, nil, nil, 834, +nil, nil, nil, nil, 834, 834, 835, 835, 835, 835, 835, nil, nil, nil, 835, +835, nil, nil, nil, 835, nil, 835, 835, 835, 835, 835, 835, 835, nil, nil, +nil, nil, nil, 835, 835, 835, 835, 835, 835, 835, nil, nil, 835, nil, nil, +nil, nil, nil, 835, 835, nil, 835, 835, 835, nil, 835, 835, 835, 835, 835, +nil, 835, 835, 835, nil, 835, 835, nil, 835, 835, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 835, nil, nil, 835, nil, nil, 835, nil, nil, 835, nil, 835, nil, nil, +nil, 835, nil, nil, nil, nil, nil, nil, nil, 835, nil, nil, nil, nil, 835, +835, 835, 835, 835, 835, nil, nil, nil, 835, 835, nil, nil, nil, 862, 862, +862, 835, 862, nil, 835, nil, 862, 862, nil, 835, 835, 862, nil, 862, 862, +862, 862, 862, 862, 862, nil, nil, nil, nil, nil, 862, 862, 862, 862, 862, +862, 862, nil, nil, 862, nil, nil, nil, nil, nil, nil, 862, nil, nil, 862, +862, nil, 862, 862, 862, 862, 862, nil, 862, 862, 862, nil, 862, 862, nil, +862, 862, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 862, nil, nil, 862, nil, nil, 862, +nil, nil, 862, nil, nil, nil, nil, nil, 862, nil, nil, nil, nil, nil, nil, +nil, 862, nil, nil, nil, nil, 862, 862, 862, 862, 862, 862, nil, nil, nil, +862, 862, nil, nil, nil, 876, 876, 876, 862, 876, nil, 862, nil, 876, 876, +nil, 862, 862, 876, nil, 876, 876, 876, 876, 876, 876, 876, nil, nil, nil, +nil, nil, 876, 876, 876, 876, 876, 876, 876, nil, nil, 876, nil, nil, nil, +nil, nil, nil, 876, nil, nil, 876, 876, nil, 876, 876, 876, 876, 876, nil, +876, 876, 876, nil, 876, 876, nil, 876, 876, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +876, nil, nil, 876, nil, nil, 876, nil, nil, 876, nil, nil, nil, nil, nil, +876, nil, nil, nil, nil, nil, nil, nil, 876, nil, nil, nil, nil, 876, 876, +876, 876, 876, 876, nil, nil, nil, 876, 876, nil, nil, nil, 877, 877, 877, +876, 877, nil, 876, nil, 877, 877, nil, 876, 876, 877, nil, 877, 877, 877, +877, 877, 877, 877, nil, nil, nil, nil, nil, 877, 877, 877, 877, 877, 877, +877, nil, nil, 877, nil, nil, nil, nil, nil, nil, 877, nil, nil, 877, 877, +nil, 877, 877, 877, 877, 877, nil, 877, 877, 877, nil, 877, 877, nil, 877, +877, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 877, nil, nil, 877, nil, nil, 877, nil, +nil, 877, nil, nil, nil, nil, nil, 877, nil, nil, nil, nil, nil, nil, nil, +877, nil, nil, nil, nil, 877, 877, 877, 877, 877, 877, nil, nil, nil, 877, +877, nil, nil, nil, 881, 881, 881, 877, 881, nil, 877, nil, 881, 881, nil, +877, 877, 881, nil, 881, 881, 881, 881, 881, 881, 881, nil, nil, nil, nil, +nil, 881, 881, 881, 881, 881, 881, 881, nil, nil, 881, nil, nil, nil, nil, +nil, nil, 881, nil, nil, 881, 881, nil, 881, 881, 881, 881, 881, 881, 881, +881, 881, nil, 881, 881, nil, 881, 881, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 881, +nil, nil, 881, nil, nil, 881, nil, nil, 881, nil, nil, nil, 881, nil, 881, +nil, nil, nil, nil, nil, nil, nil, 881, nil, nil, nil, nil, 881, 881, 881, +881, 881, 881, nil, nil, nil, 881, 881, nil, nil, nil, nil, nil, nil, 881, +nil, nil, 881, nil, nil, nil, nil, 881, 881, 886, 886, 886, 886, 886, nil, +nil, nil, 886, 886, nil, nil, nil, 886, nil, 886, 886, 886, 886, 886, 886, +886, nil, nil, nil, nil, nil, 886, 886, 886, 886, 886, 886, 886, nil, nil, +886, nil, nil, nil, nil, nil, 886, 886, nil, 886, 886, 886, nil, 886, 886, +886, 886, 886, nil, 886, 886, 886, nil, 886, 886, nil, 886, 886, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 886, nil, nil, 886, nil, nil, 886, nil, nil, 886, nil, +886, nil, nil, nil, 886, nil, nil, nil, nil, nil, nil, nil, 886, nil, nil, +nil, nil, 886, 886, 886, 886, 886, 886, nil, nil, nil, 886, 886, nil, nil, +nil, 890, 890, 890, 886, 890, nil, 886, nil, 890, 890, nil, 886, 886, 890, +nil, 890, 890, 890, 890, 890, 890, 890, nil, nil, nil, nil, nil, 890, 890, +890, 890, 890, 890, 890, nil, nil, 890, nil, nil, nil, nil, nil, nil, 890, +nil, nil, 890, 890, nil, 890, 890, 890, 890, 890, nil, 890, 890, 890, nil, +890, 890, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 890, nil, nil, 890, +nil, nil, 890, nil, nil, 890, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 890, 890, 890, 890, 890, 890, +nil, nil, nil, 890, 890, nil, nil, nil, 900, 900, 900, 890, 900, nil, 890, +nil, 900, 900, nil, 890, 890, 900, nil, 900, 900, 900, 900, 900, 900, 900, +nil, nil, nil, nil, nil, 900, 900, 900, 900, 900, 900, 900, nil, nil, 900, +nil, nil, nil, nil, nil, nil, 900, nil, nil, 900, 900, nil, 900, 900, 900, +900, 900, nil, 900, 900, 900, nil, 900, 900, nil, 900, 900, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 900, nil, nil, 900, nil, nil, 900, nil, nil, 900, nil, 900, +nil, nil, nil, 900, nil, nil, nil, nil, nil, nil, nil, 900, nil, nil, nil, +nil, 900, 900, 900, 900, 900, 900, nil, nil, nil, 900, 900, nil, nil, nil, +nil, nil, nil, 900, nil, nil, 900, nil, nil, nil, nil, 900, 900, 901, 901, +901, 901, 901, nil, nil, nil, 901, 901, nil, nil, nil, 901, nil, 901, 901, +901, 901, 901, 901, 901, nil, nil, nil, nil, nil, 901, 901, 901, 901, 901, +901, 901, nil, nil, 901, nil, nil, nil, nil, nil, 901, 901, nil, 901, 901, +901, nil, 901, 901, 901, 901, 901, nil, 901, 901, 901, nil, 901, 901, nil, +901, 901, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 901, nil, nil, 901, nil, nil, 901, +nil, nil, 901, nil, 901, nil, nil, nil, 901, nil, nil, nil, nil, nil, nil, +nil, 901, nil, nil, nil, nil, 901, 901, 901, 901, 901, 901, nil, nil, nil, +901, 901, nil, nil, nil, nil, nil, nil, 901, nil, nil, 901, nil, nil, nil, +nil, 901, 901, 904, 904, 904, 904, 904, nil, nil, nil, 904, 904, nil, nil, +nil, 904, nil, 904, 904, 904, 904, 904, 904, 904, nil, nil, nil, nil, nil, +904, 904, 904, 904, 904, 904, 904, nil, nil, 904, nil, nil, nil, nil, nil, +904, 904, nil, 904, 904, 904, nil, 904, 904, 904, 904, 904, nil, 904, 904, +904, nil, 904, 904, nil, 904, 904, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 904, nil, +nil, 904, nil, nil, 904, nil, nil, 904, nil, 904, nil, nil, nil, 904, nil, +nil, nil, nil, nil, nil, nil, 904, nil, nil, nil, nil, 904, 904, 904, 904, +904, 904, nil, nil, nil, 904, 904, nil, nil, nil, 921, 921, 921, 904, 921, +nil, 904, nil, 921, 921, nil, 904, 904, 921, nil, 921, 921, 921, 921, 921, +921, 921, nil, nil, nil, nil, nil, 921, 921, 921, 921, 921, 921, 921, nil, +nil, 921, nil, nil, nil, nil, nil, nil, 921, nil, nil, 921, 921, nil, 921, +921, 921, 921, 921, nil, 921, 921, 921, nil, 921, 921, nil, 921, 921, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 921, nil, nil, 921, nil, nil, 921, nil, nil, 921, +nil, 921, nil, 921, nil, 921, nil, nil, nil, nil, nil, nil, nil, 921, nil, +nil, nil, nil, 921, 921, 921, 921, 921, 921, nil, nil, nil, 921, 921, nil, +nil, nil, nil, nil, nil, 921, nil, nil, 921, nil, nil, nil, nil, 921, 921, +923, 923, 923, 923, 923, nil, nil, nil, 923, 923, nil, nil, nil, 923, nil, +923, 923, 923, 923, 923, 923, 923, nil, nil, nil, nil, nil, 923, 923, 923, +923, 923, 923, 923, nil, nil, 923, nil, nil, nil, nil, nil, 923, 923, nil, +923, 923, 923, nil, 923, 923, 923, 923, 923, nil, 923, 923, 923, nil, 923, +923, nil, 923, 923, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 923, nil, nil, 923, nil, +nil, 923, nil, nil, 923, nil, 923, nil, nil, nil, 923, nil, nil, nil, nil, +nil, nil, nil, 923, nil, nil, nil, nil, 923, 923, 923, 923, 923, 923, nil, +nil, nil, 923, 923, nil, nil, nil, nil, nil, nil, 923, nil, nil, 923, nil, +nil, nil, nil, 923, 923, 930, 930, 930, 930, 930, nil, nil, nil, 930, 930, +nil, nil, nil, 930, nil, 930, 930, 930, 930, 930, 930, 930, nil, nil, nil, +nil, nil, 930, 930, 930, 930, 930, 930, 930, nil, nil, 930, nil, nil, nil, +nil, nil, 930, 930, nil, 930, 930, 930, nil, 930, 930, 930, 930, 930, nil, +930, 930, 930, nil, 930, 930, nil, 930, 930, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +930, nil, nil, 930, nil, nil, 930, nil, nil, 930, nil, 930, nil, nil, nil, +930, nil, nil, nil, nil, nil, nil, nil, 930, nil, nil, nil, nil, 930, 930, +930, 930, 930, 930, nil, nil, nil, 930, 930, nil, nil, nil, nil, nil, nil, +930, nil, nil, 930, nil, nil, nil, nil, 930, 930, 935, 935, 935, 935, 935, +nil, nil, nil, 935, 935, nil, nil, nil, 935, nil, 935, 935, 935, 935, 935, +935, 935, nil, nil, nil, nil, nil, 935, 935, 935, 935, 935, 935, 935, nil, +nil, 935, nil, nil, nil, nil, nil, 935, 935, nil, 935, 935, 935, nil, 935, +935, 935, 935, 935, nil, 935, 935, 935, nil, 935, 935, nil, 935, 935, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 935, nil, nil, 935, nil, nil, 935, nil, nil, 935, +nil, 935, nil, nil, nil, 935, nil, nil, nil, nil, nil, nil, nil, 935, nil, +nil, nil, nil, 935, 935, 935, 935, 935, 935, nil, nil, nil, 935, 935, nil, +nil, nil, nil, nil, nil, 935, nil, nil, 935, nil, nil, nil, nil, 935, 935, +943, 943, 943, 943, 943, nil, nil, nil, 943, 943, nil, nil, nil, 943, nil, +943, 943, 943, 943, 943, 943, 943, nil, nil, nil, nil, nil, 943, 943, 943, +943, 943, 943, 943, nil, nil, 943, nil, nil, nil, nil, nil, 943, 943, nil, +943, 943, 943, nil, 943, 943, 943, 943, 943, nil, 943, 943, 943, nil, 943, +943, nil, 943, 943, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 943, nil, nil, 943, nil, +nil, 943, nil, nil, 943, nil, 943, nil, nil, nil, 943, nil, nil, nil, nil, +nil, nil, nil, 943, nil, nil, nil, nil, 943, 943, 943, 943, 943, 943, nil, +nil, nil, 943, 943, nil, nil, nil, 945, 945, 945, 943, 945, nil, 943, nil, +945, 945, nil, 943, 943, 945, nil, 945, 945, 945, 945, 945, 945, 945, nil, +nil, nil, nil, nil, 945, 945, 945, 945, 945, 945, 945, nil, nil, 945, nil, +nil, nil, nil, nil, nil, 945, nil, nil, 945, 945, nil, 945, 945, 945, 945, +945, 945, 945, 945, 945, nil, 945, 945, nil, 945, 945, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 945, nil, nil, 945, nil, nil, 945, nil, nil, 945, nil, 945, nil, +nil, nil, 945, nil, nil, nil, nil, nil, nil, nil, 945, nil, nil, nil, 436, +945, 945, 945, 945, 945, 945, 436, 436, 436, 945, 945, nil, 436, 436, nil, +436, nil, 945, nil, nil, 945, nil, nil, nil, 436, 945, 945, nil, nil, nil, +nil, nil, nil, nil, nil, 436, 436, nil, 436, 436, 436, 436, 436, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 436, 436, 436, 436, 436, 436, 436, 436, 436, +436, 436, 436, 436, 436, 436, 438, nil, 436, 436, 436, nil, 436, 438, 438, +438, 436, nil, nil, 438, 438, nil, 438, 436, nil, 436, nil, 436, 436, 436, +436, 436, 436, 436, nil, 436, 436, 436, nil, nil, nil, nil, 438, 438, nil, +438, 438, 438, 438, 438, 436, 436, nil, 436, nil, 436, nil, nil, 436, nil, +436, nil, 436, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 438, 438, +438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, nil, nil, +438, 438, 438, nil, 438, nil, nil, nil, 438, nil, nil, nil, nil, nil, nil, +438, nil, 438, nil, 438, 438, 438, 438, 438, 438, 438, nil, 438, nil, 438, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 438, 438, nil, +438, nil, 438, 644, nil, 438, nil, 438, nil, 438, 644, 644, 644, nil, nil, +644, 644, 644, nil, 644, nil, nil, nil, nil, nil, nil, nil, nil, 644, 644, +644, nil, nil, nil, nil, nil, nil, nil, nil, 644, 644, nil, 644, 644, 644, +644, 644, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 644, 644, 644, 644, 644, +644, 644, 644, 644, 644, 644, 644, 644, 644, 644, nil, nil, 644, 644, 644, +nil, 644, 644, nil, nil, 644, nil, nil, 644, nil, 644, nil, 644, nil, 644, +nil, 644, 644, 644, 644, 644, 644, 644, nil, 644, 644, 644, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 644, 644, 644, 644, nil, 644, +645, nil, 644, nil, 644, nil, 644, 645, 645, 645, nil, nil, 645, 645, 645, +nil, 645, nil, nil, nil, nil, nil, nil, nil, nil, nil, 645, 645, nil, nil, +nil, nil, nil, nil, nil, nil, 645, 645, nil, 645, 645, 645, 645, 645, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 645, 645, 645, 645, 645, 645, 645, 645, +645, 645, 645, 645, 645, 645, 645, nil, nil, 645, 645, 645, nil, 645, 645, +nil, nil, 645, nil, nil, 645, nil, 645, nil, 645, nil, 645, nil, 645, 645, +645, 645, 645, 645, 645, nil, 645, nil, 645, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 645, 645, 645, 645, nil, 645, 28, nil, 645, +nil, 645, nil, 645, 28, 28, 28, nil, nil, 28, 28, 28, nil, 28, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 28, 28, nil, nil, nil, nil, nil, +nil, nil, nil, 28, 28, nil, 28, 28, 28, 28, 28, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, nil, nil, 28, 28, 28, nil, nil, 28, nil, 28, 28, +nil, nil, 28, nil, 28, nil, 28, nil, 28, nil, 28, 28, 28, 28, 28, +28, 28, nil, 28, nil, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 28, 28, 28, 28, 50, 28, nil, nil, 28, nil, 28, 50, +50, 50, nil, nil, 50, 50, 50, nil, 50, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 50, 50, 50, nil, nil, nil, nil, nil, nil, nil, 50, 50, +nil, 50, 50, 50, 50, 50, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 50, +50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, nil, +nil, 50, 50, 50, nil, nil, 50, nil, nil, 50, nil, nil, 50, nil, 50, +nil, 50, nil, 50, nil, 50, 50, 50, 50, 50, 50, 50, nil, 50, nil, +50, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 50, 50, +50, 50, 494, 50, nil, 50, 50, nil, 50, 494, 494, 494, nil, nil, 494, +494, 494, nil, 494, nil, nil, nil, nil, nil, nil, nil, nil, nil, 494, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 494, 494, nil, 494, 494, 494, 494, +494, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 495, +nil, nil, nil, nil, nil, nil, 495, 495, 495, nil, nil, 495, 495, 495, nil, +495, nil, nil, nil, nil, 494, 494, nil, nil, nil, 495, nil, nil, 494, nil, +nil, nil, nil, 494, 494, 495, 495, nil, 495, 495, 495, 495, 495, nil, nil, +nil, nil, 918, nil, 918, 918, 918, 918, 918, nil, 494, nil, nil, nil, nil, +nil, nil, nil, 918, nil, nil, nil, 496, 494, nil, 494, nil, nil, 494, 496, +496, 496, 495, 495, 496, 496, 496, nil, 496, nil, 495, 918, 918, nil, nil, +495, 495, nil, 496, 918, 918, 918, 918, nil, nil, nil, nil, nil, 496, 496, +nil, 496, 496, 496, 496, 496, nil, 495, nil, nil, nil, nil, nil, 202, 202, +nil, nil, 202, nil, nil, 495, nil, 495, nil, nil, 495, 202, 202, 918, 202, +202, 202, 202, 202, 202, 202, nil, nil, 202, 202, 496, 496, nil, nil, 202, +202, 202, 202, 496, nil, nil, nil, nil, 496, 496, nil, nil, nil, nil, nil, +202, 202, nil, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, nil, +496, 202, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 496, nil, +496, nil, nil, 496, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, nil, nil, +nil, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, nil, 7, 7, 7, nil, 7, nil, nil, +nil, nil, nil, nil, nil, nil, 7, 7, nil, 7, 7, 7, 7, 7, 7, +7, nil, nil, 7, 7, nil, nil, nil, nil, 7, 7, 7, 7, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 7, 7, nil, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, nil, nil, 7, 7, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 7, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, nil, nil, nil, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, nil, 8, 8, nil, +nil, 8, nil, nil, nil, nil, nil, nil, nil, nil, 8, 8, nil, 8, 8, +8, 8, 8, 8, 8, nil, nil, 8, 8, nil, nil, nil, nil, 8, 8, +8, 8, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 8, +8, nil, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, nil, nil, +8, 8, nil, nil, nil, nil, nil, nil, nil, nil, nil, 8, 411, 411, 411, +411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, +411, 411, 411, 411, 411, 411, nil, nil, nil, 411, 411, 411, 411, 411, 411, +411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, +nil, 411, 411, nil, nil, 411, nil, nil, nil, nil, nil, nil, nil, nil, 411, +411, nil, 411, 411, 411, 411, 411, 411, 411, nil, nil, 411, 411, nil, nil, +nil, nil, 411, 411, 411, 411, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 411, 411, nil, 411, 411, 411, 411, 411, 411, 411, 411, 411, +411, 411, nil, nil, 411, 411, nil, nil, nil, nil, nil, nil, nil, nil, nil, +411, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, +415, 415, 415, 415, 415, 415, 415, 415, 415, 415, nil, nil, nil, 415, 415, +415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, 415, +415, 415, 415, 415, nil, 415, 415, nil, nil, 415, nil, nil, nil, nil, nil, +nil, nil, nil, 415, 415, nil, 415, 415, 415, 415, 415, 415, 415, nil, nil, +415, 415, nil, nil, nil, nil, 415, 415, 415, 415, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 415, 415, nil, 415, 415, 415, 415, 415, +415, 415, 415, 415, 415, 415, nil, nil, 415, 415, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 415, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, +65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, nil, +nil, nil, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, +65, 65, 65, 65, 65, 65, 65, 65, nil, 65, 65, 65, 65, 65, nil, +65, nil, nil, nil, nil, nil, nil, 65, 65, nil, 65, 65, 65, 65, 65, +65, 65, nil, nil, 65, 65, nil, nil, nil, nil, 65, 65, 65, 65, nil, +nil, nil, nil, nil, 65, nil, nil, nil, nil, nil, nil, 65, 65, nil, 65, +65, 65, 65, 65, 65, 65, 65, 65, 65, 65, nil, nil, 65, 79, 79, +79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, +79, 79, 79, 79, 79, 79, 79, nil, nil, nil, 79, 79, 79, 79, 79, +79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, +79, nil, 79, 79, 79, 79, 79, nil, 79, nil, nil, nil, nil, nil, nil, +79, 79, nil, 79, 79, 79, 79, 79, 79, 79, nil, nil, 79, 79, nil, +nil, nil, nil, 79, 79, 79, 79, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 79, 79, nil, 79, 79, 79, 79, 79, 79, 79, 79, +79, 79, 79, nil, nil, 79, 192, 192, 192, 192, 192, 192, 192, 192, 192, +192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, +nil, nil, nil, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, +192, 192, 192, 192, 192, 192, 192, 192, 192, nil, 192, 192, 192, 192, 192, +nil, 192, nil, nil, nil, nil, nil, nil, 192, 192, nil, 192, 192, 192, 192, +192, 192, 192, nil, nil, 192, 192, nil, nil, nil, nil, 192, 192, 192, 192, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 192, 192, nil, +192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, nil, nil, 192, 766, +766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, +766, 766, 766, 766, 766, 766, 766, 766, nil, nil, nil, 766, 766, 766, 766, +766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, 766, +766, 766, nil, 766, 766, nil, nil, 766, nil, nil, nil, nil, nil, nil, nil, +nil, 766, 766, nil, 766, 766, 766, 766, 766, 766, 766, nil, nil, 766, 766, +nil, nil, nil, nil, 766, 766, 766, 766, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 766, 766, nil, 766, 766, 766, 766, 766, 766, 766, +766, 766, 766, 766, 201, 201, 766, nil, 201, nil, nil, nil, nil, nil, nil, +nil, nil, 201, 201, nil, 201, 201, 201, 201, 201, 201, 201, nil, nil, 201, +201, nil, nil, nil, nil, 201, 201, 201, 201, nil, nil, nil, nil, nil, 201, +nil, nil, nil, nil, nil, nil, 201, 201, nil, 201, 201, 201, 201, 201, 201, +201, 201, 201, 201, 201, 203, 203, 201, nil, 203, nil, nil, nil, nil, nil, +nil, nil, nil, 203, 203, nil, 203, 203, 203, 203, 203, 203, 203, nil, nil, +203, 203, nil, nil, nil, nil, 203, 203, 203, 203, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 203, 203, nil, 203, 203, 203, 203, 203, +203, 203, 203, 203, 203, 203, 264, 264, 203, nil, 264, nil, nil, nil, nil, +nil, nil, nil, nil, 264, 264, nil, 264, 264, 264, 264, 264, 264, 264, nil, +nil, 264, 264, nil, nil, nil, nil, 264, 264, 264, 264, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 264, 264, nil, 264, 264, 264, 264, +264, 264, 264, 264, 264, 264, 264, 265, 265, 264, nil, 265, nil, nil, nil, +nil, nil, nil, nil, nil, 265, 265, nil, 265, 265, 265, 265, 265, 265, 265, +nil, nil, 265, 265, nil, nil, nil, nil, 265, 265, 265, 265, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 265, 265, nil, 265, 265, 265, +265, 265, 265, 265, 265, 265, 265, 265, 266, 266, 265, nil, 266, nil, nil, +nil, nil, nil, nil, nil, nil, 266, 266, nil, 266, 266, 266, 266, 266, 266, +266, nil, nil, 266, 266, nil, nil, nil, nil, 266, 266, 266, 266, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 266, 266, nil, 266, 266, +266, 266, 266, 266, 266, 266, 266, 266, 266, 449, 449, 266, nil, 449, nil, +nil, nil, nil, nil, nil, nil, nil, 449, 449, nil, 449, 449, 449, 449, 449, +449, 449, nil, nil, 449, 449, nil, nil, nil, nil, 449, 449, 449, 449, nil, +nil, nil, nil, nil, 449, nil, nil, nil, nil, nil, nil, 449, 449, nil, 449, +449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 450, 450, 449, nil, 450, +nil, nil, nil, nil, nil, nil, nil, nil, 450, 450, nil, 450, 450, 450, 450, +450, 450, 450, nil, nil, 450, 450, nil, nil, nil, nil, 450, 450, 450, 450, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 450, 450, nil, +450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 521, 521, 450, nil, +521, nil, nil, nil, nil, nil, nil, nil, nil, 521, 521, nil, 521, 521, 521, +521, 521, 521, 521, nil, nil, 521, 521, nil, nil, nil, nil, 521, 521, 521, +521, nil, nil, nil, nil, nil, 521, nil, nil, nil, nil, nil, nil, 521, 521, +nil, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 522, 522, 521, +nil, 522, nil, nil, nil, nil, nil, nil, nil, nil, 522, 522, nil, 522, 522, +522, 522, 522, 522, 522, nil, nil, 522, 522, nil, nil, nil, nil, 522, 522, +522, 522, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 522, +522, nil, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 524, 524, +522, nil, 524, nil, nil, nil, nil, nil, nil, nil, nil, 524, 524, nil, 524, +524, 524, 524, 524, 524, 524, nil, nil, 524, 524, nil, nil, nil, nil, 524, +524, 524, 524, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +524, 524, nil, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 534, +534, 524, nil, 534, nil, nil, nil, nil, nil, nil, nil, nil, 534, 534, nil, +534, 534, 534, 534, 534, 534, 534, nil, nil, 534, 534, nil, nil, nil, nil, +534, 534, 534, 534, nil, nil, nil, nil, nil, 534, nil, nil, nil, nil, nil, +nil, 534, 534, nil, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, +535, 535, 534, nil, 535, nil, nil, nil, nil, nil, nil, nil, nil, 535, 535, +nil, 535, 535, 535, 535, 535, 535, 535, nil, nil, 535, 535, nil, nil, nil, +nil, 535, 535, 535, 535, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 535, 535, nil, 535, 535, 535, 535, 535, 535, 535, 535, 535, 535, +535, 584, 584, 535, nil, 584, nil, nil, nil, nil, nil, nil, nil, nil, 584, +584, nil, 584, 584, 584, 584, 584, 584, 584, nil, nil, 584, 584, nil, nil, +nil, nil, 584, 584, 584, 584, nil, nil, nil, nil, nil, 584, nil, nil, nil, +nil, nil, nil, 584, 584, nil, 584, 584, 584, 584, 584, 584, 584, 584, 584, +584, 584, 585, 585, 584, nil, 585, nil, nil, nil, nil, nil, nil, nil, nil, +585, 585, nil, 585, 585, 585, 585, 585, 585, 585, nil, nil, 585, 585, nil, +nil, nil, nil, 585, 585, 585, 585, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 585, 585, nil, 585, 585, 585, 585, 585, 585, 585, 585, +585, 585, 585, 591, 591, 585, nil, 591, nil, nil, nil, nil, nil, nil, nil, +nil, 591, 591, nil, 591, 591, 591, 591, 591, 591, 591, nil, nil, 591, 591, +nil, nil, nil, nil, 591, 591, 591, 591, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 591, 591, nil, 591, 591, 591, 591, 591, 591, 591, +591, 591, 591, 591, 593, 593, 591, nil, 593, nil, nil, nil, nil, nil, nil, +nil, nil, 593, 593, nil, 593, 593, 593, 593, 593, 593, 593, nil, nil, 593, +593, nil, nil, nil, nil, 593, 593, 593, 593, nil, nil, nil, nil, nil, 593, +nil, nil, nil, nil, nil, nil, 593, 593, nil, 593, 593, 593, 593, 593, 593, +593, 593, 593, 593, 593, 822, 822, 593, nil, 822, nil, nil, nil, nil, nil, +nil, nil, nil, 822, 822, nil, 822, 822, 822, 822, 822, 822, 822, nil, nil, +822, 822, nil, nil, nil, nil, 822, 822, 822, 822, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 822, 822, nil, 822, 822, 822, 822, 822, +822, 822, 822, 822, 822, 822, 946, 946, 822, nil, 946, nil, nil, nil, nil, +nil, nil, nil, nil, 946, 946, nil, 946, 946, 946, 946, 946, 946, 946, nil, +nil, 946, 946, nil, nil, nil, nil, 946, 946, 946, 946, nil, nil, nil, nil, +nil, 946, nil, nil, nil, nil, nil, nil, 946, 946, nil, 946, 946, 946, 946, +946, 946, 946, 946, 946, 946, 946, 947, 947, 946, nil, 947, nil, nil, nil, +nil, nil, nil, nil, nil, 947, 947, nil, 947, 947, 947, 947, 947, 947, 947, +nil, nil, 947, 947, nil, nil, nil, nil, 947, 947, 947, 947, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 947, 947, nil, 947, 947, 947, +947, 947, 947, 947, 947, 947, 947, 947, nil, nil, 947] + +racc_action_pointer = [-2, 34, nil, 234, nil, 618, -19, 22922, 23046, -5, - +1, 15, 117, 414, 291, 243, nil, 125, 252, 900, 186, nil, 379, 506, 633, +381, 13, 760, 22407, nil, 900, 1027, 1154, nil, 108, 541, 237, 261, 1294, 1421, +1548, 176, 467, nil, nil, nil, nil, nil, nil, nil, 22537, nil, 1675, 1802, 1929, +29, 9932, 2056, 2183, nil, nil, 2310, 2450, 2577, nil, 23418, nil, nil, nil, nil, +nil, - +102, nil, nil, nil, nil, nil, 178, 220, 23531, nil, nil, nil, 429, 2704, nil, +nil, 2831, nil, nil, nil, nil, nil, nil, nil, nil, nil, 359, nil, 2971, nil, +nil, nil, 3111, 3238, 3365, 3492, 3632, 3772, nil, 663, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 23644, 234, nil, 3912, 4039, 4166, 4293, 4420, 4547, 23818, 22792, 23879, 4674, 4801, +4928, nil, 541, - +49, 319, 61, 240, 328, 5068, 5195, nil, nil, 5322, 363, 5449, 5576, 5703, 5830, +5957, 6084, 6211, 6338, 6465, 6592, 6719, 6846, 6973, 7100, 7227, 7354, 7481, 7608, 7735, +7862, 7989, 8116, 8243, 8370, 8497, 8624, nil, nil, nil, 1294, nil, 329, 339, nil, +8751, 389, 8878, nil, nil, nil, nil, 9005, nil, nil, 23940, 24001, 24062, 383, 9132, +9259, nil, nil, nil, nil, nil, nil, nil, 9386, 249, 745, 390, 9526, 409, 438, +405, 9653, 9793, 73, 594, 497, 196, 465, 440, 207, nil, 478, 471, nil, 9920, +nil, 586, 505, 531, 633, nil, 533, nil, 10047, nil, 10187, 35, nil, 502, -103, 135, 537, 521, 262, 556, nil, nil, - +22, 10580, nil, nil, nil, 520, 545, nil, 564, 567, nil, nil, nil, nil, nil, +nil, nil, 3097, nil, nil, nil, 648, nil, nil, 674, 806, -7, 36, 10314, 10441, 324, 63, 596, - +17, 668, 690, 37, 731, nil, nil, 506, 704, nil, 721, nil, 65, nil, nil, +10568, - +12, 122, 360, 384, 385, 436, 509, 590, nil, 795, nil, 10695, nil, 173, nil, +326, nil, -23, 649, 362, nil, 653, - +50, nil, 365, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 683, 23170, nil, nil, nil, 23294, 688, nil, nil, 760, nil, 10822, +681, nil, 691, nil, nil, 1421, 728, 731, 668, 761, 10949, nil, nil, nil, 21929, +757, 22011, nil, 11076, 11203, 11330, nil, nil, nil, 1548, nil, nil, 24123, 24184, 11457, +11584, 180, 11711, 11838, 11965, 115, nil, 3238, 3365, 232, 879, 785, 787, 821, 824, +2457, 2584, 5068, 3492, 3632, 3772, 3912, 4039, 4166, 4293, 4420, 4547, 4674, 1133, 1232, +4801, 4928, 633, -34, nil, 12092, nil, 12219, nil, 12346, nil, nil, 22667, 22724, 22792, - +17, nil, 771, nil, nil, 785, 787, nil, nil, 12473, 59, 203, 832, nil, nil, +12613, 833, 797, nil, nil, 799, 12753, 845, 12880, 24245, 24306, 13007, 24367, 223, 848, +nil, nil, 821, nil, 13134, 13261, 13388, 24428, 24489, 1675, 13515, 949, 951, 871, nil, +nil, 13642, nil, nil, 13769, nil, nil, nil, nil, 13909, 14049, 874, nil, 1000, nil, +nil, 14176, 12765, nil, 772, nil, nil, 894, nil, 3126, nil, 859, 1198, nil, nil, +14316, 977, nil, nil, 14456, 212, 227, 975, 983, 14596, nil, 14723, 24550, 24611, 14850, +40, nil, 760, nil, 24672, 14977, 24733, nil, nil, 15104, 387, 15231, nil, 1166, nil, +nil, nil, 45, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - +35, nil, nil, nil, 864, nil, nil, nil, nil, nil, 15358, 866, 15485, 798, 203, +15612, 15739, 900, nil, nil, nil, 15866, 903, nil, 15993, 915, nil, 268, 307, 22143, +22275, 927, 928, 506, nil, 16120, nil, 1040, nil, 16260, 897, nil, 939, 16387, nil, +nil, nil, nil, nil, nil, nil, nil, 16527, nil, 942, 16654, 16781, 2310, 907, nil, +nil, 947, 16921, 17061, nil, 1154, - +27, 17188, 914, nil, 957, 228, 235, 962, 313, 327, 963, 960, 972, 17315, 1802, +997, 1001, 240, 1056, 17442, nil, nil, 376, 960, 1068, nil, nil, 945, nil, 958, +935, 1035, 963, 967, nil, nil, 1010, 3135, nil, 869, nil, 1096, nil, nil, nil, +nil, nil, 1102, nil, 1103, 17569, 1020, 46, 52, 59, 102, 1021, 17696, 1027, nil, +1028, 1026, 17836, 416, nil, - +25, 17976, 18116, 9665, 463, nil, nil, 1075, nil, 18243, nil, 998, 999, nil, 1000, +1002, 1004, nil, 996, nil, 23757, 1043, 1050, 18383, nil, nil, nil, 1929, 1007, 18510, +18637, 18764, nil, 2056, nil, 2183, nil, nil, 2446, nil, 2573, nil, 18891, 19018, 19145, +315, 319, 2704, nil, 1041, 1144, nil, nil, 1041, nil, 1026, 19272, nil, 1053, 1161, +1072, 323, nil, nil, nil, 1196, nil, 19412, 1081, 1125, nil, nil, nil, nil, nil, +nil, 24794, nil, 1127, nil, nil, nil, nil, 1407, 1215, nil, 19539, 1220, 19679, 19819, +nil, nil, 66, 56, 988, 295, nil, 1221, nil, nil, 1222, 1225, 1109, nil, nil, +nil, - +32, nil, nil, 807, 14188, nil, 842, nil, 406, nil, 19946, nil, nil, nil, nil, +nil, nil, nil, 1127, 1113, nil, 2831, nil, 2971, 20073, 20200, nil, nil, nil, 20327, +1114, nil, nil, nil, 20467, nil, nil, 72, 20594, nil, 1154, 1125, nil, nil, 78, +nil, 1249, 1250, 20721, 20861, nil, nil, 21001, nil, nil, 1168, nil, 1132, nil, nil, +1133, 1134, 1139, 1137, nil, nil, 22721, nil, nil, 21128, nil, 21268, 91, 1112, 1221, +97, nil, nil, 21408, nil, nil, nil, 460, 21548, 1268, nil, nil, 1081, nil, nil, +nil, 21688, 1273, 21815, 24855, 24916, 98, 899, nil, nil, nil, 1272, nil, 1153, 1275, +nil, 1190, 108, 120, 198, 202, nil, nil, nil, nil, 218] + +racc_action_default = [-3, -555, -1, -543, -4, -6, -555, -555, -555, -555, -555, -555, -555, -555, -277, -37, -38, -555, -555, -43, -45, -46, -289, -327, -328, -50, -255, -382, -255, -65, -10, -69, -76, -78, -555, -457, -555, -555, -555, -555, -555, -545, -232, -270, -271, -272, -273, -274, -275, -276, -533, -279, -555, -554, -525, -297, -554, -555, -555, -302, -305, -543, -555, -555, -319, -555, -329, -330, -400, -401, -402, -403, -404, -554, -407, -554, -554, -554, -554, -554, -434, -440, -441, -555, -446, -447, -448, -449, -450, -451, -452, -453, -454, -455, -456, -459, -460, -555, -2, -544, -550, -551, -552, -555, -555, -555, -555, -555, -3, -13, -555, -105, -106, -107, -108, -109, -110, -111, -114, -115, -116, -117, -118, -119, -120, -121, -122, -123, -124, -125, -126, -127, -128, -129, -130, -131, -132, -133, -134, -135, -136, -137, -138, -139, -140, -141, -142, -143, -144, -145, -146, -147, -148, -149, -150, -151, -152, -153, -154, -155, -156, -157, -158, -159, -160, -161, -162, -163, -164, -165, -166, -167, -168, -169, -170, -171, -172, -173, -174, -175, -176, -177, -178, -179, -180, -181, -182, -183, -184, -185, -186, -187, -555, -18, -112, -10, -555, -555, -555, -554, -554, -555, -555, -555, -555, -555, -555, -41, -555, -457, -555, -277, -555, -555, -10, -555, -42, -224, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -555, -369, -371, -47, -233, -248, -262, -262, -252, -555, -263, -555, -289, -327, -328, -527, -555, -48, -49, -555, -555, -555, -55, -554, -555, -296, -375, -383, -385, -63, -381, -64, -555, -543, -11, -65, -10, -555, -555, -70, -73, -10, -457, -555, -555, -277, -292, -545, -555, -331, -382, -555, -75, -555, -80, -284, -442, -443, -555, -209, -210, -225, -555, -546, -10, -545, -234, -545, -547, -547, -555, -555, -547, -555, -298, -299, -555, -555, -342, -343, -350, -554, -491, -357, -554, -554, -368, -490, -492, -493, -494, -495, -496, -555, -509, -514, -515, -517, -518, -519, -555, -44, -555, -555, -555, -555, -543, -555, -544, -457, -555, -555, -277, -555, -498, -499, -101, -555, -103, -555, -277, -555, -316, -457, -555, -105, -106, -143, -144, -160, -165, -172, -175, -322, -555, -523, -555, -405, -555, -420, -555, -422, -555, -555, -555, -412, -555, -555, -418, -555, -433, -435, -436, -437, -438, -444, -445, 968, -5, -553, -19, -20, -21, -22, -23, -555, -555, -15, -16, -17, -555, -555, -25, -34, -188, -263, -555, -555, -26, -35, -36, -27, -190, -555, -555, -534, -535, -554, -378, -536, -537, -534, -255, -535, -380, -539, -540, -554, -534, -535, -33, -198, -39, -40, -555, -555, -554, -554, -284, -555, -555, -555, -555, -295, -199, -200, -201, -202, -203, -204, -205, -206, -211, -212, -213, -214, -215, -216, -217, -218, -219, -220, -221, -222, -223, -226, -227, -228, -229, -555, -554, -249, -555, -250, -555, -260, -555, -264, -530, -255, -255, -255, -554, -56, -545, -243, -244, -262, -262, -256, -257, -555, -554, -554, -555, -291, -9, -544, -555, -66, -282, -81, -71, -555, -555, -554, -555, -555, -554, -555, -284, -555, -442, -443, -77, -82, -555, -555, -555, -555, -555, -230, -555, -392, -555, -555, -235, -236, -549, -548, -238, -549, -287, -288, -526, -339, -10, -10, -555, -341, -555, -359, -366, -555, -363, -364, -555, -367, -491, -555, -500, -555, -502, -504, -508, -516, -520, -10, -332, -333, -334, -10, -555, -555, -555, -555, -10, -387, -554, -555, -555, -554, -284, -311, -101, -102, -555, -554, -555, -314, -461, -555, -555, -555, -320, -489, -324, -541, -542, -545, -406, -421, -424, -425, -427, -408, -423, -409, -410, -411, -555, -414, -416, -417, -555, -439, -7, -14, -113, -24, -555, -269, -555, -285, -286, -555, -555, -59, -241, -242, -376, -555, -61, -379, -555, -57, -377, -534, -535, -534, -535, -555, -555, -188, -294, -555, -353, -555, -355, -10, -262, -261, -265, -555, -528, -529, -51, -372, -52, -373, -53, -374, -10, -239, -555, -245, -247, -43, -555, -254, -258, -555, -10, -10, -290, -12, -66, -555, -74, -79, -555, -534, -535, -554, -538, -283, -555, -555, -554, -555, -197, -207, -208, -555, -554, -554, -280, -281, -547, -555, -555, -340, -351, -555, -358, -554, -352, -555, -554, -554, -510, -497, -555, -555, -507, -554, -335, -554, -303, -336, -337, -338, -306, -555, -309, -555, -555, -555, -534, -535, -538, -283, -555, -555, -101, -104, -538, -555, -10, -555, -463, -555, -10, -10, -489, -555, -466, -467, -469, -470, -472, -473, -522, -522, -478, -480, -480, -480, -488, -491, -512, -555, -555, -555, -10, -413, -415, -419, -189, -267, -555, -555, -555, -30, -193, -31, -194, -60, -32, -195, -62, -196, -58, -555, -555, -555, -286, -285, -231, -354, -555, -555, -251, -266, -555, -240, -262, -555, -259, -555, -555, -72, -285, -286, -83, -293, -554, -348, -10, -393, -554, -394, -395, -237, -344, -345, -365, -555, -284, -555, -361, -362, -501, -503, -506, -555, -346, -555, -555, -10, -10, -308, -310, -555, -285, -93, -555, -285, -555, -462, -317, -555, -555, -545, -465, -468, -471, -555, -476, -477, -555, -555, -484, -555, -486, -555, -487, -555, -325, -524, -426, -429, -430, -431, -432, -555, -268, -28, -191, -29, -192, -555, -555, -356, -370, -54, -246, -262, -384, -386, -8, -10, -399, -349, -555, -555, -397, -283, -554, -505, -300, -555, -301, -555, -555, -555, -10, -312, -315, -10, -321, -323, -555, -474, -522, -521, -479, -480, -480, -480, -555, -513, -511, -489, -428, -253, -555, -398, -10, -457, -555, -555, -277, -396, -360, -10, -304, -307, -265, -554, -10, -555, -464, -475, -555, -482, -483, -485, -10, -392, -554, -555, -555, -284, -554, -388, -389, -390, -555, -318, -480, -555, -391, -555, -534, -535, -538, -283, -347, -313, -481, -326, -285] + +racc_goto_table = [ +13, 315, 307, 699, 323, 378, 498, 114, 114, 539, 250, 250, 250, 432, 437, +442, 5, 208, 208, 396, 284, 488, 208, 208, 208, 659, 331, 102, 294, 294, +13, 288, 288, 572, 576, 529, 10, 98, 12, 557, 748, 312, 560, 562, 251, +251, 251, 366, 565, 109, 194, 580, 208, 208, 117, 117, 216, 208, 208, 294, +294, 208, 355, 364, 99, 114, 10, 715, 12, 418, 425, 760, 707, 267, 274, +276, 494, 495, 496, 114, 542, 545, 659, 2, 549, 102, 280, 297, 252, 252, +252, 606, 763, 723, 727, 352, 759, 616, 359, 13, 1, 916, 590, 208, 208, +208, 208, 13, 13, 347, 348, 403, 282, 351, 641, 5, 564, 710, 385, 387, +317, 714, 394, 409, 5, 885, 830, 248, 262, 263, 193, 360, 396, 411, 499, +10, 668, 12, 676, 504, 207, 654, 811, 10, 10, 12, 12, 428, 429, 853, +854, 380, 316, 667, 319, 405, 406, 407, 408, 320, 358, 594, 762, 677, 678, +833, 662, 664, 666, 379, 601, 309, 349, 834, 350, 310, 835, 738, 935, 743, +346, 346, 916, 598, 346, 904, 369, 312, 312, 747, 600, 410, 114, 766, 918, +13, 208, 208, 208, 208, 208, 321, 441, 550, 208, 208, 208, 659, 713, 247, +485, 656, 507, 656, 13, 208, 508, 950, 422, 422, 760, 731, 815, 889, 382, +383, 346, 346, 346, 346, 674, 10, 389, 12, 417, 423, 426, 615, 392, 865, +768, 763, 445, 769, 848, 759, 909, 908, 912, 828, 10, nil, 12, 526, nil, +683, 250, 250, nil, nil, nil, 432, 437, nil, nil, 250, nil, nil, 208, 208, +553, 540, 488, 541, nil, nil, 565, 208, 728, 719, nil, 13, 294, nil, nil, +288, 13, 530, nil, nil, 502, 251, 331, nil, nil, 294, nil, nil, 288, 251, +nil, 938, 102, nil, nil, nil, nil, nil, nil, 13, nil, 762, 511, nil, nil, +nil, nil, 10, nil, 12, nil, nil, 10, 771, 12, nil, 271, 275, 447, 448, +14, 740, nil, 688, 503, 252, 693, 280, 457, 512, 517, 707, 280, 252, 717, +10, 688, 12, 910, 208, 208, 910, 759, 599, 759, 963, 759, 902, 943, nil, +14, 290, 290, 513, 715, 641, 294, nil, 519, 364, nil, 782, nil, 501, 505, +102, 785, 951, nil, 787, nil, 208, 509, nil, nil, 579, 893, nil, nil, 760, +595, nil, 357, 365, 656, 656, 688, nil, nil, 646, 647, 577, 578, nil, nil, +688, nil, nil, nil, 957, 763, 114, nil, nil, 759, 114, nil, 659, 913, 806, +914, nil, nil, 821, 797, nil, 825, 826, 565, 14, nil, nil, nil, nil, nil, +759, nil, 14, 14, 312, 312, nil, nil, 843, nil, nil, nil, 846, 847, nil, +441, 208, 208, 622, nil, nil, nil, 623, 117, nil, 669, nil, 117, nil, nil, +nil, nil, nil, 685, nil, 818, 692, 346, 346, nil, nil, nil, nil, nil, 632, +762, nil, nil, nil, 637, nil, nil, nil, nil, 640, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 955, nil, nil, 604, nil, 208, 530, 312, nil, +nil, 312, 13, nil, nil, 294, nil, nil, 288, nil, 208, nil, 441, 208, 901, +14, nil, nil, 680, nil, nil, 732, nil, nil, 737, 441, nil, 208, nil, 894, +742, 661, 663, 665, 14, nil, nil, nil, 10, nil, 12, 13, 13, 655, nil, +294, nil, nil, 711, nil, nil, nil, nil, nil, nil, 767, nil, nil, nil, nil, +797, 312, 13, 816, 312, 923, 13, 857, 859, 861, 312, 13, 930, 208, nil, +441, 208, 10, 10, 12, 12, 441, 208, 271, 35, 275, 208, nil, 208, nil, +795, 724, 724, nil, 936, 656, 929, nil, 10, 703, 12, 14, 10, nil, 12, +290, 14, 10, nil, 12, nil, 745, 331, nil, 35, 287, 287, nil, 290, 310, +208, 208, nil, 952, nil, nil, 208, nil, nil, 14, nil, nil, nil, 956, nil, +656, nil, nil, 744, nil, nil, 920, nil, nil, 13, nil, 354, 368, nil, 368, +698, nil, 283, nil, nil, nil, nil, 13, 778, 780, nil, 530, nil, nil, 783, +nil, nil, 13, 13, 294, nil, nil, 288, 809, nil, nil, nil, nil, nil, nil, +10, 294, 12, 35, 288, nil, nil, nil, nil, 365, nil, 35, 35, 10, nil, +12, 863, nil, nil, nil, nil, nil, nil, 10, 10, 12, 12, nil, nil, 346, +nil, 746, 422, nil, nil, nil, nil, nil, nil, 940, 941, 942, 634, nil, nil, +nil, 801, 638, 208, nil, nil, nil, 634, 13, nil, nil, nil, 13, 13, nil, +nil, nil, nil, 838, nil, nil, nil, nil, 688, nil, nil, nil, nil, nil, nil, +nil, 114, nil, 844, 13, 845, nil, 965, nil, 849, nil, 208, 208, nil, 10, +nil, 12, nil, 10, 10, 12, 12, nil, nil, 35, 841, nil, nil, nil, 634, +634, 634, nil, nil, nil, nil, nil, nil, nil, nil, 10, nil, 12, 35, 907, +nil, nil, nil, 13, 872, 874, nil, nil, nil, nil, nil, nil, 441, nil, 882, +nil, nil, 416, nil, nil, nil, nil, 208, 318, 13, 13, nil, nil, nil, nil, +nil, nil, 14, nil, nil, nil, 283, nil, 290, 10, nil, 12, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 346, nil, nil, nil, 724, nil, nil, nil, nil, +10, 10, 12, 12, nil, 35, nil, nil, nil, 287, 35, 14, 14, nil, 896, +nil, 13, 294, 365, nil, 925, nil, 287, 958, nil, nil, nil, nil, nil, nil, +nil, 13, 14, 35, 13, nil, 14, nil, nil, nil, nil, 14, nil, 283, nil, +nil, nil, nil, 283, nil, nil, nil, 10, 13, 12, nil, 928, nil, nil, nil, +13, nil, nil, 312, nil, 13, nil, 10, nil, 12, 10, nil, 12, 13, nil, +208, nil, 441, nil, nil, nil, nil, nil, nil, nil, 346, nil, nil, nil, 10, +nil, 12, nil, 368, nil, nil, 10, nil, 12, nil, nil, 10, nil, 12, nil, +420, 424, nil, nil, 10, nil, 12, nil, nil, 14, nil, nil, nil, 634, nil, +nil, 638, nil, 634, nil, nil, nil, 14, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 14, 14, nil, nil, nil, 290, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 290, nil, nil, nil, nil, nil, nil, nil, nil, 490, nil, +492, nil, nil, nil, nil, 493, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 324, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 14, nil, nil, nil, 14, 14, 384, +nil, 386, 386, 390, 393, 386, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 869, 14, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, +nil, nil, 287, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 14, nil, 35, 35, nil, nil, nil, nil, nil, 368, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 14, 14, 35, 217, nil, nil, +35, 249, 249, 249, nil, 35, nil, nil, nil, nil, nil, nil, nil, 704, 705, +nil, nil, 304, 305, 306, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +626, nil, 249, 249, 720, nil, nil, nil, 722, nil, nil, nil, nil, 730, nil, +nil, 14, nil, nil, nil, 927, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 14, nil, nil, 14, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 35, nil, nil, nil, nil, 14, nil, nil, nil, nil, nil, nil, +14, 35, nil, nil, nil, 14, 657, nil, 318, nil, 660, 35, 35, 14, 500, +nil, 287, nil, nil, nil, nil, nil, nil, nil, nil, 673, 796, nil, 287, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 799, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 804, 805, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 657, nil, nil, 318, nil, nil, nil, nil, nil, nil, 556, nil, nil, +556, 556, 35, nil, nil, nil, 35, 35, nil, nil, 419, 249, 427, 249, 249, +nil, nil, nil, 446, nil, nil, nil, nil, nil, nil, nil, nil, nil, 35, nil, +nil, nil, 217, nil, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, +470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, +nil, nil, nil, nil, nil, nil, 870, nil, 249, nil, 249, 774, 35, nil, nil, +249, nil, nil, nil, nil, nil, nil, 249, 249, nil, nil, nil, nil, nil, nil, +nil, 249, nil, 35, 35, nil, nil, nil, nil, nil, nil, nil, 798, 633, nil, +nil, nil, nil, nil, nil, 888, nil, nil, 633, 657, 318, nil, nil, nil, nil, +nil, 536, nil, nil, nil, nil, nil, nil, nil, nil, nil, 898, 899, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 814, 35, nil, nil, nil, 924, +nil, nil, nil, nil, nil, nil, 651, nil, nil, nil, 35, nil, nil, 35, nil, +633, 633, 633, 651, nil, nil, nil, nil, nil, nil, 420, nil, nil, 651, 651, +nil, nil, 35, 922, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, 35, +nil, nil, nil, 934, 851, nil, nil, 35, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 871, 944, nil, nil, nil, nil, +nil, nil, 949, nil, nil, nil, nil, 953, nil, nil, 249, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 420, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 249, 249, nil, 446, 648, +427, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 249, nil, 249, nil, 249, 917, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 672, nil, nil, nil, nil, 318, nil, nil, nil, nil, +nil, nil, nil, nil, 249, nil, nil, 249, nil, nil, nil, nil, nil, nil, 933, +695, 696, 697, nil, nil, nil, nil, nil, nil, nil, nil, nil, 249, nil, 633, +249, nil, nil, nil, 633, 933, nil, nil, nil, nil, 812, 817, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 556, nil, nil, 556, 556, nil, nil, nil, nil, +nil, 812, nil, 812, nil, nil, nil, 249, nil, nil, 249, nil, nil, nil, nil, +nil, 249, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 773, nil, 249, nil, nil, 779, 781, nil, nil, 293, 293, +784, nil, nil, 786, nil, 293, 293, 293, nil, nil, nil, nil, nil, nil, 793, +nil, nil, nil, nil, nil, nil, 293, 249, nil, nil, nil, nil, nil, nil, 293, +293, nil, 887, nil, 249, 249, 891, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 249, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 249, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 556, nil, nil, nil, nil, 249, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 249, 873, 875, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 779, 781, 784, 812, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 249, nil, nil, nil, 812, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 293, nil, 293, 293, 293, 293, 293, 293, 293, 293, +293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, +293, 293, 293, nil, nil, nil, nil, nil, nil, nil, nil, 293, nil, 293, nil, +nil, 249, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +875, 873, nil, nil, nil, 249, nil, nil, nil, nil, nil, nil, 293, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 249, 293, nil, nil, nil, nil, +nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +249, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 249, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 293, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 293, 293, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 293, nil, 293, nil, 293, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 293, 293, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, +293, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +293, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 293, nil, 293, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, 293, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 293, 293, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 293, nil, nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 293, 293, 293, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 293, 293, nil, nil, nil, 293, nil, nil, nil, nil, nil, nil, +nil, nil, 293, nil, nil, nil, nil, nil, nil, nil, nil, nil, 293, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 293] + +racc_goto_check = [ +21, 22, 51, 10, 104, 47, 35, 48, 48, 8, 29, 29, 29, 33, 33, +33, 7, 21, 21, 47, 41, 61, 21, 21, 21, 154, 107, 83, 52, 52, +21, 21, 21, 77, 77, 43, 17, 4, 20, 109, 84, 29, 109, 109, 54, +54, 54, 46, 145, 14, 14, 80, 21, 21, 50, 50, 18, 21, 21, 52, +52, 21, 21, 21, 6, 48, 17, 147, 20, 24, 24, 110, 106, 34, 34, +34, 33, 33, 33, 48, 55, 55, 154, 2, 55, 83, 38, 42, 56, 56, +56, 129, 141, 79, 79, 4, 108, 129, 17, 21, 1, 151, 45, 21, 21, +21, 21, 21, 21, 16, 16, 5, 39, 16, 60, 7, 148, 111, 126, 126, +56, 111, 126, 7, 7, 12, 78, 31, 31, 31, 15, 19, 47, 27, 58, +17, 59, 20, 63, 64, 26, 36, 11, 17, 17, 20, 20, 22, 22, 142, +142, 72, 73, 36, 74, 16, 16, 16, 16, 76, 81, 82, 111, 36, 36, +11, 60, 60, 60, 85, 86, 87, 88, 89, 90, 26, 91, 92, 93, 94, +26, 26, 151, 95, 26, 96, 97, 29, 29, 98, 99, 2, 48, 100, 101, +21, 21, 21, 21, 21, 21, 102, 48, 103, 21, 21, 21, 154, 105, 112, +113, 62, 115, 62, 21, 21, 116, 117, 54, 54, 110, 118, 119, 120, 124, +125, 26, 26, 26, 26, 62, 17, 127, 20, 18, 18, 18, 128, 130, 131, +132, 141, 18, 133, 135, 108, 137, 139, 144, 149, 17, nil, 20, 51, nil, +43, 29, 29, nil, nil, nil, 33, 33, nil, nil, 29, nil, nil, 21, 21, +104, 51, 61, 51, nil, nil, 145, 21, 80, 145, nil, 21, 52, nil, nil, +21, 21, 41, nil, nil, 54, 54, 107, nil, nil, 52, nil, nil, 21, 54, +nil, 142, 83, nil, nil, nil, nil, nil, nil, 21, nil, 111, 4, nil, nil, +nil, nil, 17, nil, 20, nil, nil, 17, 129, 20, nil, 57, 57, 26, 26, +23, 45, nil, 33, 56, 56, 33, 38, 26, 6, 42, 106, 38, 56, 148, +17, 33, 20, 108, 21, 21, 108, 108, 46, 108, 78, 108, 79, 84, nil, +23, 23, 23, 39, 147, 60, 52, nil, 39, 21, nil, 35, nil, 31, 31, +83, 35, 11, nil, 35, nil, 21, 31, nil, nil, 4, 111, nil, nil, 110, +83, nil, 23, 23, 62, 62, 33, nil, nil, 22, 22, 16, 16, nil, nil, +33, nil, nil, nil, 10, 141, 48, nil, nil, 108, 48, nil, 154, 111, 43, +111, nil, nil, 109, 61, nil, 109, 109, 145, 23, nil, nil, nil, nil, nil, +108, nil, 23, 23, 29, 29, nil, nil, 8, nil, nil, nil, 8, 8, nil, +48, 21, 21, 14, nil, nil, nil, 14, 50, nil, 51, nil, 50, nil, nil, +nil, nil, nil, 22, nil, 55, 22, 26, 26, nil, nil, nil, nil, nil, 34, +111, nil, nil, nil, 34, nil, nil, nil, nil, 34, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 111, nil, nil, 26, nil, 21, 41, 29, nil, +nil, 29, 21, nil, nil, 52, nil, nil, 21, nil, 21, nil, 48, 21, 77, +23, nil, nil, 7, nil, nil, 22, nil, nil, 22, 48, nil, 21, nil, 145, +22, 34, 34, 34, 23, nil, nil, nil, 17, nil, 20, 21, 21, 56, nil, +52, nil, nil, 21, nil, nil, nil, nil, nil, nil, 51, nil, nil, nil, nil, +61, 29, 21, 24, 29, 77, 21, 143, 143, 143, 29, 21, 77, 21, nil, +48, 21, 17, 17, 20, 20, 48, 21, 57, 44, 57, 21, nil, 21, nil, +104, 83, 83, nil, 8, 62, 109, nil, 17, 56, 20, 23, 17, nil, 20, +23, 23, 17, nil, 20, nil, 83, 107, nil, 44, 44, 44, nil, 23, 26, +21, 21, nil, 80, nil, nil, 21, nil, nil, 23, nil, nil, nil, 8, nil, +62, nil, nil, 16, nil, nil, 61, nil, nil, 21, nil, 44, 44, nil, 44, +26, nil, 9, nil, nil, nil, nil, 21, 18, 18, nil, 41, nil, nil, 18, +nil, nil, 21, 21, 52, nil, nil, 21, 41, nil, nil, nil, nil, nil, nil, +17, 52, 20, 44, 21, nil, nil, nil, nil, 23, nil, 44, 44, 17, nil, +20, 47, nil, nil, nil, nil, nil, nil, 17, 17, 20, 20, nil, nil, 26, +nil, 26, 54, nil, nil, nil, nil, nil, nil, 143, 143, 143, 57, nil, nil, +nil, 56, 57, 21, nil, nil, nil, 57, 21, nil, nil, nil, 21, 21, nil, +nil, nil, nil, 54, nil, nil, nil, nil, 33, nil, nil, nil, nil, nil, nil, +nil, 48, nil, 83, 21, 83, nil, 143, nil, 83, nil, 21, 21, nil, 17, +nil, 20, nil, 17, 17, 20, 20, nil, nil, 44, 16, nil, nil, nil, 57, +57, 57, nil, nil, nil, nil, nil, nil, nil, nil, 17, nil, 20, 44, 51, +nil, nil, nil, 21, 18, 18, nil, nil, nil, nil, nil, nil, 48, nil, 54, +nil, nil, 9, nil, nil, nil, nil, 21, 25, 21, 21, nil, nil, nil, nil, +nil, nil, 23, nil, nil, nil, 9, nil, 23, 17, nil, 20, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, 83, nil, nil, nil, nil, +17, 17, 20, 20, nil, 44, nil, nil, nil, 44, 44, 23, 23, nil, 16, +nil, 21, 52, 23, nil, 21, nil, 44, 22, nil, nil, nil, nil, nil, nil, +nil, 21, 23, 44, 21, nil, 23, nil, nil, nil, nil, 23, nil, 9, nil, +nil, nil, nil, 9, nil, nil, nil, 17, 21, 20, nil, 17, nil, nil, nil, +21, nil, nil, 29, nil, 21, nil, 17, nil, 20, 17, nil, 20, 21, nil, +21, nil, 48, nil, nil, nil, nil, nil, nil, nil, 26, nil, nil, nil, 17, +nil, 20, nil, 44, nil, nil, 17, nil, 20, nil, nil, 17, nil, 20, nil, +25, 25, nil, nil, 17, nil, 20, nil, nil, 23, nil, nil, nil, 57, nil, +nil, 57, nil, 57, nil, nil, nil, 23, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 23, 23, nil, nil, nil, 23, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 23, nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, +25, nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, nil, 23, 23, 53, +nil, 53, 53, 53, 53, 53, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 23, 23, nil, nil, nil, nil, nil, nil, 44, nil, nil, nil, +nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 23, nil, 44, 44, nil, nil, nil, nil, nil, 44, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, 23, 44, 28, nil, nil, +44, 28, 28, 28, nil, 44, nil, nil, nil, nil, nil, nil, nil, 9, 9, +nil, nil, 28, 28, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +25, nil, 28, 28, 9, nil, nil, nil, 9, nil, nil, nil, nil, 9, nil, +nil, 23, nil, nil, nil, 23, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 23, nil, nil, 23, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 44, nil, nil, nil, nil, 23, nil, nil, nil, nil, nil, nil, +23, 44, nil, nil, nil, 23, 25, nil, 25, nil, 25, 44, 44, 23, 53, +nil, 44, nil, nil, nil, nil, nil, nil, nil, nil, 25, 9, nil, 44, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 9, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 9, 9, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 25, nil, nil, 25, nil, nil, nil, nil, nil, nil, 53, nil, nil, +53, 53, 44, nil, nil, nil, 44, 44, nil, nil, 28, 28, 28, 28, 28, +nil, nil, nil, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, nil, +nil, nil, 28, nil, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +nil, nil, nil, nil, nil, nil, 9, nil, 28, nil, 28, 25, 44, nil, nil, +28, nil, nil, nil, nil, nil, nil, 28, 28, nil, nil, nil, nil, nil, nil, +nil, 28, nil, 44, 44, nil, nil, nil, nil, nil, nil, nil, 25, 53, nil, +nil, nil, nil, nil, nil, 9, nil, nil, 53, 25, 25, nil, nil, nil, nil, +nil, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, 9, 9, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, 44, nil, nil, nil, 44, +nil, nil, nil, nil, nil, nil, 53, nil, nil, nil, 44, nil, nil, 44, nil, +53, 53, 53, 53, nil, nil, nil, nil, nil, nil, 25, nil, nil, 53, 53, +nil, nil, 44, 9, nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, 44, +nil, nil, nil, 9, 25, nil, nil, 44, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 25, 9, nil, nil, nil, nil, +nil, nil, 9, nil, nil, nil, nil, 9, nil, nil, 28, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 25, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 28, 28, nil, 28, 28, +28, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 28, nil, 28, nil, 28, 25, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 28, nil, nil, nil, nil, 25, nil, nil, nil, nil, +nil, nil, nil, nil, 28, nil, nil, 28, nil, nil, nil, nil, nil, nil, 25, +28, 28, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, 28, nil, 53, +28, nil, nil, nil, 53, 25, nil, nil, nil, nil, 53, 53, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 53, nil, nil, 53, 53, nil, nil, nil, nil, +nil, 53, nil, 53, nil, nil, nil, 28, nil, nil, 28, nil, nil, nil, nil, +nil, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 28, nil, 28, nil, nil, 28, 28, nil, nil, 37, 37, +28, nil, nil, 28, nil, 37, 37, 37, nil, nil, nil, nil, nil, nil, 28, +nil, nil, nil, nil, nil, nil, 37, 28, nil, nil, nil, nil, nil, nil, 37, +37, nil, 53, nil, 28, 28, 53, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 28, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, nil, nil, nil, nil, 28, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 28, 28, 28, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 28, 28, 28, 53, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 28, nil, nil, nil, 53, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 37, nil, 37, 37, 37, 37, 37, 37, 37, 37, +37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, +37, 37, 37, nil, nil, nil, nil, nil, nil, nil, nil, 37, nil, 37, nil, +nil, 28, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +28, 28, nil, nil, nil, 28, nil, nil, nil, nil, nil, nil, 37, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 28, 37, nil, nil, nil, nil, +nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +28, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 28, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 37, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 37, 37, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 37, nil, 37, nil, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 37, 37, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, +37, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 37, nil, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, 37, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 37, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 37, nil, nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 37, 37, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 37, 37, nil, nil, nil, 37, nil, nil, nil, nil, nil, nil, +nil, nil, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, 37, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 37] + +racc_goto_pointer = [nil, 100, 83, nil, 34, 12, 61, 16, -300, 632, -535, -557, -686, nil, 42, 122, 52, 36, 38, 69, 38, 0, -52, 330, -127, 779, 123, 24, 1149, -12, nil, 105, nil, -188, 47, -261, -344, 1752, 56, 82, nil, -11, 55, -263, 594, -260, -16, -60, 0, nil, 47, -39, -3, 1006, 22, -233, 66, 300, -134, -363, -328, -231, -276, -368, -130, nil, nil, nil, nil, nil, nil, nil, 86, 98, 99, nil, 103, -314, -594, -484, -301, 98, -205, 24, -560, 104, -209, 120, 113, -550, 114, -551, -411, -724, -415, -184, -660, 122, -410, -188, -408, -669, 145, -118, -52, -351, -483, -30, -504, -287, -529, -438, 189, -36, nil, -60, -57, -717, -361, -478, -592, nil, nil, nil, 153, 152, 43, 155, -152, -292, 160, -529, -368, -366, nil, -505, nil, -606, nil, -605, nil, -508, -608, -183, -608, -290, nil, -492, -222, -469, nil, -757, nil, nil, -464] + +racc_goto_default = [ +nil, nil, nil, 3, nil, 4, 353, 279, nil, 538, nil, 831, nil, 278, nil, +nil, nil, 212, 16, 11, 213, 303, nil, 211, nil, 255, 15, nil, 19, 20, +21, nil, 25, 691, nil, nil, nil, 26, 29, nil, 31, 34, 33, nil, 209, +363, nil, 116, 435, 115, 69, nil, 42, 311, 313, nil, 314, 433, nil, nil, +635, 486, 253, nil, nil, 269, 43, 44, 45, 46, 47, 48, 49, nil, 270, +55, nil, nil, nil, nil, nil, nil, nil, 573, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +326, 325, 709, 328, nil, 329, 330, nil, nil, 439, nil, nil, nil, nil, nil, +nil, 68, 70, 71, 72, nil, nil, nil, nil, 611, nil, nil, nil, nil, 395, +750, 753, 758, 755, 756, 757, 911, nil, nil, 761, 337, 332, 339, nil, 567, +568, 765, 342, 345, 260] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 143, :_reduce_none, + 2, 144, :_reduce_2, + 0, 145, :_reduce_3, + 1, 145, :_reduce_4, + 3, 145, :_reduce_5, + 1, 147, :_reduce_none, + 4, 147, :_reduce_7, + 4, 150, :_reduce_8, + 2, 151, :_reduce_9, + 0, 155, :_reduce_10, + 1, 155, :_reduce_11, + 3, 155, :_reduce_12, + 0, 169, :_reduce_13, + 4, 149, :_reduce_14, + 3, 149, :_reduce_15, + 3, 149, :_reduce_none, + 3, 149, :_reduce_17, + 2, 149, :_reduce_18, + 3, 149, :_reduce_19, + 3, 149, :_reduce_20, + 3, 149, :_reduce_21, + 3, 149, :_reduce_22, + 3, 149, :_reduce_23, + 4, 149, :_reduce_none, + 3, 149, :_reduce_25, + 3, 149, :_reduce_26, + 3, 149, :_reduce_27, + 6, 149, :_reduce_none, + 6, 149, :_reduce_none, + 5, 149, :_reduce_30, + 5, 149, :_reduce_none, + 5, 149, :_reduce_none, + 3, 149, :_reduce_none, + 3, 149, :_reduce_34, + 3, 149, :_reduce_35, + 3, 149, :_reduce_36, + 1, 149, :_reduce_none, + 1, 168, :_reduce_none, + 3, 168, :_reduce_39, + 3, 168, :_reduce_40, + 2, 168, :_reduce_41, + 2, 168, :_reduce_42, + 1, 168, :_reduce_none, + 1, 158, :_reduce_none, + 1, 160, :_reduce_none, + 1, 160, :_reduce_none, + 2, 160, :_reduce_47, + 2, 160, :_reduce_48, + 2, 160, :_reduce_49, + 1, 172, :_reduce_none, + 4, 172, :_reduce_none, + 4, 172, :_reduce_none, + 4, 172, :_reduce_none, + 4, 177, :_reduce_none, + 2, 171, :_reduce_55, + 3, 171, :_reduce_none, + 4, 171, :_reduce_57, + 5, 171, :_reduce_none, + 4, 171, :_reduce_59, + 5, 171, :_reduce_none, + 4, 171, :_reduce_61, + 5, 171, :_reduce_none, + 2, 171, :_reduce_63, + 2, 171, :_reduce_64, + 1, 161, :_reduce_65, + 3, 161, :_reduce_66, + 1, 181, :_reduce_67, + 3, 181, :_reduce_68, + 1, 180, :_reduce_69, + 2, 180, :_reduce_70, + 3, 180, :_reduce_71, + 5, 180, :_reduce_none, + 2, 180, :_reduce_73, + 4, 180, :_reduce_none, + 2, 180, :_reduce_75, + 1, 180, :_reduce_76, + 3, 180, :_reduce_none, + 1, 183, :_reduce_78, + 3, 183, :_reduce_79, + 2, 182, :_reduce_80, + 3, 182, :_reduce_81, + 1, 185, :_reduce_none, + 3, 185, :_reduce_none, + 1, 184, :_reduce_84, + 4, 184, :_reduce_85, + 3, 184, :_reduce_86, + 3, 184, :_reduce_none, + 3, 184, :_reduce_none, + 3, 184, :_reduce_none, + 2, 184, :_reduce_none, + 1, 184, :_reduce_none, + 1, 159, :_reduce_92, + 4, 159, :_reduce_93, + 4, 159, :_reduce_94, + 3, 159, :_reduce_95, + 3, 159, :_reduce_96, + 3, 159, :_reduce_97, + 3, 159, :_reduce_98, + 2, 159, :_reduce_99, + 1, 159, :_reduce_none, + 1, 187, :_reduce_none, + 2, 188, :_reduce_102, + 1, 188, :_reduce_103, + 3, 188, :_reduce_104, + 1, 189, :_reduce_none, + 1, 189, :_reduce_none, + 1, 189, :_reduce_none, + 1, 189, :_reduce_108, + 1, 189, :_reduce_109, + 1, 156, :_reduce_110, + 1, 156, :_reduce_none, + 1, 157, :_reduce_112, + 3, 157, :_reduce_113, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 190, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 1, 191, :_reduce_none, + 3, 170, :_reduce_188, + 5, 170, :_reduce_189, + 3, 170, :_reduce_190, + 6, 170, :_reduce_191, + 6, 170, :_reduce_192, + 5, 170, :_reduce_193, + 5, 170, :_reduce_none, + 5, 170, :_reduce_none, + 5, 170, :_reduce_none, + 4, 170, :_reduce_none, + 3, 170, :_reduce_none, + 3, 170, :_reduce_199, + 3, 170, :_reduce_200, + 3, 170, :_reduce_201, + 3, 170, :_reduce_202, + 3, 170, :_reduce_203, + 3, 170, :_reduce_204, + 3, 170, :_reduce_205, + 3, 170, :_reduce_206, + 4, 170, :_reduce_207, + 4, 170, :_reduce_208, + 2, 170, :_reduce_209, + 2, 170, :_reduce_210, + 3, 170, :_reduce_211, + 3, 170, :_reduce_212, + 3, 170, :_reduce_213, + 3, 170, :_reduce_214, + 3, 170, :_reduce_215, + 3, 170, :_reduce_216, + 3, 170, :_reduce_217, + 3, 170, :_reduce_218, + 3, 170, :_reduce_219, + 3, 170, :_reduce_220, + 3, 170, :_reduce_221, + 3, 170, :_reduce_222, + 3, 170, :_reduce_223, + 2, 170, :_reduce_224, + 2, 170, :_reduce_225, + 3, 170, :_reduce_226, + 3, 170, :_reduce_227, + 3, 170, :_reduce_228, + 3, 170, :_reduce_229, + 3, 170, :_reduce_230, + 5, 170, :_reduce_231, + 1, 170, :_reduce_none, + 1, 167, :_reduce_none, + 1, 164, :_reduce_234, + 2, 164, :_reduce_235, + 2, 164, :_reduce_236, + 4, 164, :_reduce_237, + 2, 164, :_reduce_238, + 3, 199, :_reduce_239, + 2, 201, :_reduce_none, + 1, 202, :_reduce_241, + 1, 202, :_reduce_none, + 1, 200, :_reduce_243, + 1, 200, :_reduce_none, + 2, 200, :_reduce_245, + 4, 200, :_reduce_246, + 2, 200, :_reduce_247, + 1, 173, :_reduce_248, + 2, 173, :_reduce_249, + 2, 173, :_reduce_250, + 4, 173, :_reduce_251, + 1, 173, :_reduce_252, + 4, 205, :_reduce_none, + 1, 205, :_reduce_none, + 0, 207, :_reduce_255, + 2, 176, :_reduce_256, + 1, 206, :_reduce_none, + 2, 206, :_reduce_258, + 3, 206, :_reduce_259, + 2, 204, :_reduce_260, + 2, 203, :_reduce_261, + 0, 203, :_reduce_262, + 1, 196, :_reduce_263, + 2, 196, :_reduce_264, + 3, 196, :_reduce_265, + 4, 196, :_reduce_266, + 3, 166, :_reduce_267, + 4, 166, :_reduce_268, + 2, 166, :_reduce_269, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 1, 194, :_reduce_none, + 0, 229, :_reduce_279, + 4, 194, :_reduce_280, + 4, 194, :_reduce_281, + 3, 194, :_reduce_282, + 3, 194, :_reduce_283, + 2, 194, :_reduce_284, + 4, 194, :_reduce_285, + 4, 194, :_reduce_286, + 3, 194, :_reduce_287, + 3, 194, :_reduce_288, + 1, 194, :_reduce_289, + 4, 194, :_reduce_290, + 3, 194, :_reduce_291, + 1, 194, :_reduce_292, + 5, 194, :_reduce_293, + 4, 194, :_reduce_294, + 3, 194, :_reduce_295, + 2, 194, :_reduce_296, + 1, 194, :_reduce_none, + 2, 194, :_reduce_298, + 2, 194, :_reduce_299, + 6, 194, :_reduce_300, + 6, 194, :_reduce_301, + 0, 230, :_reduce_302, + 0, 231, :_reduce_303, + 7, 194, :_reduce_304, + 0, 232, :_reduce_305, + 0, 233, :_reduce_306, + 7, 194, :_reduce_307, + 5, 194, :_reduce_308, + 4, 194, :_reduce_309, + 5, 194, :_reduce_310, + 0, 234, :_reduce_311, + 0, 235, :_reduce_312, + 9, 194, :_reduce_313, + 0, 236, :_reduce_314, + 6, 194, :_reduce_315, + 0, 237, :_reduce_316, + 0, 238, :_reduce_317, + 8, 194, :_reduce_318, + 0, 239, :_reduce_319, + 0, 240, :_reduce_320, + 6, 194, :_reduce_321, + 0, 241, :_reduce_322, + 6, 194, :_reduce_323, + 0, 242, :_reduce_324, + 0, 243, :_reduce_325, + 9, 194, :_reduce_326, + 1, 194, :_reduce_327, + 1, 194, :_reduce_328, + 1, 194, :_reduce_329, + 1, 194, :_reduce_none, + 1, 163, :_reduce_none, + 1, 219, :_reduce_none, + 1, 219, :_reduce_none, + 1, 219, :_reduce_none, + 2, 219, :_reduce_none, + 1, 221, :_reduce_none, + 1, 221, :_reduce_none, + 1, 221, :_reduce_none, + 2, 218, :_reduce_339, + 3, 244, :_reduce_340, + 2, 244, :_reduce_341, + 1, 244, :_reduce_none, + 1, 244, :_reduce_none, + 3, 245, :_reduce_344, + 3, 245, :_reduce_345, + 1, 220, :_reduce_346, + 5, 220, :_reduce_347, + 1, 153, :_reduce_none, + 2, 153, :_reduce_349, + 1, 247, :_reduce_350, + 3, 247, :_reduce_351, + 3, 248, :_reduce_352, + 1, 178, :_reduce_none, + 2, 178, :_reduce_354, + 1, 178, :_reduce_355, + 3, 178, :_reduce_356, + 1, 249, :_reduce_357, + 2, 251, :_reduce_358, + 1, 251, :_reduce_359, + 6, 246, :_reduce_360, + 4, 246, :_reduce_361, + 4, 246, :_reduce_362, + 2, 246, :_reduce_363, + 2, 246, :_reduce_364, + 4, 246, :_reduce_365, + 2, 246, :_reduce_366, + 2, 246, :_reduce_367, + 1, 246, :_reduce_368, + 0, 255, :_reduce_369, + 5, 254, :_reduce_370, + 2, 174, :_reduce_371, + 4, 174, :_reduce_none, + 4, 174, :_reduce_none, + 4, 174, :_reduce_none, + 2, 217, :_reduce_375, + 4, 217, :_reduce_376, + 4, 217, :_reduce_377, + 3, 217, :_reduce_378, + 4, 217, :_reduce_379, + 3, 217, :_reduce_380, + 2, 217, :_reduce_381, + 1, 217, :_reduce_382, + 0, 257, :_reduce_383, + 5, 216, :_reduce_384, + 0, 258, :_reduce_385, + 5, 216, :_reduce_386, + 0, 260, :_reduce_387, + 6, 222, :_reduce_388, + 1, 259, :_reduce_389, + 1, 259, :_reduce_none, + 6, 152, :_reduce_391, + 0, 152, :_reduce_392, + 1, 261, :_reduce_393, + 1, 261, :_reduce_none, + 1, 261, :_reduce_none, + 2, 262, :_reduce_396, + 1, 262, :_reduce_397, + 2, 154, :_reduce_398, + 1, 154, :_reduce_none, + 1, 208, :_reduce_none, + 1, 208, :_reduce_none, + 1, 208, :_reduce_none, + 1, 209, :_reduce_403, + 1, 265, :_reduce_none, + 2, 265, :_reduce_405, + 3, 266, :_reduce_406, + 1, 266, :_reduce_407, + 3, 210, :_reduce_408, + 3, 211, :_reduce_409, + 3, 212, :_reduce_410, + 3, 212, :_reduce_411, + 1, 269, :_reduce_412, + 3, 269, :_reduce_413, + 1, 270, :_reduce_414, + 2, 270, :_reduce_415, + 3, 213, :_reduce_416, + 3, 213, :_reduce_417, + 1, 272, :_reduce_418, + 3, 272, :_reduce_419, + 1, 267, :_reduce_420, + 2, 267, :_reduce_421, + 1, 268, :_reduce_422, + 2, 268, :_reduce_423, + 1, 271, :_reduce_424, + 0, 274, :_reduce_425, + 3, 271, :_reduce_426, + 0, 275, :_reduce_427, + 4, 271, :_reduce_428, + 1, 273, :_reduce_429, + 1, 273, :_reduce_430, + 1, 273, :_reduce_431, + 1, 273, :_reduce_none, + 2, 192, :_reduce_433, + 1, 192, :_reduce_434, + 1, 276, :_reduce_none, + 1, 276, :_reduce_none, + 1, 276, :_reduce_none, + 1, 276, :_reduce_none, + 3, 264, :_reduce_439, + 1, 263, :_reduce_440, + 1, 263, :_reduce_441, + 2, 263, :_reduce_442, + 2, 263, :_reduce_443, + 2, 263, :_reduce_444, + 2, 263, :_reduce_445, + 1, 186, :_reduce_446, + 1, 186, :_reduce_447, + 1, 186, :_reduce_448, + 1, 186, :_reduce_449, + 1, 186, :_reduce_450, + 1, 186, :_reduce_451, + 1, 186, :_reduce_452, + 1, 186, :_reduce_453, + 1, 186, :_reduce_454, + 1, 186, :_reduce_455, + 1, 186, :_reduce_456, + 1, 214, :_reduce_457, + 1, 162, :_reduce_458, + 1, 165, :_reduce_459, + 1, 165, :_reduce_none, + 1, 224, :_reduce_461, + 3, 224, :_reduce_462, + 2, 224, :_reduce_463, + 4, 226, :_reduce_464, + 2, 226, :_reduce_465, + 1, 278, :_reduce_none, + 1, 278, :_reduce_none, + 2, 279, :_reduce_468, + 1, 279, :_reduce_469, + 1, 280, :_reduce_470, + 2, 281, :_reduce_471, + 1, 281, :_reduce_472, + 1, 282, :_reduce_473, + 3, 282, :_reduce_474, + 4, 283, :_reduce_475, + 2, 283, :_reduce_476, + 2, 283, :_reduce_477, + 1, 283, :_reduce_478, + 2, 285, :_reduce_479, + 0, 285, :_reduce_480, + 6, 277, :_reduce_481, + 4, 277, :_reduce_482, + 4, 277, :_reduce_483, + 2, 277, :_reduce_484, + 4, 277, :_reduce_485, + 2, 277, :_reduce_486, + 2, 277, :_reduce_487, + 1, 277, :_reduce_488, + 0, 277, :_reduce_489, + 1, 287, :_reduce_none, + 1, 287, :_reduce_491, + 1, 288, :_reduce_492, + 1, 288, :_reduce_493, + 1, 288, :_reduce_494, + 1, 288, :_reduce_495, + 1, 289, :_reduce_496, + 3, 289, :_reduce_497, + 1, 223, :_reduce_none, + 1, 223, :_reduce_none, + 1, 291, :_reduce_500, + 3, 291, :_reduce_none, + 1, 292, :_reduce_502, + 3, 292, :_reduce_503, + 1, 290, :_reduce_none, + 4, 290, :_reduce_none, + 3, 290, :_reduce_none, + 2, 290, :_reduce_none, + 1, 290, :_reduce_none, + 1, 252, :_reduce_509, + 3, 252, :_reduce_510, + 3, 293, :_reduce_511, + 1, 286, :_reduce_512, + 3, 286, :_reduce_513, + 1, 294, :_reduce_none, + 1, 294, :_reduce_none, + 2, 253, :_reduce_516, + 1, 253, :_reduce_517, + 1, 295, :_reduce_none, + 1, 295, :_reduce_none, + 2, 250, :_reduce_520, + 2, 284, :_reduce_521, + 0, 284, :_reduce_522, + 1, 227, :_reduce_523, + 4, 227, :_reduce_524, + 0, 215, :_reduce_525, + 2, 215, :_reduce_526, + 1, 198, :_reduce_527, + 3, 198, :_reduce_528, + 3, 296, :_reduce_529, + 2, 296, :_reduce_530, + 1, 179, :_reduce_none, + 1, 179, :_reduce_none, + 1, 179, :_reduce_none, + 1, 175, :_reduce_none, + 1, 175, :_reduce_none, + 1, 175, :_reduce_none, + 1, 175, :_reduce_none, + 1, 256, :_reduce_none, + 1, 256, :_reduce_none, + 1, 256, :_reduce_none, + 1, 228, :_reduce_none, + 1, 228, :_reduce_none, + 0, 146, :_reduce_none, + 1, 146, :_reduce_none, + 0, 193, :_reduce_none, + 1, 193, :_reduce_none, + 0, 197, :_reduce_none, + 1, 197, :_reduce_none, + 1, 197, :_reduce_none, + 1, 225, :_reduce_none, + 1, 225, :_reduce_none, + 1, 148, :_reduce_none, + 2, 148, :_reduce_none, + 0, 195, :_reduce_554 ] + +racc_reduce_n = 555 + +racc_shift_n = 968 + +racc_token_table = { + false => 0, + :error => 1, + :kCLASS => 2, + :kMODULE => 3, + :kDEF => 4, + :kUNDEF => 5, + :kBEGIN => 6, + :kRESCUE => 7, + :kENSURE => 8, + :kEND => 9, + :kIF => 10, + :kUNLESS => 11, + :kTHEN => 12, + :kELSIF => 13, + :kELSE => 14, + :kCASE => 15, + :kWHEN => 16, + :kWHILE => 17, + :kUNTIL => 18, + :kFOR => 19, + :kBREAK => 20, + :kNEXT => 21, + :kREDO => 22, + :kRETRY => 23, + :kIN => 24, + :kDO => 25, + :kDO_COND => 26, + :kDO_BLOCK => 27, + :kDO_LAMBDA => 28, + :kRETURN => 29, + :kYIELD => 30, + :kSUPER => 31, + :kSELF => 32, + :kNIL => 33, + :kTRUE => 34, + :kFALSE => 35, + :kAND => 36, + :kOR => 37, + :kNOT => 38, + :kIF_MOD => 39, + :kUNLESS_MOD => 40, + :kWHILE_MOD => 41, + :kUNTIL_MOD => 42, + :kRESCUE_MOD => 43, + :kALIAS => 44, + :kDEFINED => 45, + :klBEGIN => 46, + :klEND => 47, + :k__LINE__ => 48, + :k__FILE__ => 49, + :k__ENCODING__ => 50, + :tIDENTIFIER => 51, + :tFID => 52, + :tGVAR => 53, + :tIVAR => 54, + :tCONSTANT => 55, + :tLABEL => 56, + :tCVAR => 57, + :tNTH_REF => 58, + :tBACK_REF => 59, + :tSTRING_CONTENT => 60, + :tINTEGER => 61, + :tFLOAT => 62, + :tREGEXP_END => 63, + :tUPLUS => 64, + :tUMINUS => 65, + :tUMINUS_NUM => 66, + :tPOW => 67, + :tCMP => 68, + :tEQ => 69, + :tEQQ => 70, + :tNEQ => 71, + :tGEQ => 72, + :tLEQ => 73, + :tANDOP => 74, + :tOROP => 75, + :tMATCH => 76, + :tNMATCH => 77, + :tJSDOT => 78, + :tDOT => 79, + :tDOT2 => 80, + :tDOT3 => 81, + :tAREF => 82, + :tASET => 83, + :tLSHFT => 84, + :tRSHFT => 85, + :tCOLON2 => 86, + :tCOLON3 => 87, + :tOP_ASGN => 88, + :tASSOC => 89, + :tLPAREN => 90, + :tLPAREN2 => 91, + :tRPAREN => 92, + :tLPAREN_ARG => 93, + :ARRAY_BEG => 94, + :tRBRACK => 95, + :tLBRACE => 96, + :tLBRACE_ARG => 97, + :tSTAR => 98, + :tSTAR2 => 99, + :tAMPER => 100, + :tAMPER2 => 101, + :tTILDE => 102, + :tPERCENT => 103, + :tDIVIDE => 104, + :tPLUS => 105, + :tMINUS => 106, + :tLT => 107, + :tGT => 108, + :tPIPE => 109, + :tBANG => 110, + :tCARET => 111, + :tLCURLY => 112, + :tRCURLY => 113, + :tBACK_REF2 => 114, + :tSYMBEG => 115, + :tSTRING_BEG => 116, + :tXSTRING_BEG => 117, + :tREGEXP_BEG => 118, + :tWORDS_BEG => 119, + :tAWORDS_BEG => 120, + :tSTRING_DBEG => 121, + :tSTRING_DVAR => 122, + :tSTRING_END => 123, + :tSTRING => 124, + :tSYMBOL => 125, + :tNL => 126, + :tEH => 127, + :tCOLON => 128, + :tCOMMA => 129, + :tSPACE => 130, + :tSEMI => 131, + :tLAMBDA => 132, + :tLAMBEG => 133, + :tLBRACK2 => 134, + :tLBRACK => 135, + :tJSLBRACK => 136, + :tDSTAR => 137, + :tEQL => 138, + :tLOWEST => 139, + "-@NUM" => 140, + "+@NUM" => 141 } + +racc_nt_base = 142 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "kCLASS", + "kMODULE", + "kDEF", + "kUNDEF", + "kBEGIN", + "kRESCUE", + "kENSURE", + "kEND", + "kIF", + "kUNLESS", + "kTHEN", + "kELSIF", + "kELSE", + "kCASE", + "kWHEN", + "kWHILE", + "kUNTIL", + "kFOR", + "kBREAK", + "kNEXT", + "kREDO", + "kRETRY", + "kIN", + "kDO", + "kDO_COND", + "kDO_BLOCK", + "kDO_LAMBDA", + "kRETURN", + "kYIELD", + "kSUPER", + "kSELF", + "kNIL", + "kTRUE", + "kFALSE", + "kAND", + "kOR", + "kNOT", + "kIF_MOD", + "kUNLESS_MOD", + "kWHILE_MOD", + "kUNTIL_MOD", + "kRESCUE_MOD", + "kALIAS", + "kDEFINED", + "klBEGIN", + "klEND", + "k__LINE__", + "k__FILE__", + "k__ENCODING__", + "tIDENTIFIER", + "tFID", + "tGVAR", + "tIVAR", + "tCONSTANT", + "tLABEL", + "tCVAR", + "tNTH_REF", + "tBACK_REF", + "tSTRING_CONTENT", + "tINTEGER", + "tFLOAT", + "tREGEXP_END", + "tUPLUS", + "tUMINUS", + "tUMINUS_NUM", + "tPOW", + "tCMP", + "tEQ", + "tEQQ", + "tNEQ", + "tGEQ", + "tLEQ", + "tANDOP", + "tOROP", + "tMATCH", + "tNMATCH", + "tJSDOT", + "tDOT", + "tDOT2", + "tDOT3", + "tAREF", + "tASET", + "tLSHFT", + "tRSHFT", + "tCOLON2", + "tCOLON3", + "tOP_ASGN", + "tASSOC", + "tLPAREN", + "tLPAREN2", + "tRPAREN", + "tLPAREN_ARG", + "ARRAY_BEG", + "tRBRACK", + "tLBRACE", + "tLBRACE_ARG", + "tSTAR", + "tSTAR2", + "tAMPER", + "tAMPER2", + "tTILDE", + "tPERCENT", + "tDIVIDE", + "tPLUS", + "tMINUS", + "tLT", + "tGT", + "tPIPE", + "tBANG", + "tCARET", + "tLCURLY", + "tRCURLY", + "tBACK_REF2", + "tSYMBEG", + "tSTRING_BEG", + "tXSTRING_BEG", + "tREGEXP_BEG", + "tWORDS_BEG", + "tAWORDS_BEG", + "tSTRING_DBEG", + "tSTRING_DVAR", + "tSTRING_END", + "tSTRING", + "tSYMBOL", + "tNL", + "tEH", + "tCOLON", + "tCOMMA", + "tSPACE", + "tSEMI", + "tLAMBDA", + "tLAMBEG", + "tLBRACK2", + "tLBRACK", + "tJSLBRACK", + "tDSTAR", + "tEQL", + "tLOWEST", + "\"-@NUM\"", + "\"+@NUM\"", + "$start", + "program", + "top_compstmt", + "top_stmts", + "opt_terms", + "top_stmt", + "terms", + "stmt", + "bodystmt", + "compstmt", + "opt_rescue", + "opt_else", + "opt_ensure", + "stmts", + "fitem", + "undef_list", + "expr_value", + "lhs", + "command_call", + "mlhs", + "var_lhs", + "primary_value", + "aref_args", + "backref", + "mrhs", + "arg_value", + "expr", + "@1", + "arg", + "command", + "block_command", + "call_args", + "block_call", + "operation2", + "command_args", + "cmd_brace_block", + "opt_block_var", + "operation", + "mlhs_basic", + "mlhs_entry", + "mlhs_head", + "mlhs_item", + "mlhs_node", + "mlhs_post", + "variable", + "cname", + "cpath", + "fname", + "op", + "reswords", + "symbol", + "opt_nl", + "primary", + "none", + "args", + "trailer", + "assocs", + "paren_args", + "opt_call_args", + "rparen", + "opt_paren_args", + "opt_block_arg", + "block_arg", + "call_args2", + "open_args", + "@2", + "literal", + "strings", + "xstring", + "regexp", + "words", + "awords", + "var_ref", + "assoc_list", + "brace_block", + "method_call", + "lambda", + "then", + "if_tail", + "do", + "case_body", + "for_var", + "superclass", + "term", + "f_arglist", + "singleton", + "dot_or_colon", + "@3", + "@4", + "@5", + "@6", + "@7", + "@8", + "@9", + "@10", + "@11", + "@12", + "@13", + "@14", + "@15", + "@16", + "@17", + "f_larglist", + "lambda_body", + "block_param", + "f_block_optarg", + "f_block_opt", + "block_args_tail", + "f_block_arg", + "opt_block_args_tail", + "f_arg", + "f_rest_arg", + "do_block", + "@18", + "operation3", + "@19", + "@20", + "cases", + "@21", + "exc_list", + "exc_var", + "numeric", + "dsym", + "string", + "string1", + "string_contents", + "xstring_contents", + "word_list", + "word", + "string_content", + "qword_list", + "string_dvar", + "@22", + "@23", + "sym", + "f_args", + "kwrest_mark", + "f_kwrest", + "f_label", + "f_kw", + "f_kwarg", + "args_tail", + "opt_f_block_arg", + "opt_args_tail", + "f_optarg", + "f_norm_arg", + "f_bad_arg", + "f_arg_item", + "f_margs", + "f_marg", + "f_marg_list", + "f_opt", + "restarg_mark", + "blkarg_mark", + "assoc" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'opal.y', 70) + def _reduce_2(val, _values, result) + result = new_compstmt val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 75) + def _reduce_3(val, _values, result) + result = new_block + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 79) + def _reduce_4(val, _values, result) + result = new_block val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 83) + def _reduce_5(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +# reduce 6 omitted + +module_eval(<<'.,.,', 'opal.y', 90) + def _reduce_7(val, _values, result) + result = val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 95) + def _reduce_8(val, _values, result) + result = new_body(val[0], val[1], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 100) + def _reduce_9(val, _values, result) + result = new_compstmt val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 105) + def _reduce_10(val, _values, result) + result = new_block + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 109) + def _reduce_11(val, _values, result) + result = new_block val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 113) + def _reduce_12(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 119) + def _reduce_13(val, _values, result) + lexer.lex_state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 123) + def _reduce_14(val, _values, result) + result = new_alias(val[0], val[1], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 127) + def _reduce_15(val, _values, result) + result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) + + result + end +.,., + +# reduce 16 omitted + +module_eval(<<'.,.,', 'opal.y', 132) + def _reduce_17(val, _values, result) + result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 136) + def _reduce_18(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 140) + def _reduce_19(val, _values, result) + result = new_if(val[1], val[2], val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 144) + def _reduce_20(val, _values, result) + result = new_if(val[1], val[2], nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 148) + def _reduce_21(val, _values, result) + result = new_while(val[1], val[2], val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 152) + def _reduce_22(val, _values, result) + result = new_until(val[1], val[2], val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 156) + def _reduce_23(val, _values, result) + result = new_rescue_mod(val[1], val[0], val[2]) + + result + end +.,., + +# reduce 24 omitted + +module_eval(<<'.,.,', 'opal.y', 161) + def _reduce_25(val, _values, result) + result = new_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 165) + def _reduce_26(val, _values, result) + result = s(:masgn, val[0], s(:to_ary, val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 169) + def _reduce_27(val, _values, result) + result = new_op_asgn val[1], val[0], val[2] + + result + end +.,., + +# reduce 28 omitted + +# reduce 29 omitted + +module_eval(<<'.,.,', 'opal.y', 175) + def _reduce_30(val, _values, result) + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) + + result + end +.,., + +# reduce 31 omitted + +# reduce 32 omitted + +# reduce 33 omitted + +module_eval(<<'.,.,', 'opal.y', 182) + def _reduce_34(val, _values, result) + result = new_assign val[0], val[1], s(:svalue, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 186) + def _reduce_35(val, _values, result) + result = s(:masgn, val[0], s(:to_ary, val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 190) + def _reduce_36(val, _values, result) + result = s(:masgn, val[0], val[2]) + + result + end +.,., + +# reduce 37 omitted + +# reduce 38 omitted + +module_eval(<<'.,.,', 'opal.y', 197) + def _reduce_39(val, _values, result) + result = s(:and, val[0], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 201) + def _reduce_40(val, _values, result) + result = s(:or, val[0], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 205) + def _reduce_41(val, _values, result) + result = new_unary_call(['!', []], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 209) + def _reduce_42(val, _values, result) + result = new_unary_call(val[0], val[1]) + + result + end +.,., + +# reduce 43 omitted + +# reduce 44 omitted + +# reduce 45 omitted + +# reduce 46 omitted + +module_eval(<<'.,.,', 'opal.y', 219) + def _reduce_47(val, _values, result) + result = new_return(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 223) + def _reduce_48(val, _values, result) + result = new_break(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 227) + def _reduce_49(val, _values, result) + result = new_next(val[0], val[1]) + + result + end +.,., + +# reduce 50 omitted + +# reduce 51 omitted + +# reduce 52 omitted + +# reduce 53 omitted + +# reduce 54 omitted + +module_eval(<<'.,.,', 'opal.y', 239) + def _reduce_55(val, _values, result) + result = new_call(nil, val[0], val[1]) + + result + end +.,., + +# reduce 56 omitted + +module_eval(<<'.,.,', 'opal.y', 244) + def _reduce_57(val, _values, result) + result = new_js_call(val[0], val[2], val[3]) + + result + end +.,., + +# reduce 58 omitted + +module_eval(<<'.,.,', 'opal.y', 249) + def _reduce_59(val, _values, result) + result = new_call(val[0], val[2], val[3]) + + result + end +.,., + +# reduce 60 omitted + +module_eval(<<'.,.,', 'opal.y', 254) + def _reduce_61(val, _values, result) + result = new_call(val[0], val[2], val[3]) + + result + end +.,., + +# reduce 62 omitted + +module_eval(<<'.,.,', 'opal.y', 259) + def _reduce_63(val, _values, result) + result = new_super(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 263) + def _reduce_64(val, _values, result) + result = new_yield val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 268) + def _reduce_65(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 272) + def _reduce_66(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 277) + def _reduce_67(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 281) + def _reduce_68(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 286) + def _reduce_69(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 290) + def _reduce_70(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 294) + def _reduce_71(val, _values, result) + result = val[0] << s(:splat, val[2]) + + result + end +.,., + +# reduce 72 omitted + +module_eval(<<'.,.,', 'opal.y', 299) + def _reduce_73(val, _values, result) + result = val[0] << s(:splat) + + result + end +.,., + +# reduce 74 omitted + +module_eval(<<'.,.,', 'opal.y', 304) + def _reduce_75(val, _values, result) + result = s(:array, s(:splat, val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 308) + def _reduce_76(val, _values, result) + result = s(:array, s(:splat)) + + result + end +.,., + +# reduce 77 omitted + +module_eval(<<'.,.,', 'opal.y', 314) + def _reduce_78(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 318) + def _reduce_79(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 323) + def _reduce_80(val, _values, result) + result = s(:array, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 327) + def _reduce_81(val, _values, result) + result = val[0] << val[1] + + result + end +.,., + +# reduce 82 omitted + +# reduce 83 omitted + +module_eval(<<'.,.,', 'opal.y', 335) + def _reduce_84(val, _values, result) + result = new_assignable val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 339) + def _reduce_85(val, _values, result) + args = val[2] ? val[2] : [] + result = s(:attrasgn, val[0], :[]=, s(:arglist, *args)) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 344) + def _reduce_86(val, _values, result) + result = new_call val[0], val[2], [] + + result + end +.,., + +# reduce 87 omitted + +# reduce 88 omitted + +# reduce 89 omitted + +# reduce 90 omitted + +# reduce 91 omitted + +module_eval(<<'.,.,', 'opal.y', 354) + def _reduce_92(val, _values, result) + result = new_assignable val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 358) + def _reduce_93(val, _values, result) + result = new_js_attrasgn(val[0], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 362) + def _reduce_94(val, _values, result) + result = new_attrasgn(val[0], :[]=, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 366) + def _reduce_95(val, _values, result) + result = new_attrasgn(val[0], op_to_setter(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 370) + def _reduce_96(val, _values, result) + result = new_attrasgn(val[0], op_to_setter(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 374) + def _reduce_97(val, _values, result) + result = new_attrasgn(val[0], op_to_setter(val[2])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 378) + def _reduce_98(val, _values, result) + result = new_colon2(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 382) + def _reduce_99(val, _values, result) + result = new_colon3(val[0], val[1]) + + result + end +.,., + +# reduce 100 omitted + +# reduce 101 omitted + +module_eval(<<'.,.,', 'opal.y', 390) + def _reduce_102(val, _values, result) + result = new_colon3(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 394) + def _reduce_103(val, _values, result) + result = new_const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 398) + def _reduce_104(val, _values, result) + result = new_colon2(val[0], val[1], val[2]) + + result + end +.,., + +# reduce 105 omitted + +# reduce 106 omitted + +# reduce 107 omitted + +module_eval(<<'.,.,', 'opal.y', 406) + def _reduce_108(val, _values, result) + lexer.lex_state = :expr_end + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 411) + def _reduce_109(val, _values, result) + lexer.lex_state = :expr_end + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 417) + def _reduce_110(val, _values, result) + result = new_sym(val[0]) + + result + end +.,., + +# reduce 111 omitted + +module_eval(<<'.,.,', 'opal.y', 423) + def _reduce_112(val, _values, result) + result = s(:undef, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 427) + def _reduce_113(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +# reduce 114 omitted + +# reduce 115 omitted + +# reduce 116 omitted + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +# reduce 120 omitted + +# reduce 121 omitted + +# reduce 122 omitted + +# reduce 123 omitted + +# reduce 124 omitted + +# reduce 125 omitted + +# reduce 126 omitted + +# reduce 127 omitted + +# reduce 128 omitted + +# reduce 129 omitted + +# reduce 130 omitted + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +# reduce 136 omitted + +# reduce 137 omitted + +# reduce 138 omitted + +# reduce 139 omitted + +# reduce 140 omitted + +# reduce 141 omitted + +# reduce 142 omitted + +# reduce 143 omitted + +# reduce 144 omitted + +# reduce 145 omitted + +# reduce 146 omitted + +# reduce 147 omitted + +# reduce 148 omitted + +# reduce 149 omitted + +# reduce 150 omitted + +# reduce 151 omitted + +# reduce 152 omitted + +# reduce 153 omitted + +# reduce 154 omitted + +# reduce 155 omitted + +# reduce 156 omitted + +# reduce 157 omitted + +# reduce 158 omitted + +# reduce 159 omitted + +# reduce 160 omitted + +# reduce 161 omitted + +# reduce 162 omitted + +# reduce 163 omitted + +# reduce 164 omitted + +# reduce 165 omitted + +# reduce 166 omitted + +# reduce 167 omitted + +# reduce 168 omitted + +# reduce 169 omitted + +# reduce 170 omitted + +# reduce 171 omitted + +# reduce 172 omitted + +# reduce 173 omitted + +# reduce 174 omitted + +# reduce 175 omitted + +# reduce 176 omitted + +# reduce 177 omitted + +# reduce 178 omitted + +# reduce 179 omitted + +# reduce 180 omitted + +# reduce 181 omitted + +# reduce 182 omitted + +# reduce 183 omitted + +# reduce 184 omitted + +# reduce 185 omitted + +# reduce 186 omitted + +# reduce 187 omitted + +module_eval(<<'.,.,', 'opal.y', 447) + def _reduce_188(val, _values, result) + result = new_assign(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 451) + def _reduce_189(val, _values, result) + result = new_assign val[0], val[1], s(:rescue_mod, val[2], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 455) + def _reduce_190(val, _values, result) + result = new_op_asgn val[1], val[0], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 459) + def _reduce_191(val, _values, result) + result = new_op_asgn1(val[0], val[2], val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 463) + def _reduce_192(val, _values, result) + raise ".JS[...] #{val[4]} is not supported" + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 467) + def _reduce_193(val, _values, result) + result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) + + result + end +.,., + +# reduce 194 omitted + +# reduce 195 omitted + +# reduce 196 omitted + +# reduce 197 omitted + +# reduce 198 omitted + +module_eval(<<'.,.,', 'opal.y', 476) + def _reduce_199(val, _values, result) + result = new_irange(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 480) + def _reduce_200(val, _values, result) + result = new_erange(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 484) + def _reduce_201(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 488) + def _reduce_202(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 492) + def _reduce_203(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 496) + def _reduce_204(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 500) + def _reduce_205(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 504) + def _reduce_206(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 508) + def _reduce_207(val, _values, result) + result = new_call new_binary_call(new_int(val[1]), val[2], val[3]), [:"-@", []], [] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 512) + def _reduce_208(val, _values, result) + result = new_call new_binary_call(new_float(val[1]), val[2], val[3]), [:"-@", []], [] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 516) + def _reduce_209(val, _values, result) + result = new_call val[1], [:"+@", []], [] + if [:int, :float].include? val[1].type + result = val[1] + end + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 523) + def _reduce_210(val, _values, result) + result = new_call val[1], [:"-@", []], [] + if val[1].type == :int + val[1][1] = -val[1][1] + result = val[1] + elsif val[1].type == :float + val[1][1] = -val[1][1].to_f + result = val[1] + end + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 534) + def _reduce_211(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 538) + def _reduce_212(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 542) + def _reduce_213(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 546) + def _reduce_214(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 550) + def _reduce_215(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 554) + def _reduce_216(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 558) + def _reduce_217(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 562) + def _reduce_218(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 566) + def _reduce_219(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 570) + def _reduce_220(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 574) + def _reduce_221(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 578) + def _reduce_222(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 582) + def _reduce_223(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 586) + def _reduce_224(val, _values, result) + result = new_unary_call(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 590) + def _reduce_225(val, _values, result) + result = new_unary_call(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 594) + def _reduce_226(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 598) + def _reduce_227(val, _values, result) + result = new_binary_call(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 602) + def _reduce_228(val, _values, result) + result = new_and(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 606) + def _reduce_229(val, _values, result) + result = new_or(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 610) + def _reduce_230(val, _values, result) + result = s(:defined, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 614) + def _reduce_231(val, _values, result) + result = new_if(val[1], val[0], val[2], val[4]) + + result + end +.,., + +# reduce 232 omitted + +# reduce 233 omitted + +module_eval(<<'.,.,', 'opal.y', 622) + def _reduce_234(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 626) + def _reduce_235(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 630) + def _reduce_236(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 634) + def _reduce_237(val, _values, result) + val[0] << s(:hash, *val[2]) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 639) + def _reduce_238(val, _values, result) + result = [s(:hash, *val[0])] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 644) + def _reduce_239(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 240 omitted + +module_eval(<<'.,.,', 'opal.y', 651) + def _reduce_241(val, _values, result) + result = [] + + result + end +.,., + +# reduce 242 omitted + +module_eval(<<'.,.,', 'opal.y', 657) + def _reduce_243(val, _values, result) + result = [] + + result + end +.,., + +# reduce 244 omitted + +module_eval(<<'.,.,', 'opal.y', 662) + def _reduce_245(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 666) + def _reduce_246(val, _values, result) + result = val[0] + result << new_hash(nil, val[2], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 671) + def _reduce_247(val, _values, result) + result = [new_hash(nil, val[0], nil)] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 676) + def _reduce_248(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 680) + def _reduce_249(val, _values, result) + result = val[0] + add_block_pass val[0], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 685) + def _reduce_250(val, _values, result) + result = [new_hash(nil, val[0], nil)] + add_block_pass result, val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 690) + def _reduce_251(val, _values, result) + result = val[0] + result << new_hash(nil, val[2], nil) + result << val[3] if val[3] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 696) + def _reduce_252(val, _values, result) + result = [] + add_block_pass result, val[0] + + result + end +.,., + +# reduce 253 omitted + +# reduce 254 omitted + +module_eval(<<'.,.,', 'opal.y', 704) + def _reduce_255(val, _values, result) + lexer.cmdarg_push 1 + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 708) + def _reduce_256(val, _values, result) + lexer.cmdarg_pop + result = val[1] + + result + end +.,., + +# reduce 257 omitted + +module_eval(<<'.,.,', 'opal.y', 715) + def _reduce_258(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 719) + def _reduce_259(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 724) + def _reduce_260(val, _values, result) + result = new_block_pass(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 729) + def _reduce_261(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 733) + def _reduce_262(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 738) + def _reduce_263(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 742) + def _reduce_264(val, _values, result) + result = [new_splat(val[0], val[1])] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 746) + def _reduce_265(val, _values, result) + result = val[0] << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 750) + def _reduce_266(val, _values, result) + result = val[0] << new_splat(val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 755) + def _reduce_267(val, _values, result) + val[0] << val[2] + result = s(:array, *val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 760) + def _reduce_268(val, _values, result) + val[0] << s(:splat, val[3]) + result = s(:array, *val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 765) + def _reduce_269(val, _values, result) + result = s(:splat, val[1]) + + result + end +.,., + +# reduce 270 omitted + +# reduce 271 omitted + +# reduce 272 omitted + +# reduce 273 omitted + +# reduce 274 omitted + +# reduce 275 omitted + +# reduce 276 omitted + +# reduce 277 omitted + +# reduce 278 omitted + +module_eval(<<'.,.,', 'opal.y', 779) + def _reduce_279(val, _values, result) + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 783) + def _reduce_280(val, _values, result) + result = s(:begin, val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 787) + def _reduce_281(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 791) + def _reduce_282(val, _values, result) + result = new_paren(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 795) + def _reduce_283(val, _values, result) + result = new_colon2(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 799) + def _reduce_284(val, _values, result) + result = new_colon3(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 803) + def _reduce_285(val, _values, result) + result = new_call val[0], [:[], []], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 807) + def _reduce_286(val, _values, result) + result = new_js_call val[0], [:[], []], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 811) + def _reduce_287(val, _values, result) + result = new_array(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 815) + def _reduce_288(val, _values, result) + result = new_hash(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 819) + def _reduce_289(val, _values, result) + result = new_return(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 823) + def _reduce_290(val, _values, result) + result = new_yield val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 827) + def _reduce_291(val, _values, result) + result = s(:yield) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 831) + def _reduce_292(val, _values, result) + result = s(:yield) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 835) + def _reduce_293(val, _values, result) + result = s(:defined, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 839) + def _reduce_294(val, _values, result) + result = new_unary_call(['!', []], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 843) + def _reduce_295(val, _values, result) + result = new_unary_call(['!', []], new_nil(val[0])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 847) + def _reduce_296(val, _values, result) + result = new_call(nil, val[0], []) + result << val[1] + + result + end +.,., + +# reduce 297 omitted + +module_eval(<<'.,.,', 'opal.y', 853) + def _reduce_298(val, _values, result) + val[0] << val[1] + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 858) + def _reduce_299(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 862) + def _reduce_300(val, _values, result) + result = new_if(val[0], val[1], val[3], val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 866) + def _reduce_301(val, _values, result) + result = new_if(val[0], val[1], val[4], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 870) + def _reduce_302(val, _values, result) + lexer.cond_push 1 + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 875) + def _reduce_303(val, _values, result) + lexer.cond_pop + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 879) + def _reduce_304(val, _values, result) + result = s(:while, val[2], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 883) + def _reduce_305(val, _values, result) + lexer.cond_push 1 + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 888) + def _reduce_306(val, _values, result) + lexer.cond_pop + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 892) + def _reduce_307(val, _values, result) + result = s(:until, val[2], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 896) + def _reduce_308(val, _values, result) + result = s(:case, val[1], *val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 900) + def _reduce_309(val, _values, result) + result = s(:case, nil, *val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 904) + def _reduce_310(val, _values, result) + result = s(:case, nil, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 908) + def _reduce_311(val, _values, result) + lexer.cond_push 1 + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 913) + def _reduce_312(val, _values, result) + lexer.cond_pop + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 917) + def _reduce_313(val, _values, result) + result = s(:for, val[4], val[1], val[7]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 921) + def _reduce_314(val, _values, result) + # ... + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 925) + def _reduce_315(val, _values, result) + result = new_class val[0], val[1], val[2], val[4], val[5] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 929) + def _reduce_316(val, _values, result) + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 933) + def _reduce_317(val, _values, result) + # ... + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 937) + def _reduce_318(val, _values, result) + result = new_sclass(val[0], val[3], val[6], val[7]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 941) + def _reduce_319(val, _values, result) + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 945) + def _reduce_320(val, _values, result) + # ... + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 949) + def _reduce_321(val, _values, result) + result = new_module(val[0], val[2], val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 953) + def _reduce_322(val, _values, result) + push_scope + lexer.lex_state = :expr_endfn + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 958) + def _reduce_323(val, _values, result) + result = new_def(val[0], nil, val[1], val[3], val[4], val[5]) + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 963) + def _reduce_324(val, _values, result) + lexer.lex_state = :expr_fname + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 967) + def _reduce_325(val, _values, result) + push_scope + lexer.lex_state = :expr_endfn + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 972) + def _reduce_326(val, _values, result) + result = new_def(val[0], val[1], val[4], val[6], val[7], val[8]) + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 977) + def _reduce_327(val, _values, result) + result = new_break(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 981) + def _reduce_328(val, _values, result) + result = s(:next) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 985) + def _reduce_329(val, _values, result) + result = s(:redo) + + result + end +.,., + +# reduce 330 omitted + +# reduce 331 omitted + +# reduce 332 omitted + +# reduce 333 omitted + +# reduce 334 omitted + +# reduce 335 omitted + +# reduce 336 omitted + +# reduce 337 omitted + +# reduce 338 omitted + +module_eval(<<'.,.,', 'opal.y', 1002) + def _reduce_339(val, _values, result) + result = new_call nil, [:lambda, []], [] + result << new_iter(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1008) + def _reduce_340(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1012) + def _reduce_341(val, _values, result) + result = nil + + result + end +.,., + +# reduce 342 omitted + +# reduce 343 omitted + +module_eval(<<'.,.,', 'opal.y', 1019) + def _reduce_344(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1023) + def _reduce_345(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1028) + def _reduce_346(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1032) + def _reduce_347(val, _values, result) + result = new_if(val[0], val[1], val[3], val[4]) + + result + end +.,., + +# reduce 348 omitted + +module_eval(<<'.,.,', 'opal.y', 1038) + def _reduce_349(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1043) + def _reduce_350(val, _values, result) + result = s(:block, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1047) + def _reduce_351(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1053) + def _reduce_352(val, _values, result) + result = new_assign(new_assignable(new_ident( + val[0])), val[1], val[2]) + + result + end +.,., + +# reduce 353 omitted + +module_eval(<<'.,.,', 'opal.y', 1060) + def _reduce_354(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1064) + def _reduce_355(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1068) + def _reduce_356(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1073) + def _reduce_357(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1078) + def _reduce_358(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1082) + def _reduce_359(val, _values, result) + nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1087) + def _reduce_360(val, _values, result) + result = new_block_args(val[0], val[2], val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1091) + def _reduce_361(val, _values, result) + result = new_block_args(val[0], val[2], nil, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1095) + def _reduce_362(val, _values, result) + result = new_block_args(val[0], nil, val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1099) + def _reduce_363(val, _values, result) + result = new_block_args(val[0], nil, nil, nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1103) + def _reduce_364(val, _values, result) + result = new_block_args(val[0], nil, nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1107) + def _reduce_365(val, _values, result) + result = new_block_args(nil, val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1111) + def _reduce_366(val, _values, result) + result = new_block_args(nil, val[0], nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1115) + def _reduce_367(val, _values, result) + result = new_block_args(nil, nil, val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1119) + def _reduce_368(val, _values, result) + result = new_block_args(nil, nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1124) + def _reduce_369(val, _values, result) + push_scope :block + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1129) + def _reduce_370(val, _values, result) + result = new_iter val[2], val[3] + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1135) + def _reduce_371(val, _values, result) + val[0] << val[1] + result = val[0] + + result + end +.,., + +# reduce 372 omitted + +# reduce 373 omitted + +# reduce 374 omitted + +module_eval(<<'.,.,', 'opal.y', 1144) + def _reduce_375(val, _values, result) + result = new_call(nil, val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1148) + def _reduce_376(val, _values, result) + result = new_call(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1152) + def _reduce_377(val, _values, result) + result = new_js_call(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1156) + def _reduce_378(val, _values, result) + result = new_call(val[0], [:call, []], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1160) + def _reduce_379(val, _values, result) + result = new_call(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1164) + def _reduce_380(val, _values, result) + result = new_call(val[0], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1168) + def _reduce_381(val, _values, result) + result = new_super(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1172) + def _reduce_382(val, _values, result) + result = new_super(val[0], nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1177) + def _reduce_383(val, _values, result) + push_scope :block + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1182) + def _reduce_384(val, _values, result) + result = new_iter val[2], val[3] + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1187) + def _reduce_385(val, _values, result) + push_scope :block + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1192) + def _reduce_386(val, _values, result) + result = new_iter val[2], val[3] + pop_scope + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1198) + def _reduce_387(val, _values, result) + result = lexer.line + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1202) + def _reduce_388(val, _values, result) + part = s(:when, s(:array, *val[2]), val[4]) + result = [part] + result.push(*val[5]) if val[5] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1209) + def _reduce_389(val, _values, result) + result = [val[0]] + + result + end +.,., + +# reduce 390 omitted + +module_eval(<<'.,.,', 'opal.y', 1215) + def _reduce_391(val, _values, result) + exc = val[1] || s(:array) + exc << new_assign(val[2], val[2], s(:gvar, '$!'.intern)) if val[2] + result = [s(:resbody, exc, val[4])] + result.push val[5].first if val[5] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1222) + def _reduce_392(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1227) + def _reduce_393(val, _values, result) + result = s(:array, val[0]) + + result + end +.,., + +# reduce 394 omitted + +# reduce 395 omitted + +module_eval(<<'.,.,', 'opal.y', 1234) + def _reduce_396(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1238) + def _reduce_397(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1243) + def _reduce_398(val, _values, result) + result = val[1].nil? ? s(:nil) : val[1] + + result + end +.,., + +# reduce 399 omitted + +# reduce 400 omitted + +# reduce 401 omitted + +# reduce 402 omitted + +module_eval(<<'.,.,', 'opal.y', 1253) + def _reduce_403(val, _values, result) + result = new_str val[0] + + result + end +.,., + +# reduce 404 omitted + +module_eval(<<'.,.,', 'opal.y', 1259) + def _reduce_405(val, _values, result) + result = str_append val[0], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1264) + def _reduce_406(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1268) + def _reduce_407(val, _values, result) + result = s(:str, value(val[0])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1273) + def _reduce_408(val, _values, result) + result = new_xstr(val[0], val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1278) + def _reduce_409(val, _values, result) + result = new_regexp val[1], val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1283) + def _reduce_410(val, _values, result) + result = s(:array) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1287) + def _reduce_411(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1292) + def _reduce_412(val, _values, result) + result = s(:array) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1296) + def _reduce_413(val, _values, result) + part = val[1] + part = s(:dstr, "", val[1]) if part.type == :evstr + result = val[0] << part + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1303) + def _reduce_414(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1307) + def _reduce_415(val, _values, result) + result = val[0].concat([val[1]]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1312) + def _reduce_416(val, _values, result) + result = s(:array) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1316) + def _reduce_417(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1321) + def _reduce_418(val, _values, result) + result = s(:array) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1325) + def _reduce_419(val, _values, result) + result = val[0] << s(:str, value(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1330) + def _reduce_420(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1334) + def _reduce_421(val, _values, result) + result = str_append val[0], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1339) + def _reduce_422(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1343) + def _reduce_423(val, _values, result) + result = str_append val[0], val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1348) + def _reduce_424(val, _values, result) + result = new_str_content(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1352) + def _reduce_425(val, _values, result) + result = lexer.strterm + lexer.strterm = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1357) + def _reduce_426(val, _values, result) + lexer.strterm = val[1] + result = new_evstr(val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1362) + def _reduce_427(val, _values, result) + lexer.cond_push 0 + lexer.cmdarg_push 0 + result = lexer.strterm + lexer.strterm = nil + lexer.lex_state = :expr_beg + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1370) + def _reduce_428(val, _values, result) + lexer.strterm = val[1] + lexer.cond_lexpop + lexer.cmdarg_lexpop + result = new_evstr(val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1378) + def _reduce_429(val, _values, result) + result = new_gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1382) + def _reduce_430(val, _values, result) + result = new_ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1386) + def _reduce_431(val, _values, result) + result = new_cvar(val[0]) + + result + end +.,., + +# reduce 432 omitted + +module_eval(<<'.,.,', 'opal.y', 1393) + def _reduce_433(val, _values, result) + result = new_sym(val[1]) + lexer.lex_state = :expr_end + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1398) + def _reduce_434(val, _values, result) + result = new_sym(val[0]) + + result + end +.,., + +# reduce 435 omitted + +# reduce 436 omitted + +# reduce 437 omitted + +# reduce 438 omitted + +module_eval(<<'.,.,', 'opal.y', 1408) + def _reduce_439(val, _values, result) + result = new_dsym val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1413) + def _reduce_440(val, _values, result) + result = new_int(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1417) + def _reduce_441(val, _values, result) + result = new_float(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1421) + def _reduce_442(val, _values, result) + result = negate_num(new_int(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1425) + def _reduce_443(val, _values, result) + result = negate_num(new_float(val[1])) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1429) + def _reduce_444(val, _values, result) + result = new_int(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1433) + def _reduce_445(val, _values, result) + result = new_float(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1438) + def _reduce_446(val, _values, result) + result = new_ident(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1442) + def _reduce_447(val, _values, result) + result = new_ivar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1446) + def _reduce_448(val, _values, result) + result = new_gvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1450) + def _reduce_449(val, _values, result) + result = new_const(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1454) + def _reduce_450(val, _values, result) + result = new_cvar(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1458) + def _reduce_451(val, _values, result) + result = new_nil(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1462) + def _reduce_452(val, _values, result) + result = new_self(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1466) + def _reduce_453(val, _values, result) + result = new_true(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1470) + def _reduce_454(val, _values, result) + result = new_false(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1474) + def _reduce_455(val, _values, result) + result = new___FILE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1478) + def _reduce_456(val, _values, result) + result = new___LINE__(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1483) + def _reduce_457(val, _values, result) + result = new_var_ref(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1488) + def _reduce_458(val, _values, result) + result = new_assignable val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1493) + def _reduce_459(val, _values, result) + result = s(:nth_ref, value(val[0])) + + result + end +.,., + +# reduce 460 omitted + +module_eval(<<'.,.,', 'opal.y', 1499) + def _reduce_461(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1503) + def _reduce_462(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1507) + def _reduce_463(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1512) + def _reduce_464(val, _values, result) + result = val[1] + lexer.lex_state = :expr_beg + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1517) + def _reduce_465(val, _values, result) + result = val[0] + lexer.lex_state = :expr_beg + + result + end +.,., + +# reduce 466 omitted + +# reduce 467 omitted + +module_eval(<<'.,.,', 'opal.y', 1526) + def _reduce_468(val, _values, result) + result = new_kwrestarg(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1530) + def _reduce_469(val, _values, result) + result = new_kwrestarg() + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1535) + def _reduce_470(val, _values, result) + result = new_sym(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1540) + def _reduce_471(val, _values, result) + result = new_kwoptarg(val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1544) + def _reduce_472(val, _values, result) + result = new_kwarg(val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1549) + def _reduce_473(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1553) + def _reduce_474(val, _values, result) + result = val[0] + result << val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1559) + def _reduce_475(val, _values, result) + result = new_args_tail(val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1563) + def _reduce_476(val, _values, result) + result = new_args_tail(val[0], nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1567) + def _reduce_477(val, _values, result) + result = new_args_tail(nil, val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1571) + def _reduce_478(val, _values, result) + result = new_args_tail(nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1576) + def _reduce_479(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1580) + def _reduce_480(val, _values, result) + result = new_args_tail(nil, nil, nil) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1585) + def _reduce_481(val, _values, result) + result = new_args(val[0], val[2], val[4], val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1589) + def _reduce_482(val, _values, result) + result = new_args(val[0], val[2], nil, val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1593) + def _reduce_483(val, _values, result) + result = new_args(val[0], nil, val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1597) + def _reduce_484(val, _values, result) + result = new_args(val[0], nil, nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1601) + def _reduce_485(val, _values, result) + result = new_args(nil, val[0], val[2], val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1605) + def _reduce_486(val, _values, result) + result = new_args(nil, val[0], nil, val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1609) + def _reduce_487(val, _values, result) + result = new_args(nil, nil, val[0], val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1613) + def _reduce_488(val, _values, result) + result = new_args(nil, nil, nil, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1617) + def _reduce_489(val, _values, result) + result = new_args(nil, nil, nil, nil) + + result + end +.,., + +# reduce 490 omitted + +module_eval(<<'.,.,', 'opal.y', 1623) + def _reduce_491(val, _values, result) + result = value(val[0]).to_sym + scope.add_local result + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1629) + def _reduce_492(val, _values, result) + raise 'formal argument cannot be a constant' + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1633) + def _reduce_493(val, _values, result) + raise 'formal argument cannot be an instance variable' + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1637) + def _reduce_494(val, _values, result) + raise 'formal argument cannot be a class variable' + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1641) + def _reduce_495(val, _values, result) + raise 'formal argument cannot be a global variable' + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1646) + def _reduce_496(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1650) + def _reduce_497(val, _values, result) + result = val[1] + + result + end +.,., + +# reduce 498 omitted + +# reduce 499 omitted + +module_eval(<<'.,.,', 'opal.y', 1658) + def _reduce_500(val, _values, result) + result = s(:lasgn, val[0]) + + result + end +.,., + +# reduce 501 omitted + +module_eval(<<'.,.,', 'opal.y', 1664) + def _reduce_502(val, _values, result) + result = s(:array, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1668) + def _reduce_503(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +# reduce 504 omitted + +# reduce 505 omitted + +# reduce 506 omitted + +# reduce 507 omitted + +# reduce 508 omitted + +module_eval(<<'.,.,', 'opal.y', 1680) + def _reduce_509(val, _values, result) + result = [val[0]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1684) + def _reduce_510(val, _values, result) + val[0] << val[2] + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1690) + def _reduce_511(val, _values, result) + result = new_assign(new_assignable(new_ident(val[0])), val[1], val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1695) + def _reduce_512(val, _values, result) + result = s(:block, val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1699) + def _reduce_513(val, _values, result) + result = val[0] + val[0] << val[2] + + result + end +.,., + +# reduce 514 omitted + +# reduce 515 omitted + +module_eval(<<'.,.,', 'opal.y', 1708) + def _reduce_516(val, _values, result) + result = "*#{value(val[1])}".to_sym + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1712) + def _reduce_517(val, _values, result) + result = :"*" + + result + end +.,., + +# reduce 518 omitted + +# reduce 519 omitted + +module_eval(<<'.,.,', 'opal.y', 1720) + def _reduce_520(val, _values, result) + result = "&#{value(val[1])}".to_sym + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1725) + def _reduce_521(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1729) + def _reduce_522(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1734) + def _reduce_523(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1738) + def _reduce_524(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1743) + def _reduce_525(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1747) + def _reduce_526(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1752) + def _reduce_527(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1756) + def _reduce_528(val, _values, result) + result = val[0].push(*val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1761) + def _reduce_529(val, _values, result) + result = [val[0], val[2]] + + result + end +.,., + +module_eval(<<'.,.,', 'opal.y', 1765) + def _reduce_530(val, _values, result) + result = [new_sym(val[0]), val[1]] + + result + end +.,., + +# reduce 531 omitted + +# reduce 532 omitted + +# reduce 533 omitted + +# reduce 534 omitted + +# reduce 535 omitted + +# reduce 536 omitted + +# reduce 537 omitted + +# reduce 538 omitted + +# reduce 539 omitted + +# reduce 540 omitted + +# reduce 541 omitted + +# reduce 542 omitted + +# reduce 543 omitted + +# reduce 544 omitted + +# reduce 545 omitted + +# reduce 546 omitted + +# reduce 547 omitted + +# reduce 548 omitted + +# reduce 549 omitted + +# reduce 550 omitted + +# reduce 551 omitted + +# reduce 552 omitted + +# reduce 553 omitted + +module_eval(<<'.,.,', 'opal.y', 1802) + def _reduce_554(val, _values, result) + result = nil + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Opal diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 03997e55..13cfdc58 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -173,5 +173,13 @@ def test_csspool assert_debugfile 'csspool.y', [5, 3] assert_output 'csspool.y' end + + # .y file from opal gem + + def test_opal + assert_compile 'opal.y' + assert_debugfile 'opal.y', [] + assert_output 'opal.y' + end end end From b533d440f088c7c538affa491edcdcd6f328f89e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 09:39:34 +0200 Subject: [PATCH 090/619] Add regression test based on parser.y from journey gem Blatently and shamelessly ripping off tenderlove's code. --- Manifest.txt | 2 + test/assets/journey.y | 47 +++++++++ test/regress/journey | 212 ++++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 ++ 4 files changed, 269 insertions(+) create mode 100644 test/assets/journey.y create mode 100644 test/regress/journey diff --git a/Manifest.txt b/Manifest.txt index 7b97be46..afd1ccdb 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -64,6 +64,7 @@ test/assets/expect.y test/assets/firstline.y test/assets/ichk.y test/assets/intp.y +test/assets/journey.y test/assets/macruby.y test/assets/mailp.y test/assets/newsyn.y @@ -92,6 +93,7 @@ test/bench.y test/helper.rb test/infini.y test/regress/csspool +test/regress/journey test/regress/opal test/regress/ruby18 test/regress/ruby22 diff --git a/test/assets/journey.y b/test/assets/journey.y new file mode 100644 index 00000000..c2640f33 --- /dev/null +++ b/test/assets/journey.y @@ -0,0 +1,47 @@ +class Journey::Parser + +token SLASH LITERAL SYMBOL LPAREN RPAREN DOT STAR OR + +rule + expressions + : expressions expression { result = Cat.new(val.first, val.last) } + | expression { result = val.first } + | or + ; + expression + : terminal + | group + | star + ; + group + : LPAREN expressions RPAREN { result = Group.new(val[1]) } + ; + or + : expressions OR expression { result = Or.new([val.first, val.last]) } + ; + star + : STAR { result = Star.new(Symbol.new(val.last)) } + ; + terminal + : symbol + | literal + | slash + | dot + ; + slash + : SLASH { result = Slash.new('/') } + ; + symbol + : SYMBOL { result = Symbol.new(val.first) } + ; + literal + : LITERAL { result = Literal.new(val.first) } + dot + : DOT { result = Dot.new(val.first) } + ; + +end + +---- header + +require 'journey/parser_extras' diff --git a/test/regress/journey b/test/regress/journey new file mode 100644 index 00000000..87d91ff1 --- /dev/null +++ b/test/regress/journey @@ -0,0 +1,212 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "journey.y". +# + +require 'racc/parser.rb' + + +require 'journey/parser_extras' +module Journey + class Parser < Racc::Parser +##### State transition tables begin ### + +racc_action_table = [ +17, 21, 13, 15, 14, 7, nil, 16, 8, 19, 13, 15, 14, 7, 23, +16, 8, 19, 13, 15, 14, 7, nil, 16, 8, 13, 15, 14, 7, nil, +16, 8, 13, 15, 14, 7, nil, 16, 8] + +racc_action_check = [ +1, 17, 1, 1, 1, 1, nil, 1, 1, 1, 20, 20, 20, 20, 20, +20, 20, 20, 0, 0, 0, 0, nil, 0, 0, 7, 7, 7, 7, nil, +7, 7, 19, 19, 19, 19, nil, 19, 19] + +racc_action_pointer = [ +16, 0, nil, nil, nil, nil, nil, 23, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 1, nil, 30, 8, nil, nil, nil] + +racc_action_default = [-18, -18, -2, -3, -4, -5, -6, -18, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -1, -18, -18, 24, -8, -7] + +racc_goto_table = [ +18, 1, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 22, 18] + +racc_goto_check = [ +2, 1, nil, nil, nil, nil, nil, nil, 1, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 2, 2] + +racc_goto_pointer = [nil, 1, -1, nil, nil, nil, nil, nil, nil, nil, nil] + +racc_goto_default = [nil, nil, 2, 3, 4, 5, 6, 9, 10, 11, 12] + +racc_reduce_table = [ + 0, 0, :racc_error, + 2, 11, :_reduce_1, + 1, 11, :_reduce_2, + 1, 11, :_reduce_none, + 1, 12, :_reduce_none, + 1, 12, :_reduce_none, + 1, 12, :_reduce_none, + 3, 15, :_reduce_7, + 3, 13, :_reduce_8, + 1, 16, :_reduce_9, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 1, 19, :_reduce_14, + 1, 17, :_reduce_15, + 1, 18, :_reduce_16, + 1, 20, :_reduce_17 ] + +racc_reduce_n = 18 + +racc_shift_n = 24 + +racc_token_table = { + false => 0, + :error => 1, + :SLASH => 2, + :LITERAL => 3, + :SYMBOL => 4, + :LPAREN => 5, + :RPAREN => 6, + :DOT => 7, + :STAR => 8, + :OR => 9 } + +racc_nt_base = 10 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "SLASH", + "LITERAL", + "SYMBOL", + "LPAREN", + "RPAREN", + "DOT", + "STAR", + "OR", + "$start", + "expressions", + "expression", + "or", + "terminal", + "group", + "star", + "symbol", + "literal", + "slash", + "dot" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'journey.y', 6) + def _reduce_1(val, _values, result) + result = Cat.new(val.first, val.last) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 7) + def _reduce_2(val, _values, result) + result = val.first + result + end +.,., + +# reduce 3 omitted + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +module_eval(<<'.,.,', 'journey.y', 16) + def _reduce_7(val, _values, result) + result = Group.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 19) + def _reduce_8(val, _values, result) + result = Or.new([val.first, val.last]) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 22) + def _reduce_9(val, _values, result) + result = Star.new(Symbol.new(val.last)) + result + end +.,., + +# reduce 10 omitted + +# reduce 11 omitted + +# reduce 12 omitted + +# reduce 13 omitted + +module_eval(<<'.,.,', 'journey.y', 31) + def _reduce_14(val, _values, result) + result = Slash.new('/') + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 34) + def _reduce_15(val, _values, result) + result = Symbol.new(val.first) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 37) + def _reduce_16(val, _values, result) + result = Literal.new(val.first) + result + end +.,., + +module_eval(<<'.,.,', 'journey.y', 39) + def _reduce_17(val, _values, result) + result = Dot.new(val.first) + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Journey diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 13cfdc58..347b8bce 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -181,5 +181,13 @@ def test_opal assert_debugfile 'opal.y', [] assert_output 'opal.y' end + + # .y file from journey gem + + def test_journey + assert_compile 'journey.y' + assert_debugfile 'journey.y', [] + assert_output 'journey.y' + end end end From 31d695c971299adeef919c43e6930da2ed8ac3d5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 09:46:42 +0200 Subject: [PATCH 091/619] Add regression test based on CSS parser from nokogiri gem More riding roughshod over tenderlove's authorship. --- Manifest.txt | 2 + test/assets/nokogiri-css.y | 255 ++++++++++++ test/regress/nokogiri-css | 799 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 1064 insertions(+) create mode 100644 test/assets/nokogiri-css.y create mode 100644 test/regress/nokogiri-css diff --git a/Manifest.txt b/Manifest.txt index afd1ccdb..3c3b88bc 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -69,6 +69,7 @@ test/assets/macruby.y test/assets/mailp.y test/assets/newsyn.y test/assets/noend.y +test/assets/nokogiri-css.y test/assets/nonass.y test/assets/normal.y test/assets/norule.y @@ -94,6 +95,7 @@ test/helper.rb test/infini.y test/regress/csspool test/regress/journey +test/regress/nokogiri-css test/regress/opal test/regress/ruby18 test/regress/ruby22 diff --git a/test/assets/nokogiri-css.y b/test/assets/nokogiri-css.y new file mode 100644 index 00000000..24dfbf3b --- /dev/null +++ b/test/assets/nokogiri-css.y @@ -0,0 +1,255 @@ +class Nokogiri::CSS::Parser + +token FUNCTION INCLUDES DASHMATCH LBRACE HASH PLUS GREATER S STRING IDENT +token COMMA NUMBER PREFIXMATCH SUFFIXMATCH SUBSTRINGMATCH TILDE NOT_EQUAL +token SLASH DOUBLESLASH NOT EQUAL RPAREN LSQUARE RSQUARE HAS + +rule + selector + : selector COMMA simple_selector_1toN { + result = [val.first, val.last].flatten + } + | prefixless_combinator_selector { result = val.flatten } + | optional_S simple_selector_1toN { result = [val.last].flatten } + ; + combinator + : PLUS { result = :DIRECT_ADJACENT_SELECTOR } + | GREATER { result = :CHILD_SELECTOR } + | TILDE { result = :FOLLOWING_SELECTOR } + | DOUBLESLASH { result = :DESCENDANT_SELECTOR } + | SLASH { result = :CHILD_SELECTOR } + ; + simple_selector + : element_name hcap_0toN { + result = if val[1].nil? + val.first + else + Node.new(:CONDITIONAL_SELECTOR, [val.first, val[1]]) + end + } + | function + | function pseudo { + result = Node.new(:CONDITIONAL_SELECTOR, val) + } + | function attrib { + result = Node.new(:CONDITIONAL_SELECTOR, val) + } + | hcap_1toN { + result = Node.new(:CONDITIONAL_SELECTOR, + [Node.new(:ELEMENT_NAME, ['*']), val.first] + ) + } + ; + prefixless_combinator_selector + : combinator simple_selector_1toN { + result = Node.new(val.first, [nil, val.last]) + } + ; + simple_selector_1toN + : simple_selector combinator simple_selector_1toN { + result = Node.new(val[1], [val.first, val.last]) + } + | simple_selector S simple_selector_1toN { + result = Node.new(:DESCENDANT_SELECTOR, [val.first, val.last]) + } + | simple_selector + ; + class + : '.' IDENT { result = Node.new(:CLASS_CONDITION, [val[1]]) } + ; + element_name + : namespaced_ident + | '*' { result = Node.new(:ELEMENT_NAME, val) } + ; + namespaced_ident + : namespace '|' IDENT { + result = Node.new(:ELEMENT_NAME, + [[val.first, val.last].compact.join(':')] + ) + } + | IDENT { + name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first + result = Node.new(:ELEMENT_NAME, [name]) + } + ; + namespace + : IDENT { result = val[0] } + | + ; + attrib + : LSQUARE attrib_name attrib_val_0or1 RSQUARE { + result = Node.new(:ATTRIBUTE_CONDITION, + [val[1]] + (val[2] || []) + ) + } + | LSQUARE function attrib_val_0or1 RSQUARE { + result = Node.new(:ATTRIBUTE_CONDITION, + [val[1]] + (val[2] || []) + ) + } + | LSQUARE NUMBER RSQUARE { + # Non standard, but hpricot supports it. + result = Node.new(:PSEUDO_CLASS, + [Node.new(:FUNCTION, ['nth-child(', val[1]])] + ) + } + ; + attrib_name + : namespace '|' IDENT { + result = Node.new(:ELEMENT_NAME, + [[val.first, val.last].compact.join(':')] + ) + } + | IDENT { + # Default namespace is not applied to attributes. + # So we don't add prefix "xmlns:" as in namespaced_ident. + result = Node.new(:ELEMENT_NAME, [val.first]) + } + ; + function + : FUNCTION RPAREN { + result = Node.new(:FUNCTION, [val.first.strip]) + } + | FUNCTION expr RPAREN { + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + } + | FUNCTION nth RPAREN { + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + } + | NOT expr RPAREN { + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + } + | HAS selector RPAREN { + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + } + ; + expr + : NUMBER COMMA expr { result = [val.first, val.last] } + | STRING COMMA expr { result = [val.first, val.last] } + | IDENT COMMA expr { result = [val.first, val.last] } + | NUMBER + | STRING + | IDENT # even, odd + { + case val[0] + when 'even' + result = Node.new(:NTH, ['2','n','+','0']) + when 'odd' + result = Node.new(:NTH, ['2','n','+','1']) + when 'n' + result = Node.new(:NTH, ['1','n','+','0']) + else + # This is not CSS standard. It allows us to support this: + # assert_xpath("//a[foo(., @href)]", @parser.parse('a:foo(@href)')) + # assert_xpath("//a[foo(., @a, b)]", @parser.parse('a:foo(@a, b)')) + # assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)')) + result = val + end + } + ; + nth + : NUMBER IDENT PLUS NUMBER # 5n+3 -5n+3 + { + if val[1] == 'n' + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + } + | IDENT PLUS NUMBER { # n+3, -n+3 + if val[0] == 'n' + val.unshift("1") + result = Node.new(:NTH, val) + elsif val[0] == '-n' + val[0] = 'n' + val.unshift("-1") + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + } + | NUMBER IDENT { # 5n, -5n, 10n-1 + n = val[1] + if n[0, 2] == 'n-' + val[1] = 'n' + val << "-" + # b is contained in n as n is the string "n-b" + val << n[2, n.size] + result = Node.new(:NTH, val) + elsif n == 'n' + val << "+" + val << "0" + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + } + ; + pseudo + : ':' function { + result = Node.new(:PSEUDO_CLASS, [val[1]]) + } + | ':' IDENT { result = Node.new(:PSEUDO_CLASS, [val[1]]) } + ; + hcap_0toN + : hcap_1toN + | + ; + hcap_1toN + : attribute_id hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | class hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | attrib hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | pseudo hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | negation hcap_1toN { + result = Node.new(:COMBINATOR, val) + } + | attribute_id + | class + | attrib + | pseudo + | negation + ; + attribute_id + : HASH { result = Node.new(:ID, val) } + ; + attrib_val_0or1 + : eql_incl_dash IDENT { result = [val.first, val[1]] } + | eql_incl_dash STRING { result = [val.first, val[1]] } + | + ; + eql_incl_dash + : EQUAL { result = :equal } + | PREFIXMATCH { result = :prefix_match } + | SUFFIXMATCH { result = :suffix_match } + | SUBSTRINGMATCH { result = :substring_match } + | NOT_EQUAL { result = :not_equal } + | INCLUDES { result = :includes } + | DASHMATCH { result = :dash_match } + ; + negation + : NOT negation_arg RPAREN { + result = Node.new(:NOT, [val[1]]) + } + ; + negation_arg + : element_name + | element_name hcap_1toN + | hcap_1toN + ; + optional_S + : S + | + ; +end + +---- header + +require 'nokogiri/css/parser_extras' diff --git a/test/regress/nokogiri-css b/test/regress/nokogiri-css new file mode 100644 index 00000000..75eaa45b --- /dev/null +++ b/test/regress/nokogiri-css @@ -0,0 +1,799 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "nokogiri-css.y". +# + +require 'racc/parser.rb' + + +require 'nokogiri/css/parser_extras' +module Nokogiri + module CSS + class Parser < Racc::Parser +##### State transition tables begin ### + +racc_action_table = [ +24, 93, 56, 57, 33, 55, 94, 23, 24, 22, 12, 93, 33, 27, 35, +52, 44, 22, -23, 25, 45, 98, 23, 33, 26, 18, 20, 25, 27, - +23, 23, 24, 26, 18, 20, 33, 27, 11, 39, 24, 22, 23, 74, 33, +18, 91, 90, 27, 22, 12, 25, 24, - +23, 23, 85, 26, 18, 20, 25, 27, 66, 23, 24, 26, 18, 20, 33, +27, 101, 100, 51, 22, 86, 88, 24, 26, 56, 87, 89, 60, 92, 25, +95, 46, 23, 49, 26, 18, 20, 90, 27, 33, 33, 51, 96, 99, 56, +58, 26, 60, 102, 103, 33, 33, 33, 93, 39, 39, 105, 23, 23, 108, +18, 18, 20, 27, 27, 39, 39, 39, 23, 23, 23, 18, 18, 18, 27, +27, 27, 33, 33, 56, 87, 109, 60, 22, 56, 87, nil, 60, 33, nil, +nil, nil, 39, 39, nil, 23, 23, nil, 18, 18, 20, 27, 27, 39, 82, +83, 23, 56, 87, 18, 60, nil, 27, 82, 83, 78, 79, 80, nil, 81, +nil, nil, nil, 77, 78, 79, 80, nil, 81, 4, 5, 10, 77, 4, 5, +43, nil, nil, nil, 6, nil, 8, 7, 6, nil, 8, 7, 4, 5, 10, +nil, nil, nil, nil, nil, nil, nil, 6, nil, 8, 7] + +racc_action_check = [ +3, 58, 24, 24, 3, 24, 57, 15, 9, 3, 64, 57, 9, 15, 11, +24, 18, 9, 58, 3, 21, 64, 3, 14, 3, 3, 3, 9, 3, 22, +9, 12, 9, 9, 9, 12, 9, 1, 14, 42, 12, 14, 45, 42, 14, +55, 55, 14, 42, 1, 12, 27, 46, 12, 49, 12, 12, 12, 42, 12, +27, 42, 43, 42, 42, 42, 43, 42, 76, 76, 27, 43, 50, 53, 23, +27, 51, 51, 54, 51, 56, 43, 59, 23, 43, 23, 43, 43, 43, 60, +43, 28, 25, 23, 61, 75, 25, 25, 23, 25, 84, 86, 29, 30, 31, +87, 28, 25, 91, 28, 25, 94, 28, 25, 25, 28, 25, 29, 30, 31, +29, 30, 31, 29, 30, 31, 29, 30, 31, 32, 39, 90, 90, 105, 90, +39, 92, 92, nil, 92, 62, nil, nil, nil, 32, 39, nil, 32, 39, nil, +32, 39, 39, 32, 39, 62, 47, 47, 62, 93, 93, 62, 93, nil, 62, +48, 48, 47, 47, 47, nil, 47, nil, nil, nil, 47, 48, 48, 48, nil, +48, 0, 0, 0, 48, 17, 17, 17, nil, nil, nil, 0, nil, 0, 0, +17, nil, 17, 17, 26, 26, 26, nil, nil, nil, nil, nil, nil, nil, 26, +nil, 26, 26] + +racc_action_pointer = [174, 37, nil, -2, nil, nil, nil, nil, nil, 6, nil, 14, 29, nil, 17, -17, nil, 178, 5, nil, nil, -9, 0, 72, - +8, 86, 192, 49, 85, 96, 97, 98, 123, nil, nil, nil, nil, nil, nil, +124, nil, nil, 37, 60, nil, 31, 23, 153, 162, 29, 43, 66, nil, 50, +55, 34, 68, -1, -11, 59, 77, 71, 134, nil, - +2, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 70, 58, nil, nil, +nil, nil, nil, nil, nil, 75, nil, 90, 93, nil, nil, 121, 101, 126, 149, +98, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 120, nil, nil, nil, +nil] + +racc_action_default = [-74, -75, -2, -24, -4, -5, -6, -7, -8, -24, -73, -75, -24, -3, -47, -10, -13, -17, -75, -19, -20, -75, -22, -24, -75, -24, -74, -75, -53, -54, -55, -56, -57, -58, -14, 110, -1, -9, -46, -24, -11, -12, -24, -24, -18, -75, -29, -61, -61, -75, -75, -75, -30, -75, -75, -38, -39, -40, -22, -75, -38, -75, -70, -72, -75, -44, -45, -48, -49, -50, -51, -52, -15, -16, -21, -75, -75, -62, -63, -64, -65, -66, -67, -68, -75, -27, -75, -40, -31, -32, -75, -43, -75, -75, -75, -33, -69, -71, -34, -25, -59, -60, -26, -28, -35, -75, -36, -37, -42, -41] + +racc_goto_table = [ +53, 38, 13, 1, 42, 48, 62, 37, 34, 65, 40, 36, 63, 75, 84, +67, 68, 69, 70, 71, 62, 41, 50, 47, 54, nil, 63, nil, nil, 64, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 72, 73, nil, nil, +nil, nil, nil, nil, 97, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 104, nil, 106, 107] + +racc_goto_check = [ +18, 12, 2, 1, 5, 9, 7, 8, 2, 9, 10, 2, 12, 17, 17, +12, 12, 12, 12, 12, 7, 11, 15, 16, 19, nil, 12, nil, nil, 1, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 2, 2, nil, nil, +nil, nil, nil, nil, 12, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 18, nil, 18, 18] + +racc_goto_pointer = [nil, 3, -1, nil, nil, -13, nil, -19, -7, -18, -5, 6, -13, nil, nil, -1, 0, -34, -24, 0, nil, nil, nil, nil] + +racc_goto_default = [ +nil, nil, nil, 2, 3, 9, 17, 14, nil, 15, 31, 30, 16, 29, 19, +21, nil, nil, 59, nil, 28, 32, 76, 61] + +racc_reduce_table = [ + 0, 0, :racc_error, + 3, 32, :_reduce_1, + 1, 32, :_reduce_2, + 2, 32, :_reduce_3, + 1, 36, :_reduce_4, + 1, 36, :_reduce_5, + 1, 36, :_reduce_6, + 1, 36, :_reduce_7, + 1, 36, :_reduce_8, + 2, 37, :_reduce_9, + 1, 37, :_reduce_none, + 2, 37, :_reduce_11, + 2, 37, :_reduce_12, + 1, 37, :_reduce_13, + 2, 34, :_reduce_14, + 3, 33, :_reduce_15, + 3, 33, :_reduce_16, + 1, 33, :_reduce_none, + 2, 44, :_reduce_18, + 1, 38, :_reduce_none, + 1, 38, :_reduce_20, + 3, 45, :_reduce_21, + 1, 45, :_reduce_22, + 1, 46, :_reduce_23, + 0, 46, :_reduce_none, + 4, 42, :_reduce_25, + 4, 42, :_reduce_26, + 3, 42, :_reduce_27, + 3, 47, :_reduce_28, + 1, 47, :_reduce_29, + 2, 40, :_reduce_30, + 3, 40, :_reduce_31, + 3, 40, :_reduce_32, + 3, 40, :_reduce_33, + 3, 40, :_reduce_34, + 3, 49, :_reduce_35, + 3, 49, :_reduce_36, + 3, 49, :_reduce_37, + 1, 49, :_reduce_none, + 1, 49, :_reduce_none, + 1, 49, :_reduce_40, + 4, 50, :_reduce_41, + 3, 50, :_reduce_42, + 2, 50, :_reduce_43, + 2, 41, :_reduce_44, + 2, 41, :_reduce_45, + 1, 39, :_reduce_none, + 0, 39, :_reduce_none, + 2, 43, :_reduce_48, + 2, 43, :_reduce_49, + 2, 43, :_reduce_50, + 2, 43, :_reduce_51, + 2, 43, :_reduce_52, + 1, 43, :_reduce_none, + 1, 43, :_reduce_none, + 1, 43, :_reduce_none, + 1, 43, :_reduce_none, + 1, 43, :_reduce_none, + 1, 51, :_reduce_58, + 2, 48, :_reduce_59, + 2, 48, :_reduce_60, + 0, 48, :_reduce_none, + 1, 53, :_reduce_62, + 1, 53, :_reduce_63, + 1, 53, :_reduce_64, + 1, 53, :_reduce_65, + 1, 53, :_reduce_66, + 1, 53, :_reduce_67, + 1, 53, :_reduce_68, + 3, 52, :_reduce_69, + 1, 54, :_reduce_none, + 2, 54, :_reduce_none, + 1, 54, :_reduce_none, + 1, 35, :_reduce_none, + 0, 35, :_reduce_none ] + +racc_reduce_n = 75 + +racc_shift_n = 110 + +racc_token_table = { + false => 0, + :error => 1, + :FUNCTION => 2, + :INCLUDES => 3, + :DASHMATCH => 4, + :LBRACE => 5, + :HASH => 6, + :PLUS => 7, + :GREATER => 8, + :S => 9, + :STRING => 10, + :IDENT => 11, + :COMMA => 12, + :NUMBER => 13, + :PREFIXMATCH => 14, + :SUFFIXMATCH => 15, + :SUBSTRINGMATCH => 16, + :TILDE => 17, + :NOT_EQUAL => 18, + :SLASH => 19, + :DOUBLESLASH => 20, + :NOT => 21, + :EQUAL => 22, + :RPAREN => 23, + :LSQUARE => 24, + :RSQUARE => 25, + :HAS => 26, + "." => 27, + "*" => 28, + "|" => 29, + ":" => 30 } + +racc_nt_base = 31 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "FUNCTION", + "INCLUDES", + "DASHMATCH", + "LBRACE", + "HASH", + "PLUS", + "GREATER", + "S", + "STRING", + "IDENT", + "COMMA", + "NUMBER", + "PREFIXMATCH", + "SUFFIXMATCH", + "SUBSTRINGMATCH", + "TILDE", + "NOT_EQUAL", + "SLASH", + "DOUBLESLASH", + "NOT", + "EQUAL", + "RPAREN", + "LSQUARE", + "RSQUARE", + "HAS", + "\".\"", + "\"*\"", + "\"|\"", + "\":\"", + "$start", + "selector", + "simple_selector_1toN", + "prefixless_combinator_selector", + "optional_S", + "combinator", + "simple_selector", + "element_name", + "hcap_0toN", + "function", + "pseudo", + "attrib", + "hcap_1toN", + "class", + "namespaced_ident", + "namespace", + "attrib_name", + "attrib_val_0or1", + "expr", + "nth", + "attribute_id", + "negation", + "eql_incl_dash", + "negation_arg" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 9) + def _reduce_1(val, _values, result) + result = [val.first, val.last].flatten + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 11) + def _reduce_2(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 12) + def _reduce_3(val, _values, result) + result = [val.last].flatten + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 15) + def _reduce_4(val, _values, result) + result = :DIRECT_ADJACENT_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 16) + def _reduce_5(val, _values, result) + result = :CHILD_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 17) + def _reduce_6(val, _values, result) + result = :FOLLOWING_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 18) + def _reduce_7(val, _values, result) + result = :DESCENDANT_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 19) + def _reduce_8(val, _values, result) + result = :CHILD_SELECTOR + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 23) + def _reduce_9(val, _values, result) + result = if val[1].nil? + val.first + else + Node.new(:CONDITIONAL_SELECTOR, [val.first, val[1]]) + end + + result + end +.,., + +# reduce 10 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 31) + def _reduce_11(val, _values, result) + result = Node.new(:CONDITIONAL_SELECTOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 34) + def _reduce_12(val, _values, result) + result = Node.new(:CONDITIONAL_SELECTOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 37) + def _reduce_13(val, _values, result) + result = Node.new(:CONDITIONAL_SELECTOR, + [Node.new(:ELEMENT_NAME, ['*']), val.first] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 44) + def _reduce_14(val, _values, result) + result = Node.new(val.first, [nil, val.last]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 49) + def _reduce_15(val, _values, result) + result = Node.new(val[1], [val.first, val.last]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 52) + def _reduce_16(val, _values, result) + result = Node.new(:DESCENDANT_SELECTOR, [val.first, val.last]) + + result + end +.,., + +# reduce 17 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 57) + def _reduce_18(val, _values, result) + result = Node.new(:CLASS_CONDITION, [val[1]]) + result + end +.,., + +# reduce 19 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 61) + def _reduce_20(val, _values, result) + result = Node.new(:ELEMENT_NAME, val) + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 65) + def _reduce_21(val, _values, result) + result = Node.new(:ELEMENT_NAME, + [[val.first, val.last].compact.join(':')] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 70) + def _reduce_22(val, _values, result) + name = @namespaces.key?('xmlns') ? "xmlns:#{val.first}" : val.first + result = Node.new(:ELEMENT_NAME, [name]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 75) + def _reduce_23(val, _values, result) + result = val[0] + result + end +.,., + +# reduce 24 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 80) + def _reduce_25(val, _values, result) + result = Node.new(:ATTRIBUTE_CONDITION, + [val[1]] + (val[2] || []) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 85) + def _reduce_26(val, _values, result) + result = Node.new(:ATTRIBUTE_CONDITION, + [val[1]] + (val[2] || []) + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 90) + def _reduce_27(val, _values, result) + # Non standard, but hpricot supports it. + result = Node.new(:PSEUDO_CLASS, + [Node.new(:FUNCTION, ['nth-child(', val[1]])] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 98) + def _reduce_28(val, _values, result) + result = Node.new(:ELEMENT_NAME, + [[val.first, val.last].compact.join(':')] + ) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 103) + def _reduce_29(val, _values, result) + # Default namespace is not applied to attributes. + # So we don't add prefix "xmlns:" as in namespaced_ident. + result = Node.new(:ELEMENT_NAME, [val.first]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 110) + def _reduce_30(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 113) + def _reduce_31(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 116) + def _reduce_32(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 119) + def _reduce_33(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 122) + def _reduce_34(val, _values, result) + result = Node.new(:FUNCTION, [val.first.strip, val[1]].flatten) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 126) + def _reduce_35(val, _values, result) + result = [val.first, val.last] + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 127) + def _reduce_36(val, _values, result) + result = [val.first, val.last] + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 128) + def _reduce_37(val, _values, result) + result = [val.first, val.last] + result + end +.,., + +# reduce 38 omitted + +# reduce 39 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 133) + def _reduce_40(val, _values, result) + case val[0] + when 'even' + result = Node.new(:NTH, ['2','n','+','0']) + when 'odd' + result = Node.new(:NTH, ['2','n','+','1']) + when 'n' + result = Node.new(:NTH, ['1','n','+','0']) + else + # This is not CSS standard. It allows us to support this: + # assert_xpath("//a[foo(., @href)]", @parser.parse('a:foo(@href)')) + # assert_xpath("//a[foo(., @a, b)]", @parser.parse('a:foo(@a, b)')) + # assert_xpath("//a[foo(., a, 10)]", @parser.parse('a:foo(a, 10)')) + result = val + end + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 152) + def _reduce_41(val, _values, result) + if val[1] == 'n' + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 158) + def _reduce_42(val, _values, result) + # n+3, -n+3 + if val[0] == 'n' + val.unshift("1") + result = Node.new(:NTH, val) + elsif val[0] == '-n' + val[0] = 'n' + val.unshift("-1") + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 170) + def _reduce_43(val, _values, result) + # 5n, -5n, 10n-1 + n = val[1] + if n[0, 2] == 'n-' + val[1] = 'n' + val << "-" + # b is contained in n as n is the string "n-b" + val << n[2, n.size] + result = Node.new(:NTH, val) + elsif n == 'n' + val << "+" + val << "0" + result = Node.new(:NTH, val) + else + raise Racc::ParseError, "parse error on IDENT '#{val[1]}'" + end + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 189) + def _reduce_44(val, _values, result) + result = Node.new(:PSEUDO_CLASS, [val[1]]) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 191) + def _reduce_45(val, _values, result) + result = Node.new(:PSEUDO_CLASS, [val[1]]) + result + end +.,., + +# reduce 46 omitted + +# reduce 47 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 199) + def _reduce_48(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 202) + def _reduce_49(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 205) + def _reduce_50(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 208) + def _reduce_51(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 211) + def _reduce_52(val, _values, result) + result = Node.new(:COMBINATOR, val) + + result + end +.,., + +# reduce 53 omitted + +# reduce 54 omitted + +# reduce 55 omitted + +# reduce 56 omitted + +# reduce 57 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 220) + def _reduce_58(val, _values, result) + result = Node.new(:ID, val) + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 223) + def _reduce_59(val, _values, result) + result = [val.first, val[1]] + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 224) + def _reduce_60(val, _values, result) + result = [val.first, val[1]] + result + end +.,., + +# reduce 61 omitted + +module_eval(<<'.,.,', 'nokogiri-css.y', 228) + def _reduce_62(val, _values, result) + result = :equal + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 229) + def _reduce_63(val, _values, result) + result = :prefix_match + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 230) + def _reduce_64(val, _values, result) + result = :suffix_match + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 231) + def _reduce_65(val, _values, result) + result = :substring_match + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 232) + def _reduce_66(val, _values, result) + result = :not_equal + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 233) + def _reduce_67(val, _values, result) + result = :includes + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 234) + def _reduce_68(val, _values, result) + result = :dash_match + result + end +.,., + +module_eval(<<'.,.,', 'nokogiri-css.y', 238) + def _reduce_69(val, _values, result) + result = Node.new(:NOT, [val[1]]) + + result + end +.,., + +# reduce 70 omitted + +# reduce 71 omitted + +# reduce 72 omitted + +# reduce 73 omitted + +# reduce 74 omitted + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module CSS + end # module Nokogiri diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 347b8bce..cb75d6f8 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -189,5 +189,13 @@ def test_journey assert_debugfile 'journey.y', [] assert_output 'journey.y' end + + # .y file from nokogiri gem + + def test_nokogiri_css + assert_compile 'nokogiri-css.y' + assert_debugfile 'nokogiri-css.y', [0, 1] + assert_output 'nokogiri-css.y' + end end end From 5060d54696c143e02f7a0092f069d06acd2ddbe8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 13:06:40 +0200 Subject: [PATCH 092/619] Add regression test based on bibtex.y from bibtex-ruby gem The author, Sylvester Keil, said with regard to this grammar: Absolutely please feel free to use it. Thanks for your work on racc! It already has an embedded license. --- Manifest.txt | 2 + test/assets/bibtex.y | 141 ++++++++++++ test/regress/bibtex | 460 ++++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 611 insertions(+) create mode 100644 test/assets/bibtex.y create mode 100644 test/regress/bibtex diff --git a/Manifest.txt b/Manifest.txt index 3c3b88bc..feffcd2d 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -54,6 +54,7 @@ sample/yyerr.y setup.rb tasks/doc.rb tasks/email.rb +test/assets/bibtex.y test/assets/chk.y test/assets/conf.y test/assets/csspool.y @@ -93,6 +94,7 @@ test/assets/yyerr.y test/bench.y test/helper.rb test/infini.y +test/regress/bibtex test/regress/csspool test/regress/journey test/regress/nokogiri-css diff --git a/test/assets/bibtex.y b/test/assets/bibtex.y new file mode 100644 index 00000000..e4bab0a2 --- /dev/null +++ b/test/assets/bibtex.y @@ -0,0 +1,141 @@ +#-- +# BibTeX-Ruby +# Copyright (C) 2010-2011 Sylvester Keil +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#++ +# +# A BibTeX grammar for the parser generator +racc+ +# + +# -*- racc -*- + +class BibTeX::Parser + +token AT COMMA COMMENT CONTENT ERROR EQ LBRACE META_CONTENT KEY + NAME NUMBER PREAMBLE RBRACE SHARP STRING STRING_LITERAL + +expect 0 + +rule + + bibliography : /* empty */ { result = BibTeX::Bibliography.new(@options) } + | objects { result = val[0] } + + objects : object { result = BibTeX::Bibliography.new(@options) << val[0] } + | objects object { result << val[1] } + + object : AT at_object { result = val[1] } + | META_CONTENT { result = BibTeX::MetaContent.new(val[0]) } + | ERROR { result = BibTeX::Error.new(val[0]) } + + at_object : comment { result = val[0] } + | string { result = val[0] } + | preamble { result = val[0] } + | entry { result = val[0] } + + comment : COMMENT LBRACE content RBRACE { result = BibTeX::Comment.new(val[2]) } + + content : /* empty */ { result = '' } + | CONTENT { result = val[0] } + + preamble : PREAMBLE LBRACE string_value RBRACE { result = BibTeX::Preamble.new(val[2]) } + + string : STRING LBRACE string_assignment RBRACE { result = BibTeX::String.new(val[2][0],val[2][1]); } + + string_assignment : NAME EQ string_value { result = [val[0].downcase.to_sym, val[2]] } + + string_value : string_literal { result = [val[0]] } + | string_value SHARP string_literal { result << val[2] } + + string_literal : NAME { result = val[0].downcase.to_sym } + | LBRACE content RBRACE { result = val[1] } + | STRING_LITERAL { result = val[0] } + + entry : entry_head assignments RBRACE { result = val[0] << val[1] } + | entry_head assignments COMMA RBRACE { result = val[0] << val[1] } + | entry_head RBRACE { result = val[0] } + + entry_head : NAME LBRACE opt_key { result = BibTeX::Entry.new(:bibtex_type => val[0].downcase.to_sym, :bibtex_key => val[2]) } + + opt_key : { missing_key } + | KEY + + assignments : assignment { result = val[0] } + | assignments COMMA assignment { result.merge!(val[2]) } + + assignment : NAME EQ value { result = { val[0].downcase.to_sym => val[2] } } + + value : string_value { result = val[0] } + | NUMBER { result = val[0] } + +end + +---- header +require 'bibtex/lexer' + +---- inner + + attr_reader :lexer, :options + + @defaults = { + :include => [:errors], + :allow_missing_keys => false, + :debug => false + }.freeze + + class << self + attr_reader :defaults + end + + def initialize(options = {}) + @options = Parser.defaults.merge(options) + @lexer = Lexer.new(@options) + end + + def parse(input) + @yydebug = debug? + + lexer.analyse(input) + do_parse + #yyparse(@lexer,:each) + end + + def next_token + lexer.next_token + end + + def debug? + options[:debug] || ENV['DEBUG'] + end + + def allow_missing_keys? + options[:allow_missing_keys] + end + + def missing_key + unless allow_missing_keys? + raise ParseError, "Failed to parse BibTeX entry: cite-key missing" + end + end + + def on_error(tid, val, vstack) + message = + "Failed to parse BibTeX on value #{val.inspect} (#{token_to_str(tid) || '?'}) #{ vstack.inspect}" + + BibTeX.log.error message + raise ParseError, message + end + +# -*- racc -*- diff --git a/test/regress/bibtex b/test/regress/bibtex new file mode 100644 index 00000000..dff6f301 --- /dev/null +++ b/test/regress/bibtex @@ -0,0 +1,460 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "bibtex.y". +# + +require 'racc/parser.rb' + +require 'bibtex/lexer' + +module BibTeX + class Parser < Racc::Parser + +module_eval(<<'...end bibtex.y/module_eval...', 'bibtex.y', 89) + + attr_reader :lexer, :options + + @defaults = { + :include => [:errors], + :allow_missing_keys => false, + :debug => false + }.freeze + + class << self + attr_reader :defaults + end + + def initialize(options = {}) + @options = Parser.defaults.merge(options) + @lexer = Lexer.new(@options) + end + + def parse(input) + @yydebug = debug? + + lexer.analyse(input) + do_parse + #yyparse(@lexer,:each) + end + + def next_token + lexer.next_token + end + + def debug? + options[:debug] || ENV['DEBUG'] + end + + def allow_missing_keys? + options[:allow_missing_keys] + end + + def missing_key + unless allow_missing_keys? + raise ParseError, "Failed to parse BibTeX entry: cite-key missing" + end + end + + def on_error(tid, val, vstack) + message = + "Failed to parse BibTeX on value #{val.inspect} (#{token_to_str(tid) || '?'}) #{ vstack.inspect}" + + BibTeX.log.error message + raise ParseError, message + end + +# -*- racc -*- +...end bibtex.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +14, 33, 38, 26, 32, 26, 24, 18, 48, 15, 34, 33, 16, 37, 32, +52, 33, 7, 33, 32, 34, 32, 4, 19, 4, 34, 6, 34, 6, 5, +20, 5, 43, 44, 21, 22, 27, 29, 36, 39, 41, 42, 29, 46, 47, +54, 44, 44] + +racc_action_check = [ +4, 21, 23, 17, 21, 38, 17, 4, 38, 4, 21, 39, 4, 23, 39, +39, 44, 1, 47, 44, 39, 47, 0, 7, 2, 44, 0, 47, 2, 0, +14, 2, 30, 30, 15, 16, 18, 20, 22, 26, 27, 28, 33, 35, 36, +45, 50, 55] + +racc_action_pointer = [20, 17, 22, nil, -4, nil, nil, 23, nil, nil, nil, nil, nil, nil, 22, 26, 27, -8, 28, nil, 32, -7, 27, - +1, nil, nil, 32, 30, 27, nil, 18, nil, nil, 37, nil, 29, 37, nil, +- +6, 3, nil, nil, nil, nil, 8, 31, nil, 10, nil, nil, 31, nil, nil, +nil, nil, 32] + +racc_action_default = [-1, -34, -2, -3, -34, -6, -7, -34, -4, -5, -8, -9, -10, -11, -34, -34, -34, -34, -34, 56, -13, -34, -34, -34, -25, -29, -34, -27, -34, -14, -34, -18, -20, -13, -22, -34, -34, -23, -34, -34, -26, -28, -12, -15, -34, -34, -16, -34, -24, -30, -32, -31, -33, -19, -21, -17] + +racc_goto_table = [ +30, 25, 28, 3, 1, 8, 2, 9, 10, 11, 12, 13, 35, 53, 17, +45, 23, 40, 50, 51, nil, nil, 49, nil, nil, nil, 55] + +racc_goto_check = [ +10, 16, 9, 3, 1, 3, 2, 4, 5, 6, 7, 8, 11, 12, 13, +9, 14, 15, 10, 17, nil, nil, 16, nil, nil, nil, 10] + +racc_goto_pointer = [nil, 4, 6, 3, 3, 4, 5, 6, 7, -18, -21, -10, -31, 10, -1, -10, -16, -20] + +racc_goto_default = [ +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 31, nil, nil, +nil, nil, nil] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 19, :_reduce_1, + 1, 19, :_reduce_2, + 1, 20, :_reduce_3, + 2, 20, :_reduce_4, + 2, 21, :_reduce_5, + 1, 21, :_reduce_6, + 1, 21, :_reduce_7, + 1, 22, :_reduce_8, + 1, 22, :_reduce_9, + 1, 22, :_reduce_10, + 1, 22, :_reduce_11, + 4, 23, :_reduce_12, + 0, 27, :_reduce_13, + 1, 27, :_reduce_14, + 4, 25, :_reduce_15, + 4, 24, :_reduce_16, + 3, 29, :_reduce_17, + 1, 28, :_reduce_18, + 3, 28, :_reduce_19, + 1, 30, :_reduce_20, + 3, 30, :_reduce_21, + 1, 30, :_reduce_22, + 3, 26, :_reduce_23, + 4, 26, :_reduce_24, + 2, 26, :_reduce_25, + 3, 31, :_reduce_26, + 0, 33, :_reduce_27, + 1, 33, :_reduce_none, + 1, 32, :_reduce_29, + 3, 32, :_reduce_30, + 3, 34, :_reduce_31, + 1, 35, :_reduce_32, + 1, 35, :_reduce_33 ] + +racc_reduce_n = 34 + +racc_shift_n = 56 + +racc_token_table = { + false => 0, + :error => 1, + :AT => 2, + :COMMA => 3, + :COMMENT => 4, + :CONTENT => 5, + :ERROR => 6, + :EQ => 7, + :LBRACE => 8, + :META_CONTENT => 9, + :KEY => 10, + :NAME => 11, + :NUMBER => 12, + :PREAMBLE => 13, + :RBRACE => 14, + :SHARP => 15, + :STRING => 16, + :STRING_LITERAL => 17 } + +racc_nt_base = 18 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "AT", + "COMMA", + "COMMENT", + "CONTENT", + "ERROR", + "EQ", + "LBRACE", + "META_CONTENT", + "KEY", + "NAME", + "NUMBER", + "PREAMBLE", + "RBRACE", + "SHARP", + "STRING", + "STRING_LITERAL", + "$start", + "bibliography", + "objects", + "object", + "at_object", + "comment", + "string", + "preamble", + "entry", + "content", + "string_value", + "string_assignment", + "string_literal", + "entry_head", + "assignments", + "opt_key", + "assignment", + "value" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'bibtex.y', 32) + def _reduce_1(val, _values, result) + result = BibTeX::Bibliography.new(@options) + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 33) + def _reduce_2(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 35) + def _reduce_3(val, _values, result) + result = BibTeX::Bibliography.new(@options) << val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 36) + def _reduce_4(val, _values, result) + result << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 38) + def _reduce_5(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 39) + def _reduce_6(val, _values, result) + result = BibTeX::MetaContent.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 40) + def _reduce_7(val, _values, result) + result = BibTeX::Error.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 42) + def _reduce_8(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 43) + def _reduce_9(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 44) + def _reduce_10(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 45) + def _reduce_11(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 47) + def _reduce_12(val, _values, result) + result = BibTeX::Comment.new(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 49) + def _reduce_13(val, _values, result) + result = '' + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 50) + def _reduce_14(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 52) + def _reduce_15(val, _values, result) + result = BibTeX::Preamble.new(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 54) + def _reduce_16(val, _values, result) + result = BibTeX::String.new(val[2][0],val[2][1]); + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 56) + def _reduce_17(val, _values, result) + result = [val[0].downcase.to_sym, val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 58) + def _reduce_18(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 59) + def _reduce_19(val, _values, result) + result << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 61) + def _reduce_20(val, _values, result) + result = val[0].downcase.to_sym + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 62) + def _reduce_21(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 63) + def _reduce_22(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 65) + def _reduce_23(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 66) + def _reduce_24(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 67) + def _reduce_25(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 69) + def _reduce_26(val, _values, result) + result = BibTeX::Entry.new(:bibtex_type => val[0].downcase.to_sym, :bibtex_key => val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 71) + def _reduce_27(val, _values, result) + missing_key + result + end +.,., + +# reduce 28 omitted + +module_eval(<<'.,.,', 'bibtex.y', 74) + def _reduce_29(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 75) + def _reduce_30(val, _values, result) + result.merge!(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 77) + def _reduce_31(val, _values, result) + result = { val[0].downcase.to_sym => val[2] } + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 79) + def _reduce_32(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'bibtex.y', 80) + def _reduce_33(val, _values, result) + result = val[0] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module BibTeX diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index cb75d6f8..6efb5c09 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -197,5 +197,13 @@ def test_nokogiri_css assert_debugfile 'nokogiri-css.y', [0, 1] assert_output 'nokogiri-css.y' end + + # .y file from bibtex-ruby gem + + def test_bibtex + assert_compile 'bibtex.y' + assert_debugfile 'bibtex.y', [0, 0, 0, 0, 0] + assert_output 'bibtex.y' + end end end From 7d5ef2199f4adae02a4c272526823cc48a050b9a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 13:09:48 +0200 Subject: [PATCH 093/619] Add regression test based on parser.y from edtf-ruby gem This is also a creation of Sylvester Keil, who donated bibtex.y. --- Manifest.txt | 2 + test/assets/edtf.y | 583 +++++++++++++ test/regress/edtf | 1662 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 2255 insertions(+) create mode 100644 test/assets/edtf.y create mode 100644 test/regress/edtf diff --git a/Manifest.txt b/Manifest.txt index feffcd2d..ec7253ba 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -60,6 +60,7 @@ test/assets/conf.y test/assets/csspool.y test/assets/digraph.y test/assets/echk.y +test/assets/edtf.y test/assets/err.y test/assets/expect.y test/assets/firstline.y @@ -96,6 +97,7 @@ test/helper.rb test/infini.y test/regress/bibtex test/regress/csspool +test/regress/edtf test/regress/journey test/regress/nokogiri-css test/regress/opal diff --git a/test/assets/edtf.y b/test/assets/edtf.y new file mode 100644 index 00000000..4f5f6bb4 --- /dev/null +++ b/test/assets/edtf.y @@ -0,0 +1,583 @@ +# -*- racc -*- + +# Copyright 2011 Sylvester Keil. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and documentation are +# those of the authors and should not be interpreted as representing official +# policies, either expressed or implied, of the copyright holder. + +class EDTF::Parser + +token T Z E X U UNKNOWN OPEN LONGYEAR UNMATCHED DOTS UA PUA + +expect 0 + +rule + + edtf : level_0_expression + | level_1_expression + | level_2_expression + ; + + # ---- Level 0 / ISO 8601 Rules ---- + + # NB: level 0 intervals are covered by the level 1 interval rules + level_0_expression : date + | date_time + ; + + date : positive_date + | negative_date + ; + + positive_date : + year { result = Date.new(val[0]).year_precision! } + | year_month { result = Date.new(*val.flatten).month_precision! } + | year_month_day { result = Date.new(*val.flatten).day_precision! } + ; + + negative_date : '-' positive_date { result = -val[1] } + + + date_time : date T time { + result = DateTime.new(val[0].year, val[0].month, val[0].day, *val[2]) + result.skip_timezone = (val[2].length == 3) + } + + time : base_time + | base_time zone_offset { result = val.flatten } + + base_time : hour ':' minute ':' second { result = val.values_at(0, 2, 4) } + | midnight + + midnight : '2' '4' ':' '0' '0' ':' '0' '0' { result = [24, 0, 0] } + + zone_offset : Z { result = 0 } + | '-' zone_offset_hour { result = -1 * val[1] } + | '+' positive_zone_offset { result = val[1] } + ; + + positive_zone_offset : zone_offset_hour + | '0' '0' ':' '0' '0' { result = 0 } + ; + + + zone_offset_hour : d01_13 ':' minute { result = Rational(val[0] * 60 + val[2], 1440) } + | '1' '4' ':' '0' '0' { result = Rational(840, 1440) } + | '0' '0' ':' d01_59 { result = Rational(val[3], 1440) } + ; + + year : digit digit digit digit { + result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + } + + month : d01_12 + day : d01_31 + + year_month : year '-' month { result = [val[0], val[2]] } + + # We raise an exception if there are two many days for the month, but + # do not consider leap years, as the EDTF BNF did not either. + # NB: an exception will be raised regardless, because the Ruby Date + # implementation calculates leap years. + year_month_day : year_month '-' day { + result = val[0] << val[2] + if result[2] > 31 || (result[2] > 30 && [2,4,6,9,11].include?(result[1])) || (result[2] > 29 && result[1] == 2) + raise ArgumentError, "invalid date (invalid days #{result[2]} for month #{result[1]})" + end + } + + hour : d00_23 + minute : d00_59 + second : d00_59 + + # Completely covered by level_1_interval + # level_0_interval : date '/' date { result = Interval.new(val[0], val[1]) } + + + # ---- Level 1 Extension Rules ---- + + # NB: Uncertain/approximate Dates are covered by the Level 2 rules + level_1_expression : unspecified | level_1_interval | long_year_simple | season + + # uncertain_or_approximate_date : date UA { result = uoa(val[0], val[1]) } + + unspecified : unspecified_year + { + result = Date.new(val[0][0]).year_precision! + result.unspecified.year[2,2] = val[0][1] + } + | unspecified_month + | unspecified_day + | unspecified_day_and_month + ; + + unspecified_year : + digit digit digit U + { + result = [val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b }, [false,true]] + } + | digit digit U U + { + result = [val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b }, [true, true]] + } + + unspecified_month : year '-' U U { + result = Date.new(val[0]).unspecified!(:month) + result.precision = :month + } + + unspecified_day : year_month '-' U U { + result = Date.new(*val[0]).unspecified!(:day) + } + + unspecified_day_and_month : year '-' U U '-' U U { + result = Date.new(val[0]).unspecified!([:day,:month]) + } + + + level_1_interval : level_1_start '/' level_1_end { + result = Interval.new(val[0], val[2]) + } + + level_1_start : date | partial_uncertain_or_approximate | unspecified | partial_unspecified | UNKNOWN + + level_1_end : level_1_start | OPEN + + + long_year_simple : + LONGYEAR long_year + { + result = Date.new(val[1]) + result.precision = :year + } + | LONGYEAR '-' long_year + { + result = Date.new(-1 * val[2]) + result.precision = :year + } + ; + + long_year : + positive_digit digit digit digit digit { + result = val.zip([10000,1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + } + | long_year digit { result = 10 * val[0] + val[1] } + ; + + + season : year '-' season_number ua { + result = Season.new(val[0], val[2]) + val[3].each { |ua| result.send(ua) } + } + + season_number : '2' '1' { result = 21 } + | '2' '2' { result = 22 } + | '2' '3' { result = 23 } + | '2' '4' { result = 24 } + ; + + + # ---- Level 2 Extension Rules ---- + + # NB: Level 2 Intervals are covered by the Level 1 Interval rules. + level_2_expression : season_qualified + | partial_uncertain_or_approximate + | partial_unspecified + | choice_list + | inclusive_list + | masked_precision + | date_and_calendar + | long_year_scientific + ; + + + season_qualified : season '^' { result = val[0]; result.qualifier = val[1] } + + + long_year_scientific : + long_year_simple E integer + { + result = Date.new(val[0].year * 10 ** val[2]).year_precision! + } + | LONGYEAR int1_4 E integer + { + result = Date.new(val[1] * 10 ** val[3]).year_precision! + } + | LONGYEAR '-' int1_4 E integer + { + result = Date.new(-1 * val[2] * 10 ** val[4]).year_precision! + } + ; + + + date_and_calendar : date '^' { result = val[0]; result.calendar = val[1] } + + + masked_precision : + digit digit digit X + { + d = val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b } + result = EDTF::Decade.new(d) + } + | digit digit X X + { + d = val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b } + result = EDTF::Century.new(d) + } + ; + + + choice_list : '[' list ']' { result = val[1].choice! } + + inclusive_list : '{' list '}' { result = val[1] } + + list : earlier { result = EDTF::Set.new(val[0]).earlier! } + | earlier ',' list_elements ',' later { result = EDTF::Set.new([val[0]] + val[2] + [val[4]]).earlier!.later! } + | earlier ',' list_elements { result = EDTF::Set.new([val[0]] + val[2]).earlier! } + | earlier ',' later { result = EDTF::Set.new([val[0]] + [val[2]]).earlier!.later! } + | list_elements ',' later { result = EDTF::Set.new(val[0] + [val[2]]).later! } + | list_elements { result = EDTF::Set.new(*val[0]) } + | later { result = EDTF::Set.new(val[0]).later! } + ; + + list_elements : list_element { result = [val[0]].flatten } + | list_elements ',' list_element { result = val[0] + [val[2]].flatten } + ; + + list_element : atomic + | consecutives + ; + + atomic : date + | partial_uncertain_or_approximate + | unspecified + ; + + earlier : DOTS date { result = val[1] } + + later : year_month_day DOTS { result = Date.new(*val[0]).year_precision! } + | year_month DOTS { result = Date.new(*val[0]).month_precision! } + | year DOTS { result = Date.new(val[0]).year_precision! } + ; + + consecutives : year_month_day DOTS year_month_day { result = (Date.new(val[0]).day_precision! .. Date.new(val[2]).day_precision!) } + | year_month DOTS year_month { result = (Date.new(val[0]).month_precision! .. Date.new(val[2]).month_precision!) } + | year DOTS year { result = (Date.new(val[0]).year_precision! .. Date.new(val[2]).year_precision!) } + ; + + partial_unspecified : + unspecified_year '-' month '-' day + { + result = Date.new(val[0][0], val[2], val[4]) + result.unspecified.year[2,2] = val[0][1] + } + | unspecified_year '-' U U '-' day + { + result = Date.new(val[0][0], 1, val[5]) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!(:month) + } + | unspecified_year '-' U U '-' U U + { + result = Date.new(val[0][0], 1, 1) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!([:month, :day]) + } + | unspecified_year '-' month '-' U U + { + result = Date.new(val[0][0], val[2], 1) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!(:day) + } + | year '-' U U '-' day + { + result = Date.new(val[0], 1, val[5]) + result.unspecified!(:month) + } + ; + + + partial_uncertain_or_approximate : pua_base + | '(' pua_base ')' UA { result = uoa(val[1], val[3]) } + + pua_base : + pua_year { result = val[0].year_precision! } + | pua_year_month { result = val[0][0].month_precision! } + | pua_year_month_day { result = val[0].day_precision! } + + pua_year : year UA { result = uoa(Date.new(val[0]), val[1], :year) } + + pua_year_month : + pua_year '-' month ua { + result = [uoa(val[0].change(:month => val[2]), val[3], [:month, :year])] + } + | year '-' month UA { + result = [uoa(Date.new(val[0], val[2]), val[3], [:year, :month])] + } + | year '-(' month ')' UA { + result = [uoa(Date.new(val[0], val[2]), val[4], [:month]), true] + } + | pua_year '-(' month ')' UA { + result = [uoa(val[0].change(:month => val[2]), val[4], [:month]), true] + } + ; + + pua_year_month_day : + pua_year_month '-' day ua { + result = uoa(val[0][0].change(:day => val[2]), val[3], val[0][1] ? [:day] : nil) + } + | pua_year_month '-(' day ')' UA { + result = uoa(val[0][0].change(:day => val[2]), val[4], [:day]) + } + | year '-(' month ')' UA day ua { + result = uoa(uoa(Date.new(val[0], val[2], val[5]), val[4], :month), val[6], :day) + } + | year_month '-' day UA { + result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[3]) + } + | year_month '-(' day ')' UA { + result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[4], [:day]) + } + | year '-(' month '-' day ')' UA { + result = uoa(Date.new(val[0], val[2], val[4]), val[6], [:month, :day]) + } + | year '-(' month '-(' day ')' UA ')' UA { + result = Date.new(val[0], val[2], val[4]) + result = uoa(result, val[6], [:day]) + result = uoa(result, val[8], [:month, :day]) + } + | pua_year '-(' month '-' day ')' UA { + result = val[0].change(:month => val[2], :day => val[4]) + result = uoa(result, val[6], [:month, :day]) + } + | pua_year '-(' month '-(' day ')' UA ')' UA { + result = val[0].change(:month => val[2], :day => val[4]) + result = uoa(result, val[6], [:day]) + result = uoa(result, val[8], [:month, :day]) + } + # | '(' pua_year '-(' month ')' UA ')' UA '-' day ua { + # result = val[1].change(:month => val[3], :day => val[9]) + # result = uoa(result, val[5], [:month]) + # result = [uoa(result, val[7], [:year]), true] + # } + ; + + ua : { result = [] } | UA + + # ---- Auxiliary Rules ---- + + digit : '0' { result = 0 } + | positive_digit + ; + + positive_digit : '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' + + d01_12 : '0' positive_digit { result = val[1] } + | '1' '0' { result = 10 } + | '1' '1' { result = 11 } + | '1' '2' { result = 12 } + ; + + d01_13 : d01_12 + | '1' '3' { result = 13 } + ; + + d01_23 : '0' positive_digit { result = val[1] } + | '1' digit { result = 10 + val[1] } + | '2' '0' { result = 20 } + | '2' '1' { result = 21 } + | '2' '2' { result = 22 } + | '2' '3' { result = 23 } + ; + + d00_23 : '0' '0' + | d01_23 + ; + + d01_29 : d01_23 + | '2' '4' { result = 24 } + | '2' '5' { result = 25 } + | '2' '6' { result = 26 } + | '2' '7' { result = 27 } + | '2' '8' { result = 28 } + | '2' '9' { result = 29 } + ; + + d01_30 : d01_29 + | '3' '0' { result = 30 } + ; + + d01_31 : d01_30 + | '3' '1' { result = 31 } + ; + + d01_59 : d01_29 + | '3' digit { result = 30 + val[1] } + | '4' digit { result = 40 + val[1] } + | '5' digit { result = 50 + val[1] } + ; + + d00_59 : '0' '0' + | d01_59 + ; + + int1_4 : positive_digit { result = val[0] } + | positive_digit digit { result = 10 * val[0] + val[1] } + | positive_digit digit digit + { + result = val.zip([100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + } + | positive_digit digit digit digit + { + result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + } + ; + + integer : positive_digit { result = val[0] } + | integer digit { result = 10 * val[0] + val[1] } + ; + + + +---- header +require 'strscan' + +---- inner + + @defaults = { + :level => 2, + :debug => false + }.freeze + + class << self; attr_reader :defaults; end + + attr_reader :options + + def initialize(options = {}) + @options = Parser.defaults.merge(options) + end + + def debug? + !!(options[:debug] || ENV['DEBUG']) + end + + def parse(input) + parse!(input) + rescue => e + warn e.message if debug? + nil + end + + def parse!(input) + @yydebug = debug? + @src = StringScanner.new(input) + do_parse + end + + def on_error(tid, value, stack) + raise ArgumentError, + "failed to parse date: unexpected '#{value}' at #{stack.inspect}" + end + + def apply_uncertainty(date, uncertainty, scope = nil) + uncertainty.each do |u| + scope.nil? ? date.send(u) : date.send(u, scope) + end + date + end + + alias uoa apply_uncertainty + + def next_token + case + when @src.eos? + nil + # when @src.scan(/\s+/) + # ignore whitespace + when @src.scan(/\(/) + ['(', @src.matched] + # when @src.scan(/\)\?~-/) + # [:PUA, [:uncertain!, :approximate!]] + # when @src.scan(/\)\?-/) + # [:PUA, [:uncertain!]] + # when @src.scan(/\)~-/) + # [:PUA, [:approximate!]] + when @src.scan(/\)/) + [')', @src.matched] + when @src.scan(/\[/) + ['[', @src.matched] + when @src.scan(/\]/) + [']', @src.matched] + when @src.scan(/\{/) + ['{', @src.matched] + when @src.scan(/\}/) + ['}', @src.matched] + when @src.scan(/T/) + [:T, @src.matched] + when @src.scan(/Z/) + [:Z, @src.matched] + when @src.scan(/\?~/) + [:UA, [:uncertain!, :approximate!]] + when @src.scan(/\?/) + [:UA, [:uncertain!]] + when @src.scan(/~/) + [:UA, [:approximate!]] + when @src.scan(/open/i) + [:OPEN, :open] + when @src.scan(/unkn?own/i) # matches 'unkown' typo too + [:UNKNOWN, :unknown] + when @src.scan(/u/) + [:U, @src.matched] + when @src.scan(/x/i) + [:X, @src.matched] + when @src.scan(/y/) + [:LONGYEAR, @src.matched] + when @src.scan(/e/) + [:E, @src.matched] + when @src.scan(/\+/) + ['+', @src.matched] + when @src.scan(/-\(/) + ['-(', @src.matched] + when @src.scan(/-/) + ['-', @src.matched] + when @src.scan(/:/) + [':', @src.matched] + when @src.scan(/\//) + ['/', @src.matched] + when @src.scan(/\s*\.\.\s*/) + [:DOTS, '..'] + when @src.scan(/\s*,\s*/) + [',', ','] + when @src.scan(/\^\w+/) + ['^', @src.matched[1..-1]] + when @src.scan(/\d/) + [@src.matched, @src.matched.to_i] + else @src.scan(/./) + [:UNMATCHED, @src.rest] + end + end + + +# -*- racc -*- diff --git a/test/regress/edtf b/test/regress/edtf new file mode 100644 index 00000000..20a6076d --- /dev/null +++ b/test/regress/edtf @@ -0,0 +1,1662 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "edtf.y". +# + +require 'racc/parser.rb' + +require 'strscan' + +module EDTF + class Parser < Racc::Parser + +module_eval(<<'...end edtf.y/module_eval...', 'edtf.y', 468) + + @defaults = { + :level => 2, + :debug => false + }.freeze + + class << self; attr_reader :defaults; end + + attr_reader :options + + def initialize(options = {}) + @options = Parser.defaults.merge(options) + end + + def debug? + !!(options[:debug] || ENV['DEBUG']) + end + + def parse(input) + parse!(input) + rescue => e + warn e.message if debug? + nil + end + + def parse!(input) + @yydebug = debug? + @src = StringScanner.new(input) + do_parse + end + + def on_error(tid, value, stack) + raise ArgumentError, + "failed to parse date: unexpected '#{value}' at #{stack.inspect}" + end + + def apply_uncertainty(date, uncertainty, scope = nil) + uncertainty.each do |u| + scope.nil? ? date.send(u) : date.send(u, scope) + end + date + end + + alias uoa apply_uncertainty + + def next_token + case + when @src.eos? + nil + # when @src.scan(/\s+/) + # ignore whitespace + when @src.scan(/\(/) + ['(', @src.matched] + # when @src.scan(/\)\?~-/) + # [:PUA, [:uncertain!, :approximate!]] + # when @src.scan(/\)\?-/) + # [:PUA, [:uncertain!]] + # when @src.scan(/\)~-/) + # [:PUA, [:approximate!]] + when @src.scan(/\)/) + [')', @src.matched] + when @src.scan(/\[/) + ['[', @src.matched] + when @src.scan(/\]/) + [']', @src.matched] + when @src.scan(/\{/) + ['{', @src.matched] + when @src.scan(/\}/) + ['}', @src.matched] + when @src.scan(/T/) + [:T, @src.matched] + when @src.scan(/Z/) + [:Z, @src.matched] + when @src.scan(/\?~/) + [:UA, [:uncertain!, :approximate!]] + when @src.scan(/\?/) + [:UA, [:uncertain!]] + when @src.scan(/~/) + [:UA, [:approximate!]] + when @src.scan(/open/i) + [:OPEN, :open] + when @src.scan(/unkn?own/i) # matches 'unkown' typo too + [:UNKNOWN, :unknown] + when @src.scan(/u/) + [:U, @src.matched] + when @src.scan(/x/i) + [:X, @src.matched] + when @src.scan(/y/) + [:LONGYEAR, @src.matched] + when @src.scan(/e/) + [:E, @src.matched] + when @src.scan(/\+/) + ['+', @src.matched] + when @src.scan(/-\(/) + ['-(', @src.matched] + when @src.scan(/-/) + ['-', @src.matched] + when @src.scan(/:/) + [':', @src.matched] + when @src.scan(/\//) + ['/', @src.matched] + when @src.scan(/\s*\.\.\s*/) + [:DOTS, '..'] + when @src.scan(/\s*,\s*/) + [',', ','] + when @src.scan(/\^\w+/) + ['^', @src.matched[1..-1]] + when @src.scan(/\d/) + [@src.matched, @src.matched.to_i] + else @src.scan(/./) + [:UNMATCHED, @src.rest] + end + end + + +# -*- racc -*- +...end edtf.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [129, 128, 52, 111, 51, 112, 149, 208, 207, 57, -50, 43, 45, 40, 55, 42, 54, 44, 43, 45, 40, - +48, 42, 53, 44, 64, 58, 46, 47, 48, 49, 50, 128, 56, 46, 47, +48, 49, 50, 207, 57, 65, 43, 45, 40, 55, 42, 157, 44, 43, 45, +40, 55, 42, 214, 44, 92, 58, 46, 47, 48, 49, 50, 66, 56, 46, +47, 48, 49, 50, 25, 56, 26, 93, 94, 67, 108, 12, -65, 43, 45, 40, - +66, 42, 159, 44, 110, 33, 111, 34, 112, 95, 36, 25, 141, 46, 47, +48, 49, 50, 12, 58, 43, 45, 40, 101, 42, 103, 44, 104, 96, 148, +55, 133, 147, 36, 124, 125, 46, 47, 48, 49, 50, 87, 165, 111, 12, +112, 43, 45, 40, 56, 42, 146, 44, 166, 111, 150, 112, 218, 167, 36, +152, 153, 46, 47, 48, 49, 50, 87, 108, 111, 12, 112, 43, 45, 40, +188, 42, 186, 44, 187, 111, 190, 112, 154, 111, 36, 112, 156, 46, 47, +48, 49, 50, 69, 158, 43, 45, 189, 191, 42, 12, 44, 43, 45, 40, +200, 42, 201, 44, 168, 177, 46, 47, 48, 49, 50, 233, 178, 46, 47, +48, 49, 50, 12, 180, 43, 45, 40, 111, 42, 112, 44, 232, 234, 111, +240, 112, 239, 36, 192, 193, 46, 47, 48, 49, 50, 12, 202, 43, 45, +40, 118, 42, 117, 44, 104, 118, 121, 117, 209, 104, 36, 121, 210, 46, +47, 48, 49, 50, 12, 212, 43, 45, 40, 244, 42, 239, 44, 213, 43, +45, 40, 215, 42, 36, 44, 229, 46, 47, 48, 49, 50, 180, 180, 236, +46, 47, 48, 49, 50, 43, 45, 40, 253, 42, 254, 44, 43, 45, 40, +255, 42, 258, 44, 261, 264, 46, 47, 48, 49, 50, 124, 125, 46, 47, +48, 49, 50, 43, 45, 40, 265, 42, 192, 44, 43, 45, 266, 269, 42, +270, 44, 275, 280, 46, 47, 48, 49, 50, 284, 285, 46, 47, 48, 49, +50, 43, 45, 40, 286, 42, 290, 44, 43, 45, 292, 293, 42, 295, 44, +296, 297, 46, 47, 48, 49, 50, 300, 301, 46, 47, 48, 49, 50, 43, +45, 40, 180, 42, 303, 44, 43, 45, 40, 304, 42, 305, 44, 281, 306, +46, 47, 48, 49, 50, 307, 308, 46, 47, 48, 49, 50, 43, 45, 175, +311, 42, 312, 44, 43, 45, 40, 313, 42, 314, 44, 316, 317, 46, 47, +48, 49, 50, 318, 319, 46, 47, 48, 49, 50, 43, 45, nil, nil, 42, +nil, 44, 43, 45, nil, nil, 42, nil, 44, nil, nil, 46, 47, 48, 49, +50, nil, nil, 46, 47, 48, 49, 50, 172, 194, 170, nil, 171, nil, 173, +43, 45, 40, nil, 42, nil, 44, nil, nil, 195, 196, 197, 198, 199, nil, +nil, 46, 47, 48, 49, 50, 43, 45, 40, nil, 42, nil, 44, 43, 45, +40, nil, 42, nil, 44, nil, nil, 46, 47, 48, 49, 50, nil, nil, 46, +47, 48, 49, 50, 43, 45, 40, nil, 42, nil, 44, 43, 45, nil, nil, +42, nil, 44, nil, nil, 46, 47, 48, 49, 50, nil, nil, 46, 47, 48, +49, 50, 43, 45, 40, nil, 42, nil, 44, 43, 45, 40, nil, 42, nil, +44, nil, nil, 46, 47, 48, 49, 50, nil, nil, 46, 47, 48, 49, 50, +43, 45, 40, nil, 42, nil, 44, 43, 45, 40, nil, 42, nil, 44, nil, +nil, 46, 47, 48, 49, 50, nil, nil, 46, 47, 48, 49, 50, 43, 45, +nil, nil, 42, nil, 44, 43, 45, 40, nil, 42, nil, 44, nil, nil, 46, +47, 48, 49, 50, nil, nil, 46, 47, 48, 49, 50, 43, 45, 40, nil, +42, nil, 44, 43, 45, 273, nil, 42, nil, 44, nil, nil, 46, 47, 48, +49, 50, nil, nil, 46, 47, 48, 49, 50, 43, 45, 274, nil, 42, nil, +44, 43, 45, 276, nil, 42, nil, 44, nil, nil, 46, 47, 48, 49, 50, +nil, nil, 46, 47, 48, 49, 50, 43, 45, 40, nil, 42, nil, 44, 43, +45, 40, nil, 42, nil, 44, nil, nil, 46, 47, 48, 49, 50, nil, nil, +46, 47, 48, 49, 50, 43, 45, 40, nil, 42, nil, 44, 43, 45, 40, +nil, 42, nil, 44, nil, nil, 46, 47, 48, 49, 50, nil, nil, 46, 47, +48, 49, 50, 43, 45, 40, nil, 42, nil, 44, 43, 45, 315, nil, 42, +nil, 44, nil, nil, 46, 47, 48, 49, 50, 116, nil, 46, 47, 48, 49, +50, 118, 250, 247, 118, 104, 117, 249, 104, 260, 121, nil, 281, nil, nil, +nil, nil, 251, nil, 118, 288, 117, 118, 104, 117, 121, 104, 118, 121, 117, +118, 104, 117, 121, 104, nil, 121, 118, 250, 247, nil, 104, nil, 249, 118, +250, 247, nil, 104, nil, 249, nil, nil, 251, nil, 118, 250, 117, nil, 104, +251, 249, 118, 250, 310, nil, 104, nil, 249, nil, nil, 251, nil, 172, 169, +170, nil, 171, 251, 173, 182, 184, nil, 118, 181, 117, 183, 104, 118, 121, +117, 118, 104, 117, 121, 104, 118, 121, 117, 118, 104, 117, 121, 104, 118, +121, 117, nil, 104, nil, 121, 188, 271, 186, 118, 187, 117, 272, 104, nil, +121] + +racc_action_check = [ +63, 63, 5, 56, 1, 56, 73, 127, 127, 73, 14, 63, 63, 63, 9, +63, 9, 63, 127, 127, 127, 5, 127, 5, 127, 16, 73, 63, 63, 63, +63, 63, 151, 9, 127, 127, 127, 127, 127, 224, 10, 17, 151, 151, 151, +89, 151, 89, 151, 224, 224, 224, 134, 224, 134, 224, 37, 10, 151, 151, +151, 151, 151, 18, 89, 224, 224, 224, 224, 224, 0, 134, 0, 37, 38, +22, 54, 0, 23, 0, 0, 0, 24, 0, 91, 0, 54, 0, 54, 0, +54, 38, 0, 67, 67, 0, 0, 0, 0, 0, 67, 91, 67, 67, 67, +52, 67, 52, 67, 52, 51, 72, 72, 66, 72, 67, 59, 60, 67, 67, +67, 67, 67, 33, 98, 66, 33, 66, 33, 33, 33, 72, 33, 71, 33, +98, 92, 74, 92, 147, 98, 33, 77, 78, 33, 33, 33, 33, 33, 34, +214, 147, 34, 147, 34, 34, 34, 112, 34, 112, 34, 112, 214, 113, 214, +79, 93, 34, 93, 88, 34, 34, 34, 34, 34, 26, 90, 26, 26, 113, +113, 26, 87, 26, 87, 87, 87, 121, 87, 121, 87, 99, 107, 26, 26, +26, 26, 26, 161, 108, 87, 87, 87, 87, 87, 153, 109, 153, 153, 153, +124, 153, 124, 153, 161, 161, 157, 166, 157, 166, 153, 115, 116, 153, 153, +153, 153, 153, 154, 123, 154, 154, 154, 58, 154, 58, 154, 58, 94, 58, +94, 128, 94, 154, 94, 129, 154, 154, 154, 154, 154, 265, 132, 265, 265, +265, 167, 265, 167, 265, 133, 12, 12, 12, 144, 12, 265, 12, 158, 265, +265, 265, 265, 265, 160, 162, 163, 12, 12, 12, 12, 12, 13, 13, 13, +169, 13, 178, 13, 36, 36, 36, 189, 36, 202, 36, 213, 218, 13, 13, +13, 13, 13, 220, 222, 36, 36, 36, 36, 36, 62, 62, 62, 225, 62, +230, 62, 64, 64, 232, 236, 64, 238, 64, 245, 253, 62, 62, 62, 62, +62, 256, 257, 64, 64, 64, 64, 64, 68, 68, 68, 260, 68, 264, 68, +69, 69, 267, 268, 69, 271, 69, 273, 274, 68, 68, 68, 68, 68, 280, +281, 69, 69, 69, 69, 69, 70, 70, 70, 283, 70, 284, 70, 75, 75, +75, 285, 75, 288, 75, 290, 292, 70, 70, 70, 70, 70, 293, 295, 75, +75, 75, 75, 75, 103, 103, 103, 300, 103, 304, 103, 104, 104, 104, 307, +104, 308, 104, 311, 312, 103, 103, 103, 103, 103, 313, 316, 104, 104, 104, +104, 104, 111, 111, nil, nil, 111, nil, 111, 117, 117, nil, nil, 117, nil, +117, nil, nil, 111, 111, 111, 111, 111, nil, nil, 117, 117, 117, 117, 117, +118, 118, 118, nil, 118, nil, 118, 126, 126, 126, nil, 126, nil, 126, nil, +nil, 118, 118, 118, 118, 118, nil, nil, 126, 126, 126, 126, 126, 130, 130, +130, nil, 130, nil, 130, 143, 143, 143, nil, 143, nil, 143, nil, nil, 130, +130, 130, 130, 130, nil, nil, 143, 143, 143, 143, 143, 145, 145, 145, nil, +145, nil, 145, 146, 146, nil, nil, 146, nil, 146, nil, nil, 145, 145, 145, +145, 145, nil, nil, 146, 146, 146, 146, 146, 148, 148, 148, nil, 148, nil, +148, 149, 149, 149, nil, 149, nil, 149, nil, nil, 148, 148, 148, 148, 148, +nil, nil, 149, 149, 149, 149, 149, 150, 150, 150, nil, 150, nil, 150, 205, +205, 205, nil, 205, nil, 205, nil, nil, 150, 150, 150, 150, 150, nil, nil, +205, 205, 205, 205, 205, 215, 215, nil, nil, 215, nil, 215, 216, 216, 216, +nil, 216, nil, 216, nil, nil, 215, 215, 215, 215, 215, nil, nil, 216, 216, +216, 216, 216, 217, 217, 217, nil, 217, nil, 217, 240, 240, 240, nil, 240, +nil, 240, nil, nil, 217, 217, 217, 217, 217, nil, nil, 240, 240, 240, 240, +240, 244, 244, 244, nil, 244, nil, 244, 247, 247, 247, nil, 247, nil, 247, +nil, nil, 244, 244, 244, 244, 244, nil, nil, 247, 247, 247, 247, 247, 249, +249, 249, nil, 249, nil, 249, 250, 250, 250, nil, 250, nil, 250, nil, nil, +249, 249, 249, 249, 249, nil, nil, 250, 250, 250, 250, 250, 251, 251, 251, +nil, 251, nil, 251, 262, 262, 262, nil, 262, nil, 262, nil, nil, 251, 251, +251, 251, 251, nil, nil, 262, 262, 262, 262, 262, 263, 263, 263, nil, 263, +nil, 263, 310, 310, 310, nil, 310, nil, 310, nil, nil, 263, 263, 263, 263, +263, 57, nil, 310, 310, 310, 310, 310, 168, 168, 168, 57, 168, 57, 168, +57, 212, 57, nil, 254, nil, nil, nil, nil, 168, nil, 212, 261, 212, 254, +212, 254, 212, 254, 95, 254, 95, 261, 95, 261, 95, 261, nil, 261, 270, +270, 270, nil, 270, nil, 270, 275, 275, 275, nil, 275, nil, 275, nil, nil, +270, nil, 296, 296, 296, nil, 296, 275, 296, 297, 297, 297, nil, 297, nil, +297, nil, nil, 296, nil, 101, 101, 101, nil, 101, 297, 101, 110, 110, nil, +125, 110, 125, 110, 125, 159, 125, 159, 190, 159, 190, 159, 190, 191, 190, +191, 233, 191, 233, 191, 233, 234, 233, 234, nil, 234, nil, 234, 239, 239, +239, 255, 239, 255, 239, 255, nil, 255] + +racc_action_pointer = [63, 4, nil, nil, nil, 0, nil, nil, nil, 2, 26, nil, 245, 266, - +11, nil, 21, 18, 49, nil, nil, nil, 54, 78, 82, nil, 161, nil, nil, +nil, nil, nil, nil, 112, 138, nil, 273, 42, 60, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 110, 89, nil, 70, nil, -15, 745, 217, 102, 103, nil, 294, -5, 301, nil, 107, 86, 322, 329, 350, 129, 100, - +5, 126, 357, nil, 117, 115, 137, nil, nil, nil, nil, nil, nil, nil, 168, +142, 33, 146, 70, 118, 148, 222, 768, nil, nil, 121, 176, nil, 814, nil, +378, 385, nil, nil, 180, 193, 194, 821, 406, 141, 149, nil, 209, 216, 413, +434, nil, nil, 169, nil, 199, 192, 824, 441, 2, 235, 240, 462, nil, 238, +254, 40, nil, nil, nil, nil, nil, nil, nil, nil, 469, 260, 490, 497, 133, +518, 525, 546, 26, nil, 191, 214, nil, nil, 198, 256, 829, 262, 184, 263, +246, nil, nil, 199, 238, 742, 270, nil, nil, nil, nil, nil, nil, nil, nil, +273, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 280, 832, 837, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 282, nil, nil, 553, nil, nil, +nil, nil, nil, nil, 760, 282, 144, 574, 581, 602, 291, nil, 289, nil, 290, +nil, 33, 285, nil, nil, nil, nil, 303, nil, 307, 840, 845, nil, 308, nil, +307, 852, 609, nil, nil, nil, 630, 309, nil, 637, nil, 658, 665, 686, nil, +307, 763, 855, 301, 302, nil, nil, 335, 771, 693, 714, 329, 237, nil, 317, +318, nil, 778, 335, nil, 337, 338, 785, nil, nil, nil, nil, 341, 354, nil, +357, 359, 364, nil, nil, 372, nil, 374, nil, 369, 375, nil, 370, 796, 803, +nil, nil, 382, nil, nil, nil, 369, nil, nil, 374, 388, nil, 721, 390, 397, +403, nil, nil, 398, nil, nil, nil] + +racc_action_default = [-176, -176, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -176, -176, -34, -35, -36, -37, -38, -39, -40, -41, -176, -49, -51, -52, -176, -64, -67, -68, -69, -70, -71, -176, -176, -107, -176, -109, -110, -111, -128, -129, -130, -131, -132, -133, -134, -135, -136, -137, -138, -176, -176, -76, -176, -112, -176, -176, -176, -8, -9, -11, -176, -176, -176, -72, -176, -176, -55, -176, -170, -176, -8, -9, -10, -176, -38, -176, -81, -86, -87, -88, -90, -91, -92, -93, -94, -176, -176, -176, -176, -176, -176, -176, -176, -176, 320, -12, -13, -176, -16, -176, -31, -176, -176, -152, -27, -29, -176, -126, -176, -176, -176, -176, -28, -30, -176, -176, -176, -153, -160, -176, -162, -176, -176, -176, -176, -176, -176, -176, -73, -174, -176, -176, -8, -47, -48, -49, -50, -51, -53, -54, -58, -56, -176, -171, -176, -176, -98, -97, -96, -176, -79, -176, -176, -95, -80, -176, -176, -176, -126, -176, -126, -176, -14, -18, -176, -176, -176, -176, -147, -148, -149, -150, -145, -151, -146, -114, -44, -59, -127, -60, -61, -62, -63, -139, -140, -141, -142, -176, -176, -176, -120, -45, -154, -155, -156, -157, -158, -159, -161, -163, -176, -29, -30, -176, -26, -42, -77, -43, -78, -175, -176, -176, -176, -176, -172, -74, -176, -101, -176, -100, -176, -99, -176, -83, -84, -85, -89, -108, -176, -113, -176, -176, -176, -117, -176, -19, -176, -176, -176, -143, -20, -21, -176, -176, -32, -176, -164, -176, -176, -176, -169, -176, -176, -115, -176, -176, -121, -102, -176, -176, -75, -173, -44, -176, -116, -176, -176, -118, -176, -176, -144, -176, -176, -176, -168, -165, -166, -167, -176, -176, -106, -126, -176, -176, -105, -103, -176, -57, -176, -82, -176, -176, -23, -176, -176, -176, -15, -33, -176, -46, -119, -122, -176, -104, -124, -176, -176, -25, -176, -176, -176, -176, -24, -22, -176, -123, -125, -17] + +racc_goto_table = [ +70, 179, 130, 13, 228, 11, 248, 115, 123, 226, 227, 113, 245, 5, 14, +9, 63, 11, 68, 10, 18, 132, 22, 23, 71, 1, 24, 59, 237, 243, +2, 60, 309, 309, 241, 241, 75, 75, 131, 77, 88, 3, 4, 70, 162, +163, 6, 160, 161, 61, 97, 89, 231, 98, 235, 91, 164, 99, 298, 100, +242, 143, 102, 299, 15, 126, 127, 144, 16, 17, 75, 142, 11, 145, 135, +204, 109, 174, 151, 203, 136, 138, 134, 27, 217, 185, 10, 18, 28, 140, +137, 174, 11, 139, 29, 30, 31, 32, 225, 90, 155, 105, 59, nil, nil, +nil, 60, 176, 248, 230, nil, nil, nil, 248, 294, 228, nil, nil, nil, nil, +131, 291, nil, nil, nil, nil, nil, nil, nil, 205, 206, nil, nil, 211, 248, +248, nil, nil, nil, nil, 256, 257, nil, nil, nil, nil, 142, nil, 216, nil, +nil, nil, nil, 262, 224, 223, 75, 75, nil, nil, nil, nil, 259, 219, 220, +220, nil, nil, 221, 222, nil, nil, nil, nil, nil, 302, nil, nil, nil, nil, +nil, nil, nil, 267, 268, nil, nil, nil, nil, 131, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 282, 283, nil, nil, 206, nil, +nil, 287, nil, nil, 185, nil, nil, nil, 185, 263, 211, 174, nil, nil, nil, +nil, nil, 206, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 277, 278, 279, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 211, 289, nil, 75, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 174] + +racc_goto_check = [ +43, 45, 52, 23, 58, 11, 66, 26, 26, 57, 57, 24, 16, 5, 30, +9, 23, 11, 42, 10, 34, 24, 38, 40, 53, 1, 41, 9, 19, 19, +2, 10, 22, 22, 25, 25, 23, 23, 43, 54, 54, 3, 4, 43, 26, +26, 6, 24, 24, 7, 12, 9, 45, 13, 45, 10, 14, 15, 17, 18, +20, 42, 28, 29, 31, 23, 23, 53, 32, 33, 23, 23, 11, 23, 39, +26, 44, 43, 23, 24, 5, 30, 9, 46, 52, 43, 10, 34, 47, 38, +40, 43, 11, 41, 48, 49, 50, 51, 56, 61, 5, 65, 9, nil, nil, +nil, 10, 23, 66, 26, nil, nil, nil, 66, 16, 58, nil, nil, nil, nil, +43, 57, nil, nil, nil, nil, nil, nil, nil, 23, 23, nil, nil, 23, 66, +66, nil, nil, nil, nil, 26, 26, nil, nil, nil, nil, 23, nil, 23, nil, +nil, nil, nil, 52, 23, 11, 23, 23, nil, nil, nil, nil, 26, 9, 9, +9, nil, nil, 10, 10, nil, nil, nil, nil, nil, 45, nil, nil, nil, nil, +nil, nil, nil, 26, 26, nil, nil, nil, nil, 43, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 26, 26, nil, nil, 23, nil, +nil, 26, nil, nil, 43, nil, nil, nil, 43, 23, 23, 43, nil, nil, nil, +nil, nil, 23, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, 23, 23, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, 23, nil, 23, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 43] + +racc_goto_pointer = [nil, 25, 30, 41, 42, 13, 46, 37, nil, 15, 19, 5, -2, 1, -42, 5, -156, -217, 7, -138, -107, nil, -264, 3, -45, -132, -50, nil, 10, -212, 14, 64, 68, 69, 20, nil, nil, nil, 22, 7, 23, 26, -8, -26, 22, -108, 83, 88, 94, 95, 96, 97, -62, -2, 6, nil, -55, -144, -150, nil, nil, 63, nil, nil, nil, 49, -162, nil] + +racc_goto_default = [ +nil, nil, nil, nil, nil, 84, nil, 7, 8, 72, 73, 74, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 238, 252, 62, 107, 106, nil, 114, nil, 246, +86, nil, nil, nil, 76, 19, 20, 21, nil, nil, 85, nil, nil, 41, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 78, 79, 80, 81, 82, +83, 35, 37, 38, 39, 119, 120, 122] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 38, :_reduce_none, + 1, 38, :_reduce_none, + 1, 38, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 42, :_reduce_none, + 1, 42, :_reduce_none, + 1, 44, :_reduce_8, + 1, 44, :_reduce_9, + 1, 44, :_reduce_10, + 2, 45, :_reduce_11, + 3, 43, :_reduce_12, + 1, 49, :_reduce_none, + 2, 49, :_reduce_14, + 5, 50, :_reduce_15, + 1, 50, :_reduce_none, + 8, 55, :_reduce_17, + 1, 51, :_reduce_18, + 2, 51, :_reduce_19, + 2, 51, :_reduce_20, + 1, 57, :_reduce_none, + 5, 57, :_reduce_22, + 3, 56, :_reduce_23, + 5, 56, :_reduce_24, + 4, 56, :_reduce_25, + 4, 46, :_reduce_26, + 1, 61, :_reduce_none, + 1, 63, :_reduce_none, + 3, 47, :_reduce_29, + 3, 48, :_reduce_30, + 1, 52, :_reduce_none, + 1, 53, :_reduce_none, + 1, 54, :_reduce_none, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 1, 67, :_reduce_38, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 4, 71, :_reduce_42, + 4, 71, :_reduce_43, + 4, 72, :_reduce_44, + 4, 73, :_reduce_45, + 7, 74, :_reduce_46, + 3, 68, :_reduce_47, + 1, 75, :_reduce_none, + 1, 75, :_reduce_none, + 1, 75, :_reduce_none, + 1, 75, :_reduce_none, + 1, 75, :_reduce_none, + 1, 76, :_reduce_none, + 1, 76, :_reduce_none, + 2, 69, :_reduce_55, + 3, 69, :_reduce_56, + 5, 79, :_reduce_57, + 2, 79, :_reduce_58, + 4, 70, :_reduce_59, + 2, 81, :_reduce_60, + 2, 81, :_reduce_61, + 2, 81, :_reduce_62, + 2, 81, :_reduce_63, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 1, 41, :_reduce_none, + 2, 83, :_reduce_72, + 3, 88, :_reduce_73, + 4, 88, :_reduce_74, + 5, 88, :_reduce_75, + 2, 87, :_reduce_76, + 4, 86, :_reduce_77, + 4, 86, :_reduce_78, + 3, 84, :_reduce_79, + 3, 85, :_reduce_80, + 1, 91, :_reduce_81, + 5, 91, :_reduce_82, + 3, 91, :_reduce_83, + 3, 91, :_reduce_84, + 3, 91, :_reduce_85, + 1, 91, :_reduce_86, + 1, 91, :_reduce_87, + 1, 93, :_reduce_88, + 3, 93, :_reduce_89, + 1, 95, :_reduce_none, + 1, 95, :_reduce_none, + 1, 96, :_reduce_none, + 1, 96, :_reduce_none, + 1, 96, :_reduce_none, + 2, 92, :_reduce_95, + 2, 94, :_reduce_96, + 2, 94, :_reduce_97, + 2, 94, :_reduce_98, + 3, 97, :_reduce_99, + 3, 97, :_reduce_100, + 3, 97, :_reduce_101, + 5, 78, :_reduce_102, + 6, 78, :_reduce_103, + 7, 78, :_reduce_104, + 6, 78, :_reduce_105, + 6, 78, :_reduce_106, + 1, 77, :_reduce_none, + 4, 77, :_reduce_108, + 1, 98, :_reduce_109, + 1, 98, :_reduce_110, + 1, 98, :_reduce_111, + 2, 99, :_reduce_112, + 4, 100, :_reduce_113, + 4, 100, :_reduce_114, + 5, 100, :_reduce_115, + 5, 100, :_reduce_116, + 4, 101, :_reduce_117, + 5, 101, :_reduce_118, + 7, 101, :_reduce_119, + 4, 101, :_reduce_120, + 5, 101, :_reduce_121, + 7, 101, :_reduce_122, + 9, 101, :_reduce_123, + 7, 101, :_reduce_124, + 9, 101, :_reduce_125, + 0, 82, :_reduce_126, + 1, 82, :_reduce_none, + 1, 60, :_reduce_128, + 1, 60, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 1, 80, :_reduce_none, + 2, 62, :_reduce_139, + 2, 62, :_reduce_140, + 2, 62, :_reduce_141, + 2, 62, :_reduce_142, + 1, 58, :_reduce_none, + 2, 58, :_reduce_144, + 2, 102, :_reduce_145, + 2, 102, :_reduce_146, + 2, 102, :_reduce_147, + 2, 102, :_reduce_148, + 2, 102, :_reduce_149, + 2, 102, :_reduce_150, + 2, 65, :_reduce_none, + 1, 65, :_reduce_none, + 1, 103, :_reduce_none, + 2, 103, :_reduce_154, + 2, 103, :_reduce_155, + 2, 103, :_reduce_156, + 2, 103, :_reduce_157, + 2, 103, :_reduce_158, + 2, 103, :_reduce_159, + 1, 104, :_reduce_none, + 2, 104, :_reduce_161, + 1, 64, :_reduce_none, + 2, 64, :_reduce_163, + 1, 59, :_reduce_none, + 2, 59, :_reduce_165, + 2, 59, :_reduce_166, + 2, 59, :_reduce_167, + 2, 66, :_reduce_none, + 1, 66, :_reduce_none, + 1, 90, :_reduce_170, + 2, 90, :_reduce_171, + 3, 90, :_reduce_172, + 4, 90, :_reduce_173, + 1, 89, :_reduce_174, + 2, 89, :_reduce_175 ] + +racc_reduce_n = 176 + +racc_shift_n = 320 + +racc_token_table = { + false => 0, + :error => 1, + :T => 2, + :Z => 3, + :E => 4, + :X => 5, + :U => 6, + :UNKNOWN => 7, + :OPEN => 8, + :LONGYEAR => 9, + :UNMATCHED => 10, + :DOTS => 11, + :UA => 12, + :PUA => 13, + "-" => 14, + ":" => 15, + "2" => 16, + "4" => 17, + "0" => 18, + "+" => 19, + "1" => 20, + "/" => 21, + "3" => 22, + "^" => 23, + "[" => 24, + "]" => 25, + "{" => 26, + "}" => 27, + "," => 28, + "(" => 29, + ")" => 30, + "-(" => 31, + "5" => 32, + "6" => 33, + "7" => 34, + "8" => 35, + "9" => 36 } + +racc_nt_base = 37 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "T", + "Z", + "E", + "X", + "U", + "UNKNOWN", + "OPEN", + "LONGYEAR", + "UNMATCHED", + "DOTS", + "UA", + "PUA", + "\"-\"", + "\":\"", + "\"2\"", + "\"4\"", + "\"0\"", + "\"+\"", + "\"1\"", + "\"/\"", + "\"3\"", + "\"^\"", + "\"[\"", + "\"]\"", + "\"{\"", + "\"}\"", + "\",\"", + "\"(\"", + "\")\"", + "\"-(\"", + "\"5\"", + "\"6\"", + "\"7\"", + "\"8\"", + "\"9\"", + "$start", + "edtf", + "level_0_expression", + "level_1_expression", + "level_2_expression", + "date", + "date_time", + "positive_date", + "negative_date", + "year", + "year_month", + "year_month_day", + "time", + "base_time", + "zone_offset", + "hour", + "minute", + "second", + "midnight", + "zone_offset_hour", + "positive_zone_offset", + "d01_13", + "d01_59", + "digit", + "month", + "d01_12", + "day", + "d01_31", + "d00_23", + "d00_59", + "unspecified", + "level_1_interval", + "long_year_simple", + "season", + "unspecified_year", + "unspecified_month", + "unspecified_day", + "unspecified_day_and_month", + "level_1_start", + "level_1_end", + "partial_uncertain_or_approximate", + "partial_unspecified", + "long_year", + "positive_digit", + "season_number", + "ua", + "season_qualified", + "choice_list", + "inclusive_list", + "masked_precision", + "date_and_calendar", + "long_year_scientific", + "integer", + "int1_4", + "list", + "earlier", + "list_elements", + "later", + "list_element", + "atomic", + "consecutives", + "pua_base", + "pua_year", + "pua_year_month", + "pua_year_month_day", + "d01_23", + "d01_29", + "d01_30" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +# reduce 2 omitted + +# reduce 3 omitted + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +# reduce 7 omitted + +module_eval(<<'.,.,', 'edtf.y', 54) + def _reduce_8(val, _values, result) + result = Date.new(val[0]).year_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 55) + def _reduce_9(val, _values, result) + result = Date.new(*val.flatten).month_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 56) + def _reduce_10(val, _values, result) + result = Date.new(*val.flatten).day_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 59) + def _reduce_11(val, _values, result) + result = -val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 63) + def _reduce_12(val, _values, result) + result = DateTime.new(val[0].year, val[0].month, val[0].day, *val[2]) + result.skip_timezone = (val[2].length == 3) + + result + end +.,., + +# reduce 13 omitted + +module_eval(<<'.,.,', 'edtf.y', 68) + def _reduce_14(val, _values, result) + result = val.flatten + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 70) + def _reduce_15(val, _values, result) + result = val.values_at(0, 2, 4) + result + end +.,., + +# reduce 16 omitted + +module_eval(<<'.,.,', 'edtf.y', 73) + def _reduce_17(val, _values, result) + result = [24, 0, 0] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 75) + def _reduce_18(val, _values, result) + result = 0 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 76) + def _reduce_19(val, _values, result) + result = -1 * val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 77) + def _reduce_20(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 21 omitted + +module_eval(<<'.,.,', 'edtf.y', 81) + def _reduce_22(val, _values, result) + result = 0 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 85) + def _reduce_23(val, _values, result) + result = Rational(val[0] * 60 + val[2], 1440) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 86) + def _reduce_24(val, _values, result) + result = Rational(840, 1440) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 87) + def _reduce_25(val, _values, result) + result = Rational(val[3], 1440) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 91) + def _reduce_26(val, _values, result) + result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + + result + end +.,., + +# reduce 27 omitted + +# reduce 28 omitted + +module_eval(<<'.,.,', 'edtf.y', 97) + def _reduce_29(val, _values, result) + result = [val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 104) + def _reduce_30(val, _values, result) + result = val[0] << val[2] + if result[2] > 31 || (result[2] > 30 && [2,4,6,9,11].include?(result[1])) || (result[2] > 29 && result[1] == 2) + raise ArgumentError, "invalid date (invalid days #{result[2]} for month #{result[1]})" + end + + result + end +.,., + +# reduce 31 omitted + +# reduce 32 omitted + +# reduce 33 omitted + +# reduce 34 omitted + +# reduce 35 omitted + +# reduce 36 omitted + +# reduce 37 omitted + +module_eval(<<'.,.,', 'edtf.y', 127) + def _reduce_38(val, _values, result) + result = Date.new(val[0][0]).year_precision! + result.unspecified.year[2,2] = val[0][1] + + result + end +.,., + +# reduce 39 omitted + +# reduce 40 omitted + +# reduce 41 omitted + +module_eval(<<'.,.,', 'edtf.y', 138) + def _reduce_42(val, _values, result) + result = [val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b }, [false,true]] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 142) + def _reduce_43(val, _values, result) + result = [val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b }, [true, true]] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 146) + def _reduce_44(val, _values, result) + result = Date.new(val[0]).unspecified!(:month) + result.precision = :month + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 151) + def _reduce_45(val, _values, result) + result = Date.new(*val[0]).unspecified!(:day) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 155) + def _reduce_46(val, _values, result) + result = Date.new(val[0]).unspecified!([:day,:month]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 160) + def _reduce_47(val, _values, result) + result = Interval.new(val[0], val[2]) + + result + end +.,., + +# reduce 48 omitted + +# reduce 49 omitted + +# reduce 50 omitted + +# reduce 51 omitted + +# reduce 52 omitted + +# reduce 53 omitted + +# reduce 54 omitted + +module_eval(<<'.,.,', 'edtf.y', 171) + def _reduce_55(val, _values, result) + result = Date.new(val[1]) + result.precision = :year + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 176) + def _reduce_56(val, _values, result) + result = Date.new(-1 * val[2]) + result.precision = :year + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 183) + def _reduce_57(val, _values, result) + result = val.zip([10000,1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 185) + def _reduce_58(val, _values, result) + result = 10 * val[0] + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 190) + def _reduce_59(val, _values, result) + result = Season.new(val[0], val[2]) + val[3].each { |ua| result.send(ua) } + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 194) + def _reduce_60(val, _values, result) + result = 21 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 195) + def _reduce_61(val, _values, result) + result = 22 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 196) + def _reduce_62(val, _values, result) + result = 23 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 197) + def _reduce_63(val, _values, result) + result = 24 + result + end +.,., + +# reduce 64 omitted + +# reduce 65 omitted + +# reduce 66 omitted + +# reduce 67 omitted + +# reduce 68 omitted + +# reduce 69 omitted + +# reduce 70 omitted + +# reduce 71 omitted + +module_eval(<<'.,.,', 'edtf.y', 215) + def _reduce_72(val, _values, result) + result = val[0]; result.qualifier = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 221) + def _reduce_73(val, _values, result) + result = Date.new(val[0].year * 10 ** val[2]).year_precision! + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 225) + def _reduce_74(val, _values, result) + result = Date.new(val[1] * 10 ** val[3]).year_precision! + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 229) + def _reduce_75(val, _values, result) + result = Date.new(-1 * val[2] * 10 ** val[4]).year_precision! + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 234) + def _reduce_76(val, _values, result) + result = val[0]; result.calendar = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 240) + def _reduce_77(val, _values, result) + d = val[0,3].zip([1000,100,10]).reduce(0) { |s,(a,b)| s += a * b } + result = EDTF::Decade.new(d) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 245) + def _reduce_78(val, _values, result) + d = val[0,2].zip([1000,100]).reduce(0) { |s,(a,b)| s += a * b } + result = EDTF::Century.new(d) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 251) + def _reduce_79(val, _values, result) + result = val[1].choice! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 253) + def _reduce_80(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 255) + def _reduce_81(val, _values, result) + result = EDTF::Set.new(val[0]).earlier! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 256) + def _reduce_82(val, _values, result) + result = EDTF::Set.new([val[0]] + val[2] + [val[4]]).earlier!.later! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 257) + def _reduce_83(val, _values, result) + result = EDTF::Set.new([val[0]] + val[2]).earlier! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 258) + def _reduce_84(val, _values, result) + result = EDTF::Set.new([val[0]] + [val[2]]).earlier!.later! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 259) + def _reduce_85(val, _values, result) + result = EDTF::Set.new(val[0] + [val[2]]).later! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 260) + def _reduce_86(val, _values, result) + result = EDTF::Set.new(*val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 261) + def _reduce_87(val, _values, result) + result = EDTF::Set.new(val[0]).later! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 264) + def _reduce_88(val, _values, result) + result = [val[0]].flatten + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 265) + def _reduce_89(val, _values, result) + result = val[0] + [val[2]].flatten + result + end +.,., + +# reduce 90 omitted + +# reduce 91 omitted + +# reduce 92 omitted + +# reduce 93 omitted + +# reduce 94 omitted + +module_eval(<<'.,.,', 'edtf.y', 277) + def _reduce_95(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 279) + def _reduce_96(val, _values, result) + result = Date.new(*val[0]).year_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 280) + def _reduce_97(val, _values, result) + result = Date.new(*val[0]).month_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 281) + def _reduce_98(val, _values, result) + result = Date.new(val[0]).year_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 284) + def _reduce_99(val, _values, result) + result = (Date.new(val[0]).day_precision! .. Date.new(val[2]).day_precision!) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 285) + def _reduce_100(val, _values, result) + result = (Date.new(val[0]).month_precision! .. Date.new(val[2]).month_precision!) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 286) + def _reduce_101(val, _values, result) + result = (Date.new(val[0]).year_precision! .. Date.new(val[2]).year_precision!) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 292) + def _reduce_102(val, _values, result) + result = Date.new(val[0][0], val[2], val[4]) + result.unspecified.year[2,2] = val[0][1] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 297) + def _reduce_103(val, _values, result) + result = Date.new(val[0][0], 1, val[5]) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!(:month) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 303) + def _reduce_104(val, _values, result) + result = Date.new(val[0][0], 1, 1) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!([:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 309) + def _reduce_105(val, _values, result) + result = Date.new(val[0][0], val[2], 1) + result.unspecified.year[2,2] = val[0][1] + result.unspecified!(:day) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 315) + def _reduce_106(val, _values, result) + result = Date.new(val[0], 1, val[5]) + result.unspecified!(:month) + + result + end +.,., + +# reduce 107 omitted + +module_eval(<<'.,.,', 'edtf.y', 322) + def _reduce_108(val, _values, result) + result = uoa(val[1], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 325) + def _reduce_109(val, _values, result) + result = val[0].year_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 326) + def _reduce_110(val, _values, result) + result = val[0][0].month_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 327) + def _reduce_111(val, _values, result) + result = val[0].day_precision! + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 329) + def _reduce_112(val, _values, result) + result = uoa(Date.new(val[0]), val[1], :year) + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 333) + def _reduce_113(val, _values, result) + result = [uoa(val[0].change(:month => val[2]), val[3], [:month, :year])] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 336) + def _reduce_114(val, _values, result) + result = [uoa(Date.new(val[0], val[2]), val[3], [:year, :month])] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 339) + def _reduce_115(val, _values, result) + result = [uoa(Date.new(val[0], val[2]), val[4], [:month]), true] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 342) + def _reduce_116(val, _values, result) + result = [uoa(val[0].change(:month => val[2]), val[4], [:month]), true] + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 348) + def _reduce_117(val, _values, result) + result = uoa(val[0][0].change(:day => val[2]), val[3], val[0][1] ? [:day] : nil) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 351) + def _reduce_118(val, _values, result) + result = uoa(val[0][0].change(:day => val[2]), val[4], [:day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 354) + def _reduce_119(val, _values, result) + result = uoa(uoa(Date.new(val[0], val[2], val[5]), val[4], :month), val[6], :day) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 357) + def _reduce_120(val, _values, result) + result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 360) + def _reduce_121(val, _values, result) + result = uoa(Date.new(val[0][0], val[0][1], val[2]), val[4], [:day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 363) + def _reduce_122(val, _values, result) + result = uoa(Date.new(val[0], val[2], val[4]), val[6], [:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 366) + def _reduce_123(val, _values, result) + result = Date.new(val[0], val[2], val[4]) + result = uoa(result, val[6], [:day]) + result = uoa(result, val[8], [:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 371) + def _reduce_124(val, _values, result) + result = val[0].change(:month => val[2], :day => val[4]) + result = uoa(result, val[6], [:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 375) + def _reduce_125(val, _values, result) + result = val[0].change(:month => val[2], :day => val[4]) + result = uoa(result, val[6], [:day]) + result = uoa(result, val[8], [:month, :day]) + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 386) + def _reduce_126(val, _values, result) + result = [] + result + end +.,., + +# reduce 127 omitted + +module_eval(<<'.,.,', 'edtf.y', 390) + def _reduce_128(val, _values, result) + result = 0 + result + end +.,., + +# reduce 129 omitted + +# reduce 130 omitted + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +# reduce 136 omitted + +# reduce 137 omitted + +# reduce 138 omitted + +module_eval(<<'.,.,', 'edtf.y', 396) + def _reduce_139(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 397) + def _reduce_140(val, _values, result) + result = 10 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 398) + def _reduce_141(val, _values, result) + result = 11 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 399) + def _reduce_142(val, _values, result) + result = 12 + result + end +.,., + +# reduce 143 omitted + +module_eval(<<'.,.,', 'edtf.y', 403) + def _reduce_144(val, _values, result) + result = 13 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 406) + def _reduce_145(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 407) + def _reduce_146(val, _values, result) + result = 10 + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 408) + def _reduce_147(val, _values, result) + result = 20 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 409) + def _reduce_148(val, _values, result) + result = 21 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 410) + def _reduce_149(val, _values, result) + result = 22 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 411) + def _reduce_150(val, _values, result) + result = 23 + result + end +.,., + +# reduce 151 omitted + +# reduce 152 omitted + +# reduce 153 omitted + +module_eval(<<'.,.,', 'edtf.y', 419) + def _reduce_154(val, _values, result) + result = 24 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 420) + def _reduce_155(val, _values, result) + result = 25 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 421) + def _reduce_156(val, _values, result) + result = 26 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 422) + def _reduce_157(val, _values, result) + result = 27 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 423) + def _reduce_158(val, _values, result) + result = 28 + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 424) + def _reduce_159(val, _values, result) + result = 29 + result + end +.,., + +# reduce 160 omitted + +module_eval(<<'.,.,', 'edtf.y', 428) + def _reduce_161(val, _values, result) + result = 30 + result + end +.,., + +# reduce 162 omitted + +module_eval(<<'.,.,', 'edtf.y', 432) + def _reduce_163(val, _values, result) + result = 31 + result + end +.,., + +# reduce 164 omitted + +module_eval(<<'.,.,', 'edtf.y', 436) + def _reduce_165(val, _values, result) + result = 30 + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 437) + def _reduce_166(val, _values, result) + result = 40 + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 438) + def _reduce_167(val, _values, result) + result = 50 + val[1] + result + end +.,., + +# reduce 168 omitted + +# reduce 169 omitted + +module_eval(<<'.,.,', 'edtf.y', 445) + def _reduce_170(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 446) + def _reduce_171(val, _values, result) + result = 10 * val[0] + val[1] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 449) + def _reduce_172(val, _values, result) + result = val.zip([100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 453) + def _reduce_173(val, _values, result) + result = val.zip([1000,100,10,1]).reduce(0) { |s,(a,b)| s += a * b } + + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 457) + def _reduce_174(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'edtf.y', 458) + def _reduce_175(val, _values, result) + result = 10 * val[0] + val[1] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module EDTF diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 6efb5c09..7d60b9e5 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -205,5 +205,13 @@ def test_bibtex assert_debugfile 'bibtex.y', [0, 0, 0, 0, 0] assert_output 'bibtex.y' end + + # .y file from edtf-ruby gem + + def test_edtf + assert_compile 'edtf.y' + assert_debugfile 'edtf.y', [0, 0, 0, 0, 0] + assert_output 'edtf.y' + end end end From 9911e66a3ca794a433c43225c552f6c88e9ff391 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 13:12:11 +0200 Subject: [PATCH 094/619] Add regression test based on parser.y from namae gem Again, courtesy of Sylvester Keil. --- Manifest.txt | 2 + test/assets/namae.y | 302 +++++++++++++++++++ test/regress/namae | 604 ++++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 916 insertions(+) create mode 100644 test/assets/namae.y create mode 100644 test/regress/namae diff --git a/Manifest.txt b/Manifest.txt index ec7253ba..c01e2499 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -69,6 +69,7 @@ test/assets/intp.y test/assets/journey.y test/assets/macruby.y test/assets/mailp.y +test/assets/namae.y test/assets/newsyn.y test/assets/noend.y test/assets/nokogiri-css.y @@ -99,6 +100,7 @@ test/regress/bibtex test/regress/csspool test/regress/edtf test/regress/journey +test/regress/namae test/regress/nokogiri-css test/regress/opal test/regress/ruby18 diff --git a/test/assets/namae.y b/test/assets/namae.y new file mode 100644 index 00000000..0378345f --- /dev/null +++ b/test/assets/namae.y @@ -0,0 +1,302 @@ +# -*- ruby -*- +# vi: set ft=ruby : + +# Copyright (C) 2012 President and Fellows of Harvard College +# Copyright (C) 2013-2014 Sylvester Keil +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and documentation are +# those of the authors and should not be interpreted as representing official +# policies, either expressed or implied, of the copyright holder. + +class Namae::Parser + +token COMMA UWORD LWORD PWORD NICK AND APPELLATION TITLE SUFFIX + +expect 0 + +rule + + names : { result = [] } + | name { result = [val[0]] } + | names AND name { result = val[0] << val[2] } + + name : word { result = Name.new(:given => val[0]) } + | display_order + | honorific word { result = val[0].merge(:family => val[1]) } + | honorific display_order { result = val[1].merge(val[0]) } + | sort_order + + honorific : APPELLATION { result = Name.new(:appellation => val[0]) } + | TITLE { result = Name.new(:title => val[0]) } + + display_order : u_words word opt_suffices opt_titles + { + result = Name.new(:given => val[0], :family => val[1], + :suffix => val[2], :title => val[3]) + } + | u_words NICK last opt_suffices opt_titles + { + result = Name.new(:given => val[0], :nick => val[1], + :family => val[2], :suffix => val[3], :title => val[4]) + } + | u_words NICK von last opt_suffices opt_titles + { + result = Name.new(:given => val[0], :nick => val[1], + :particle => val[2], :family => val[3], + :suffix => val[4], :title => val[5]) + } + | u_words von last + { + result = Name.new(:given => val[0], :particle => val[1], + :family => val[2]) + } + | von last + { + result = Name.new(:particle => val[0], :family => val[1]) + } + + sort_order : last COMMA first + { + result = Name.new({ :family => val[0], :suffix => val[2][0], + :given => val[2][1] }, !!val[2][0]) + } + | von last COMMA first + { + result = Name.new({ :particle => val[0], :family => val[1], + :suffix => val[3][0], :given => val[3][1] }, !!val[3][0]) + } + | u_words von last COMMA first + { + result = Name.new({ :particle => val[0,2].join(' '), :family => val[2], + :suffix => val[4][0], :given => val[4][1] }, !!val[4][0]) + } + ; + + von : LWORD + | von LWORD { result = val.join(' ') } + | von u_words LWORD { result = val.join(' ') } + + last : LWORD | u_words + + first : opt_words { result = [nil,val[0]] } + | words opt_comma suffices { result = [val[2],val[0]] } + | suffices { result = [val[0],nil] } + | suffices COMMA words { result = [val[0],val[2]] } + + u_words : u_word + | u_words u_word { result = val.join(' ') } + + u_word : UWORD | PWORD + + words : word + | words word { result = val.join(' ') } + + opt_comma : /* empty */ | COMMA + opt_words : /* empty */ | words + + word : LWORD | UWORD | PWORD + + opt_suffices : /* empty */ | suffices + + suffices : SUFFIX + | suffices SUFFIX { result = val.join(' ') } + + opt_titles : /* empty */ | titles + + titles : TITLE + | titles TITLE { result = val.join(' ') } + +---- header +require 'singleton' +require 'strscan' + +---- inner + + include Singleton + + attr_reader :options, :input + + def initialize + @input, @options = StringScanner.new(''), { + :debug => false, + :prefer_comma_as_separator => false, + :comma => ',', + :stops => ',;', + :separator => /\s*(\band\b|\&|;)\s*/i, + :title => /\s*\b(sir|lord|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|prof|dr|md|ph\.?d)\.?)(\s+|$)/i, + :suffix => /\s*\b(JR|Jr|jr|SR|Sr|sr|[IVX]{2,})(\.|\b)/, + :appellation => /\s*\b((mrs?|ms|fr|hr)\.?|miss|herr|frau)(\s+|$)/i + } + end + + def debug? + options[:debug] || ENV['DEBUG'] + end + + def separator + options[:separator] + end + + def comma + options[:comma] + end + + def stops + options[:stops] + end + + def title + options[:title] + end + + def suffix + options[:suffix] + end + + def appellation + options[:appellation] + end + + def prefer_comma_as_separator? + options[:prefer_comma_as_separator] + end + + def parse(input) + parse!(input) + rescue => e + warn e.message if debug? + [] + end + + def parse!(string) + input.string = normalize(string) + reset + do_parse + end + + def normalize(string) + string = string.strip + string + end + + def reset + @commas, @words, @initials, @suffices, @yydebug = 0, 0, 0, 0, debug? + self + end + + private + + def stack + @vstack || @racc_vstack || [] + end + + def last_token + stack[-1] + end + + def consume_separator + return next_token if seen_separator? + @commas, @words, @initials, @suffices = 0, 0, 0, 0 + [:AND, :AND] + end + + def consume_comma + @commas += 1 + [:COMMA, :COMMA] + end + + def consume_word(type, word) + @words += 1 + + case type + when :UWORD + @initials += 1 if word =~ /^[[:upper:]]+\b/ + when :SUFFIX + @suffices += 1 + end + + [type, word] + end + + def seen_separator? + !stack.empty? && last_token == :AND + end + + def suffix? + !@suffices.zero? || will_see_suffix? + end + + def will_see_suffix? + input.peek(8).to_s.strip.split(/\s+/)[0] =~ suffix + end + + def will_see_initial? + input.peek(6).to_s.strip.split(/\s+/)[0] =~ /^[[:upper:]]+\b/ + end + + def seen_full_name? + prefer_comma_as_separator? && @words > 1 && + (@initials > 0 || !will_see_initial?) && !will_see_suffix? + end + + def next_token + case + when input.nil?, input.eos? + nil + when input.scan(separator) + consume_separator + when input.scan(/\s*#{comma}\s*/) + if @commas.zero? && !seen_full_name? || @commas == 1 && suffix? + consume_comma + else + consume_separator + end + when input.scan(/\s+/) + next_token + when input.scan(title) + consume_word(:TITLE, input.matched.strip) + when input.scan(suffix) + consume_word(:SUFFIX, input.matched.strip) + when input.scan(appellation) + [:APPELLATION, input.matched.strip] + when input.scan(/((\\\w+)?\{[^\}]*\})*[[:upper:]][^\s#{stops}]*/) + consume_word(:UWORD, input.matched) + when input.scan(/((\\\w+)?\{[^\}]*\})*[[:lower:]][^\s#{stops}]*/) + consume_word(:LWORD, input.matched) + when input.scan(/(\\\w+)?\{[^\}]*\}[^\s#{stops}]*/) + consume_word(:PWORD, input.matched) + when input.scan(/('[^'\n]+')|("[^"\n]+")/) + consume_word(:NICK, input.matched[1...-1]) + else + raise ArgumentError, + "Failed to parse name #{input.string.inspect}: unmatched data at offset #{input.pos}" + end + end + + def on_error(tid, value, stack) + raise ArgumentError, + "Failed to parse name: unexpected '#{value}' at #{stack.inspect}" + end + +# -*- racc -*- diff --git a/test/regress/namae b/test/regress/namae new file mode 100644 index 00000000..9e58dd73 --- /dev/null +++ b/test/regress/namae @@ -0,0 +1,604 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "namae.y". +# + +require 'racc/parser.rb' + +require 'singleton' +require 'strscan' + +module Namae + class Parser < Racc::Parser + +module_eval(<<'...end namae.y/module_eval...', 'namae.y', 135) + + include Singleton + + attr_reader :options, :input + + def initialize + @input, @options = StringScanner.new(''), { + :debug => false, + :prefer_comma_as_separator => false, + :comma => ',', + :stops => ',;', + :separator => /\s*(\band\b|\&|;)\s*/i, + :title => /\s*\b(sir|lord|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|prof|dr|md|ph\.?d)\.?)(\s+|$)/i, + :suffix => /\s*\b(JR|Jr|jr|SR|Sr|sr|[IVX]{2,})(\.|\b)/, + :appellation => /\s*\b((mrs?|ms|fr|hr)\.?|miss|herr|frau)(\s+|$)/i + } + end + + def debug? + options[:debug] || ENV['DEBUG'] + end + + def separator + options[:separator] + end + + def comma + options[:comma] + end + + def stops + options[:stops] + end + + def title + options[:title] + end + + def suffix + options[:suffix] + end + + def appellation + options[:appellation] + end + + def prefer_comma_as_separator? + options[:prefer_comma_as_separator] + end + + def parse(input) + parse!(input) + rescue => e + warn e.message if debug? + [] + end + + def parse!(string) + input.string = normalize(string) + reset + do_parse + end + + def normalize(string) + string = string.strip + string + end + + def reset + @commas, @words, @initials, @suffices, @yydebug = 0, 0, 0, 0, debug? + self + end + + private + + def stack + @vstack || @racc_vstack || [] + end + + def last_token + stack[-1] + end + + def consume_separator + return next_token if seen_separator? + @commas, @words, @initials, @suffices = 0, 0, 0, 0 + [:AND, :AND] + end + + def consume_comma + @commas += 1 + [:COMMA, :COMMA] + end + + def consume_word(type, word) + @words += 1 + + case type + when :UWORD + @initials += 1 if word =~ /^[[:upper:]]+\b/ + when :SUFFIX + @suffices += 1 + end + + [type, word] + end + + def seen_separator? + !stack.empty? && last_token == :AND + end + + def suffix? + !@suffices.zero? || will_see_suffix? + end + + def will_see_suffix? + input.peek(8).to_s.strip.split(/\s+/)[0] =~ suffix + end + + def will_see_initial? + input.peek(6).to_s.strip.split(/\s+/)[0] =~ /^[[:upper:]]+\b/ + end + + def seen_full_name? + prefer_comma_as_separator? && @words > 1 && + (@initials > 0 || !will_see_initial?) && !will_see_suffix? + end + + def next_token + case + when input.nil?, input.eos? + nil + when input.scan(separator) + consume_separator + when input.scan(/\s*#{comma}\s*/) + if @commas.zero? && !seen_full_name? || @commas == 1 && suffix? + consume_comma + else + consume_separator + end + when input.scan(/\s+/) + next_token + when input.scan(title) + consume_word(:TITLE, input.matched.strip) + when input.scan(suffix) + consume_word(:SUFFIX, input.matched.strip) + when input.scan(appellation) + [:APPELLATION, input.matched.strip] + when input.scan(/((\\\w+)?\{[^\}]*\})*[[:upper:]][^\s#{stops}]*/) + consume_word(:UWORD, input.matched) + when input.scan(/((\\\w+)?\{[^\}]*\})*[[:lower:]][^\s#{stops}]*/) + consume_word(:LWORD, input.matched) + when input.scan(/(\\\w+)?\{[^\}]*\}[^\s#{stops}]*/) + consume_word(:PWORD, input.matched) + when input.scan(/('[^'\n]+')|("[^"\n]+")/) + consume_word(:NICK, input.matched[1...-1]) + else + raise ArgumentError, + "Failed to parse name #{input.string.inspect}: unmatched data at offset #{input.pos}" + end + end + + def on_error(tid, value, stack) + raise ArgumentError, + "Failed to parse name: unexpected '#{value}' at #{stack.inspect}" + end + +# -*- racc -*- +...end namae.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [-39, 16, 32, 30, -40, 31, 33, -39, 17, -39, -39, -40, 67, -40, -40, 66, 53, 52, 54, -38, 59, -22, 39, -34, 45, 58, - +38, 53, 52, 54, 53, 52, 54, 59, 39, 39, 62, 39, 53, 52, 54, +14, 12, 15, 68, 39, 7, 8, 14, 12, 15, 58, 39, 7, 8, 14, +22, 15, 24, 14, 22, 15, 24, 14, 22, 15, 30, 28, 31, 30, 28, +31, -19, -19, -19, 30, 42, 31, 30, 28, 31, -20, -20, -20, 30, 46, 31, 30, 28, 31, 30, 28, 31, -19, -19, -19, 53, 52, 54, 53, 52, 54, 39, 58, 59] + +racc_action_check = [ +14, 1, 11, 43, 15, 43, 16, 14, 1, 14, 14, 15, 50, 15, 15, +49, 49, 49, 49, 12, 50, 12, 23, 49, 27, 37, 12, 32, 32, 32, +45, 45, 45, 38, 32, 40, 44, 45, 62, 62, 62, 0, 0, 0, 57, +62, 0, 0, 17, 17, 17, 60, 61, 17, 17, 9, 9, 9, 9, 20, +20, 20, 20, 5, 5, 5, 10, 10, 10, 21, 21, 21, 22, 22, 22, +24, 24, 24, 25, 25, 25, 28, 28, 28, 29, 29, 29, 35, 35, 35, +41, 41, 41, 42, 42, 42, 67, 67, 67, 73, 73, 73, 64, 70, 72] + +racc_action_pointer = [ +38, 1, nil, nil, nil, 60, nil, nil, nil, 52, 63, 0, 19, nil, 0, +4, 6, 45, nil, nil, 56, 66, 69, 12, 72, 75, nil, 22, 78, 81, +nil, nil, 24, nil, nil, 84, nil, 16, 23, nil, 25, 87, 90, 0, 34, +27, nil, nil, nil, 13, 10, nil, nil, nil, nil, nil, nil, 35, nil, nil, +42, 42, 35, nil, 92, nil, nil, 93, nil, nil, 94, nil, 94, 96, nil] + +racc_action_default = [-1, -49, -2, -4, -5, -49, -8, -9, -10, -23, -49, -49, -19, -28, -30, -31, -49, -49, -6, -7, -49, -49, -38, -41, -49, -49, -29, -15, -22, -23, -30, -31, -36, 75, -3, -49, -15, -45, -42, -43, -41, -49, -22, -23, -14, -36, -21, -16, -24, -37, -26, -32, -38, -39, -40, -14, -11, -46, -47, -44, -45, -41, -36, -17, -49, -33, -35, -49, -48, -12, -45, -18, -25, -27, -13] + +racc_goto_table = [ +3, 37, 26, 50, 56, 18, 2, 9, 47, 23, 1, 19, 20, 26, 73, +27, 50, 3, 60, 64, 23, 63, 26, 34, 9, nil, 36, 69, 21, 40, +44, 43, 25, 50, nil, 72, 26, 74, 71, 70, 55, nil, nil, 35, nil, +nil, 61, 41, nil, 65, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 65] + +racc_goto_check = [ +3, 8, 17, 16, 9, 3, 2, 7, 12, 3, 1, 4, 7, 17, 14, +10, 16, 3, 8, 15, 3, 12, 17, 2, 7, nil, 10, 9, 11, 10, +10, 7, 11, 16, nil, 16, 17, 9, 12, 8, 10, nil, nil, 11, nil, +nil, 10, 11, nil, 3, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 3] + +racc_goto_pointer = [nil, 10, 6, 0, 6, nil, nil, 7, -22, -33, 5, 23, -24, nil, -53, -30, -29, -7, nil] + +racc_goto_default = [ +nil, nil, nil, 51, 4, 5, 6, 29, nil, nil, 11, 10, nil, 48, 49, +nil, 38, 13, 57] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 12, :_reduce_1, + 1, 12, :_reduce_2, + 3, 12, :_reduce_3, + 1, 13, :_reduce_4, + 1, 13, :_reduce_none, + 2, 13, :_reduce_6, + 2, 13, :_reduce_7, + 1, 13, :_reduce_none, + 1, 16, :_reduce_9, + 1, 16, :_reduce_10, + 4, 15, :_reduce_11, + 5, 15, :_reduce_12, + 6, 15, :_reduce_13, + 3, 15, :_reduce_14, + 2, 15, :_reduce_15, + 3, 17, :_reduce_16, + 4, 17, :_reduce_17, + 5, 17, :_reduce_18, + 1, 22, :_reduce_none, + 2, 22, :_reduce_20, + 3, 22, :_reduce_21, + 1, 21, :_reduce_none, + 1, 21, :_reduce_none, + 1, 23, :_reduce_24, + 3, 23, :_reduce_25, + 1, 23, :_reduce_26, + 3, 23, :_reduce_27, + 1, 18, :_reduce_none, + 2, 18, :_reduce_29, + 1, 28, :_reduce_none, + 1, 28, :_reduce_none, + 1, 25, :_reduce_none, + 2, 25, :_reduce_33, + 0, 26, :_reduce_none, + 1, 26, :_reduce_none, + 0, 24, :_reduce_none, + 1, 24, :_reduce_none, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 1, 14, :_reduce_none, + 0, 19, :_reduce_none, + 1, 19, :_reduce_none, + 1, 27, :_reduce_none, + 2, 27, :_reduce_44, + 0, 20, :_reduce_none, + 1, 20, :_reduce_none, + 1, 29, :_reduce_none, + 2, 29, :_reduce_48 ] + +racc_reduce_n = 49 + +racc_shift_n = 75 + +racc_token_table = { + false => 0, + :error => 1, + :COMMA => 2, + :UWORD => 3, + :LWORD => 4, + :PWORD => 5, + :NICK => 6, + :AND => 7, + :APPELLATION => 8, + :TITLE => 9, + :SUFFIX => 10 } + +racc_nt_base = 11 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "COMMA", + "UWORD", + "LWORD", + "PWORD", + "NICK", + "AND", + "APPELLATION", + "TITLE", + "SUFFIX", + "$start", + "names", + "name", + "word", + "display_order", + "honorific", + "sort_order", + "u_words", + "opt_suffices", + "opt_titles", + "last", + "von", + "first", + "opt_words", + "words", + "opt_comma", + "suffices", + "u_word", + "titles" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'namae.y', 39) + def _reduce_1(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 40) + def _reduce_2(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 41) + def _reduce_3(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 43) + def _reduce_4(val, _values, result) + result = Name.new(:given => val[0]) + result + end +.,., + +# reduce 5 omitted + +module_eval(<<'.,.,', 'namae.y', 45) + def _reduce_6(val, _values, result) + result = val[0].merge(:family => val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 46) + def _reduce_7(val, _values, result) + result = val[1].merge(val[0]) + result + end +.,., + +# reduce 8 omitted + +module_eval(<<'.,.,', 'namae.y', 49) + def _reduce_9(val, _values, result) + result = Name.new(:appellation => val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 50) + def _reduce_10(val, _values, result) + result = Name.new(:title => val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 54) + def _reduce_11(val, _values, result) + result = Name.new(:given => val[0], :family => val[1], + :suffix => val[2], :title => val[3]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 59) + def _reduce_12(val, _values, result) + result = Name.new(:given => val[0], :nick => val[1], + :family => val[2], :suffix => val[3], :title => val[4]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 64) + def _reduce_13(val, _values, result) + result = Name.new(:given => val[0], :nick => val[1], + :particle => val[2], :family => val[3], + :suffix => val[4], :title => val[5]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 70) + def _reduce_14(val, _values, result) + result = Name.new(:given => val[0], :particle => val[1], + :family => val[2]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 75) + def _reduce_15(val, _values, result) + result = Name.new(:particle => val[0], :family => val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 80) + def _reduce_16(val, _values, result) + result = Name.new({ :family => val[0], :suffix => val[2][0], + :given => val[2][1] }, !!val[2][0]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 85) + def _reduce_17(val, _values, result) + result = Name.new({ :particle => val[0], :family => val[1], + :suffix => val[3][0], :given => val[3][1] }, !!val[3][0]) + + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 90) + def _reduce_18(val, _values, result) + result = Name.new({ :particle => val[0,2].join(' '), :family => val[2], + :suffix => val[4][0], :given => val[4][1] }, !!val[4][0]) + + result + end +.,., + +# reduce 19 omitted + +module_eval(<<'.,.,', 'namae.y', 96) + def _reduce_20(val, _values, result) + result = val.join(' ') + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 97) + def _reduce_21(val, _values, result) + result = val.join(' ') + result + end +.,., + +# reduce 22 omitted + +# reduce 23 omitted + +module_eval(<<'.,.,', 'namae.y', 101) + def _reduce_24(val, _values, result) + result = [nil,val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 102) + def _reduce_25(val, _values, result) + result = [val[2],val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 103) + def _reduce_26(val, _values, result) + result = [val[0],nil] + result + end +.,., + +module_eval(<<'.,.,', 'namae.y', 104) + def _reduce_27(val, _values, result) + result = [val[0],val[2]] + result + end +.,., + +# reduce 28 omitted + +module_eval(<<'.,.,', 'namae.y', 107) + def _reduce_29(val, _values, result) + result = val.join(' ') + result + end +.,., + +# reduce 30 omitted + +# reduce 31 omitted + +# reduce 32 omitted + +module_eval(<<'.,.,', 'namae.y', 112) + def _reduce_33(val, _values, result) + result = val.join(' ') + result + end +.,., + +# reduce 34 omitted + +# reduce 35 omitted + +# reduce 36 omitted + +# reduce 37 omitted + +# reduce 38 omitted + +# reduce 39 omitted + +# reduce 40 omitted + +# reduce 41 omitted + +# reduce 42 omitted + +# reduce 43 omitted + +module_eval(<<'.,.,', 'namae.y', 122) + def _reduce_44(val, _values, result) + result = val.join(' ') + result + end +.,., + +# reduce 45 omitted + +# reduce 46 omitted + +# reduce 47 omitted + +module_eval(<<'.,.,', 'namae.y', 127) + def _reduce_48(val, _values, result) + result = val.join(' ') + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Namae diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 7d60b9e5..ba384099 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -213,5 +213,13 @@ def test_edtf assert_debugfile 'edtf.y', [0, 0, 0, 0, 0] assert_output 'edtf.y' end + + # .y file from namae gem + + def test_namae + assert_compile 'namae.y' + assert_debugfile 'namae.y', [0, 0, 0, 0, 0] + assert_output 'namae.y' + end end end From 75faa53aaba459e3ae7df77b29cdee6765e16a38 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 15:33:35 +0200 Subject: [PATCH 095/619] Add regression test based on parser.racc from liquor gem This was authored by Peter Zotov, who contributed the ruby18 and ruby22 test cases. --- Manifest.txt | 2 + test/assets/liquor.y | 313 +++++++++++++++ test/regress/liquor | 819 ++++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 1142 insertions(+) create mode 100644 test/assets/liquor.y create mode 100644 test/regress/liquor diff --git a/Manifest.txt b/Manifest.txt index c01e2499..f7f87d71 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -67,6 +67,7 @@ test/assets/firstline.y test/assets/ichk.y test/assets/intp.y test/assets/journey.y +test/assets/liquor.y test/assets/macruby.y test/assets/mailp.y test/assets/namae.y @@ -100,6 +101,7 @@ test/regress/bibtex test/regress/csspool test/regress/edtf test/regress/journey +test/regress/liquor test/regress/namae test/regress/nokogiri-css test/regress/opal diff --git a/test/assets/liquor.y b/test/assets/liquor.y new file mode 100644 index 00000000..8045a072 --- /dev/null +++ b/test/assets/liquor.y @@ -0,0 +1,313 @@ +# Copyright (c) 2012-2013 Peter Zotov +# 2012 Yaroslav Markin +# 2012 Nate Gadgibalaev +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Liquor::Parser + token comma dot endtag ident integer keyword lblock lblock2 lbracket + linterp lparen op_div op_eq op_gt op_geq op_lt op_leq op_minus + op_mod op_mul op_neq op_not op_plus pipe plaintext rblock + rbracket rinterp rparen string tag_ident + + prechigh + left dot + nonassoc op_uminus op_not + left op_mul op_div op_mod + left op_plus op_minus + left op_eq op_neq op_lt op_leq op_gt op_geq + left op_and + left op_or + preclow + + expect 15 + + start block + +rule + block: /* empty */ + { result = [] } + | plaintext block + { result = [ val[0], *val[1] ] } + | interp block + { result = [ val[0], *val[1] ] } + | tag block + { result = [ val[0], *val[1] ] } + + interp: + linterp expr rinterp + { result = [ :interp, retag(val), val[1] ] } + | linterp filter_chain rinterp + { result = [ :interp, retag(val), val[1] ] } + + primary_expr: + ident + | lparen expr rparen + { result = [ val[1][0], retag(val), *val[1][2..-1] ] } + + expr: + integer + | string + | tuple + | ident function_args + { result = [ :call, retag(val), val[0], val[1] ] } + | expr lbracket expr rbracket + { result = [ :index, retag(val), val[0], val[2] ] } + | expr dot ident function_args + { result = [ :external, retag(val), val[0], val[2], val[3] ] } + | expr dot ident + { result = [ :external, retag(val), val[0], val[2], nil ] } + | op_minus expr =op_uminus + { result = [ :uminus, retag(val), val[1] ] } + | op_not expr + { result = [ :not, retag(val), val[1] ] } + | expr op_mul expr + { result = [ :mul, retag(val), val[0], val[2] ] } + | expr op_div expr + { result = [ :div, retag(val), val[0], val[2] ] } + | expr op_mod expr + { result = [ :mod, retag(val), val[0], val[2] ] } + | expr op_plus expr + { result = [ :plus, retag(val), val[0], val[2] ] } + | expr op_minus expr + { result = [ :minus, retag(val), val[0], val[2] ] } + | expr op_eq expr + { result = [ :eq, retag(val), val[0], val[2] ] } + | expr op_neq expr + { result = [ :neq, retag(val), val[0], val[2] ] } + | expr op_lt expr + { result = [ :lt, retag(val), val[0], val[2] ] } + | expr op_leq expr + { result = [ :leq, retag(val), val[0], val[2] ] } + | expr op_gt expr + { result = [ :gt, retag(val), val[0], val[2] ] } + | expr op_geq expr + { result = [ :geq, retag(val), val[0], val[2] ] } + | expr op_and expr + { result = [ :and, retag(val), val[0], val[2] ] } + | expr op_or expr + { result = [ :or, retag(val), val[0], val[2] ] } + | primary_expr + + tuple: + lbracket tuple_content rbracket + { result = [ :tuple, retag(val), val[1].compact ] } + + tuple_content: + expr comma tuple_content + { result = [ val[0], *val[2] ] } + | expr + { result = [ val[0] ] } + | /* empty */ + { result = [ ] } + + function_args: + lparen function_args_inside rparen + { result = [ :args, retag(val), *val[1] ] } + + function_args_inside: + expr function_keywords + { result = [ val[0], val[1][2] ] } + | function_keywords + { result = [ nil, val[0][2] ] } + + function_keywords: + keyword expr function_keywords + { name = val[0][2].to_sym + tail = val[2][2] + loc = retag([ val[0], val[1] ]) + + if tail.include? name + @errors << SyntaxError.new("duplicate keyword argument `#{val[0][2]}'", + tail[name][1]) + end + + hash = { + name => [ val[1][0], loc, *val[1][2..-1] ] + }.merge(tail) + + result = [ :keywords, retag([ loc, val[2] ]), hash ] + } + | /* empty */ + { result = [ :keywords, nil, {} ] } + + filter_chain: + expr pipe filter_chain_cont + { result = [ val[0], *val[2] ]. + reduce { |tree, node| node[3][2] = tree; node } + } + + filter_chain_cont: + filter_call pipe filter_chain_cont + { result = [ val[0], *val[2] ] } + | filter_call + { result = [ val[0] ] } + + filter_call: + ident function_keywords + { ident_loc = val[0][1] + empty_args_loc = { line: ident_loc[:line], + start: ident_loc[:end] + 1, + end: ident_loc[:end] + 1, } + result = [ :call, val[0][1], val[0], + [ :args, val[1][1] || empty_args_loc, nil, val[1][2] ] ] + } + + tag: + lblock ident expr tag_first_cont + { result = [ :tag, retag(val), val[1], val[2], *reduce_tag_args(val[3][2]) ] } + | lblock ident tag_first_cont + { result = [ :tag, retag(val), val[1], nil, *reduce_tag_args(val[2][2]) ] } + + # Racc cannot do lookahead across rules. I had to add states + # explicitly to avoid S/R conflicts. You are not expected to + # understand this. + + tag_first_cont: + rblock + { result = [ :cont, retag(val), [] ] } + | keyword tag_first_cont2 + { result = [ :cont, retag(val), [ val[0], *val[1][2] ] ] } + + tag_first_cont2: + rblock block lblock2 tag_next_cont + { result = [ :cont2, val[0][1], [ [:block, val[0][1], val[1] ], *val[3] ] ] } + | expr tag_first_cont + { result = [ :cont2, retag(val), [ val[0], *val[1][2] ] ] } + + tag_next_cont: + endtag rblock + { result = [] } + | keyword tag_next_cont2 + { result = [ val[0], *val[1] ] } + + tag_next_cont2: + rblock block lblock2 tag_next_cont + { result = [ [:block, val[0][1], val[1] ], *val[3] ] } + | expr keyword tag_next_cont3 + { result = [ val[0], val[1], *val[2] ] } + + tag_next_cont3: + rblock block lblock2 tag_next_cont + { result = [ [:block, val[0][1], val[1] ], *val[3] ] } + | expr tag_next_cont + { result = [ val[0], *val[1] ] } + +---- inner + attr_reader :errors, :ast + + def initialize(tags={}) + super() + + @errors = [] + @ast = nil + @tags = tags + end + + def success? + @errors.empty? + end + + def parse(string, name='(code)') + @errors.clear + @name = name + @ast = nil + + begin + @stream = Lexer.lex(string, @name, @tags) + @ast = do_parse + rescue Liquor::SyntaxError => e + @errors << e + end + + success? + end + + def next_token + tok = @stream.shift + [ tok[0], tok ] if tok + end + + TOKEN_NAME_MAP = { + :comma => ',', + :dot => '.', + :lblock => '{%', + :rblock => '%}', + :linterp => '{{', + :rinterp => '}}', + :lbracket => '[', + :rbracket => ']', + :lparen => '(', + :rparen => ')', + :pipe => '|', + :op_not => '!', + :op_mul => '*', + :op_div => '/', + :op_mod => '%', + :op_plus => '+', + :op_minus => '-', + :op_eq => '==', + :op_neq => '!=', + :op_lt => '<', + :op_leq => '<=', + :op_gt => '>', + :op_geq => '>=', + :keyword => 'keyword argument name', + :kwarg => 'keyword argument', + :ident => 'identifier', + } + + def on_error(error_token_id, error_token, value_stack) + if token_to_str(error_token_id) == "$end" + raise Liquor::SyntaxError.new("unexpected end of program", { + file: @name + }) + else + type, (loc, value) = error_token + type = TOKEN_NAME_MAP[type] || type + + raise Liquor::SyntaxError.new("unexpected token `#{type}'", loc) + end + end + + def retag(nodes) + loc = nodes.map { |node| node[1] }.compact + first, *, last = loc + return first if last.nil? + + { + file: first[:file], + line: first[:line], + start: first[:start], + end: last[:end], + } + end + + def reduce_tag_args(list) + list.each_slice(2).reduce([]) { |args, (k, v)| + if v[0] == :block + args << [ :blockarg, retag([ k, v ]), k, v[2] || [] ] + else + args << [ :kwarg, retag([ k, v ]), k, v ] + end + } + end \ No newline at end of file diff --git a/test/regress/liquor b/test/regress/liquor new file mode 100644 index 00000000..8b16f3bd --- /dev/null +++ b/test/regress/liquor @@ -0,0 +1,819 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "liquor.y". +# + +require 'racc/parser.rb' +module Liquor + class Parser < Racc::Parser + +module_eval(<<'...end liquor.y/module_eval...', 'liquor.y', 216) + attr_reader :errors, :ast + + def initialize(tags={}) + super() + + @errors = [] + @ast = nil + @tags = tags + end + + def success? + @errors.empty? + end + + def parse(string, name='(code)') + @errors.clear + @name = name + @ast = nil + + begin + @stream = Lexer.lex(string, @name, @tags) + @ast = do_parse + rescue Liquor::SyntaxError => e + @errors << e + end + + success? + end + + def next_token + tok = @stream.shift + [ tok[0], tok ] if tok + end + + TOKEN_NAME_MAP = { + :comma => ',', + :dot => '.', + :lblock => '{%', + :rblock => '%}', + :linterp => '{{', + :rinterp => '}}', + :lbracket => '[', + :rbracket => ']', + :lparen => '(', + :rparen => ')', + :pipe => '|', + :op_not => '!', + :op_mul => '*', + :op_div => '/', + :op_mod => '%', + :op_plus => '+', + :op_minus => '-', + :op_eq => '==', + :op_neq => '!=', + :op_lt => '<', + :op_leq => '<=', + :op_gt => '>', + :op_geq => '>=', + :keyword => 'keyword argument name', + :kwarg => 'keyword argument', + :ident => 'identifier', + } + + def on_error(error_token_id, error_token, value_stack) + if token_to_str(error_token_id) == "$end" + raise Liquor::SyntaxError.new("unexpected end of program", { + file: @name + }) + else + type, (loc, value) = error_token + type = TOKEN_NAME_MAP[type] || type + + raise Liquor::SyntaxError.new("unexpected token `#{type}'", loc) + end + end + + def retag(nodes) + loc = nodes.map { |node| node[1] }.compact + first, *, last = loc + return first if last.nil? + + { + file: first[:file], + line: first[:line], + start: first[:start], + end: last[:end], + } + end + + def reduce_tag_args(list) + list.each_slice(2).reduce([]) { |args, (k, v)| + if v[0] == :block + args << [ :blockarg, retag([ k, v ]), k, v[2] || [] ] + else + args << [ :kwarg, retag([ k, v ]), k, v ] + end + } + end +...end liquor.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +76, 26, 26, 6, 7, 22, 5, 6, 25, 25, 5, 28, 32, 36, 37, +34, 35, 31, 29, 27, 33, 2, 30, 26, 26, 2, 6, 23, 41, 5, +25, 25, 38, 39, 28, 32, 36, 37, 34, 35, 31, 29, 27, 33, 2, +30, 40, 26, 96, 6, 24, 97, 5, 43, 25, 38, 39, 28, 32, 36, +37, 34, 35, 31, 29, 27, 33, 2, 30, 26, 54, 70, 77, 26, 75, +26, 25, 52, 38, 39, 25, 43, 25, 28, 32, 36, 37, 34, 35, 31, +29, 27, 33, 26, 30, 84, 26, 51, 6, 96, 25, 5, 97, 25, 38, +39, 28, 32, 36, 37, 34, 35, 31, 29, 27, 33, 2, 30, 74, 26, +87, 82, 96, 74, 70, 97, 25, 38, 39, 28, 32, 36, 37, 34, 35, +31, 29, 27, 33, 94, 30, 98, 26, 107, 6, 111, 52, 5, nil, 25, +38, 39, 28, 32, 36, 37, 34, 35, 31, 29, 27, 33, 2, 30, nil, +26, 51, 6, nil, 74, 5, nil, 25, 38, 39, 28, 32, 36, 37, 34, +35, 31, 29, 27, 33, 2, 30, nil, 26, nil, nil, nil, 102, nil, nil, +25, 38, 39, 28, 32, 36, 37, 34, 35, 31, 29, 27, 33, nil, 30, +nil, 26, 96, nil, nil, 97, nil, nil, 25, 38, 39, 28, 32, 36, 37, +34, 35, 31, 29, 27, 33, nil, 30, nil, 26, nil, nil, nil, nil, nil, +nil, 25, 38, 39, 28, 32, 36, 37, 34, 35, 31, 29, 27, 33, nil, +30, 13, 15, nil, 13, 15, 21, nil, 14, 21, 38, 14, nil, nil, nil, +18, nil, nil, 18, 19, nil, nil, 19, nil, 13, 15, nil, 16, nil, 21, +16, 14, nil, nil, 13, 15, nil, nil, 18, 21, nil, 14, 19, nil, 13, +15, nil, nil, 18, 21, 16, 14, 19, nil, 13, 15, 52, nil, 18, 21, +16, 14, 19, nil, 13, 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, +15, 51, nil, 18, 21, 16, 14, 19, nil, 13, 15, nil, nil, 18, 21, +16, 14, 19, nil, 13, 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, +15, nil, nil, 18, 21, 16, 14, 19, nil, 13, 15, nil, nil, 18, 21, +16, 14, 19, nil, 13, 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, +15, nil, nil, 18, 21, 16, 14, 19, nil, 13, 15, nil, nil, 18, 21, +16, 14, 19, nil, 13, 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, +15, nil, nil, 18, 21, 16, 14, 19, nil, 13, 15, nil, nil, 18, 21, +16, 14, 19, nil, 13, 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, +15, nil, nil, 18, 21, 16, 14, 19, nil, 13, 15, 74, nil, 18, 21, +16, 14, 19, nil, 13, 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, +15, nil, nil, 18, 21, 16, 14, 19, nil, 13, 15, 81, nil, 18, 21, +16, 14, 19, nil, 13, 15, nil, nil, 18, 21, 16, 14, 19, nil, 13, +15, nil, 26, 18, 21, 16, 14, 19, nil, 25, nil, 101, 28, 18, nil, +16, nil, 19, 31, 29, 27, 106, 26, 30, nil, 16, nil, nil, nil, 25, +nil, nil, 28, nil, 26, nil, nil, nil, 31, 29, 27, 25, nil, 30, 28, +nil, 26, nil, nil, nil, 31, 29, 27, 25, nil, 30, 28, nil, 26, nil, +nil, nil, 31, 29, 27, 25, nil, 30, 28, nil, 26, nil, nil, nil, 31, +29, 27, 25, nil, 30, 28, nil, 26, nil, nil, nil, 31, 29, 27, 25, +nil, 30, 28, 32, 36, 37, 34, 35, 31, 29, 27, 33, 26, 30, 26, +nil, nil, nil, nil, 25, nil, 25, 28, nil, 28, nil, nil, nil, nil, 29, +27, 29, 27] + +racc_action_check = [ +47, 47, 45, 0, 1, 6, 0, 2, 47, 45, 2, 47, 47, 47, 47, +47, 47, 47, 47, 47, 47, 0, 47, 46, 11, 2, 3, 7, 12, 3, +46, 11, 47, 47, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 3, +11, 11, 44, 94, 4, 11, 94, 4, 13, 44, 11, 11, 44, 44, 44, +44, 44, 44, 44, 44, 44, 44, 4, 44, 55, 26, 40, 48, 49, 44, +56, 55, 49, 44, 44, 49, 54, 56, 49, 49, 49, 49, 49, 49, 49, +49, 49, 49, 57, 49, 69, 53, 49, 81, 107, 57, 81, 107, 53, 49, +49, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 81, 53, 70, 71, +72, 53, 111, 71, 84, 111, 71, 53, 53, 71, 71, 71, 71, 71, 71, +71, 71, 71, 71, 91, 71, 96, 79, 103, 101, 109, 79, 101, nil, 79, +71, 71, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 101, 79, nil, +88, 79, 106, nil, 88, 106, nil, 88, 79, 79, 88, 88, 88, 88, 88, +88, 88, 88, 88, 88, 106, 88, nil, 99, nil, nil, nil, 99, nil, nil, +99, 88, 88, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, nil, 99, +nil, 104, 104, nil, nil, 104, nil, nil, 104, 99, 99, 104, 104, 104, 104, +104, 104, 104, 104, 104, 104, nil, 104, nil, 67, nil, nil, nil, nil, nil, +nil, 67, 104, 104, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, nil, +67, 5, 5, nil, 14, 14, 5, nil, 5, 14, 67, 14, nil, nil, nil, +5, nil, nil, 14, 5, nil, nil, 14, nil, 18, 18, nil, 5, nil, 18, +14, 18, nil, nil, 19, 19, nil, nil, 18, 19, nil, 19, 18, nil, 21, +21, nil, nil, 19, 21, 18, 21, 19, nil, 22, 22, 22, nil, 21, 22, +19, 22, 21, nil, 25, 25, nil, nil, 22, 25, 21, 25, 22, nil, 27, +27, 22, nil, 25, 27, 22, 27, 25, nil, 28, 28, nil, nil, 27, 28, +25, 28, 27, nil, 29, 29, nil, nil, 28, 29, 27, 29, 28, nil, 30, +30, nil, nil, 29, 30, 28, 30, 29, nil, 31, 31, nil, nil, 30, 31, +29, 31, 30, nil, 32, 32, nil, nil, 31, 32, 30, 32, 31, nil, 33, +33, nil, nil, 32, 33, 31, 33, 32, nil, 34, 34, nil, nil, 33, 34, +32, 34, 33, nil, 35, 35, nil, nil, 34, 35, 33, 35, 34, nil, 36, +36, nil, nil, 35, 36, 34, 36, 35, nil, 37, 37, nil, nil, 36, 37, +35, 37, 36, nil, 38, 38, nil, nil, 37, 38, 36, 38, 37, nil, 39, +39, nil, nil, 38, 39, 37, 39, 38, nil, 43, 43, 43, nil, 39, 43, +38, 43, 39, nil, 52, 52, nil, nil, 43, 52, 39, 52, 43, nil, 74, +74, nil, nil, 52, 74, 43, 74, 52, nil, 76, 76, 52, nil, 74, 76, +52, 76, 74, nil, 97, 97, nil, nil, 76, 97, 74, 97, 76, nil, 102, +102, nil, 60, 97, 102, 76, 102, 97, nil, 60, nil, 97, 60, 102, nil, +97, nil, 102, 60, 60, 60, 102, 61, 60, nil, 102, nil, nil, nil, 61, +nil, nil, 61, nil, 62, nil, nil, nil, 61, 61, 61, 62, nil, 61, 62, +nil, 63, nil, nil, nil, 62, 62, 62, 63, nil, 62, 63, nil, 64, nil, +nil, nil, 63, 63, 63, 64, nil, 63, 64, nil, 65, nil, nil, nil, 64, +64, 64, 65, nil, 64, 65, nil, 66, nil, nil, nil, 65, 65, 65, 66, +nil, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 58, 66, 59, +nil, nil, nil, nil, 58, nil, 59, 58, nil, 59, nil, nil, nil, nil, 58, +58, 59, 59] + +racc_action_pointer = [-5, 4, -1, 18, 41, 251, 0, 27, nil, nil, nil, 21, - +1, 41, 254, nil, nil, nil, 274, 284, nil, 294, 304, nil, nil, 314, 65, +324, 334, 344, 354, 364, 374, 384, 394, 404, 414, 424, 434, 444, 66, nil, +nil, 454, 44, -1, 20, - +2, 44, 70, nil, nil, 464, 93, 69, 66, 72, 90, 609, 611, 509, 529, +541, 553, 565, 577, 589, 231, nil, 70, 111, 116, 90, nil, 474, nil, 484, +nil, nil, 139, nil, 90, nil, nil, 119, nil, nil, nil, 162, nil, nil, 130, +nil, nil, 44, nil, 114, 494, nil, 185, nil, 136, 504, 134, 208, nil, 159, +95, nil, 136, nil, 118, nil] + +racc_action_default = [-1, -57, -1, -1, -1, -57, -57, -57, -2, -3, -4, -57, -57, -7, -57, -9, -10, -11, -57, -57, -31, -35, -57, 113, -5, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -6, -12, -40, -57, -16, -17, -34, -57, -57, -46, -47, -57, -57, -15, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -41, -43, -40, -40, -57, -38, -57, -8, -35, -32, -45, -57, -48, -1, -13, -14, -57, -44, -37, -36, -40, -33, -50, -57, -42, -39, -57, -49, -57, -57, -51, -57, -52, -1, -57, -57, -57, -54, -1, -57, -56, -57, -53, -57, -55] + +racc_goto_table = [ +1, 11, 8, 9, 10, 48, 68, 12, 42, 50, 44, 72, 80, 73, 45, +46, 100, 105, 49, nil, nil, 53, nil, 55, 56, 57, 58, 59, 60, 61, +62, 63, 64, 65, 66, 67, 78, nil, nil, 71, 85, 86, 95, nil, nil, +nil, nil, nil, 79, 83, 92, nil, 108, nil, nil, 110, nil, nil, 93, 112, +89, nil, nil, nil, nil, nil, 90, nil, nil, nil, 88, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 91, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 99, nil, nil, nil, nil, 104, nil, nil, 103, nil, nil, nil, +nil, 109] + +racc_goto_check = [ +1, 4, 1, 1, 1, 9, 12, 5, 8, 14, 4, 10, 15, 11, 4, +4, 17, 18, 4, nil, nil, 4, nil, 4, 4, 4, 4, 4, 4, 4, +4, 4, 4, 4, 4, 4, 14, nil, nil, 4, 11, 11, 16, nil, nil, +nil, nil, nil, 4, 8, 12, nil, 16, nil, nil, 16, nil, nil, 11, 16, +9, nil, nil, nil, nil, nil, 14, nil, nil, nil, 4, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 1, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 4, nil, nil, nil, nil, 4, nil, nil, 1, nil, nil, nil, +nil, 1] + +racc_goto_pointer = [nil, 0, nil, nil, -4, 2, nil, nil, -5, -16, -32, -30, -34, nil, -13, -40, -52, -81, -85] + +racc_goto_default = [ +nil, nil, 3, 4, 47, nil, 20, 17, nil, nil, nil, nil, nil, 69, nil, +nil, nil, nil, nil] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 37, :_reduce_1, + 2, 37, :_reduce_2, + 2, 37, :_reduce_3, + 2, 37, :_reduce_4, + 3, 38, :_reduce_5, + 3, 38, :_reduce_6, + 1, 42, :_reduce_none, + 3, 42, :_reduce_8, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 1, 40, :_reduce_none, + 2, 40, :_reduce_12, + 4, 40, :_reduce_13, + 4, 40, :_reduce_14, + 3, 40, :_reduce_15, + 2, 40, :_reduce_16, + 2, 40, :_reduce_17, + 3, 40, :_reduce_18, + 3, 40, :_reduce_19, + 3, 40, :_reduce_20, + 3, 40, :_reduce_21, + 3, 40, :_reduce_22, + 3, 40, :_reduce_23, + 3, 40, :_reduce_24, + 3, 40, :_reduce_25, + 3, 40, :_reduce_26, + 3, 40, :_reduce_27, + 3, 40, :_reduce_28, + 3, 40, :_reduce_29, + 3, 40, :_reduce_30, + 1, 40, :_reduce_none, + 3, 43, :_reduce_32, + 3, 45, :_reduce_33, + 1, 45, :_reduce_34, + 0, 45, :_reduce_35, + 3, 44, :_reduce_36, + 2, 46, :_reduce_37, + 1, 46, :_reduce_38, + 3, 47, :_reduce_39, + 0, 47, :_reduce_40, + 3, 41, :_reduce_41, + 3, 48, :_reduce_42, + 1, 48, :_reduce_43, + 2, 49, :_reduce_44, + 4, 39, :_reduce_45, + 3, 39, :_reduce_46, + 1, 50, :_reduce_47, + 2, 50, :_reduce_48, + 4, 51, :_reduce_49, + 2, 51, :_reduce_50, + 2, 52, :_reduce_51, + 2, 52, :_reduce_52, + 4, 53, :_reduce_53, + 3, 53, :_reduce_54, + 4, 54, :_reduce_55, + 2, 54, :_reduce_56 ] + +racc_reduce_n = 57 + +racc_shift_n = 113 + +racc_token_table = { + false => 0, + :error => 1, + :comma => 2, + :dot => 3, + :endtag => 4, + :ident => 5, + :integer => 6, + :keyword => 7, + :lblock => 8, + :lblock2 => 9, + :lbracket => 10, + :linterp => 11, + :lparen => 12, + :op_div => 13, + :op_eq => 14, + :op_gt => 15, + :op_geq => 16, + :op_lt => 17, + :op_leq => 18, + :op_minus => 19, + :op_mod => 20, + :op_mul => 21, + :op_neq => 22, + :op_not => 23, + :op_plus => 24, + :pipe => 25, + :plaintext => 26, + :rblock => 27, + :rbracket => 28, + :rinterp => 29, + :rparen => 30, + :string => 31, + :tag_ident => 32, + :op_uminus => 33, + :op_and => 34, + :op_or => 35 } + +racc_nt_base = 36 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "comma", + "dot", + "endtag", + "ident", + "integer", + "keyword", + "lblock", + "lblock2", + "lbracket", + "linterp", + "lparen", + "op_div", + "op_eq", + "op_gt", + "op_geq", + "op_lt", + "op_leq", + "op_minus", + "op_mod", + "op_mul", + "op_neq", + "op_not", + "op_plus", + "pipe", + "plaintext", + "rblock", + "rbracket", + "rinterp", + "rparen", + "string", + "tag_ident", + "op_uminus", + "op_and", + "op_or", + "$start", + "block", + "interp", + "tag", + "expr", + "filter_chain", + "primary_expr", + "tuple", + "function_args", + "tuple_content", + "function_args_inside", + "function_keywords", + "filter_chain_cont", + "filter_call", + "tag_first_cont", + "tag_first_cont2", + "tag_next_cont", + "tag_next_cont2", + "tag_next_cont3" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'liquor.y', 47) + def _reduce_1(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 49) + def _reduce_2(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 51) + def _reduce_3(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 53) + def _reduce_4(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 57) + def _reduce_5(val, _values, result) + result = [ :interp, retag(val), val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 59) + def _reduce_6(val, _values, result) + result = [ :interp, retag(val), val[1] ] + result + end +.,., + +# reduce 7 omitted + +module_eval(<<'.,.,', 'liquor.y', 64) + def _reduce_8(val, _values, result) + result = [ val[1][0], retag(val), *val[1][2..-1] ] + result + end +.,., + +# reduce 9 omitted + +# reduce 10 omitted + +# reduce 11 omitted + +module_eval(<<'.,.,', 'liquor.y', 71) + def _reduce_12(val, _values, result) + result = [ :call, retag(val), val[0], val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 73) + def _reduce_13(val, _values, result) + result = [ :index, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 75) + def _reduce_14(val, _values, result) + result = [ :external, retag(val), val[0], val[2], val[3] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 77) + def _reduce_15(val, _values, result) + result = [ :external, retag(val), val[0], val[2], nil ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 79) + def _reduce_16(val, _values, result) + result = [ :uminus, retag(val), val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 81) + def _reduce_17(val, _values, result) + result = [ :not, retag(val), val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 83) + def _reduce_18(val, _values, result) + result = [ :mul, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 85) + def _reduce_19(val, _values, result) + result = [ :div, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 87) + def _reduce_20(val, _values, result) + result = [ :mod, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 89) + def _reduce_21(val, _values, result) + result = [ :plus, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 91) + def _reduce_22(val, _values, result) + result = [ :minus, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 93) + def _reduce_23(val, _values, result) + result = [ :eq, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 95) + def _reduce_24(val, _values, result) + result = [ :neq, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 97) + def _reduce_25(val, _values, result) + result = [ :lt, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 99) + def _reduce_26(val, _values, result) + result = [ :leq, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 101) + def _reduce_27(val, _values, result) + result = [ :gt, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 103) + def _reduce_28(val, _values, result) + result = [ :geq, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 105) + def _reduce_29(val, _values, result) + result = [ :and, retag(val), val[0], val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 107) + def _reduce_30(val, _values, result) + result = [ :or, retag(val), val[0], val[2] ] + result + end +.,., + +# reduce 31 omitted + +module_eval(<<'.,.,', 'liquor.y', 112) + def _reduce_32(val, _values, result) + result = [ :tuple, retag(val), val[1].compact ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 116) + def _reduce_33(val, _values, result) + result = [ val[0], *val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 118) + def _reduce_34(val, _values, result) + result = [ val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 120) + def _reduce_35(val, _values, result) + result = [ ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 124) + def _reduce_36(val, _values, result) + result = [ :args, retag(val), *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 128) + def _reduce_37(val, _values, result) + result = [ val[0], val[1][2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 130) + def _reduce_38(val, _values, result) + result = [ nil, val[0][2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 134) + def _reduce_39(val, _values, result) + name = val[0][2].to_sym + tail = val[2][2] + loc = retag([ val[0], val[1] ]) + + if tail.include? name + @errors << SyntaxError.new("duplicate keyword argument `#{val[0][2]}'", + tail[name][1]) + end + + hash = { + name => [ val[1][0], loc, *val[1][2..-1] ] + }.merge(tail) + + result = [ :keywords, retag([ loc, val[2] ]), hash ] + + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 150) + def _reduce_40(val, _values, result) + result = [ :keywords, nil, {} ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 154) + def _reduce_41(val, _values, result) + result = [ val[0], *val[2] ]. + reduce { |tree, node| node[3][2] = tree; node } + + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 160) + def _reduce_42(val, _values, result) + result = [ val[0], *val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 162) + def _reduce_43(val, _values, result) + result = [ val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 166) + def _reduce_44(val, _values, result) + ident_loc = val[0][1] + empty_args_loc = { line: ident_loc[:line], + start: ident_loc[:end] + 1, + end: ident_loc[:end] + 1, } + result = [ :call, val[0][1], val[0], + [ :args, val[1][1] || empty_args_loc, nil, val[1][2] ] ] + + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 176) + def _reduce_45(val, _values, result) + result = [ :tag, retag(val), val[1], val[2], *reduce_tag_args(val[3][2]) ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 178) + def _reduce_46(val, _values, result) + result = [ :tag, retag(val), val[1], nil, *reduce_tag_args(val[2][2]) ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 186) + def _reduce_47(val, _values, result) + result = [ :cont, retag(val), [] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 188) + def _reduce_48(val, _values, result) + result = [ :cont, retag(val), [ val[0], *val[1][2] ] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 192) + def _reduce_49(val, _values, result) + result = [ :cont2, val[0][1], [ [:block, val[0][1], val[1] ], *val[3] ] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 194) + def _reduce_50(val, _values, result) + result = [ :cont2, retag(val), [ val[0], *val[1][2] ] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 198) + def _reduce_51(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 200) + def _reduce_52(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 204) + def _reduce_53(val, _values, result) + result = [ [:block, val[0][1], val[1] ], *val[3] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 206) + def _reduce_54(val, _values, result) + result = [ val[0], val[1], *val[2] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 210) + def _reduce_55(val, _values, result) + result = [ [:block, val[0][1], val[1] ], *val[3] ] + result + end +.,., + +module_eval(<<'.,.,', 'liquor.y', 212) + def _reduce_56(val, _values, result) + result = [ val[0], *val[1] ] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Liquor diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index ba384099..6f64195f 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -221,5 +221,13 @@ def test_namae assert_debugfile 'namae.y', [0, 0, 0, 0, 0] assert_output 'namae.y' end + + # .y file from liquor gem + + def test_liquor + assert_compile 'liquor.y' + assert_debugfile 'liquor.y', [0, 0, 0, 0, 15] + assert_output 'liquor.y' + end end end From f7abd43024bf4b188f62e17221053a9c631b3ad8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 18:47:02 +0200 Subject: [PATCH 096/619] Add regression test based on grammar.racc from nasl gem The author, Mak Kolybabi, said about this: Go for it. Test cases are good. --- Manifest.txt | 2 + test/assets/nasl.y | 626 +++++++++++ test/regress/nasl | 2201 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 2837 insertions(+) create mode 100644 test/assets/nasl.y create mode 100644 test/regress/nasl diff --git a/Manifest.txt b/Manifest.txt index f7f87d71..8a879b2b 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -71,6 +71,7 @@ test/assets/liquor.y test/assets/macruby.y test/assets/mailp.y test/assets/namae.y +test/assets/nasl.y test/assets/newsyn.y test/assets/noend.y test/assets/nokogiri-css.y @@ -103,6 +104,7 @@ test/regress/edtf test/regress/journey test/regress/liquor test/regress/namae +test/regress/nasl test/regress/nokogiri-css test/regress/opal test/regress/ruby18 diff --git a/test/assets/nasl.y b/test/assets/nasl.y new file mode 100644 index 00000000..e68dd699 --- /dev/null +++ b/test/assets/nasl.y @@ -0,0 +1,626 @@ +################################################################################ +# Copyright (c) 2011-2014, Tenable Network Security +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +################################################################################ + +class Nasl::Grammar + +preclow + right ASS_EQ ADD_EQ SUB_EQ MUL_EQ DIV_EQ MOD_EQ SLL_EQ SRA_EQ SRL_EQ + left OR + left AND + left CMP_LT CMP_GT CMP_EQ CMP_NE CMP_GE CMP_LE SUBSTR_EQ SUBSTR_NE REGEX_EQ REGEX_NE + left BIT_OR + left BIT_XOR + left AMPERSAND + left BIT_SRA BIT_SRL BIT_SLL + left ADD SUB + left MUL DIV MOD + right NOT + right UMINUS BIT_NOT + right EXP + right INCR DECR +prechigh + +# Tell the parser generator that we don't wish to use the result variable in the +# action section of rules. Instead, the result of the rule will be the value of +# evaluating the action block. +options no_result_var + +# Tell the parser generator that we expect one shift/reduce conflict due to the +# well-known dangling else problem. We could make the grammar solve this +# problem, but this is how the NASL YACC file solves it, so we'll follow suit. +expect 1 + +rule + ############################################################################## + # Aggregate Statements + ############################################################################## + + start : roots + { val[0] } + | /* Blank */ + { [] } + ; + + roots : root roots + { [val[0]] + val[1] } + | root + { [val[0]] } + ; + + root : COMMENT export + { c(*val) } + | export + { val[0] } + | COMMENT function + { c(*val) } + | function + { val[0] } + | statement + { val[0] } + ; + + statement : simple + { val[0] } + | compound + { val[0] } + ; + + ############################################################################## + # Root Statements + ############################################################################## + + export : EXPORT function + { n(:Export, *val) } + ; + + function : FUNCTION ident LPAREN params RPAREN block + { n(:Function, *val) } + | FUNCTION ident LPAREN RPAREN block + { n(:Function, *val) } + ; + + simple : assign + { val[0] } + | break + { val[0] } + | call + { val[0] } + | continue + { val[0] } + | decr + { val[0] } + | empty + { val[0] } + | COMMENT global + { c(*val) } + | global + { val[0] } + | import + { val[0] } + | include + { val[0] } + | incr + { val[0] } + | local + { val[0] } + | rep + { val[0] } + | return + { val[0] } + ; + + compound : block + { val[0] } + | for + { val[0] } + | foreach + { val[0] } + | if + { val[0] } + | repeat + { val[0] } + | while + { val[0] } + ; + + ############################################################################## + # Simple Statements + ############################################################################## + + assign : assign_exp SEMICOLON + { val[0] } + ; + + break : BREAK SEMICOLON + { n(:Break, *val) } + ; + + call : call_exp SEMICOLON + { val[0] } + ; + + continue : CONTINUE SEMICOLON + { n(:Continue, *val) } + ; + + decr : decr_exp SEMICOLON + { val[0] } + ; + + empty : SEMICOLON + { n(:Empty, *val) } + ; + + global : GLOBAL var_decls SEMICOLON + { n(:Global, *val) } + ; + + incr : incr_exp SEMICOLON + { val[0] } + ; + + import : IMPORT LPAREN string RPAREN SEMICOLON + { n(:Import, *val) } + ; + + include : INCLUDE LPAREN string RPAREN SEMICOLON + { n(:Include, *val) } + ; + + local : LOCAL var_decls SEMICOLON + { n(:Local, *val) } + ; + + rep : call_exp REP expr SEMICOLON + { n(:Repetition, *val[0..-1]) } + ; + + return : RETURN expr SEMICOLON + { n(:Return, *val) } + | RETURN ref SEMICOLON + { n(:Return, *val) } + | RETURN SEMICOLON + { n(:Return, *val) } + ; + + ############################################################################## + # Compound Statements + ############################################################################## + + block : LBRACE statements RBRACE + { n(:Block, *val) } + | LBRACE RBRACE + { n(:Block, *val) } + ; + + for : FOR LPAREN field SEMICOLON expr SEMICOLON field RPAREN statement + { n(:For, *val) } + ; + + foreach : FOREACH ident LPAREN expr RPAREN statement + { n(:Foreach, val[0], val[1], val[3], val[5]) } + | FOREACH LPAREN ident IN expr RPAREN statement + { n(:Foreach, val[0], val[2], val[4], val[6]) } + ; + + if : IF LPAREN expr RPAREN statement + { n(:If, *val) } + | IF LPAREN expr RPAREN statement ELSE statement + { n(:If, *val) } + ; + + repeat : REPEAT statement UNTIL expr SEMICOLON + { n(:Repeat, *val) } + ; + + while : WHILE LPAREN expr RPAREN statement + { n(:While, *val) } + ; + + ############################################################################## + # Expressions + ############################################################################## + + assign_exp : lval ASS_EQ expr + { n(:Assignment, *val) } + | lval ASS_EQ ref + { n(:Assignment, *val) } + | lval ADD_EQ expr + { n(:Assignment, *val) } + | lval SUB_EQ expr + { n(:Assignment, *val) } + | lval MUL_EQ expr + { n(:Assignment, *val) } + | lval DIV_EQ expr + { n(:Assignment, *val) } + | lval MOD_EQ expr + { n(:Assignment, *val) } + | lval SRL_EQ expr + { n(:Assignment, *val) } + | lval SRA_EQ expr + { n(:Assignment, *val) } + | lval SLL_EQ expr + { n(:Assignment, *val) } + ; + + call_exp : lval LPAREN args RPAREN + { n(:Call, *val) } + | lval LPAREN RPAREN + { n(:Call, *val) } + ; + + decr_exp : DECR lval + { n(:Decrement, val[0]) } + | lval DECR + { n(:Decrement, val[0]) } + ; + + incr_exp : INCR lval + { n(:Increment, val[0]) } + | lval INCR + { n(:Increment, val[0]) } + ; + + expr : LPAREN expr RPAREN + { n(:Expression, *val) } + | expr AND expr + { n(:Expression, *val) } + | NOT expr + { n(:Expression, *val) } + | expr OR expr + { n(:Expression, *val) } + | expr ADD expr + { n(:Expression, *val) } + | expr SUB expr + { n(:Expression, *val) } + | SUB expr =UMINUS + { n(:Expression, *val) } + | BIT_NOT expr + { n(:Expression, *val) } + | expr MUL expr + { n(:Expression, *val) } + | expr EXP expr + { n(:Expression, *val) } + | expr DIV expr + { n(:Expression, *val) } + | expr MOD expr + { n(:Expression, *val) } + | expr AMPERSAND expr + { n(:Expression, *val) } + | expr BIT_XOR expr + { n(:Expression, *val) } + | expr BIT_OR expr + { n(:Expression, *val) } + | expr BIT_SRA expr + { n(:Expression, *val) } + | expr BIT_SRL expr + { n(:Expression, *val) } + | expr BIT_SLL expr + { n(:Expression, *val) } + | incr_exp + { val[0] } + | decr_exp + { val[0] } + | expr SUBSTR_EQ expr + { n(:Expression, *val) } + | expr SUBSTR_NE expr + { n(:Expression, *val) } + | expr REGEX_EQ expr + { n(:Expression, *val) } + | expr REGEX_NE expr + { n(:Expression, *val) } + | expr CMP_LT expr + { n(:Expression, *val) } + | expr CMP_GT expr + { n(:Expression, *val) } + | expr CMP_EQ expr + { n(:Expression, *val) } + | expr CMP_NE expr + { n(:Expression, *val) } + | expr CMP_GE expr + { n(:Expression, *val) } + | expr CMP_LE expr + { n(:Expression, *val) } + | assign_exp + { val[0] } + | string + { val[0] } + | call_exp + { val[0] } + | lval + { val[0] } + | ip + { val[0] } + | int + { val[0] } + | undef + { val[0] } + | list_expr + { val[0] } + | array_expr + { val[0] } + ; + + ############################################################################## + # Named Components + ############################################################################## + + arg : ident COLON expr + { n(:Argument, *val) } + | ident COLON ref + { n(:Argument, *val) } + | expr + { n(:Argument, *val) } + | ref + { n(:Argument, *val) } + ; + + kv_pair : string COLON expr + { n(:KeyValuePair, *val) } + | int COLON expr + { n(:KeyValuePair, *val) } + | ident COLON expr + { n(:KeyValuePair, *val) } + | string COLON ref + { n(:KeyValuePair, *val) } + | int COLON ref + { n(:KeyValuePair, *val) } + | ident COLON ref + { n(:KeyValuePair, *val) } + ; + + kv_pairs : kv_pair COMMA kv_pairs + { [val[0]] + val[2] } + | kv_pair COMMA + { [val[0]] } + | kv_pair + { [val[0]] } + ; + + lval : ident indexes + { n(:Lvalue, *val) } + | ident + { n(:Lvalue, *val) } + ; + + ref : AT_SIGN ident + { n(:Reference, val[1]) } + ; + + ############################################################################## + # Anonymous Components + ############################################################################## + + args : arg COMMA args + { [val[0]] + val[2] } + | arg + { [val[0]] } + ; + + array_expr : LBRACE kv_pairs RBRACE + { n(:Array, *val) } + | LBRACE RBRACE + { n(:Array, *val) } + ; + + field : assign_exp + { val[0] } + | call_exp + { val[0] } + | decr_exp + { val[0] } + | incr_exp + { val[0] } + | /* Blank */ + { nil } + ; + + index : LBRACK expr RBRACK + { val[1] } + | PERIOD ident + { val[1] } + ; + + indexes : index indexes + { [val[0]] + val[1] } + | index + { [val[0]] } + ; + + list_elem : expr + { val[0] } + | ref + { val[0] } + ; + + list_elems : list_elem COMMA list_elems + { [val[0]] + val[2] } + | list_elem + { [val[0]] } + ; + + list_expr : LBRACK list_elems RBRACK + { n(:List, *val) } + | LBRACK RBRACK + { n(:List, *val) } + ; + + param : AMPERSAND ident + { n(:Parameter, val[1], 'reference') } + | ident + { n(:Parameter, val[0], 'value') } + ; + + params : param COMMA params + { [val[0]] + val[2] } + | param + { [val[0]] } + ; + + statements : statement statements + { [val[0]] + val[1] } + | statement + { [val[0]] } + ; + + var_decl : ident ASS_EQ expr + { n(:Assignment, *val) } + | ident ASS_EQ ref + { n(:Assignment, *val) } + | ident + { val[0] } + ; + + var_decls : var_decl COMMA var_decls + { [val[0]] + val[2] } + | var_decl + { [val[0]] } + ; + + ############################################################################## + # Literals + ############################################################################## + + ident : IDENT + { n(:Identifier, *val) } + | REP + { n(:Identifier, *val) } + | IN + { n(:Identifier, *val) } + ; + + int : INT_DEC + { n(:Integer, *val) } + | INT_HEX + { n(:Integer, *val) } + | INT_OCT + { n(:Integer, *val) } + | FALSE + { n(:Integer, *val) } + | TRUE + { n(:Integer, *val) } + ; + + ip : int PERIOD int PERIOD int PERIOD int + { n(:Ip, *val) } + + string : DATA + { n(:String, *val) } + | STRING + { n(:String, *val) } + ; + + undef : UNDEF + { n(:Undefined, *val) } + ; +end + +---- header ---- + +require 'nasl/parser/tree' + +require 'nasl/parser/argument' +require 'nasl/parser/array' +require 'nasl/parser/assigment' +require 'nasl/parser/block' +require 'nasl/parser/break' +require 'nasl/parser/call' +require 'nasl/parser/comment' +require 'nasl/parser/continue' +require 'nasl/parser/decrement' +require 'nasl/parser/empty' +require 'nasl/parser/export' +require 'nasl/parser/expression' +require 'nasl/parser/for' +require 'nasl/parser/foreach' +require 'nasl/parser/function' +require 'nasl/parser/global' +require 'nasl/parser/identifier' +require 'nasl/parser/if' +require 'nasl/parser/import' +require 'nasl/parser/include' +require 'nasl/parser/increment' +require 'nasl/parser/integer' +require 'nasl/parser/ip' +require 'nasl/parser/key_value_pair' +require 'nasl/parser/list' +require 'nasl/parser/local' +require 'nasl/parser/lvalue' +require 'nasl/parser/parameter' +require 'nasl/parser/reference' +require 'nasl/parser/repeat' +require 'nasl/parser/repetition' +require 'nasl/parser/return' +require 'nasl/parser/string' +require 'nasl/parser/undefined' +require 'nasl/parser/while' + +---- inner ---- + +def n(cls, *args) + begin + Nasl.const_get(cls).new(@tree, *args) + rescue + puts "An exception occurred during the creation of a #{cls} instance." + puts + puts "The arguments passed to the constructer were:" + puts args + puts + puts @tok.last.context + puts + raise + end +end + +def c(*args) + n(:Comment, *args) + args[1] +end + +def on_error(type, value, stack) + raise ParseException, "The language's grammar does not permit #{value.name} to appear here", value.context +end + +def next_token + @tok = @tkz.get_token + + if @first && @tok.first == :COMMENT + n(:Comment, @tok.last) + @tok = @tkz.get_token + end + @first = false + + return @tok +end + +def parse(env, code, path) + @first = true + @tree = Tree.new(env) + @tkz = Tokenizer.new(code, path) + @tree.concat(do_parse) +end + +---- footer ---- diff --git a/test/regress/nasl b/test/regress/nasl new file mode 100644 index 00000000..39aafff1 --- /dev/null +++ b/test/regress/nasl @@ -0,0 +1,2201 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "nasl.y". +# + +require 'racc/parser.rb' + + +require 'nasl/parser/tree' + +require 'nasl/parser/argument' +require 'nasl/parser/array' +require 'nasl/parser/assigment' +require 'nasl/parser/block' +require 'nasl/parser/break' +require 'nasl/parser/call' +require 'nasl/parser/comment' +require 'nasl/parser/continue' +require 'nasl/parser/decrement' +require 'nasl/parser/empty' +require 'nasl/parser/export' +require 'nasl/parser/expression' +require 'nasl/parser/for' +require 'nasl/parser/foreach' +require 'nasl/parser/function' +require 'nasl/parser/global' +require 'nasl/parser/identifier' +require 'nasl/parser/if' +require 'nasl/parser/import' +require 'nasl/parser/include' +require 'nasl/parser/increment' +require 'nasl/parser/integer' +require 'nasl/parser/ip' +require 'nasl/parser/key_value_pair' +require 'nasl/parser/list' +require 'nasl/parser/local' +require 'nasl/parser/lvalue' +require 'nasl/parser/parameter' +require 'nasl/parser/reference' +require 'nasl/parser/repeat' +require 'nasl/parser/repetition' +require 'nasl/parser/return' +require 'nasl/parser/string' +require 'nasl/parser/undefined' +require 'nasl/parser/while' + +module Nasl + class Grammar < Racc::Parser + +module_eval(<<'...end nasl.y/module_eval...', 'nasl.y', 582) + +def n(cls, *args) + begin + Nasl.const_get(cls).new(@tree, *args) + rescue + puts "An exception occurred during the creation of a #{cls} instance." + puts + puts "The arguments passed to the constructer were:" + puts args + puts + puts @tok.last.context + puts + raise + end +end + +def c(*args) + n(:Comment, *args) + args[1] +end + +def on_error(type, value, stack) + raise ParseException, "The language's grammar does not permit #{value.name} to appear here", value.context +end + +def next_token + @tok = @tkz.get_token + + if @first && @tok.first == :COMMENT + n(:Comment, @tok.last) + @tok = @tkz.get_token + end + @first = false + + return @tok +end + +def parse(env, code, path) + @first = true + @tree = Tree.new(env) + @tkz = Tokenizer.new(code, path) + @tree.concat(do_parse) +end + +...end nasl.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +144, 143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, +154, 155, 156, 145, 146, 147, 149, 150, 82, 54, 111, 148, 81, 218, 83, +55, 51, 50, 56, 54, 54, 80, 11, 78, 65, 55, 55, 53, 63, 54, +54, 66, 95, 102, 103, 55, 55, 53, 53, 64, 54, 218, 269, 67, 94, +96, 55, 53, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, 53, 267, +217, 81, 130, 83, 131, 51, 50, 130, 54, 131, 80, 130, 54, 131, 55, +51, 50, 68, 55, 54, 72, 95, 147, 149, 150, 55, 53, 73, 148, 54, +53, 102, 103, 74, 96, 55, 109, 53, 97, 98, 99, 100, 101, 102, 103, +104, 82, 53, 112, 114, 81, 54, 83, 133, 51, 50, 134, 55, 136, 80, +137, 54, 138, 141, 51, 50, 167, 55, 54, 53, 95, 147, 149, 150, 55, +10, 11, 148, 54, 53, 172, 37, 37, 96, 55, 185, 53, 97, 98, 99, +100, 101, 102, 103, 104, 82, 53, 192, 195, 81, 225, 83, 226, 51, 50, +148, 54, 148, 80, 179, 148, 253, 55, 254, 255, 54, 54, 54, 256, 95, +257, 55, 55, 55, 53, 97, 98, 99, 100, 101, 102, 103, 96, 53, 53, +53, 97, 98, 99, 100, 101, 102, 103, 104, 82, 54, 258, 259, 81, 260, +83, 55, 51, 50, 262, 54, 266, 80, 268, 270, 43, 55, 273, 53, 54, +274, 54, 275, 95, 148, 55, 148, 55, 53, 97, 98, 99, 100, 101, 102, +103, 96, 53, 148, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, 148, +276, 43, 81, 300, 83, 301, 51, 50, 306, nil, nil, 80, 154, 155, 156, +145, 146, 147, 149, 150, 54, nil, 95, 148, nil, nil, 55, nil, 145, 146, +147, 149, 150, nil, nil, 96, 148, nil, 53, 97, 98, 99, 100, 101, 102, +103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, +80, nil, 145, 146, 147, 149, 150, nil, nil, 54, 148, 95, nil, nil, nil, +55, nil, nil, 145, 146, 147, 149, 150, 94, 96, 184, 148, 53, 97, 98, +99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, +50, nil, nil, nil, 80, 97, 98, 99, 100, 101, nil, nil, nil, 54, nil, +95, nil, nil, nil, 55, 97, 98, 99, 100, 101, nil, nil, nil, 96, nil, +nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, +nil, 83, nil, 51, 50, nil, nil, nil, 80, 97, 98, 99, 100, 101, nil, +nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, +nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, +nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, +nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, +nil, nil, nil, nil, nil, 94, 96, nil, nil, 53, 97, 98, 99, 100, 101, +102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, +nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, +nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, +98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, +51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, +nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, +nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, +81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, +nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, +nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, +82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, +nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, +nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, +101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, +nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, +nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, +97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, +nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, +54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, +96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, +nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, +nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, +nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, +104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, +nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, +nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, +100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, +nil, nil, nil, 80, 208, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, +nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, 94, 96, nil, nil, +53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, +83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, +nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, +nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, +nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, +nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, +nil, nil, nil, nil, 94, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, +103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, +80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, +55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, +99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, +50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, +95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, +nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, +nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, +nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, +nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, +nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, +nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, +nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, +102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, +nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, +nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, +98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, +51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, +nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, +nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, +81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, +nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, +nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, +82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, +nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, +nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, +101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, +nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, +nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, +97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, +nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, +54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, +96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, +nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, +nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, +nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, +104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, +nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, +nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, +100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, +nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, +nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, +53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, +83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, +nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, +nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, +nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, +nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, +nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, +103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, +80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, +55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, +99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, +50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, +95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, +nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, +nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, +nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, +nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, +nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, +nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, +nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, +102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, +nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, +nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, +98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, +51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, +nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, +nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, +81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, +nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, +nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, +82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, +nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, +nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, +101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, +nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, +nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, +97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, +nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, +54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, +96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, +nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, +nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, +nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, +104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, +nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, +nil, nil, nil, nil, nil, nil, nil, 94, 96, nil, nil, 53, 97, 98, 99, +100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, +nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, +nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, 94, 96, nil, nil, +53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, +83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, +nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, +94, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, +nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, +nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, +nil, nil, nil, nil, 94, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, +103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, +80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, +55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, nil, 53, 97, 98, +99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, nil, 83, nil, 51, +50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, +95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, 96, nil, +nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, nil, nil, nil, 81, +nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, +nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, +nil, 94, 96, nil, nil, 53, 97, 98, 99, 100, 101, 102, 103, 104, 82, +nil, nil, nil, 81, nil, 83, nil, 51, 50, nil, nil, nil, 80, nil, nil, +nil, nil, nil, nil, nil, nil, 54, nil, 95, nil, nil, nil, 55, nil, nil, +nil, nil, nil, nil, nil, 94, 96, nil, nil, 53, 97, 98, 99, 100, 101, +102, 103, 104, 115, 116, 117, 118, 119, 120, 123, 122, 121, 115, 116, 117, +118, 119, 120, 123, 122, 121, 153, 152, 151, 154, 155, 156, 145, 146, 147, +149, 150, nil, nil, nil, 148, nil, nil, nil, 126, 125, nil, nil, nil, 124, +nil, nil, nil, 126, 125, nil, nil, nil, 124, 144, 143, 161, 162, 163, 164, +165, 166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, +149, 150, nil, nil, nil, 148, nil, nil, nil, nil, nil, nil, nil, 142, 144, +143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, +155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, nil, nil, nil, nil, +nil, nil, nil, 221, 144, 143, 161, 162, 163, 164, 165, 166, 157, 158, 159, +160, 153, 152, 151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, nil, +148, nil, nil, nil, nil, nil, nil, nil, 289, 144, 143, 161, 162, 163, 164, +165, 166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, +149, 150, nil, nil, nil, 148, nil, nil, nil, nil, nil, nil, nil, 297, 144, +143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, +155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, nil, nil, nil, nil, +nil, nil, 251, 144, 143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, +153, 152, 151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, +nil, nil, nil, nil, nil, nil, 263, 144, 143, 161, 162, 163, 164, 165, 166, +157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, 149, 150, +nil, nil, nil, 148, nil, nil, nil, nil, nil, nil, 265, 144, 143, 161, 162, +163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, nil, nil, nil, nil, nil, nil, 286, +144, 143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, +154, 155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, 51, 50, 4, +10, 11, nil, 299, 36, 32, 34, 37, 39, 40, 41, 54, 42, 43, nil, +44, 45, 55, 46, nil, 47, nil, 48, 51, 50, 4, 10, 11, nil, 53, +36, 32, 34, 37, 39, 40, 41, 54, 42, 43, nil, 44, 45, 55, 46, +nil, 47, nil, 48, 51, 50, 105, nil, nil, nil, 53, 36, 32, 34, 37, +39, 40, 41, 54, 42, 43, 107, 44, 45, 55, 46, nil, 47, nil, 48, +51, 50, 105, nil, nil, nil, 53, 36, 32, 34, 37, 39, 40, 41, 54, +42, 43, nil, 44, 45, 55, 46, nil, 47, nil, 48, 51, 50, 105, nil, +nil, nil, 53, 36, 32, 34, 37, 39, 40, 41, 54, 42, 43, nil, 44, +45, 55, 46, nil, 47, nil, 48, 51, 50, 105, nil, nil, nil, 53, 36, +32, 34, 37, 39, 40, 41, 54, 42, 43, nil, 44, 45, 55, 46, nil, +47, nil, 48, 51, 50, 105, nil, nil, nil, 53, 36, 32, 34, 37, 39, +40, 41, 54, 42, 43, nil, 44, 45, 55, 46, nil, 47, nil, 48, 51, +50, 105, nil, nil, nil, 53, 36, 32, 34, 37, 39, 40, 41, 54, 42, +43, nil, 44, 45, 55, 46, nil, 47, nil, 48, 51, 50, 105, nil, nil, +nil, 53, 36, 32, 34, 37, 39, 40, 41, 54, 42, 43, nil, 44, 45, +55, 46, nil, 47, nil, 48, 51, 50, 105, nil, nil, nil, 53, 36, 32, +34, 37, 39, 40, 41, 54, 42, 43, nil, 44, 45, 55, 46, nil, 47, +nil, 48, 51, 50, 105, nil, nil, nil, 53, 36, 32, 34, 37, 39, 40, +41, 54, 42, 43, nil, 44, 45, 55, 46, nil, 47, nil, 48, nil, nil, +nil, nil, nil, nil, 53, 144, 143, 161, 162, 163, 164, 165, 166, 157, 158, +159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, +nil, 148, 144, 143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, +152, 151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, 144, +143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, +155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, 144, 143, 161, 162, +163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 144, 143, 161, 162, 163, 164, 165, +166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, 149, +150, nil, nil, nil, 148, 144, 143, 161, 162, 163, 164, 165, 166, 157, 158, +159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, +nil, 148, 144, 143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, +152, 151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, 144, +143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, +155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, 144, 143, 161, 162, +163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 144, 143, 161, 162, 163, 164, 165, +166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, 149, +150, nil, nil, nil, 148, 144, 143, 161, 162, 163, 164, 165, 166, 157, 158, +159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, +nil, 148, 144, 143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, +152, 151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, 144, +143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, +155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, 144, 143, 161, 162, +163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 144, 143, 161, 162, 163, 164, 165, +166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, 149, +150, nil, nil, nil, 148, 144, 143, 161, 162, 163, 164, 165, 166, 157, 158, +159, 160, 153, 152, 151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, +nil, 148, 143, 161, 162, 163, 164, 165, 166, 157, 158, 159, 160, 153, 152, +151, 154, 155, 156, 145, 146, 147, 149, 150, nil, nil, nil, 148, 161, 162, +163, 164, 165, 166, 157, 158, 159, 160, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 153, 152, 151, 154, 155, 156, 145, +146, 147, 149, 150, nil, nil, nil, 148, 152, 151, 154, 155, 156, 145, 146, +147, 149, 150, nil, nil, nil, 148, 151, 154, 155, 156, 145, 146, 147, 149, +150, nil, nil, nil, 148] + +racc_action_check = [ +213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, +213, 213, 213, 213, 213, 213, 213, 213, 42, 11, 45, 213, 42, 273, 42, +11, 42, 42, 1, 45, 37, 42, 10, 42, 33, 45, 37, 11, 31, 41, +42, 33, 42, 73, 73, 41, 42, 45, 37, 32, 273, 134, 213, 34, 42, +42, 273, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, 66, 273, 210, +134, 66, 210, 66, 210, 66, 66, 52, 134, 52, 66, 132, 50, 132, 134, +109, 109, 35, 50, 66, 38, 66, 229, 229, 229, 66, 134, 39, 229, 109, +50, 74, 74, 40, 66, 109, 44, 66, 66, 66, 66, 66, 66, 66, 66, +66, 80, 109, 46, 48, 80, 51, 80, 56, 80, 80, 62, 51, 69, 80, +70, 94, 71, 75, 297, 297, 77, 94, 80, 51, 80, 230, 230, 230, 80, +4, 4, 230, 297, 94, 90, 105, 4, 80, 297, 106, 80, 80, 80, 80, +80, 80, 80, 80, 80, 81, 297, 110, 113, 81, 139, 81, 140, 81, 81, +169, 95, 170, 81, 95, 171, 174, 95, 175, 176, 111, 131, 81, 177, 81, +178, 111, 131, 81, 95, 95, 95, 95, 95, 95, 95, 95, 81, 111, 131, +81, 81, 81, 81, 81, 81, 81, 81, 81, 82, 138, 182, 183, 82, 187, +82, 138, 82, 82, 193, 256, 207, 82, 212, 216, 217, 256, 220, 138, 218, +225, 82, 226, 82, 231, 218, 232, 82, 256, 256, 256, 256, 256, 256, 256, +256, 82, 218, 233, 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, 234, +252, 270, 83, 288, 83, 296, 83, 83, 302, nil, nil, 83, 235, 235, 235, +235, 235, 235, 235, 235, 83, nil, 83, 235, nil, nil, 83, nil, 238, 238, +238, 238, 238, nil, nil, 83, 238, nil, 83, 83, 83, 83, 83, 83, 83, +83, 83, 96, nil, nil, nil, 96, nil, 96, nil, 96, 96, nil, nil, nil, +96, nil, 239, 239, 239, 239, 239, nil, nil, 96, 239, 96, nil, nil, nil, +96, nil, nil, 240, 240, 240, 240, 240, 96, 96, 96, 240, 96, 96, 96, +96, 96, 96, 96, 96, 96, 112, nil, nil, nil, 112, nil, 112, nil, 112, +112, nil, nil, nil, 112, 172, 172, 172, 172, 172, nil, nil, nil, 112, nil, +112, nil, nil, nil, 112, 276, 276, 276, 276, 276, nil, nil, nil, 112, nil, +nil, 112, 112, 112, 112, 112, 112, 112, 112, 112, 114, nil, nil, nil, 114, +nil, 114, nil, 114, 114, nil, nil, nil, 114, 301, 301, 301, 301, 301, nil, +nil, nil, 114, nil, 114, nil, nil, nil, 114, nil, nil, nil, nil, nil, nil, +nil, nil, 114, nil, nil, 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, +nil, nil, nil, 115, nil, 115, nil, 115, 115, nil, nil, nil, 115, nil, nil, +nil, nil, nil, nil, nil, nil, 115, nil, 115, nil, nil, nil, 115, nil, nil, +nil, nil, nil, nil, nil, 115, 115, nil, nil, 115, 115, 115, 115, 115, 115, +115, 115, 115, 116, nil, nil, nil, 116, nil, 116, nil, 116, 116, nil, nil, +nil, 116, nil, nil, nil, nil, nil, nil, nil, nil, 116, nil, 116, nil, nil, +nil, 116, nil, nil, nil, nil, nil, nil, nil, nil, 116, nil, nil, 116, 116, +116, 116, 116, 116, 116, 116, 116, 117, nil, nil, nil, 117, nil, 117, nil, +117, 117, nil, nil, nil, 117, nil, nil, nil, nil, nil, nil, nil, nil, 117, +nil, 117, nil, nil, nil, 117, nil, nil, nil, nil, nil, nil, nil, nil, 117, +nil, nil, 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, nil, nil, nil, +118, nil, 118, nil, 118, 118, nil, nil, nil, 118, nil, nil, nil, nil, nil, +nil, nil, nil, 118, nil, 118, nil, nil, nil, 118, nil, nil, nil, nil, nil, +nil, nil, nil, 118, nil, nil, 118, 118, 118, 118, 118, 118, 118, 118, 118, +119, nil, nil, nil, 119, nil, 119, nil, 119, 119, nil, nil, nil, 119, nil, +nil, nil, nil, nil, nil, nil, nil, 119, nil, 119, nil, nil, nil, 119, nil, +nil, nil, nil, nil, nil, nil, nil, 119, nil, nil, 119, 119, 119, 119, 119, +119, 119, 119, 119, 120, nil, nil, nil, 120, nil, 120, nil, 120, 120, nil, +nil, nil, 120, nil, nil, nil, nil, nil, nil, nil, nil, 120, nil, 120, nil, +nil, nil, 120, nil, nil, nil, nil, nil, nil, nil, nil, 120, nil, nil, 120, +120, 120, 120, 120, 120, 120, 120, 120, 121, nil, nil, nil, 121, nil, 121, +nil, 121, 121, nil, nil, nil, 121, nil, nil, nil, nil, nil, nil, nil, nil, +121, nil, 121, nil, nil, nil, 121, nil, nil, nil, nil, nil, nil, nil, nil, +121, nil, nil, 121, 121, 121, 121, 121, 121, 121, 121, 121, 122, nil, nil, +nil, 122, nil, 122, nil, 122, 122, nil, nil, nil, 122, nil, nil, nil, nil, +nil, nil, nil, nil, 122, nil, 122, nil, nil, nil, 122, nil, nil, nil, nil, +nil, nil, nil, nil, 122, nil, nil, 122, 122, 122, 122, 122, 122, 122, 122, +122, 123, nil, nil, nil, 123, nil, 123, nil, 123, 123, nil, nil, nil, 123, +nil, nil, nil, nil, nil, nil, nil, nil, 123, nil, 123, nil, nil, nil, 123, +nil, nil, nil, nil, nil, nil, nil, nil, 123, nil, nil, 123, 123, 123, 123, +123, 123, 123, 123, 123, 124, nil, nil, nil, 124, nil, 124, nil, 124, 124, +nil, nil, nil, 124, 124, nil, nil, nil, nil, nil, nil, nil, 124, nil, 124, +nil, nil, nil, 124, nil, nil, nil, nil, nil, nil, nil, 124, 124, nil, nil, +124, 124, 124, 124, 124, 124, 124, 124, 124, 130, nil, nil, nil, 130, nil, +130, nil, 130, 130, nil, nil, nil, 130, nil, nil, nil, nil, nil, nil, nil, +nil, 130, nil, 130, nil, nil, nil, 130, nil, nil, nil, nil, nil, nil, nil, +nil, 130, nil, nil, 130, 130, 130, 130, 130, 130, 130, 130, 130, 137, nil, +nil, nil, 137, nil, 137, nil, 137, 137, nil, nil, nil, 137, nil, nil, nil, +nil, nil, nil, nil, nil, 137, nil, 137, nil, nil, nil, 137, nil, nil, nil, +nil, nil, nil, nil, 137, 137, nil, nil, 137, 137, 137, 137, 137, 137, 137, +137, 137, 143, nil, nil, nil, 143, nil, 143, nil, 143, 143, nil, nil, nil, +143, nil, nil, nil, nil, nil, nil, nil, nil, 143, nil, 143, nil, nil, nil, +143, nil, nil, nil, nil, nil, nil, nil, nil, 143, nil, nil, 143, 143, 143, +143, 143, 143, 143, 143, 143, 144, nil, nil, nil, 144, nil, 144, nil, 144, +144, nil, nil, nil, 144, nil, nil, nil, nil, nil, nil, nil, nil, 144, nil, +144, nil, nil, nil, 144, nil, nil, nil, nil, nil, nil, nil, nil, 144, nil, +nil, 144, 144, 144, 144, 144, 144, 144, 144, 144, 145, nil, nil, nil, 145, +nil, 145, nil, 145, 145, nil, nil, nil, 145, nil, nil, nil, nil, nil, nil, +nil, nil, 145, nil, 145, nil, nil, nil, 145, nil, nil, nil, nil, nil, nil, +nil, nil, 145, nil, nil, 145, 145, 145, 145, 145, 145, 145, 145, 145, 146, +nil, nil, nil, 146, nil, 146, nil, 146, 146, nil, nil, nil, 146, nil, nil, +nil, nil, nil, nil, nil, nil, 146, nil, 146, nil, nil, nil, 146, nil, nil, +nil, nil, nil, nil, nil, nil, 146, nil, nil, 146, 146, 146, 146, 146, 146, +146, 146, 146, 147, nil, nil, nil, 147, nil, 147, nil, 147, 147, nil, nil, +nil, 147, nil, nil, nil, nil, nil, nil, nil, nil, 147, nil, 147, nil, nil, +nil, 147, nil, nil, nil, nil, nil, nil, nil, nil, 147, nil, nil, 147, 147, +147, 147, 147, 147, 147, 147, 147, 148, nil, nil, nil, 148, nil, 148, nil, +148, 148, nil, nil, nil, 148, nil, nil, nil, nil, nil, nil, nil, nil, 148, +nil, 148, nil, nil, nil, 148, nil, nil, nil, nil, nil, nil, nil, nil, 148, +nil, nil, 148, 148, 148, 148, 148, 148, 148, 148, 148, 149, nil, nil, nil, +149, nil, 149, nil, 149, 149, nil, nil, nil, 149, nil, nil, nil, nil, nil, +nil, nil, nil, 149, nil, 149, nil, nil, nil, 149, nil, nil, nil, nil, nil, +nil, nil, nil, 149, nil, nil, 149, 149, 149, 149, 149, 149, 149, 149, 149, +150, nil, nil, nil, 150, nil, 150, nil, 150, 150, nil, nil, nil, 150, nil, +nil, nil, nil, nil, nil, nil, nil, 150, nil, 150, nil, nil, nil, 150, nil, +nil, nil, nil, nil, nil, nil, nil, 150, nil, nil, 150, 150, 150, 150, 150, +150, 150, 150, 150, 151, nil, nil, nil, 151, nil, 151, nil, 151, 151, nil, +nil, nil, 151, nil, nil, nil, nil, nil, nil, nil, nil, 151, nil, 151, nil, +nil, nil, 151, nil, nil, nil, nil, nil, nil, nil, nil, 151, nil, nil, 151, +151, 151, 151, 151, 151, 151, 151, 151, 152, nil, nil, nil, 152, nil, 152, +nil, 152, 152, nil, nil, nil, 152, nil, nil, nil, nil, nil, nil, nil, nil, +152, nil, 152, nil, nil, nil, 152, nil, nil, nil, nil, nil, nil, nil, nil, +152, nil, nil, 152, 152, 152, 152, 152, 152, 152, 152, 152, 153, nil, nil, +nil, 153, nil, 153, nil, 153, 153, nil, nil, nil, 153, nil, nil, nil, nil, +nil, nil, nil, nil, 153, nil, 153, nil, nil, nil, 153, nil, nil, nil, nil, +nil, nil, nil, nil, 153, nil, nil, 153, 153, 153, 153, 153, 153, 153, 153, +153, 154, nil, nil, nil, 154, nil, 154, nil, 154, 154, nil, nil, nil, 154, +nil, nil, nil, nil, nil, nil, nil, nil, 154, nil, 154, nil, nil, nil, 154, +nil, nil, nil, nil, nil, nil, nil, nil, 154, nil, nil, 154, 154, 154, 154, +154, 154, 154, 154, 154, 155, nil, nil, nil, 155, nil, 155, nil, 155, 155, +nil, nil, nil, 155, nil, nil, nil, nil, nil, nil, nil, nil, 155, nil, 155, +nil, nil, nil, 155, nil, nil, nil, nil, nil, nil, nil, nil, 155, nil, nil, +155, 155, 155, 155, 155, 155, 155, 155, 155, 156, nil, nil, nil, 156, nil, +156, nil, 156, 156, nil, nil, nil, 156, nil, nil, nil, nil, nil, nil, nil, +nil, 156, nil, 156, nil, nil, nil, 156, nil, nil, nil, nil, nil, nil, nil, +nil, 156, nil, nil, 156, 156, 156, 156, 156, 156, 156, 156, 156, 157, nil, +nil, nil, 157, nil, 157, nil, 157, 157, nil, nil, nil, 157, nil, nil, nil, +nil, nil, nil, nil, nil, 157, nil, 157, nil, nil, nil, 157, nil, nil, nil, +nil, nil, nil, nil, nil, 157, nil, nil, 157, 157, 157, 157, 157, 157, 157, +157, 157, 158, nil, nil, nil, 158, nil, 158, nil, 158, 158, nil, nil, nil, +158, nil, nil, nil, nil, nil, nil, nil, nil, 158, nil, 158, nil, nil, nil, +158, nil, nil, nil, nil, nil, nil, nil, nil, 158, nil, nil, 158, 158, 158, +158, 158, 158, 158, 158, 158, 159, nil, nil, nil, 159, nil, 159, nil, 159, +159, nil, nil, nil, 159, nil, nil, nil, nil, nil, nil, nil, nil, 159, nil, +159, nil, nil, nil, 159, nil, nil, nil, nil, nil, nil, nil, nil, 159, nil, +nil, 159, 159, 159, 159, 159, 159, 159, 159, 159, 160, nil, nil, nil, 160, +nil, 160, nil, 160, 160, nil, nil, nil, 160, nil, nil, nil, nil, nil, nil, +nil, nil, 160, nil, 160, nil, nil, nil, 160, nil, nil, nil, nil, nil, nil, +nil, nil, 160, nil, nil, 160, 160, 160, 160, 160, 160, 160, 160, 160, 161, +nil, nil, nil, 161, nil, 161, nil, 161, 161, nil, nil, nil, 161, nil, nil, +nil, nil, nil, nil, nil, nil, 161, nil, 161, nil, nil, nil, 161, nil, nil, +nil, nil, nil, nil, nil, nil, 161, nil, nil, 161, 161, 161, 161, 161, 161, +161, 161, 161, 162, nil, nil, nil, 162, nil, 162, nil, 162, 162, nil, nil, +nil, 162, nil, nil, nil, nil, nil, nil, nil, nil, 162, nil, 162, nil, nil, +nil, 162, nil, nil, nil, nil, nil, nil, nil, nil, 162, nil, nil, 162, 162, +162, 162, 162, 162, 162, 162, 162, 163, nil, nil, nil, 163, nil, 163, nil, +163, 163, nil, nil, nil, 163, nil, nil, nil, nil, nil, nil, nil, nil, 163, +nil, 163, nil, nil, nil, 163, nil, nil, nil, nil, nil, nil, nil, nil, 163, +nil, nil, 163, 163, 163, 163, 163, 163, 163, 163, 163, 164, nil, nil, nil, +164, nil, 164, nil, 164, 164, nil, nil, nil, 164, nil, nil, nil, nil, nil, +nil, nil, nil, 164, nil, 164, nil, nil, nil, 164, nil, nil, nil, nil, nil, +nil, nil, nil, 164, nil, nil, 164, 164, 164, 164, 164, 164, 164, 164, 164, +165, nil, nil, nil, 165, nil, 165, nil, 165, 165, nil, nil, nil, 165, nil, +nil, nil, nil, nil, nil, nil, nil, 165, nil, 165, nil, nil, nil, 165, nil, +nil, nil, nil, nil, nil, nil, nil, 165, nil, nil, 165, 165, 165, 165, 165, +165, 165, 165, 165, 166, nil, nil, nil, 166, nil, 166, nil, 166, 166, nil, +nil, nil, 166, nil, nil, nil, nil, nil, nil, nil, nil, 166, nil, 166, nil, +nil, nil, 166, nil, nil, nil, nil, nil, nil, nil, nil, 166, nil, nil, 166, +166, 166, 166, 166, 166, 166, 166, 166, 192, nil, nil, nil, 192, nil, 192, +nil, 192, 192, nil, nil, nil, 192, nil, nil, nil, nil, nil, nil, nil, nil, +192, nil, 192, nil, nil, nil, 192, nil, nil, nil, nil, nil, nil, nil, nil, +192, nil, nil, 192, 192, 192, 192, 192, 192, 192, 192, 192, 195, nil, nil, +nil, 195, nil, 195, nil, 195, 195, nil, nil, nil, 195, nil, nil, nil, nil, +nil, nil, nil, nil, 195, nil, 195, nil, nil, nil, 195, nil, nil, nil, nil, +nil, nil, nil, nil, 195, nil, nil, 195, 195, 195, 195, 195, 195, 195, 195, +195, 253, nil, nil, nil, 253, nil, 253, nil, 253, 253, nil, nil, nil, 253, +nil, nil, nil, nil, nil, nil, nil, nil, 253, nil, 253, nil, nil, nil, 253, +nil, nil, nil, nil, nil, nil, nil, 253, 253, nil, nil, 253, 253, 253, 253, +253, 253, 253, 253, 253, 254, nil, nil, nil, 254, nil, 254, nil, 254, 254, +nil, nil, nil, 254, nil, nil, nil, nil, nil, nil, nil, nil, 254, nil, 254, +nil, nil, nil, 254, nil, nil, nil, nil, nil, nil, nil, 254, 254, nil, nil, +254, 254, 254, 254, 254, 254, 254, 254, 254, 255, nil, nil, nil, 255, nil, +255, nil, 255, 255, nil, nil, nil, 255, nil, nil, nil, nil, nil, nil, nil, +nil, 255, nil, 255, nil, nil, nil, 255, nil, nil, nil, nil, nil, nil, nil, +255, 255, nil, nil, 255, 255, 255, 255, 255, 255, 255, 255, 255, 258, nil, +nil, nil, 258, nil, 258, nil, 258, 258, nil, nil, nil, 258, nil, nil, nil, +nil, nil, nil, nil, nil, 258, nil, 258, nil, nil, nil, 258, nil, nil, nil, +nil, nil, nil, nil, 258, 258, nil, nil, 258, 258, 258, 258, 258, 258, 258, +258, 258, 260, nil, nil, nil, 260, nil, 260, nil, 260, 260, nil, nil, nil, +260, nil, nil, nil, nil, nil, nil, nil, nil, 260, nil, 260, nil, nil, nil, +260, nil, nil, nil, nil, nil, nil, nil, nil, 260, nil, nil, 260, 260, 260, +260, 260, 260, 260, 260, 260, 262, nil, nil, nil, 262, nil, 262, nil, 262, +262, nil, nil, nil, 262, nil, nil, nil, nil, nil, nil, nil, nil, 262, nil, +262, nil, nil, nil, 262, nil, nil, nil, nil, nil, nil, nil, nil, 262, nil, +nil, 262, 262, 262, 262, 262, 262, 262, 262, 262, 267, nil, nil, nil, 267, +nil, 267, nil, 267, 267, nil, nil, nil, 267, nil, nil, nil, nil, nil, nil, +nil, nil, 267, nil, 267, nil, nil, nil, 267, nil, nil, nil, nil, nil, nil, +nil, 267, 267, nil, nil, 267, 267, 267, 267, 267, 267, 267, 267, 267, 268, +nil, nil, nil, 268, nil, 268, nil, 268, 268, nil, nil, nil, 268, nil, nil, +nil, nil, nil, nil, nil, nil, 268, nil, 268, nil, nil, nil, 268, nil, nil, +nil, nil, nil, nil, nil, 268, 268, nil, nil, 268, 268, 268, 268, 268, 268, +268, 268, 268, 49, 49, 49, 49, 49, 49, 49, 49, 49, 79, 79, 79, +79, 79, 79, 79, 79, 79, 241, 241, 241, 241, 241, 241, 241, 241, 241, +241, 241, nil, nil, nil, 241, nil, nil, nil, 49, 49, nil, nil, nil, 49, +nil, nil, nil, 79, 79, nil, nil, nil, 79, 76, 76, 76, 76, 76, 76, +76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, +76, 76, nil, nil, nil, 76, nil, nil, nil, nil, nil, nil, nil, 76, 135, +135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, +135, 135, 135, 135, 135, 135, 135, nil, nil, nil, 135, nil, nil, nil, nil, +nil, nil, nil, 135, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, +264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, nil, nil, nil, +264, nil, nil, nil, nil, nil, nil, nil, 264, 285, 285, 285, 285, 285, 285, +285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, +285, 285, nil, nil, nil, 285, nil, nil, nil, nil, nil, nil, nil, 285, 168, +168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, +168, 168, 168, 168, 168, 168, 168, nil, nil, nil, 168, nil, nil, nil, nil, +nil, nil, 168, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, +194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, nil, nil, nil, 194, +nil, nil, nil, nil, nil, nil, 194, 196, 196, 196, 196, 196, 196, 196, 196, +196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, +nil, nil, nil, 196, nil, nil, nil, nil, nil, nil, 196, 261, 261, 261, 261, +261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, +261, 261, 261, 261, nil, nil, nil, 261, nil, nil, nil, nil, nil, nil, 261, +287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, +287, 287, 287, 287, 287, 287, 287, 287, nil, nil, nil, 287, 0, 0, 0, +0, 0, nil, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, nil, +0, 0, 0, 0, nil, 0, nil, 0, 3, 3, 3, 3, 3, nil, 0, +3, 3, 3, 3, 3, 3, 3, 3, 3, 3, nil, 3, 3, 3, 3, +nil, 3, nil, 3, 43, 43, 43, nil, nil, nil, 3, 43, 43, 43, 43, +43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, nil, 43, nil, 43, +47, 47, 47, nil, nil, nil, 43, 47, 47, 47, 47, 47, 47, 47, 47, +47, 47, nil, 47, 47, 47, 47, nil, 47, nil, 47, 108, 108, 108, nil, +nil, nil, 47, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, nil, 108, +108, 108, 108, nil, 108, nil, 108, 263, 263, 263, nil, nil, nil, 108, 263, +263, 263, 263, 263, 263, 263, 263, 263, 263, nil, 263, 263, 263, 263, nil, +263, nil, 263, 265, 265, 265, nil, nil, nil, 263, 265, 265, 265, 265, 265, +265, 265, 265, 265, 265, nil, 265, 265, 265, 265, nil, 265, nil, 265, 286, +286, 286, nil, nil, nil, 265, 286, 286, 286, 286, 286, 286, 286, 286, 286, +286, nil, 286, 286, 286, 286, nil, 286, nil, 286, 299, 299, 299, nil, nil, +nil, 286, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, nil, 299, 299, +299, 299, nil, 299, nil, 299, 300, 300, 300, nil, nil, nil, 299, 300, 300, +300, 300, 300, 300, 300, 300, 300, 300, nil, 300, 300, 300, 300, nil, 300, +nil, 300, 306, 306, 306, nil, nil, nil, 300, 306, 306, 306, 306, 306, 306, +306, 306, 306, 306, nil, 306, 306, 306, 306, nil, 306, nil, 306, nil, nil, +nil, nil, nil, nil, 306, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, +180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, nil, nil, +nil, 180, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, +197, 197, 197, 197, 197, 197, 197, 197, 197, 197, nil, nil, nil, 197, 199, +199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, +199, 199, 199, 199, 199, 199, 199, nil, nil, nil, 199, 200, 200, 200, 200, +200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, +200, 200, 200, 200, nil, nil, nil, 200, 201, 201, 201, 201, 201, 201, 201, +201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, +201, nil, nil, nil, 201, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, +202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, nil, nil, +nil, 202, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, +203, 203, 203, 203, 203, 203, 203, 203, 203, 203, nil, nil, nil, 203, 204, +204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, +204, 204, 204, 204, 204, 204, 204, nil, nil, nil, 204, 205, 205, 205, 205, +205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, +205, 205, 205, 205, nil, nil, nil, 205, 206, 206, 206, 206, 206, 206, 206, +206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, +206, nil, nil, nil, 206, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, +209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, nil, nil, +nil, 209, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, +222, 222, 222, 222, 222, 222, 222, 222, 222, 222, nil, nil, nil, 222, 277, +277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, +277, 277, 277, 277, 277, 277, 277, nil, nil, nil, 277, 279, 279, 279, 279, +279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, +279, 279, 279, 279, nil, nil, nil, 279, 281, 281, 281, 281, 281, 281, 281, +281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, +281, nil, nil, nil, 281, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, +291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, nil, nil, +nil, 291, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, +228, 228, 228, 228, 228, 228, 228, 228, 228, nil, nil, nil, 228, 227, 227, +227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, +227, 227, 227, 227, nil, nil, nil, 227, 242, 242, 242, 242, 242, 242, 242, +242, 242, 242, 242, nil, nil, nil, 242, 243, 243, 243, 243, 243, 243, 243, +243, 243, 243, 243, nil, nil, nil, 243, 244, 244, 244, 244, 244, 244, 244, +244, 244, 244, 244, nil, nil, nil, 244, 245, 245, 245, 245, 245, 245, 245, +245, 245, 245, 245, nil, nil, nil, 245, 246, 246, 246, 246, 246, 246, 246, +246, 246, 246, 246, nil, nil, nil, 246, 247, 247, 247, 247, 247, 247, 247, +247, 247, 247, 247, nil, nil, nil, 247, 248, 248, 248, 248, 248, 248, 248, +248, 248, 248, 248, nil, nil, nil, 248, 249, 249, 249, 249, 249, 249, 249, +249, 249, 249, 249, nil, nil, nil, 249, 250, 250, 250, 250, 250, 250, 250, +250, 250, 250, 250, nil, nil, nil, 250, 237, 237, 237, 237, 237, 237, 237, +237, 237, 237, nil, nil, nil, 237, 236, 236, 236, 236, 236, 236, 236, 236, +236, nil, nil, nil, 236] + +racc_action_pointer = [3034, 33, nil, 3060, 109, nil, nil, nil, nil, nil, -5, - +28, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, -2, 9, -6, 13, 47, nil, -17, 50, 59, 65, -8, -7, 3086, 68, - +18, 80, 3112, 81, 2716, 35, 74, 15, nil, nil, nil, 128, nil, nil, nil, +nil, nil, 88, nil, nil, nil, 42, nil, nil, 88, 133, 72, nil, - +28, 30, 93, 2758, 96, nil, 2725, 91, 140, 189, 238, nil, nil, nil, nil, +nil, nil, 86, nil, nil, nil, 84, 129, 287, nil, nil, nil, nil, nil, nil, +nil, nil, 108, 105, nil, 3138, 52, 129, 138, 336, 111, 385, 434, 483, 532, +581, 630, 679, 728, 777, 826, 875, nil, nil, nil, nil, nil, 924, 139, 19, +nil, 31, 2793, nil, 973, 168, 131, 133, nil, nil, 1022, 1071, 1120, 1169, 1218, +1267, 1316, 1365, 1414, 1463, 1512, 1561, 1610, 1659, 1708, 1757, 1806, 1855, 1904, 1953, +2002, 2051, 2100, 2149, nil, 2898, 143, 145, 148, 309, nil, 122, 124, 125, 128, +140, nil, 3354, nil, 156, 154, nil, nil, nil, 179, nil, nil, nil, nil, 2198, +171, 2932, 2247, 2966, 3381, nil, 3408, 3435, 3462, 3489, 3516, 3543, 3570, 3597, 187, +nil, 3624, 10, nil, 168, - +11, nil, nil, 190, 181, 187, nil, 172, nil, 3651, nil, nil, 195, 197, 3810, +3785, 66, 115, 207, 209, 221, 232, 256, 3972, 3959, 269, 303, 319, 2713, 3825, +3840, 3855, 3870, 3885, 3900, 3915, 3930, 3945, nil, 201, 2296, 2345, 2394, 178, nil, +2443, nil, 2492, 3000, 2541, 3164, 2828, 3190, nil, 2590, 2639, nil, 217, nil, nil, +3, nil, nil, 324, 3678, nil, 3705, nil, 3732, nil, nil, nil, 2863, 3216, 3034, +213, nil, nil, 3759, nil, nil, nil, nil, 206, 101, nil, 3242, 3268, 358, 234, +nil, nil, nil, 3294, nil] + +racc_action_default = [-2, -172, -1, -4, -172, -6, -8, -9, -10, -11, -172, -172, -15, -16, -17, -18, -19, -20, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, -32, -33, -34, -172, -172, -172, -172, -172, -40, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -128, -160, -161, -162, -172, -3, -5, -7, -21, -12, -172, -35, -36, -37, -172, -38, -39, -172, -157, -159, -42, -172, -172, -172, -172, -172, -49, -108, -172, -172, -172, -172, -93, -94, -105, -106, -107, -109, -110, -111, -112, -113, -172, -172, -172, -163, -164, -165, -166, -167, -169, -170, -171, -172, -172, -51, -154, -138, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -72, -74, -71, -73, -127, -172, -172, -142, 308, -172, -172, -41, -172, -172, -172, -172, -45, -47, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -172, -48, -172, -77, -81, -82, -172, -129, -172, -172, -172, -126, -172, -133, -143, -144, -146, -172, -148, -50, -153, -172, -134, -135, -136, -137, -172, -172, -172, -172, -172, -59, -60, -61, -62, -63, -64, -65, -66, -67, -68, -172, -70, -116, -128, -117, -131, -172, -140, -141, -172, -172, -172, -150, -152, -46, -155, -156, -158, -172, -172, -76, -78, -79, -80, -83, -84, -85, -86, -87, -88, -89, -90, -91, -92, -95, -96, -97, -98, -99, -100, -101, -102, -103, -104, -75, -172, -172, -172, -172, -125, -132, -172, -147, -172, -172, -172, -172, -172, -172, -69, -172, -172, -139, -172, -14, -149, -172, -43, -44, -172, -118, -121, -119, -122, -120, -123, -124, -145, -172, -172, -172, -55, -57, -58, -114, -115, -130, -13, -151, -172, -138, -53, -172, -172, -172, -172, -54, -56, -168, -172, -52] + +racc_goto_table = [ +31, 187, 62, 31, 175, 33, 77, 183, 33, 178, 35, 139, 140, 35, 207, +38, 216, 106, 38, 60, 69, 1, 271, 59, 75, 58, 215, 49, 70, 61, +49, 108, 70, 174, 2, 113, 110, 57, nil, nil, nil, nil, nil, 31, nil, +nil, nil, 31, 33, nil, nil, nil, 33, 35, nil, nil, nil, 35, 38, nil, +nil, nil, 38, nil, nil, nil, nil, nil, nil, nil, 49, nil, nil, nil, 49, +294, nil, 127, 128, 198, nil, 252, 186, nil, nil, 173, 176, nil, 211, nil, +nil, nil, nil, nil, nil, nil, 108, nil, nil, nil, nil, 223, 193, nil, nil, +nil, nil, nil, 31, 188, nil, nil, nil, 33, 189, 210, nil, nil, 35, 190, +60, 224, 214, 38, 191, 219, nil, nil, nil, 70, nil, nil, nil, nil, nil, +49, 49, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 295, nil, nil, 293, nil, nil, nil, nil, nil, nil, +175, nil, nil, nil, 284, 283, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 296, nil, nil, nil, 302, nil, nil, nil, nil, 174, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 272, +305, nil, nil, nil, nil, nil, nil, 278, 280, 282, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 292, 211, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 176, nil, nil, nil, 288, nil, 290, nil, +nil, nil, nil, nil, 210, nil, nil, nil, 31, 219, 31, nil, nil, 33, nil, +33, nil, nil, 35, 298, 35, nil, nil, 38, 76, 38, nil, nil, nil, nil, +nil, 31, 303, 304, nil, 49, 33, 49, nil, 307, nil, 35, 188, nil, 31, +31, 38, 189, 135, 33, 33, 31, 190, nil, 35, 35, 33, 191, 49, 38, +38, 35, 168, 169, 170, 171, 38, nil, nil, 49, nil, 49, 49, nil, nil, +nil, nil, nil, 49, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 194, nil, 196, 197, 199, 200, 201, 202, 203, 204, 205, +206, 209, nil, nil, nil, nil, nil, 213, nil, nil, nil, nil, nil, nil, 222, +nil, nil, nil, nil, nil, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, +237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 261, nil, nil, 264, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 277, 279, 281, nil, nil, +nil, nil, 285, nil, 287, nil, nil, nil, nil, 291, 209] + +racc_goto_check = [ +30, 39, 9, 30, 43, 31, 37, 53, 31, 49, 32, 35, 35, 32, 41, +34, 10, 38, 34, 18, 33, 1, 11, 5, 33, 4, 50, 40, 9, 5, +40, 6, 9, 35, 2, 6, 9, 2, nil, nil, nil, nil, nil, 30, nil, +nil, nil, 30, 31, nil, nil, nil, 31, 32, nil, nil, nil, 32, 34, nil, +nil, nil, 34, nil, nil, nil, nil, nil, nil, nil, 40, nil, nil, nil, 40, +11, nil, 40, 40, 37, nil, 43, 38, nil, nil, 9, 9, nil, 37, nil, +nil, nil, nil, nil, nil, nil, 6, nil, nil, nil, nil, 37, 9, nil, nil, +nil, nil, nil, 30, 30, nil, nil, nil, 31, 31, 9, nil, nil, 32, 32, +18, 33, 9, 34, 34, 9, nil, nil, nil, 9, nil, nil, nil, nil, nil, +40, 40, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 10, nil, nil, 41, nil, nil, nil, nil, nil, nil, +43, nil, nil, nil, 53, 49, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 43, nil, nil, nil, 39, nil, nil, nil, nil, 35, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 9, +43, nil, nil, nil, nil, nil, nil, 37, 37, 37, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 37, 37, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 9, nil, nil, nil, 6, nil, 6, nil, +nil, nil, nil, nil, 9, nil, nil, nil, 30, 9, 30, nil, nil, 31, nil, +31, nil, nil, 32, 6, 32, nil, nil, 34, 36, 34, nil, nil, nil, nil, +nil, 30, 6, 6, nil, 40, 31, 40, nil, 6, nil, 32, 30, nil, 30, +30, 34, 31, 36, 31, 31, 30, 32, nil, 32, 32, 31, 34, 40, 34, +34, 32, 36, 36, 36, 36, 34, nil, nil, 40, nil, 40, 40, nil, nil, +nil, nil, nil, 40, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 36, nil, 36, 36, 36, 36, 36, 36, 36, 36, 36, +36, 36, nil, nil, nil, nil, nil, 36, nil, nil, nil, nil, nil, nil, 36, +nil, nil, nil, nil, nil, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, +36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, 36, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36, 36, 36, nil, nil, +nil, nil, 36, nil, 36, nil, nil, nil, nil, 36, 36] + +racc_goto_pointer = [nil, 21, 34, nil, 21, 19, -12, nil, nil, -9, -118, - +195, nil, nil, nil, nil, nil, nil, 15, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 0, 5, 10, -17, 15, -62, 237, -36, -26, -108, 27, -110, nil, -91, nil, nil, nil, nil, nil, -86, -106, nil, nil, -89, nil, nil] + +racc_goto_default = [ +nil, nil, nil, 3, 5, 6, 7, 8, 9, 52, nil, 25, 12, 13, 14, +15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, +86, 88, 85, nil, 84, 87, 180, 181, nil, nil, 79, nil, 89, 90, 91, +92, 93, 212, 177, nil, 129, 132, 182, nil, 220, 71] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 80, :_reduce_1, + 0, 80, :_reduce_2, + 2, 81, :_reduce_3, + 1, 81, :_reduce_4, + 2, 82, :_reduce_5, + 1, 82, :_reduce_6, + 2, 82, :_reduce_7, + 1, 82, :_reduce_8, + 1, 82, :_reduce_9, + 1, 85, :_reduce_10, + 1, 85, :_reduce_11, + 2, 83, :_reduce_12, + 6, 84, :_reduce_13, + 5, 84, :_reduce_14, + 1, 86, :_reduce_15, + 1, 86, :_reduce_16, + 1, 86, :_reduce_17, + 1, 86, :_reduce_18, + 1, 86, :_reduce_19, + 1, 86, :_reduce_20, + 2, 86, :_reduce_21, + 1, 86, :_reduce_22, + 1, 86, :_reduce_23, + 1, 86, :_reduce_24, + 1, 86, :_reduce_25, + 1, 86, :_reduce_26, + 1, 86, :_reduce_27, + 1, 86, :_reduce_28, + 1, 87, :_reduce_29, + 1, 87, :_reduce_30, + 1, 87, :_reduce_31, + 1, 87, :_reduce_32, + 1, 87, :_reduce_33, + 1, 87, :_reduce_34, + 2, 91, :_reduce_35, + 2, 92, :_reduce_36, + 2, 93, :_reduce_37, + 2, 94, :_reduce_38, + 2, 95, :_reduce_39, + 1, 96, :_reduce_40, + 3, 97, :_reduce_41, + 2, 100, :_reduce_42, + 5, 98, :_reduce_43, + 5, 99, :_reduce_44, + 3, 101, :_reduce_45, + 4, 102, :_reduce_46, + 3, 103, :_reduce_47, + 3, 103, :_reduce_48, + 2, 103, :_reduce_49, + 3, 90, :_reduce_50, + 2, 90, :_reduce_51, + 9, 104, :_reduce_52, + 6, 105, :_reduce_53, + 7, 105, :_reduce_54, + 5, 106, :_reduce_55, + 7, 106, :_reduce_56, + 5, 107, :_reduce_57, + 5, 108, :_reduce_58, + 3, 109, :_reduce_59, + 3, 109, :_reduce_60, + 3, 109, :_reduce_61, + 3, 109, :_reduce_62, + 3, 109, :_reduce_63, + 3, 109, :_reduce_64, + 3, 109, :_reduce_65, + 3, 109, :_reduce_66, + 3, 109, :_reduce_67, + 3, 109, :_reduce_68, + 4, 110, :_reduce_69, + 3, 110, :_reduce_70, + 2, 111, :_reduce_71, + 2, 111, :_reduce_72, + 2, 113, :_reduce_73, + 2, 113, :_reduce_74, + 3, 115, :_reduce_75, + 3, 115, :_reduce_76, + 2, 115, :_reduce_77, + 3, 115, :_reduce_78, + 3, 115, :_reduce_79, + 3, 115, :_reduce_80, + 2, 115, :_reduce_81, + 2, 115, :_reduce_82, + 3, 115, :_reduce_83, + 3, 115, :_reduce_84, + 3, 115, :_reduce_85, + 3, 115, :_reduce_86, + 3, 115, :_reduce_87, + 3, 115, :_reduce_88, + 3, 115, :_reduce_89, + 3, 115, :_reduce_90, + 3, 115, :_reduce_91, + 3, 115, :_reduce_92, + 1, 115, :_reduce_93, + 1, 115, :_reduce_94, + 3, 115, :_reduce_95, + 3, 115, :_reduce_96, + 3, 115, :_reduce_97, + 3, 115, :_reduce_98, + 3, 115, :_reduce_99, + 3, 115, :_reduce_100, + 3, 115, :_reduce_101, + 3, 115, :_reduce_102, + 3, 115, :_reduce_103, + 3, 115, :_reduce_104, + 1, 115, :_reduce_105, + 1, 115, :_reduce_106, + 1, 115, :_reduce_107, + 1, 115, :_reduce_108, + 1, 115, :_reduce_109, + 1, 115, :_reduce_110, + 1, 115, :_reduce_111, + 1, 115, :_reduce_112, + 1, 115, :_reduce_113, + 3, 126, :_reduce_114, + 3, 126, :_reduce_115, + 1, 126, :_reduce_116, + 1, 126, :_reduce_117, + 3, 127, :_reduce_118, + 3, 127, :_reduce_119, + 3, 127, :_reduce_120, + 3, 127, :_reduce_121, + 3, 127, :_reduce_122, + 3, 127, :_reduce_123, + 3, 128, :_reduce_124, + 2, 128, :_reduce_125, + 1, 128, :_reduce_126, + 2, 119, :_reduce_127, + 1, 119, :_reduce_128, + 2, 116, :_reduce_129, + 3, 120, :_reduce_130, + 1, 120, :_reduce_131, + 3, 125, :_reduce_132, + 2, 125, :_reduce_133, + 1, 118, :_reduce_134, + 1, 118, :_reduce_135, + 1, 118, :_reduce_136, + 1, 118, :_reduce_137, + 0, 118, :_reduce_138, + 3, 130, :_reduce_139, + 2, 130, :_reduce_140, + 2, 129, :_reduce_141, + 1, 129, :_reduce_142, + 1, 131, :_reduce_143, + 1, 131, :_reduce_144, + 3, 132, :_reduce_145, + 1, 132, :_reduce_146, + 3, 124, :_reduce_147, + 2, 124, :_reduce_148, + 2, 133, :_reduce_149, + 1, 133, :_reduce_150, + 3, 89, :_reduce_151, + 1, 89, :_reduce_152, + 2, 117, :_reduce_153, + 1, 117, :_reduce_154, + 3, 134, :_reduce_155, + 3, 134, :_reduce_156, + 1, 134, :_reduce_157, + 3, 112, :_reduce_158, + 1, 112, :_reduce_159, + 1, 88, :_reduce_160, + 1, 88, :_reduce_161, + 1, 88, :_reduce_162, + 1, 122, :_reduce_163, + 1, 122, :_reduce_164, + 1, 122, :_reduce_165, + 1, 122, :_reduce_166, + 1, 122, :_reduce_167, + 7, 121, :_reduce_168, + 1, 114, :_reduce_169, + 1, 114, :_reduce_170, + 1, 123, :_reduce_171 ] + +racc_reduce_n = 172 + +racc_shift_n = 308 + +racc_token_table = { + false => 0, + :error => 1, + :ASS_EQ => 2, + :ADD_EQ => 3, + :SUB_EQ => 4, + :MUL_EQ => 5, + :DIV_EQ => 6, + :MOD_EQ => 7, + :SLL_EQ => 8, + :SRA_EQ => 9, + :SRL_EQ => 10, + :OR => 11, + :AND => 12, + :CMP_LT => 13, + :CMP_GT => 14, + :CMP_EQ => 15, + :CMP_NE => 16, + :CMP_GE => 17, + :CMP_LE => 18, + :SUBSTR_EQ => 19, + :SUBSTR_NE => 20, + :REGEX_EQ => 21, + :REGEX_NE => 22, + :BIT_OR => 23, + :BIT_XOR => 24, + :AMPERSAND => 25, + :BIT_SRA => 26, + :BIT_SRL => 27, + :BIT_SLL => 28, + :ADD => 29, + :SUB => 30, + :MUL => 31, + :DIV => 32, + :MOD => 33, + :NOT => 34, + :UMINUS => 35, + :BIT_NOT => 36, + :EXP => 37, + :INCR => 38, + :DECR => 39, + :COMMENT => 40, + :EXPORT => 41, + :FUNCTION => 42, + :LPAREN => 43, + :RPAREN => 44, + :SEMICOLON => 45, + :BREAK => 46, + :CONTINUE => 47, + :GLOBAL => 48, + :IMPORT => 49, + :INCLUDE => 50, + :LOCAL => 51, + :REP => 52, + :RETURN => 53, + :LBRACE => 54, + :RBRACE => 55, + :FOR => 56, + :FOREACH => 57, + :IN => 58, + :IF => 59, + :ELSE => 60, + :REPEAT => 61, + :UNTIL => 62, + :WHILE => 63, + :COLON => 64, + :COMMA => 65, + :AT_SIGN => 66, + :LBRACK => 67, + :RBRACK => 68, + :PERIOD => 69, + :IDENT => 70, + :INT_DEC => 71, + :INT_HEX => 72, + :INT_OCT => 73, + :FALSE => 74, + :TRUE => 75, + :DATA => 76, + :STRING => 77, + :UNDEF => 78 } + +racc_nt_base = 79 + +racc_use_result_var = false + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "ASS_EQ", + "ADD_EQ", + "SUB_EQ", + "MUL_EQ", + "DIV_EQ", + "MOD_EQ", + "SLL_EQ", + "SRA_EQ", + "SRL_EQ", + "OR", + "AND", + "CMP_LT", + "CMP_GT", + "CMP_EQ", + "CMP_NE", + "CMP_GE", + "CMP_LE", + "SUBSTR_EQ", + "SUBSTR_NE", + "REGEX_EQ", + "REGEX_NE", + "BIT_OR", + "BIT_XOR", + "AMPERSAND", + "BIT_SRA", + "BIT_SRL", + "BIT_SLL", + "ADD", + "SUB", + "MUL", + "DIV", + "MOD", + "NOT", + "UMINUS", + "BIT_NOT", + "EXP", + "INCR", + "DECR", + "COMMENT", + "EXPORT", + "FUNCTION", + "LPAREN", + "RPAREN", + "SEMICOLON", + "BREAK", + "CONTINUE", + "GLOBAL", + "IMPORT", + "INCLUDE", + "LOCAL", + "REP", + "RETURN", + "LBRACE", + "RBRACE", + "FOR", + "FOREACH", + "IN", + "IF", + "ELSE", + "REPEAT", + "UNTIL", + "WHILE", + "COLON", + "COMMA", + "AT_SIGN", + "LBRACK", + "RBRACK", + "PERIOD", + "IDENT", + "INT_DEC", + "INT_HEX", + "INT_OCT", + "FALSE", + "TRUE", + "DATA", + "STRING", + "UNDEF", + "$start", + "start", + "roots", + "root", + "export", + "function", + "statement", + "simple", + "compound", + "ident", + "params", + "block", + "assign", + "break", + "call", + "continue", + "decr", + "empty", + "global", + "import", + "include", + "incr", + "local", + "rep", + "return", + "for", + "foreach", + "if", + "repeat", + "while", + "assign_exp", + "call_exp", + "decr_exp", + "var_decls", + "incr_exp", + "string", + "expr", + "ref", + "statements", + "field", + "lval", + "args", + "ip", + "int", + "undef", + "list_expr", + "array_expr", + "arg", + "kv_pair", + "kv_pairs", + "indexes", + "index", + "list_elem", + "list_elems", + "param", + "var_decl" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'nasl.y', 61) + def _reduce_1(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 63) + def _reduce_2(val, _values) + [] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 67) + def _reduce_3(val, _values) + [val[0]] + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 69) + def _reduce_4(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 73) + def _reduce_5(val, _values) + c(*val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 75) + def _reduce_6(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 77) + def _reduce_7(val, _values) + c(*val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 79) + def _reduce_8(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 81) + def _reduce_9(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 85) + def _reduce_10(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 87) + def _reduce_11(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 95) + def _reduce_12(val, _values) + n(:Export, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 99) + def _reduce_13(val, _values) + n(:Function, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 101) + def _reduce_14(val, _values) + n(:Function, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 105) + def _reduce_15(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 107) + def _reduce_16(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 109) + def _reduce_17(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 111) + def _reduce_18(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 113) + def _reduce_19(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 115) + def _reduce_20(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 117) + def _reduce_21(val, _values) + c(*val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 119) + def _reduce_22(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 121) + def _reduce_23(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 123) + def _reduce_24(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 125) + def _reduce_25(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 127) + def _reduce_26(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 129) + def _reduce_27(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 131) + def _reduce_28(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 135) + def _reduce_29(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 137) + def _reduce_30(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 139) + def _reduce_31(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 141) + def _reduce_32(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 143) + def _reduce_33(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 145) + def _reduce_34(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 153) + def _reduce_35(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 157) + def _reduce_36(val, _values) + n(:Break, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 161) + def _reduce_37(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 165) + def _reduce_38(val, _values) + n(:Continue, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 169) + def _reduce_39(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 173) + def _reduce_40(val, _values) + n(:Empty, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 177) + def _reduce_41(val, _values) + n(:Global, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 181) + def _reduce_42(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 185) + def _reduce_43(val, _values) + n(:Import, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 189) + def _reduce_44(val, _values) + n(:Include, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 193) + def _reduce_45(val, _values) + n(:Local, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 197) + def _reduce_46(val, _values) + n(:Repetition, *val[0..-1]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 201) + def _reduce_47(val, _values) + n(:Return, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 203) + def _reduce_48(val, _values) + n(:Return, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 205) + def _reduce_49(val, _values) + n(:Return, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 213) + def _reduce_50(val, _values) + n(:Block, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 215) + def _reduce_51(val, _values) + n(:Block, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 219) + def _reduce_52(val, _values) + n(:For, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 223) + def _reduce_53(val, _values) + n(:Foreach, val[0], val[1], val[3], val[5]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 225) + def _reduce_54(val, _values) + n(:Foreach, val[0], val[2], val[4], val[6]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 229) + def _reduce_55(val, _values) + n(:If, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 231) + def _reduce_56(val, _values) + n(:If, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 235) + def _reduce_57(val, _values) + n(:Repeat, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 239) + def _reduce_58(val, _values) + n(:While, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 247) + def _reduce_59(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 249) + def _reduce_60(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 251) + def _reduce_61(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 253) + def _reduce_62(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 255) + def _reduce_63(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 257) + def _reduce_64(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 259) + def _reduce_65(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 261) + def _reduce_66(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 263) + def _reduce_67(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 265) + def _reduce_68(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 269) + def _reduce_69(val, _values) + n(:Call, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 271) + def _reduce_70(val, _values) + n(:Call, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 275) + def _reduce_71(val, _values) + n(:Decrement, val[0]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 277) + def _reduce_72(val, _values) + n(:Decrement, val[0]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 281) + def _reduce_73(val, _values) + n(:Increment, val[0]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 283) + def _reduce_74(val, _values) + n(:Increment, val[0]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 287) + def _reduce_75(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 289) + def _reduce_76(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 291) + def _reduce_77(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 293) + def _reduce_78(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 295) + def _reduce_79(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 297) + def _reduce_80(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 299) + def _reduce_81(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 301) + def _reduce_82(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 303) + def _reduce_83(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 305) + def _reduce_84(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 307) + def _reduce_85(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 309) + def _reduce_86(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 311) + def _reduce_87(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 313) + def _reduce_88(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 315) + def _reduce_89(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 317) + def _reduce_90(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 319) + def _reduce_91(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 321) + def _reduce_92(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 323) + def _reduce_93(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 325) + def _reduce_94(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 327) + def _reduce_95(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 329) + def _reduce_96(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 331) + def _reduce_97(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 333) + def _reduce_98(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 335) + def _reduce_99(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 337) + def _reduce_100(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 339) + def _reduce_101(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 341) + def _reduce_102(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 343) + def _reduce_103(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 345) + def _reduce_104(val, _values) + n(:Expression, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 347) + def _reduce_105(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 349) + def _reduce_106(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 351) + def _reduce_107(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 353) + def _reduce_108(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 355) + def _reduce_109(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 357) + def _reduce_110(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 359) + def _reduce_111(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 361) + def _reduce_112(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 363) + def _reduce_113(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 371) + def _reduce_114(val, _values) + n(:Argument, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 373) + def _reduce_115(val, _values) + n(:Argument, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 375) + def _reduce_116(val, _values) + n(:Argument, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 377) + def _reduce_117(val, _values) + n(:Argument, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 381) + def _reduce_118(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 383) + def _reduce_119(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 385) + def _reduce_120(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 387) + def _reduce_121(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 389) + def _reduce_122(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 391) + def _reduce_123(val, _values) + n(:KeyValuePair, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 395) + def _reduce_124(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 397) + def _reduce_125(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 399) + def _reduce_126(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 403) + def _reduce_127(val, _values) + n(:Lvalue, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 405) + def _reduce_128(val, _values) + n(:Lvalue, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 409) + def _reduce_129(val, _values) + n(:Reference, val[1]) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 417) + def _reduce_130(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 419) + def _reduce_131(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 423) + def _reduce_132(val, _values) + n(:Array, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 425) + def _reduce_133(val, _values) + n(:Array, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 429) + def _reduce_134(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 431) + def _reduce_135(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 433) + def _reduce_136(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 435) + def _reduce_137(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 437) + def _reduce_138(val, _values) + nil + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 441) + def _reduce_139(val, _values) + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 443) + def _reduce_140(val, _values) + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 447) + def _reduce_141(val, _values) + [val[0]] + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 449) + def _reduce_142(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 453) + def _reduce_143(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 455) + def _reduce_144(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 459) + def _reduce_145(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 461) + def _reduce_146(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 465) + def _reduce_147(val, _values) + n(:List, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 467) + def _reduce_148(val, _values) + n(:List, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 471) + def _reduce_149(val, _values) + n(:Parameter, val[1], 'reference') + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 473) + def _reduce_150(val, _values) + n(:Parameter, val[0], 'value') + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 477) + def _reduce_151(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 479) + def _reduce_152(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 483) + def _reduce_153(val, _values) + [val[0]] + val[1] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 485) + def _reduce_154(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 489) + def _reduce_155(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 491) + def _reduce_156(val, _values) + n(:Assignment, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 493) + def _reduce_157(val, _values) + val[0] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 497) + def _reduce_158(val, _values) + [val[0]] + val[2] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 499) + def _reduce_159(val, _values) + [val[0]] + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 507) + def _reduce_160(val, _values) + n(:Identifier, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 509) + def _reduce_161(val, _values) + n(:Identifier, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 511) + def _reduce_162(val, _values) + n(:Identifier, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 515) + def _reduce_163(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 517) + def _reduce_164(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 519) + def _reduce_165(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 521) + def _reduce_166(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 523) + def _reduce_167(val, _values) + n(:Integer, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 527) + def _reduce_168(val, _values) + n(:Ip, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 530) + def _reduce_169(val, _values) + n(:String, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 532) + def _reduce_170(val, _values) + n(:String, *val) + end +.,., + +module_eval(<<'.,.,', 'nasl.y', 536) + def _reduce_171(val, _values) + n(:Undefined, *val) + end +.,., + +def _reduce_none(val, _values) + val[0] +end + + end # class Grammar + end # module Nasl + + diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 6f64195f..830aa6a9 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -229,5 +229,13 @@ def test_liquor assert_debugfile 'liquor.y', [0, 0, 0, 0, 15] assert_output 'liquor.y' end + + # .y file from nasl gem + + def test_nasl + assert_compile 'nasl.y' + assert_debugfile 'nasl.y', [0, 0, 0, 0, 1] + assert_output 'nasl.y' + end end end From e0383998bd9da2e207f22f03aecc9b134edb3ed0 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 05:51:32 +0200 Subject: [PATCH 097/619] Add regression test based on grammar.racc from riml gem From the author, Luke Gruber: Of course you can use it. :) Let me know if you have any questions. --- Manifest.txt | 2 + test/assets/riml.y | 665 +++++++ test/regress/riml | 3501 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 4176 insertions(+) create mode 100644 test/assets/riml.y create mode 100644 test/regress/riml diff --git a/Manifest.txt b/Manifest.txt index 8a879b2b..7cf6c1f7 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -84,6 +84,7 @@ test/assets/opal.y test/assets/opt.y test/assets/percent.y test/assets/recv.y +test/assets/riml.y test/assets/rrconf.y test/assets/ruby18.y test/assets/ruby19.y @@ -107,6 +108,7 @@ test/regress/namae test/regress/nasl test/regress/nokogiri-css test/regress/opal +test/regress/riml test/regress/ruby18 test/regress/ruby22 test/scandata/brace diff --git a/test/assets/riml.y b/test/assets/riml.y new file mode 100644 index 00000000..1d99b0fd --- /dev/null +++ b/test/assets/riml.y @@ -0,0 +1,665 @@ +# Copyright (c) 2012-2014 by Luke Gruber +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Riml::Parser + +token IF ELSE ELSEIF THEN UNLESS END +token WHILE UNTIL BREAK CONTINUE +token TRY CATCH FINALLY +token FOR IN +token DEF DEF_BANG SPLAT_PARAM SPLAT_ARG CALL BUILTIN_COMMAND # such as echo "hi" +token CLASS NEW DEFM DEFM_BANG SUPER +token RIML_FILE_COMMAND RIML_CLASS_COMMAND +token RETURN +token NEWLINE +token NUMBER +token STRING_D STRING_S # single- and double-quoted +token EX_LITERAL +token REGEXP +token TRUE FALSE +token LET UNLET UNLET_BANG IDENTIFIER +token DICT_VAL # like dict.key, 'key' is a DICT_VAL +token SCOPE_MODIFIER SCOPE_MODIFIER_LITERAL SPECIAL_VAR_PREFIX +token FINISH + +prechigh + right '!' + left '*' '/' '%' + left '+' '-' '.' + left '>' '>#' '>?' '<' '<#' '=' '>=#' '>=?' '<=' '<=#' '<=?' + left '==' '==?' '==#' '=~' '=~?' '=~#' '!~' '!~?' '!~#' '!=' '!=?' '!=#' + left IS ISNOT + left '&&' + left '||' + right '?' + right '=' '+=' '-=' '.=' + left ',' + left IF UNLESS +preclow + +# All rules +rule + + Root: + /* nothing */ { result = make_node(val) { |_| Riml::Nodes.new([]) } } + | Terminator { result = make_node(val) { |_| Riml::Nodes.new([]) } } + | Statements { result = val[0] } + ; + + # any list of expressions + Statements: + Statement { result = make_node(val) { |v| Riml::Nodes.new([ v[0] ]) } } + | Statements Terminator Statement { result = val[0] << val[2] } + | Statements Terminator { result = val[0] } + | Terminator Statements { result = make_node(val) { |v| Riml::Nodes.new(v[1]) } } + ; + + # All types of expressions in Riml + Statement: + ExplicitCall { result = val[0] } + | Def { result = val[0] } + | Return { result = val[0] } + | UnletVariable { result = val[0] } + | ExLiteral { result = val[0] } + | For { result = val[0] } + | While { result = val[0] } + | Until { result = val[0] } + | Try { result = val[0] } + | ClassDefinition { result = val[0] } + | LoopKeyword { result = val[0] } + | EndScript { result = val[0] } + | RimlFileCommand { result = val[0] } + | RimlClassCommand { result = val[0] } + | MultiAssign { result = val[0] } + | If { result = val[0] } + | Unless { result = val[0] } + | Expression { result = val[0] } + ; + + Expression: + ExpressionWithoutDictLiteral { result = val[0] } + | Dictionary { result = val[0] } + | Dictionary DictGetWithDotLiteral { result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } } + | BinaryOperator { result = val[0] } + | Ternary { result = val[0] } + | Assign { result = val[0] } + | Super { result = val[0] } + | '(' Expression ')' { result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) } } + ; + + ExpressionWithoutDictLiteral: + UnaryOperator { result = val[0] } + | DictGet { result = val[0] } + | ListOrDictGet { result = val[0] } + | AllVariableRetrieval { result = val[0] } + | LiteralWithoutDictLiteral { result = val[0] } + | Call { result = val[0] } + | ObjectInstantiation { result = val[0] } + | '(' ExpressionWithoutDictLiteral ')' { result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) } } + ; + + # for inside curly-brace variable names + PossibleStringValue: + String { result = val[0] } + | DictGet { result = val[0] } + | ListOrDictGet { result = val[0] } + | AllVariableRetrieval { result = val[0] } + | BinaryOperator { result = val[0] } + | Ternary { result = val[0] } + | Call { result = val[0] } + ; + + Terminator: + NEWLINE { result = nil } + | ';' { result = nil } + ; + + LiteralWithoutDictLiteral: + Number { result = val[0] } + | String { result = val[0] } + | Regexp { result = val[0] } + | List { result = val[0] } + | ScopeModifierLiteral { result = val[0] } + | TRUE { result = make_node(val) { |_| Riml::TrueNode.new } } + | FALSE { result = make_node(val) { |_| Riml::FalseNode.new } } + ; + + Number: + NUMBER { result = make_node(val) { |v| Riml::NumberNode.new(v[0]) } } + ; + + String: + STRING_S { result = make_node(val) { |v| Riml::StringNode.new(v[0], :s) } } + | STRING_D { result = make_node(val) { |v| Riml::StringNode.new(v[0], :d) } } + | String STRING_S { result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :s)) } } + | String STRING_D { result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :d)) } } + ; + + Regexp: + REGEXP { result = make_node(val) { |v| Riml::RegexpNode.new(v[0]) } } + ; + + ScopeModifierLiteral: + SCOPE_MODIFIER_LITERAL { result = make_node(val) { |v| Riml::ScopeModifierLiteralNode.new(v[0]) } } + ; + + List: + ListLiteral { result = make_node(val) { |v| Riml::ListNode.new(v[0]) } } + ; + + ListUnpack: + '[' ListItems ';' Expression ']' { result = make_node(val) { |v| Riml::ListUnpackNode.new(v[1] << v[3]) } } + ; + + ListLiteral: + '[' ListItems ']' { result = val[1] } + | '[' ListItems ',' ']' { result = val[1] } + ; + + ListItems: + /* nothing */ { result = [] } + | Expression { result = [val[0]] } + | ListItems ',' Expression { result = val[0] << val[2] } + ; + + Dictionary: + DictionaryLiteral { result = make_node(val) { |v| Riml::DictionaryNode.new(v[0]) } } + ; + + # {'key': 'value', 'key2': 'value2'} + # Save as [['key', 'value'], ['key2', 'value2']] because ruby-1.8.7 offers + # no guarantee for key-value pair ordering. + DictionaryLiteral: + '{' DictItems '}' { result = val[1] } + | '{' DictItems ',' '}' { result = val[1] } + ; + + # [[key, value], [key, value]] + DictItems: + /* nothing */ { result = [] } + | DictItem { result = val } + | DictItems ',' DictItem { result = val[0] << val[2] } + ; + + # [key, value] + DictItem: + Expression ':' Expression { result = [val[0], val[2]] } + ; + + DictGet: + AllVariableRetrieval DictGetWithDot { result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } } + | ListOrDictGet DictGetWithDot { result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } } + | Call DictGetWithDot { result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } } + | '(' Expression ')' DictGetWithDot { result = make_node(val) { |v| Riml::DictGetDotNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) } } + ; + + ListOrDictGet: + ExpressionWithoutDictLiteral ListOrDictGetWithBrackets { result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) } } + | '(' Expression ')' ListOrDictGetWithBrackets { result = make_node(val) { |v| Riml::ListOrDictGetNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) } } + ; + + ListOrDictGetAssign: + ExpressionWithoutDictLiteral ListOrDictGetWithBrackets { result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) } } + ; + + ListOrDictGetWithBrackets: + '[' Expression ']' { result = [val[1]] } + | '[' SubList ']' { result = [val[1]] } + | ListOrDictGetWithBrackets '[' Expression ']' { result = val[0] << val[2] } + | ListOrDictGetWithBrackets '[' SubList ']' { result = val[0] << val[2] } + ; + + SubList: + Expression ':' Expression { result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' : '), v[2]]) } } + | Expression ':' { result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' :')]) } } + | ':' Expression { result = make_node(val) { |v| Riml::SublistNode.new([Riml::LiteralNode.new(': '), v[1]]) } } + | ':' { result = make_node(val) { |_| Riml::SublistNode.new([Riml::LiteralNode.new(':')]) } } + ; + + DictGetWithDot: + DICT_VAL { result = [val[0]] } + | DictGetWithDot DICT_VAL { result = val[0] << val[1] } + ; + + DictGetWithDotLiteral: + '.' IDENTIFIER { result = [val[1]] } + | DictGetWithDotLiteral DICT_VAL { result = val[0] << val[1] } + ; + + Call: + Scope DefCallIdentifier '(' ArgList ')' { result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) } } + | DictGet '(' ArgList ')' { result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) } } + | BUILTIN_COMMAND '(' ArgList ')' { result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) } } + | BUILTIN_COMMAND ArgListWithoutNothing { result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[1]) } } + | BUILTIN_COMMAND NEWLINE { result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], []) } } + | CALL '(' ArgList ')' { result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, nil, v[2]) } } + ; + + ObjectInstantiationCall: + Scope DefCallIdentifier '(' ArgList ')' { result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) } } + | Scope DefCallIdentifier { result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], []) } } + ; + + RimlFileCommand: + RIML_FILE_COMMAND '(' ArgList ')' { result = make_node(val) { |v| Riml::RimlFileCommandNode.new(nil, v[0], v[2]) } } + | RIML_FILE_COMMAND ArgList { result = make_node(val) { |v| Riml::RimlFileCommandNode.new(nil, v[0], v[1]) } } + ; + + RimlClassCommand: + RIML_CLASS_COMMAND '(' ClassArgList ')' { result = make_node(val) { |v| Riml::RimlClassCommandNode.new(nil, v[0], v[2]) } } + | RIML_CLASS_COMMAND ClassArgList { result = make_node(val) { |v| Riml::RimlClassCommandNode.new(nil, v[0], v[1]) } } + ; + + ClassArgList: + Scope IDENTIFIER { result = ["#{val[0]}#{val[1]}"] } + | String { result = val } + | ClassArgList ',' Scope IDENTIFIER { result = val[0].concat ["#{val[2]}#{val[3]}"] } + ; + + ExplicitCall: + CALL Scope DefCallIdentifier '(' ArgList ')' { result = make_node(val) { |v| Riml::ExplicitCallNode.new(v[1], v[2], v[4]) } } + | CALL DictGet '(' ArgList ')' { result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, v[1], v[3]) } } + ; + + Scope: + SCOPE_MODIFIER { result = val[0] } + | /* nothing */ { result = nil } + ; + + # [SID, scope_modifier] + SIDAndScope: + Scope { result = [ nil, val[0] ] } + | '<' IDENTIFIER '>' Scope { result = [ make_node(val) { |v| Riml::SIDNode.new(v[1]) }, val[3] ] } + ; + + ArgList: + /* nothing */ { result = [] } + | ArgListWithoutNothingWithSplat { result = val[0] } + ; + + ArgListWithSplat: + /* nothing */ { result = [] } + | ArgListWithoutNothingWithSplat { result = val[0] } + ; + + ArgListWithoutNothingWithSplat: + Expression { result = val } + | SPLAT_ARG Expression { result = [ make_node(val) { |v| Riml::SplatNode.new(v[1]) } ] } + | ArgListWithoutNothingWithSplat "," Expression { result = val[0] << val[2] } + | ArgListWithoutNothingWithSplat "," SPLAT_ARG Expression { result = val[0] << make_node(val) { |v| Riml::SplatNode.new(v[3]) } } + ; + + ArgListWithoutNothing: + Expression { result = val } + | ArgListWithoutNothing "," Expression { result = val[0] << val[2] } + ; + + BinaryOperator: + Expression '||' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '&&' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '==' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '==#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '==?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + # added by riml + | Expression '===' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '!=' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '!=#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '!=?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '=~' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '=~#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '=~?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '!~' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '!~#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '!~?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '>' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '>#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '>?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '>=' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '>=#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '>=?' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + + | Expression '<' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression '<#' Expression { result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } } + | Expression ' e + raise unless @lexer + if (invalid_token = @lexer.prev_token_is_keyword?) + warning = "#{invalid_token.inspect} is a keyword, and cannot " \ + "be used as a variable name" + end + error_msg = e.message + error_msg << "\nWARNING: #{warning}" if warning + error = Riml::ParseError.new(error_msg, @lexer.filename, @lexer.lineno) + raise error + end + self.class.ast_cache[filename] = ast if filename + end + @ast_rewriter ||= ast_rewriter + return ast unless @ast_rewriter + @ast_rewriter.ast = ast.dup + @ast_rewriter.options ||= options + @ast_rewriter.rewrite(filename, included) + @ast_rewriter.ast + end + + # get the next token from either the list of tokens provided, or + # the lexer getting the next token + def next_token + return @tokens.shift unless @lexer + token = @lexer.next_token + if token && @lexer.parser_info + @current_parser_info = token.pop + end + token + end + + private + + def tokens?(object) + Array === object + end + + def code?(object) + String === object + end + + def make_node(racc_val) + node = yield racc_val + node.parser_info = @current_parser_info + node + end diff --git a/test/regress/riml b/test/regress/riml new file mode 100644 index 00000000..31f430af --- /dev/null +++ b/test/regress/riml @@ -0,0 +1,3501 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "riml.y". +# + +require 'racc/parser.rb' + + require File.expand_path("../lexer", __FILE__) + require File.expand_path("../nodes", __FILE__) + require File.expand_path("../errors", __FILE__) + require File.expand_path("../ast_rewriter", __FILE__) +module Riml + class Parser < Racc::Parser + +module_eval(<<'...end riml.y/module_eval...', 'riml.y', 592) + # This code will be put as-is in the parser class + + attr_accessor :ast_rewriter + attr_writer :options + + # The Parser and AST_Rewriter share this same hash of options + def options + @options ||= {} + end + + def self.ast_cache + @ast_cache + end + @ast_cache = {} + + # parses tokens or code into output nodes + def parse(object, ast_rewriter = Riml::AST_Rewriter.new, filename = nil, included = false) + if (ast = self.class.ast_cache[filename]) + else + if tokens?(object) + @tokens = object + elsif code?(object) + @lexer = Riml::Lexer.new(object, filename, true) + end + + begin + ast = do_parse + rescue Racc::ParseError => e + raise unless @lexer + if (invalid_token = @lexer.prev_token_is_keyword?) + warning = "#{invalid_token.inspect} is a keyword, and cannot " \ + "be used as a variable name" + end + error_msg = e.message + error_msg << "\nWARNING: #{warning}" if warning + error = Riml::ParseError.new(error_msg, @lexer.filename, @lexer.lineno) + raise error + end + self.class.ast_cache[filename] = ast if filename + end + @ast_rewriter ||= ast_rewriter + return ast unless @ast_rewriter + @ast_rewriter.ast = ast.dup + @ast_rewriter.options ||= options + @ast_rewriter.rewrite(filename, included) + @ast_rewriter.ast + end + + # get the next token from either the list of tokens provided, or + # the lexer getting the next token + def next_token + return @tokens.shift unless @lexer + token = @lexer.next_token + if token && @lexer.parser_info + @current_parser_info = token.pop + end + token + end + + private + + def tokens?(object) + Array === object + end + + def code?(object) + String === object + end + + def make_node(racc_val) + node = yield racc_val + node.parser_info = @current_parser_info + node + end +...end riml.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +135, 265, 60, 139, 136, 211, 417, 418, 48, 47, 411, 211, 448, 274, 146, +56, 199, 89, 272, 60, 273, 270, 409, 271, 37, 46, 48, 47, 37, 49, +44, 45, 392, 412, 37, 449, 384, 60, 50, 70, 316, 61, 386, 385, 317, +62, 63, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, +119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, +108, 107, 133, 134, 101, 100, 137, 171, 80, 38, 173, 37, 81, 38, 82, +85, 83, 84, 87, 38, 105, 86, 37, 75, 76, 153, 152, 57, 56, 88, +89, 77, 37, 90, 58, 59, 78, 37, 46, 48, 47, 91, 49, 44, 45, +64, 72, 73, - +116, 161, 60, 50, 70, 79, 61, 272, 37, 92, 62, 63, 271, 48, 47, +-178, -178, -178, -178, 211, 147, 211, 211, 38, 60, -43, -43, 153, 152, 329, 409, 99, 409, 409, 38, 331, 153, 152, -42, - +42, 161, 60, 50, 70, 38, 139, 313, 29, 313, 38, 52, 80, 54, 164, +277, 81, 277, 82, 85, 83, 84, 87, 279, 279, 86, 149, 75, 76, 38, +182, 57, 56, 88, 89, 77, 149, 90, 58, 59, 78, 37, 46, 48, 47, +91, 49, 44, 45, 64, 72, 73, -116, 164, 60, 50, 70, 79, 61, 164, 60, 164, 62, 63, -204, 277, 149, 164, 279, 164, -203, 305, 149, 366, 141, 164, 164, -44, -44, 129, 130, 132, -85, -85, -85, -85, 142, -48, -48, -116, 258, 60, 50, 70, -99, - +98, 60, 50, 70, 29, 149, 38, 52, 80, 54, 371, 149, 81, 52, 82, +85, 83, 84, 87, 149, 139, 86, 164, 75, 76, 164, 139, 57, 56, 88, +89, 77, 105, 90, 58, 59, 78, 37, 46, 48, 47, 91, 49, 44, 45, +64, 72, 73, -99, -98, 60, 50, 70, 79, 61, -46, -46, 370, 62, 63, -175, -175, -175, -175, 139, 129, 130, 132, -47, -47, -45, - +45, 433, 195, 432, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, +123, 118, 119, 120, 124, 125, 126, 164, 354, 29, 211, 38, 52, 80, 54, +153, 152, 81, 60, 82, 85, 83, 84, 87, 149, 60, 86, 105, 75, 76, +417, 437, 57, 56, 88, 89, 77, 105, 90, 58, 59, 78, 215, 46, 48, +47, 91, 49, 44, 45, 64, 72, 73, -116, 216, 60, 50, 70, 79, 61, 139, 218, 319, 62, 63, -175, -175, -175, -175, -178, -178, -178, -178, 211, 147, 48, 47, 211, 49, 48, 47, 262, 49, -176, -176, -176, - +176, 263, 320, 191, 192, 193, 194, 267, 129, 130, 132, 127, 128, 131, 29, +269, 269, 52, 269, 54, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, +122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, +114, 113, 106, 108, 107, 133, 134, 101, 100, 137, 323, 105, 258, 276, 294, +295, 149, 139, 302, 305, 306, 105, 139, 105, 312, 326, 327, 328, 333, 105, +105, 105, 342, 346, 357, 361, 320, 258, 362, 363, 60, 129, 130, 132, 127, +128, 131, 129, 130, 132, 127, 128, 131, 368, 129, 130, 132, 127, 128, 131, +115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, +109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, 105, +80, 129, 130, 132, 81, 105, 82, 85, 83, 84, 87, 374, 105, 86, 377, +75, 76, 379, 380, 57, 56, 88, 89, 77, 393, 90, 58, 59, 78, 37, +46, 48, 47, 91, 49, 44, 45, 64, 72, 73, - +116, 302, 60, 50, 70, 79, 61, 394, 397, 105, 62, 63, 269, 258, 129, +130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, +125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, +134, 101, 29, 400, 38, 52, 80, 54, 401, 402, 81, - +245, 82, 85, 83, 84, 87, 105, 403, 86, 406, 75, 76, 60, 211, 57, +56, 88, 89, 77, 211, 90, 58, 59, 78, 37, 46, 48, 47, 91, 49, +44, 45, 64, 72, 73, 427, 60, 60, 50, 70, 79, 61, 430, 431, 434, +62, 63, 435, 438, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, +123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, +113, 106, 108, 107, 133, 134, 440, 29, 441, 38, 52, 80, 54, 442, 443, +81, 211, 82, 85, 83, 84, 87, 105, 445, 86, 446, 75, 76, 371, 371, +57, 56, 88, 89, 77, 211, 90, 58, 59, 78, 37, 46, 48, 47, 91, +49, 44, 45, 64, 72, 73, 458, 435, 60, 50, 70, 79, 61, 462, 463, +371, 62, 63, 465, 468, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, +122, 123, 118, 119, 120, 124, 125, 126, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 129, 130, 132, nil, 29, nil, 38, 52, 80, 54, nil, +nil, 81, nil, 82, 85, 83, 84, 87, 105, nil, 86, nil, 75, 76, nil, +nil, 57, 56, 88, 89, 77, nil, 90, 58, 59, 78, 37, 46, 48, 47, +91, 49, 44, 45, 64, 72, 73, 105, nil, 60, 50, 70, 79, 61, nil, +nil, nil, 62, 63, nil, nil, 129, 130, 132, 127, 128, 131, 115, 116, 117, +121, 122, 123, 118, 119, 120, 124, 125, 126, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 129, 130, 132, nil, 29, nil, 38, 52, 80, 54, +nil, nil, 81, nil, 82, 85, 83, 84, 87, 105, nil, 86, nil, 75, 76, +nil, nil, 57, 56, 88, 89, 77, nil, 90, 58, 59, 78, 37, 46, 48, +47, 91, 49, 44, 45, 64, 72, 73, 105, nil, 60, 50, 70, 79, 61, +nil, nil, nil, 62, 63, 414, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 29, nil, 38, 52, nil, +54, nil, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, +119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, +108, 107, 133, 134, 101, 100, 137, 419, nil, nil, nil, nil, nil, nil, nil, +nil, 146, 56, nil, 89, 105, nil, 90, nil, nil, nil, nil, 46, 48, 47, +nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, +nil, nil, 62, 63, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, +123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, +113, 106, 108, 107, 133, 134, 101, 100, 137, 29, nil, nil, 52, nil, 54, +nil, 261, 146, 56, nil, 89, nil, 105, 90, nil, nil, nil, nil, 46, 48, +47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, +nil, nil, nil, 62, 63, 180, 146, 56, nil, 89, nil, nil, 90, nil, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, - +116, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, nil, 29, nil, +nil, 52, nil, 54, nil, 261, nil, 129, 130, 132, 127, 128, 131, 115, 116, +117, 121, 122, 123, 118, 119, 120, 124, 125, 126, nil, 180, 146, 56, nil, +89, nil, 176, 90, nil, 52, nil, 54, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, 105, nil, nil, 62, 63, +180, 146, 56, nil, 89, nil, nil, 90, nil, nil, nil, nil, 46, 48, 47, +nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, +nil, nil, 62, 63, nil, 29, - +119, nil, 52, nil, 54, nil, nil, 129, 130, 132, 127, 128, 131, 115, 116, +117, 121, 122, 123, 118, 119, 120, 124, 125, 126, nil, nil, nil, 180, 146, +56, nil, 89, 29, - +119, 90, 52, nil, 54, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, +nil, nil, nil, 60, 50, 70, 105, 61, nil, nil, nil, 62, 63, 180, 146, +56, nil, 89, nil, nil, 90, nil, nil, nil, nil, 46, 48, 47, nil, 49, +44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, +62, 63, nil, 29, - +119, nil, 52, nil, 54, nil, nil, 129, 130, 132, 127, 128, 131, 115, 116, +117, 121, 122, 123, 118, 119, 120, 124, 125, 126, nil, nil, nil, 180, 146, +56, nil, 89, 29, - +119, 90, 52, nil, 54, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, +nil, nil, nil, 60, 50, 70, 105, 61, nil, nil, nil, 62, 63, 180, 146, +56, nil, 89, nil, nil, 90, nil, nil, nil, nil, 46, 48, 47, nil, 49, +44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, +62, 63, nil, 29, - +121, nil, 52, nil, 54, nil, nil, 129, 130, 132, 127, 128, 131, 115, 116, +117, 121, 122, 123, 118, 119, 120, 124, 125, 126, nil, nil, nil, nil, 146, +56, nil, 89, 29, - +119, 90, 52, nil, 54, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, +nil, nil, nil, 60, 50, 70, 105, 61, nil, nil, nil, 62, 63, 180, 146, +56, nil, 89, nil, nil, 90, nil, nil, nil, nil, 46, 48, 47, nil, 49, +44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, +62, 63, nil, 29, nil, nil, 52, nil, 54, 350, nil, 129, 130, 132, 127, +128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, nil, +nil, nil, 180, 146, 56, nil, 89, 29, - +119, 90, 52, nil, 54, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, +nil, nil, nil, 60, 50, 70, 105, 61, nil, nil, nil, 62, 63, 365, 146, +56, nil, 89, nil, nil, 90, nil, nil, nil, nil, 46, 48, 47, nil, 49, +44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, +62, 63, nil, 29, - +119, nil, 52, nil, 54, nil, 129, 130, 132, 127, 128, 131, 115, 116, 117, +121, 122, 123, 118, 119, 120, 124, 125, 126, nil, nil, nil, 180, 146, 56, +nil, 89, nil, 29, 90, nil, 52, nil, 54, 46, 48, 47, nil, 49, 44, +45, 64, nil, nil, nil, nil, 60, 50, 70, 105, 61, nil, nil, nil, 62, +63, 180, 146, 56, nil, 89, nil, nil, 90, nil, nil, nil, nil, 46, 48, +47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, +nil, nil, nil, 62, 63, nil, 29, - +119, nil, 52, nil, 54, nil, nil, 129, 130, 132, 127, 128, 131, 115, 116, +117, 121, 122, 123, 118, 119, 120, 124, 125, 126, nil, nil, nil, nil, 146, +56, nil, 89, 29, - +119, 90, 52, nil, 54, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, +nil, nil, nil, 60, 50, 70, 105, 61, nil, nil, nil, 62, 63, 146, 56, +nil, 89, nil, nil, 90, nil, nil, nil, nil, 46, 48, 47, nil, 49, 44, +45, 64, nil, nil, - +116, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, - +116, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, 167, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 165, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +- +116, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, - +116, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 288, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, - +116, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, nil, nil, 29, nil, nil, 52, 348, 54, 129, +130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, +125, 126, nil, nil, nil, nil, 146, 56, nil, 89, nil, 29, 90, nil, 52, +nil, 54, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, - +116, nil, 60, 50, 70, 105, 61, nil, nil, nil, 62, 63, 146, 56, nil, +89, nil, nil, 90, nil, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 288, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, - +116, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, nil, nil, 46, +48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, +61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, 90, 54, nil, +nil, nil, 46, 48, 47, nil, 49, 44, 45, 64, nil, nil, nil, nil, 60, +50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, 89, nil, 52, +nil, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, nil, nil, nil, +nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, 146, 56, 29, +89, nil, 52, nil, 54, nil, nil, nil, 46, 48, 47, nil, 49, 44, 45, +64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, nil, 62, 63, +146, 56, 188, 89, nil, 52, nil, nil, nil, nil, nil, 46, 48, 47, nil, +49, 44, 45, 64, nil, nil, nil, nil, 60, 50, 70, nil, 61, nil, nil, +nil, 62, 63, nil, nil, 188, nil, nil, 52, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 211, nil, nil, nil, nil, nil, +129, 130, 132, 127, 128, 131, nil, nil, 188, nil, nil, 52, 129, 130, 132, +127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, +102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, +100, 137, 211, 105, nil, nil, nil, nil, 129, 130, 132, 127, 128, 131, nil, +105, nil, nil, nil, nil, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, +122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, +114, 113, 106, 108, 107, 133, 134, 101, 100, 137, 211, 105, nil, nil, nil, +nil, 129, 130, 132, 127, 128, 131, nil, 105, nil, nil, nil, nil, 129, 130, +132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, +126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, +101, 100, 137, 211, 105, nil, nil, nil, nil, 129, 130, 132, 127, 128, 131, +nil, 105, nil, nil, nil, nil, 129, 130, 132, 127, 128, 131, 115, 116, 117, +121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, +112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, 211, 105, nil, nil, +nil, nil, 129, 130, 132, 127, 128, 131, nil, 105, nil, nil, nil, nil, 129, +130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, +125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, +134, 101, 100, 137, 455, 105, nil, nil, nil, nil, 129, 130, 132, 127, 128, +131, nil, 105, nil, nil, nil, nil, 129, 130, 132, 127, 128, 131, 115, 116, +117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, +110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, 460, 105, nil, +nil, nil, 129, 130, 132, 127, 128, 131, nil, nil, 105, nil, nil, nil, nil, +129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, +124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, +133, 134, 101, 100, 137, 105, 129, 130, 132, 127, 128, 131, nil, nil, nil, +nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, +123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, +113, 106, 108, 107, 133, 134, 101, 100, 137, 105, nil, nil, nil, nil, nil, +266, 129, 130, 132, 127, 128, 131, 105, 129, 130, 132, 127, 128, 131, 115, +116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, +111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, +nil, nil, nil, nil, 105, nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, +127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, +102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, +100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 275, +105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, +120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, +107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, +122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, +114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, +115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, +109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, +132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, +126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, +101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, +119, 120, 124, 125, 126, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, +122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, +114, 113, 106, 108, 107, 105, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, +115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, +109, 111, 110, 112, 114, 113, 106, 108, 107, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, +132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, +126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, +101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, +119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, +108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, +121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, +112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 337, 105, 129, 130, 132, 127, 128, +131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, +103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 340, nil, nil, 341, 105, 129, +130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, +125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, +134, 101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, +118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, +106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, 266, +nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, +117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, +110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, +nil, nil, nil, 360, nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, +128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, +104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, +137, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, +129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, +124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, +133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, 360, nil, nil, nil, +nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, +123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, +113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, +116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, +111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, +127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, +102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, +100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, +120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, +107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, +122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, +114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 396, nil, nil, 341, 105, 129, 130, 132, 127, 128, 131, +115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, +109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, +132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, +126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, +101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, 399, nil, nil, +nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, +119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, +108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, +121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, +112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, +131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, +103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, 129, +130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, +125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, +134, 101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, +118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, +106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, +117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, +110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, +128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, +104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, +137, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105, +129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, 123, 118, 119, 120, +124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, 113, 106, 108, 107, +133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, 116, 117, 121, 122, +123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, 111, 110, 112, 114, +113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 105, 129, 130, 132, 127, 128, 131, 115, +116, 117, 121, 122, 123, 118, 119, 120, 124, 125, 126, 102, 104, 103, 109, +111, 110, 112, 114, 113, 106, 108, 107, 133, 134, 101, 100, 137, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 105] + +racc_action_check = [ +22, 143, 74, 143, 22, 333, 376, 376, 182, 182, 370, 369, 433, 157, 57, +57, 74, 57, 155, 182, 157, 155, 369, 155, 3, 57, 57, 57, 93, 57, +57, 57, 333, 370, 376, 433, 330, 57, 57, 57, 202, 57, 330, 330, 202, +57, 57, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 57, 0, 3, 57, 332, 0, 93, 0, +0, 0, 0, 0, 376, 22, 0, 454, 0, 0, 287, 287, 0, 0, 0, +0, 0, 461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 298, 466, 1, 0, 0, +298, 59, 59, 283, 283, 283, 283, 447, 283, 451, 464, 332, 59, 283, 283, +40, 40, 210, 447, 19, 451, 464, 454, 210, 181, 181, 287, 287, 175, 72, +72, 72, 461, 23, 200, 0, 213, 0, 0, 2, 0, 55, 277, 2, 161, +2, 2, 2, 2, 2, 162, 278, 2, 284, 2, 2, 466, 59, 2, 2, +2, 2, 2, 286, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +2, 2, 2, 2, 2, 175, 2, 2, 2, 2, 2, 200, 86, 213, 2, +2, 161, 313, 266, 277, 314, 161, 162, 304, 360, 304, 24, 162, 278, 284, +284, 186, 186, 186, 138, 138, 138, 138, 27, 286, 286, 8, 138, 8, 8, +8, 403, 430, 73, 73, 73, 2, 32, 2, 2, 94, 2, 315, 35, 94, +86, 94, 94, 94, 94, 94, 285, 266, 94, 313, 94, 94, 314, 360, 94, +94, 94, 94, 94, 186, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, +94, 94, 94, 94, 94, 403, 430, 94, 94, 94, 94, 94, 281, 281, 315, +94, 94, 285, 285, 285, 285, 43, 187, 187, 187, 282, 282, 285, 285, 410, +70, 410, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, +222, 222, 222, 222, 222, 290, 290, 94, 87, 94, 94, 95, 94, 387, 387, +95, 88, 95, 95, 95, 95, 95, 33, 89, 95, 187, 95, 95, 416, 416, +95, 95, 95, 95, 95, 222, 95, 95, 95, 95, 90, 95, 95, 95, 95, +95, 95, 95, 95, 95, 95, 95, 92, 95, 95, 95, 95, 95, 96, 97, +203, 95, 95, 33, 33, 33, 33, 31, 31, 31, 31, 331, 31, 331, 331, +386, 331, 386, 386, 140, 386, 42, 42, 42, 42, 141, 203, 66, 66, 66, +66, 146, 235, 235, 235, 235, 235, 235, 95, 148, 150, 95, 151, 95, 203, +203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, +203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, +203, 203, 203, 203, 204, 235, 154, 160, 166, 169, 170, 174, 178, 183, 184, +185, 189, 203, 199, 207, 208, 209, 212, 249, 250, 252, 260, 268, 293, 297, +204, 299, 300, 301, 305, 236, 236, 236, 236, 236, 236, 237, 237, 237, 237, +237, 237, 312, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, +204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, +204, 204, 204, 204, 204, 204, 204, 204, 236, 211, 247, 247, 247, 211, 237, +211, 211, 211, 211, 211, 318, 204, 211, 322, 211, 211, 324, 325, 211, 211, +211, 211, 211, 334, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, +211, 211, 211, 211, 211, 335, 211, 211, 211, 211, 211, 336, 339, 247, 211, +211, 344, 345, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, +220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, +220, 220, 220, 220, 220, 220, 211, 353, 211, 211, 320, 211, 355, 356, 320, +320, 320, 320, 320, 320, 320, 220, 359, 320, 367, 320, 320, 368, 385, 320, +320, 320, 320, 320, 389, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, +320, 320, 320, 320, 320, 391, 392, 320, 320, 320, 320, 320, 404, 408, 411, +320, 320, 412, 417, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, +221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, +221, 221, 221, 221, 221, 221, 420, 320, 421, 320, 320, 438, 320, 422, 423, +438, 425, 438, 438, 438, 438, 438, 221, 428, 438, 429, 438, 438, 432, 434, +438, 438, 438, 438, 438, 445, 438, 438, 438, 438, 438, 438, 438, 438, 438, +438, 438, 438, 438, 438, 438, 448, 449, 438, 438, 438, 438, 438, 456, 457, +458, 438, 438, 459, 467, 223, 223, 223, 223, 223, 223, 223, 223, 223, 223, +223, 223, 223, 223, 223, 223, 223, 223, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 248, 248, 248, nil, 438, nil, 438, 438, 455, 438, nil, +nil, 455, nil, 455, 455, 455, 455, 455, 223, nil, 455, nil, 455, 455, nil, +nil, 455, 455, 455, 455, 455, nil, 455, 455, 455, 455, 455, 455, 455, 455, +455, 455, 455, 455, 455, 455, 455, 248, nil, 455, 455, 455, 455, 455, nil, +nil, nil, 455, 455, nil, nil, 224, 224, 224, 224, 224, 224, 224, 224, 224, +224, 224, 224, 224, 224, 224, 224, 224, 224, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 251, 251, 251, nil, 455, nil, 455, 455, 460, 455, +nil, nil, 460, nil, 460, 460, 460, 460, 460, 224, nil, 460, nil, 460, 460, +nil, nil, 460, 460, 460, 460, 460, nil, 460, 460, 460, 460, 460, 460, 460, +460, 460, 460, 460, 460, 460, 460, 460, 251, nil, 460, 460, 460, 460, 460, +nil, nil, nil, 460, 460, 375, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 460, nil, 460, 460, nil, +460, nil, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, +375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, 375, +375, 375, 375, 375, 375, 375, 375, 378, nil, nil, nil, nil, nil, nil, nil, +nil, 139, 139, nil, 139, 375, nil, 139, nil, nil, nil, nil, 139, 139, 139, +nil, 139, 139, 139, 139, nil, nil, nil, nil, 139, 139, 139, nil, 139, nil, +nil, nil, 139, 139, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, +378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, +378, 378, 378, 378, 378, 378, 378, 378, 378, 139, nil, nil, 139, nil, 139, +nil, 139, 258, 258, nil, 258, nil, 378, 258, nil, nil, nil, nil, 258, 258, +258, nil, 258, 258, 258, 258, nil, nil, nil, nil, 258, 258, 258, nil, 258, +nil, nil, nil, 258, 258, 58, 58, 58, nil, 58, nil, nil, 58, nil, nil, +nil, nil, 58, 58, 58, nil, 58, 58, 58, 58, nil, nil, 58, nil, 58, +58, 58, nil, 58, nil, nil, nil, 58, 58, nil, 258, nil, nil, 258, nil, +258, nil, 258, nil, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, +226, 226, 226, 226, 226, 226, 226, nil, 147, 147, 147, nil, 147, nil, 58, +147, nil, 58, nil, 58, 147, 147, 147, nil, 147, 147, 147, 147, nil, nil, +nil, nil, 147, 147, 147, nil, 147, 226, nil, nil, 147, 147, 165, 165, 165, +nil, 165, nil, nil, 165, nil, nil, nil, nil, 165, 165, 165, nil, 165, 165, +165, 165, nil, nil, nil, nil, 165, 165, 165, nil, 165, nil, nil, nil, 165, +165, nil, 147, 147, nil, 147, nil, 147, nil, nil, 227, 227, 227, 227, 227, +227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, nil, nil, +nil, 171, 171, 171, nil, 171, 165, 165, 171, 165, nil, 165, nil, 171, 171, +171, nil, 171, 171, 171, 171, nil, nil, nil, nil, 171, 171, 171, 227, 171, +nil, nil, nil, 171, 171, 176, 176, 176, nil, 176, nil, nil, 176, nil, nil, +nil, nil, 176, 176, 176, nil, 176, 176, 176, 176, nil, nil, nil, nil, 176, +176, 176, nil, 176, nil, nil, nil, 176, 176, nil, 171, 171, nil, 171, nil, +171, nil, nil, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, +228, 228, 228, 228, 228, 228, nil, nil, nil, 215, 215, 215, nil, 215, 176, +176, 215, 176, nil, 176, nil, 215, 215, 215, nil, 215, 215, 215, 215, nil, +nil, nil, nil, 215, 215, 215, 228, 215, nil, nil, nil, 215, 215, 267, 267, +267, nil, 267, nil, nil, 267, nil, nil, nil, nil, 267, 267, 267, nil, 267, +267, 267, 267, nil, nil, nil, nil, 267, 267, 267, nil, 267, nil, nil, nil, +267, 267, nil, 215, 215, nil, 215, nil, 215, nil, nil, 229, 229, 229, 229, +229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, nil, +nil, nil, nil, 274, 274, nil, 274, 267, 267, 274, 267, nil, 267, nil, 274, +274, 274, nil, 274, 274, 274, 274, nil, nil, nil, nil, 274, 274, 274, 229, +274, nil, nil, nil, 274, 274, 276, 276, 276, nil, 276, nil, nil, 276, nil, +nil, nil, nil, 276, 276, 276, nil, 276, 276, 276, 276, nil, nil, nil, nil, +276, 276, 276, nil, 276, nil, nil, nil, 276, 276, nil, 274, nil, nil, 274, +nil, 274, 274, nil, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, +230, 230, 230, 230, 230, 230, 230, nil, nil, nil, 295, 295, 295, nil, 295, +276, 276, 295, 276, nil, 276, nil, 295, 295, 295, nil, 295, 295, 295, 295, +nil, nil, nil, nil, 295, 295, 295, 230, 295, nil, nil, nil, 295, 295, 302, +302, 302, nil, 302, nil, nil, 302, nil, nil, nil, nil, 302, 302, 302, nil, +302, 302, 302, 302, nil, nil, nil, nil, 302, 302, 302, nil, 302, nil, nil, +nil, 302, 302, nil, 295, 295, nil, 295, nil, 295, nil, 231, 231, 231, 231, +231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, nil, +nil, nil, 362, 362, 362, nil, 362, nil, 302, 362, nil, 302, nil, 302, 362, +362, 362, nil, 362, 362, 362, 362, nil, nil, nil, nil, 362, 362, 362, 231, +362, nil, nil, nil, 362, 362, 393, 393, 393, nil, 393, nil, nil, 393, nil, +nil, nil, nil, 393, 393, 393, nil, 393, 393, 393, 393, nil, nil, nil, nil, +393, 393, 393, nil, 393, nil, nil, nil, 393, 393, nil, 362, 362, nil, 362, +nil, 362, nil, nil, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, +232, 232, 232, 232, 232, 232, 232, nil, nil, nil, nil, 29, 29, nil, 29, +393, 393, 29, 393, nil, 393, nil, 29, 29, 29, nil, 29, 29, 29, 29, +nil, nil, nil, nil, 29, 29, 29, 232, 29, nil, nil, nil, 29, 29, 52, +52, nil, 52, nil, nil, 52, nil, nil, nil, nil, 52, 52, 52, nil, 52, +52, 52, 52, nil, nil, 52, nil, 52, 52, 52, nil, 52, nil, nil, nil, +52, 52, 54, 54, 29, 54, nil, 29, 54, 29, nil, nil, nil, 54, 54, +54, nil, 54, 54, 54, 54, nil, nil, 54, nil, 54, 54, 54, nil, 54, +nil, nil, nil, 54, 54, 56, 56, 52, 56, nil, 52, 56, 52, nil, nil, +56, 56, 56, 56, nil, 56, 56, 56, 56, nil, nil, nil, nil, 56, 56, +56, nil, 56, nil, nil, nil, 56, 56, 61, 61, 54, 61, nil, 54, 61, +54, nil, nil, nil, 61, 61, 61, nil, 61, 61, 61, 61, nil, nil, nil, +nil, 61, 61, 61, nil, 61, nil, nil, nil, 61, 61, 62, 62, 56, 62, +nil, 56, 62, 56, nil, nil, nil, 62, 62, 62, nil, 62, 62, 62, 62, +nil, nil, nil, nil, 62, 62, 62, nil, 62, nil, nil, nil, 62, 62, 63, +63, 61, 63, nil, 61, 63, 61, nil, nil, nil, 63, 63, 63, nil, 63, +63, 63, 63, nil, nil, nil, nil, 63, 63, 63, nil, 63, nil, nil, nil, +63, 63, 78, 78, 62, 78, nil, 62, 78, 62, nil, nil, nil, 78, 78, +78, nil, 78, 78, 78, 78, nil, nil, 78, nil, 78, 78, 78, nil, 78, +nil, nil, nil, 78, 78, 80, 80, 63, 80, nil, 63, 80, 63, nil, nil, +nil, 80, 80, 80, nil, 80, 80, 80, 80, nil, nil, nil, nil, 80, 80, +80, nil, 80, nil, nil, nil, 80, 80, 81, 81, 78, 81, nil, 78, 81, +78, nil, nil, nil, 81, 81, 81, nil, 81, 81, 81, 81, nil, nil, nil, +nil, 81, 81, 81, nil, 81, nil, nil, nil, 81, 81, 82, 82, 80, 82, +nil, 80, 82, 80, nil, nil, nil, 82, 82, 82, nil, 82, 82, 82, 82, +nil, nil, nil, nil, 82, 82, 82, nil, 82, nil, nil, nil, 82, 82, 85, +85, 81, 85, nil, 81, 85, 81, nil, nil, nil, 85, 85, 85, nil, 85, +85, 85, 85, nil, nil, nil, nil, 85, 85, 85, nil, 85, nil, nil, nil, +85, 85, 100, 100, 82, 100, nil, 82, 100, 82, nil, nil, nil, 100, 100, +100, nil, 100, 100, 100, 100, nil, nil, nil, nil, 100, 100, 100, nil, 100, +nil, nil, nil, 100, 100, 101, 101, 85, 101, nil, 85, 101, 85, nil, nil, +nil, 101, 101, 101, nil, 101, 101, 101, 101, nil, nil, nil, nil, 101, 101, +101, nil, 101, nil, nil, nil, 101, 101, 102, 102, 100, 102, nil, 100, 102, +100, nil, nil, nil, 102, 102, 102, nil, 102, 102, 102, 102, nil, nil, nil, +nil, 102, 102, 102, nil, 102, nil, nil, nil, 102, 102, 103, 103, 101, 103, +nil, 101, 103, 101, nil, nil, nil, 103, 103, 103, nil, 103, 103, 103, 103, +nil, nil, nil, nil, 103, 103, 103, nil, 103, nil, nil, nil, 103, 103, 104, +104, 102, 104, nil, 102, 104, 102, nil, nil, nil, 104, 104, 104, nil, 104, +104, 104, 104, nil, nil, nil, nil, 104, 104, 104, nil, 104, nil, nil, nil, +104, 104, 105, 105, 103, 105, nil, 103, 105, 103, nil, nil, nil, 105, 105, +105, nil, 105, 105, 105, 105, nil, nil, nil, nil, 105, 105, 105, nil, 105, +nil, nil, nil, 105, 105, 106, 106, 104, 106, nil, 104, 106, 104, nil, nil, +nil, 106, 106, 106, nil, 106, 106, 106, 106, nil, nil, nil, nil, 106, 106, +106, nil, 106, nil, nil, nil, 106, 106, 107, 107, 105, 107, nil, 105, 107, +105, nil, nil, nil, 107, 107, 107, nil, 107, 107, 107, 107, nil, nil, nil, +nil, 107, 107, 107, nil, 107, nil, nil, nil, 107, 107, 108, 108, 106, 108, +nil, 106, 108, 106, nil, nil, nil, 108, 108, 108, nil, 108, 108, 108, 108, +nil, nil, nil, nil, 108, 108, 108, nil, 108, nil, nil, nil, 108, 108, 109, +109, 107, 109, nil, 107, 109, 107, nil, nil, nil, 109, 109, 109, nil, 109, +109, 109, 109, nil, nil, nil, nil, 109, 109, 109, nil, 109, nil, nil, nil, +109, 109, 110, 110, 108, 110, nil, 108, 110, 108, nil, nil, nil, 110, 110, +110, nil, 110, 110, 110, 110, nil, nil, nil, nil, 110, 110, 110, nil, 110, +nil, nil, nil, 110, 110, 111, 111, 109, 111, nil, 109, 111, 109, nil, nil, +nil, 111, 111, 111, nil, 111, 111, 111, 111, nil, nil, nil, nil, 111, 111, +111, nil, 111, nil, nil, nil, 111, 111, 112, 112, 110, 112, nil, 110, 112, +110, nil, nil, nil, 112, 112, 112, nil, 112, 112, 112, 112, nil, nil, nil, +nil, 112, 112, 112, nil, 112, nil, nil, nil, 112, 112, 113, 113, 111, 113, +nil, 111, 113, 111, nil, nil, nil, 113, 113, 113, nil, 113, 113, 113, 113, +nil, nil, nil, nil, 113, 113, 113, nil, 113, nil, nil, nil, 113, 113, 114, +114, 112, 114, nil, 112, 114, 112, nil, nil, nil, 114, 114, 114, nil, 114, +114, 114, 114, nil, nil, nil, nil, 114, 114, 114, nil, 114, nil, nil, nil, +114, 114, 115, 115, 113, 115, nil, 113, 115, 113, nil, nil, nil, 115, 115, +115, nil, 115, 115, 115, 115, nil, nil, nil, nil, 115, 115, 115, nil, 115, +nil, nil, nil, 115, 115, 116, 116, 114, 116, nil, 114, 116, 114, nil, nil, +nil, 116, 116, 116, nil, 116, 116, 116, 116, nil, nil, nil, nil, 116, 116, +116, nil, 116, nil, nil, nil, 116, 116, 117, 117, 115, 117, nil, 115, 117, +115, nil, nil, nil, 117, 117, 117, nil, 117, 117, 117, 117, nil, nil, nil, +nil, 117, 117, 117, nil, 117, nil, nil, nil, 117, 117, 118, 118, 116, 118, +nil, 116, 118, 116, nil, nil, nil, 118, 118, 118, nil, 118, 118, 118, 118, +nil, nil, nil, nil, 118, 118, 118, nil, 118, nil, nil, nil, 118, 118, 119, +119, 117, 119, nil, 117, 119, 117, nil, nil, nil, 119, 119, 119, nil, 119, +119, 119, 119, nil, nil, nil, nil, 119, 119, 119, nil, 119, nil, nil, nil, +119, 119, 120, 120, 118, 120, nil, 118, 120, 118, nil, nil, nil, 120, 120, +120, nil, 120, 120, 120, 120, nil, nil, nil, nil, 120, 120, 120, nil, 120, +nil, nil, nil, 120, 120, 121, 121, 119, 121, nil, 119, 121, 119, nil, nil, +nil, 121, 121, 121, nil, 121, 121, 121, 121, nil, nil, nil, nil, 121, 121, +121, nil, 121, nil, nil, nil, 121, 121, 122, 122, 120, 122, nil, 120, 122, +120, nil, nil, nil, 122, 122, 122, nil, 122, 122, 122, 122, nil, nil, nil, +nil, 122, 122, 122, nil, 122, nil, nil, nil, 122, 122, 123, 123, 121, 123, +nil, 121, 123, 121, nil, nil, nil, 123, 123, 123, nil, 123, 123, 123, 123, +nil, nil, nil, nil, 123, 123, 123, nil, 123, nil, nil, nil, 123, 123, 124, +124, 122, 124, nil, 122, 124, 122, nil, nil, nil, 124, 124, 124, nil, 124, +124, 124, 124, nil, nil, nil, nil, 124, 124, 124, nil, 124, nil, nil, nil, +124, 124, 125, 125, 123, 125, nil, 123, 125, 123, nil, nil, nil, 125, 125, +125, nil, 125, 125, 125, 125, nil, nil, nil, nil, 125, 125, 125, nil, 125, +nil, nil, nil, 125, 125, 126, 126, 124, 126, nil, 124, 126, 124, nil, nil, +nil, 126, 126, 126, nil, 126, 126, 126, 126, nil, nil, nil, nil, 126, 126, +126, nil, 126, nil, nil, nil, 126, 126, 127, 127, 125, 127, nil, 125, 127, +125, nil, nil, nil, 127, 127, 127, nil, 127, 127, 127, 127, nil, nil, nil, +nil, 127, 127, 127, nil, 127, nil, nil, nil, 127, 127, 128, 128, 126, 128, +nil, 126, 128, 126, nil, nil, nil, 128, 128, 128, nil, 128, 128, 128, 128, +nil, nil, nil, nil, 128, 128, 128, nil, 128, nil, nil, nil, 128, 128, 129, +129, 127, 129, nil, 127, 129, 127, nil, nil, nil, 129, 129, 129, nil, 129, +129, 129, 129, nil, nil, nil, nil, 129, 129, 129, nil, 129, nil, nil, nil, +129, 129, 130, 130, 128, 130, nil, 128, 130, 128, nil, nil, nil, 130, 130, +130, nil, 130, 130, 130, 130, nil, nil, nil, nil, 130, 130, 130, nil, 130, +nil, nil, nil, 130, 130, 131, 131, 129, 131, nil, 129, 131, 129, nil, nil, +nil, 131, 131, 131, nil, 131, 131, 131, 131, nil, nil, nil, nil, 131, 131, +131, nil, 131, nil, nil, nil, 131, 131, 132, 132, 130, 132, nil, 130, 132, +130, nil, nil, nil, 132, 132, 132, nil, 132, 132, 132, 132, nil, nil, nil, +nil, 132, 132, 132, nil, 132, nil, nil, nil, 132, 132, 133, 133, 131, 133, +nil, 131, 133, 131, nil, nil, nil, 133, 133, 133, nil, 133, 133, 133, 133, +nil, nil, nil, nil, 133, 133, 133, nil, 133, nil, nil, nil, 133, 133, 134, +134, 132, 134, nil, 132, 134, 132, nil, nil, nil, 134, 134, 134, nil, 134, +134, 134, 134, nil, nil, nil, nil, 134, 134, 134, nil, 134, nil, nil, nil, +134, 134, 135, 135, 133, 135, nil, 133, 135, 133, nil, nil, nil, 135, 135, +135, nil, 135, 135, 135, 135, nil, nil, nil, nil, 135, 135, 135, nil, 135, +nil, nil, nil, 135, 135, 136, 136, 134, 136, nil, 134, 136, 134, nil, nil, +nil, 136, 136, 136, nil, 136, 136, 136, 136, nil, nil, nil, nil, 136, 136, +136, nil, 136, nil, nil, nil, 136, 136, 137, 137, 135, 137, nil, 135, 137, +135, nil, nil, nil, 137, 137, 137, nil, 137, 137, 137, 137, nil, nil, nil, +nil, 137, 137, 137, nil, 137, nil, nil, nil, 137, 137, 164, 164, 136, 164, +nil, 136, 164, 136, nil, nil, nil, 164, 164, 164, nil, 164, 164, 164, 164, +nil, nil, nil, nil, 164, 164, 164, nil, 164, nil, nil, nil, 164, 164, 173, +173, 137, 173, nil, 137, 173, 137, nil, nil, nil, 173, 173, 173, nil, 173, +173, 173, 173, nil, nil, 173, nil, 173, 173, 173, nil, 173, nil, nil, nil, +173, 173, 180, 180, 164, 180, nil, 164, 180, 164, nil, nil, nil, 180, 180, +180, nil, 180, 180, 180, 180, nil, nil, nil, nil, 180, 180, 180, nil, 180, +nil, nil, nil, 180, 180, 188, 188, 173, 188, nil, 173, 188, 173, nil, nil, +nil, 188, 188, 188, nil, 188, 188, 188, 188, nil, nil, nil, nil, 188, 188, +188, nil, 188, nil, nil, nil, 188, 188, 191, 191, 180, 191, nil, 180, 191, +180, nil, nil, nil, 191, 191, 191, nil, 191, 191, 191, 191, nil, nil, nil, +nil, 191, 191, 191, nil, 191, nil, nil, nil, 191, 191, 192, 192, 188, 192, +nil, 188, 192, 188, nil, nil, nil, 192, 192, 192, nil, 192, 192, 192, 192, +nil, nil, nil, nil, 192, 192, 192, nil, 192, nil, nil, nil, 192, 192, 193, +193, 191, 193, nil, 191, 193, 191, nil, nil, nil, 193, 193, 193, nil, 193, +193, 193, 193, nil, nil, nil, nil, 193, 193, 193, nil, 193, nil, nil, nil, +193, 193, 194, 194, 192, 194, nil, 192, 194, 192, nil, nil, nil, 194, 194, +194, nil, 194, 194, 194, 194, nil, nil, nil, nil, 194, 194, 194, nil, 194, +nil, nil, nil, 194, 194, 261, 261, 193, 261, nil, 193, 261, 193, nil, nil, +nil, 261, 261, 261, nil, 261, 261, 261, 261, nil, nil, 261, nil, 261, 261, +261, nil, 261, nil, nil, nil, 261, 261, 270, 270, 194, 270, nil, 194, 270, +194, nil, nil, nil, 270, 270, 270, nil, 270, 270, 270, 270, nil, nil, nil, +nil, 270, 270, 270, nil, 270, nil, nil, nil, 270, 270, 272, 272, 261, 272, +nil, 261, 272, 261, nil, nil, nil, 272, 272, 272, nil, 272, 272, 272, 272, +nil, nil, nil, nil, 272, 272, 272, nil, 272, nil, nil, nil, 272, 272, 275, +275, 270, 275, nil, 270, 275, 270, nil, nil, nil, 275, 275, 275, nil, 275, +275, 275, 275, nil, nil, nil, nil, 275, 275, 275, nil, 275, nil, nil, nil, +275, 275, nil, nil, 272, nil, nil, 272, 272, 272, 233, 233, 233, 233, 233, +233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, nil, nil, +nil, nil, 288, 288, nil, 288, nil, 275, 288, nil, 275, nil, 275, 288, 288, +288, nil, 288, 288, 288, 288, nil, nil, 288, nil, 288, 288, 288, 233, 288, +nil, nil, nil, 288, 288, 291, 291, nil, 291, nil, nil, 291, nil, nil, nil, +nil, 291, 291, 291, nil, 291, 291, 291, 291, nil, nil, nil, nil, 291, 291, +291, nil, 291, nil, nil, nil, 291, 291, 294, 294, 288, 294, nil, 288, 294, +288, nil, nil, nil, 294, 294, 294, nil, 294, 294, 294, 294, nil, nil, nil, +nil, 294, 294, 294, nil, 294, nil, nil, nil, 294, 294, 316, 316, 291, 316, +nil, 291, 316, 291, nil, nil, nil, 316, 316, 316, nil, 316, 316, 316, 316, +nil, nil, nil, nil, 316, 316, 316, nil, 316, nil, nil, nil, 316, 316, 317, +317, 294, 317, nil, 294, 317, 294, nil, nil, nil, 317, 317, 317, nil, 317, +317, 317, 317, nil, nil, nil, nil, 317, 317, 317, nil, 317, nil, nil, nil, +317, 317, 319, 319, 316, 319, nil, 316, 319, 316, nil, nil, nil, 319, 319, +319, nil, 319, 319, 319, 319, nil, nil, nil, nil, 319, 319, 319, nil, 319, +nil, nil, nil, 319, 319, 323, 323, 317, 323, nil, 317, 323, 317, nil, nil, +nil, 323, 323, 323, nil, 323, 323, 323, 323, nil, nil, nil, nil, 323, 323, +323, nil, 323, nil, nil, nil, 323, 323, 326, 326, 319, 326, nil, 319, 326, +319, nil, nil, nil, 326, 326, 326, nil, 326, 326, 326, 326, nil, nil, nil, +nil, 326, 326, 326, nil, 326, nil, nil, nil, 326, 326, 327, 327, 323, 327, +nil, 323, 327, 323, nil, nil, nil, 327, 327, 327, nil, 327, 327, 327, 327, +nil, nil, nil, nil, 327, 327, 327, nil, 327, nil, nil, nil, 327, 327, 328, +328, 326, 328, nil, 326, 328, 326, nil, nil, nil, 328, 328, 328, nil, 328, +328, 328, 328, nil, nil, nil, nil, 328, 328, 328, nil, 328, nil, nil, nil, +328, 328, 337, 337, 327, 337, nil, 327, 337, 327, nil, nil, nil, 337, 337, +337, nil, 337, 337, 337, 337, nil, nil, nil, nil, 337, 337, 337, nil, 337, +nil, nil, nil, 337, 337, 341, 341, 328, 341, nil, 328, 341, 328, nil, nil, +nil, 341, 341, 341, nil, 341, 341, 341, 341, nil, nil, 341, nil, 341, 341, +341, nil, 341, nil, nil, nil, 341, 341, 365, 365, 337, 365, nil, 337, 365, +337, nil, nil, nil, 365, 365, 365, nil, 365, 365, 365, 365, nil, nil, nil, +nil, 365, 365, 365, nil, 365, nil, nil, nil, 365, 365, 418, 418, 341, 418, +nil, 341, 418, 341, nil, nil, nil, 418, 418, 418, nil, 418, 418, 418, 418, +nil, nil, nil, nil, 418, 418, 418, nil, 418, nil, nil, nil, 418, 418, 435, +435, 365, 435, nil, 365, 435, 365, nil, nil, nil, 435, 435, 435, nil, 435, +435, 435, 435, nil, nil, nil, nil, 435, 435, 435, nil, 435, nil, nil, nil, +435, 435, 437, 437, 418, 437, nil, 418, 437, 418, nil, nil, nil, 437, 437, +437, nil, 437, 437, 437, 437, nil, nil, nil, nil, 437, 437, 437, nil, 437, +nil, nil, nil, 437, 437, 64, 64, 435, 64, nil, 435, nil, 435, nil, nil, +nil, 64, 64, 64, nil, 64, 64, 64, nil, nil, nil, nil, nil, 64, 64, +64, nil, 64, nil, nil, nil, 64, 64, 99, 99, 437, 99, nil, 437, nil, +437, nil, nil, nil, 99, 99, 99, nil, 99, 99, 99, 99, nil, nil, nil, +nil, 99, 99, 99, nil, 99, nil, nil, nil, 99, 99, 142, 142, 64, 142, +nil, 64, nil, nil, nil, nil, nil, 142, 142, 142, nil, 142, 142, 142, 142, +nil, nil, nil, nil, 142, 142, 142, nil, 142, nil, nil, nil, 142, 142, nil, +nil, 99, nil, nil, 99, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 205, nil, nil, nil, nil, nil, 238, 238, 238, 238, +238, 238, nil, nil, 142, nil, nil, 142, 205, 205, 205, 205, 205, 205, 205, +205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, +205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 206, 238, +nil, nil, nil, nil, 239, 239, 239, 239, 239, 239, nil, 205, nil, nil, nil, +nil, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, +206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, +206, 206, 206, 206, 206, 206, 381, 239, nil, nil, nil, nil, 240, 240, 240, +240, 240, 240, nil, 206, nil, nil, nil, nil, 381, 381, 381, 381, 381, 381, +381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, +381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 381, 382, +240, nil, nil, nil, nil, 241, 241, 241, 241, 241, 241, nil, 381, nil, nil, +nil, nil, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, +382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, +382, 382, 382, 382, 382, 382, 382, 383, 241, nil, nil, nil, nil, 242, 242, +242, 242, 242, 242, nil, 382, nil, nil, nil, nil, 383, 383, 383, 383, 383, +383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, +383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, +439, 242, nil, nil, nil, nil, 243, 243, 243, 243, 243, 243, nil, 383, nil, +nil, nil, nil, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, +439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, +439, 439, 439, 439, 439, 439, 439, 439, 453, 243, nil, nil, nil, 244, 244, +244, 244, 244, 244, nil, nil, 439, nil, nil, nil, nil, 453, 453, 453, 453, +453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, +453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, +453, 244, 245, 245, 245, 245, 245, 245, nil, nil, nil, nil, nil, nil, 453, +145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, +145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, +145, 145, 145, 145, 145, 245, nil, nil, nil, nil, nil, 145, 246, 246, 246, +246, 246, 246, 145, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, +156, 156, 156, 156, 156, 156, 156, 156, 156, nil, nil, nil, nil, nil, nil, +246, nil, nil, nil, nil, nil, nil, 156, 159, 159, 159, 159, 159, 159, 159, +159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, +159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 159, 159, 168, 168, 168, +168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, +168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, +168, 168, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +168, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, +179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, +179, 179, 179, 179, 179, 179, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 179, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, +201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, +201, 201, 201, 201, 201, 201, 201, 201, 201, 201, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 201, 225, 225, 225, 225, 225, 225, +225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, +225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 225, 234, 234, +234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, +234, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, +253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, +253, 234, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, +254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, +254, 254, 254, 254, 254, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 254, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, +255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 255, 256, 256, +256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, +256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, +256, 256, 256, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 256, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, +257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, +257, 257, 257, 257, 257, 257, 257, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 257, 257, 259, 259, 259, 259, 259, 259, 259, 259, 259, +259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, +259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 259, nil, nil, 259, 259, 289, 289, 289, 289, 289, +289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, +289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 289, 292, +292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, +292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, +292, 292, 292, 292, nil, nil, nil, nil, nil, nil, 292, nil, nil, nil, nil, +nil, nil, 292, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, +296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, +296, 296, 296, 296, 296, 296, 296, 296, nil, nil, nil, nil, nil, nil, 296, +nil, nil, nil, nil, nil, nil, 296, 303, 303, 303, 303, 303, 303, 303, 303, +303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, +303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 303, 307, 307, 307, 307, +307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, +307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, +307, nil, nil, nil, nil, nil, nil, 307, nil, nil, nil, nil, nil, nil, 307, +308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, +308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, 308, +308, 308, 308, 308, 308, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 308, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, +309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, +309, 309, 309, 309, 309, 309, 309, 309, 309, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 309, 310, 310, 310, 310, 310, 310, 310, +310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, +310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 310, 311, 311, 311, +311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, +311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, +311, 311, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +311, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, +338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, +338, 338, 338, 338, 338, 338, nil, nil, nil, nil, nil, nil, nil, nil, nil, +338, nil, nil, 338, 338, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, +343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, +343, 343, 343, 343, 343, 343, 343, 343, 343, 343, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 343, 347, 347, 347, 347, 347, 347, +347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, +347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 347, nil, nil, nil, 347, 349, 349, +349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, +349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, +349, 349, 349, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 349, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, +352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, +352, 352, 352, 352, 352, 352, 352, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 352, 358, 358, 358, 358, 358, 358, 358, 358, 358, +358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, +358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 358, 364, 364, 364, 364, 364, +364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, +364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, 364, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 364, 372, +372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, +372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, +372, 372, 372, 372, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 372, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, +373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, 373, +373, 373, 373, 373, 373, 373, 373, 373, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 373, 395, 395, 395, 395, 395, 395, 395, 395, +395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, +395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 395, 398, 398, 398, 398, +398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, +398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, +398, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 398, +405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, +405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, +405, 405, 405, 405, 405, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 405, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, +452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, +452, 452, 452, 452, 452, 452, 452, 452, 452, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 452] + +racc_action_pointer = [81, 132, 172, - +7, nil, nil, nil, nil, 209, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 66, nil, nil, - +2, 76, 182, nil, nil, 160, nil, 1805, nil, 328, 219, 324, nil, 225, nil, +nil, nil, nil, 117, nil, 342, 229, nil, nil, nil, nil, nil, nil, nil, nil, +1838, nil, 1871, 82, 1904, - +7, 1155, 103, nil, 1937, 1970, 2003, 4409, nil, 348, nil, nil, nil, 288, nil, +120, 214, - +42, nil, nil, nil, 2036, nil, 2069, 2102, 2135, nil, nil, 2168, 178, 322, 317, +324, 296, nil, 397, - +3, 263, 354, 311, 362, nil, 4442, 2201, 2234, 2267, 2300, 2333, 2366, 2399, 2432, +2465, 2498, 2531, 2564, 2597, 2630, 2663, 2696, 2729, 2762, 2795, 2828, 2861, 2894, 2927, +2960, 2993, 3026, 3059, 3092, 3125, 3158, 3191, 3224, 3257, 3290, 3323, 3356, 3389, 3422, +160, 1045, 381, 388, 4475, -89, nil, 4886, 347, 1218, 401, nil, 402, 404, nil, nil, 394, -70, 4935, - +75, nil, 4984, 398, 137, 143, nil, 3455, 1252, 400, nil, 5033, 400, 447, 1316, +nil, 3488, 399, 121, 1350, nil, 404, 5082, 3521, 126, - +25, 405, 452, 398, 192, 273, 3554, 404, nil, 3587, 3620, 3653, 3686, nil, nil, +nil, nil, 456, 127, 5131, 38, 400, 479, 4519, 4572, 483, 484, 485, 145, 562, +460, 129, nil, 1414, nil, nil, nil, nil, 569, 660, 283, 751, 842, 5180, 1170, +1266, 1364, 1462, 1560, 1657, 1755, 3831, 5229, 388, 466, 472, 4507, 4560, 4613, 4666, +4719, 4772, 4824, 4873, 4928, 516, 780, 406, 407, 871, 408, 5247, 5296, 5345, 5394, +5443, 1121, 5492, 413, 3719, nil, nil, nil, nil, 185, 1448, 417, nil, 3752, nil, +3785, nil, 1512, 3818, 1546, 135, 144, nil, nil, 218, 231, 54, 145, 233, 155, +67, 3881, 5541, 256, 3914, 5590, 418, 3947, 1610, 5639, 419, 42, 419, 423, 423, +1644, 5688, 145, 470, nil, 5737, 5786, 5835, 5884, 5933, 472, 185, 188, 225, 3980, +4013, 568, 4046, 653, nil, 571, 4079, 574, 575, 4112, 4145, 4178, nil, 29, 385, +55, - +26, 499, 517, 521, 4211, 5982, 519, nil, 4244, nil, 6031, 573, 525, nil, 6080, +nil, 6129, nil, nil, 6178, 562, nil, 562, 563, nil, 6227, 577, 191, nil, 1707, +nil, 6276, 4277, nil, 627, 628, -20, - +9, nil, 6325, 6374, nil, 973, 3, nil, 1050, nil, nil, 4625, 4678, 4731, nil, +642, 389, 325, nil, 648, nil, 688, 652, 1741, nil, 6423, nil, nil, 6472, nil, +nil, nil, nil, 213, 612, 6521, nil, nil, 696, nil, 241, 614, 623, nil, nil, +nil, 370, 677, 4310, nil, 734, 736, 741, 742, nil, 720, nil, nil, 716, 670, +214, nil, 721, - +7, 722, 4343, nil, 4376, 744, 4784, nil, nil, nil, nil, nil, 739, nil, 111, +696, 703, nil, 113, 6570, 4837, 66, 835, 786, 787, 753, 791, 926, 76, nil, +nil, 114, nil, 100, 792, nil] + +racc_action_default = [-1, -259, -2, -3, -4, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -29, -30, -31, -32, -116, -34, -35, -36, -37, -38, -39, -40, -49, -50, -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -63, -64, -65, -69, -72, -75, -259, -116, -116, -119, -116, -115, -116, -116, -116, -116, -168, -259, -177, -179, -180, -259, -184, -116, -116, -116, -200, -201, -202, -217, -219, -116, -116, -116, -228, -229, -116, -116, -259, -116, -116, -257, -258, -259, -7, -116, -6, -259, -259, -188, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -116, -83, -116, -28, -259, -116, -26, -31, -259, -259, -116, -80, -94, -79, -81, -61, -62, -182, -259, -70, -259, -76, -259, -259, -183, -185, -189, -116, -116, -101, -102, -127, -35, -37, -116, -54, -69, -259, -259, -116, -107, -120, -123, -116, -111, -116, -109, -259, -164, -165, -166, -116, -259, -167, -116, -116, -116, -116, -181, -186, -187, -117, -259, -259, -218, -214, -259, -259, -259, -259, -259, -259, -259, -237, -245, -259, -259, -255, -116, 469, -5, -183, -170, -129, -130, -131, -132, -133, -134, -135, -136, -137, -138, -139, -140, -141, -142, -143, -144, -145, -146, -147, -148, -149, -150, -151, -152, -153, -154, -155, -156, -157, -158, -159, -160, -161, -162, -163, -222, -225, -259, -116, -259, -259, -93, -97, -96, -169, -41, -33, -116, -259, -95, -116, -67, -116, -73, -116, -116, -116, -259, -190, -191, -192, -29, -30, -35, -36, -37, -39, -52, -75, -259, -259, -116, -123, -259, -116, -116, -123, -259, -259, -83, -259, -259, -116, -124, -259, -116, -110, -259, -171, -172, -173, -174, -259, -204, -203, -207, -116, -116, -259, -116, -116, -246, -259, -116, -259, -259, -116, -116, -116, -234, -259, -259, -244, -259, -105, -122, -259, -116, -259, -259, -86, -91, -87, -92, -82, -84, -99, -259, -68, -71, -74, -77, -78, -259, -193, -259, -259, -100, -128, -259, -259, -103, -116, -106, -125, -116, -108, -259, -116, -259, -208, -205, -215, -216, -220, -259, -244, -223, -259, -227, -230, -259, -259, -259, -235, -259, -259, -243, -238, -259, -242, -259, -116, -116, -256, -226, -88, -89, -90, -66, -98, -194, -195, -114, -259, -126, -112, -118, -259, -206, -259, -259, -209, -210, -221, -247, -248, -259, -116, -224, -259, -259, -259, -259, -240, -259, -239, -253, -259, -259, -113, -196, -207, -259, -207, -116, -249, -116, -116, -259, -231, -232, -233, -236, -241, -259, -104, -259, -259, -211, -212, -259, -213, -259, -250, -116, -259, -259, -207, -259, -116, -251, -254, -197, -259, -198, -252, -259, -199] + +racc_goto_table = [ +2, 154, 3, 95, 27, 169, 27, 96, 210, 98, 390, 170, 148, 281, 155, +151, 183, 369, 413, 260, 389, 415, 172, 318, 322, 1, 282, 217, 140, 356, +284, 286, 209, 351, 166, 214, 97, 200, 335, 336, 190, 207, 410, 202, 177, +330, 416, nil, nil, nil, nil, 208, nil, nil, 154, nil, nil, nil, nil, nil, +nil, 436, nil, nil, nil, 390, nil, nil, nil, nil, nil, 96, 96, 196, 197, +425, nil, nil, nil, nil, nil, 450, nil, nil, nil, 175, nil, 184, nil, nil, +nil, nil, 160, 95, nil, nil, 145, nil, 27, 27, 97, 97, 198, 219, nil, +nil, 181, nil, nil, nil, nil, nil, 283, nil, 97, nil, 212, 213, 285, 156, +nil, 159, nil, 168, nil, 179, 324, 325, 185, 186, 187, 162, 299, 268, 447, +298, 451, 281, 339, 304, 281, 280, nil, 291, nil, 201, 264, 203, 204, 205, +282, 293, 206, 282, 284, 286, nil, 284, 286, nil, 464, nil, 301, nil, nil, +nil, nil, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, +233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, +248, 249, 250, 251, 252, 253, 254, 255, 256, 257, nil, 259, nil, nil, nil, +184, 287, 300, 332, 179, 27, nil, nil, nil, nil, nil, nil, nil, nil, 345, +nil, nil, nil, nil, 181, nil, 289, 292, nil, nil, nil, 283, 315, 296, 283, +156, nil, 285, 292, nil, 285, 344, 303, nil, nil, 334, 162, 388, nil, 391, +307, nil, 280, 308, 309, 310, 311, 353, nil, 148, nil, 151, 291, nil, 355, +nil, nil, nil, nil, nil, nil, 314, nil, nil, nil, nil, 359, 179, nil, nil, +nil, nil, nil, nil, 314, 408, nil, nil, 280, nil, nil, nil, nil, nil, nil, +nil, nil, 420, 421, 422, nil, 423, 424, nil, nil, 426, nil, nil, nil, nil, +nil, nil, nil, 345, nil, nil, nil, 376, nil, 27, 338, nil, nil, 343, nil, +nil, nil, 95, 367, 179, 287, 143, 347, 287, 349, 344, 159, 352, 179, nil, +nil, 444, nil, 404, nil, nil, nil, nil, nil, nil, 159, nil, nil, 289, nil, +nil, 358, 179, nil, 174, nil, 456, nil, 457, 364, nil, 189, 459, nil, nil, +nil, 95, nil, 387, 429, nil, nil, nil, 372, 373, 467, 375, nil, nil, nil, +378, nil, nil, 381, 382, 383, 407, nil, nil, nil, nil, nil, nil, nil, 395, +nil, 189, nil, 398, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +428, nil, nil, nil, nil, nil, nil, nil, nil, 179, nil, nil, 405, 387, nil, +nil, nil, nil, nil, nil, 454, nil, 27, nil, nil, nil, nil, nil, nil, 189, +nil, nil, nil, nil, 95, nil, nil, 461, nil, 27, 179, 95, 466, nil, 27, +nil, 95, nil, nil, nil, nil, nil, 143, nil, nil, nil, nil, nil, 143, nil, +nil, nil, nil, 143, nil, 439, nil, nil, nil, nil, nil, nil, nil, nil, nil, +143, nil, nil, nil, nil, nil, nil, 452, nil, 453] + +racc_goto_check = [ +2, 50, 3, 2, 28, 31, 28, 42, 70, 64, 40, 33, 49, 26, 45, +49, 58, 69, 72, 52, 76, 77, 41, 74, 74, 1, 27, 4, 25, 37, +32, 35, 44, 48, 56, 57, 53, 59, 60, 61, 62, 65, 71, 73, 55, +75, 78, nil, nil, nil, nil, 41, nil, nil, 50, nil, nil, nil, nil, nil, +nil, 77, nil, nil, nil, 40, nil, nil, nil, nil, nil, 42, 42, 64, 64, +76, nil, nil, nil, nil, nil, 72, nil, nil, nil, 53, nil, 53, nil, nil, +nil, nil, 54, 2, nil, nil, 22, nil, 28, 28, 53, 53, 53, 28, nil, +nil, 38, nil, nil, nil, nil, nil, 31, nil, 53, nil, 53, 53, 33, 22, +nil, 22, nil, 22, nil, 22, 70, 70, 22, 22, 22, 66, 50, 55, 69, +45, 69, 26, 52, 58, 26, 67, nil, 67, nil, 22, 28, 22, 22, 22, +27, 55, 22, 27, 32, 35, nil, 32, 35, nil, 69, nil, 55, nil, nil, +nil, nil, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, 22, nil, 22, nil, nil, nil, +53, 38, 54, 3, 22, 28, nil, nil, nil, nil, nil, nil, nil, nil, 50, +nil, nil, nil, nil, 38, nil, 22, 22, nil, nil, nil, 31, 54, 22, 31, +22, nil, 33, 22, nil, 33, 49, 22, nil, nil, 54, 66, 70, nil, 70, +22, nil, 67, 22, 22, 22, 22, 55, nil, 49, nil, 49, 67, nil, 67, +nil, nil, nil, nil, nil, nil, 66, nil, nil, nil, nil, 55, 22, nil, nil, +nil, nil, nil, nil, 66, 70, nil, nil, 67, nil, nil, nil, nil, nil, nil, +nil, nil, 70, 70, 70, nil, 70, 70, nil, nil, 70, nil, nil, nil, nil, +nil, nil, nil, 50, nil, nil, nil, 3, nil, 28, 22, nil, nil, 22, nil, +nil, nil, 2, 53, 22, 38, 23, 22, 38, 22, 49, 22, 22, 22, nil, +nil, 70, nil, 55, nil, nil, nil, nil, nil, nil, 22, nil, nil, 22, nil, +nil, 22, 22, nil, 23, nil, 70, nil, 70, 22, nil, 23, 70, nil, nil, +nil, 2, nil, 38, 55, nil, nil, nil, 22, 22, 70, 22, nil, nil, nil, +22, nil, nil, 22, 22, 22, 53, nil, nil, nil, nil, nil, nil, nil, 22, +nil, 23, nil, 22, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +53, nil, nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, 22, 38, nil, +nil, nil, nil, nil, nil, 3, nil, 28, nil, nil, nil, nil, nil, nil, 23, +nil, nil, nil, nil, 2, nil, nil, 3, nil, 28, 22, 2, 3, nil, 28, +nil, 2, nil, nil, nil, nil, nil, 23, nil, nil, nil, nil, nil, 23, nil, +nil, nil, nil, 23, nil, 22, nil, nil, nil, nil, nil, nil, nil, nil, nil, +23, nil, nil, nil, nil, nil, nil, 22, nil, 22] + +racc_goto_pointer = [nil, 25, 0, 2, - +68, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 67, 307, nil, 4, -151, -138, 4, nil, nil, -52, -134, -46, nil, -133, nil, -262, 47, nil, -321, -35, -1, nil, -54, -38, nil, nil, -241, -20, -42, nil, -120, 28, 37, -14, -22, -54, -43, -37, -177, -176, -24, nil, 1, -45, 76, -21, nil, -298, -79, -328, -352, -35, -180, -165, -311, -355, -330] + +racc_goto_default = [ +nil, nil, 94, 93, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, +15, 16, 17, 18, 19, 20, 21, 22, 23, 24, nil, 25, 26, 144, 28, +30, 31, 32, 33, 34, 35, 36, 290, 40, 39, 41, 42, 43, 51, 67, +nil, 53, 157, 158, 150, 138, 68, nil, 55, nil, 297, nil, nil, nil, nil, +178, nil, 65, 66, 71, 69, 278, 163, 74, nil, 321, nil, nil, nil, nil, +nil, nil, nil, nil] + +racc_reduce_table = [ + 0, 0, :racc_error, + 0, 99, :_reduce_1, + 1, 99, :_reduce_2, + 1, 99, :_reduce_3, + 1, 101, :_reduce_4, + 3, 101, :_reduce_5, + 2, 101, :_reduce_6, + 2, 101, :_reduce_7, + 1, 102, :_reduce_8, + 1, 102, :_reduce_9, + 1, 102, :_reduce_10, + 1, 102, :_reduce_11, + 1, 102, :_reduce_12, + 1, 102, :_reduce_13, + 1, 102, :_reduce_14, + 1, 102, :_reduce_15, + 1, 102, :_reduce_16, + 1, 102, :_reduce_17, + 1, 102, :_reduce_18, + 1, 102, :_reduce_19, + 1, 102, :_reduce_20, + 1, 102, :_reduce_21, + 1, 102, :_reduce_22, + 1, 102, :_reduce_23, + 1, 102, :_reduce_24, + 1, 102, :_reduce_25, + 1, 120, :_reduce_26, + 1, 120, :_reduce_27, + 2, 120, :_reduce_28, + 1, 120, :_reduce_29, + 1, 120, :_reduce_30, + 1, 120, :_reduce_31, + 1, 120, :_reduce_32, + 3, 120, :_reduce_33, + 1, 121, :_reduce_34, + 1, 121, :_reduce_35, + 1, 121, :_reduce_36, + 1, 121, :_reduce_37, + 1, 121, :_reduce_38, + 1, 121, :_reduce_39, + 1, 121, :_reduce_40, + 3, 121, :_reduce_41, + 1, 135, :_reduce_42, + 1, 135, :_reduce_43, + 1, 135, :_reduce_44, + 1, 135, :_reduce_45, + 1, 135, :_reduce_46, + 1, 135, :_reduce_47, + 1, 135, :_reduce_48, + 1, 100, :_reduce_49, + 1, 100, :_reduce_50, + 1, 132, :_reduce_51, + 1, 132, :_reduce_52, + 1, 132, :_reduce_53, + 1, 132, :_reduce_54, + 1, 132, :_reduce_55, + 1, 132, :_reduce_56, + 1, 132, :_reduce_57, + 1, 137, :_reduce_58, + 1, 136, :_reduce_59, + 1, 136, :_reduce_60, + 2, 136, :_reduce_61, + 2, 136, :_reduce_62, + 1, 138, :_reduce_63, + 1, 140, :_reduce_64, + 1, 139, :_reduce_65, + 5, 142, :_reduce_66, + 3, 141, :_reduce_67, + 4, 141, :_reduce_68, + 0, 143, :_reduce_69, + 1, 143, :_reduce_70, + 3, 143, :_reduce_71, + 1, 122, :_reduce_72, + 3, 144, :_reduce_73, + 4, 144, :_reduce_74, + 0, 145, :_reduce_75, + 1, 145, :_reduce_76, + 3, 145, :_reduce_77, + 3, 146, :_reduce_78, + 2, 129, :_reduce_79, + 2, 129, :_reduce_80, + 2, 129, :_reduce_81, + 4, 129, :_reduce_82, + 2, 130, :_reduce_83, + 4, 130, :_reduce_84, + 2, 149, :_reduce_85, + 3, 148, :_reduce_86, + 3, 148, :_reduce_87, + 4, 148, :_reduce_88, + 4, 148, :_reduce_89, + 3, 150, :_reduce_90, + 2, 150, :_reduce_91, + 2, 150, :_reduce_92, + 1, 150, :_reduce_93, + 1, 147, :_reduce_94, + 2, 147, :_reduce_95, + 2, 123, :_reduce_96, + 2, 123, :_reduce_97, + 5, 133, :_reduce_98, + 4, 133, :_reduce_99, + 4, 133, :_reduce_100, + 2, 133, :_reduce_101, + 2, 133, :_reduce_102, + 4, 133, :_reduce_103, + 5, 155, :_reduce_104, + 2, 155, :_reduce_105, + 4, 115, :_reduce_106, + 2, 115, :_reduce_107, + 4, 116, :_reduce_108, + 2, 116, :_reduce_109, + 2, 156, :_reduce_110, + 1, 156, :_reduce_111, + 4, 156, :_reduce_112, + 6, 103, :_reduce_113, + 5, 103, :_reduce_114, + 1, 151, :_reduce_115, + 0, 151, :_reduce_116, + 1, 157, :_reduce_117, + 4, 157, :_reduce_118, + 0, 153, :_reduce_119, + 1, 153, :_reduce_120, + 0, 159, :_reduce_121, + 1, 159, :_reduce_122, + 1, 158, :_reduce_123, + 2, 158, :_reduce_124, + 3, 158, :_reduce_125, + 4, 158, :_reduce_126, + 1, 154, :_reduce_127, + 3, 154, :_reduce_128, + 3, 124, :_reduce_129, + 3, 124, :_reduce_130, + 3, 124, :_reduce_131, + 3, 124, :_reduce_132, + 3, 124, :_reduce_133, + 3, 124, :_reduce_134, + 3, 124, :_reduce_135, + 3, 124, :_reduce_136, + 3, 124, :_reduce_137, + 3, 124, :_reduce_138, + 3, 124, :_reduce_139, + 3, 124, :_reduce_140, + 3, 124, :_reduce_141, + 3, 124, :_reduce_142, + 3, 124, :_reduce_143, + 3, 124, :_reduce_144, + 3, 124, :_reduce_145, + 3, 124, :_reduce_146, + 3, 124, :_reduce_147, + 3, 124, :_reduce_148, + 3, 124, :_reduce_149, + 3, 124, :_reduce_150, + 3, 124, :_reduce_151, + 3, 124, :_reduce_152, + 3, 124, :_reduce_153, + 3, 124, :_reduce_154, + 3, 124, :_reduce_155, + 3, 124, :_reduce_156, + 3, 124, :_reduce_157, + 3, 124, :_reduce_158, + 3, 124, :_reduce_159, + 3, 124, :_reduce_160, + 3, 124, :_reduce_161, + 3, 124, :_reduce_162, + 3, 124, :_reduce_163, + 2, 128, :_reduce_164, + 2, 128, :_reduce_165, + 2, 128, :_reduce_166, + 2, 126, :_reduce_167, + 1, 126, :_reduce_168, + 3, 117, :_reduce_169, + 3, 117, :_reduce_170, + 3, 160, :_reduce_171, + 3, 160, :_reduce_172, + 3, 160, :_reduce_173, + 3, 160, :_reduce_174, + 1, 161, :_reduce_175, + 1, 161, :_reduce_176, + 1, 161, :_reduce_177, + 1, 161, :_reduce_178, + 1, 161, :_reduce_179, + 1, 162, :_reduce_180, + 2, 162, :_reduce_181, + 2, 162, :_reduce_182, + 2, 163, :_reduce_183, + 1, 131, :_reduce_184, + 2, 131, :_reduce_185, + 2, 106, :_reduce_186, + 2, 106, :_reduce_187, + 2, 106, :_reduce_188, + 1, 164, :_reduce_189, + 2, 164, :_reduce_190, + 2, 164, :_reduce_191, + 2, 164, :_reduce_192, + 3, 165, :_reduce_193, + 4, 165, :_reduce_194, + 4, 165, :_reduce_195, + 6, 104, :_reduce_196, + 9, 104, :_reduce_197, + 9, 104, :_reduce_198, + 11, 104, :_reduce_199, + 1, 166, :_reduce_200, + 1, 166, :_reduce_201, + 1, 166, :_reduce_202, + 1, 152, :_reduce_203, + 1, 152, :_reduce_204, + 1, 167, :_reduce_205, + 2, 167, :_reduce_206, + 0, 167, :_reduce_207, + 0, 169, :_reduce_208, + 1, 169, :_reduce_209, + 1, 169, :_reduce_210, + 3, 169, :_reduce_211, + 3, 169, :_reduce_212, + 3, 170, :_reduce_213, + 2, 105, :_reduce_214, + 4, 105, :_reduce_215, + 4, 105, :_reduce_216, + 0, 171, :_reduce_217, + 1, 171, :_reduce_218, + 1, 114, :_reduce_219, + 4, 118, :_reduce_220, + 5, 118, :_reduce_221, + 3, 118, :_reduce_222, + 4, 119, :_reduce_223, + 5, 119, :_reduce_224, + 3, 119, :_reduce_225, + 5, 125, :_reduce_226, + 4, 109, :_reduce_227, + 1, 113, :_reduce_228, + 1, 113, :_reduce_229, + 4, 110, :_reduce_230, + 6, 108, :_reduce_231, + 6, 108, :_reduce_232, + 6, 108, :_reduce_233, + 3, 111, :_reduce_234, + 4, 111, :_reduce_235, + 6, 111, :_reduce_236, + 0, 173, :_reduce_237, + 2, 173, :_reduce_238, + 3, 173, :_reduce_239, + 3, 173, :_reduce_240, + 4, 173, :_reduce_241, + 1, 174, :_reduce_242, + 1, 174, :_reduce_243, + 2, 168, :_reduce_244, + 1, 168, :_reduce_245, + 1, 172, :_reduce_246, + 3, 172, :_reduce_247, + 3, 172, :_reduce_248, + 4, 172, :_reduce_249, + 3, 175, :_reduce_250, + 4, 176, :_reduce_251, + 5, 176, :_reduce_252, + 5, 112, :_reduce_253, + 8, 112, :_reduce_254, + 2, 134, :_reduce_255, + 4, 127, :_reduce_256, + 1, 127, :_reduce_257, + 1, 107, :_reduce_258 ] + +racc_reduce_n = 259 + +racc_shift_n = 469 + +racc_token_table = { + false => 0, + :error => 1, + :IF => 2, + :ELSE => 3, + :ELSEIF => 4, + :THEN => 5, + :UNLESS => 6, + :END => 7, + :WHILE => 8, + :UNTIL => 9, + :BREAK => 10, + :CONTINUE => 11, + :TRY => 12, + :CATCH => 13, + :FINALLY => 14, + :FOR => 15, + :IN => 16, + :DEF => 17, + :DEF_BANG => 18, + :SPLAT_PARAM => 19, + :SPLAT_ARG => 20, + :CALL => 21, + :BUILTIN_COMMAND => 22, + :CLASS => 23, + :NEW => 24, + :DEFM => 25, + :DEFM_BANG => 26, + :SUPER => 27, + :RIML_FILE_COMMAND => 28, + :RIML_CLASS_COMMAND => 29, + :RETURN => 30, + :NEWLINE => 31, + :NUMBER => 32, + :STRING_D => 33, + :STRING_S => 34, + :EX_LITERAL => 35, + :REGEXP => 36, + :TRUE => 37, + :FALSE => 38, + :LET => 39, + :UNLET => 40, + :UNLET_BANG => 41, + :IDENTIFIER => 42, + :DICT_VAL => 43, + :SCOPE_MODIFIER => 44, + :SCOPE_MODIFIER_LITERAL => 45, + :SPECIAL_VAR_PREFIX => 46, + :FINISH => 47, + "!" => 48, + "*" => 49, + "/" => 50, + "%" => 51, + "+" => 52, + "-" => 53, + "." => 54, + ">" => 55, + ">#" => 56, + ">?" => 57, + "<" => 58, + "<#" => 59, + " 60, + ">=" => 61, + ">=#" => 62, + ">=?" => 63, + "<=" => 64, + "<=#" => 65, + "<=?" => 66, + "==" => 67, + "==?" => 68, + "==#" => 69, + "=~" => 70, + "=~?" => 71, + "=~#" => 72, + "!~" => 73, + "!~?" => 74, + "!~#" => 75, + "!=" => 76, + "!=?" => 77, + "!=#" => 78, + :IS => 79, + :ISNOT => 80, + "&&" => 81, + "||" => 82, + "?" => 83, + "=" => 84, + "+=" => 85, + "-=" => 86, + ".=" => 87, + "," => 88, + "(" => 89, + ")" => 90, + ";" => 91, + "[" => 92, + "]" => 93, + "{" => 94, + "}" => 95, + ":" => 96, + "===" => 97 } + +racc_nt_base = 98 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "IF", + "ELSE", + "ELSEIF", + "THEN", + "UNLESS", + "END", + "WHILE", + "UNTIL", + "BREAK", + "CONTINUE", + "TRY", + "CATCH", + "FINALLY", + "FOR", + "IN", + "DEF", + "DEF_BANG", + "SPLAT_PARAM", + "SPLAT_ARG", + "CALL", + "BUILTIN_COMMAND", + "CLASS", + "NEW", + "DEFM", + "DEFM_BANG", + "SUPER", + "RIML_FILE_COMMAND", + "RIML_CLASS_COMMAND", + "RETURN", + "NEWLINE", + "NUMBER", + "STRING_D", + "STRING_S", + "EX_LITERAL", + "REGEXP", + "TRUE", + "FALSE", + "LET", + "UNLET", + "UNLET_BANG", + "IDENTIFIER", + "DICT_VAL", + "SCOPE_MODIFIER", + "SCOPE_MODIFIER_LITERAL", + "SPECIAL_VAR_PREFIX", + "FINISH", + "\"!\"", + "\"*\"", + "\"/\"", + "\"%\"", + "\"+\"", + "\"-\"", + "\".\"", + "\">\"", + "\">#\"", + "\">?\"", + "\"<\"", + "\"<#\"", + "\"=\"", + "\">=#\"", + "\">=?\"", + "\"<=\"", + "\"<=#\"", + "\"<=?\"", + "\"==\"", + "\"==?\"", + "\"==#\"", + "\"=~\"", + "\"=~?\"", + "\"=~#\"", + "\"!~\"", + "\"!~?\"", + "\"!~#\"", + "\"!=\"", + "\"!=?\"", + "\"!=#\"", + "IS", + "ISNOT", + "\"&&\"", + "\"||\"", + "\"?\"", + "\"=\"", + "\"+=\"", + "\"-=\"", + "\".=\"", + "\",\"", + "\"(\"", + "\")\"", + "\";\"", + "\"[\"", + "\"]\"", + "\"{\"", + "\"}\"", + "\":\"", + "\"===\"", + "$start", + "Root", + "Terminator", + "Statements", + "Statement", + "ExplicitCall", + "Def", + "Return", + "UnletVariable", + "ExLiteral", + "For", + "While", + "Until", + "Try", + "ClassDefinition", + "LoopKeyword", + "EndScript", + "RimlFileCommand", + "RimlClassCommand", + "MultiAssign", + "If", + "Unless", + "Expression", + "ExpressionWithoutDictLiteral", + "Dictionary", + "DictGetWithDotLiteral", + "BinaryOperator", + "Ternary", + "Assign", + "Super", + "UnaryOperator", + "DictGet", + "ListOrDictGet", + "AllVariableRetrieval", + "LiteralWithoutDictLiteral", + "Call", + "ObjectInstantiation", + "PossibleStringValue", + "String", + "Number", + "Regexp", + "List", + "ScopeModifierLiteral", + "ListLiteral", + "ListUnpack", + "ListItems", + "DictionaryLiteral", + "DictItems", + "DictItem", + "DictGetWithDot", + "ListOrDictGetWithBrackets", + "ListOrDictGetAssign", + "SubList", + "Scope", + "DefCallIdentifier", + "ArgList", + "ArgListWithoutNothing", + "ObjectInstantiationCall", + "ClassArgList", + "SIDAndScope", + "ArgListWithoutNothingWithSplat", + "ArgListWithSplat", + "AssignExpression", + "AssignLHS", + "VariableRetrieval", + "SimpleVariableRetrieval", + "CurlyBraceName", + "CurlyBraceVarPart", + "FunctionType", + "DefKeywords", + "Block", + "ParamList", + "DefaultParam", + "Returnable", + "IfBlock", + "Catch", + "Catchable", + "ElseBlock", + "ElseifBlock" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'riml.y', 61) + def _reduce_1(val, _values, result) + result = make_node(val) { |_| Riml::Nodes.new([]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 62) + def _reduce_2(val, _values, result) + result = make_node(val) { |_| Riml::Nodes.new([]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 63) + def _reduce_3(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 68) + def _reduce_4(val, _values, result) + result = make_node(val) { |v| Riml::Nodes.new([ v[0] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 69) + def _reduce_5(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 70) + def _reduce_6(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 71) + def _reduce_7(val, _values, result) + result = make_node(val) { |v| Riml::Nodes.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 76) + def _reduce_8(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 77) + def _reduce_9(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 78) + def _reduce_10(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 79) + def _reduce_11(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 80) + def _reduce_12(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 81) + def _reduce_13(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 82) + def _reduce_14(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 83) + def _reduce_15(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 84) + def _reduce_16(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 85) + def _reduce_17(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 86) + def _reduce_18(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 87) + def _reduce_19(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 88) + def _reduce_20(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 89) + def _reduce_21(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 90) + def _reduce_22(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 91) + def _reduce_23(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 92) + def _reduce_24(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 93) + def _reduce_25(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 97) + def _reduce_26(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 98) + def _reduce_27(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 99) + def _reduce_28(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 100) + def _reduce_29(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 101) + def _reduce_30(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 102) + def _reduce_31(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 103) + def _reduce_32(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 104) + def _reduce_33(val, _values, result) + result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 108) + def _reduce_34(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 109) + def _reduce_35(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 110) + def _reduce_36(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 111) + def _reduce_37(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 112) + def _reduce_38(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 113) + def _reduce_39(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 114) + def _reduce_40(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 115) + def _reduce_41(val, _values, result) + result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 120) + def _reduce_42(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 121) + def _reduce_43(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 122) + def _reduce_44(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 123) + def _reduce_45(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 124) + def _reduce_46(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 125) + def _reduce_47(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 126) + def _reduce_48(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 130) + def _reduce_49(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 131) + def _reduce_50(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 135) + def _reduce_51(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 136) + def _reduce_52(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 137) + def _reduce_53(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 138) + def _reduce_54(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 139) + def _reduce_55(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 140) + def _reduce_56(val, _values, result) + result = make_node(val) { |_| Riml::TrueNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 141) + def _reduce_57(val, _values, result) + result = make_node(val) { |_| Riml::FalseNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 145) + def _reduce_58(val, _values, result) + result = make_node(val) { |v| Riml::NumberNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 149) + def _reduce_59(val, _values, result) + result = make_node(val) { |v| Riml::StringNode.new(v[0], :s) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 150) + def _reduce_60(val, _values, result) + result = make_node(val) { |v| Riml::StringNode.new(v[0], :d) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 151) + def _reduce_61(val, _values, result) + result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :s)) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 152) + def _reduce_62(val, _values, result) + result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :d)) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 156) + def _reduce_63(val, _values, result) + result = make_node(val) { |v| Riml::RegexpNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 160) + def _reduce_64(val, _values, result) + result = make_node(val) { |v| Riml::ScopeModifierLiteralNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 164) + def _reduce_65(val, _values, result) + result = make_node(val) { |v| Riml::ListNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 168) + def _reduce_66(val, _values, result) + result = make_node(val) { |v| Riml::ListUnpackNode.new(v[1] << v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 172) + def _reduce_67(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 173) + def _reduce_68(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 177) + def _reduce_69(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 178) + def _reduce_70(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 179) + def _reduce_71(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 183) + def _reduce_72(val, _values, result) + result = make_node(val) { |v| Riml::DictionaryNode.new(v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 190) + def _reduce_73(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 191) + def _reduce_74(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 196) + def _reduce_75(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 197) + def _reduce_76(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 198) + def _reduce_77(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 203) + def _reduce_78(val, _values, result) + result = [val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 207) + def _reduce_79(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 208) + def _reduce_80(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 209) + def _reduce_81(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 210) + def _reduce_82(val, _values, result) + result = make_node(val) { |v| Riml::DictGetDotNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 214) + def _reduce_83(val, _values, result) + result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 215) + def _reduce_84(val, _values, result) + result = make_node(val) { |v| Riml::ListOrDictGetNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 219) + def _reduce_85(val, _values, result) + result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 223) + def _reduce_86(val, _values, result) + result = [val[1]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 224) + def _reduce_87(val, _values, result) + result = [val[1]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 225) + def _reduce_88(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 226) + def _reduce_89(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 230) + def _reduce_90(val, _values, result) + result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' : '), v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 231) + def _reduce_91(val, _values, result) + result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' :')]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 232) + def _reduce_92(val, _values, result) + result = make_node(val) { |v| Riml::SublistNode.new([Riml::LiteralNode.new(': '), v[1]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 233) + def _reduce_93(val, _values, result) + result = make_node(val) { |_| Riml::SublistNode.new([Riml::LiteralNode.new(':')]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 237) + def _reduce_94(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 238) + def _reduce_95(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 242) + def _reduce_96(val, _values, result) + result = [val[1]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 243) + def _reduce_97(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 247) + def _reduce_98(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 248) + def _reduce_99(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 249) + def _reduce_100(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 250) + def _reduce_101(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 251) + def _reduce_102(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], []) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 252) + def _reduce_103(val, _values, result) + result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, nil, v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 256) + def _reduce_104(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 257) + def _reduce_105(val, _values, result) + result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], []) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 261) + def _reduce_106(val, _values, result) + result = make_node(val) { |v| Riml::RimlFileCommandNode.new(nil, v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 262) + def _reduce_107(val, _values, result) + result = make_node(val) { |v| Riml::RimlFileCommandNode.new(nil, v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 266) + def _reduce_108(val, _values, result) + result = make_node(val) { |v| Riml::RimlClassCommandNode.new(nil, v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 267) + def _reduce_109(val, _values, result) + result = make_node(val) { |v| Riml::RimlClassCommandNode.new(nil, v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 271) + def _reduce_110(val, _values, result) + result = ["#{val[0]}#{val[1]}"] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 272) + def _reduce_111(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 273) + def _reduce_112(val, _values, result) + result = val[0].concat ["#{val[2]}#{val[3]}"] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 277) + def _reduce_113(val, _values, result) + result = make_node(val) { |v| Riml::ExplicitCallNode.new(v[1], v[2], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 278) + def _reduce_114(val, _values, result) + result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, v[1], v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 282) + def _reduce_115(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 283) + def _reduce_116(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 288) + def _reduce_117(val, _values, result) + result = [ nil, val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 289) + def _reduce_118(val, _values, result) + result = [ make_node(val) { |v| Riml::SIDNode.new(v[1]) }, val[3] ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 293) + def _reduce_119(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 294) + def _reduce_120(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 298) + def _reduce_121(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 299) + def _reduce_122(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 303) + def _reduce_123(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 304) + def _reduce_124(val, _values, result) + result = [ make_node(val) { |v| Riml::SplatNode.new(v[1]) } ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 305) + def _reduce_125(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 306) + def _reduce_126(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::SplatNode.new(v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 310) + def _reduce_127(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 311) + def _reduce_128(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 315) + def _reduce_129(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 316) + def _reduce_130(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 318) + def _reduce_131(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 319) + def _reduce_132(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 320) + def _reduce_133(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 323) + def _reduce_134(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 325) + def _reduce_135(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 326) + def _reduce_136(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 327) + def _reduce_137(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 329) + def _reduce_138(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 330) + def _reduce_139(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 331) + def _reduce_140(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 333) + def _reduce_141(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 334) + def _reduce_142(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 335) + def _reduce_143(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 337) + def _reduce_144(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 338) + def _reduce_145(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 339) + def _reduce_146(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 341) + def _reduce_147(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 342) + def _reduce_148(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 343) + def _reduce_149(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 345) + def _reduce_150(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 346) + def _reduce_151(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 347) + def _reduce_152(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 349) + def _reduce_153(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 350) + def _reduce_154(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 351) + def _reduce_155(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 353) + def _reduce_156(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 354) + def _reduce_157(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 355) + def _reduce_158(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 356) + def _reduce_159(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 357) + def _reduce_160(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 358) + def _reduce_161(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 360) + def _reduce_162(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 361) + def _reduce_163(val, _values, result) + result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 365) + def _reduce_164(val, _values, result) + result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 366) + def _reduce_165(val, _values, result) + result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 367) + def _reduce_166(val, _values, result) + result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 372) + def _reduce_167(val, _values, result) + result = make_node(val) { |v| Riml::AssignNode.new(v[1][0], v[1][1], v[1][2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 373) + def _reduce_168(val, _values, result) + result = make_node(val) { |v| Riml::AssignNode.new(v[0][0], v[0][1], v[0][2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 377) + def _reduce_169(val, _values, result) + result = make_node(val) { |v| Riml::MultiAssignNode.new([v[0], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 378) + def _reduce_170(val, _values, result) + val[0].assigns << val[2]; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 383) + def _reduce_171(val, _values, result) + result = [val[1], val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 384) + def _reduce_172(val, _values, result) + result = [val[1], val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 385) + def _reduce_173(val, _values, result) + result = [val[1], val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 386) + def _reduce_174(val, _values, result) + result = [val[1], val[0], val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 390) + def _reduce_175(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 391) + def _reduce_176(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 392) + def _reduce_177(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 393) + def _reduce_178(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 394) + def _reduce_179(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 399) + def _reduce_180(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 400) + def _reduce_181(val, _values, result) + result = make_node(val) { |v| Riml::GetSpecialVariableNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 401) + def _reduce_182(val, _values, result) + result = make_node(val) { |v| Riml::GetVariableByScopeAndDictNameNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 405) + def _reduce_183(val, _values, result) + result = make_node(val) { |v| Riml::GetVariableNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 409) + def _reduce_184(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 410) + def _reduce_185(val, _values, result) + result = make_node(val) { |v| Riml::GetCurlyBraceNameNode.new(v[0], v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 414) + def _reduce_186(val, _values, result) + result = make_node(val) { |v| Riml::UnletVariableNode.new('!', [ v[1] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 415) + def _reduce_187(val, _values, result) + result = make_node(val) { |v| Riml::UnletVariableNode.new('!', [ v[1] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 416) + def _reduce_188(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 420) + def _reduce_189(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBraceVariable.new([ v[0] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 421) + def _reduce_190(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBraceVariable.new([ Riml::CurlyBracePart.new(v[0]), v[1] ]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 422) + def _reduce_191(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::CurlyBracePart.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 423) + def _reduce_192(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 427) + def _reduce_193(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBracePart.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 428) + def _reduce_194(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBracePart.new([v[1], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 429) + def _reduce_195(val, _values, result) + result = make_node(val) { |v| Riml::CurlyBracePart.new([v[1], v[2]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 435) + def _reduce_196(val, _values, result) + result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], [], v[3], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 436) + def _reduce_197(val, _values, result) + result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], v[4], v[6], v[7]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 437) + def _reduce_198(val, _values, result) + result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], [v[4]], v[6], v[7]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 438) + def _reduce_199(val, _values, result) + result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], v[4] << v[6], v[8], v[9]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 442) + def _reduce_200(val, _values, result) + result = "DefNode" + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 443) + def _reduce_201(val, _values, result) + result = "DefNode" + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 444) + def _reduce_202(val, _values, result) + result = "DefMethodNode" + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 449) + def _reduce_203(val, _values, result) + result = make_node(val) { |v| Riml::GetCurlyBraceNameNode.new('', v[0]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 450) + def _reduce_204(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 455) + def _reduce_205(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 456) + def _reduce_206(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 457) + def _reduce_207(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 461) + def _reduce_208(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 462) + def _reduce_209(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 463) + def _reduce_210(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 464) + def _reduce_211(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 465) + def _reduce_212(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 469) + def _reduce_213(val, _values, result) + result = make_node(val) { |v| Riml::DefaultParamNode.new(v[0], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 473) + def _reduce_214(val, _values, result) + result = make_node(val) { |v| Riml::ReturnNode.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 474) + def _reduce_215(val, _values, result) + result = make_node(val) { |v| Riml::IfNode.new(v[3], Nodes.new([ReturnNode.new(v[1])])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 475) + def _reduce_216(val, _values, result) + result = make_node(val) { |v| Riml::UnlessNode.new(v[3], Nodes.new([ReturnNode.new(v[1])])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 479) + def _reduce_217(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 480) + def _reduce_218(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 484) + def _reduce_219(val, _values, result) + result = make_node(val) { |_| Riml::FinishNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 489) + def _reduce_220(val, _values, result) + result = make_node(val) { |v| Riml::IfNode.new(v[1], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 490) + def _reduce_221(val, _values, result) + result = make_node(val) { |v| Riml::IfNode.new(v[1], Riml::Nodes.new([v[3]])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 491) + def _reduce_222(val, _values, result) + result = make_node(val) { |v| Riml::IfNode.new(v[2], Riml::Nodes.new([v[0]])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 495) + def _reduce_223(val, _values, result) + result = make_node(val) { |v| Riml::UnlessNode.new(v[1], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 496) + def _reduce_224(val, _values, result) + result = make_node(val) { |v| Riml::UnlessNode.new(v[1], Riml::Nodes.new([v[3]])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 497) + def _reduce_225(val, _values, result) + result = make_node(val) { |v| Riml::UnlessNode.new(v[2], Riml::Nodes.new([v[0]])) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 501) + def _reduce_226(val, _values, result) + result = make_node(val) { |v| Riml::TernaryOperatorNode.new([v[0], v[2], v[4]]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 505) + def _reduce_227(val, _values, result) + result = make_node(val) { |v| Riml::WhileNode.new(v[1], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 509) + def _reduce_228(val, _values, result) + result = make_node(val) { |_| Riml::BreakNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 510) + def _reduce_229(val, _values, result) + result = make_node(val) { |_| Riml::ContinueNode.new } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 514) + def _reduce_230(val, _values, result) + result = make_node(val) { |v| Riml::UntilNode.new(v[1], v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 518) + def _reduce_231(val, _values, result) + result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 519) + def _reduce_232(val, _values, result) + result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 520) + def _reduce_233(val, _values, result) + result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 524) + def _reduce_234(val, _values, result) + result = make_node(val) { |v| Riml::TryNode.new(v[1], nil, nil) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 525) + def _reduce_235(val, _values, result) + result = make_node(val) { |v| Riml::TryNode.new(v[1], v[2], nil) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 526) + def _reduce_236(val, _values, result) + result = make_node(val) { |v| Riml::TryNode.new(v[1], v[2], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 530) + def _reduce_237(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 531) + def _reduce_238(val, _values, result) + result = [ make_node(val) { |v| Riml::CatchNode.new(nil, v[1]) } ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 532) + def _reduce_239(val, _values, result) + result = [ make_node(val) { |v| Riml::CatchNode.new(v[1], v[2]) } ] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 533) + def _reduce_240(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::CatchNode.new(nil, v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 534) + def _reduce_241(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::CatchNode.new(v[2], v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 538) + def _reduce_242(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 539) + def _reduce_243(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 546) + def _reduce_244(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 547) + def _reduce_245(val, _values, result) + result = make_node(val) { |_| Riml::Nodes.new([]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 551) + def _reduce_246(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 552) + def _reduce_247(val, _values, result) + result = val[1] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 553) + def _reduce_248(val, _values, result) + result = val[1] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 554) + def _reduce_249(val, _values, result) + result = val[1] << val[2] << val[3] + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 558) + def _reduce_250(val, _values, result) + result = make_node(val) { |v| Riml::ElseNode.new(v[2]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 562) + def _reduce_251(val, _values, result) + result = make_node(val) { |v| Riml::Nodes.new([Riml::ElseifNode.new(v[1], v[3])]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 563) + def _reduce_252(val, _values, result) + result = val[0] << make_node(val) { |v| Riml::ElseifNode.new(v[2], v[4]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 567) + def _reduce_253(val, _values, result) + result = make_node(val) { |v| Riml::ClassDefinitionNode.new(v[1], v[2], nil, v[3]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 568) + def _reduce_254(val, _values, result) + result = make_node(val) { |v| Riml::ClassDefinitionNode.new(v[1], v[2], (v[4] || ClassDefinitionNode::DEFAULT_SCOPE_MODIFIER) + v[5], v[6]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 572) + def _reduce_255(val, _values, result) + result = make_node(val) { |v| Riml::ObjectInstantiationNode.new(v[1]) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 576) + def _reduce_256(val, _values, result) + result = make_node(val) { |v| Riml::SuperNode.new(v[2], true) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 577) + def _reduce_257(val, _values, result) + result = make_node(val) { |_| Riml::SuperNode.new([], false) } + result + end +.,., + +module_eval(<<'.,.,', 'riml.y', 581) + def _reduce_258(val, _values, result) + result = make_node(val) { |v| Riml::ExLiteralNode.new(v[0]) } + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Riml diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 830aa6a9..a21c64b8 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -237,5 +237,13 @@ def test_nasl assert_debugfile 'nasl.y', [0, 0, 0, 0, 1] assert_output 'nasl.y' end + + # .y file from riml gem + + def test_riml + assert_compile 'riml.y' + assert_debugfile 'riml.y', [289, 0, 0, 0] + assert_output 'riml.y' + end end end From 45416ad9007bf74842235ae17ad8f27ee5eabee5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 05:57:38 +0200 Subject: [PATCH 098/619] Add regression test based on unserializer.y from ruby-php-serialization From the author, Rodrigo Kochenburger: Not at all, go for it. --- Manifest.txt | 2 + test/assets/php_serialization.y | 98 ++++++++++ test/regress/php_serialization | 318 ++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 426 insertions(+) create mode 100644 test/assets/php_serialization.y create mode 100644 test/regress/php_serialization diff --git a/Manifest.txt b/Manifest.txt index 7cf6c1f7..955ff034 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -83,6 +83,7 @@ test/assets/nullbug2.y test/assets/opal.y test/assets/opt.y test/assets/percent.y +test/assets/php_serialization.y test/assets/recv.y test/assets/riml.y test/assets/rrconf.y @@ -108,6 +109,7 @@ test/regress/namae test/regress/nasl test/regress/nokogiri-css test/regress/opal +test/regress/php_serialization test/regress/riml test/regress/ruby18 test/regress/ruby22 diff --git a/test/assets/php_serialization.y b/test/assets/php_serialization.y new file mode 100644 index 00000000..99f78f20 --- /dev/null +++ b/test/assets/php_serialization.y @@ -0,0 +1,98 @@ +# MIT License +# See https://github.com/divoxx/ruby-php-serialization/blob/master/LICENSE.txt + +class PhpSerialization::Unserializer +rule + + data : null ';' { @object = val[0] } + | bool ';' { @object = val[0] } + | integer ';' { @object = val[0] } + | double ';' { @object = val[0] } + | string ';' { @object = val[0] } + | assoc_array { @object = val[0] } + | object { @object = val[0] } + ; + + null : 'N' { result = nil } + ; + + bool : 'b' ':' NUMBER { result = Integer(val[2]) > 0 } + ; + + integer : 'i' ':' NUMBER { result = Integer(val[2]) } + ; + + double : 'd' ':' NUMBER { result = Float(val[2]) } + ; + + string : 's' ':' NUMBER ':' STRING { result = val[4] } + ; + + object : 'O' ':' NUMBER ':' STRING ':' NUMBER ':' '{' attribute_list '}' + { + if eval("defined?(#{val[4]})") + result = Object.const_get(val[4]).new + + val[9].each do |(attr_name, value)| + # Protected and private attributes will have a \0..\0 prefix + attr_name = attr_name.gsub(/\A\\0[^\\]+\\0/, '') + result.instance_variable_set("@#{attr_name}", value) + end + else + klass_name = val[4].gsub(/^Struct::/, '') + attr_names, values = [], [] + + val[9].each do |(attr_name, value)| + # Protected and private attributes will have a \0..\0 prefix + attr_names << attr_name.gsub(/\A\\0[^\\]+\\0/, '') + values << value + end + + result = Struct.new(klass_name, *attr_names).new(*values) + result.instance_variable_set("@_php_class", klass_name) + end + } + ; + + attribute_list : attribute_list attribute { result = val[0] << val[1] } + | { result = [] } + ; + + attribute : data data { result = val } + ; + + assoc_array : 'a' ':' NUMBER ':' '{' attribute_list '}' + { + # Checks if the keys are a sequence of integers + idx = -1 + arr = val[5].all? { |(k,v)| k == (idx += 1) } + + if arr + result = val[5].map { |(k,v)| v } + else + result = Hash[val[5]] + end + } + ; + +end + +---- header ---- +require 'php_serialization/tokenizer' + +---- inner ---- + def initialize(tokenizer_klass = Tokenizer) + @tokenizer_klass = tokenizer_klass + end + + def run(string) + @tokenizer = @tokenizer_klass.new(string) + yyparse(@tokenizer, :each) + return @object + ensure + @tokenizer = nil + end + + def next_token + @tokenizer.next_token + end diff --git a/test/regress/php_serialization b/test/regress/php_serialization new file mode 100644 index 00000000..a75a9e12 --- /dev/null +++ b/test/regress/php_serialization @@ -0,0 +1,318 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "php_serialization.y". +# + +require 'racc/parser.rb' + +require 'php_serialization/tokenizer' + +module PhpSerialization + class Unserializer < Racc::Parser + +module_eval(<<'...end php_serialization.y/module_eval...', 'php_serialization.y', 84) + def initialize(tokenizer_klass = Tokenizer) + @tokenizer_klass = tokenizer_klass + end + + def run(string) + @tokenizer = @tokenizer_klass.new(string) + yyparse(@tokenizer, :each) + return @object + ensure + @tokenizer = nil + end + + def next_token + @tokenizer.next_token + end +...end php_serialization.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +9, 10, 16, 17, 11, 12, 13, 18, 14, 9, 10, 15, 19, 11, 12, +13, 20, 14, 21, 46, 15, 9, 10, 22, 23, 11, 12, 13, 24, 14, +9, 10, 15, 25, 11, 12, 13, 26, 14, 27, 51, 15, 28, 29, 30, +31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 47, 49] + +racc_action_check = [ +0, 0, 1, 2, 0, 0, 0, 3, 0, 42, 42, 0, 4, 42, 42, +42, 5, 42, 6, 42, 42, 45, 45, 10, 11, 45, 45, 45, 12, 45, +50, 50, 45, 13, 50, 50, 50, 14, 50, 15, 50, 50, 16, 22, 23, +24, 25, 26, 27, 32, 33, 34, 35, 36, 37, 39, 41, 43, 47] + +racc_action_pointer = [- +3, 2, 1, 5, 10, 14, 16, nil, nil, nil, 18, 19, 23, 28, 32, +34, 42, nil, nil, nil, nil, nil, 37, 38, 39, 40, 41, 42, nil, nil, +nil, nil, 44, 45, 46, 42, 43, 42, nil, 50, nil, 50, 6, 52, nil, +18, nil, 46, nil, nil, 27, nil] + +racc_action_default = [-18, -18, -18, -18, -18, -18, -18, -6, -7, -8, -18, -18, -18, -18, -18, -18, -18, -1, -2, -3, -4, -5, -18, -18, -18, -18, -18, -18, 52, -9, -10, -11, -18, -18, -18, -18, -18, -18, -12, -18, -15, -18, -18, -18, -14, -18, -17, -18, -16, -15, -18, -13] + +racc_goto_table = [ +1, 42, nil, nil, nil, nil, nil, nil, nil, nil, 50, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +48] + +racc_goto_check = [ +1, 9, nil, nil, nil, nil, nil, nil, nil, nil, 9, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +1] + +racc_goto_pointer = [nil, 0, nil, nil, nil, nil, nil, nil, nil, -39, nil] + +racc_goto_default = [nil, 45, 2, 3, 4, 5, 6, 7, 8, nil, 44] + +racc_reduce_table = [ + 0, 0, :racc_error, + 2, 16, :_reduce_1, + 2, 16, :_reduce_2, + 2, 16, :_reduce_3, + 2, 16, :_reduce_4, + 2, 16, :_reduce_5, + 1, 16, :_reduce_6, + 1, 16, :_reduce_7, + 1, 17, :_reduce_8, + 3, 18, :_reduce_9, + 3, 19, :_reduce_10, + 3, 20, :_reduce_11, + 5, 21, :_reduce_12, + 11, 23, :_reduce_13, + 2, 24, :_reduce_14, + 0, 24, :_reduce_15, + 2, 25, :_reduce_16, + 7, 22, :_reduce_17 ] + +racc_reduce_n = 18 + +racc_shift_n = 52 + +racc_token_table = { + false => 0, + :error => 1, + ";" => 2, + "N" => 3, + "b" => 4, + ":" => 5, + :NUMBER => 6, + "i" => 7, + "d" => 8, + "s" => 9, + :STRING => 10, + "O" => 11, + "{" => 12, + "}" => 13, + "a" => 14 } + +racc_nt_base = 15 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "\";\"", + "\"N\"", + "\"b\"", + "\":\"", + "NUMBER", + "\"i\"", + "\"d\"", + "\"s\"", + "STRING", + "\"O\"", + "\"{\"", + "\"}\"", + "\"a\"", + "$start", + "data", + "null", + "bool", + "integer", + "double", + "string", + "assoc_array", + "object", + "attribute_list", + "attribute" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'php_serialization.y', 6) + def _reduce_1(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 7) + def _reduce_2(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 8) + def _reduce_3(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 9) + def _reduce_4(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 10) + def _reduce_5(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 11) + def _reduce_6(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 12) + def _reduce_7(val, _values, result) + @object = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 15) + def _reduce_8(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 18) + def _reduce_9(val, _values, result) + result = Integer(val[2]) > 0 + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 21) + def _reduce_10(val, _values, result) + result = Integer(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 24) + def _reduce_11(val, _values, result) + result = Float(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 27) + def _reduce_12(val, _values, result) + result = val[4] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 32) + def _reduce_13(val, _values, result) + if eval("defined?(#{val[4]})") + result = Object.const_get(val[4]).new + + val[9].each do |(attr_name, value)| + # Protected and private attributes will have a \0..\0 prefix + attr_name = attr_name.gsub(/\A\\0[^\\]+\\0/, '') + result.instance_variable_set("@#{attr_name}", value) + end + else + klass_name = val[4].gsub(/^Struct::/, '') + attr_names, values = [], [] + + val[9].each do |(attr_name, value)| + # Protected and private attributes will have a \0..\0 prefix + attr_names << attr_name.gsub(/\A\\0[^\\]+\\0/, '') + values << value + end + + result = Struct.new(klass_name, *attr_names).new(*values) + result.instance_variable_set("@_php_class", klass_name) + end + + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 56) + def _reduce_14(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 57) + def _reduce_15(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 60) + def _reduce_16(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'php_serialization.y', 65) + def _reduce_17(val, _values, result) + # Checks if the keys are a sequence of integers + idx = -1 + arr = val[5].all? { |(k,v)| k == (idx += 1) } + + if arr + result = val[5].map { |(k,v)| v } + else + result = Hash[val[5]] + end + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Unserializer + end # module PhpSerialization diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index a21c64b8..3340aa34 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -245,5 +245,13 @@ def test_riml assert_debugfile 'riml.y', [289, 0, 0, 0] assert_output 'riml.y' end + + # .y file from ruby-php-serialization gem + + def test_php_serialization + assert_compile 'php_serialization.y' + assert_debugfile 'php_serialization.y', [0, 0, 0, 0] + assert_output 'php_serialization.y' + end end end From 650dbbd2077144d441a0ca6d4f453eadea931e96 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 20:13:28 +0200 Subject: [PATCH 099/619] Add regression test based on grammar from huia language implementation The author, James Harton, said: You're welcome to it - for what it's worth. The entire repo is licensed MIT, so you can use it however you want as long as you keep the copyright notice. The original repo for the Huia language is: https://github.com/jamesotron/Huia --- Manifest.txt | 2 + test/assets/huia.y | 318 ++++++++ test/regress/huia | 1489 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 1817 insertions(+) create mode 100644 test/assets/huia.y create mode 100644 test/regress/huia diff --git a/Manifest.txt b/Manifest.txt index 955ff034..3d0f41f7 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -64,6 +64,7 @@ test/assets/edtf.y test/assets/err.y test/assets/expect.y test/assets/firstline.y +test/assets/huia.y test/assets/ichk.y test/assets/intp.y test/assets/journey.y @@ -104,6 +105,7 @@ test/regress/bibtex test/regress/csspool test/regress/edtf test/regress/journey +test/regress/huia test/regress/liquor test/regress/namae test/regress/nasl diff --git a/test/assets/huia.y b/test/assets/huia.y new file mode 100644 index 00000000..de9d4515 --- /dev/null +++ b/test/assets/huia.y @@ -0,0 +1,318 @@ +# Copyright (c) 2014 James Harton +# +# MIT License +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class Huia::Parser + + token + IDENTIFIER EQUAL PLUS MINUS ASTERISK FWD_SLASH COLON FLOAT INTEGER STRING + EXPO INDENT OUTDENT OPAREN CPAREN DOT SIGNATURE NL EOF PIPE COMMA NIL TRUE + FALSE EQUALITY CALL SELF CONSTANT CHAR DOUBLE_TICK_STRING + DOUBLE_TICK_STRING_END INTERPOLATE_START INTERPOLATE_END BOX LSQUARE + RSQUARE FACES LFACE RFACE BANG TILDE RETURN NOT_EQUALITY OR AND GT LT + GTE LTE AT + + prechigh + left EXPO + left BANG TILDE + left ASTERISK FWD_SLASH PERCENT + left PLUS MINUS + + right EQUAL + preclow + + rule + statements: statement + | statements statement { return scope } + + statement: expr eol { return scope.append val[0] } + | expr { return scope.append val[0] } + | eol { return scope } + + eol: NL | EOF + nlq: NL | + + expr: literal + | grouped_expr + | binary_op + | unary_op + | method_call + | constant + | variable + | array + | hash + | return + + return: return_expr + | return_nil + return_expr: RETURN expr { return n(:Return, val[1]) } + return_nil: RETURN { return n(:Return, n(:Nil)) } + + array: empty_array + | array_list + + empty_array: BOX { return n :Array } + + array_list: LSQUARE array_items RSQUARE { return val[1] } + array_items: expr { return n :Array, [val[0]] } + | array_items COMMA expr { val[0].append(val[2]); return val[0] } + + hash: empty_hash + | hash_list + empty_hash: FACES { return n :Hash } + hash_list: LFACE hash_items RFACE { return val[1] } + hash_items: hash_item { return n :Hash, val[0] } + | hash_items COMMA hash_item { val[0].append(val[2]); return val[0] } + hash_item: expr COLON expr { return n :HashItem, val[0], val[2] } + + constant: CONSTANT { return constant val[0] } + + indented: indented_w_stmts + | indented_w_expr + | indented_wo_stmts + indented_w_stmts: indent statements outdent { return val[0] } + indented_w_expr: indent expr outdent { return val[0].append(val[1]) } + indented_wo_stmts: indent outdent { return val[0] } + outdent: OUTDENT { return pop_scope } + + + indent_w_args: indent_pipe indent_args PIPE nlq INDENT { return val[0] } + indent_pipe: PIPE { return push_scope } + indent_wo_args: INDENT { return push_scope } + indent: indent_w_args + | indent_wo_args + + indent_args: indent_arg + | indent_args COMMA indent_arg + indent_arg: arg_var { return scope.add_argument val[0] } + | arg_var EQUAL expr { return n :Assignment, val[0], val[2] } + arg_var: IDENTIFIER { return n :Variable, val[0] } + + method_call: method_call_on_object + | method_call_on_self + | method_call_on_closure + method_call_on_object: expr DOT call_signature { return n :MethodCall, val[0], val[2] } + | expr DOT IDENTIFIER { return n :MethodCall, val[0], n(:CallSignature, val[2]) } + method_call_on_self: call_signature { return n :MethodCall, scope_instance, val[0] } + + method_call_on_closure: AT call_signature { return n :MethodCall, this_closure, val[1] } + | AT IDENTIFIER { return n :MethodCall, this_closure, n(:CallSignature, val[1]) } + + call_signature: call_arguments + | call_simple_name + call_simple_name: CALL { return n :CallSignature, val[0] } + call_argument: SIGNATURE call_passed_arg { return n :CallSignature, val[0], [val[1]] } + call_passed_arg: call_passed_simple + | call_passed_indented + call_passed_simple: expr + | expr NL + call_passed_indented: indented + | indented NL + call_arguments: call_argument { return val[0] } + | call_arguments call_argument { return val[0].concat_signature val[1] } + + grouped_expr: OPAREN expr CPAREN { return n :Expression, val[1] } + + variable: IDENTIFIER { return allocate_local val[0] } + + binary_op: assignment + | addition + | subtraction + | multiplication + | division + | exponentiation + | modulo + | equality + | not_equality + | logical_or + | logical_and + | greater_than + | less_than + | greater_or_eq + | less_or_eq + + assignment: IDENTIFIER EQUAL expr { return allocate_local_assignment val[0], val[2] } + addition: expr PLUS expr { return binary val[0], val[2], 'plus:' } + subtraction: expr MINUS expr { return binary val[0], val[2], 'minus:' } + multiplication: expr ASTERISK expr { return binary val[0], val[2], 'multiplyBy:' } + division: expr FWD_SLASH expr { return binary val[0], val[2], 'divideBy:' } + exponentiation: expr EXPO expr { return binary val[0], val[2], 'toThePowerOf:' } + modulo: expr PERCENT expr { return binary val[0], val[2], 'moduloOf:' } + equality: expr EQUALITY expr { return binary val[0], val[2], 'isEqualTo:' } + not_equality: expr NOT_EQUALITY expr { return binary val[0], val[2], 'isNotEqualTo:' } + logical_or: expr OR expr { return binary val[0], val[2], 'logicalOr:' } + logical_and: expr AND expr { return binary val[0], val[2], 'logicalAnd:' } + greater_than: expr GT expr { return binary val[0], val[2], 'isGreaterThan:' } + less_than: expr LT expr { return binary val[0], val[2], 'isLessThan:' } + greater_or_eq: expr GTE expr { return binary val[0], val[2], 'isGreaterOrEqualTo:' } + less_or_eq: expr LTE expr { return binary val[0], val[2], 'isLessOrEqualTo:' } + + unary_op: unary_not + | unary_plus + | unary_minus + | unary_complement + + unary_not: BANG expr { return unary val[1], 'unaryNot' } + unary_plus: PLUS expr { return unary val[1], 'unaryPlus' } + unary_minus: MINUS expr { return unary val[1], 'unaryMinus' } + unary_complement: TILDE expr { return unary val[1], 'unaryComplement' } + + literal: integer + | float + | string + | nil + | true + | false + | self + + float: FLOAT { return n :Float, val[0] } + integer: INTEGER { return n :Integer, val[0] } + nil: NIL { return n :Nil } + true: TRUE { return n :True } + false: FALSE { return n :False } + self: SELF { return n :Self } + + string: STRING { return n :String, val[0] } + | interpolated_string + | empty_string + + interpolated_string: DOUBLE_TICK_STRING interpolated_string_contents DOUBLE_TICK_STRING_END { return val[1] } + interpolation: INTERPOLATE_START expr INTERPOLATE_END { return val[1] } + interpolated_string_contents: interpolated_string_chunk { return n :InterpolatedString, val[0] } + | interpolated_string_contents interpolated_string_chunk { val[0].append(val[1]); return val[0] } + interpolated_string_chunk: chars { return val[0] } + | interpolation { return to_string(val[0]) } + empty_string: DOUBLE_TICK_STRING DOUBLE_TICK_STRING_END { return n :String, '' } + + chars: CHAR { return n :String, val[0] } + | chars CHAR { val[0].append(val[1]); return val[0] } +end + +---- inner + +attr_accessor :lexer, :scopes, :state + +def initialize lexer + @lexer = lexer + @state = [] + @scopes = [] + push_scope +end + +def ast + @ast ||= do_parse + @scopes.first +end + +def on_error t, val, vstack + line = lexer.line + col = lexer.column + message = "Unexpected #{token_to_str t} at #{lexer.filename} line #{line}:#{col}:\n\n" + + start = line - 5 > 0 ? line - 5 : 0 + i_size = line.to_s.size + (start..(start + 5)).each do |i| + message << sprintf("\t%#{i_size}d: %s\n", i, lexer.get_line(i)) + message << "\t#{' ' * i_size} #{'-' * (col - 1)}^\n" if i == line + end + + raise SyntaxError, message +end + +def next_token + nt = lexer.next_computed_token + # just use a state stack for now, we'll have to do something + # more sophisticated soon. + if nt && nt.first == :state + if nt.last + state.push << nt.last + else + state.pop + end + next_token + else + nt + end +end + +def push_scope + new_scope = Huia::AST::Scope.new scope + new_scope.file = lexer.filename + new_scope.line = lexer.line + new_scope.column = lexer.column + scopes.push new_scope + new_scope +end + +def pop_scope + scopes.pop +end + +def scope + scopes.last +end + +def binary left, right, method + node(:MethodCall, left, node(:CallSignature, method, [right])) +end + +def unary left, method + node(:MethodCall, left, node(:CallSignature, method)) +end + +def node type, *args + Huia::AST.const_get(type).new(*args).tap do |n| + n.file = lexer.filename + n.line = lexer.line + n.column = lexer.column + end +end +alias n node + +def allocate_local name + node(:Variable, name).tap do |n| + scope.allocate_local n + end +end + +def allocate_local_assignment name, value + node(:Assignment, name, value).tap do |n| + scope.allocate_local n + end +end + +def this_closure + allocate_local('@') +end + +def scope_instance + node(:ScopeInstance, scope) +end + +def constant name + return scope_instance if name == 'self' + node(:Constant, name) +end + +def to_string expr + node(:MethodCall, expr, node(:CallSignature, 'toString')) +end diff --git a/test/regress/huia b/test/regress/huia new file mode 100644 index 00000000..6c980d26 --- /dev/null +++ b/test/regress/huia @@ -0,0 +1,1489 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "huia.y". +# + +require 'racc/parser.rb' +module Huia + class Parser < Racc::Parser + +module_eval(<<'...end huia.y/module_eval...', 'huia.y', 211) + +attr_accessor :lexer, :scopes, :state + +def initialize lexer + @lexer = lexer + @state = [] + @scopes = [] + push_scope +end + +def ast + @ast ||= do_parse + @scopes.first +end + +def on_error t, val, vstack + line = lexer.line + col = lexer.column + message = "Unexpected #{token_to_str t} at #{lexer.filename} line #{line}:#{col}:\n\n" + + start = line - 5 > 0 ? line - 5 : 0 + i_size = line.to_s.size + (start..(start + 5)).each do |i| + message << sprintf("\t%#{i_size}d: %s\n", i, lexer.get_line(i)) + message << "\t#{' ' * i_size} #{'-' * (col - 1)}^\n" if i == line + end + + raise SyntaxError, message +end + +def next_token + nt = lexer.next_computed_token + # just use a state stack for now, we'll have to do something + # more sophisticated soon. + if nt && nt.first == :state + if nt.last + state.push << nt.last + else + state.pop + end + next_token + else + nt + end +end + +def push_scope + new_scope = Huia::AST::Scope.new scope + new_scope.file = lexer.filename + new_scope.line = lexer.line + new_scope.column = lexer.column + scopes.push new_scope + new_scope +end + +def pop_scope + scopes.pop +end + +def scope + scopes.last +end + +def binary left, right, method + node(:MethodCall, left, node(:CallSignature, method, [right])) +end + +def unary left, method + node(:MethodCall, left, node(:CallSignature, method)) +end + +def node type, *args + Huia::AST.const_get(type).new(*args).tap do |n| + n.file = lexer.filename + n.line = lexer.line + n.column = lexer.column + end +end +alias n node + +def allocate_local name + node(:Variable, name).tap do |n| + scope.allocate_local n + end +end + +def allocate_local_assignment name, value + node(:Assignment, name, value).tap do |n| + scope.allocate_local n + end +end + +def this_closure + allocate_local('@') +end + +def scope_instance + node(:ScopeInstance, scope) +end + +def constant name + return scope_instance if name == 'self' + node(:Constant, name) +end + +def to_string expr + node(:MethodCall, expr, node(:CallSignature, 'toString')) +end +...end huia.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +81, 106, 40, 37, 61, 62, 123, 153, 135, 71, 72, 77, 155, 178, 179, +39, 164, 37, 37, 5, 6, 137, 152, 73, 74, 75, 36, 36, 76, 28, +154, 80, 166, 172, 180, 22, 23, 37, 26, 27, 182, 60, 63, 19, 164, +40, 36, 61, 62, 186, nil, 33, 71, 72, 77, nil, nil, 134, 39, 133, +129, 37, 5, 6, nil, nil, 73, 74, 75, nil, 36, 76, 28, 134, 80, +169, 129, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, +61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, +nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, +nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, +nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, nil, nil, +nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, +23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, +33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, +73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, +26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, +72, 77, nil, 114, nil, 39, nil, nil, 37, nil, nil, 113, nil, 73, 74, +75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, +nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, +nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, +36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, +63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, +nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, +28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, +nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, +nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, +80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, +nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, +37, nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, +nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, +62, nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, nil, +nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, +22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, +nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, +nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, +nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, +71, 72, 77, nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, +74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, +27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, +77, nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, +nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, +60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, +nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, 36, +76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, +19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, +39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, +nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, +40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, +nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, +nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, +61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, +nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, +nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, +nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, nil, nil, +nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, +23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, +33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, +73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, +26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, +72, 77, nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, 74, +75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, +nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, +nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, +36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, +63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, +nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, +28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, +nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, +nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, +80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, +nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, +37, nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, +nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, +62, nil, nil, 33, 71, 72, 77, nil, nil, 160, 39, nil, nil, 37, 5, +6, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, +22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, +nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, +nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, +nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, +71, 72, 77, nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, +74, 75, nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, +27, nil, 60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, +77, nil, nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, +nil, 36, 76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, +60, 63, 19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, +nil, nil, 39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, 36, +76, 28, nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, +19, nil, 40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, +39, nil, nil, 37, nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, +nil, 80, nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, +40, nil, 61, 62, nil, nil, 33, 71, 72, 77, nil, nil, 160, 39, nil, +nil, 37, 5, 6, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, +nil, nil, nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, nil, 40, nil, +61, 62, nil, nil, 33, 71, 72, 77, nil, nil, nil, 39, nil, nil, 37, +nil, nil, nil, nil, 73, 74, 75, nil, 36, 76, 28, nil, 80, nil, nil, +nil, 22, 23, nil, 26, 27, nil, 60, 63, 19, 85, 86, 87, 88, nil, +84, nil, 33, 89, nil, nil, nil, nil, 84, 91, 5, 6, 85, 86, 87, +88, nil, 91, nil, nil, 89, nil, nil, nil, nil, 84, nil, 92, 93, 94, +95, 96, 97, 98, 91, 92, 93, 94, 95, 96, 97, 98, nil, 90, nil, +nil, nil, nil, nil, nil, nil, nil, 92, 93, 94, 95, 96, 97, 98, nil, +90, 85, 86, 87, 88, nil, nil, nil, nil, 89, nil, nil, nil, nil, 84, +nil, 85, 86, 87, 88, 156, nil, nil, 91, 89, nil, nil, nil, nil, 84, +nil, nil, nil, nil, nil, nil, nil, nil, 91, nil, nil, 92, 93, 94, 95, +96, 97, 98, nil, 90, nil, nil, nil, nil, nil, nil, 92, 93, 94, 95, +96, 97, 98, nil, 90, 85, 86, 87, 88, nil, nil, nil, nil, 89, nil, +nil, nil, nil, 84, nil, 165, 85, 86, 87, 88, nil, nil, 91, nil, 89, +nil, nil, nil, 167, 84, nil, nil, nil, nil, nil, nil, nil, nil, 91, nil, +92, 93, 94, 95, 96, 97, 98, nil, 90, nil, nil, nil, nil, nil, nil, +nil, 92, 93, 94, 95, 96, 97, 98, nil, 90, 85, 86, 87, 88, nil, +nil, nil, nil, 89, nil, nil, nil, nil, 84, nil, 85, 86, 87, 88, nil, +nil, nil, 91, 89, nil, nil, nil, nil, 84, nil, nil, nil, nil, nil, nil, +nil, nil, 91, nil, nil, 92, 93, 94, 95, 96, 97, 98, nil, 90, nil, +nil, nil, nil, nil, nil, 92, 93, 94, 95, 96, 97, 98, nil, 90, 85, +86, 87, 88, nil, nil, nil, nil, 89, nil, nil, nil, nil, 84, nil, 85, +86, 87, 88, nil, nil, nil, 91, 89, nil, nil, nil, nil, 84, nil, nil, +nil, nil, nil, nil, nil, nil, 91, nil, nil, 92, 93, 94, 95, 96, 97, +98, nil, 90, nil, nil, nil, nil, nil, nil, 92, 93, 94, 95, 96, 97, +98, nil, 90, 85, 86, 87, 88, nil, nil, nil, nil, 89, nil, nil, nil, +nil, 84, nil, 85, 86, 87, 88, nil, nil, nil, 91, 89, nil, nil, nil, +nil, 84, nil, nil, nil, nil, nil, nil, nil, nil, 91, nil, nil, 92, 93, +94, 95, 96, 97, 98, nil, 90, nil, nil, nil, nil, nil, nil, 92, 93, +94, 95, 96, 97, 98, nil, 90, 85, 86, 87, 88, nil, nil, nil, nil, +89, nil, nil, nil, nil, 84, nil, 85, 86, 87, 88, nil, nil, nil, 91, +89, nil, nil, nil, nil, 84, nil, nil, nil, nil, nil, nil, nil, nil, 91, +nil, nil, 92, 93, 94, 95, 96, 97, 98, nil, 90, nil, nil, nil, nil, +nil, nil, 92, 93, 94, 95, 96, 97, 98, nil, 90, 85, 86, 87, 88, +nil, nil, nil, nil, 89, nil, 160, nil, nil, 84, nil, 5, 6, 85, 86, +87, 88, nil, 91, nil, nil, 89, nil, nil, nil, nil, 84, nil, nil, nil, +nil, nil, nil, nil, nil, 91, 92, 93, 94, 95, 96, 97, 98, nil, 90, +nil, nil, nil, nil, nil, nil, nil, nil, 92, 93, 94, 95, 96, 97, 98, +nil, 90, 85, 86, 87, 88, nil, nil, nil, nil, 89, nil, nil, nil, nil, +84, nil, 85, 86, 87, 88, nil, nil, nil, 91, 89, nil, nil, nil, nil, +84, nil, 181, nil, nil, nil, nil, nil, nil, 91, nil, nil, 92, 93, 94, +95, 96, 97, 98, nil, 90, nil, nil, nil, nil, nil, nil, 92, 93, 94, +95, 96, 97, 98, nil, 90, 85, 86, 87, 88, nil, nil, nil, nil, 89, +nil, nil, nil, nil, 84, nil, 85, 86, 87, 88, nil, nil, nil, 91, 89, +nil, nil, nil, nil, 84, nil, nil, nil, nil, nil, nil, nil, nil, 91, nil, +nil, 92, 93, 94, 95, 96, 97, 98, nil, 90, nil, nil, nil, nil, nil, +nil, 92, 93, 94, 95, 96, 97, 98, nil, 90, 87, 88, nil, nil, nil, +nil, 89, nil, nil, nil, nil, 84, 87, 88, nil, nil, nil, nil, 89, nil, +91, nil, nil, 84, nil, 87, 88, nil, nil, nil, nil, 89, 91, nil, nil, +nil, 84, nil, 92, 93, 94, 95, 96, 97, 98, 91, 90, nil, nil, nil, +92, 93, 94, 95, 96, 97, 98, nil, 90, nil, nil, nil, nil, 92, 93, +94, 95, 96, 97, 98, 89, 90, 87, 88, nil, 84, nil, nil, 89, nil, +nil, nil, nil, 84, 91, nil, nil, nil, nil, nil, nil, nil, 91, nil, nil, +89, nil, nil, nil, nil, 84, nil, 92, 93, 94, 95, 96, 97, 98, 91, +92, 93, 94, 95, 96, 97, 98, nil, 90, nil, 89, nil, nil, nil, nil, +84, nil, 92, 93, 94, 95, 96, 97, 98, 91, 89, nil, nil, nil, nil, +84, nil, nil, nil, nil, 89, nil, nil, nil, 91, 84, nil, 92, 93, 94, +95, 96, 97, 98, 91, nil, nil, nil, nil, nil, nil, nil, 92, 93, 94, +95, 96, 97, 98, nil, nil, nil, 92, 93, 94, 95, 96, 97, 98] + +racc_action_check = [ +1, 33, 1, 34, 1, 1, 40, 100, 81, 1, 1, 1, 102, 161, 161, +1, 112, 33, 1, 1, 1, 84, 100, 1, 1, 1, 33, 1, 1, 1, +102, 1, 121, 131, 163, 1, 1, 84, 1, 1, 178, 1, 1, 1, 179, +0, 84, 0, 0, 183, nil, 1, 0, 0, 0, nil, nil, 80, 0, 80, +80, 0, 0, 0, nil, nil, 0, 0, 0, nil, 0, 0, 0, 128, 0, +128, 128, nil, 0, 0, nil, 0, 0, nil, 0, 0, 0, nil, 19, nil, +19, 19, nil, nil, 0, 19, 19, 19, nil, nil, nil, 19, nil, nil, 19, +nil, nil, nil, nil, 19, 19, 19, nil, 19, 19, 19, nil, 19, nil, nil, +nil, 19, 19, nil, 19, 19, nil, 19, 19, 19, nil, 23, nil, 23, 23, +nil, nil, 19, 23, 23, 23, nil, nil, nil, 23, nil, nil, 23, nil, nil, +nil, nil, 23, 23, 23, nil, 23, 23, 23, nil, 23, nil, nil, nil, 23, +23, nil, 23, 23, nil, 23, 23, 23, nil, 27, nil, 27, 27, nil, nil, +23, 27, 27, 27, nil, nil, nil, 27, nil, nil, 27, nil, nil, nil, nil, +27, 27, 27, nil, 27, 27, 27, nil, 27, nil, nil, nil, 27, 27, nil, +27, 27, nil, 27, 27, 27, nil, 37, nil, 37, 37, nil, nil, 27, 37, +37, 37, nil, 37, nil, 37, nil, nil, 37, nil, nil, 37, nil, 37, 37, +37, nil, 37, 37, 37, nil, 37, nil, nil, nil, 37, 37, nil, 37, 37, +nil, 37, 37, 37, nil, 39, nil, 39, 39, nil, nil, 37, 39, 39, 39, +nil, nil, nil, 39, nil, nil, 39, nil, nil, nil, nil, 39, 39, 39, nil, +39, 39, 39, nil, 39, nil, nil, nil, 39, 39, nil, 39, 39, nil, 39, +39, 39, nil, 60, nil, 60, 60, nil, nil, 39, 60, 60, 60, nil, nil, +nil, 60, nil, nil, 60, nil, nil, nil, nil, 60, 60, 60, nil, 60, 60, +60, nil, 60, nil, nil, nil, 60, 60, nil, 60, 60, nil, 60, 60, 60, +nil, 61, nil, 61, 61, nil, nil, 60, 61, 61, 61, nil, nil, nil, 61, +nil, nil, 61, nil, nil, nil, nil, 61, 61, 61, nil, 61, 61, 61, nil, +61, nil, nil, nil, 61, 61, nil, 61, 61, nil, 61, 61, 61, nil, 62, +nil, 62, 62, nil, nil, 61, 62, 62, 62, nil, nil, nil, 62, nil, nil, +62, nil, nil, nil, nil, 62, 62, 62, nil, 62, 62, 62, nil, 62, nil, +nil, nil, 62, 62, nil, 62, 62, nil, 62, 62, 62, nil, 63, nil, 63, +63, nil, nil, 62, 63, 63, 63, nil, nil, nil, 63, nil, nil, 63, nil, +nil, nil, nil, 63, 63, 63, nil, 63, 63, 63, nil, 63, nil, nil, nil, +63, 63, nil, 63, 63, nil, 63, 63, 63, nil, 85, nil, 85, 85, nil, +nil, 63, 85, 85, 85, nil, nil, nil, 85, nil, nil, 85, nil, nil, nil, +nil, 85, 85, 85, nil, 85, 85, 85, nil, 85, nil, nil, nil, 85, 85, +nil, 85, 85, nil, 85, 85, 85, nil, 86, nil, 86, 86, nil, nil, 85, +86, 86, 86, nil, nil, nil, 86, nil, nil, 86, nil, nil, nil, nil, 86, +86, 86, nil, 86, 86, 86, nil, 86, nil, nil, nil, 86, 86, nil, 86, +86, nil, 86, 86, 86, nil, 87, nil, 87, 87, nil, nil, 86, 87, 87, +87, nil, nil, nil, 87, nil, nil, 87, nil, nil, nil, nil, 87, 87, 87, +nil, 87, 87, 87, nil, 87, nil, nil, nil, 87, 87, nil, 87, 87, nil, +87, 87, 87, nil, 88, nil, 88, 88, nil, nil, 87, 88, 88, 88, nil, +nil, nil, 88, nil, nil, 88, nil, nil, nil, nil, 88, 88, 88, nil, 88, +88, 88, nil, 88, nil, nil, nil, 88, 88, nil, 88, 88, nil, 88, 88, +88, nil, 89, nil, 89, 89, nil, nil, 88, 89, 89, 89, nil, nil, nil, +89, nil, nil, 89, nil, nil, nil, nil, 89, 89, 89, nil, 89, 89, 89, +nil, 89, nil, nil, nil, 89, 89, nil, 89, 89, nil, 89, 89, 89, nil, +90, nil, 90, 90, nil, nil, 89, 90, 90, 90, nil, nil, nil, 90, nil, +nil, 90, nil, nil, nil, nil, 90, 90, 90, nil, 90, 90, 90, nil, 90, +nil, nil, nil, 90, 90, nil, 90, 90, nil, 90, 90, 90, nil, 91, nil, +91, 91, nil, nil, 90, 91, 91, 91, nil, nil, nil, 91, nil, nil, 91, +nil, nil, nil, nil, 91, 91, 91, nil, 91, 91, 91, nil, 91, nil, nil, +nil, 91, 91, nil, 91, 91, nil, 91, 91, 91, nil, 92, nil, 92, 92, +nil, nil, 91, 92, 92, 92, nil, nil, nil, 92, nil, nil, 92, nil, nil, +nil, nil, 92, 92, 92, nil, 92, 92, 92, nil, 92, nil, nil, nil, 92, +92, nil, 92, 92, nil, 92, 92, 92, nil, 93, nil, 93, 93, nil, nil, +92, 93, 93, 93, nil, nil, nil, 93, nil, nil, 93, nil, nil, nil, nil, +93, 93, 93, nil, 93, 93, 93, nil, 93, nil, nil, nil, 93, 93, nil, +93, 93, nil, 93, 93, 93, nil, 94, nil, 94, 94, nil, nil, 93, 94, +94, 94, nil, nil, nil, 94, nil, nil, 94, nil, nil, nil, nil, 94, 94, +94, nil, 94, 94, 94, nil, 94, nil, nil, nil, 94, 94, nil, 94, 94, +nil, 94, 94, 94, nil, 95, nil, 95, 95, nil, nil, 94, 95, 95, 95, +nil, nil, nil, 95, nil, nil, 95, nil, nil, nil, nil, 95, 95, 95, nil, +95, 95, 95, nil, 95, nil, nil, nil, 95, 95, nil, 95, 95, nil, 95, +95, 95, nil, 96, nil, 96, 96, nil, nil, 95, 96, 96, 96, nil, nil, +nil, 96, nil, nil, 96, nil, nil, nil, nil, 96, 96, 96, nil, 96, 96, +96, nil, 96, nil, nil, nil, 96, 96, nil, 96, 96, nil, 96, 96, 96, +nil, 97, nil, 97, 97, nil, nil, 96, 97, 97, 97, nil, nil, nil, 97, +nil, nil, 97, nil, nil, nil, nil, 97, 97, 97, nil, 97, 97, 97, nil, +97, nil, nil, nil, 97, 97, nil, 97, 97, nil, 97, 97, 97, nil, 98, +nil, 98, 98, nil, nil, 97, 98, 98, 98, nil, nil, nil, 98, nil, nil, +98, nil, nil, nil, nil, 98, 98, 98, nil, 98, 98, 98, nil, 98, nil, +nil, nil, 98, 98, nil, 98, 98, nil, 98, 98, 98, nil, 111, nil, 111, +111, nil, nil, 98, 111, 111, 111, nil, nil, 111, 111, nil, nil, 111, 111, +111, nil, nil, 111, 111, 111, nil, 111, 111, 111, nil, 111, nil, nil, nil, +111, 111, nil, 111, 111, nil, 111, 111, 111, nil, 123, nil, 123, 123, nil, +nil, 111, 123, 123, 123, nil, nil, nil, 123, nil, nil, 123, nil, nil, nil, +nil, 123, 123, 123, nil, 123, 123, 123, nil, 123, nil, nil, nil, 123, 123, +nil, 123, 123, nil, 123, 123, 123, nil, 129, nil, 129, 129, nil, nil, 123, +129, 129, 129, nil, nil, nil, 129, nil, nil, 129, nil, nil, nil, nil, 129, +129, 129, nil, 129, 129, 129, nil, 129, nil, nil, nil, 129, 129, nil, 129, +129, nil, 129, 129, 129, nil, 153, nil, 153, 153, nil, nil, 129, 153, 153, +153, nil, nil, nil, 153, nil, nil, 153, nil, nil, nil, nil, 153, 153, 153, +nil, 153, 153, 153, nil, 153, nil, nil, nil, 153, 153, nil, 153, 153, nil, +153, 153, 153, nil, 155, nil, 155, 155, nil, nil, 153, 155, 155, 155, nil, +nil, nil, 155, nil, nil, 155, nil, nil, nil, nil, 155, 155, 155, nil, 155, +155, 155, nil, 155, nil, nil, nil, 155, 155, nil, 155, 155, nil, 155, 155, +155, nil, 156, nil, 156, 156, nil, nil, 155, 156, 156, 156, nil, nil, nil, +156, nil, nil, 156, nil, nil, nil, nil, 156, 156, 156, nil, 156, 156, 156, +nil, 156, nil, nil, nil, 156, 156, nil, 156, 156, nil, 156, 156, 156, nil, +157, nil, 157, 157, nil, nil, 156, 157, 157, 157, nil, nil, 157, 157, nil, +nil, 157, 157, 157, nil, nil, 157, 157, 157, nil, 157, 157, 157, nil, 157, +nil, nil, nil, 157, 157, nil, 157, 157, nil, 157, 157, 157, nil, 180, nil, +180, 180, nil, nil, 157, 180, 180, 180, nil, nil, nil, 180, nil, nil, 180, +nil, nil, nil, nil, 180, 180, 180, nil, 180, 180, 180, nil, 180, nil, nil, +nil, 180, 180, nil, 180, 180, nil, 180, 180, 180, 3, 3, 3, 3, nil, +142, nil, 180, 3, nil, nil, nil, nil, 3, 142, 3, 3, 99, 99, 99, +99, nil, 3, nil, nil, 99, nil, nil, nil, nil, 99, nil, 142, 142, 142, +142, 142, 142, 142, 99, 3, 3, 3, 3, 3, 3, 3, nil, 3, nil, +nil, nil, nil, nil, nil, nil, nil, 99, 99, 99, 99, 99, 99, 99, nil, +99, 101, 101, 101, 101, nil, nil, nil, nil, 101, nil, nil, nil, nil, 101, +nil, 104, 104, 104, 104, 104, nil, nil, 101, 104, nil, nil, nil, nil, 104, +nil, nil, nil, nil, nil, nil, nil, nil, 104, nil, nil, 101, 101, 101, 101, +101, 101, 101, nil, 101, nil, nil, nil, nil, nil, nil, 104, 104, 104, 104, +104, 104, 104, nil, 104, 117, 117, 117, 117, nil, nil, nil, nil, 117, nil, +nil, nil, nil, 117, nil, 117, 122, 122, 122, 122, nil, nil, 117, nil, 122, +nil, nil, nil, 122, 122, nil, nil, nil, nil, nil, nil, nil, nil, 122, nil, +117, 117, 117, 117, 117, 117, 117, nil, 117, nil, nil, nil, nil, nil, nil, +nil, 122, 122, 122, 122, 122, 122, 122, nil, 122, 144, 144, 144, 144, nil, +nil, nil, nil, 144, nil, nil, nil, nil, 144, nil, 145, 145, 145, 145, nil, +nil, nil, 144, 145, nil, nil, nil, nil, 145, nil, nil, nil, nil, nil, nil, +nil, nil, 145, nil, nil, 144, 144, 144, 144, 144, 144, 144, nil, 144, nil, +nil, nil, nil, nil, nil, 145, 145, 145, 145, 145, 145, 145, nil, 145, 146, +146, 146, 146, nil, nil, nil, nil, 146, nil, nil, nil, nil, 146, nil, 147, +147, 147, 147, nil, nil, nil, 146, 147, nil, nil, nil, nil, 147, nil, nil, +nil, nil, nil, nil, nil, nil, 147, nil, nil, 146, 146, 146, 146, 146, 146, +146, nil, 146, nil, nil, nil, nil, nil, nil, 147, 147, 147, 147, 147, 147, +147, nil, 147, 148, 148, 148, 148, nil, nil, nil, nil, 148, nil, nil, nil, +nil, 148, nil, 149, 149, 149, 149, nil, nil, nil, 148, 149, nil, nil, nil, +nil, 149, nil, nil, nil, nil, nil, nil, nil, nil, 149, nil, nil, 148, 148, +148, 148, 148, 148, 148, nil, 148, nil, nil, nil, nil, nil, nil, 149, 149, +149, 149, 149, 149, 149, nil, 149, 150, 150, 150, 150, nil, nil, nil, nil, +150, nil, nil, nil, nil, 150, nil, 151, 151, 151, 151, nil, nil, nil, 150, +151, nil, nil, nil, nil, 151, nil, nil, nil, nil, nil, nil, nil, nil, 151, +nil, nil, 150, 150, 150, 150, 150, 150, 150, nil, 150, nil, nil, nil, nil, +nil, nil, 151, 151, 151, 151, 151, 151, 151, nil, 151, 158, 158, 158, 158, +nil, nil, nil, nil, 158, nil, 158, nil, nil, 158, nil, 158, 158, 168, 168, +168, 168, nil, 158, nil, nil, 168, nil, nil, nil, nil, 168, nil, nil, nil, +nil, nil, nil, nil, nil, 168, 158, 158, 158, 158, 158, 158, 158, nil, 158, +nil, nil, nil, nil, nil, nil, nil, nil, 168, 168, 168, 168, 168, 168, 168, +nil, 168, 171, 171, 171, 171, nil, nil, nil, nil, 171, nil, nil, nil, nil, +171, nil, 173, 173, 173, 173, nil, nil, nil, 171, 173, nil, nil, nil, nil, +173, nil, 171, nil, nil, nil, nil, nil, nil, 173, nil, nil, 171, 171, 171, +171, 171, 171, 171, nil, 171, nil, nil, nil, nil, nil, nil, 173, 173, 173, +173, 173, 173, 173, nil, 173, 175, 175, 175, 175, nil, nil, nil, nil, 175, +nil, nil, nil, nil, 175, nil, 185, 185, 185, 185, nil, nil, nil, 175, 185, +nil, nil, nil, nil, 185, nil, nil, nil, nil, nil, nil, nil, nil, 185, nil, +nil, 175, 175, 175, 175, 175, 175, 175, nil, 175, nil, nil, nil, nil, nil, +nil, 185, 185, 185, 185, 185, 185, 185, nil, 185, 125, 125, nil, nil, nil, +nil, 125, nil, nil, nil, nil, 125, 126, 126, nil, nil, nil, nil, 126, nil, +125, nil, nil, 126, nil, 138, 138, nil, nil, nil, nil, 138, 126, nil, nil, +nil, 138, nil, 125, 125, 125, 125, 125, 125, 125, 138, 125, nil, nil, nil, +126, 126, 126, 126, 126, 126, 126, nil, 126, nil, nil, nil, nil, 138, 138, +138, 138, 138, 138, 138, 124, 138, 139, 139, nil, 124, nil, nil, 139, nil, +nil, nil, nil, 139, 124, nil, nil, nil, nil, nil, nil, nil, 139, nil, nil, +127, nil, nil, nil, nil, 127, nil, 124, 124, 124, 124, 124, 124, 124, 127, +139, 139, 139, 139, 139, 139, 139, nil, 139, nil, 140, nil, nil, nil, nil, +140, nil, 127, 127, 127, 127, 127, 127, 127, 140, 141, nil, nil, nil, nil, +141, nil, nil, nil, nil, 143, nil, nil, nil, 141, 143, nil, 140, 140, 140, +140, 140, 140, 140, 143, nil, nil, nil, nil, nil, nil, nil, 141, 141, 141, +141, 141, 141, 141, nil, nil, nil, 143, 143, 143, 143, 143, 143, 143] + +racc_action_pointer = [ +43, 0, nil, 1416, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 86, nil, nil, nil, 129, nil, nil, nil, 172, nil, nil, +nil, nil, nil, -1, - +15, nil, nil, 215, nil, 258, 3, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 301, 344, 387, 430, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 27, 8, nil, nil, 19, 473, 516, 559, 602, 645, 688, 731, 774, 817, +860, 903, 946, 989, 1032, 1433, -15, 1482, - +10, nil, 1497, nil, nil, nil, nil, nil, nil, 1075, 14, nil, nil, nil, nil, +1546, nil, nil, nil, 13, 1562, 1118, 2123, 2059, 2071, 2148, 43, 1161, nil, 3, +nil, nil, nil, nil, nil, nil, 2084, 2131, 2173, 2188, 1408, 2198, 1611, 1626, 1675, +1690, 1739, 1754, 1803, 1818, nil, 1204, nil, 1247, 1290, 1333, 1867, nil, nil, - +8, nil, 31, nil, nil, nil, nil, 1884, nil, nil, 1933, nil, 1948, nil, 1997, +nil, nil, 21, 42, 1376, nil, nil, 36, nil, 2012, nil] + +racc_action_default = [-140, -140, -1, -4, -5, -6, -7, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -23, -24, -25, -26, -140, -30, -31, -32, -140, -37, -55, -56, -57, -60, -140, -63, -64, -65, -140, -73, -140, -76, -77, -78, -79, -80, -81, -82, -83, -84, -85, -86, -87, -88, -89, -90, -91, -107, -108, -109, -110, -140, -140, -140, -140, -115, -116, -117, -118, -119, -120, -121, -122, -123, -124, -125, -126, -127, -128, -129, -130, -140, -140, -2, -3, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, -22, -140, -28, -140, -34, -140, -61, -62, -74, -38, -39, -40, -140, -140, -46, -47, -48, -49, -69, -66, -67, -68, -71, -140, -140, -111, -112, -113, -114, -140, -140, -133, -135, -136, -137, -138, 187, -58, -59, -93, -94, -95, -96, -97, -98, -99, -100, -101, -102, -103, -104, -105, -106, -27, -140, -33, -140, -140, -140, -4, -43, -44, -140, -50, -52, -54, -70, -72, -75, -92, -131, -134, -140, -139, -29, -35, -36, -41, -42, -9, -140, -140, -132, -8, -140, -51, -53, -45] + +racc_goto_table = [ +99, 82, 103, 83, 101, 1, 105, 130, 104, 183, 100, 102, 159, 162, 121, +108, 109, 110, 117, 111, 122, 115, 112, 161, 116, 107, 118, 119, 120, 128, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 124, 125, 126, 127, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 170, nil, 136, 176, 177, +nil, nil, nil, nil, nil, nil, 138, 139, 140, 141, 142, 143, 144, 145, 146, +147, 148, 149, 150, 151, 184, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 158, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 168, +nil, nil, nil, nil, nil, 171, nil, nil, nil, nil, nil, 157, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 174, nil, nil, nil, 173, +nil, 104, 175, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 82, 83, nil, nil, 185] + +racc_goto_check = [ +3, 2, 24, 4, 3, 1, 40, 77, 3, 5, 20, 23, 30, 35, 25, +26, 27, 28, 3, 29, 3, 31, 32, 33, 34, 43, 44, 45, 46, 75, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 3, 3, 3, 3, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 77, nil, 40, 30, 30, +nil, nil, nil, nil, nil, nil, 3, 3, 3, 3, 3, 3, 3, 3, 3, +3, 3, 3, 3, 3, 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 3, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 3, +nil, nil, nil, nil, nil, 3, nil, nil, nil, nil, nil, 1, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 24, nil, nil, nil, 3, +nil, 3, 3, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 2, 4, nil, nil, 3] + +racc_goto_pointer = [nil, 5, 0, -19, 0, - +169, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +-13, nil, nil, -16, -25, -23, -22, -21, -20, -18, -99, -16, -15, -89, -13, -99, nil, nil, nil, nil, -27, nil, nil, -9, -11, -10, - +9, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -51, nil, -73, nil] + +racc_goto_default = [ +nil, nil, 2, 3, 4, nil, 7, 8, 9, 10, 11, 12, 13, 14, 15, +16, 17, 18, 20, 21, nil, 24, 25, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 163, 29, 30, 31, 32, 34, 35, 38, nil, +nil, nil, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, +54, 55, 56, 57, 58, 59, 64, 65, 66, 67, 68, 69, 70, 78, 79, +nil, 132, nil, 131] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 54, :_reduce_none, + 2, 54, :_reduce_2, + 2, 55, :_reduce_3, + 1, 55, :_reduce_4, + 1, 55, :_reduce_5, + 1, 57, :_reduce_none, + 1, 57, :_reduce_none, + 1, 58, :_reduce_none, + 0, 58, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 56, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 2, 69, :_reduce_22, + 1, 70, :_reduce_23, + 1, 66, :_reduce_none, + 1, 66, :_reduce_none, + 1, 71, :_reduce_26, + 3, 72, :_reduce_27, + 1, 73, :_reduce_28, + 3, 73, :_reduce_29, + 1, 67, :_reduce_none, + 1, 67, :_reduce_none, + 1, 74, :_reduce_32, + 3, 75, :_reduce_33, + 1, 76, :_reduce_34, + 3, 76, :_reduce_35, + 3, 77, :_reduce_36, + 1, 64, :_reduce_37, + 1, 78, :_reduce_none, + 1, 78, :_reduce_none, + 1, 78, :_reduce_none, + 3, 79, :_reduce_41, + 3, 80, :_reduce_42, + 2, 81, :_reduce_43, + 1, 83, :_reduce_44, + 5, 84, :_reduce_45, + 1, 85, :_reduce_46, + 1, 87, :_reduce_47, + 1, 82, :_reduce_none, + 1, 82, :_reduce_none, + 1, 86, :_reduce_none, + 3, 86, :_reduce_none, + 1, 88, :_reduce_52, + 3, 88, :_reduce_53, + 1, 89, :_reduce_54, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 3, 90, :_reduce_58, + 3, 90, :_reduce_59, + 1, 91, :_reduce_60, + 2, 92, :_reduce_61, + 2, 92, :_reduce_62, + 1, 93, :_reduce_none, + 1, 93, :_reduce_none, + 1, 95, :_reduce_65, + 2, 96, :_reduce_66, + 1, 97, :_reduce_none, + 1, 97, :_reduce_none, + 1, 98, :_reduce_none, + 2, 98, :_reduce_none, + 1, 99, :_reduce_none, + 2, 99, :_reduce_none, + 1, 94, :_reduce_73, + 2, 94, :_reduce_74, + 3, 60, :_reduce_75, + 1, 65, :_reduce_76, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 3, 100, :_reduce_92, + 3, 101, :_reduce_93, + 3, 102, :_reduce_94, + 3, 103, :_reduce_95, + 3, 104, :_reduce_96, + 3, 105, :_reduce_97, + 3, 106, :_reduce_98, + 3, 107, :_reduce_99, + 3, 108, :_reduce_100, + 3, 109, :_reduce_101, + 3, 110, :_reduce_102, + 3, 111, :_reduce_103, + 3, 112, :_reduce_104, + 3, 113, :_reduce_105, + 3, 114, :_reduce_106, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 2, 115, :_reduce_111, + 2, 116, :_reduce_112, + 2, 117, :_reduce_113, + 2, 118, :_reduce_114, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 120, :_reduce_122, + 1, 119, :_reduce_123, + 1, 122, :_reduce_124, + 1, 123, :_reduce_125, + 1, 124, :_reduce_126, + 1, 125, :_reduce_127, + 1, 121, :_reduce_128, + 1, 121, :_reduce_none, + 1, 121, :_reduce_none, + 3, 126, :_reduce_131, + 3, 129, :_reduce_132, + 1, 128, :_reduce_133, + 2, 128, :_reduce_134, + 1, 130, :_reduce_135, + 1, 130, :_reduce_136, + 2, 127, :_reduce_137, + 1, 131, :_reduce_138, + 2, 131, :_reduce_139 ] + +racc_reduce_n = 140 + +racc_shift_n = 187 + +racc_token_table = { + false => 0, + :error => 1, + :IDENTIFIER => 2, + :EQUAL => 3, + :PLUS => 4, + :MINUS => 5, + :ASTERISK => 6, + :FWD_SLASH => 7, + :COLON => 8, + :FLOAT => 9, + :INTEGER => 10, + :STRING => 11, + :EXPO => 12, + :INDENT => 13, + :OUTDENT => 14, + :OPAREN => 15, + :CPAREN => 16, + :DOT => 17, + :SIGNATURE => 18, + :NL => 19, + :EOF => 20, + :PIPE => 21, + :COMMA => 22, + :NIL => 23, + :TRUE => 24, + :FALSE => 25, + :EQUALITY => 26, + :CALL => 27, + :SELF => 28, + :CONSTANT => 29, + :CHAR => 30, + :DOUBLE_TICK_STRING => 31, + :DOUBLE_TICK_STRING_END => 32, + :INTERPOLATE_START => 33, + :INTERPOLATE_END => 34, + :BOX => 35, + :LSQUARE => 36, + :RSQUARE => 37, + :FACES => 38, + :LFACE => 39, + :RFACE => 40, + :BANG => 41, + :TILDE => 42, + :RETURN => 43, + :NOT_EQUALITY => 44, + :OR => 45, + :AND => 46, + :GT => 47, + :LT => 48, + :GTE => 49, + :LTE => 50, + :AT => 51, + :PERCENT => 52 } + +racc_nt_base = 53 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "IDENTIFIER", + "EQUAL", + "PLUS", + "MINUS", + "ASTERISK", + "FWD_SLASH", + "COLON", + "FLOAT", + "INTEGER", + "STRING", + "EXPO", + "INDENT", + "OUTDENT", + "OPAREN", + "CPAREN", + "DOT", + "SIGNATURE", + "NL", + "EOF", + "PIPE", + "COMMA", + "NIL", + "TRUE", + "FALSE", + "EQUALITY", + "CALL", + "SELF", + "CONSTANT", + "CHAR", + "DOUBLE_TICK_STRING", + "DOUBLE_TICK_STRING_END", + "INTERPOLATE_START", + "INTERPOLATE_END", + "BOX", + "LSQUARE", + "RSQUARE", + "FACES", + "LFACE", + "RFACE", + "BANG", + "TILDE", + "RETURN", + "NOT_EQUALITY", + "OR", + "AND", + "GT", + "LT", + "GTE", + "LTE", + "AT", + "PERCENT", + "$start", + "statements", + "statement", + "expr", + "eol", + "nlq", + "literal", + "grouped_expr", + "binary_op", + "unary_op", + "method_call", + "constant", + "variable", + "array", + "hash", + "return", + "return_expr", + "return_nil", + "empty_array", + "array_list", + "array_items", + "empty_hash", + "hash_list", + "hash_items", + "hash_item", + "indented", + "indented_w_stmts", + "indented_w_expr", + "indented_wo_stmts", + "indent", + "outdent", + "indent_w_args", + "indent_pipe", + "indent_args", + "indent_wo_args", + "indent_arg", + "arg_var", + "method_call_on_object", + "method_call_on_self", + "method_call_on_closure", + "call_signature", + "call_arguments", + "call_simple_name", + "call_argument", + "call_passed_arg", + "call_passed_simple", + "call_passed_indented", + "assignment", + "addition", + "subtraction", + "multiplication", + "division", + "exponentiation", + "modulo", + "equality", + "not_equality", + "logical_or", + "logical_and", + "greater_than", + "less_than", + "greater_or_eq", + "less_or_eq", + "unary_not", + "unary_plus", + "unary_minus", + "unary_complement", + "integer", + "float", + "string", + "nil", + "true", + "false", + "self", + "interpolated_string", + "empty_string", + "interpolated_string_contents", + "interpolation", + "interpolated_string_chunk", + "chars" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'huia.y', 44) + def _reduce_2(val, _values, result) + return scope + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 46) + def _reduce_3(val, _values, result) + return scope.append val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 47) + def _reduce_4(val, _values, result) + return scope.append val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 48) + def _reduce_5(val, _values, result) + return scope + result + end +.,., + +# reduce 6 omitted + +# reduce 7 omitted + +# reduce 8 omitted + +# reduce 9 omitted + +# reduce 10 omitted + +# reduce 11 omitted + +# reduce 12 omitted + +# reduce 13 omitted + +# reduce 14 omitted + +# reduce 15 omitted + +# reduce 16 omitted + +# reduce 17 omitted + +# reduce 18 omitted + +# reduce 19 omitted + +# reduce 20 omitted + +# reduce 21 omitted + +module_eval(<<'.,.,', 'huia.y', 66) + def _reduce_22(val, _values, result) + return n(:Return, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 67) + def _reduce_23(val, _values, result) + return n(:Return, n(:Nil)) + result + end +.,., + +# reduce 24 omitted + +# reduce 25 omitted + +module_eval(<<'.,.,', 'huia.y', 72) + def _reduce_26(val, _values, result) + return n :Array + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 74) + def _reduce_27(val, _values, result) + return val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 75) + def _reduce_28(val, _values, result) + return n :Array, [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 76) + def _reduce_29(val, _values, result) + val[0].append(val[2]); return val[0] + result + end +.,., + +# reduce 30 omitted + +# reduce 31 omitted + +module_eval(<<'.,.,', 'huia.y', 80) + def _reduce_32(val, _values, result) + return n :Hash + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 81) + def _reduce_33(val, _values, result) + return val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 82) + def _reduce_34(val, _values, result) + return n :Hash, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 83) + def _reduce_35(val, _values, result) + val[0].append(val[2]); return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 84) + def _reduce_36(val, _values, result) + return n :HashItem, val[0], val[2] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 86) + def _reduce_37(val, _values, result) + return constant val[0] + result + end +.,., + +# reduce 38 omitted + +# reduce 39 omitted + +# reduce 40 omitted + +module_eval(<<'.,.,', 'huia.y', 91) + def _reduce_41(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 92) + def _reduce_42(val, _values, result) + return val[0].append(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 93) + def _reduce_43(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 94) + def _reduce_44(val, _values, result) + return pop_scope + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 97) + def _reduce_45(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 98) + def _reduce_46(val, _values, result) + return push_scope + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 99) + def _reduce_47(val, _values, result) + return push_scope + result + end +.,., + +# reduce 48 omitted + +# reduce 49 omitted + +# reduce 50 omitted + +# reduce 51 omitted + +module_eval(<<'.,.,', 'huia.y', 105) + def _reduce_52(val, _values, result) + return scope.add_argument val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 106) + def _reduce_53(val, _values, result) + return n :Assignment, val[0], val[2] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 107) + def _reduce_54(val, _values, result) + return n :Variable, val[0] + result + end +.,., + +# reduce 55 omitted + +# reduce 56 omitted + +# reduce 57 omitted + +module_eval(<<'.,.,', 'huia.y', 112) + def _reduce_58(val, _values, result) + return n :MethodCall, val[0], val[2] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 113) + def _reduce_59(val, _values, result) + return n :MethodCall, val[0], n(:CallSignature, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 114) + def _reduce_60(val, _values, result) + return n :MethodCall, scope_instance, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 116) + def _reduce_61(val, _values, result) + return n :MethodCall, this_closure, val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 117) + def _reduce_62(val, _values, result) + return n :MethodCall, this_closure, n(:CallSignature, val[1]) + result + end +.,., + +# reduce 63 omitted + +# reduce 64 omitted + +module_eval(<<'.,.,', 'huia.y', 121) + def _reduce_65(val, _values, result) + return n :CallSignature, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 122) + def _reduce_66(val, _values, result) + return n :CallSignature, val[0], [val[1]] + result + end +.,., + +# reduce 67 omitted + +# reduce 68 omitted + +# reduce 69 omitted + +# reduce 70 omitted + +# reduce 71 omitted + +# reduce 72 omitted + +module_eval(<<'.,.,', 'huia.y', 129) + def _reduce_73(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 130) + def _reduce_74(val, _values, result) + return val[0].concat_signature val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 132) + def _reduce_75(val, _values, result) + return n :Expression, val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 134) + def _reduce_76(val, _values, result) + return allocate_local val[0] + result + end +.,., + +# reduce 77 omitted + +# reduce 78 omitted + +# reduce 79 omitted + +# reduce 80 omitted + +# reduce 81 omitted + +# reduce 82 omitted + +# reduce 83 omitted + +# reduce 84 omitted + +# reduce 85 omitted + +# reduce 86 omitted + +# reduce 87 omitted + +# reduce 88 omitted + +# reduce 89 omitted + +# reduce 90 omitted + +# reduce 91 omitted + +module_eval(<<'.,.,', 'huia.y', 152) + def _reduce_92(val, _values, result) + return allocate_local_assignment val[0], val[2] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 153) + def _reduce_93(val, _values, result) + return binary val[0], val[2], 'plus:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 154) + def _reduce_94(val, _values, result) + return binary val[0], val[2], 'minus:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 155) + def _reduce_95(val, _values, result) + return binary val[0], val[2], 'multiplyBy:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 156) + def _reduce_96(val, _values, result) + return binary val[0], val[2], 'divideBy:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 157) + def _reduce_97(val, _values, result) + return binary val[0], val[2], 'toThePowerOf:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 158) + def _reduce_98(val, _values, result) + return binary val[0], val[2], 'moduloOf:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 159) + def _reduce_99(val, _values, result) + return binary val[0], val[2], 'isEqualTo:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 160) + def _reduce_100(val, _values, result) + return binary val[0], val[2], 'isNotEqualTo:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 161) + def _reduce_101(val, _values, result) + return binary val[0], val[2], 'logicalOr:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 162) + def _reduce_102(val, _values, result) + return binary val[0], val[2], 'logicalAnd:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 163) + def _reduce_103(val, _values, result) + return binary val[0], val[2], 'isGreaterThan:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 164) + def _reduce_104(val, _values, result) + return binary val[0], val[2], 'isLessThan:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 165) + def _reduce_105(val, _values, result) + return binary val[0], val[2], 'isGreaterOrEqualTo:' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 166) + def _reduce_106(val, _values, result) + return binary val[0], val[2], 'isLessOrEqualTo:' + result + end +.,., + +# reduce 107 omitted + +# reduce 108 omitted + +# reduce 109 omitted + +# reduce 110 omitted + +module_eval(<<'.,.,', 'huia.y', 173) + def _reduce_111(val, _values, result) + return unary val[1], 'unaryNot' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 174) + def _reduce_112(val, _values, result) + return unary val[1], 'unaryPlus' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 175) + def _reduce_113(val, _values, result) + return unary val[1], 'unaryMinus' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 176) + def _reduce_114(val, _values, result) + return unary val[1], 'unaryComplement' + result + end +.,., + +# reduce 115 omitted + +# reduce 116 omitted + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +# reduce 120 omitted + +# reduce 121 omitted + +module_eval(<<'.,.,', 'huia.y', 186) + def _reduce_122(val, _values, result) + return n :Float, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 187) + def _reduce_123(val, _values, result) + return n :Integer, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 188) + def _reduce_124(val, _values, result) + return n :Nil + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 189) + def _reduce_125(val, _values, result) + return n :True + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 190) + def _reduce_126(val, _values, result) + return n :False + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 191) + def _reduce_127(val, _values, result) + return n :Self + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 193) + def _reduce_128(val, _values, result) + return n :String, val[0] + result + end +.,., + +# reduce 129 omitted + +# reduce 130 omitted + +module_eval(<<'.,.,', 'huia.y', 197) + def _reduce_131(val, _values, result) + return val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 198) + def _reduce_132(val, _values, result) + return val[1] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 199) + def _reduce_133(val, _values, result) + return n :InterpolatedString, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 200) + def _reduce_134(val, _values, result) + val[0].append(val[1]); return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 201) + def _reduce_135(val, _values, result) + return val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 202) + def _reduce_136(val, _values, result) + return to_string(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 203) + def _reduce_137(val, _values, result) + return n :String, '' + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 205) + def _reduce_138(val, _values, result) + return n :String, val[0] + result + end +.,., + +module_eval(<<'.,.,', 'huia.y', 206) + def _reduce_139(val, _values, result) + val[0].append(val[1]); return val[0] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Huia diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 3340aa34..cc1861d7 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -253,5 +253,13 @@ def test_php_serialization assert_debugfile 'php_serialization.y', [0, 0, 0, 0] assert_output 'php_serialization.y' end + + # .y file from huia language implementation + + def test_huia + assert_compile 'huia.y' + assert_debugfile 'huia.y', [285, 0, 0, 0] + assert_output 'huia.y' + end end end From bce217afc87e9e4d0b7a3801165e31fc96ce7088 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 20:45:13 +0200 Subject: [PATCH 100/619] Add regression tests based on grammars from rdtool gem From the author, Youhei SASAKI: I'm glad. Please use our code, keep same licenses: under GPL-2+ or Ruby's license. In harmony with the author's instructions, a copy of the original license has been prepended to the file. A web link has been added where the (alternative) GPL-2+ license can be found. --- Manifest.txt | 4 + test/assets/rdblockparser.y | 576 +++++++++++++++++ test/assets/rdinlineparser.y | 561 ++++++++++++++++ test/regress/rdblockparser | 1031 ++++++++++++++++++++++++++++++ test/regress/rdinlineparser | 1161 ++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 11 + 6 files changed, 3344 insertions(+) create mode 100644 test/assets/rdblockparser.y create mode 100644 test/assets/rdinlineparser.y create mode 100644 test/regress/rdblockparser create mode 100644 test/regress/rdinlineparser diff --git a/Manifest.txt b/Manifest.txt index 3d0f41f7..39cad683 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -85,6 +85,8 @@ test/assets/opal.y test/assets/opt.y test/assets/percent.y test/assets/php_serialization.y +test/assets/rdblockparser.y +test/assets/rdinlineparser.y test/assets/recv.y test/assets/riml.y test/assets/rrconf.y @@ -112,6 +114,8 @@ test/regress/nasl test/regress/nokogiri-css test/regress/opal test/regress/php_serialization +test/regress/rdblockparser +test/regress/rdinlineparser test/regress/riml test/regress/ruby18 test/regress/ruby22 diff --git a/test/assets/rdblockparser.y b/test/assets/rdblockparser.y new file mode 100644 index 00000000..61992198 --- /dev/null +++ b/test/assets/rdblockparser.y @@ -0,0 +1,576 @@ +# Ruby is copyrighted free software by Yukihiro Matsumoto . +# You can redistribute it and/or modify it under either the terms of the GPL +# version 2 (see https://github.com/uwabami/rdtool/blob/master/COPYING.txt), +# or the conditions below: +# +# 1. You may make and give away verbatim copies of the source form of the +# software without restriction, provided that you duplicate all of the +# original copyright notices and associated disclaimers. +# +# 2. You may modify your copy of the software in any way, provided that +# you do at least ONE of the following: +# +# a) place your modifications in the Public Domain or otherwise +# make them Freely Available, such as by posting said +# modifications to Usenet or an equivalent medium, or by allowing +# the author to include your modifications in the software. +# +# b) use the modified software only within your corporation or +# organization. +# +# c) rename any non-standard executables so the names do not conflict +# with standard executables, which must also be provided. +# +# d) make other distribution arrangements with the author. +# +# 3. You may distribute the software in object code or executable +# form, provided that you do at least ONE of the following: +# +# a) distribute the executables and library files of the software, +# together with instructions (in the manual page or equivalent) +# on where to get the original distribution. +# +# b) accompany the distribution with the machine-readable source of +# the software. +# +# c) give non-standard executables non-standard names, with +# instructions on where to get the original software distribution. +# +# d) make other distribution arrangements with the author. +# +# 4. You may modify and include the part of the software into any other +# software (possibly commercial). But some files in the distribution +# are not written by the author, so that they are not under this terms. +# +# They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some +# files under the ./missing directory. See each file for the copying +# condition. +# +# 5. The scripts and library files supplied as input to or produced as +# output from the software do not automatically fall under the +# copyright of the software, but belong to whomever generated them, +# and may be sold commercially, and may be aggregated with this +# software. +# +# 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE. + +class RDParser + + preclow + nonassoc DUMMY + left ITEMLISTLINE ENUMLISTLINE DESCLISTLINE METHODLISTLINE STRINGLINE + prechigh + + token STRINGLINE ITEMLISTLINE ENUMLISTLINE DESCLISTLINE METHODLISTLINE + WHITELINE SUBTREE HEADLINE INCLUDE INDENT DEDENT DUMMY + + rule + document : blocks { result = DocumentElement.new + add_children_to_element(result, *val[0]) + } + | { + raise ParseError, + "Error: file empty." + } + ; + blocks : blocks block { result.concat(val[1]) } + | block + ; + block : textblock { result = val } + | verbatim { result = val } + | lists + | headline { result = val } + | include { result = val } + | WHITELINE { result = [] } + | SUBTREE { result = val[0].blocks } + ; + + headline : HEADLINE { # val[0] is like [level, title] + title = @inline_parser.parse(val[0][1]) + result = Headline.new(val[0][0]) + add_children_to_element(result, *title) + } + ; + include : INCLUDE { result = Include.new(val[0]) } + ; + + textblock : textblockcontent = DUMMY + { # val[0] is Array of String + content = cut_off(val[0]).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + } + ; + textblockcontent : textblockcontent STRINGLINE + { result.push(val[1]) } + | STRINGLINE { result = val } + ; + + verbatim : INDENT verbatimcontent DEDENT + { # val[1] is Array of String + content = cut_off(val[1]) + result = Verbatim.new(content) + # imform to lexer. + @in_verbatim = false } + ; + verbatim_after_lists : verbatimcontent + { # val[0] is Array of String + content = cut_off(val[0]) + result = Verbatim.new(content) + # imform to lexer. + @in_verbatim = false } + ; + verbatimcontent : verbatimcontent STRINGLINE + { result.push(val[1]) } + | verbatimcontent INDENT verbatimcontent DEDENT + { result.concat(val[2]) } + | verbatimcontent WHITELINE + { result.push("\n") } + | STRINGLINE { result = val + # imform to lexer. + @in_verbatim = true } + ; + + list : itemlist + | enumlist + | desclist + | methodlist + ; + lists : lists2 = DUMMY + | INDENT lists2 DEDENT { result = val[1] } + | INDENT lists2 verbatim_after_lists DEDENT + { result = val[1].push(val[2]) } + ; + + lists2 : lists2 list { result.push(val[1]) } + | list { result = val } + ; + + itemlist : itemlistitems = DUMMY { + result = ItemList.new + add_children_to_element(result, *val[0]) + } + ; + itemlistitems : itemlistitems itemlistitem + { result.push(val[1]) } + | itemlistitem { result = val } + ; + itemlistitem : first_textblock_in_itemlist other_blocks_in_list DEDENT + { + result = ItemListItem.new + add_children_to_element(result, val[0], *val[1]) + } + ; + + enumlist : enumlistitems = DUMMY { + result = EnumList.new + add_children_to_element(result, *val[0]) + } + ; + enumlistitems : enumlistitems enumlistitem + { result.push(val[1]) } + | enumlistitem { result = val } + ; + enumlistitem : first_textblock_in_enumlist other_blocks_in_list DEDENT + { + result = EnumListItem.new + add_children_to_element(result, val[0], *val[1]) + } + ; + + desclist : desclistitems = DUMMY { + result = DescList.new + add_children_to_element(result, *val[0]) + } + ; + desclistitems : desclistitems desclistitem { + result.push(val[1]) } + | desclistitem { result = val } + ; + desclistitem : DESCLISTLINE description_part DEDENT + { + term = DescListItem::Term.new + term_contents = @inline_parser.parse(val[0].strip) + add_children_to_element(term, *term_contents) + + result = DescListItem.new + set_term_to_element(result, term) + add_children_to_element(result, *val[1]) + } + ; + + methodlist : methodlistitems = DUMMY { + result = MethodList.new + add_children_to_element(result, *val[0]) + } + ; + methodlistitems : methodlistitems methodlistitem + { result.push(val[1]) } + | methodlistitem { result = val } + ; + methodlistitem : METHODLISTLINE description_part DEDENT + { + term = MethodListItem::Term.new(val[0].strip) + result = MethodListItem.new + set_term_to_element(result, term) + add_children_to_element(result, *val[1]) + } + ; + + description_part : whitelines textblock blocks_in_list + { result = [val[1]].concat(val[2]) } + | whitelines textblock { result = [val[1]] } + | whitelines INDENT blocks_in_list DEDENT + { result = val[2] } + | whitelines { result = [] } + ; + + blocks_in_list : blocks_in_list block_in_list { result.concat(val[1]) } + | block_in_list + ; + block_in_list : textblock { result = val } + | verbatim { result = val } + | lists + | WHITELINE { result = [] } + ; + whitelines : whitelines2 + | + ; + whitelines2 : WHITELINE whitelines2 + | WHITELINE + ; + + first_textblock_in_itemlist : ITEMLISTLINE textblockcontent + + { content = cut_off([val[0]].concat(val[1])).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + } + | ITEMLISTLINE + + { content = cut_off([val[0]]).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + } + ; + first_textblock_in_enumlist : ENUMLISTLINE textblockcontent + + { content = cut_off([val[0]].concat(val[1])).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + } + | ENUMLISTLINE + + { content = cut_off([val[0]]).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + } + ; + other_blocks_in_list : verbatim blocks_in_list + { result = [val[0]].concat(val[1]) } + | lists blocks_in_list { result.concat(val[1]) } + | WHITELINE blocks_in_list { result = val[1] } + | verbatim { result = val } + | lists + | WHITELINE { result = [] } + | { result = [] } + ; +end + +---- inner +include ParserUtility + +TMPFILE = ["rdtmp", $$, 0] + +attr_reader :tree + +def initialize + @inline_parser = RDInlineParser.new(self) +end + +def parse(src, tree) + @src = src + @src.push(false) + # RDtree + @tree = tree + + # @i: index(line no.) of src + @i = 0 + # stack for current indentation + @indent_stack = [] + # how indented. + @current_indent = @indent_stack.join("") + # RDParser for tmp src + @subparser = nil + # which part is in now + @in_part = nil + @part_content = [] + + @in_verbatim = false + + @yydebug = true + do_parse +end + +def next_token + # preprocessing + # if it is not in RD part + # => method + while @in_part != "rd" + line = @src[@i] + @i += 1 # next line + + case line + # src end + when false + return [false, false] + # RD part begin + when /^=begin\s*(?:\bRD\b.*)?\s*$/ + if @in_part # if in non-RD part + @part_content.push(line) + else + @in_part = "rd" + return [:WHITELINE, "=begin\n"] # <= for textblockand + end + # non-RD part begin + when /^=begin\s+(\w+)/ + part = $1 + if @in_part # if in non-RD part + @part_content.push(line) + else + @in_part = part if @tree.filter[part] # if filter exists +# p "BEGIN_PART: #{@in_part}" # DEBUG + end + # non-RD part end + when /^=end/ + if @in_part # if in non-RD part +# p "END_PART: #{@in_part}" # DEBUG + # make Part-in object + part = RD::Part.new(@part_content.join(""), @tree, "r") + @part_content.clear + # call filter, part_out is output(Part object) + part_out = @tree.filter[@in_part].call(part) + + if @tree.filter[@in_part].mode == :rd # if output is RD formated + subtree = parse_subtree( (RUBY_VERSION >= '1.9.0' ? part_out.lines.to_a : part_out.to_a ) ) + else # if output is target formated + basename = TMPFILE.join('.') + TMPFILE[-1] += 1 + tmpfile = open(@tree.tmp_dir + "/" + basename + ".#{@in_part}", "w") + tmpfile.print(part_out) + tmpfile.close + subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"]) + end + @in_part = nil + return [:SUBTREE, subtree] + end + else + if @in_part # if in non-RD part + @part_content.push(line) + end + end + end + + @current_indent = @indent_stack.join("") + line = @src[@i] + case line + when false + if_current_indent_equal("") do + [false, false] + end + when /^=end/ + if_current_indent_equal("") do + @in_part = nil + [:WHITELINE, "=end"] # MUST CHANGE?? + end + when /^\s*$/ + @i += 1 # next line + return [:WHITELINE, ':WHITELINE'] + when /^\#/ # comment line + @i += 1 # next line + self.next_token() + when /^(={1,4})(?!=)\s*(?=\S)/, /^(\+{1,2})(?!\+)\s*(?=\S)/ + rest = $' # ' + rest.strip! + mark = $1 + if_current_indent_equal("") do + return [:HEADLINE, [Headline.mark_to_level(mark), rest]] + end + when /^<<<\s*(\S+)/ + file = $1 + if_current_indent_equal("") do + suffix = file[-3 .. -1] + if suffix == ".rd" or suffix == ".rb" + subtree = parse_subtree(get_included(file)) + [:SUBTREE, subtree] + else + [:INCLUDE, file] + end + end + when /^(\s*)\*(\s*)/ + rest = $' # ' + newIndent = $2 + if_current_indent_equal($1) do + if @in_verbatim + [:STRINGLINE, line] + else + @indent_stack.push("\s" << newIndent) + [:ITEMLISTLINE, rest] + end + end + when /^(\s*)(\(\d+\))(\s*)/ + rest = $' # ' + mark = $2 + newIndent = $3 + if_current_indent_equal($1) do + if @in_verbatim + [:STRINGLINE, line] + else + @indent_stack.push("\s" * mark.size << newIndent) + [:ENUMLISTLINE, rest] + end + end + when /^(\s*):(\s*)/ + rest = $' # ' + newIndent = $2 + if_current_indent_equal($1) do + if @in_verbatim + [:STRINGLINE, line] + else + @indent_stack.push("\s" << $2) + [:DESCLISTLINE, rest] + end + end + when /^(\s*)---(?!-|\s*$)/ + indent = $1 + rest = $' + /\s*/ === rest + term = $' + new_indent = $& + if_current_indent_equal(indent) do + if @in_verbatim + [:STRINGLINE, line] + else + @indent_stack.push("\s\s\s" + new_indent) + [:METHODLISTLINE, term] + end + end + when /^(\s*)/ + if_current_indent_equal($1) do + [:STRINGLINE, line] + end + else + raise "[BUG] parsing error may occured." + end +end + +=begin private + --- RDParser#if_current_indent_equal(indent) + if (({@current_indent == ((|indent|))})) then yield block, otherwise + process indentation. +=end +# always @current_indent = @indent_stack.join("") +def if_current_indent_equal(indent) + indent = indent.sub(/\t/, "\s" * 8) + if @current_indent == indent + @i += 1 # next line + yield + elsif indent.index(@current_indent) == 0 + @indent_stack.push(indent[@current_indent.size .. -1]) + [:INDENT, ":INDENT"] + else + @indent_stack.pop + [:DEDENT, ":DEDENT"] + end +end +private :if_current_indent_equal + +def cut_off(src) + ret = [] + whiteline_buf = [] + line = src.shift + /^\s*/ =~ line + indent = Regexp.quote($&) + ret.push($') # ' + while line = src.shift + if /^(\s*)$/ =~ line + whiteline_buf.push(line) + elsif /^#{indent}/ =~ line + unless whiteline_buf.empty? + ret.concat(whiteline_buf) + whiteline_buf.clear + end + ret.push($') # ' + else + raise "[BUG]: probably Parser Error while cutting off.\n" + end + end + ret +end +private :cut_off + +def set_term_to_element(parent, term) +# parent.set_term_under_document_struct(term, @tree.document_struct) + parent.set_term_without_document_struct(term) +end +private :set_term_to_element + +def on_error( et, ev, _values ) + line = @src[@i] + prv, cur, nxt = format_line_num(@i, @i+1, @i+2) + + raise ParseError, <|#{@src[@i].chomp} + #{nxt} |#{@src[@i+1].chomp} + +Msg +end + +def line_index + @i +end + +def parse_subtree(src) + @subparser = RD::RDParser.new() unless @subparser + + @subparser.parse(src, @tree) +end +private :parse_subtree + +def get_included(file) + included = "" + @tree.include_path.each do |dir| + file_name = dir + "/" + file + if test(?e, file_name) + included = IO.readlines(file_name) + break + end + end + included +end +private :get_included + +def format_line_num(*args) + width = args.collect{|i| i.to_s.length }.max + args.collect{|i| sprintf("%#{width}d", i) } +end +private :format_line_num + +---- header +require "rd/rdinlineparser.tab.rb" +require "rd/parser-util" + +module RD +---- footer +end # end of module RD diff --git a/test/assets/rdinlineparser.y b/test/assets/rdinlineparser.y new file mode 100644 index 00000000..336834a1 --- /dev/null +++ b/test/assets/rdinlineparser.y @@ -0,0 +1,561 @@ +# Ruby is copyrighted free software by Yukihiro Matsumoto . +# You can redistribute it and/or modify it under either the terms of the GPL +# version 2 (see https://github.com/uwabami/rdtool/blob/master/COPYING.txt), +# or the conditions below: +# +# 1. You may make and give away verbatim copies of the source form of the +# software without restriction, provided that you duplicate all of the +# original copyright notices and associated disclaimers. +# +# 2. You may modify your copy of the software in any way, provided that +# you do at least ONE of the following: +# +# a) place your modifications in the Public Domain or otherwise +# make them Freely Available, such as by posting said +# modifications to Usenet or an equivalent medium, or by allowing +# the author to include your modifications in the software. +# +# b) use the modified software only within your corporation or +# organization. +# +# c) rename any non-standard executables so the names do not conflict +# with standard executables, which must also be provided. +# +# d) make other distribution arrangements with the author. +# +# 3. You may distribute the software in object code or executable +# form, provided that you do at least ONE of the following: +# +# a) distribute the executables and library files of the software, +# together with instructions (in the manual page or equivalent) +# on where to get the original distribution. +# +# b) accompany the distribution with the machine-readable source of +# the software. +# +# c) give non-standard executables non-standard names, with +# instructions on where to get the original software distribution. +# +# d) make other distribution arrangements with the author. +# +# 4. You may modify and include the part of the software into any other +# software (possibly commercial). But some files in the distribution +# are not written by the author, so that they are not under this terms. +# +# They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some +# files under the ./missing directory. See each file for the copying +# condition. +# +# 5. The scripts and library files supplied as input to or produced as +# output from the software do not automatically fall under the +# copyright of the software, but belong to whomever generated them, +# and may be sold commercially, and may be aggregated with this +# software. +# +# 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE. + +class RDInlineParser + + preclow + nonassoc EX_LOW + left QUOTE BAR SLASH BACK_SLASH URL OTHER + REF_OPEN FOOTNOTE_OPEN FOOTNOTE_CLOSE + nonassoc EX_HIGH + prechigh + + token EM_OPEN EM_CLOSE + CODE_OPEN CODE_CLOSE + VAR_OPEN VAR_CLOSE + KBD_OPEN KBD_CLOSE + INDEX_OPEN INDEX_CLOSE + REF_OPEN REF_CLOSE + FOOTNOTE_OPEN FOOTNOTE_CLOSE + VERB_OPEN VERB_CLOSE + BAR QUOTE SLASH BACK_SLASH URL OTHER EX_LOW EX_HIGH + + rule + content : elements + ; + elements : elements element { result.push(val[1]) } + | element { result = val } + ; + element : emphasis + | code + | var + | keyboard + | index + | reference + | footnote + | verb + | normal_str_ele + ; + + emphasis : EM_OPEN content EM_CLOSE { + result = Emphasis.new + add_children_to_element(result, *val[1]) + } + ; + code : CODE_OPEN content CODE_CLOSE { + result = Code.new + add_children_to_element(result, *val[1]) + } + ; + var : VAR_OPEN content VAR_CLOSE { + result = Var.new + add_children_to_element(result, *val[1]) + } + ; + keyboard : KBD_OPEN content KBD_CLOSE { + result = Keyboard.new + add_children_to_element(result, *val[1]) + } + ; + index : INDEX_OPEN content INDEX_CLOSE { + result = Index.new + add_children_to_element(result, *val[1]) + } + ; + +# Refernce +# (()) + + reference : REF_OPEN substitute ref_label REF_CLOSE + { result = Reference.new(val[2]) + add_children_to_element(result, *val[1]) + } + | REF_OPEN ref_label2 REF_CLOSE + { + result = make_reference_from_label(val[1]) + } + ; + + ref_label : URL ref_url_strings { result = Reference::URL.new(val[1]) } + | filename element_label + { result = Reference::TemporaryLabel.new(val[1], + val[0]) } + | element_label + { result = Reference::TemporaryLabel.new(val[0]) } + | filename { result = Reference::TemporaryLabel.new([], val[0]) } + ; + ref_label2 : URL ref_url_strings { result = Reference::URL.new(val[1]) } + | filename element_label2 + { result = Reference::TemporaryLabel.new(val[1], + val[0]) } + | element_label2 + { result = Reference::TemporaryLabel.new(val[0]) } + | filename { result = Reference::TemporaryLabel.new([], + val[0]) } + ; + substitute : ref_subst_content BAR + | QUOTE ref_subst_content_q QUOTE BAR + { result = val[1] } + | QUOTE ref_subst_strings_q QUOTE BAR + { result = [StringElement.new(val[1])] } + ; + + filename : ref_subst_strings_first SLASH + | QUOTE ref_subst_strings_q QUOTE SLASH + { result = val[1] } + ; + + # when substitute part exists + element_label : ref_subst_strings_first + { result = [StringElement.new(val[0])] } + | QUOTE ref_subst_strings_q QUOTE + { result = [StringElement.new(val[1])] } + ; + # when substitute part doesn't exist + # in this case, element label can contain Inlines + element_label2 : ref_subst_content + | QUOTE ref_subst_content_q QUOTE + { result = val[1] } + | QUOTE ref_subst_strings_q QUOTE + { result = [StringElement.new(val[1])] } + ; + + ref_subst_content : ref_subst_ele2 ref_subst_eles + { result = val[1].unshift(val[0]) } + | ref_subst_str_ele_first ref_subst_eles + { result = val[1].unshift(val[0]) } + | ref_subst_str_ele_first + { result = val } + | ref_subst_ele2 { result = val } + ; + ref_subst_content_q : ref_subst_eles_q + ; + ref_subst_eles : ref_subst_eles ref_subst_ele + { result.push(val[1]) } + | ref_subst_ele { result = val } + ; + ref_subst_eles_q : ref_subst_eles_q ref_subst_ele_q + { result.push(val[1]) } + | ref_subst_ele_q { result = val } + ; + ref_subst_ele2 : emphasis + | code + | var + | keyboard + | index + | verb + ; + ref_subst_ele : ref_subst_ele2 + | ref_subst_str_ele + ; + ref_subst_ele_q : ref_subst_ele2 + | ref_subst_str_ele_q + ; + + ref_subst_str_ele : ref_subst_strings = EX_LOW + { result = StringElement.new(val[0]) } + ; + ref_subst_str_ele_first : ref_subst_strings_first + { result = StringElement.new(val[0]) } + ; + ref_subst_str_ele_q : ref_subst_strings_q = EX_LOW + { result = StringElement.new(val[0]) } + ; + + ref_subst_strings : ref_subst_strings ref_subst_string3 + { result << val[1] } + | ref_subst_string3 + ; + # if it is first element of substitute, it can't contain + # URL on head. + ref_subst_strings_first : ref_subst_string ref_subst_strings = EX_HIGH + { result << val[1] } + | ref_subst_string = EX_LOW + ; + ref_subst_strings_q : ref_subst_strings_q ref_subst_string_q + { result << val[1] } + | ref_subst_string_q + ; + + ref_subst_string : OTHER + | BACK_SLASH + | REF_OPEN + | FOOTNOTE_OPEN + | FOOTNOTE_CLOSE + ; + ref_subst_string2 : ref_subst_string + | URL + ; + ref_subst_string3 : ref_subst_string2 + | QUOTE + ; + ref_subst_string_q : ref_subst_string2 + | BAR + | SLASH + ; +# end subst + +# string in url + ref_url_strings : ref_url_strings ref_url_string { result << val[1] } + | ref_url_string + ; + + ref_url_string : OTHER + | BACK_SLASH BACK_SLASH + | URL + | SLASH + | BAR + | QUOTE + | EM_OPEN + | EM_CLOSE + | CODE_OPEN + | CODE_CLOSE + | VAR_OPEN + | VAR_CLOSE + | KBD_OPEN + | KBD_CLOSE + | INDEX_OPEN + | INDEX_CLOSE + | REF_OPEN + | FOOTNOTE_OPEN + | FOOTNOTE_CLOSE + | VERB_OPEN + | VERB_CLOSE + ; + +# end url +# end Reference + + footnote : FOOTNOTE_OPEN content FOOTNOTE_CLOSE { + result = Footnote.new + add_children_to_element(result, *val[1]) + } + ; + verb : VERB_OPEN verb_strings VERB_CLOSE { + result = Verb.new(val[1]) } + ; + + + # normal string + # OTHER, QUOTE, BAR, SLASH, BACK_SLASH, URL + normal_string : OTHER + | QUOTE + | BAR + | SLASH + | BACK_SLASH + | URL + ; + normal_strings : normal_strings normal_string + { result << val[1] } + + | normal_string + ; + normal_str_ele : normal_strings = EX_LOW + { result = StringElement.new(val[0]) } + ; + + # in verb + verb_string : verb_normal_string + | BACK_SLASH verb_normal_string { result = val[1] } + | BACK_SLASH VERB_CLOSE { result = val[1] } + | BACK_SLASH BACK_SLASH { result = val[1] } + ; + + verb_normal_string : OTHER + | QUOTE + | BAR + | SLASH + | EM_OPEN + | EM_CLOSE + | CODE_OPEN + | CODE_CLOSE + | VAR_OPEN + | VAR_CLOSE + | KBD_OPEN + | KBD_CLOSE + | INDEX_OPEN + | INDEX_CLOSE + | REF_OPEN + | REF_CLOSE + | FOOTNOTE_OPEN + | FOOTNOTE_CLOSE + | VERB_OPEN + | URL + ; + + verb_strings : verb_strings verb_string { result << val[1] } + | verb_string + ; +/* verb_str_ele : verb_strings + ; */ +end + +---- inner +include ParserUtility +extend Forwardable + +EM_OPEN = '((*' +EM_OPEN_RE = /\A#{Regexp.quote(EM_OPEN)}/ +EM_CLOSE = '*))' +EM_CLOSE_RE = /\A#{Regexp.quote(EM_CLOSE)}/ +CODE_OPEN = '(({' +CODE_OPEN_RE = /\A#{Regexp.quote(CODE_OPEN)}/ +CODE_CLOSE = '}))' +CODE_CLOSE_RE = /\A#{Regexp.quote(CODE_CLOSE)}/ +VAR_OPEN = '((|' +VAR_OPEN_RE = /\A#{Regexp.quote(VAR_OPEN)}/ +VAR_CLOSE = '|))' +VAR_CLOSE_RE = /\A#{Regexp.quote(VAR_CLOSE)}/ +KBD_OPEN = '((%' +KBD_OPEN_RE = /\A#{Regexp.quote(KBD_OPEN)}/ +KBD_CLOSE = '%))' +KBD_CLOSE_RE = /\A#{Regexp.quote(KBD_CLOSE)}/ +INDEX_OPEN = '((:' +INDEX_OPEN_RE = /\A#{Regexp.quote(INDEX_OPEN)}/ +INDEX_CLOSE = ':))' +INDEX_CLOSE_RE = /\A#{Regexp.quote(INDEX_CLOSE)}/ +REF_OPEN = '((<' +REF_OPEN_RE = /\A#{Regexp.quote(REF_OPEN)}/ +REF_CLOSE = '>))' +REF_CLOSE_RE = /\A#{Regexp.quote(REF_CLOSE)}/ +FOOTNOTE_OPEN = '((-' +FOOTNOTE_OPEN_RE = /\A#{Regexp.quote(FOOTNOTE_OPEN)}/ +FOOTNOTE_CLOSE = '-))' +FOOTNOTE_CLOSE_RE = /\A#{Regexp.quote(FOOTNOTE_CLOSE)}/ +VERB_OPEN = "(('" +VERB_OPEN_RE = /\A#{Regexp.quote(VERB_OPEN)}/ +VERB_CLOSE = "'))" +VERB_CLOSE_RE = /\A#{Regexp.quote(VERB_CLOSE)}/ + +BAR = "|" +BAR_RE = /\A#{Regexp.quote(BAR)}/ +QUOTE = '"' +QUOTE_RE = /\A#{Regexp.quote(QUOTE)}/ +SLASH = "/" +SLASH_RE = /\A#{Regexp.quote(SLASH)}/ +BACK_SLASH = "\\" +BACK_SLASH_RE = /\A#{Regexp.quote(BACK_SLASH)}/ +URL = "URL:" +URL_RE = /\A#{Regexp.quote(URL)}/ + +# Workaround for Regexp option change of Ruby 1.5.x +other_re_mode = Regexp::EXTENDED +if RUBY_VERSION > "1.5" + other_re_mode |= Regexp::MULTILINE +else + other_re_mode |= Regexp::POSIXLINE +end + +OTHER_RE = Regexp.new( + "\\A.+?(?=#{Regexp.quote(EM_OPEN)}|#{Regexp.quote(EM_CLOSE)}| + #{Regexp.quote(CODE_OPEN)}|#{Regexp.quote(CODE_CLOSE)}| + #{Regexp.quote(VAR_OPEN)}|#{Regexp.quote(VAR_CLOSE)}| + #{Regexp.quote(KBD_OPEN)}|#{Regexp.quote(KBD_CLOSE)}| + #{Regexp.quote(INDEX_OPEN)}|#{Regexp.quote(INDEX_CLOSE)}| + #{Regexp.quote(REF_OPEN)}|#{Regexp.quote(REF_CLOSE)}| + #{Regexp.quote(FOOTNOTE_OPEN)}|#{Regexp.quote(FOOTNOTE_CLOSE)}| + #{Regexp.quote(VERB_OPEN)}|#{Regexp.quote(VERB_CLOSE)}| + #{Regexp.quote(BAR)}| + #{Regexp.quote(QUOTE)}| + #{Regexp.quote(SLASH)}| + #{Regexp.quote(BACK_SLASH)}| + #{Regexp.quote(URL)})", other_re_mode) + +def initialize(bp) + @blockp = bp +end + +def_delegator(:@blockp, :tree) + +def parse(src) + @src = StringScanner.new(src) + @pre = "" + @yydebug = true + do_parse +end + +def next_token + return [false, false] if @src.eos? +# p @src.rest if @yydebug + if ret = @src.scan(EM_OPEN_RE) + @pre << ret + [:EM_OPEN, ret] + elsif ret = @src.scan(EM_CLOSE_RE) + @pre << ret + [:EM_CLOSE, ret] + elsif ret = @src.scan(CODE_OPEN_RE) + @pre << ret + [:CODE_OPEN, ret] + elsif ret = @src.scan(CODE_CLOSE_RE) + @pre << ret + [:CODE_CLOSE, ret] + elsif ret = @src.scan(VAR_OPEN_RE) + @pre << ret + [:VAR_OPEN, ret] + elsif ret = @src.scan(VAR_CLOSE_RE) + @pre << ret + [:VAR_CLOSE, ret] + elsif ret = @src.scan(KBD_OPEN_RE) + @pre << ret + [:KBD_OPEN, ret] + elsif ret = @src.scan(KBD_CLOSE_RE) + @pre << ret + [:KBD_CLOSE, ret] + elsif ret = @src.scan(INDEX_OPEN_RE) + @pre << ret + [:INDEX_OPEN, ret] + elsif ret = @src.scan(INDEX_CLOSE_RE) + @pre << ret + [:INDEX_CLOSE, ret] + elsif ret = @src.scan(REF_OPEN_RE) + @pre << ret + [:REF_OPEN, ret] + elsif ret = @src.scan(REF_CLOSE_RE) + @pre << ret + [:REF_CLOSE, ret] + elsif ret = @src.scan(FOOTNOTE_OPEN_RE) + @pre << ret + [:FOOTNOTE_OPEN, ret] + elsif ret = @src.scan(FOOTNOTE_CLOSE_RE) + @pre << ret + [:FOOTNOTE_CLOSE, ret] + elsif ret = @src.scan(VERB_OPEN_RE) + @pre << ret + [:VERB_OPEN, ret] + elsif ret = @src.scan(VERB_CLOSE_RE) + @pre << ret + [:VERB_CLOSE, ret] + elsif ret = @src.scan(BAR_RE) + @pre << ret + [:BAR, ret] + elsif ret = @src.scan(QUOTE_RE) + @pre << ret + [:QUOTE, ret] + elsif ret = @src.scan(SLASH_RE) + @pre << ret + [:SLASH, ret] + elsif ret = @src.scan(BACK_SLASH_RE) + @pre << ret + [:BACK_SLASH, ret] + elsif ret = @src.scan(URL_RE) + @pre << ret + [:URL, ret] + elsif ret = @src.scan(OTHER_RE) + @pre << ret + [:OTHER, ret] + else + ret = @src.rest + @pre << ret + @src.terminate + [:OTHER, ret] + end +end + +def make_reference_from_label(label) +# Reference.new_from_label_under_document_struct(label, tree.document_struct) + Reference.new_from_label_without_document_struct(label) +end + +def on_error(et, ev, values) + lines_of_rest = (RUBY_VERSION >= '1.9.0' ? @src.rest.lines.to_a.length : @src.rest.to_a.length ) + prev_words = prev_words_on_error(ev) + at = 4 + prev_words.length + message = <<-MSG +RD syntax error: line #{@blockp.line_index - lines_of_rest}: +...#{prev_words} #{(ev||'')} #{next_words_on_error()} ... + MSG + message << " " * at + "^" * (ev ? ev.length : 0) + "\n" + raise ParseError, message +end + +def prev_words_on_error(ev) + pre = @pre + if ev and /#{Regexp.quote(ev)}$/ =~ pre + pre = $` + end + last_line(pre) +end + +def last_line(src) + if n = src.rindex("\n") + src[(n+1) .. -1] + else + src + end +end +private :last_line + +def next_words_on_error + if n = @src.rest.index("\n") + @src.rest[0 .. (n-1)] + else + @src.rest + end +end + +---- header + +require "rd/parser-util" +require "forwardable" +require "strscan" + +module RD +---- footer +end # end of module RD + diff --git a/test/regress/rdblockparser b/test/regress/rdblockparser new file mode 100644 index 00000000..d5e70f92 --- /dev/null +++ b/test/regress/rdblockparser @@ -0,0 +1,1031 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "rdblockparser.y". +# + +require 'racc/parser.rb' + +require "rd/rdinlineparser.tab.rb" +require "rd/parser-util" + +module RD +class RDParser < Racc::Parser + +module_eval(<<'...end rdblockparser.y/module_eval...', 'rdblockparser.y', 289) +include ParserUtility + +TMPFILE = ["rdtmp", $$, 0] + +attr_reader :tree + +def initialize + @inline_parser = RDInlineParser.new(self) +end + +def parse(src, tree) + @src = src + @src.push(false) + # RDtree + @tree = tree + + # @i: index(line no.) of src + @i = 0 + # stack for current indentation + @indent_stack = [] + # how indented. + @current_indent = @indent_stack.join("") + # RDParser for tmp src + @subparser = nil + # which part is in now + @in_part = nil + @part_content = [] + + @in_verbatim = false + + @yydebug = true + do_parse +end + +def next_token + # preprocessing + # if it is not in RD part + # => method + while @in_part != "rd" + line = @src[@i] + @i += 1 # next line + + case line + # src end + when false + return [false, false] + # RD part begin + when /^=begin\s*(?:\bRD\b.*)?\s*$/ + if @in_part # if in non-RD part + @part_content.push(line) + else + @in_part = "rd" + return [:WHITELINE, "=begin\n"] # <= for textblockand + end + # non-RD part begin + when /^=begin\s+(\w+)/ + part = $1 + if @in_part # if in non-RD part + @part_content.push(line) + else + @in_part = part if @tree.filter[part] # if filter exists +# p "BEGIN_PART: #{@in_part}" # DEBUG + end + # non-RD part end + when /^=end/ + if @in_part # if in non-RD part +# p "END_PART: #{@in_part}" # DEBUG + # make Part-in object + part = RD::Part.new(@part_content.join(""), @tree, "r") + @part_content.clear + # call filter, part_out is output(Part object) + part_out = @tree.filter[@in_part].call(part) + + if @tree.filter[@in_part].mode == :rd # if output is RD formated + subtree = parse_subtree( (RUBY_VERSION >= '1.9.0' ? part_out.lines.to_a : part_out.to_a ) ) + else # if output is target formated + basename = TMPFILE.join('.') + TMPFILE[-1] += 1 + tmpfile = open(@tree.tmp_dir + "/" + basename + ".#{@in_part}", "w") + tmpfile.print(part_out) + tmpfile.close + subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"]) + end + @in_part = nil + return [:SUBTREE, subtree] + end + else + if @in_part # if in non-RD part + @part_content.push(line) + end + end + end + + @current_indent = @indent_stack.join("") + line = @src[@i] + case line + when false + if_current_indent_equal("") do + [false, false] + end + when /^=end/ + if_current_indent_equal("") do + @in_part = nil + [:WHITELINE, "=end"] # MUST CHANGE?? + end + when /^\s*$/ + @i += 1 # next line + return [:WHITELINE, ':WHITELINE'] + when /^\#/ # comment line + @i += 1 # next line + self.next_token() + when /^(={1,4})(?!=)\s*(?=\S)/, /^(\+{1,2})(?!\+)\s*(?=\S)/ + rest = $' # ' + rest.strip! + mark = $1 + if_current_indent_equal("") do + return [:HEADLINE, [Headline.mark_to_level(mark), rest]] + end + when /^<<<\s*(\S+)/ + file = $1 + if_current_indent_equal("") do + suffix = file[-3 .. -1] + if suffix == ".rd" or suffix == ".rb" + subtree = parse_subtree(get_included(file)) + [:SUBTREE, subtree] + else + [:INCLUDE, file] + end + end + when /^(\s*)\*(\s*)/ + rest = $' # ' + newIndent = $2 + if_current_indent_equal($1) do + if @in_verbatim + [:STRINGLINE, line] + else + @indent_stack.push("\s" << newIndent) + [:ITEMLISTLINE, rest] + end + end + when /^(\s*)(\(\d+\))(\s*)/ + rest = $' # ' + mark = $2 + newIndent = $3 + if_current_indent_equal($1) do + if @in_verbatim + [:STRINGLINE, line] + else + @indent_stack.push("\s" * mark.size << newIndent) + [:ENUMLISTLINE, rest] + end + end + when /^(\s*):(\s*)/ + rest = $' # ' + newIndent = $2 + if_current_indent_equal($1) do + if @in_verbatim + [:STRINGLINE, line] + else + @indent_stack.push("\s" << $2) + [:DESCLISTLINE, rest] + end + end + when /^(\s*)---(?!-|\s*$)/ + indent = $1 + rest = $' + /\s*/ === rest + term = $' + new_indent = $& + if_current_indent_equal(indent) do + if @in_verbatim + [:STRINGLINE, line] + else + @indent_stack.push("\s\s\s" + new_indent) + [:METHODLISTLINE, term] + end + end + when /^(\s*)/ + if_current_indent_equal($1) do + [:STRINGLINE, line] + end + else + raise "[BUG] parsing error may occured." + end +end + +=begin private + --- RDParser#if_current_indent_equal(indent) + if (({@current_indent == ((|indent|))})) then yield block, otherwise + process indentation. +=end +# always @current_indent = @indent_stack.join("") +def if_current_indent_equal(indent) + indent = indent.sub(/\t/, "\s" * 8) + if @current_indent == indent + @i += 1 # next line + yield + elsif indent.index(@current_indent) == 0 + @indent_stack.push(indent[@current_indent.size .. -1]) + [:INDENT, ":INDENT"] + else + @indent_stack.pop + [:DEDENT, ":DEDENT"] + end +end +private :if_current_indent_equal + +def cut_off(src) + ret = [] + whiteline_buf = [] + line = src.shift + /^\s*/ =~ line + indent = Regexp.quote($&) + ret.push($') # ' + while line = src.shift + if /^(\s*)$/ =~ line + whiteline_buf.push(line) + elsif /^#{indent}/ =~ line + unless whiteline_buf.empty? + ret.concat(whiteline_buf) + whiteline_buf.clear + end + ret.push($') # ' + else + raise "[BUG]: probably Parser Error while cutting off.\n" + end + end + ret +end +private :cut_off + +def set_term_to_element(parent, term) +# parent.set_term_under_document_struct(term, @tree.document_struct) + parent.set_term_without_document_struct(term) +end +private :set_term_to_element + +def on_error( et, ev, _values ) + line = @src[@i] + prv, cur, nxt = format_line_num(@i, @i+1, @i+2) + + raise ParseError, <|#{@src[@i].chomp} + #{nxt} |#{@src[@i+1].chomp} + +Msg +end + +def line_index + @i +end + +def parse_subtree(src) + @subparser = RD::RDParser.new() unless @subparser + + @subparser.parse(src, @tree) +end +private :parse_subtree + +def get_included(file) + included = "" + @tree.include_path.each do |dir| + file_name = dir + "/" + file + if test(?e, file_name) + included = IO.readlines(file_name) + break + end + end + included +end +private :get_included + +def format_line_num(*args) + width = args.collect{|i| i.to_s.length }.max + args.collect{|i| sprintf("%#{width}d", i) } +end +private :format_line_num + +...end rdblockparser.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +34, 35, 30, 33, 40, 34, 35, 30, 33, 40, 65, 34, 35, 30, 33, +14, 73, 36, 38, 34, 15, 88, 34, 35, 30, 33, 14, 9, 10, 11, +12, 15, 34, 35, 30, 33, 14, 9, 10, 11, 12, 15, 34, 35, 30, +33, 35, 47, 30, 54, 33, 15, 34, 35, 30, 33, 54, 47, 14, 14, +59, 15, 34, 35, 30, 33, 14, 73, 67, 76, 77, 15, 34, 35, 30, +33, 14, 73, 54, 81, 38, 15, 34, 35, 30, 33, 14, 73, 38, 40, +83, 15, 34, 35, 30, 33, 14, 73, nil, nil, nil, 15, 34, 35, 30, +33, 14, 73, nil, nil, nil, 15, 34, 35, 30, 33, 14, 73, nil, nil, +nil, 15, 34, 35, 30, 33, 14, 73, nil, nil, nil, 15, 34, 35, 30, +33, 14, 73, nil, nil, nil, 15, 34, 35, 30, 33, 14, 73, 61, 63, +nil, 15, 14, 62, 60, 61, 63, 79, 61, 63, 62, 87, nil, 62, 34, +35, 30, 33] + +racc_action_check = [ +41, 41, 41, 41, 41, 15, 15, 15, 15, 15, 41, 86, 86, 86, 86, +86, 86, 1, 13, 22, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 24, 24, 24, +24, 25, 24, 28, 30, 31, 24, 27, 27, 27, 27, 33, 27, 34, 35, +36, 27, 45, 45, 45, 45, 45, 45, 44, 49, 51, 45, 46, 46, 46, +46, 46, 46, 54, 56, 57, 46, 47, 47, 47, 47, 47, 47, 58, 62, +66, 47, 68, 68, 68, 68, 68, 68, nil, nil, nil, 68, 74, 74, 74, +74, 74, 74, nil, nil, nil, 74, 75, 75, 75, 75, 75, 75, nil, nil, +nil, 75, 78, 78, 78, 78, 78, 78, nil, nil, nil, 78, 79, 79, 79, +79, 79, 79, nil, nil, nil, 79, 85, 85, 85, 85, 85, 85, 39, 39, +nil, 85, 52, 39, 39, 82, 82, 52, 64, 64, 82, 82, nil, 64, 20, +20, 20, 20] + +racc_action_pointer = [ +19, 17, 29, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 11, nil, +2, nil, nil, nil, nil, 161, nil, 16, nil, 39, 42, nil, 49, 43, nil, +41, 44, nil, 48, 51, 52, 60, nil, nil, 141, nil, - +3, nil, nil, 55, 59, 69, 79, nil, 56, nil, 57, 145, nil, 70, nil, +66, 73, 81, nil, nil, nil, 82, nil, 151, nil, 77, nil, 89, nil, nil, +nil, nil, nil, 99, 109, nil, nil, 119, 129, nil, nil, 148, nil, nil, 139, +8, nil, nil] + +racc_action_default = [-2, -73, -1, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -16, -73, -23, -24, -25, -26, -27, -31, -32, -34, -72, -36, -38, -72, -40, -42, -59, -44, -46, -59, -63, -65, -73, -3, -15, -73, -22, -73, -30, -33, -73, -69, -70, -71, -37, -73, -41, -73, -51, -58, -61, -45, -73, -62, -64, 89, -17, -19, -73, -21, -18, -28, -73, -35, -66, -53, -54, -55, -56, -57, -67, -68, -39, -43, -49, -73, -60, -47, -73, -29, -52, -48, -73, -20, -50] + +racc_goto_table = [ +4, 39, 4, 68, 74, 75, 5, 6, 5, 6, 44, 42, 51, 49, 3, +56, 37, 57, 58, 1, 2, 66, 84, 41, 43, 48, 50, 64, 84, 84, +45, 46, 42, 45, 46, 55, 85, 86, 80, 84, 84, nil, nil, nil, nil, +nil, nil, nil, 82, nil, nil, nil, 78] + +racc_goto_check = [ +4, 10, 4, 31, 31, 31, 5, 6, 5, 6, 21, 12, 27, 21, 3, +27, 3, 9, 9, 1, 2, 11, 32, 17, 19, 23, 26, 10, 32, 32, +5, 6, 12, 5, 6, 29, 31, 31, 33, 32, 32, nil, nil, nil, nil, +nil, nil, nil, 10, nil, nil, nil, 4] + +racc_goto_pointer = [nil, 19, 20, 14, 0, 6, 7, nil, nil, -17, -14, -20, -9, nil, nil, nil, nil, 8, nil, 2, nil, -14, nil, 0, nil, nil, -2, -18, nil, 4, nil, -42, -46, -16] + +racc_goto_default = [ +nil, nil, nil, nil, 70, 71, 72, 7, 8, 13, nil, nil, 21, 16, 17, +18, 19, 20, 22, 23, 24, nil, 25, 26, 27, 28, 29, nil, 31, 32, +52, nil, 69, 53] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 15, :_reduce_1, + 0, 15, :_reduce_2, + 2, 16, :_reduce_3, + 1, 16, :_reduce_none, + 1, 17, :_reduce_5, + 1, 17, :_reduce_6, + 1, 17, :_reduce_none, + 1, 17, :_reduce_8, + 1, 17, :_reduce_9, + 1, 17, :_reduce_10, + 1, 17, :_reduce_11, + 1, 21, :_reduce_12, + 1, 22, :_reduce_13, + 1, 18, :_reduce_14, + 2, 23, :_reduce_15, + 1, 23, :_reduce_16, + 3, 19, :_reduce_17, + 1, 25, :_reduce_18, + 2, 24, :_reduce_19, + 4, 24, :_reduce_20, + 2, 24, :_reduce_21, + 1, 24, :_reduce_22, + 1, 26, :_reduce_none, + 1, 26, :_reduce_none, + 1, 26, :_reduce_none, + 1, 26, :_reduce_none, + 1, 20, :_reduce_none, + 3, 20, :_reduce_28, + 4, 20, :_reduce_29, + 2, 31, :_reduce_30, + 1, 31, :_reduce_31, + 1, 27, :_reduce_32, + 2, 32, :_reduce_33, + 1, 32, :_reduce_34, + 3, 33, :_reduce_35, + 1, 28, :_reduce_36, + 2, 36, :_reduce_37, + 1, 36, :_reduce_38, + 3, 37, :_reduce_39, + 1, 29, :_reduce_40, + 2, 39, :_reduce_41, + 1, 39, :_reduce_42, + 3, 40, :_reduce_43, + 1, 30, :_reduce_44, + 2, 42, :_reduce_45, + 1, 42, :_reduce_46, + 3, 43, :_reduce_47, + 3, 41, :_reduce_48, + 2, 41, :_reduce_49, + 4, 41, :_reduce_50, + 1, 41, :_reduce_51, + 2, 45, :_reduce_52, + 1, 45, :_reduce_none, + 1, 46, :_reduce_54, + 1, 46, :_reduce_55, + 1, 46, :_reduce_none, + 1, 46, :_reduce_57, + 1, 44, :_reduce_none, + 0, 44, :_reduce_none, + 2, 47, :_reduce_none, + 1, 47, :_reduce_none, + 2, 34, :_reduce_62, + 1, 34, :_reduce_63, + 2, 38, :_reduce_64, + 1, 38, :_reduce_65, + 2, 35, :_reduce_66, + 2, 35, :_reduce_67, + 2, 35, :_reduce_68, + 1, 35, :_reduce_69, + 1, 35, :_reduce_none, + 1, 35, :_reduce_71, + 0, 35, :_reduce_72 ] + +racc_reduce_n = 73 + +racc_shift_n = 89 + +racc_token_table = { + false => 0, + :error => 1, + :DUMMY => 2, + :ITEMLISTLINE => 3, + :ENUMLISTLINE => 4, + :DESCLISTLINE => 5, + :METHODLISTLINE => 6, + :STRINGLINE => 7, + :WHITELINE => 8, + :SUBTREE => 9, + :HEADLINE => 10, + :INCLUDE => 11, + :INDENT => 12, + :DEDENT => 13 } + +racc_nt_base = 14 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "DUMMY", + "ITEMLISTLINE", + "ENUMLISTLINE", + "DESCLISTLINE", + "METHODLISTLINE", + "STRINGLINE", + "WHITELINE", + "SUBTREE", + "HEADLINE", + "INCLUDE", + "INDENT", + "DEDENT", + "$start", + "document", + "blocks", + "block", + "textblock", + "verbatim", + "lists", + "headline", + "include", + "textblockcontent", + "verbatimcontent", + "verbatim_after_lists", + "list", + "itemlist", + "enumlist", + "desclist", + "methodlist", + "lists2", + "itemlistitems", + "itemlistitem", + "first_textblock_in_itemlist", + "other_blocks_in_list", + "enumlistitems", + "enumlistitem", + "first_textblock_in_enumlist", + "desclistitems", + "desclistitem", + "description_part", + "methodlistitems", + "methodlistitem", + "whitelines", + "blocks_in_list", + "block_in_list", + "whitelines2" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'rdblockparser.y', 70) + def _reduce_1(val, _values, result) + result = DocumentElement.new + add_children_to_element(result, *val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 74) + def _reduce_2(val, _values, result) + raise ParseError, + "Error: file empty." + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 78) + def _reduce_3(val, _values, result) + result.concat(val[1]) + result + end +.,., + +# reduce 4 omitted + +module_eval(<<'.,.,', 'rdblockparser.y', 81) + def _reduce_5(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 82) + def _reduce_6(val, _values, result) + result = val + result + end +.,., + +# reduce 7 omitted + +module_eval(<<'.,.,', 'rdblockparser.y', 84) + def _reduce_8(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 85) + def _reduce_9(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 86) + def _reduce_10(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 87) + def _reduce_11(val, _values, result) + result = val[0].blocks + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 90) + def _reduce_12(val, _values, result) + # val[0] is like [level, title] + title = @inline_parser.parse(val[0][1]) + result = Headline.new(val[0][0]) + add_children_to_element(result, *title) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 96) + def _reduce_13(val, _values, result) + result = Include.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 100) + def _reduce_14(val, _values, result) + # val[0] is Array of String + content = cut_off(val[0]).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 108) + def _reduce_15(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 109) + def _reduce_16(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 113) + def _reduce_17(val, _values, result) + # val[1] is Array of String + content = cut_off(val[1]) + result = Verbatim.new(content) + # imform to lexer. + @in_verbatim = false + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 120) + def _reduce_18(val, _values, result) + # val[0] is Array of String + content = cut_off(val[0]) + result = Verbatim.new(content) + # imform to lexer. + @in_verbatim = false + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 127) + def _reduce_19(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 129) + def _reduce_20(val, _values, result) + result.concat(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 131) + def _reduce_21(val, _values, result) + result.push("\n") + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 132) + def _reduce_22(val, _values, result) + result = val + # imform to lexer. + @in_verbatim = true + result + end +.,., + +# reduce 23 omitted + +# reduce 24 omitted + +# reduce 25 omitted + +# reduce 26 omitted + +# reduce 27 omitted + +module_eval(<<'.,.,', 'rdblockparser.y', 143) + def _reduce_28(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 145) + def _reduce_29(val, _values, result) + result = val[1].push(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 148) + def _reduce_30(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 149) + def _reduce_31(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 153) + def _reduce_32(val, _values, result) + result = ItemList.new + add_children_to_element(result, *val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 158) + def _reduce_33(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 159) + def _reduce_34(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 163) + def _reduce_35(val, _values, result) + result = ItemListItem.new + add_children_to_element(result, val[0], *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 169) + def _reduce_36(val, _values, result) + result = EnumList.new + add_children_to_element(result, *val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 174) + def _reduce_37(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 175) + def _reduce_38(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 179) + def _reduce_39(val, _values, result) + result = EnumListItem.new + add_children_to_element(result, val[0], *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 185) + def _reduce_40(val, _values, result) + result = DescList.new + add_children_to_element(result, *val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 190) + def _reduce_41(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 191) + def _reduce_42(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 195) + def _reduce_43(val, _values, result) + term = DescListItem::Term.new + term_contents = @inline_parser.parse(val[0].strip) + add_children_to_element(term, *term_contents) + + result = DescListItem.new + set_term_to_element(result, term) + add_children_to_element(result, *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 206) + def _reduce_44(val, _values, result) + result = MethodList.new + add_children_to_element(result, *val[0]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 211) + def _reduce_45(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 212) + def _reduce_46(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 216) + def _reduce_47(val, _values, result) + term = MethodListItem::Term.new(val[0].strip) + result = MethodListItem.new + set_term_to_element(result, term) + add_children_to_element(result, *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 224) + def _reduce_48(val, _values, result) + result = [val[1]].concat(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 225) + def _reduce_49(val, _values, result) + result = [val[1]] + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 227) + def _reduce_50(val, _values, result) + result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 228) + def _reduce_51(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 231) + def _reduce_52(val, _values, result) + result.concat(val[1]) + result + end +.,., + +# reduce 53 omitted + +module_eval(<<'.,.,', 'rdblockparser.y', 234) + def _reduce_54(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 235) + def _reduce_55(val, _values, result) + result = val + result + end +.,., + +# reduce 56 omitted + +module_eval(<<'.,.,', 'rdblockparser.y', 237) + def _reduce_57(val, _values, result) + result = [] + result + end +.,., + +# reduce 58 omitted + +# reduce 59 omitted + +# reduce 60 omitted + +# reduce 61 omitted + +module_eval(<<'.,.,', 'rdblockparser.y', 248) + def _reduce_62(val, _values, result) + content = cut_off([val[0]].concat(val[1])).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 255) + def _reduce_63(val, _values, result) + content = cut_off([val[0]]).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 263) + def _reduce_64(val, _values, result) + content = cut_off([val[0]].concat(val[1])).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 270) + def _reduce_65(val, _values, result) + content = cut_off([val[0]]).join("") + contents = @inline_parser.parse(content) + result = TextBlock.new() + add_children_to_element(result, *contents) + + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 277) + def _reduce_66(val, _values, result) + result = [val[0]].concat(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 278) + def _reduce_67(val, _values, result) + result.concat(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 279) + def _reduce_68(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 280) + def _reduce_69(val, _values, result) + result = val + result + end +.,., + +# reduce 70 omitted + +module_eval(<<'.,.,', 'rdblockparser.y', 282) + def _reduce_71(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'rdblockparser.y', 283) + def _reduce_72(val, _values, result) + result = [] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + +end # class RDParser + +end # end of module RD diff --git a/test/regress/rdinlineparser b/test/regress/rdinlineparser new file mode 100644 index 00000000..80d6f967 --- /dev/null +++ b/test/regress/rdinlineparser @@ -0,0 +1,1161 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "rdinlineparser.y". +# + +require 'racc/parser.rb' + + +require "rd/parser-util" +require "forwardable" +require "strscan" + +module RD +class RDInlineParser < Racc::Parser + +module_eval(<<'...end rdinlineparser.y/module_eval...', 'rdinlineparser.y', 350) +include ParserUtility +extend Forwardable + +EM_OPEN = '((*' +EM_OPEN_RE = /\A#{Regexp.quote(EM_OPEN)}/ +EM_CLOSE = '*))' +EM_CLOSE_RE = /\A#{Regexp.quote(EM_CLOSE)}/ +CODE_OPEN = '(({' +CODE_OPEN_RE = /\A#{Regexp.quote(CODE_OPEN)}/ +CODE_CLOSE = '}))' +CODE_CLOSE_RE = /\A#{Regexp.quote(CODE_CLOSE)}/ +VAR_OPEN = '((|' +VAR_OPEN_RE = /\A#{Regexp.quote(VAR_OPEN)}/ +VAR_CLOSE = '|))' +VAR_CLOSE_RE = /\A#{Regexp.quote(VAR_CLOSE)}/ +KBD_OPEN = '((%' +KBD_OPEN_RE = /\A#{Regexp.quote(KBD_OPEN)}/ +KBD_CLOSE = '%))' +KBD_CLOSE_RE = /\A#{Regexp.quote(KBD_CLOSE)}/ +INDEX_OPEN = '((:' +INDEX_OPEN_RE = /\A#{Regexp.quote(INDEX_OPEN)}/ +INDEX_CLOSE = ':))' +INDEX_CLOSE_RE = /\A#{Regexp.quote(INDEX_CLOSE)}/ +REF_OPEN = '((<' +REF_OPEN_RE = /\A#{Regexp.quote(REF_OPEN)}/ +REF_CLOSE = '>))' +REF_CLOSE_RE = /\A#{Regexp.quote(REF_CLOSE)}/ +FOOTNOTE_OPEN = '((-' +FOOTNOTE_OPEN_RE = /\A#{Regexp.quote(FOOTNOTE_OPEN)}/ +FOOTNOTE_CLOSE = '-))' +FOOTNOTE_CLOSE_RE = /\A#{Regexp.quote(FOOTNOTE_CLOSE)}/ +VERB_OPEN = "(('" +VERB_OPEN_RE = /\A#{Regexp.quote(VERB_OPEN)}/ +VERB_CLOSE = "'))" +VERB_CLOSE_RE = /\A#{Regexp.quote(VERB_CLOSE)}/ + +BAR = "|" +BAR_RE = /\A#{Regexp.quote(BAR)}/ +QUOTE = '"' +QUOTE_RE = /\A#{Regexp.quote(QUOTE)}/ +SLASH = "/" +SLASH_RE = /\A#{Regexp.quote(SLASH)}/ +BACK_SLASH = "\\" +BACK_SLASH_RE = /\A#{Regexp.quote(BACK_SLASH)}/ +URL = "URL:" +URL_RE = /\A#{Regexp.quote(URL)}/ + +# Workaround for Regexp option change of Ruby 1.5.x +other_re_mode = Regexp::EXTENDED +if RUBY_VERSION > "1.5" + other_re_mode |= Regexp::MULTILINE +else + other_re_mode |= Regexp::POSIXLINE +end + +OTHER_RE = Regexp.new( + "\\A.+?(?=#{Regexp.quote(EM_OPEN)}|#{Regexp.quote(EM_CLOSE)}| + #{Regexp.quote(CODE_OPEN)}|#{Regexp.quote(CODE_CLOSE)}| + #{Regexp.quote(VAR_OPEN)}|#{Regexp.quote(VAR_CLOSE)}| + #{Regexp.quote(KBD_OPEN)}|#{Regexp.quote(KBD_CLOSE)}| + #{Regexp.quote(INDEX_OPEN)}|#{Regexp.quote(INDEX_CLOSE)}| + #{Regexp.quote(REF_OPEN)}|#{Regexp.quote(REF_CLOSE)}| + #{Regexp.quote(FOOTNOTE_OPEN)}|#{Regexp.quote(FOOTNOTE_CLOSE)}| + #{Regexp.quote(VERB_OPEN)}|#{Regexp.quote(VERB_CLOSE)}| + #{Regexp.quote(BAR)}| + #{Regexp.quote(QUOTE)}| + #{Regexp.quote(SLASH)}| + #{Regexp.quote(BACK_SLASH)}| + #{Regexp.quote(URL)})", other_re_mode) + +def initialize(bp) + @blockp = bp +end + +def_delegator(:@blockp, :tree) + +def parse(src) + @src = StringScanner.new(src) + @pre = "" + @yydebug = true + do_parse +end + +def next_token + return [false, false] if @src.eos? +# p @src.rest if @yydebug + if ret = @src.scan(EM_OPEN_RE) + @pre << ret + [:EM_OPEN, ret] + elsif ret = @src.scan(EM_CLOSE_RE) + @pre << ret + [:EM_CLOSE, ret] + elsif ret = @src.scan(CODE_OPEN_RE) + @pre << ret + [:CODE_OPEN, ret] + elsif ret = @src.scan(CODE_CLOSE_RE) + @pre << ret + [:CODE_CLOSE, ret] + elsif ret = @src.scan(VAR_OPEN_RE) + @pre << ret + [:VAR_OPEN, ret] + elsif ret = @src.scan(VAR_CLOSE_RE) + @pre << ret + [:VAR_CLOSE, ret] + elsif ret = @src.scan(KBD_OPEN_RE) + @pre << ret + [:KBD_OPEN, ret] + elsif ret = @src.scan(KBD_CLOSE_RE) + @pre << ret + [:KBD_CLOSE, ret] + elsif ret = @src.scan(INDEX_OPEN_RE) + @pre << ret + [:INDEX_OPEN, ret] + elsif ret = @src.scan(INDEX_CLOSE_RE) + @pre << ret + [:INDEX_CLOSE, ret] + elsif ret = @src.scan(REF_OPEN_RE) + @pre << ret + [:REF_OPEN, ret] + elsif ret = @src.scan(REF_CLOSE_RE) + @pre << ret + [:REF_CLOSE, ret] + elsif ret = @src.scan(FOOTNOTE_OPEN_RE) + @pre << ret + [:FOOTNOTE_OPEN, ret] + elsif ret = @src.scan(FOOTNOTE_CLOSE_RE) + @pre << ret + [:FOOTNOTE_CLOSE, ret] + elsif ret = @src.scan(VERB_OPEN_RE) + @pre << ret + [:VERB_OPEN, ret] + elsif ret = @src.scan(VERB_CLOSE_RE) + @pre << ret + [:VERB_CLOSE, ret] + elsif ret = @src.scan(BAR_RE) + @pre << ret + [:BAR, ret] + elsif ret = @src.scan(QUOTE_RE) + @pre << ret + [:QUOTE, ret] + elsif ret = @src.scan(SLASH_RE) + @pre << ret + [:SLASH, ret] + elsif ret = @src.scan(BACK_SLASH_RE) + @pre << ret + [:BACK_SLASH, ret] + elsif ret = @src.scan(URL_RE) + @pre << ret + [:URL, ret] + elsif ret = @src.scan(OTHER_RE) + @pre << ret + [:OTHER, ret] + else + ret = @src.rest + @pre << ret + @src.terminate + [:OTHER, ret] + end +end + +def make_reference_from_label(label) +# Reference.new_from_label_under_document_struct(label, tree.document_struct) + Reference.new_from_label_without_document_struct(label) +end + +def on_error(et, ev, values) + lines_of_rest = (RUBY_VERSION >= '1.9.0' ? @src.rest.lines.to_a.length : @src.rest.to_a.length ) + prev_words = prev_words_on_error(ev) + at = 4 + prev_words.length + message = <<-MSG +RD syntax error: line #{@blockp.line_index - lines_of_rest}: +...#{prev_words} #{(ev||'')} #{next_words_on_error()} ... + MSG + message << " " * at + "^" * (ev ? ev.length : 0) + "\n" + raise ParseError, message +end + +def prev_words_on_error(ev) + pre = @pre + if ev and /#{Regexp.quote(ev)}$/ =~ pre + pre = $` + end + last_line(pre) +end + +def last_line(src) + if n = src.rindex("\n") + src[(n+1) .. -1] + else + src + end +end +private :last_line + +def next_words_on_error + if n = @src.rest.index("\n") + @src.rest[0 .. (n-1)] + else + @src.rest + end +end + +...end rdinlineparser.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +104, 103, 102, 100, 101, 99, 115, 116, 117, 29, 105, 106, 107, 108, 109, +110, 111, 112, 113, 114, 84, 118, 119, 63, 64, 65, 61, 81, 62, 76, +78, 79, 85, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 80, +149, 63, 64, 65, 153, 81, 62, 76, 78, 79, 86, 66, 67, 68, 69, +70, 71, 72, 73, 74, 75, 77, 80, 152, 104, 103, 102, 100, 101, 99, +115, 116, 117, 87, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 88, +118, 119, 104, 103, 102, 100, 101, 99, 115, 116, 117, 89, 105, 106, 107, +108, 109, 110, 111, 112, 113, 114, 96, 118, 119, 104, 103, 102, 100, 101, +99, 115, 116, 117, 124, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, +137, 118, 119, 22, 23, 24, 25, 26, 21, 18, 19, 176, 177, 13, 148, +14, 154, 15, 137, 16, 161, 17, 164, 173, 20, 22, 23, 24, 25, 26, +21, 18, 19, 175, 177, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, +nil, 20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, +nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, +18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, +20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, +15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, 18, +19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, +22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, +nil, 16, nil, 17, 42, nil, 20, 54, 38, 53, 55, 56, 57, nil, 13, +nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, +26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, +nil, nil, 20, 63, 64, 65, 61, 81, 62, 76, 78, 79, nil, 66, 67, +68, 69, 70, 71, 72, 73, 74, 75, 77, 80, 122, nil, nil, 54, nil, +53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, 145, +nil, 20, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, +16, nil, 17, 145, nil, 20, 54, 133, 53, 55, 56, 57, nil, 13, nil, +14, nil, 15, nil, 16, nil, 17, 145, nil, 20, 54, 133, 53, 55, 56, +57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, 145, nil, 20, 54, +133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, +nil, nil, 20, 135, 136, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, +nil, 15, nil, 16, nil, 17, nil, nil, 20, 135, 136, 54, 133, 53, 55, +56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, +135, 136, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, +16, nil, 17, 95, nil, 20, 54, 91, 53, 55, 56, 57, 145, nil, nil, +54, 133, 53, 55, 56, 57, 158, nil, nil, 54, nil, 53, 55, 56, 57, +165, 135, 136, 54, 133, 53, 55, 56, 57, 145, nil, nil, 54, 133, 53, +55, 56, 57, 172, 135, 136, 54, 133, 53, 55, 56, 57, 174, 135, 136, +54, 133, 53, 55, 56, 57, 178, 135, 136, 54, 133, 53, 55, 56, 57, +135, 136, 54, 133, 53, 55, 56, 57, 135, 136, 54, 133, 53, 55, 56, +57, 135, 136, 54, 133, 53, 55, 56, 57, 22, 23, 24, 25, 26, 21] + +racc_action_check = [ +38, 38, 38, 38, 38, 38, 38, 38, 38, 1, 38, 38, 38, 38, 38, +38, 38, 38, 38, 38, 29, 38, 38, 59, 59, 59, 59, 59, 59, 59, +59, 59, 31, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, +59, 61, 61, 61, 61, 61, 61, 61, 61, 61, 32, 61, 61, 61, 61, +61, 61, 61, 61, 61, 61, 61, 61, 61, 91, 91, 91, 91, 91, 91, +91, 91, 91, 33, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 34, +91, 91, 97, 97, 97, 97, 97, 97, 97, 97, 97, 35, 97, 97, 97, +97, 97, 97, 97, 97, 97, 97, 37, 97, 97, 155, 155, 155, 155, 155, +155, 155, 155, 155, 41, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, +43, 155, 155, 0, 0, 0, 0, 0, 0, 0, 0, 165, 165, 0, 58, +0, 90, 0, 94, 0, 100, 0, 125, 162, 0, 2, 2, 2, 2, 2, +2, 2, 2, 164, 172, 2, nil, 2, nil, 2, nil, 2, nil, 2, nil, +nil, 2, 13, 13, 13, 13, 13, 13, 13, 13, nil, nil, 13, nil, 13, +nil, 13, nil, 13, nil, 13, nil, nil, 13, 14, 14, 14, 14, 14, 14, +14, 14, nil, nil, 14, nil, 14, nil, 14, nil, 14, nil, 14, nil, nil, +14, 15, 15, 15, 15, 15, 15, 15, 15, nil, nil, 15, nil, 15, nil, +15, nil, 15, nil, 15, nil, nil, 15, 16, 16, 16, 16, 16, 16, 16, +16, nil, nil, 16, nil, 16, nil, 16, nil, 16, nil, 16, nil, nil, 16, +17, 17, 17, 17, 17, 17, 17, 17, nil, nil, 17, nil, 17, nil, 17, +nil, 17, nil, 17, 18, nil, 17, 18, 18, 18, 18, 18, 18, nil, 18, +nil, 18, nil, 18, nil, 18, nil, 18, nil, nil, 18, 19, 19, 19, 19, +19, 19, 19, 19, nil, nil, 19, nil, 19, nil, 19, nil, 19, nil, 19, +nil, nil, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, nil, 20, 20, +20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 39, nil, nil, 39, nil, +39, 39, 39, 39, nil, 39, nil, 39, nil, 39, nil, 39, nil, 39, 44, +nil, 39, 44, 44, 44, 44, 44, 44, nil, 44, nil, 44, nil, 44, nil, +44, nil, 44, 45, nil, 44, 45, 45, 45, 45, 45, 45, nil, 45, nil, +45, nil, 45, nil, 45, nil, 45, 138, nil, 45, 138, 138, 138, 138, 138, +138, nil, 138, nil, 138, nil, 138, nil, 138, nil, 138, 146, nil, 138, 146, +146, 146, 146, 146, 146, nil, 146, nil, 146, nil, 146, nil, 146, nil, 146, +nil, nil, 146, 42, 42, 42, 42, 42, 42, 42, 42, nil, 42, nil, 42, +nil, 42, nil, 42, nil, 42, nil, nil, 42, 122, 122, 122, 122, 122, 122, +122, 122, nil, 122, nil, 122, nil, 122, nil, 122, nil, 122, nil, nil, 122, +127, 127, 127, 127, 127, 127, 127, 127, nil, 127, nil, 127, nil, 127, nil, +127, nil, 127, 36, nil, 127, 36, 36, 36, 36, 36, 36, 52, nil, nil, +52, 52, 52, 52, 52, 52, 92, nil, nil, 92, nil, 92, 92, 92, 92, +126, 126, 126, 126, 126, 126, 126, 126, 126, 142, nil, nil, 142, 142, 142, +142, 142, 142, 159, 159, 159, 159, 159, 159, 159, 159, 159, 163, 163, 163, +163, 163, 163, 163, 163, 163, 171, 171, 171, 171, 171, 171, 171, 171, 171, +95, 95, 95, 95, 95, 95, 95, 95, 158, 158, 158, 158, 158, 158, 158, +158, 168, 168, 168, 168, 168, 168, 168, 168, 27, 27, 27, 27, 27, 27] + +racc_action_pointer = [ +135, 9, 157, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 179, 201, +223, 245, 267, 286, 308, 330, nil, nil, nil, nil, nil, nil, 606, nil, 20, +nil, 18, 39, 60, 69, 79, 510, 89, - +3, 352, nil, 120, 449, 130, 371, 390, nil, nil, nil, nil, nil, nil, 519, +nil, nil, nil, nil, nil, 138, 20, nil, 43, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 128, 66, 528, nil, 148, 581, nil, 89, +nil, nil, 149, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 470, nil, nil, 154, 537, 491, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 409, nil, nil, nil, 546, +nil, nil, nil, 428, nil, nil, nil, nil, nil, nil, nil, nil, 112, nil, nil, +589, 555, nil, nil, 155, 564, 164, 142, nil, nil, 597, nil, nil, 573, 164, +nil, nil, nil, nil, nil, nil] + +racc_action_default = [-138, -138, -1, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -138, -138, -138, -138, -138, -138, -138, -138, -103, -104, -105, -106, -107, -108, -111, -110, -138, -2, -138, -138, -138, -138, -138, -138, -138, -138, -27, -26, -35, -138, -58, -41, -40, -47, -48, -49, -50, -51, -52, -63, -66, -67, -68, -69, -70, -138, -138, -112, -138, -116, -117, -118, -119, -120, -121, -122, -123, -124, -125, -126, -127, -128, -129, -130, -131, -132, -133, -134, -135, -137, -109, 179, -13, -14, -15, -16, -17, -138, -138, -23, -22, -33, -138, -19, -24, -79, -80, -138, -82, -83, -84, -85, -86, -87, -88, -89, -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, -100, -25, -35, -138, -58, -28, -138, -59, -42, -46, -55, -56, -65, -71, -72, -75, -76, -77, -31, -38, -44, -53, -54, -57, -61, -73, -74, -39, -62, -101, -102, -136, -113, -114, -115, -18, -20, -21, -33, -138, -138, -78, -81, -138, -59, -36, -37, -64, -45, -59, -43, -60, -138, -34, -36, -37, -29, -30, -32, -34] + +racc_goto_table = [ +126, 44, 125, 43, 144, 144, 160, 93, 97, 52, 166, 82, 144, 40, 41, +39, 138, 146, 169, 30, 36, 94, 44, 1, 123, 129, 169, 52, 90, 37, +52, 167, 147, 92, 120, 121, 31, 32, 33, 34, 35, 170, 58, 166, 59, +83, 170, 166, 151, nil, 150, nil, 166, 159, 4, 166, 4, nil, nil, nil, +nil, 155, nil, 156, 160, nil, nil, 4, 4, 4, 4, 4, nil, 4, 5, +nil, 5, 157, nil, nil, 163, nil, 162, 52, nil, 168, nil, 5, 5, 5, +5, 5, nil, 5, nil, nil, nil, nil, 144, nil, nil, nil, 144, nil, nil, +129, 144, 144, nil, 6, 129, 6, nil, nil, nil, nil, 171, 7, nil, 7, +nil, nil, 6, 6, 6, 6, 6, 8, 6, 8, 7, 7, 7, 7, 7, +11, 7, 11, nil, nil, 8, 8, 8, 8, 8, nil, 8, nil, 11, 11, +11, 11, 11, nil, 11] + +racc_goto_check = [ +22, 24, 21, 23, 36, 36, 37, 18, 16, 34, 35, 41, 36, 19, 20, +17, 25, 25, 28, 3, 13, 23, 24, 1, 23, 24, 28, 34, 14, 15, +34, 29, 32, 17, 19, 20, 1, 1, 1, 1, 1, 33, 1, 35, 38, +39, 33, 35, 42, nil, 41, nil, 35, 22, 4, 35, 4, nil, nil, nil, +nil, 16, nil, 18, 37, nil, nil, 4, 4, 4, 4, 4, nil, 4, 5, +nil, 5, 23, nil, nil, 22, nil, 21, 34, nil, 22, nil, 5, 5, 5, +5, 5, nil, 5, nil, nil, nil, nil, 36, nil, nil, nil, 36, nil, nil, +24, 36, 36, nil, 6, 24, 6, nil, nil, nil, nil, 22, 7, nil, 7, +nil, nil, 6, 6, 6, 6, 6, 8, 6, 8, 7, 7, 7, 7, 7, +11, 7, 11, nil, nil, 8, 8, 8, 8, 8, nil, 8, nil, 11, 11, +11, 11, 11, nil, 11] + +racc_goto_pointer = [nil, 23, nil, 17, 54, 74, 109, 117, 127, nil, nil, 135, nil, 2, -8, 11, -30, -3, -29, -5, -4, -40, -42, -15, -17, -28, nil, nil, -120, -96, nil, nil, -20, -101, -9, -116, -40, -91, 24, 18, nil, -9, -13] + +racc_goto_default = [ +nil, nil, 2, 3, 46, 47, 48, 49, 50, 9, 10, 51, 12, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 140, nil, 45, 127, 139, 128, +141, 130, 142, 143, 132, 131, 134, 98, nil, 28, 27, nil, 60] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 27, :_reduce_none, + 2, 28, :_reduce_2, + 1, 28, :_reduce_3, + 1, 29, :_reduce_none, + 1, 29, :_reduce_none, + 1, 29, :_reduce_none, + 1, 29, :_reduce_none, + 1, 29, :_reduce_none, + 1, 29, :_reduce_none, + 1, 29, :_reduce_none, + 1, 29, :_reduce_none, + 1, 29, :_reduce_none, + 3, 30, :_reduce_13, + 3, 31, :_reduce_14, + 3, 32, :_reduce_15, + 3, 33, :_reduce_16, + 3, 34, :_reduce_17, + 4, 35, :_reduce_18, + 3, 35, :_reduce_19, + 2, 40, :_reduce_20, + 2, 40, :_reduce_21, + 1, 40, :_reduce_22, + 1, 40, :_reduce_23, + 2, 41, :_reduce_24, + 2, 41, :_reduce_25, + 1, 41, :_reduce_26, + 1, 41, :_reduce_27, + 2, 39, :_reduce_none, + 4, 39, :_reduce_29, + 4, 39, :_reduce_30, + 2, 43, :_reduce_none, + 4, 43, :_reduce_32, + 1, 44, :_reduce_33, + 3, 44, :_reduce_34, + 1, 45, :_reduce_none, + 3, 45, :_reduce_36, + 3, 45, :_reduce_37, + 2, 46, :_reduce_38, + 2, 46, :_reduce_39, + 1, 46, :_reduce_40, + 1, 46, :_reduce_41, + 1, 47, :_reduce_none, + 2, 51, :_reduce_43, + 1, 51, :_reduce_44, + 2, 53, :_reduce_45, + 1, 53, :_reduce_46, + 1, 50, :_reduce_none, + 1, 50, :_reduce_none, + 1, 50, :_reduce_none, + 1, 50, :_reduce_none, + 1, 50, :_reduce_none, + 1, 50, :_reduce_none, + 1, 54, :_reduce_none, + 1, 54, :_reduce_none, + 1, 55, :_reduce_none, + 1, 55, :_reduce_none, + 1, 56, :_reduce_57, + 1, 52, :_reduce_58, + 1, 57, :_reduce_59, + 2, 58, :_reduce_60, + 1, 58, :_reduce_none, + 2, 49, :_reduce_62, + 1, 49, :_reduce_none, + 2, 48, :_reduce_64, + 1, 48, :_reduce_none, + 1, 60, :_reduce_none, + 1, 60, :_reduce_none, + 1, 60, :_reduce_none, + 1, 60, :_reduce_none, + 1, 60, :_reduce_none, + 1, 62, :_reduce_none, + 1, 62, :_reduce_none, + 1, 59, :_reduce_none, + 1, 59, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 1, 61, :_reduce_none, + 2, 42, :_reduce_78, + 1, 42, :_reduce_none, + 1, 63, :_reduce_none, + 2, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 1, 63, :_reduce_none, + 3, 36, :_reduce_101, + 3, 37, :_reduce_102, + 1, 65, :_reduce_none, + 1, 65, :_reduce_none, + 1, 65, :_reduce_none, + 1, 65, :_reduce_none, + 1, 65, :_reduce_none, + 1, 65, :_reduce_none, + 2, 66, :_reduce_109, + 1, 66, :_reduce_none, + 1, 38, :_reduce_111, + 1, 67, :_reduce_none, + 2, 67, :_reduce_113, + 2, 67, :_reduce_114, + 2, 67, :_reduce_115, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 1, 68, :_reduce_none, + 2, 64, :_reduce_136, + 1, 64, :_reduce_none ] + +racc_reduce_n = 138 + +racc_shift_n = 179 + +racc_token_table = { + false => 0, + :error => 1, + :EX_LOW => 2, + :QUOTE => 3, + :BAR => 4, + :SLASH => 5, + :BACK_SLASH => 6, + :URL => 7, + :OTHER => 8, + :REF_OPEN => 9, + :FOOTNOTE_OPEN => 10, + :FOOTNOTE_CLOSE => 11, + :EX_HIGH => 12, + :EM_OPEN => 13, + :EM_CLOSE => 14, + :CODE_OPEN => 15, + :CODE_CLOSE => 16, + :VAR_OPEN => 17, + :VAR_CLOSE => 18, + :KBD_OPEN => 19, + :KBD_CLOSE => 20, + :INDEX_OPEN => 21, + :INDEX_CLOSE => 22, + :REF_CLOSE => 23, + :VERB_OPEN => 24, + :VERB_CLOSE => 25 } + +racc_nt_base = 26 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "EX_LOW", + "QUOTE", + "BAR", + "SLASH", + "BACK_SLASH", + "URL", + "OTHER", + "REF_OPEN", + "FOOTNOTE_OPEN", + "FOOTNOTE_CLOSE", + "EX_HIGH", + "EM_OPEN", + "EM_CLOSE", + "CODE_OPEN", + "CODE_CLOSE", + "VAR_OPEN", + "VAR_CLOSE", + "KBD_OPEN", + "KBD_CLOSE", + "INDEX_OPEN", + "INDEX_CLOSE", + "REF_CLOSE", + "VERB_OPEN", + "VERB_CLOSE", + "$start", + "content", + "elements", + "element", + "emphasis", + "code", + "var", + "keyboard", + "index", + "reference", + "footnote", + "verb", + "normal_str_ele", + "substitute", + "ref_label", + "ref_label2", + "ref_url_strings", + "filename", + "element_label", + "element_label2", + "ref_subst_content", + "ref_subst_content_q", + "ref_subst_strings_q", + "ref_subst_strings_first", + "ref_subst_ele2", + "ref_subst_eles", + "ref_subst_str_ele_first", + "ref_subst_eles_q", + "ref_subst_ele", + "ref_subst_ele_q", + "ref_subst_str_ele", + "ref_subst_str_ele_q", + "ref_subst_strings", + "ref_subst_string3", + "ref_subst_string", + "ref_subst_string_q", + "ref_subst_string2", + "ref_url_string", + "verb_strings", + "normal_string", + "normal_strings", + "verb_string", + "verb_normal_string" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 81) + def _reduce_2(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 82) + def _reduce_3(val, _values, result) + result = val + result + end +.,., + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +# reduce 7 omitted + +# reduce 8 omitted + +# reduce 9 omitted + +# reduce 10 omitted + +# reduce 11 omitted + +# reduce 12 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 96) + def _reduce_13(val, _values, result) + result = Emphasis.new + add_children_to_element(result, *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 101) + def _reduce_14(val, _values, result) + result = Code.new + add_children_to_element(result, *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 106) + def _reduce_15(val, _values, result) + result = Var.new + add_children_to_element(result, *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 111) + def _reduce_16(val, _values, result) + result = Keyboard.new + add_children_to_element(result, *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 116) + def _reduce_17(val, _values, result) + result = Index.new + add_children_to_element(result, *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 125) + def _reduce_18(val, _values, result) + result = Reference.new(val[2]) + add_children_to_element(result, *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 130) + def _reduce_19(val, _values, result) + result = make_reference_from_label(val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 134) + def _reduce_20(val, _values, result) + result = Reference::URL.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 136) + def _reduce_21(val, _values, result) + result = Reference::TemporaryLabel.new(val[1], + val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 139) + def _reduce_22(val, _values, result) + result = Reference::TemporaryLabel.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 140) + def _reduce_23(val, _values, result) + result = Reference::TemporaryLabel.new([], val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 142) + def _reduce_24(val, _values, result) + result = Reference::URL.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 144) + def _reduce_25(val, _values, result) + result = Reference::TemporaryLabel.new(val[1], + val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 147) + def _reduce_26(val, _values, result) + result = Reference::TemporaryLabel.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 148) + def _reduce_27(val, _values, result) + result = Reference::TemporaryLabel.new([], + val[0]) + result + end +.,., + +# reduce 28 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 153) + def _reduce_29(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 155) + def _reduce_30(val, _values, result) + result = [StringElement.new(val[1])] + result + end +.,., + +# reduce 31 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 160) + def _reduce_32(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 165) + def _reduce_33(val, _values, result) + result = [StringElement.new(val[0])] + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 167) + def _reduce_34(val, _values, result) + result = [StringElement.new(val[1])] + result + end +.,., + +# reduce 35 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 173) + def _reduce_36(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 175) + def _reduce_37(val, _values, result) + result = [StringElement.new(val[1])] + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 179) + def _reduce_38(val, _values, result) + result = val[1].unshift(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 181) + def _reduce_39(val, _values, result) + result = val[1].unshift(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 183) + def _reduce_40(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 184) + def _reduce_41(val, _values, result) + result = val + result + end +.,., + +# reduce 42 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 189) + def _reduce_43(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 190) + def _reduce_44(val, _values, result) + result = val + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 193) + def _reduce_45(val, _values, result) + result.push(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 194) + def _reduce_46(val, _values, result) + result = val + result + end +.,., + +# reduce 47 omitted + +# reduce 48 omitted + +# reduce 49 omitted + +# reduce 50 omitted + +# reduce 51 omitted + +# reduce 52 omitted + +# reduce 53 omitted + +# reduce 54 omitted + +# reduce 55 omitted + +# reduce 56 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 211) + def _reduce_57(val, _values, result) + result = StringElement.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 214) + def _reduce_58(val, _values, result) + result = StringElement.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 217) + def _reduce_59(val, _values, result) + result = StringElement.new(val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 221) + def _reduce_60(val, _values, result) + result << val[1] + result + end +.,., + +# reduce 61 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 227) + def _reduce_62(val, _values, result) + result << val[1] + result + end +.,., + +# reduce 63 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 231) + def _reduce_64(val, _values, result) + result << val[1] + result + end +.,., + +# reduce 65 omitted + +# reduce 66 omitted + +# reduce 67 omitted + +# reduce 68 omitted + +# reduce 69 omitted + +# reduce 70 omitted + +# reduce 71 omitted + +# reduce 72 omitted + +# reduce 73 omitted + +# reduce 74 omitted + +# reduce 75 omitted + +# reduce 76 omitted + +# reduce 77 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 254) + def _reduce_78(val, _values, result) + result << val[1] + result + end +.,., + +# reduce 79 omitted + +# reduce 80 omitted + +# reduce 81 omitted + +# reduce 82 omitted + +# reduce 83 omitted + +# reduce 84 omitted + +# reduce 85 omitted + +# reduce 86 omitted + +# reduce 87 omitted + +# reduce 88 omitted + +# reduce 89 omitted + +# reduce 90 omitted + +# reduce 91 omitted + +# reduce 92 omitted + +# reduce 93 omitted + +# reduce 94 omitted + +# reduce 95 omitted + +# reduce 96 omitted + +# reduce 97 omitted + +# reduce 98 omitted + +# reduce 99 omitted + +# reduce 100 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 285) + def _reduce_101(val, _values, result) + result = Footnote.new + add_children_to_element(result, *val[1]) + + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 290) + def _reduce_102(val, _values, result) + result = Verb.new(val[1]) + result + end +.,., + +# reduce 103 omitted + +# reduce 104 omitted + +# reduce 105 omitted + +# reduce 106 omitted + +# reduce 107 omitted + +# reduce 108 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 304) + def _reduce_109(val, _values, result) + result << val[1] + result + end +.,., + +# reduce 110 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 309) + def _reduce_111(val, _values, result) + result = StringElement.new(val[0]) + result + end +.,., + +# reduce 112 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 314) + def _reduce_113(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 315) + def _reduce_114(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'rdinlineparser.y', 316) + def _reduce_115(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 116 omitted + +# reduce 117 omitted + +# reduce 118 omitted + +# reduce 119 omitted + +# reduce 120 omitted + +# reduce 121 omitted + +# reduce 122 omitted + +# reduce 123 omitted + +# reduce 124 omitted + +# reduce 125 omitted + +# reduce 126 omitted + +# reduce 127 omitted + +# reduce 128 omitted + +# reduce 129 omitted + +# reduce 130 omitted + +# reduce 131 omitted + +# reduce 132 omitted + +# reduce 133 omitted + +# reduce 134 omitted + +# reduce 135 omitted + +module_eval(<<'.,.,', 'rdinlineparser.y', 341) + def _reduce_136(val, _values, result) + result << val[1] + result + end +.,., + +# reduce 137 omitted + +def _reduce_none(val, _values, result) + val[0] +end + +end # class RDInlineParser + +end # end of module RD diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index cc1861d7..0a122993 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -261,5 +261,16 @@ def test_huia assert_debugfile 'huia.y', [285, 0, 0, 0] assert_output 'huia.y' end + + # .y files from rdtool gem + + def test_rdtool + assert_compile 'rdblockparser.y' + assert_compile 'rdinlineparser.y' + assert_debugfile 'rdblockparser.y', [0, 0, 0, 0] + assert_debugfile 'rdinlineparser.y', [0, 0, 0, 0] + assert_output 'rdblockparser.y' + assert_output 'rdinlineparser.y' + end end end From f4ad55e7c267cfa8c1d71f66843489db6361967e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Nov 2015 09:43:30 +0200 Subject: [PATCH 101/619] Add regression test based on c.y from cast gem From the author, George Ogata: Go for it - hope it's useful! --- Manifest.txt | 2 + test/assets/cast.y | 926 ++++++++++ test/regress/cast | 3535 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 4471 insertions(+) create mode 100644 test/assets/cast.y create mode 100644 test/regress/cast diff --git a/Manifest.txt b/Manifest.txt index 39cad683..0595c81f 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -55,6 +55,7 @@ setup.rb tasks/doc.rb tasks/email.rb test/assets/bibtex.y +test/assets/cast.y test/assets/chk.y test/assets/conf.y test/assets/csspool.y @@ -104,6 +105,7 @@ test/bench.y test/helper.rb test/infini.y test/regress/bibtex +test/regress/cast test/regress/csspool test/regress/edtf test/regress/journey diff --git a/test/assets/cast.y b/test/assets/cast.y new file mode 100644 index 00000000..d180c09e --- /dev/null +++ b/test/assets/cast.y @@ -0,0 +1,926 @@ +# The MIT License +# +# Copyright (c) George Ogata +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +class C::Parser +# shift/reduce conflict on "if (c) if (c) ; else ; else ;" +expect 1 +rule + +# A.2.4 External definitions + +# Returns TranslationUnit +translation_unit + : external_declaration {result = TranslationUnit.new_at(val[0].pos, NodeChain[val[0]])} + | translation_unit external_declaration {result = val[0]; result.entities << val[1]} + +# Returns Declaration|FunctionDef +external_declaration + : function_definition {result = val[0]} + | declaration {result = val[0]} + +# Returns FunctionDef +function_definition + : declaration_specifiers declarator declaration_list compound_statement {result = make_function_def(val[0][0], val[0][1], val[1], val[2], val[3])} + | declaration_specifiers declarator compound_statement {result = make_function_def(val[0][0], val[0][1], val[1], nil , val[2])} + +# Returns [Declaration] +declaration_list + : declaration {result = [val[0]]} + | declaration_list declaration {result = val[0] << val[1]} + +# A.2.3 Statements + +# Returns Statement +statement + : labeled_statement {result = val[0]} + | compound_statement {result = val[0]} + | expression_statement {result = val[0]} + | selection_statement {result = val[0]} + | iteration_statement {result = val[0]} + | jump_statement {result = val[0]} + +# Returns Statement +labeled_statement + : identifier COLON statement {val[2].labels.unshift(PlainLabel.new_at(val[0].pos, val[0].val)); result = val[2]} + | CASE constant_expression COLON statement {val[3].labels.unshift(Case .new_at(val[0].pos, val[1] )); result = val[3]} + | DEFAULT COLON statement {val[2].labels.unshift(Default .new_at(val[0].pos )); result = val[2]} + # type names can also be used as labels + | typedef_name COLON statement {val[2].labels.unshift(PlainLabel.new_at(val[0].pos, val[0].name)); result = val[2]} + +# Returns Block +compound_statement + : LBRACE block_item_list RBRACE {result = Block.new_at(val[0].pos, val[1])} + | LBRACE RBRACE {result = Block.new_at(val[0].pos )} + +# Returns NodeChain[Declaration|Statement] +block_item_list + : block_item {result = NodeChain[val[0]]} + | block_item_list block_item {result = val[0] << val[1]} + +# Returns Declaration|Statement +block_item + : declaration {result = val[0]} + | statement {result = val[0]} + +# Returns ExpressionStatement +expression_statement + : expression SEMICOLON {result = ExpressionStatement.new_at(val[0].pos, val[0])} + | SEMICOLON {result = ExpressionStatement.new_at(val[0].pos )} + +# Returns Statement +selection_statement + : IF LPAREN expression RPAREN statement {result = If .new_at(val[0].pos, val[2], val[4] )} + | IF LPAREN expression RPAREN statement ELSE statement {result = If .new_at(val[0].pos, val[2], val[4], val[6])} + | SWITCH LPAREN expression RPAREN statement {result = Switch.new_at(val[0].pos, val[2], val[4] )} + +# Returns Statement +iteration_statement + : WHILE LPAREN expression RPAREN statement {result = While.new_at(val[0].pos, val[2], val[4] )} + | DO statement WHILE LPAREN expression RPAREN SEMICOLON {result = While.new_at(val[0].pos, val[4], val[1], :do => true )} + | FOR LPAREN expression SEMICOLON expression SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, val[2], val[4], val[6], val[8])} + | FOR LPAREN expression SEMICOLON expression SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, val[2], val[4], nil , val[7])} + | FOR LPAREN expression SEMICOLON SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, val[2], nil , val[5], val[7])} + | FOR LPAREN expression SEMICOLON SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, val[2], nil , nil , val[6])} + | FOR LPAREN SEMICOLON expression SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, nil , val[3], val[5], val[7])} + | FOR LPAREN SEMICOLON expression SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, nil , val[3], nil , val[6])} + | FOR LPAREN SEMICOLON SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, nil , nil , val[4], val[6])} + | FOR LPAREN SEMICOLON SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, nil , nil , nil , val[5])} + | FOR LPAREN declaration expression SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, val[2], val[3], val[5], val[7])} + | FOR LPAREN declaration expression SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, val[2], val[3], nil , val[6])} + | FOR LPAREN declaration SEMICOLON expression RPAREN statement {result = For.new_at(val[0].pos, val[2], nil , val[4], val[6])} + | FOR LPAREN declaration SEMICOLON RPAREN statement {result = For.new_at(val[0].pos, val[2], nil , nil , val[5])} + +# Returns Statement +jump_statement + : GOTO identifier SEMICOLON {result = Goto .new_at(val[0].pos, val[1].val)} + | CONTINUE SEMICOLON {result = Continue.new_at(val[0].pos )} + | BREAK SEMICOLON {result = Break .new_at(val[0].pos )} + | RETURN expression SEMICOLON {result = Return .new_at(val[0].pos, val[1] )} + | RETURN SEMICOLON {result = Return .new_at(val[0].pos )} + # type names can also be used as labels + | GOTO typedef_name SEMICOLON {result = Goto .new_at(val[0].pos, val[1].name)} + +# A.2.2 Declarations + +# Returns Declaration +declaration + : declaration_specifiers init_declarator_list SEMICOLON {result = make_declaration(val[0][0], val[0][1], val[1])} + | declaration_specifiers SEMICOLON {result = make_declaration(val[0][0], val[0][1], NodeArray[])} + +# Returns {Pos, [Symbol]} +declaration_specifiers + : storage_class_specifier declaration_specifiers {val[1][1] << val[0][1]; result = val[1]} + | storage_class_specifier {result = [val[0][0], [val[0][1]]]} + | type_specifier declaration_specifiers {val[1][1] << val[0][1]; result = val[1]} + | type_specifier {result = [val[0][0], [val[0][1]]]} + | type_qualifier declaration_specifiers {val[1][1] << val[0][1]; result = val[1]} + | type_qualifier {result = [val[0][0], [val[0][1]]]} + | function_specifier declaration_specifiers {val[1][1] << val[0][1]; result = val[1]} + | function_specifier {result = [val[0][0], [val[0][1]]]} + +# Returns NodeArray[Declarator] +init_declarator_list + : init_declarator {result = NodeArray[val[0]]} + | init_declarator_list COMMA init_declarator {result = val[0] << val[2]} + +# Returns Declarator +init_declarator + : declarator {result = val[0]} + | declarator EQ initializer {val[0].init = val[2]; result = val[0]} + +# Returns [Pos, Symbol] +storage_class_specifier + : TYPEDEF {result = [val[0].pos, :typedef ]} + | EXTERN {result = [val[0].pos, :extern ]} + | STATIC {result = [val[0].pos, :static ]} + | AUTO {result = [val[0].pos, :auto ]} + | REGISTER {result = [val[0].pos, :register]} + +# Returns [Pos, Type|Symbol] +type_specifier + : VOID {result = [val[0].pos, :void ]} + | CHAR {result = [val[0].pos, :char ]} + | SHORT {result = [val[0].pos, :short ]} + | INT {result = [val[0].pos, :int ]} + | LONG {result = [val[0].pos, :long ]} + | FLOAT {result = [val[0].pos, :float ]} + | DOUBLE {result = [val[0].pos, :double ]} + | SIGNED {result = [val[0].pos, :signed ]} + | UNSIGNED {result = [val[0].pos, :unsigned ]} + | BOOL {result = [val[0].pos, :_Bool ]} + | COMPLEX {result = [val[0].pos, :_Complex ]} + | IMAGINARY {result = [val[0].pos, :_Imaginary]} + | struct_or_union_specifier {result = [val[0].pos, val[0] ]} + | enum_specifier {result = [val[0].pos, val[0] ]} + | typedef_name {result = [val[0].pos, val[0] ]} + +# Returns Struct|Union +struct_or_union_specifier + : struct_or_union identifier LBRACE struct_declaration_list RBRACE {result = val[0][1].new_at(val[0][0], val[1].val, val[3])} + | struct_or_union LBRACE struct_declaration_list RBRACE {result = val[0][1].new_at(val[0][0], nil , val[2])} + | struct_or_union identifier {result = val[0][1].new_at(val[0][0], val[1].val, nil )} + # type names can also be used as struct identifiers + | struct_or_union typedef_name LBRACE struct_declaration_list RBRACE {result = val[0][1].new_at(val[0][0], val[1].name, val[3])} + | struct_or_union typedef_name {result = val[0][1].new_at(val[0][0], val[1].name, nil )} + +# Returns [Pos, Class] +struct_or_union + : STRUCT {result = [val[0].pos, Struct]} + | UNION {result = [val[0].pos, Union ]} + +# Returns NodeArray[Declaration] +struct_declaration_list + : struct_declaration {result = NodeArray[val[0]]} + | struct_declaration_list struct_declaration {val[0] << val[1]; result = val[0]} + +# Returns Declaration +struct_declaration + : specifier_qualifier_list struct_declarator_list SEMICOLON {result = make_declaration(val[0][0], val[0][1], val[1])} + +# Returns {Pos, [Symbol]} +specifier_qualifier_list + : type_specifier specifier_qualifier_list {val[1][1] << val[0][1]; result = val[1]} + | type_specifier {result = [val[0][0], [val[0][1]]]} + | type_qualifier specifier_qualifier_list {val[1][1] << val[0][1]; result = val[1]} + | type_qualifier {result = [val[0][0], [val[0][1]]]} + +# Returns NodeArray[Declarator] +struct_declarator_list + : struct_declarator {result = NodeArray[val[0]]} + | struct_declarator_list COMMA struct_declarator {result = val[0] << val[2]} + +# Returns Declarator +struct_declarator + : declarator {result = val[0]} + | declarator COLON constant_expression {result = val[0]; val[0].num_bits = val[2]} + | COLON constant_expression {result = Declarator.new_at(val[0].pos, :num_bits => val[1])} + +# Returns Enum +enum_specifier + : ENUM identifier LBRACE enumerator_list RBRACE {result = Enum.new_at(val[0].pos, val[1].val, val[3])} + | ENUM LBRACE enumerator_list RBRACE {result = Enum.new_at(val[0].pos, nil , val[2])} + | ENUM identifier LBRACE enumerator_list COMMA RBRACE {result = Enum.new_at(val[0].pos, val[1].val, val[3])} + | ENUM LBRACE enumerator_list COMMA RBRACE {result = Enum.new_at(val[0].pos, nil , val[2])} + | ENUM identifier {result = Enum.new_at(val[0].pos, val[1].val, nil )} + # type names can also be used as enum names + | ENUM typedef_name LBRACE enumerator_list RBRACE {result = Enum.new_at(val[0].pos, val[1].name, val[3])} + | ENUM typedef_name LBRACE enumerator_list COMMA RBRACE {result = Enum.new_at(val[0].pos, val[1].name, val[3])} + | ENUM typedef_name {result = Enum.new_at(val[0].pos, val[1].name, nil )} + +# Returns NodeArray[Enumerator] +enumerator_list + : enumerator {result = NodeArray[val[0]]} + | enumerator_list COMMA enumerator {result = val[0] << val[2]} + +# Returns Enumerator +enumerator + : enumeration_constant {result = Enumerator.new_at(val[0].pos, val[0].val, nil )} + | enumeration_constant EQ constant_expression {result = Enumerator.new_at(val[0].pos, val[0].val, val[2])} + +# Returns [Pos, Symbol] +type_qualifier + : CONST {result = [val[0].pos, :const ]} + | RESTRICT {result = [val[0].pos, :restrict]} + | VOLATILE {result = [val[0].pos, :volatile]} + +# Returns [Pos, Symbol] +function_specifier + : INLINE {result = [val[0].pos, :inline]} + +# Returns Declarator +declarator + : pointer direct_declarator {result = add_decl_type(val[1], val[0])} + | direct_declarator {result = val[0]} + +# Returns Declarator +direct_declarator + : identifier {result = Declarator.new_at(val[0].pos, nil, val[0].val)} + | LPAREN declarator RPAREN {result = val[1]} + | direct_declarator LBRACKET type_qualifier_list assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET type_qualifier_list RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos, nil, val[2]))} + | direct_declarator LBRACKET RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} + | direct_declarator LBRACKET STATIC type_qualifier_list assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET STATIC assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET type_qualifier_list STATIC assignment_expression RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET type_qualifier_list MUL RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LBRACKET MUL RBRACKET {result = add_decl_type(val[0], Array.new_at(val[0].pos ))} # TODO + | direct_declarator LPAREN parameter_type_list RPAREN {result = add_decl_type(val[0], Function.new_at(val[0].pos, nil, param_list(*val[2]), :var_args => val[2][1]))} + | direct_declarator LPAREN identifier_list RPAREN {result = add_decl_type(val[0], Function.new_at(val[0].pos, nil, val[2]))} + | direct_declarator LPAREN RPAREN {result = add_decl_type(val[0], Function.new_at(val[0].pos ))} + +# Returns Pointer +pointer + : MUL type_qualifier_list {result = add_type_quals(Pointer.new_at(val[0].pos), val[1][1]) } + | MUL {result = Pointer.new_at(val[0].pos) } + | MUL type_qualifier_list pointer {p = add_type_quals(Pointer.new_at(val[0].pos), val[1][1]); val[2].direct_type = p; result = val[2]} + | MUL pointer {p = Pointer.new_at(val[0].pos) ; val[1].direct_type = p; result = val[1]} + +# Returns {Pos, [Symbol]} +type_qualifier_list + : type_qualifier {result = [val[0][0], [val[0][1]]]} + | type_qualifier_list type_qualifier {val[0][1] << val[1][1]; result = val[0]} + +# Returns [NodeArray[Parameter], var_args?] +parameter_type_list + : parameter_list {result = [val[0], false]} + | parameter_list COMMA ELLIPSIS {result = [val[0], true ]} + +# Returns NodeArray[Parameter] +parameter_list + : parameter_declaration {result = NodeArray[val[0]]} + | parameter_list COMMA parameter_declaration {result = val[0] << val[2]} + +# Returns Parameter +parameter_declaration + : declaration_specifiers declarator {ind_type = val[1].indirect_type and ind_type.detach + result = make_parameter(val[0][0], val[0][1], ind_type, val[1].name)} + | declaration_specifiers abstract_declarator {result = make_parameter(val[0][0], val[0][1], val[1] , nil )} + | declaration_specifiers {result = make_parameter(val[0][0], val[0][1], nil , nil )} + +# Returns NodeArray[Parameter] +identifier_list + : identifier {result = NodeArray[Parameter.new_at(val[0].pos, nil, val[0].val)]} + | identifier_list COMMA identifier {result = val[0] << Parameter.new_at(val[2].pos, nil, val[2].val)} + +# Returns Type +type_name + : specifier_qualifier_list abstract_declarator {val[1].direct_type = make_direct_type(val[0][0], val[0][1]); result = val[1]} + | specifier_qualifier_list {result = make_direct_type(val[0][0], val[0][1]) } + +# Returns Type +abstract_declarator + : pointer {result = val[0]} + | pointer direct_abstract_declarator {val[1].direct_type = val[0]; result = val[1]} + | direct_abstract_declarator {result = val[0]} + +# Returns Type +direct_abstract_declarator + : LPAREN abstract_declarator RPAREN {result = val[1]} + | direct_abstract_declarator LBRACKET assignment_expression RBRACKET {val[0].direct_type = Array.new_at(val[0].pos, nil, val[2]); result = val[0]} + | direct_abstract_declarator LBRACKET RBRACKET {val[0].direct_type = Array.new_at(val[0].pos, nil, nil ); result = val[0]} + | LBRACKET assignment_expression RBRACKET {result = Array.new_at(val[0].pos, nil, val[1])} + | LBRACKET RBRACKET {result = Array.new_at(val[0].pos )} + | direct_abstract_declarator LBRACKET MUL RBRACKET {val[0].direct_type = Array.new_at(val[0].pos); result = val[0]} # TODO + | LBRACKET MUL RBRACKET {result = Array.new_at(val[0].pos)} # TODO + | direct_abstract_declarator LPAREN parameter_type_list RPAREN {val[0].direct_type = Function.new_at(val[0].pos, nil, param_list(*val[2]), val[2][1]); result = val[0]} + | direct_abstract_declarator LPAREN RPAREN {val[0].direct_type = Function.new_at(val[0].pos ); result = val[0]} + | LPAREN parameter_type_list RPAREN {result = Function.new_at(val[0].pos, nil, param_list(*val[1]), val[1][1])} + | LPAREN RPAREN {result = Function.new_at(val[0].pos )} + +# Returns CustomType +typedef_name + #: identifier -- insufficient since we must distinguish between type + # names and var names (otherwise we have a conflict) + : TYPENAME {result = CustomType.new_at(val[0].pos, val[0].val)} + +# Returns Expression +initializer + : assignment_expression {result = val[0]} + | LBRACE initializer_list RBRACE {result = CompoundLiteral.new_at(val[0].pos, nil, val[1])} + | LBRACE initializer_list COMMA RBRACE {result = CompoundLiteral.new_at(val[0].pos, nil, val[1])} + +# Returns NodeArray[MemberInit] +initializer_list + : designation initializer {result = NodeArray[MemberInit.new_at(val[0][0] , val[0][1], val[1])]} + | initializer {result = NodeArray[MemberInit.new_at(val[0].pos, nil , val[0])]} + | initializer_list COMMA designation initializer {result = val[0] << MemberInit.new_at(val[2][0] , val[2][1], val[3])} + | initializer_list COMMA initializer {result = val[0] << MemberInit.new_at(val[2].pos, nil , val[2])} + +# Returns {Pos, NodeArray[Expression|Token]} +designation + : designator_list EQ {result = val[0]} + +# Returns {Pos, NodeArray[Expression|Token]} +designator_list + : designator {result = val[0]; val[0][1] = NodeArray[val[0][1]]} + | designator_list designator {result = val[0]; val[0][1] << val[1][1]} + +# Returns {Pos, Expression|Member} +designator + : LBRACKET constant_expression RBRACKET {result = [val[1].pos, val[1] ]} + | DOT identifier {result = [val[1].pos, Member.new_at(val[1].pos, val[1].val)]} + +# A.2.1 Expressions + +# Returns Expression +primary_expression + : identifier {result = Variable.new_at(val[0].pos, val[0].val)} + | constant {result = val[0]} + | string_literal {result = val[0]} + # GCC EXTENSION: allow a compound statement in parentheses as an expression + | LPAREN expression RPAREN {result = val[1]} + | LPAREN compound_statement RPAREN {block_expressions_enabled? or parse_error val[0].pos, "compound statement found where expression expected" + result = BlockExpression.new(val[1]); result.pos = val[0].pos} + +# Returns Expression +postfix_expression + : primary_expression {result = val[0]} + | postfix_expression LBRACKET expression RBRACKET {result = Index .new_at(val[0].pos, val[0], val[2])} + | postfix_expression LPAREN argument_expression_list RPAREN {result = Call .new_at(val[0].pos, val[0], val[2] )} + | postfix_expression LPAREN RPAREN {result = Call .new_at(val[0].pos, val[0], NodeArray[])} + | postfix_expression DOT identifier {result = Dot .new_at(val[0].pos, val[0], Member.new(val[2].val))} + | postfix_expression ARROW identifier {result = Arrow .new_at(val[0].pos, val[0], Member.new(val[2].val))} + | postfix_expression INC {result = PostInc .new_at(val[0].pos, val[0] )} + | postfix_expression DEC {result = PostDec .new_at(val[0].pos, val[0] )} + | LPAREN type_name RPAREN LBRACE initializer_list RBRACE {result = CompoundLiteral.new_at(val[0].pos, val[1], val[4])} + | LPAREN type_name RPAREN LBRACE initializer_list COMMA RBRACE {result = CompoundLiteral.new_at(val[0].pos, val[1], val[4])} + +# Returns [Expression|Type] +argument_expression_list + : argument_expression {result = NodeArray[val[0]]} + | argument_expression_list COMMA argument_expression {result = val[0] << val[2]} + +# Returns Expression|Type -- EXTENSION: allow type names here too, to support some standard library macros (e.g., va_arg [7.15.1.1]) +argument_expression + : assignment_expression {result = val[0]} + | type_name {result = val[0]} + +# Returns Expression +unary_expression + : postfix_expression {result = val[0]} + | INC unary_expression {result = PreInc.new_at(val[0].pos, val[1])} + | DEC unary_expression {result = PreDec.new_at(val[0].pos, val[1])} + | unary_operator cast_expression {result = val[0][0].new_at(val[0][1], val[1])} + | SIZEOF unary_expression {result = Sizeof.new_at(val[0].pos, val[1])} + | SIZEOF LPAREN type_name RPAREN {result = Sizeof.new_at(val[0].pos, val[2])} + +# Returns [Class, Pos] +unary_operator + : AND {result = [Address , val[0].pos]} + | MUL {result = [Dereference, val[0].pos]} + | ADD {result = [Positive , val[0].pos]} + | SUB {result = [Negative , val[0].pos]} + | NOT {result = [BitNot , val[0].pos]} + | BANG {result = [Not , val[0].pos]} + +# Returns Expression +cast_expression + : unary_expression {result = val[0]} + | LPAREN type_name RPAREN cast_expression {result = Cast.new_at(val[0].pos, val[1], val[3])} + +# Returns Expression +multiplicative_expression + : cast_expression {result = val[0]} + | multiplicative_expression MUL cast_expression {result = Multiply.new_at(val[0].pos, val[0], val[2])} + | multiplicative_expression DIV cast_expression {result = Divide .new_at(val[0].pos, val[0], val[2])} + | multiplicative_expression MOD cast_expression {result = Mod .new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +additive_expression + : multiplicative_expression {result = val[0]} + | additive_expression ADD multiplicative_expression {result = Add .new_at(val[0].pos, val[0], val[2])} + | additive_expression SUB multiplicative_expression {result = Subtract.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +shift_expression + : additive_expression {result = val[0]} + | shift_expression LSHIFT additive_expression {result = ShiftLeft .new_at(val[0].pos, val[0], val[2])} + | shift_expression RSHIFT additive_expression {result = ShiftRight.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +relational_expression + : shift_expression {result = val[0]} + | relational_expression LT shift_expression {result = Less.new_at(val[0].pos, val[0], val[2])} + | relational_expression GT shift_expression {result = More.new_at(val[0].pos, val[0], val[2])} + | relational_expression LEQ shift_expression {result = LessOrEqual.new_at(val[0].pos, val[0], val[2])} + | relational_expression GEQ shift_expression {result = MoreOrEqual.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +equality_expression + : relational_expression {result = val[0]} + | equality_expression EQEQ relational_expression {result = Equal .new_at(val[0].pos, val[0], val[2])} + | equality_expression NEQ relational_expression {result = NotEqual.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +and_expression + : equality_expression {result = val[0]} + | and_expression AND equality_expression {result = BitAnd.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +exclusive_or_expression + : and_expression {result = val[0]} + | exclusive_or_expression XOR and_expression {result = BitXor.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +inclusive_or_expression + : exclusive_or_expression {result = val[0]} + | inclusive_or_expression OR exclusive_or_expression {result = BitOr.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +logical_and_expression + : inclusive_or_expression {result = val[0]} + | logical_and_expression ANDAND inclusive_or_expression {result = And.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +logical_or_expression + : logical_and_expression {result = val[0]} + | logical_or_expression OROR logical_and_expression {result = Or.new_at(val[0].pos, val[0], val[2])} + +# Returns Expression +conditional_expression + : logical_or_expression {result = val[0]} + | logical_or_expression QUESTION expression COLON conditional_expression {result = Conditional.new_at(val[0].pos, val[0], val[2], val[4])} + +# Returns Expression +assignment_expression + : conditional_expression {result = val[0]} + | unary_expression assignment_operator assignment_expression {result = val[1].new_at(val[0].pos, val[0], val[2])} + +# Returns Class +assignment_operator + : EQ {result = Assign} + | MULEQ {result = MultiplyAssign} + | DIVEQ {result = DivideAssign} + | MODEQ {result = ModAssign} + | ADDEQ {result = AddAssign} + | SUBEQ {result = SubtractAssign} + | LSHIFTEQ {result = ShiftLeftAssign} + | RSHIFTEQ {result = ShiftRightAssign} + | ANDEQ {result = BitAndAssign} + | XOREQ {result = BitXorAssign} + | OREQ {result = BitOrAssign} + +# Returns Expression +expression + : assignment_expression {result = val[0]} + | expression COMMA assignment_expression { + if val[0].is_a? Comma + if val[2].is_a? Comma + val[0].exprs.push(*val[2].exprs) + else + val[0].exprs << val[2] + end + result = val[0] + else + if val[2].is_a? Comma + val[2].exprs.unshift(val[0]) + val[2].pos = val[0].pos + result = val[2] + else + result = Comma.new_at(val[0].pos, NodeArray[val[0], val[2]]) + end + end + } + +# Returns Expression +constant_expression + : conditional_expression {result = val[0]} + +# A.1.1 -- Lexical elements +# +# token +# : keyword (raw string) +# | identifier expanded below +# | constant expanded below +# | string_literal expanded below +# | punctuator (raw string) +# +# preprocessing-token (skip) + +# Returns Token +identifier + : ID {result = val[0]} + +# Returns Literal +constant + : ICON {result = val[0].val; result.pos = val[0].pos} + | FCON {result = val[0].val; result.pos = val[0].pos} + #| enumeration_constant -- these are parsed as identifiers at all + # places the `constant' nonterminal appears + | CCON {result = val[0].val; result.pos = val[0].pos} + +# Returns Token +enumeration_constant + : ID {result = val[0]} + +# Returns StringLiteral +# Also handles string literal concatenation (6.4.5.4) +string_literal + : string_literal SCON {val[0].val << val[1].val.val; result = val[0]} + | SCON { result = val[0].val; result.pos = val[0].pos } + +---- inner + # A.1.9 -- Preprocessing numbers -- skip + # A.1.8 -- Header names -- skip + + # A.1.7 -- Puncuators -- we don't bother with {##,#,%:,%:%:} since + # we don't do preprocessing + @@punctuators = %r'\+\+|-[->]|&&|\|\||\.\.\.|(?:<<|>>|[<>=!*/%+\-&^|])=?|[\[\](){}.~?:;,]' + @@digraphs = %r'<[:%]|[:%]>' + + # A.1.6 -- String Literals -- simple for us because we don't decode + # the string (and indeed accept some illegal strings) + @@string_literal = %r'L?"(?:[^\\]|\\.)*?"'m + + # A.1.5 -- Constants + @@decimal_floating_constant = %r'(?:(?:\d*\.\d+|\d+\.)(?:e[-+]?\d+)?|\d+e[-+]?\d+)[fl]?'i + @@hexadecimal_floating_constant = %r'0x(?:(?:[0-9a-f]*\.[0-9a-f]+|[0-9a-f]+\.)|[0-9a-f]+)p[-+]?\d+[fl]?'i + + @@integer_constant = %r'(?:[1-9][0-9]*|0x[0-9a-f]+|0[0-7]*)(?:ul?l?|ll?u?)?'i + @@floating_constant = %r'#{@@decimal_floating_constant}|#{@@hexadecimal_floating_constant}' + @@enumeration_constant = %r'[a-zA-Z_\\][a-zA-Z_\\0-9]*' + @@character_constant = %r"L?'(?:[^\\]|\\.)+?'" + # (note that as with string-literals, we accept some illegal + # character-constants) + + # A.1.4 -- Universal character names -- skip + + # A.1.3 -- Identifiers -- skip, since an identifier is lexically + # identical to an enumeration constant + + # A.1.2 Keywords + keywords = %w'auto break case char const continue default do +double else enum extern float for goto if inline int long register +restrict return short signed sizeof static struct switch typedef union + unsigned void volatile while _Bool _Complex _Imaginary' + @@keywords = %r"#{keywords.join('|')}" + + def initialize + @type_names = ::Set.new + + @warning_proc = lambda{} + @pos = C::Node::Pos.new(nil, 1, 0) + end + def initialize_copy(x) + @pos = x.pos.dup + @type_names = x.type_names.dup + end + attr_accessor :pos, :type_names + + def parse(str) + if str.respond_to? :read + str = str.read + end + @str = str + begin + prepare_lexer(str) + return do_parse + rescue ParseError => e + e.set_backtrace(caller) + raise + end + end + + # + # Error handler, as used by racc. + # + def on_error(error_token_id, error_value, value_stack) + if error_value == '$' + parse_error @pos, "unexpected EOF" + else + parse_error(error_value.pos, + "parse error on #{token_to_str(error_token_id)} (#{error_value.val})") + end + end + + def self.feature(name) + attr_writer "#{name}_enabled" + class_eval <<-EOS + def enable_#{name} + @#{name}_enabled = true + end + def #{name}_enabled? + @#{name}_enabled + end + EOS + end + private_class_method :feature + + # + # Allow blocks in parentheses as expressions, as per the gcc + # extension. [http://rubyurl.com/iB7] + # + feature :block_expressions + + private # --------------------------------------------------------- + + class Token + attr_accessor :pos, :val + def initialize(pos, val) + @pos = pos + @val = val + end + end + def eat(str) + lines = str.split(/\r\n|[\r\n]/, -1) + if lines.length == 1 + @pos.col_num += lines[0].length + else + @pos.line_num += lines.length - 1 + @pos.col_num = lines[-1].length + end + end + + # + # Make a Declaration from the given specs and declarators. + # + def make_declaration(pos, specs, declarators) + specs.all?{|x| x.is_a?(Symbol) || x.is_a?(Type)} or raise specs.map{|x| x.class}.inspect + decl = Declaration.new_at(pos, nil, declarators) + + # set storage class + storage_classes = specs.find_all do |x| + [:typedef, :extern, :static, :auto, :register].include? x + end + # 6.7.1p2: at most, one storage-class specifier may be given in + # the declaration specifiers in a declaration + storage_classes.length <= 1 or + begin + if declarators.length == 0 + for_name = '' + else + for_name = "for `#{declarators[0].name}'" + end + parse_error pos, "multiple or duplicate storage classes given #{for_name}'" + end + decl.storage = storage_classes[0] + + # set type (specifiers, qualifiers) + decl.type = make_direct_type(pos, specs) + + # set function specifiers + decl.inline = specs.include?(:inline) + + # look for new type names + if decl.typedef? + decl.declarators.each do |d| + if d.name + @type_names << d.name + end + end + end + + return decl + end + + def make_function_def(pos, specs, func_declarator, decl_list, defn) + add_decl_type(func_declarator, make_direct_type(pos, specs)) + + # get types from decl_list if necessary + function = func_declarator.indirect_type + function.is_a? Function or + parse_error pos, "non function type for function `#{func_declarator.name}'" + params = function.params + if decl_list + params.all?{|p| p.type.nil?} or + parse_error pos, "both prototype and declaration list given for `#{func_declarator.name}'" + decl_list.each do |declaration| + declaration.declarators.each do |declarator| + param = params.find{|p| p.name == declarator.name} or + parse_error pos, "no parameter named #{declarator.name}" + if declarator.indirect_type + param.type = declarator.indirect_type + param.type.direct_type = declaration.type.dup + else + param.type = declaration.type.dup + end + end + end + params.all?{|p| p.type} or + begin + s = params.find_all{|p| p.type.nil?}.map{|p| "`#{p.name}'"}.join(' and ') + parse_error pos, "types missing for parameters #{s}" + end + end + + fd = FunctionDef.new_at(pos, + function.detach, + func_declarator.name, + defn, + :no_prototype => !decl_list.nil?) + + # set storage class + # 6.9.1p4: only extern or static allowed + specs.each do |s| + [:typedef, :auto, :register].include?(s) and + "`#{s}' illegal for function" + end + storage_classes = specs.find_all do |s| + s == :extern || s == :static + end + # 6.7.1p2: at most, one storage-class specifier may be given in + # the declaration specifiers in a declaration + storage_classes.length <= 1 or + "multiple or duplicate storage classes given for `#{func_declarator.name}'" + fd.storage = storage_classes[0] if storage_classes[0] + + # set function specifiers + # 6.7.4p5 'inline' can be repeated + fd.inline = specs.include?(:inline) + + return fd + end + + # + # Make a direct type from the list of type specifiers and type + # qualifiers. + # + def make_direct_type(pos, specs) + specs_order = [:signed, :unsigned, :short, :long, :double, :void, + :char, :int, :float, :_Bool, :_Complex, :_Imaginary] + + type_specs = specs.find_all do |x| + specs_order.include?(x) || !x.is_a?(Symbol) + end + type_specs.sort! do |a, b| + (specs_order.index(a)||100) <=> (specs_order.index(b)||100) + end + + # set type specifiers + # 6.7.2p2: the specifier list should be one of these + type = + case type_specs + when [:void] + Void.new + when [:char] + Char.new + when [:signed, :char] + Char.new :signed => true + when [:unsigned, :char] + Char.new :signed => false + when [:short], [:signed, :short], [:short, :int], + [:signed, :short, :int] + Int.new :longness => -1 + when [:unsigned, :short], [:unsigned, :short, :int] + Int.new :unsigned => true, :longness => -1 + when [:int], [:signed], [:signed, :int] + Int.new + when [:unsigned], [:unsigned, :int] + Int.new :unsigned => true + when [:long], [:signed, :long], [:long, :int], + [:signed, :long, :int] + Int.new :longness => 1 + when [:unsigned, :long], [:unsigned, :long, :int] + Int.new :longness => 1, :unsigned => true + when [:long, :long], [:signed, :long, :long], + [:long, :long, :int], [:signed, :long, :long, :int] + Int.new :longness => 2 + when [:unsigned, :long, :long], [:unsigned, :long, :long, :int] + Int.new :longness => 2, :unsigned => true + when [:float] + Float.new + when [:double] + Float.new :longness => 1 + when [:long, :double] + Float.new :longness => 2 + when [:_Bool] + Bool.new + when [:float, :_Complex] + Complex.new + when [:double, :_Complex] + Complex.new :longness => 1 + when [:long, :double, :_Complex] + Complex.new :longness => 2 + when [:float, :_Imaginary] + Imaginary.new + when [:double, :_Imaginary] + Imaginary.new :longness => 1 + when [:long, :double, :_Imaginary] + Imaginary.new :longness => 2 + else + if type_specs.length == 1 && + [CustomType, Struct, Union, Enum].any?{|c| type_specs[0].is_a? c} + type_specs[0] + else + if type_specs == [] + parse_error pos, "no type specifiers given" + else + parse_error pos, "invalid type specifier combination: #{type_specs.join(' ')}" + end + end + end + type.pos ||= pos + + # set type qualifiers + # 6.7.3p4: type qualifiers can be repeated + type.const = specs.any?{|x| x.equal? :const } + type.restrict = specs.any?{|x| x.equal? :restrict} + type.volatile = specs.any?{|x| x.equal? :volatile} + + return type + end + + def make_parameter(pos, specs, indirect_type, name) + type = indirect_type + if type + type.direct_type = make_direct_type(pos, specs) + else + type = make_direct_type(pos, specs) + end + [:typedef, :extern, :static, :auto, :inline].each do |sym| + specs.include? sym and + parse_error pos, "parameter `#{declarator.name}' declared `#{sym}'" + end + return Parameter.new_at(pos, type, name, + :register => specs.include?(:register)) + end + + def add_type_quals(type, quals) + type.const = quals.include?(:const ) + type.restrict = quals.include?(:restrict) + type.volatile = quals.include?(:volatile) + return type + end + + # + # Add te given type as the "most direct" type to the given + # declarator. Return the declarator. + # + def add_decl_type(declarator, type) + if declarator.indirect_type + declarator.indirect_type.direct_type = type + else + declarator.indirect_type = type + end + return declarator + end + + def param_list(params, var_args) + if params.length == 1 && + params[0].type.is_a?(Void) && + params[0].name.nil? + return NodeArray[] + elsif params.empty? + return nil + else + return params + end + end + + def parse_error(pos, str) + raise ParseError, "#{pos}: #{str}" + end + +---- header + +require 'set' + +# Error classes +module C + class ParseError < StandardError; end +end + +# Local variables: +# mode: ruby +# end: diff --git a/test/regress/cast b/test/regress/cast new file mode 100644 index 00000000..74412425 --- /dev/null +++ b/test/regress/cast @@ -0,0 +1,3535 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "cast.y". +# + +require 'racc/parser.rb' + + +require 'set' + +# Error classes +module C + class ParseError < StandardError; end +end + +# Local variables: +# mode: ruby +# end: +module C + class Parser < Racc::Parser + +module_eval(<<'...end cast.y/module_eval...', 'cast.y', 564) + # A.1.9 -- Preprocessing numbers -- skip + # A.1.8 -- Header names -- skip + + # A.1.7 -- Puncuators -- we don't bother with {##,#,%:,%:%:} since + # we don't do preprocessing + @@punctuators = %r'\+\+|-[->]|&&|\|\||\.\.\.|(?:<<|>>|[<>=!*/%+\-&^|])=?|[\[\](){}.~?:;,]' + @@digraphs = %r'<[:%]|[:%]>' + + # A.1.6 -- String Literals -- simple for us because we don't decode + # the string (and indeed accept some illegal strings) + @@string_literal = %r'L?"(?:[^\\]|\\.)*?"'m + + # A.1.5 -- Constants + @@decimal_floating_constant = %r'(?:(?:\d*\.\d+|\d+\.)(?:e[-+]?\d+)?|\d+e[-+]?\d+)[fl]?'i + @@hexadecimal_floating_constant = %r'0x(?:(?:[0-9a-f]*\.[0-9a-f]+|[0-9a-f]+\.)|[0-9a-f]+)p[-+]?\d+[fl]?'i + + @@integer_constant = %r'(?:[1-9][0-9]*|0x[0-9a-f]+|0[0-7]*)(?:ul?l?|ll?u?)?'i + @@floating_constant = %r'#{@@decimal_floating_constant}|#{@@hexadecimal_floating_constant}' + @@enumeration_constant = %r'[a-zA-Z_\\][a-zA-Z_\\0-9]*' + @@character_constant = %r"L?'(?:[^\\]|\\.)+?'" + # (note that as with string-literals, we accept some illegal + # character-constants) + + # A.1.4 -- Universal character names -- skip + + # A.1.3 -- Identifiers -- skip, since an identifier is lexically + # identical to an enumeration constant + + # A.1.2 Keywords + keywords = %w'auto break case char const continue default do +double else enum extern float for goto if inline int long register +restrict return short signed sizeof static struct switch typedef union + unsigned void volatile while _Bool _Complex _Imaginary' + @@keywords = %r"#{keywords.join('|')}" + + def initialize + @type_names = ::Set.new + + @warning_proc = lambda{} + @pos = C::Node::Pos.new(nil, 1, 0) + end + def initialize_copy(x) + @pos = x.pos.dup + @type_names = x.type_names.dup + end + attr_accessor :pos, :type_names + + def parse(str) + if str.respond_to? :read + str = str.read + end + @str = str + begin + prepare_lexer(str) + return do_parse + rescue ParseError => e + e.set_backtrace(caller) + raise + end + end + + # + # Error handler, as used by racc. + # + def on_error(error_token_id, error_value, value_stack) + if error_value == '$' + parse_error @pos, "unexpected EOF" + else + parse_error(error_value.pos, + "parse error on #{token_to_str(error_token_id)} (#{error_value.val})") + end + end + + def self.feature(name) + attr_writer "#{name}_enabled" + class_eval <<-EOS + def enable_#{name} + @#{name}_enabled = true + end + def #{name}_enabled? + @#{name}_enabled + end + EOS + end + private_class_method :feature + + # + # Allow blocks in parentheses as expressions, as per the gcc + # extension. [http://rubyurl.com/iB7] + # + feature :block_expressions + + private # --------------------------------------------------------- + + class Token + attr_accessor :pos, :val + def initialize(pos, val) + @pos = pos + @val = val + end + end + def eat(str) + lines = str.split(/\r\n|[\r\n]/, -1) + if lines.length == 1 + @pos.col_num += lines[0].length + else + @pos.line_num += lines.length - 1 + @pos.col_num = lines[-1].length + end + end + + # + # Make a Declaration from the given specs and declarators. + # + def make_declaration(pos, specs, declarators) + specs.all?{|x| x.is_a?(Symbol) || x.is_a?(Type)} or raise specs.map{|x| x.class}.inspect + decl = Declaration.new_at(pos, nil, declarators) + + # set storage class + storage_classes = specs.find_all do |x| + [:typedef, :extern, :static, :auto, :register].include? x + end + # 6.7.1p2: at most, one storage-class specifier may be given in + # the declaration specifiers in a declaration + storage_classes.length <= 1 or + begin + if declarators.length == 0 + for_name = '' + else + for_name = "for `#{declarators[0].name}'" + end + parse_error pos, "multiple or duplicate storage classes given #{for_name}'" + end + decl.storage = storage_classes[0] + + # set type (specifiers, qualifiers) + decl.type = make_direct_type(pos, specs) + + # set function specifiers + decl.inline = specs.include?(:inline) + + # look for new type names + if decl.typedef? + decl.declarators.each do |d| + if d.name + @type_names << d.name + end + end + end + + return decl + end + + def make_function_def(pos, specs, func_declarator, decl_list, defn) + add_decl_type(func_declarator, make_direct_type(pos, specs)) + + # get types from decl_list if necessary + function = func_declarator.indirect_type + function.is_a? Function or + parse_error pos, "non function type for function `#{func_declarator.name}'" + params = function.params + if decl_list + params.all?{|p| p.type.nil?} or + parse_error pos, "both prototype and declaration list given for `#{func_declarator.name}'" + decl_list.each do |declaration| + declaration.declarators.each do |declarator| + param = params.find{|p| p.name == declarator.name} or + parse_error pos, "no parameter named #{declarator.name}" + if declarator.indirect_type + param.type = declarator.indirect_type + param.type.direct_type = declaration.type.dup + else + param.type = declaration.type.dup + end + end + end + params.all?{|p| p.type} or + begin + s = params.find_all{|p| p.type.nil?}.map{|p| "`#{p.name}'"}.join(' and ') + parse_error pos, "types missing for parameters #{s}" + end + end + + fd = FunctionDef.new_at(pos, + function.detach, + func_declarator.name, + defn, + :no_prototype => !decl_list.nil?) + + # set storage class + # 6.9.1p4: only extern or static allowed + specs.each do |s| + [:typedef, :auto, :register].include?(s) and + "`#{s}' illegal for function" + end + storage_classes = specs.find_all do |s| + s == :extern || s == :static + end + # 6.7.1p2: at most, one storage-class specifier may be given in + # the declaration specifiers in a declaration + storage_classes.length <= 1 or + "multiple or duplicate storage classes given for `#{func_declarator.name}'" + fd.storage = storage_classes[0] if storage_classes[0] + + # set function specifiers + # 6.7.4p5 'inline' can be repeated + fd.inline = specs.include?(:inline) + + return fd + end + + # + # Make a direct type from the list of type specifiers and type + # qualifiers. + # + def make_direct_type(pos, specs) + specs_order = [:signed, :unsigned, :short, :long, :double, :void, + :char, :int, :float, :_Bool, :_Complex, :_Imaginary] + + type_specs = specs.find_all do |x| + specs_order.include?(x) || !x.is_a?(Symbol) + end + type_specs.sort! do |a, b| + (specs_order.index(a)||100) <=> (specs_order.index(b)||100) + end + + # set type specifiers + # 6.7.2p2: the specifier list should be one of these + type = + case type_specs + when [:void] + Void.new + when [:char] + Char.new + when [:signed, :char] + Char.new :signed => true + when [:unsigned, :char] + Char.new :signed => false + when [:short], [:signed, :short], [:short, :int], + [:signed, :short, :int] + Int.new :longness => -1 + when [:unsigned, :short], [:unsigned, :short, :int] + Int.new :unsigned => true, :longness => -1 + when [:int], [:signed], [:signed, :int] + Int.new + when [:unsigned], [:unsigned, :int] + Int.new :unsigned => true + when [:long], [:signed, :long], [:long, :int], + [:signed, :long, :int] + Int.new :longness => 1 + when [:unsigned, :long], [:unsigned, :long, :int] + Int.new :longness => 1, :unsigned => true + when [:long, :long], [:signed, :long, :long], + [:long, :long, :int], [:signed, :long, :long, :int] + Int.new :longness => 2 + when [:unsigned, :long, :long], [:unsigned, :long, :long, :int] + Int.new :longness => 2, :unsigned => true + when [:float] + Float.new + when [:double] + Float.new :longness => 1 + when [:long, :double] + Float.new :longness => 2 + when [:_Bool] + Bool.new + when [:float, :_Complex] + Complex.new + when [:double, :_Complex] + Complex.new :longness => 1 + when [:long, :double, :_Complex] + Complex.new :longness => 2 + when [:float, :_Imaginary] + Imaginary.new + when [:double, :_Imaginary] + Imaginary.new :longness => 1 + when [:long, :double, :_Imaginary] + Imaginary.new :longness => 2 + else + if type_specs.length == 1 && + [CustomType, Struct, Union, Enum].any?{|c| type_specs[0].is_a? c} + type_specs[0] + else + if type_specs == [] + parse_error pos, "no type specifiers given" + else + parse_error pos, "invalid type specifier combination: #{type_specs.join(' ')}" + end + end + end + type.pos ||= pos + + # set type qualifiers + # 6.7.3p4: type qualifiers can be repeated + type.const = specs.any?{|x| x.equal? :const } + type.restrict = specs.any?{|x| x.equal? :restrict} + type.volatile = specs.any?{|x| x.equal? :volatile} + + return type + end + + def make_parameter(pos, specs, indirect_type, name) + type = indirect_type + if type + type.direct_type = make_direct_type(pos, specs) + else + type = make_direct_type(pos, specs) + end + [:typedef, :extern, :static, :auto, :inline].each do |sym| + specs.include? sym and + parse_error pos, "parameter `#{declarator.name}' declared `#{sym}'" + end + return Parameter.new_at(pos, type, name, + :register => specs.include?(:register)) + end + + def add_type_quals(type, quals) + type.const = quals.include?(:const ) + type.restrict = quals.include?(:restrict) + type.volatile = quals.include?(:volatile) + return type + end + + # + # Add te given type as the "most direct" type to the given + # declarator. Return the declarator. + # + def add_decl_type(declarator, type) + if declarator.indirect_type + declarator.indirect_type.direct_type = type + else + declarator.indirect_type = type + end + return declarator + end + + def param_list(params, var_args) + if params.length == 1 && + params[0].type.is_a?(Void) && + params[0].name.nil? + return NodeArray[] + elsif params.empty? + return nil + else + return params + end + end + + def parse_error(pos, str) + raise ParseError, "#{pos}: #{str}" + end + +...end cast.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +99, 100, 65, 103, 108, 109, 120, 312, 61, 110, 111, 112, 113, 114, 115, +116, 117, 77, 48, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, +21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, 72, 281, +128, 49, 38, 196, 391, 123, 124, 126, 127, 129, 130, 131, 132, 183, 277, +83, 273, 84, 238, 288, 293, 88, 196, 72, 290, 38, 274, 184, 372, 373, +386, 239, 240, 289, 294, 71, 241, 242, 50, 147, 148, 149, 150, 99, 100, +65, 193, 108, 109, 120, 50, 281, 110, 111, 112, 113, 114, 115, 116, 117, +71, 50, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, +23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, 56, 366, 128, 89, +38, 50, 169, 123, 124, 126, 127, 129, 130, 131, 132, 99, 100, 65, 88, +108, 109, 120, 88, 88, 110, 111, 112, 113, 114, 115, 116, 117, 346, 349, +238, 59, 68, 48, 365, 195, 50, 147, 148, 149, 150, 38, 347, 239, 240, +69, 178, 283, 196, 312, 366, 243, 244, 48, 262, 88, 128, 185, 38, 263, +284, 123, 124, 126, 127, 129, 130, 131, 132, 99, 100, 65, 49, 108, 109, +120, 38, 50, 110, 111, 112, 113, 114, 115, 116, 117, 281, 365, 309, 440, +249, 250, 49, 238, 50, 147, 148, 149, 150, 313, 379, 196, 227, 439, 178, +413, 239, 240, 88, 196, 50, 48, 50, 196, 128, 187, 38, 191, 196, 123, +124, 126, 127, 129, 130, 131, 132, 99, 100, 65, 50, 108, 109, 120, 416, +428, 110, 111, 112, 113, 114, 115, 116, 117, 255, 256, 192, 196, 196, 197, +49, 198, 50, 147, 148, 149, 150, 228, 229, 230, 231, 232, 233, 234, 235, +236, 237, 43, 199, 48, 241, 242, 128, 202, 38, 241, 242, 123, 124, 126, +127, 129, 130, 131, 132, 99, 100, 65, 50, 108, 109, 120, 375, 376, 110, +111, 112, 113, 114, 115, 116, 117, 196, 196, 205, 377, 387, 427, 49, 433, +50, 147, 148, 149, 150, 196, 388, 196, 437, 196, 206, 445, 209, 447, 450, +43, 251, 48, 196, 252, 128, 196, 38, 196, 196, 123, 124, 126, 127, 129, +130, 131, 132, 99, 100, 65, 50, 108, 109, 120, 454, 253, 110, 111, 112, +113, 114, 115, 116, 117, 196, 34, 35, 36, 243, 244, 49, 49, 50, 147, +148, 149, 150, 34, 35, 36, 243, 244, 254, 49, 245, 246, 247, 248, 67, +48, 243, 244, 128, 268, 38, 243, 244, 123, 124, 126, 127, 129, 130, 131, +132, 99, 100, 65, 50, 108, 109, 120, 249, 250, 110, 111, 112, 113, 114, +115, 116, 117, 245, 246, 247, 248, 271, 272, 49, 275, 50, 147, 148, 149, +150, 245, 246, 247, 248, 285, 296, 192, 303, 307, 308, 314, 315, 277, 50, +50, 128, 50, 38, 353, 355, 123, 124, 126, 127, 129, 130, 131, 132, 99, +100, 65, 50, 108, 109, 120, 357, 50, 110, 111, 112, 113, 114, 115, 116, +117, 378, 389, 390, 251, 281, 252, 49, 253, 50, 147, 148, 149, 150, 254, +395, 396, 397, 398, 399, 405, 406, 384, 384, 423, 424, 425, 426, 442, 128, +nil, 38, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 99, 100, 65, +50, 108, 109, 120, nil, nil, 110, 111, 112, 113, 114, 115, 116, 117, nil, +nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, 38, +nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 99, 100, 65, nil, 108, +109, 120, nil, nil, 110, 111, 112, 113, 114, 115, 116, 117, nil, nil, nil, +nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, 38, nil, nil, +123, 124, 126, 127, 129, 130, 131, 132, 99, 100, 65, nil, 108, 109, 120, +nil, nil, 110, 111, 112, 113, 114, 115, 116, 117, nil, nil, nil, nil, nil, +nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, 38, nil, nil, 123, 124, +126, 127, 129, 130, 131, 132, 99, 100, 65, nil, 108, 109, 120, nil, nil, +110, 111, 112, 113, 114, 115, 116, 117, nil, nil, nil, nil, nil, nil, nil, +nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 128, nil, 38, nil, nil, 123, 124, 126, 127, +129, 130, 131, 132, 99, 100, 65, nil, 108, 109, 120, nil, nil, 110, 111, +112, 113, 114, 115, 116, 117, nil, nil, nil, nil, nil, nil, nil, nil, 50, +147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 128, nil, 38, nil, nil, 123, 124, 126, 127, 129, 130, +131, 132, 99, 100, 65, nil, 108, 109, 120, nil, nil, 110, 111, 112, 113, +114, 115, 116, 117, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, +149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 128, nil, 38, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, +99, 100, 65, nil, 108, 109, 120, nil, nil, 110, 111, 112, 113, 114, 115, +116, 117, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +128, nil, 38, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 99, 100, +65, nil, 108, 109, 120, nil, nil, 110, 111, 112, 113, 114, 115, 116, 117, +nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, +38, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 99, 100, 65, nil, +108, 109, 120, nil, nil, 110, 111, 112, 113, 114, 115, 116, 117, nil, nil, +nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, 38, nil, +nil, 123, 124, 126, 127, 129, 130, 131, 132, 99, 100, 65, nil, 108, 109, +120, nil, nil, 110, 111, 112, 113, 114, 115, 116, 117, nil, nil, nil, nil, +nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, 38, nil, nil, 123, +124, 126, 127, 129, 130, 131, 132, 99, 100, 65, nil, 108, 109, 120, nil, +nil, 110, 111, 112, 113, 114, 115, 116, 117, nil, nil, nil, nil, nil, nil, +nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 128, nil, 38, nil, nil, 123, 124, 126, +127, 129, 130, 131, 132, 99, 100, 65, nil, 108, 109, 120, nil, nil, 110, +111, 112, 113, 114, 115, 116, 117, nil, nil, nil, nil, nil, nil, nil, nil, +50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 128, nil, 38, nil, nil, 123, 124, 126, 127, 129, +130, 131, 132, 99, 100, 65, nil, 108, 109, 120, nil, nil, 110, 111, 112, +113, 114, 115, 116, 117, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, +148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 128, nil, 38, nil, nil, 123, 124, 126, 127, 129, 130, 131, +132, 99, 100, 65, nil, 108, 109, 120, nil, nil, 110, 111, 112, 113, 114, +115, 116, 117, 154, nil, nil, nil, 120, nil, nil, nil, 50, 147, 148, 149, +150, nil, nil, nil, nil, nil, nil, 215, nil, nil, nil, nil, nil, nil, nil, +nil, 128, nil, 38, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, nil, +nil, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 214, +nil, nil, nil, nil, 216, 217, 218, 219, nil, 50, 147, 148, 149, 150, 65, +nil, nil, nil, 120, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 154, +nil, nil, nil, 120, nil, nil, 15, 16, 17, 18, 19, 20, 21, 22, 23, +24, 25, 26, 31, 32, 33, 34, 35, 36, nil, nil, nil, 128, nil, 38, +nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 262, nil, 128, nil, nil, +263, nil, 123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 65, nil, nil, nil, 120, +nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, +nil, nil, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, +32, 33, 34, 35, 36, nil, nil, nil, 128, nil, 38, nil, nil, 123, 124, +126, 127, 129, 130, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, 65, +nil, nil, nil, 120, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 50, 147, 148, 149, 150, 15, 16, 17, 18, 19, 20, 21, 22, 23, +24, 25, 26, 31, 32, 33, 34, 35, 36, nil, nil, nil, 128, nil, 38, +nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 154, nil, nil, nil, 120, +nil, nil, nil, nil, nil, nil, nil, nil, 384, nil, nil, nil, 120, nil, nil, +nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, nil, nil, nil, 123, 124, +126, 127, 129, 130, 131, 132, 128, nil, nil, nil, nil, 123, 124, 126, 127, +129, 130, 131, 132, 154, 392, nil, nil, 120, nil, nil, nil, nil, nil, nil, +nil, 50, 147, 148, 149, 150, 154, nil, nil, nil, 120, nil, nil, nil, 50, +147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +262, nil, 128, nil, nil, 263, nil, 123, 124, 126, 127, 129, 130, 131, 132, +nil, nil, 262, nil, 128, nil, nil, 263, nil, 123, 124, 126, 127, 129, 130, +131, 132, 154, nil, nil, nil, 120, nil, nil, nil, 50, 147, 148, 149, 150, +nil, nil, 154, 453, nil, nil, 120, nil, nil, nil, nil, nil, 50, 147, 148, +149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 262, nil, +128, nil, 208, 263, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, +nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 305, nil, 120, nil, +nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 10, 11, 12, 13, +14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, +33, 34, 35, 36, 37, nil, nil, 128, nil, 38, nil, nil, 123, 124, 126, +127, 129, 130, 131, 132, 381, nil, 120, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 383, nil, 120, nil, nil, nil, nil, nil, nil, nil, nil, nil, +50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 128, +nil, 412, nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, +nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, +nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 120, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 120, nil, 160, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, 34, 35, +36, nil, nil, 159, 161, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, +131, 132, 128, nil, nil, nil, 220, 123, 124, 126, 127, 129, 130, 131, 132, +nil, nil, nil, nil, 220, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, +149, 150, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, +128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 128, nil, +nil, nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, +224, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, +nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, nil, +nil, 123, 124, 126, 127, 129, 130, 131, 132, 128, nil, nil, nil, nil, 123, +124, 126, 127, 129, 130, 131, 132, nil, nil, 120, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 50, 147, 148, 149, 150, 266, nil, nil, nil, 120, nil, +nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, 34, 35, 36, +nil, nil, 265, 267, nil, nil, nil, 120, 123, 124, 126, 127, 129, 130, 131, +132, 34, 35, 36, nil, nil, nil, 128, nil, nil, nil, 120, 123, 124, 126, +127, 129, 130, 131, 132, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, +150, 128, nil, nil, nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, +50, 147, 148, 149, 150, 128, nil, nil, nil, 120, 123, 124, 126, 127, 129, +130, 131, 132, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, +nil, nil, nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, 50, 147, +148, 149, 150, 128, nil, nil, nil, 120, 123, 124, 126, 127, 129, 130, 131, +132, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, +nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, 50, 147, 148, 149, +150, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, nil, +nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, nil, nil, +123, 124, 126, 127, 129, 130, 131, 132, nil, 50, 147, 148, 149, 150, nil, +nil, nil, nil, nil, nil, 120, 318, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 50, 147, 148, 149, 150, 15, 16, 17, 18, 19, 20, 21, +22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, nil, nil, nil, 128, +nil, 38, nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, +nil, 120, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, +nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 128, nil, nil, nil, 120, +123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, 120, nil, nil, +nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, +nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, nil, nil, 123, 124, +126, 127, 129, 130, 131, 132, 128, nil, nil, nil, 120, 123, 124, 126, 127, +129, 130, 131, 132, nil, nil, nil, nil, 120, nil, nil, nil, nil, nil, nil, +nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, 50, +147, 148, 149, 150, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, +131, 132, 128, nil, nil, nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, +nil, nil, nil, nil, 120, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, +149, 150, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, +128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 128, nil, +nil, nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, +120, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, +nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, nil, +nil, 123, 124, 126, 127, 129, 130, 131, 132, 128, nil, nil, nil, 120, 123, +124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, 120, nil, nil, nil, +nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, +nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, nil, nil, 123, 124, 126, +127, 129, 130, 131, 132, 128, nil, nil, nil, 120, 123, 124, 126, 127, 129, +130, 131, 132, nil, nil, nil, nil, 120, nil, nil, nil, nil, nil, nil, nil, +50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, +148, 149, 150, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, +132, 128, nil, nil, nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, +nil, nil, nil, 120, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, +150, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, +nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 128, nil, nil, +nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, 120, +nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, +nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, nil, nil, +123, 124, 126, 127, 129, 130, 131, 132, 128, nil, nil, nil, 120, 123, 124, +126, 127, 129, 130, 131, 132, nil, nil, nil, nil, 120, nil, nil, nil, nil, +nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, +nil, 50, 147, 148, 149, 150, 128, nil, nil, nil, nil, 123, 124, 126, 127, +129, 130, 131, 132, 128, nil, nil, nil, 120, 123, 124, 126, 127, 129, 130, +131, 132, nil, nil, nil, nil, 120, nil, nil, nil, nil, nil, nil, nil, 50, +147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, +149, 150, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, +128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, 120, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, +120, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, nil, +nil, 34, 35, 36, nil, nil, nil, 128, nil, nil, nil, nil, 123, 124, 126, +127, 129, 130, 131, 132, nil, nil, nil, 368, 369, nil, nil, nil, 120, 123, +124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, nil, 120, nil, nil, +50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, nil, nil, 123, 124, 126, +127, 129, 130, 131, 132, 401, 402, nil, nil, nil, 120, 123, 124, 126, 127, +129, 130, 131, 132, nil, nil, nil, nil, 120, 415, nil, nil, nil, nil, nil, +50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, nil, 50, +147, 148, 149, 150, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, +131, 132, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, +120, 418, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, +149, 150, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, nil, nil, nil, 123, +124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 120, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 50, 147, 148, 149, 150, 15, 16, 17, 18, 19, 20, 21, 22, +23, 24, 25, 26, 31, 32, 33, 34, 35, 36, nil, nil, nil, 128, nil, +38, nil, 120, 123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, +120, 430, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, 128, nil, nil, nil, +nil, 123, 124, 126, 127, 129, 130, 131, 132, 128, nil, nil, nil, nil, 123, +124, 126, 127, 129, 130, 131, 132, 120, 432, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 50, 147, 148, 149, 150, 120, 436, nil, nil, nil, nil, +nil, nil, 50, 147, 148, 149, 150, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, 132, nil, +nil, nil, nil, 128, nil, nil, nil, nil, 123, 124, 126, 127, 129, 130, 131, +132, 120, 444, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, 150, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 50, 147, 148, 149, +150, nil, nil, nil, nil, nil, nil, nil, nil, nil, 128, nil, nil, nil, nil, +123, 124, 126, 127, 129, 130, 131, 132, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 277, 364, nil, nil, nil, +nil, nil, nil, 50, 147, 148, 149, 150, 10, 11, 12, 13, 14, 15, 16, +17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, +36, 37, 281, 164, 49, nil, 38, nil, nil, nil, nil, nil, nil, nil, nil, +10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, +25, 26, 31, 32, 33, 34, 35, 36, 37, nil, nil, nil, 50, 38, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 39, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 50, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, +20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, 65, +nil, nil, nil, 38, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +67, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, +24, 25, 26, 31, 32, 33, 34, 35, 36, 37, 65, nil, nil, nil, 38, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 10, 11, 12, +13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, +32, 33, 34, 35, 36, 37, 173, nil, nil, nil, 38, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 15, 16, 17, +18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, +282, nil, nil, nil, nil, 38, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 15, 16, 17, 18, 19, 20, 21, 22, 23, +24, 25, 26, 31, 32, 33, 34, 35, 36, 287, nil, nil, nil, nil, 38, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, +34, 35, 36, 312, 364, nil, nil, nil, 38, nil, nil, nil, nil, nil, nil, +nil, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, +24, 25, 26, 31, 32, 33, 34, 35, 36, 37, 281, 404, 49, nil, 38, +nil, nil, nil, nil, nil, nil, nil, nil, 10, 11, 12, 13, 14, 15, 16, +17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, +36, 37, nil, nil, nil, nil, 38, 10, 11, 12, 13, 14, 15, 16, 17, +18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, +37, nil, nil, nil, nil, 38, 10, 11, 12, 13, 14, 15, 16, 17, 18, +19, 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, +nil, nil, nil, nil, 38, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, +20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, nil, +nil, nil, nil, 38, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, +21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, nil, nil, +nil, nil, 38, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, +22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, nil, nil, nil, +nil, 38, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, +23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 37, nil, nil, nil, 359, +38, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, +33, 34, 35, 36, nil, nil, nil, nil, nil, 38, 15, 16, 17, 18, 19, +20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, nil, nil, +nil, nil, nil, 38, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, +26, 31, 32, 33, 34, 35, 36, nil, nil, nil, nil, nil, 38, 15, 16, +17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, +36, nil, nil, nil, nil, nil, 38, 15, 16, 17, 18, 19, 20, 21, 22, +23, 24, 25, 26, 31, 32, 33, 34, 35, 36, nil, nil, nil, nil, nil, +38] + +racc_action_check = [ +65, 65, 65, 65, 65, 65, 65, 210, 39, 65, 65, 65, 65, 65, 65, +65, 65, 55, 45, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, +65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 46, 210, +65, 210, 65, 316, 345, 65, 65, 65, 65, 65, 65, 65, 65, 85, 276, +57, 163, 58, 135, 182, 186, 59, 345, 70, 184, 114, 163, 85, 289, 294, +316, 135, 135, 182, 186, 46, 136, 136, 65, 65, 65, 65, 65, 102, 102, +102, 102, 102, 102, 102, 45, 276, 102, 102, 102, 102, 102, 102, 102, 102, +70, 114, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, +102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 30, 280, 102, 60, +102, 276, 73, 102, 102, 102, 102, 102, 102, 102, 102, 112, 112, 112, 184, +112, 112, 112, 289, 294, 112, 112, 112, 112, 112, 112, 112, 112, 257, 260, +330, 33, 42, 48, 280, 107, 102, 102, 102, 102, 102, 30, 257, 330, 330, +42, 80, 175, 107, 311, 361, 137, 137, 80, 260, 84, 112, 87, 112, 260, +175, 112, 112, 112, 112, 112, 112, 112, 112, 187, 187, 187, 48, 187, 187, +187, 33, 30, 187, 187, 187, 187, 187, 187, 187, 187, 311, 361, 207, 419, +139, 139, 80, 331, 112, 112, 112, 112, 112, 211, 304, 207, 133, 419, 284, +380, 331, 331, 89, 211, 48, 284, 33, 304, 187, 98, 187, 100, 380, 187, +187, 187, 187, 187, 187, 187, 187, 191, 191, 191, 80, 191, 191, 191, 382, +411, 191, 191, 191, 191, 191, 191, 191, 191, 144, 144, 101, 382, 411, 109, +284, 110, 187, 187, 187, 187, 187, 133, 133, 133, 133, 133, 133, 133, 133, +133, 133, 5, 111, 5, 332, 332, 191, 113, 191, 333, 333, 191, 191, 191, +191, 191, 191, 191, 191, 192, 192, 192, 284, 192, 192, 192, 300, 301, 192, +192, 192, 192, 192, 192, 192, 192, 300, 301, 115, 302, 317, 410, 5, 414, +191, 191, 191, 191, 191, 302, 317, 410, 417, 414, 116, 429, 119, 431, 435, +66, 140, 66, 417, 141, 192, 429, 192, 431, 435, 192, 192, 192, 192, 192, +192, 192, 192, 296, 296, 296, 5, 296, 296, 296, 443, 142, 296, 296, 296, +296, 296, 296, 296, 296, 443, 49, 49, 49, 334, 334, 66, 49, 192, 192, +192, 192, 192, 74, 74, 74, 335, 335, 143, 74, 138, 138, 138, 138, 151, +69, 336, 336, 296, 158, 296, 337, 337, 296, 296, 296, 296, 296, 296, 296, +296, 375, 375, 375, 66, 375, 375, 375, 340, 340, 375, 375, 375, 375, 375, +375, 375, 375, 338, 338, 338, 338, 161, 162, 69, 165, 296, 296, 296, 296, +296, 339, 339, 339, 339, 177, 188, 200, 201, 203, 204, 212, 213, 167, 216, +217, 375, 263, 375, 264, 267, 375, 375, 375, 375, 375, 375, 375, 375, 376, +376, 376, 69, 376, 376, 376, 270, 274, 376, 376, 376, 376, 376, 376, 376, +376, 303, 324, 325, 341, 167, 342, 167, 343, 375, 375, 375, 375, 375, 344, +351, 354, 356, 362, 363, 367, 369, 389, 390, 400, 402, 403, 407, 427, 376, +nil, 376, nil, nil, 376, 376, 376, 376, 376, 376, 376, 376, 377, 377, 377, +167, 377, 377, 377, nil, nil, 377, 377, 377, 377, 377, 377, 377, 377, nil, +nil, nil, nil, nil, nil, nil, nil, 376, 376, 376, 376, 376, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 377, nil, 377, +nil, nil, 377, 377, 377, 377, 377, 377, 377, 377, 415, 415, 415, nil, 415, +415, 415, nil, nil, 415, 415, 415, 415, 415, 415, 415, 415, nil, nil, nil, +nil, nil, nil, nil, nil, 377, 377, 377, 377, 377, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 415, nil, 415, nil, nil, +415, 415, 415, 415, 415, 415, 415, 415, 418, 418, 418, nil, 418, 418, 418, +nil, nil, 418, 418, 418, 418, 418, 418, 418, 418, nil, nil, nil, nil, nil, +nil, nil, nil, 415, 415, 415, 415, 415, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 418, nil, 418, nil, nil, 418, 418, +418, 418, 418, 418, 418, 418, 426, 426, 426, nil, 426, 426, 426, nil, nil, +426, 426, 426, 426, 426, 426, 426, 426, nil, nil, nil, nil, nil, nil, nil, +nil, 418, 418, 418, 418, 418, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 426, nil, 426, nil, nil, 426, 426, 426, 426, +426, 426, 426, 426, 430, 430, 430, nil, 430, 430, 430, nil, nil, 430, 430, +430, 430, 430, 430, 430, 430, nil, nil, nil, nil, nil, nil, nil, nil, 426, +426, 426, 426, 426, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 430, nil, 430, nil, nil, 430, 430, 430, 430, 430, 430, +430, 430, 432, 432, 432, nil, 432, 432, 432, nil, nil, 432, 432, 432, 432, +432, 432, 432, 432, nil, nil, nil, nil, nil, nil, nil, nil, 430, 430, 430, +430, 430, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 432, nil, 432, nil, nil, 432, 432, 432, 432, 432, 432, 432, 432, +433, 433, 433, nil, 433, 433, 433, nil, nil, 433, 433, 433, 433, 433, 433, +433, 433, nil, nil, nil, nil, nil, nil, nil, nil, 432, 432, 432, 432, 432, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +433, nil, 433, nil, nil, 433, 433, 433, 433, 433, 433, 433, 433, 436, 436, +436, nil, 436, 436, 436, nil, nil, 436, 436, 436, 436, 436, 436, 436, 436, +nil, nil, nil, nil, nil, nil, nil, nil, 433, 433, 433, 433, 433, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 436, nil, +436, nil, nil, 436, 436, 436, 436, 436, 436, 436, 436, 437, 437, 437, nil, +437, 437, 437, nil, nil, 437, 437, 437, 437, 437, 437, 437, 437, nil, nil, +nil, nil, nil, nil, nil, nil, 436, 436, 436, 436, 436, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 437, nil, 437, nil, +nil, 437, 437, 437, 437, 437, 437, 437, 437, 444, 444, 444, nil, 444, 444, +444, nil, nil, 444, 444, 444, 444, 444, 444, 444, 444, nil, nil, nil, nil, +nil, nil, nil, nil, 437, 437, 437, 437, 437, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 444, nil, 444, nil, nil, 444, +444, 444, 444, 444, 444, 444, 444, 445, 445, 445, nil, 445, 445, 445, nil, +nil, 445, 445, 445, 445, 445, 445, 445, 445, nil, nil, nil, nil, nil, nil, +nil, nil, 444, 444, 444, 444, 444, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 445, nil, 445, nil, nil, 445, 445, 445, +445, 445, 445, 445, 445, 447, 447, 447, nil, 447, 447, 447, nil, nil, 447, +447, 447, 447, 447, 447, 447, 447, nil, nil, nil, nil, nil, nil, nil, nil, +445, 445, 445, 445, 445, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 447, nil, 447, nil, nil, 447, 447, 447, 447, 447, +447, 447, 447, 450, 450, 450, nil, 450, 450, 450, nil, nil, 450, 450, 450, +450, 450, 450, 450, 450, nil, nil, nil, nil, nil, nil, nil, nil, 447, 447, +447, 447, 447, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 450, nil, 450, nil, nil, 450, 450, 450, 450, 450, 450, 450, +450, 454, 454, 454, nil, 454, 454, 454, nil, nil, 454, 454, 454, 454, 454, +454, 454, 454, 67, nil, nil, nil, 67, nil, nil, nil, 450, 450, 450, 450, +450, nil, nil, nil, nil, nil, nil, 122, nil, nil, nil, nil, nil, nil, nil, +nil, 454, nil, 454, nil, nil, 454, 454, 454, 454, 454, 454, 454, 454, nil, +nil, 67, nil, nil, nil, nil, 67, 67, 67, 67, 67, 67, 67, 67, 122, +nil, nil, nil, nil, 122, 122, 122, 122, nil, 454, 454, 454, 454, 454, 120, +nil, nil, nil, 120, nil, nil, nil, nil, nil, 67, 67, 67, 67, 67, 154, +nil, nil, nil, 154, nil, nil, 120, 120, 120, 120, 120, 120, 120, 120, 120, +120, 120, 120, 120, 120, 120, 120, 120, 120, nil, nil, nil, 120, nil, 120, +nil, nil, 120, 120, 120, 120, 120, 120, 120, 120, 154, nil, 154, nil, nil, +154, nil, 154, 154, 154, 154, 154, 154, 154, 154, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 120, 120, 120, 120, 120, 220, nil, nil, nil, 220, +nil, nil, nil, nil, nil, 154, 154, 154, 154, 154, nil, nil, nil, nil, nil, +nil, nil, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, +220, 220, 220, 220, 220, nil, nil, nil, 220, nil, 220, nil, nil, 220, 220, +220, 220, 220, 220, 220, 220, nil, nil, nil, nil, nil, nil, nil, nil, 224, +nil, nil, nil, 224, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 220, 220, 220, 220, 220, 224, 224, 224, 224, 224, 224, 224, 224, 224, +224, 224, 224, 224, 224, 224, 224, 224, 224, nil, nil, nil, 224, nil, 224, +nil, nil, 224, 224, 224, 224, 224, 224, 224, 224, 258, nil, nil, nil, 258, +nil, nil, nil, nil, nil, nil, nil, nil, 315, nil, nil, nil, 315, nil, nil, +nil, nil, nil, nil, nil, 224, 224, 224, 224, 224, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 258, nil, nil, nil, nil, 258, 258, +258, 258, 258, 258, 258, 258, 315, nil, nil, nil, nil, 315, 315, 315, 315, +315, 315, 315, 315, 347, 347, nil, nil, 347, nil, nil, nil, nil, nil, nil, +nil, 258, 258, 258, 258, 258, 384, nil, nil, nil, 384, nil, nil, nil, 315, +315, 315, 315, 315, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +347, nil, 347, nil, nil, 347, nil, 347, 347, 347, 347, 347, 347, 347, 347, +nil, nil, 384, nil, 384, nil, nil, 384, nil, 384, 384, 384, 384, 384, 384, +384, 384, 393, nil, nil, nil, 393, nil, nil, nil, 347, 347, 347, 347, 347, +nil, nil, 439, 439, nil, nil, 439, nil, nil, nil, nil, nil, 384, 384, 384, +384, 384, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +393, nil, nil, nil, nil, 393, 393, 393, 393, 393, 393, 393, 393, 439, nil, +439, nil, 117, 439, 117, 439, 439, 439, 439, 439, 439, 439, 439, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 393, 393, 393, 393, 393, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 439, 439, 439, 439, 439, 117, nil, +nil, nil, nil, 117, 117, 117, 117, 117, 117, 117, 117, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 202, nil, 202, nil, +nil, nil, nil, nil, nil, nil, 117, 117, 117, 117, 117, 202, 202, 202, 202, +202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, +202, 202, 202, 202, 202, nil, nil, 202, nil, 202, nil, nil, 202, 202, 202, +202, 202, 202, 202, 202, 305, nil, 305, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 306, nil, 306, nil, nil, nil, nil, nil, nil, nil, nil, nil, +202, 202, 202, 202, 202, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 305, nil, nil, nil, nil, 305, 305, 305, 305, 305, 305, 305, 305, 306, +nil, 379, nil, 379, 306, 306, 306, 306, 306, 306, 306, 306, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 305, 305, 305, 305, 305, nil, +nil, nil, nil, nil, nil, nil, nil, 306, 306, 306, 306, 306, 379, nil, nil, +nil, nil, 379, 379, 379, 379, 379, 379, 379, 379, 71, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, 99, nil, 71, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 379, 379, 379, 379, 379, nil, nil, nil, 71, 71, +71, nil, nil, 71, 71, nil, nil, nil, nil, 71, 71, 71, 71, 71, 71, +71, 71, 99, nil, nil, nil, 123, 99, 99, 99, 99, 99, 99, 99, 99, +nil, nil, nil, nil, 124, nil, nil, nil, nil, nil, nil, nil, 71, 71, 71, +71, 71, nil, nil, nil, nil, nil, nil, nil, nil, 99, 99, 99, 99, 99, +123, nil, nil, nil, nil, 123, 123, 123, 123, 123, 123, 123, 123, 124, nil, +nil, nil, 125, 124, 124, 124, 124, 124, 124, 124, 124, nil, nil, nil, nil, +126, nil, nil, nil, nil, nil, nil, nil, 123, 123, 123, 123, 123, nil, nil, +nil, nil, nil, nil, nil, nil, 124, 124, 124, 124, 124, 125, nil, nil, nil, +nil, 125, 125, 125, 125, 125, 125, 125, 125, 126, nil, nil, nil, nil, 126, +126, 126, 126, 126, 126, 126, 126, nil, nil, 157, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 125, 125, 125, 125, 125, 157, nil, nil, nil, 160, nil, +nil, nil, 126, 126, 126, 126, 126, nil, nil, nil, nil, nil, 157, 157, 157, +nil, nil, 157, 157, nil, nil, nil, 178, 157, 157, 157, 157, 157, 157, 157, +157, 160, 160, 160, nil, nil, nil, 160, nil, nil, nil, 185, 160, 160, 160, +160, 160, 160, 160, 160, nil, nil, nil, nil, nil, nil, 157, 157, 157, 157, +157, 178, nil, nil, nil, 196, 178, 178, 178, 178, 178, 178, 178, 178, nil, +160, 160, 160, 160, 160, 185, nil, nil, nil, 197, 185, 185, 185, 185, 185, +185, 185, 185, nil, nil, nil, nil, nil, nil, 178, 178, 178, 178, 178, 196, +nil, nil, nil, 198, 196, 196, 196, 196, 196, 196, 196, 196, nil, 185, 185, +185, 185, 185, 197, nil, nil, nil, 199, 197, 197, 197, 197, 197, 197, 197, +197, nil, nil, nil, nil, nil, nil, 196, 196, 196, 196, 196, 198, nil, nil, +nil, 214, 198, 198, 198, 198, 198, 198, 198, 198, nil, 197, 197, 197, 197, +197, 199, nil, nil, nil, nil, 199, 199, 199, 199, 199, 199, 199, 199, nil, +nil, nil, nil, nil, nil, 198, 198, 198, 198, 198, 214, nil, nil, nil, nil, +214, 214, 214, 214, 214, 214, 214, 214, nil, 199, 199, 199, 199, 199, nil, +nil, nil, nil, nil, nil, 215, 215, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 214, 214, 214, 214, 214, 215, 215, 215, 215, 215, 215, 215, +215, 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, nil, nil, nil, 215, +nil, 215, nil, 226, 215, 215, 215, 215, 215, 215, 215, 215, nil, nil, nil, +nil, 238, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, 215, 215, 215, 215, 215, 226, nil, nil, +nil, nil, 226, 226, 226, 226, 226, 226, 226, 226, 238, nil, nil, nil, 239, +238, 238, 238, 238, 238, 238, 238, 238, nil, nil, nil, nil, 240, nil, nil, +nil, nil, nil, nil, nil, 226, 226, 226, 226, 226, nil, nil, nil, nil, nil, +nil, nil, nil, 238, 238, 238, 238, 238, 239, nil, nil, nil, nil, 239, 239, +239, 239, 239, 239, 239, 239, 240, nil, nil, nil, 241, 240, 240, 240, 240, +240, 240, 240, 240, nil, nil, nil, nil, 242, nil, nil, nil, nil, nil, nil, +nil, 239, 239, 239, 239, 239, nil, nil, nil, nil, nil, nil, nil, nil, 240, +240, 240, 240, 240, 241, nil, nil, nil, nil, 241, 241, 241, 241, 241, 241, +241, 241, 242, nil, nil, nil, 243, 242, 242, 242, 242, 242, 242, 242, 242, +nil, nil, nil, nil, 244, nil, nil, nil, nil, nil, nil, nil, 241, 241, 241, +241, 241, nil, nil, nil, nil, nil, nil, nil, nil, 242, 242, 242, 242, 242, +243, nil, nil, nil, nil, 243, 243, 243, 243, 243, 243, 243, 243, 244, nil, +nil, nil, 245, 244, 244, 244, 244, 244, 244, 244, 244, nil, nil, nil, nil, +246, nil, nil, nil, nil, nil, nil, nil, 243, 243, 243, 243, 243, nil, nil, +nil, nil, nil, nil, nil, nil, 244, 244, 244, 244, 244, 245, nil, nil, nil, +nil, 245, 245, 245, 245, 245, 245, 245, 245, 246, nil, nil, nil, 247, 246, +246, 246, 246, 246, 246, 246, 246, nil, nil, nil, nil, 248, nil, nil, nil, +nil, nil, nil, nil, 245, 245, 245, 245, 245, nil, nil, nil, nil, nil, nil, +nil, nil, 246, 246, 246, 246, 246, 247, nil, nil, nil, nil, 247, 247, 247, +247, 247, 247, 247, 247, 248, nil, nil, nil, 249, 248, 248, 248, 248, 248, +248, 248, 248, nil, nil, nil, nil, 250, nil, nil, nil, nil, nil, nil, nil, +247, 247, 247, 247, 247, nil, nil, nil, nil, nil, nil, nil, nil, 248, 248, +248, 248, 248, 249, nil, nil, nil, nil, 249, 249, 249, 249, 249, 249, 249, +249, 250, nil, nil, nil, 251, 250, 250, 250, 250, 250, 250, 250, 250, nil, +nil, nil, nil, 252, nil, nil, nil, nil, nil, nil, nil, 249, 249, 249, 249, +249, nil, nil, nil, nil, nil, nil, nil, nil, 250, 250, 250, 250, 250, 251, +nil, nil, nil, nil, 251, 251, 251, 251, 251, 251, 251, 251, 252, nil, nil, +nil, 253, 252, 252, 252, 252, 252, 252, 252, 252, nil, nil, nil, nil, 254, +nil, nil, nil, nil, nil, nil, nil, 251, 251, 251, 251, 251, nil, nil, nil, +nil, nil, nil, nil, nil, 252, 252, 252, 252, 252, 253, nil, nil, nil, nil, +253, 253, 253, 253, 253, 253, 253, 253, 254, nil, nil, nil, 255, 254, 254, +254, 254, 254, 254, 254, 254, nil, nil, nil, nil, 256, nil, nil, nil, nil, +nil, nil, nil, 253, 253, 253, 253, 253, nil, nil, nil, nil, nil, nil, nil, +nil, 254, 254, 254, 254, 254, 255, nil, nil, nil, nil, 255, 255, 255, 255, +255, 255, 255, 255, 256, nil, nil, nil, 262, 256, 256, 256, 256, 256, 256, +256, 256, nil, nil, nil, nil, 266, nil, nil, nil, nil, nil, nil, nil, 255, +255, 255, 255, 255, nil, nil, nil, nil, nil, nil, nil, nil, 256, 256, 256, +256, 256, 262, nil, nil, nil, nil, 262, 262, 262, 262, 262, 262, 262, 262, +266, nil, nil, nil, nil, 266, 266, 266, 266, 266, 266, 266, 266, 269, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 262, 262, 262, 262, 262, +281, nil, nil, nil, nil, nil, nil, nil, 266, 266, 266, 266, 266, nil, nil, +nil, 269, 269, 269, nil, nil, nil, 269, nil, nil, nil, nil, 269, 269, 269, +269, 269, 269, 269, 269, nil, nil, nil, 281, 281, nil, nil, nil, 285, 281, +281, 281, 281, 281, 281, 281, 281, nil, nil, nil, nil, nil, 365, nil, nil, +269, 269, 269, 269, 269, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 281, 281, 281, 281, 281, 285, nil, nil, nil, nil, 285, 285, 285, +285, 285, 285, 285, 285, 365, 365, nil, nil, nil, 378, 365, 365, 365, 365, +365, 365, 365, 365, nil, nil, nil, nil, 381, 381, nil, nil, nil, nil, nil, +285, 285, 285, 285, 285, nil, nil, nil, nil, nil, nil, nil, nil, nil, 365, +365, 365, 365, 365, 378, nil, nil, nil, nil, 378, 378, 378, 378, 378, 378, +378, 378, 381, nil, nil, nil, nil, 381, 381, 381, 381, 381, 381, 381, 381, +383, 383, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 378, 378, 378, +378, 378, nil, nil, nil, nil, nil, nil, nil, nil, 381, 381, 381, 381, 381, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 383, nil, nil, nil, nil, 383, +383, 383, 383, 383, 383, 383, 383, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 388, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, 383, 383, 383, 383, 383, 388, 388, 388, 388, 388, 388, 388, 388, +388, 388, 388, 388, 388, 388, 388, 388, 388, 388, nil, nil, nil, 388, nil, +388, nil, 391, 388, 388, 388, 388, 388, 388, 388, 388, nil, nil, nil, nil, +412, 412, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 388, 388, 388, 388, 388, 391, nil, nil, nil, +nil, 391, 391, 391, 391, 391, 391, 391, 391, 412, nil, nil, nil, nil, 412, +412, 412, 412, 412, 412, 412, 412, 413, 413, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 391, 391, 391, 391, 391, 416, 416, nil, nil, nil, nil, +nil, nil, 412, 412, 412, 412, 412, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 413, nil, nil, nil, nil, 413, 413, 413, 413, 413, 413, 413, 413, nil, +nil, nil, nil, 416, nil, nil, nil, nil, 416, 416, 416, 416, 416, 416, 416, +416, 428, 428, nil, nil, nil, nil, nil, nil, 413, 413, 413, 413, 413, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 416, 416, 416, 416, +416, nil, nil, nil, nil, nil, nil, nil, nil, nil, 428, nil, nil, nil, nil, +428, 428, 428, 428, 428, 428, 428, 428, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 277, 277, nil, nil, nil, +nil, nil, nil, 428, 428, 428, 428, 428, 277, 277, 277, 277, 277, 277, 277, +277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, +277, 277, 277, 72, 277, nil, 277, nil, nil, nil, nil, nil, nil, nil, nil, +72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, +72, 72, 72, 72, 72, 72, 72, 72, 72, nil, nil, nil, 277, 72, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 1, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, 72, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41, +nil, nil, nil, 1, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, +41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 62, nil, nil, nil, 41, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 62, 62, 62, +62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, +62, 62, 62, 62, 62, 62, 78, nil, nil, nil, 62, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 78, 78, 78, +78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, +172, nil, nil, nil, nil, 78, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 172, 172, 172, 172, 172, 172, 172, 172, 172, +172, 172, 172, 172, 172, 172, 172, 172, 172, 181, nil, nil, nil, nil, 172, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, +181, 181, 181, 312, 312, nil, nil, nil, 181, nil, nil, nil, nil, nil, nil, +nil, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, +312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, 366, 312, nil, 312, +nil, nil, nil, nil, nil, nil, nil, nil, 366, 366, 366, 366, 366, 366, 366, +366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, +366, 366, nil, nil, nil, nil, 366, 0, 0, 0, 0, 0, 0, 0, 0, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +0, nil, nil, nil, nil, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, +6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, +nil, nil, nil, nil, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, +7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, nil, +nil, nil, nil, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, +8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, nil, nil, +nil, nil, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, +9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, nil, nil, nil, +nil, 9, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, +275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, nil, nil, nil, 275, +275, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, +56, 56, 56, 56, nil, nil, nil, nil, nil, 56, 77, 77, 77, 77, 77, +77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, nil, nil, +nil, nil, nil, 77, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, +81, 81, 81, 81, 81, 81, 81, nil, nil, nil, nil, nil, 81, 82, 82, +82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, +82, nil, nil, nil, nil, nil, 82, 83, 83, 83, 83, 83, 83, 83, 83, +83, 83, 83, 83, 83, 83, 83, 83, 83, 83, nil, nil, nil, nil, nil, +83] + +racc_action_pointer = [ +4005, 3703, nil, nil, nil, 295, 4034, 4063, 4092, 4121, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +126, nil, nil, 161, nil, nil, nil, nil, nil, 8, nil, 3744, 160, nil, nil, +9, 34, nil, 159, 354, nil, nil, nil, nil, nil, 12, 4174, 55, 57, -20, 129, nil, 3785, nil, nil, - +3, 353, 1318, nil, 411, 59, 2026, 3638, 127, 366, nil, nil, 4198, 3825, nil, +179, 4222, 4246, 4270, 104, 52, nil, 171, nil, 157, nil, nil, nil, nil, nil, +nil, nil, nil, 248, 2039, 250, 279, 85, nil, nil, nil, nil, 163, nil, 275, +277, 294, 143, 299, 20, 332, 348, 1795, nil, 267, 1389, nil, 1333, 2082, 2095, +2138, 2151, nil, nil, nil, nil, nil, nil, 216, nil, 15, 24, 123, 350, 156, +305, 293, 314, 340, 205, nil, nil, nil, nil, nil, nil, 398, nil, nil, 1404, +nil, nil, 2205, 377, nil, 2224, 410, 448, 51, nil, 440, nil, 469, nil, nil, +nil, nil, 3864, nil, nil, 175, nil, 468, 2248, nil, nil, 3903, 58, nil, 63, +2267, 59, 201, 469, nil, nil, 259, 317, nil, nil, nil, 2291, 2310, 2334, 2353, +470, 460, 1864, 467, 468, nil, nil, 216, nil, nil, - +2, 224, 466, 467, 2377, 2441, 393, 394, nil, nil, 1475, nil, nil, nil, 1539, +nil, 2484, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 2497, 2540, +2553, 2596, 2609, 2652, 2665, 2708, 2721, 2764, 2777, 2820, 2833, 2876, 2889, 2932, 2945, +2988, 3001, 157, 1595, nil, 143, nil, 3044, 396, 437, nil, 3057, 438, nil, 3109, +454, nil, nil, nil, 416, 4150, 50, 3601, nil, nil, 123, 3126, nil, nil, 237, +3169, nil, nil, nil, 67, nil, nil, nil, nil, 68, nil, 375, nil, nil, nil, +317, 318, 330, 502, 228, 1918, 1931, nil, nil, nil, nil, 175, 3939, nil, nil, +1608, 28, 331, nil, nil, nil, nil, nil, nil, 502, 503, nil, nil, nil, nil, +117, 180, 248, 253, 336, 348, 358, 363, 388, 401, 374, 458, 445, 446, 451, +47, nil, 1664, nil, nil, nil, 478, nil, nil, 479, nil, 480, nil, nil, nil, +nil, 176, 518, 519, nil, 3183, 3976, 483, nil, 484, nil, nil, nil, nil, nil, +433, 491, 549, 3226, 1974, 233, 3239, 262, 3291, 1681, nil, nil, nil, 3355, 527, +528, 3398, nil, 1737, nil, nil, nil, nil, nil, nil, 487, nil, 488, 526, nil, +nil, nil, 526, nil, nil, 332, 263, 3411, 3463, 334, 607, 3480, 343, 665, 218, +nil, nil, nil, nil, nil, nil, 723, 531, 3532, 346, 781, 348, 839, 897, nil, +349, 955, 1013, nil, 1752, nil, nil, nil, 375, 1071, 1129, nil, 1187, nil, nil, +1245, nil, nil, nil, 1303, nil, nil, nil, nil, nil] + +racc_action_default = [-265, -265, -1, -3, -4, -265, -53, -55, -57, -59, -64, -65, -66, -67, -68, -69, -70, -71, -72, -73, -74, -75, -76, -77, -78, -79, -80, -81, -82, -83, -265, -89, -90, -265, -115, -116, -117, -118, -166, -265, -2, -62, -265, -51, -60, -265, -120, -121, -265, -136, -258, -52, -54, -56, -58, -86, -265, -88, -107, -265, -110, 460, -265, -6, -7, -265, -265, -265, -50, -265, -119, -265, -265, -265, -135, -138, -139, -265, -265, -91, -265, -95, -97, -265, -265, -265, -111, -113, -262, -265, -5, -8, -9, -10, -11, -12, -13, -14, -179, -265, -265, -83, -265, -20, -21, -23, -24, -265, -26, -265, -265, -265, -265, -265, -265, -265, -265, -265, -180, -181, -265, -184, -198, -265, -265, -265, -265, -204, -205, -206, -207, -208, -209, -210, -212, -216, -219, -222, -227, -230, -232, -234, -236, -238, -240, -242, -255, -259, -260, -261, -264, -62, -63, -167, -265, -179, -61, -265, -265, -126, -265, -205, -265, -265, -134, -141, -143, -147, -148, -122, -137, -140, -265, -85, -92, -265, -98, -100, -265, -94, -96, -265, -265, -104, -265, -265, -265, -265, -265, -210, -257, -265, -265, -19, -22, -25, -265, -265, -265, -265, -265, -265, -265, -265, -265, -45, -46, -265, -48, -263, -151, -265, -265, -265, -265, -265, -265, -265, -190, -191, -265, -199, -200, -201, -265, -202, -265, -244, -245, -246, -247, -248, -249, -250, -251, -252, -253, -254, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -171, -265, -175, -265, -265, -265, -124, -265, -205, -125, -265, -265, -131, -132, -133, -265, -265, -152, -265, -145, -146, -154, -265, -84, -93, -265, -265, -102, -87, -103, -265, -106, -112, -114, -108, -265, -15, -265, -17, -18, -256, -265, -265, -265, -265, -265, -265, -265, -44, -49, -47, -150, -152, -265, -182, -183, -265, -265, -265, -187, -194, -196, -197, -188, -189, -265, -265, -243, -213, -214, -215, -217, -218, -220, -221, -223, -224, -225, -226, -228, -229, -231, -233, -235, -237, -239, -265, -168, -265, -170, -174, -176, -265, -178, -123, -265, -130, -265, -128, -149, -142, -144, -153, -265, -265, -165, -265, -265, -265, -159, -205, -99, -101, -105, -109, -16, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -211, -185, -186, -265, -265, -203, -265, -169, -265, -173, -177, -129, -127, -155, -164, -265, -157, -205, -265, -163, -158, -161, -27, -29, -30, -265, -265, -265, -265, -265, -265, -265, -265, -265, -265, -195, -241, -172, -156, -160, -162, -265, -265, -265, -265, -265, -265, -265, -265, -39, -265, -265, -265, -43, -265, -192, -28, -31, -265, -265, -265, -35, -265, -37, -38, -265, -41, -42, -193, -265, -33, -34, -36, -40, -32] + +racc_goto_table = [ +47, 152, 57, 162, 75, 60, 70, 319, 153, 5, 5, 257, 158, 176, 174, +51, 52, 53, 54, 76, 393, 291, 279, 361, 74, 55, 82, 1, 58, 170, +62, 104, 179, 180, 190, 223, 63, 101, 102, 41, 47, 76, 188, 47, 171, +64, 157, 82, 82, 78, 156, 82, 82, 82, 213, 85, 175, 90, 361, 163, +98, 47, 2, 40, 47, 310, 91, 168, 194, 105, 172, 210, 330, 331, 101, +47, 181, 332, 333, 360, 182, 167, 338, 339, 200, 186, 204, 350, 317, 340, +82, 334, 335, 336, 337, 153, 341, 98, 264, 342, 151, 270, 343, 151, 344, +226, 105, 98, 174, 203, nil, nil, 393, 190, 177, 212, nil, 174, nil, 81, +190, 286, 276, nil, nil, nil, 291, 171, 292, nil, 76, 291, nil, nil, nil, +269, nil, 299, nil, nil, 81, 81, 82, nil, 81, 81, 81, nil, 327, 328, +329, 82, nil, nil, 324, nil, 320, nil, 325, 200, nil, nil, 47, 200, 200, +311, 210, 326, nil, nil, 201, 210, nil, nil, nil, 210, nil, nil, nil, nil, +420, nil, 98, 81, nil, 82, 98, 98, nil, nil, 82, nil, 348, nil, 82, +nil, nil, 190, nil, 153, nil, 278, nil, nil, nil, 351, 306, 354, nil, nil, +356, 322, 323, nil, nil, 212, nil, 370, nil, 212, 190, nil, 367, nil, nil, +385, nil, nil, 371, nil, nil, nil, 276, nil, nil, 81, nil, 70, nil, 171, +nil, 419, nil, nil, 81, 295, nil, nil, nil, 297, 298, nil, nil, nil, nil, +nil, nil, nil, 352, nil, nil, nil, nil, nil, nil, nil, nil, 311, 200, 358, +nil, 47, 47, nil, nil, nil, nil, nil, 81, 47, nil, 394, nil, 81, 167, +nil, 167, 81, 153, nil, nil, 98, nil, nil, nil, nil, nil, 403, nil, nil, +nil, nil, nil, nil, 207, nil, 400, 211, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 177, nil, nil, 167, nil, nil, nil, 153, 421, 422, nil, 320, +nil, nil, nil, nil, 153, nil, nil, nil, nil, 210, nil, nil, nil, nil, nil, +nil, nil, 200, 200, 200, nil, nil, nil, nil, 374, nil, nil, nil, 82, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 98, 98, 98, 394, nil, +167, nil, nil, nil, nil, 153, nil, nil, nil, 300, 301, 302, 200, nil, 304, +200, nil, nil, nil, nil, nil, nil, nil, 200, nil, nil, 316, 200, nil, 200, +200, nil, 211, 200, 200, 98, 211, nil, 98, nil, nil, 200, 200, nil, 200, +nil, 98, 200, nil, nil, 98, 200, 98, 98, nil, nil, 98, 98, 407, 408, +409, nil, nil, 189, 98, 98, nil, 98, 345, nil, 98, nil, nil, nil, 98, +nil, 81, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 221, 222, 189, +225, nil, nil, nil, nil, nil, nil, nil, 434, nil, nil, 438, nil, nil, nil, +nil, nil, nil, nil, 441, nil, nil, nil, 446, nil, 448, 449, 380, 382, 451, +452, nil, nil, nil, nil, nil, nil, 455, 456, nil, 457, nil, nil, 458, nil, +nil, nil, 459, nil, nil, nil, nil, 189, nil, nil, nil, nil, nil, nil, 189, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 410, 411, nil, 414, nil, +417, nil, nil, nil, nil, nil, nil, 189, 189, 189, 189, 189, 189, 189, 189, +189, 189, 189, 189, 189, 189, 189, 189, 189, 189, nil, nil, nil, nil, 429, +431, 189, nil, 435, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +443, nil, nil, nil, nil, nil, nil, nil, nil, 189, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 189, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 189] + +racc_goto_check = [ +15, 27, 17, 43, 39, 17, 40, 59, 42, 5, 5, 50, 42, 35, 32, +5, 5, 5, 5, 24, 51, 37, 47, 49, 41, 15, 24, 1, 15, 39, +7, 19, 33, 33, 73, 62, 8, 17, 18, 6, 15, 24, 16, 15, 24, +4, 41, 24, 24, 31, 26, 24, 24, 24, 48, 36, 34, 8, 49, 44, +15, 15, 2, 2, 15, 47, 4, 15, 19, 4, 31, 33, 63, 63, 17, +15, 31, 64, 64, 46, 36, 5, 66, 66, 17, 36, 17, 53, 58, 67, +24, 65, 65, 65, 65, 42, 68, 15, 42, 69, 6, 42, 70, 6, 71, +74, 4, 15, 32, 15, nil, nil, 51, 73, 6, 8, nil, 32, nil, 23, +73, 16, 39, nil, nil, nil, 37, 24, 16, nil, 24, 37, nil, nil, nil, +41, nil, 42, nil, nil, 23, 23, 24, nil, 23, 23, 23, nil, 62, 62, +62, 24, nil, nil, 48, nil, 42, nil, 48, 17, nil, nil, 15, 17, 17, +39, 33, 42, nil, nil, 9, 33, nil, nil, nil, 33, nil, nil, nil, nil, +59, nil, 15, 23, nil, 24, 15, 15, nil, nil, 24, nil, 27, nil, 24, +nil, nil, 73, nil, 42, nil, 6, nil, nil, nil, 16, 4, 42, nil, nil, +42, 15, 15, nil, nil, 8, nil, 35, nil, 8, 73, nil, 42, nil, nil, +62, nil, nil, 16, nil, nil, nil, 39, nil, nil, 23, nil, 40, nil, 24, +nil, 50, nil, nil, 23, 9, nil, nil, nil, 9, 9, nil, nil, nil, nil, +nil, nil, nil, 15, nil, nil, nil, nil, nil, nil, nil, nil, 39, 17, 15, +nil, 15, 15, nil, nil, nil, nil, nil, 23, 15, nil, 27, nil, 23, 5, +nil, 5, 23, 42, nil, nil, 15, nil, nil, nil, nil, nil, 43, nil, nil, +nil, nil, nil, nil, 20, nil, 42, 20, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 6, nil, nil, 5, nil, nil, nil, 42, 73, 27, nil, 42, +nil, nil, nil, nil, 42, nil, nil, nil, nil, 33, nil, nil, nil, nil, nil, +nil, nil, 17, 17, 17, nil, nil, nil, nil, 9, nil, nil, nil, 24, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 15, 15, 15, 27, nil, +5, nil, nil, nil, nil, 42, nil, nil, nil, 20, 20, 20, 17, nil, 20, +17, nil, nil, nil, nil, nil, nil, nil, 17, nil, nil, 20, 17, nil, 17, +17, nil, 20, 17, 17, 15, 20, nil, 15, nil, nil, 17, 17, nil, 17, +nil, 15, 17, nil, nil, 15, 17, 15, 15, nil, nil, 15, 15, 9, 9, +9, nil, nil, 60, 15, 15, nil, 15, 20, nil, 15, nil, nil, nil, 15, +nil, 23, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 60, 60, 60, +60, nil, nil, nil, nil, nil, nil, nil, 9, nil, nil, 9, nil, nil, nil, +nil, nil, nil, nil, 9, nil, nil, nil, 9, nil, 9, 9, 20, 20, 9, +9, nil, nil, nil, nil, nil, nil, 9, 9, nil, 9, nil, nil, 9, nil, +nil, nil, 9, nil, nil, nil, nil, 60, nil, nil, nil, nil, nil, nil, 60, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 20, 20, nil, 20, nil, +20, nil, nil, nil, nil, nil, nil, 60, 60, 60, 60, 60, 60, 60, 60, +60, 60, 60, 60, 60, 60, 60, 60, 60, 60, nil, nil, nil, nil, 20, +20, 60, nil, 20, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +20, nil, nil, nil, nil, nil, nil, nil, nil, 60, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 60, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 60] + +racc_goto_pointer = [nil, 27, 62, nil, 4, 9, 34, -11, -5, 58, nil, nil, nil, nil, nil, -5, -57, -28, -27, -34, 187, nil, nil, 63, -30, nil, -19, -66, nil, nil, nil, -7, -64, -49, -24, -67, -4, -163, nil, -45, -39, -25, -59, -69, -13, nil, -196, -145, -66, -253, -143, -327, nil, -173, nil, nil, nil, nil, -127, -208, 339, nil, -90, -169, -166, -154, -167, -162, -156, -154, -152, -151, nil, -65, -28] + +racc_goto_default = [ +nil, nil, nil, 3, 4, 66, 73, nil, 93, 106, 92, 94, 95, 96, 97, +155, nil, 29, nil, nil, 107, 42, 6, 7, 8, 9, 44, 259, 27, 28, +30, nil, 79, 80, nil, nil, nil, 86, 87, 45, 46, nil, 146, 363, nil, +165, 166, 362, 321, 280, nil, 258, 260, 261, 121, 118, 119, 122, nil, nil, +133, 125, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, nil] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 92, :_reduce_1, + 2, 92, :_reduce_2, + 1, 93, :_reduce_3, + 1, 93, :_reduce_4, + 4, 94, :_reduce_5, + 3, 94, :_reduce_6, + 1, 98, :_reduce_7, + 2, 98, :_reduce_8, + 1, 100, :_reduce_9, + 1, 100, :_reduce_10, + 1, 100, :_reduce_11, + 1, 100, :_reduce_12, + 1, 100, :_reduce_13, + 1, 100, :_reduce_14, + 3, 101, :_reduce_15, + 4, 101, :_reduce_16, + 3, 101, :_reduce_17, + 3, 101, :_reduce_18, + 3, 99, :_reduce_19, + 2, 99, :_reduce_20, + 1, 109, :_reduce_21, + 2, 109, :_reduce_22, + 1, 110, :_reduce_23, + 1, 110, :_reduce_24, + 2, 102, :_reduce_25, + 1, 102, :_reduce_26, + 5, 103, :_reduce_27, + 7, 103, :_reduce_28, + 5, 103, :_reduce_29, + 5, 104, :_reduce_30, + 7, 104, :_reduce_31, + 9, 104, :_reduce_32, + 8, 104, :_reduce_33, + 8, 104, :_reduce_34, + 7, 104, :_reduce_35, + 8, 104, :_reduce_36, + 7, 104, :_reduce_37, + 7, 104, :_reduce_38, + 6, 104, :_reduce_39, + 8, 104, :_reduce_40, + 7, 104, :_reduce_41, + 7, 104, :_reduce_42, + 6, 104, :_reduce_43, + 3, 105, :_reduce_44, + 2, 105, :_reduce_45, + 2, 105, :_reduce_46, + 3, 105, :_reduce_47, + 2, 105, :_reduce_48, + 3, 105, :_reduce_49, + 3, 95, :_reduce_50, + 2, 95, :_reduce_51, + 2, 96, :_reduce_52, + 1, 96, :_reduce_53, + 2, 96, :_reduce_54, + 1, 96, :_reduce_55, + 2, 96, :_reduce_56, + 1, 96, :_reduce_57, + 2, 96, :_reduce_58, + 1, 96, :_reduce_59, + 1, 112, :_reduce_60, + 3, 112, :_reduce_61, + 1, 117, :_reduce_62, + 3, 117, :_reduce_63, + 1, 113, :_reduce_64, + 1, 113, :_reduce_65, + 1, 113, :_reduce_66, + 1, 113, :_reduce_67, + 1, 113, :_reduce_68, + 1, 114, :_reduce_69, + 1, 114, :_reduce_70, + 1, 114, :_reduce_71, + 1, 114, :_reduce_72, + 1, 114, :_reduce_73, + 1, 114, :_reduce_74, + 1, 114, :_reduce_75, + 1, 114, :_reduce_76, + 1, 114, :_reduce_77, + 1, 114, :_reduce_78, + 1, 114, :_reduce_79, + 1, 114, :_reduce_80, + 1, 114, :_reduce_81, + 1, 114, :_reduce_82, + 1, 114, :_reduce_83, + 5, 119, :_reduce_84, + 4, 119, :_reduce_85, + 2, 119, :_reduce_86, + 5, 119, :_reduce_87, + 2, 119, :_reduce_88, + 1, 121, :_reduce_89, + 1, 121, :_reduce_90, + 1, 122, :_reduce_91, + 2, 122, :_reduce_92, + 3, 123, :_reduce_93, + 2, 124, :_reduce_94, + 1, 124, :_reduce_95, + 2, 124, :_reduce_96, + 1, 124, :_reduce_97, + 1, 125, :_reduce_98, + 3, 125, :_reduce_99, + 1, 126, :_reduce_100, + 3, 126, :_reduce_101, + 2, 126, :_reduce_102, + 5, 120, :_reduce_103, + 4, 120, :_reduce_104, + 6, 120, :_reduce_105, + 5, 120, :_reduce_106, + 2, 120, :_reduce_107, + 5, 120, :_reduce_108, + 6, 120, :_reduce_109, + 2, 120, :_reduce_110, + 1, 127, :_reduce_111, + 3, 127, :_reduce_112, + 1, 128, :_reduce_113, + 3, 128, :_reduce_114, + 1, 115, :_reduce_115, + 1, 115, :_reduce_116, + 1, 115, :_reduce_117, + 1, 116, :_reduce_118, + 2, 97, :_reduce_119, + 1, 97, :_reduce_120, + 1, 131, :_reduce_121, + 3, 131, :_reduce_122, + 5, 131, :_reduce_123, + 4, 131, :_reduce_124, + 4, 131, :_reduce_125, + 3, 131, :_reduce_126, + 6, 131, :_reduce_127, + 5, 131, :_reduce_128, + 6, 131, :_reduce_129, + 5, 131, :_reduce_130, + 4, 131, :_reduce_131, + 4, 131, :_reduce_132, + 4, 131, :_reduce_133, + 3, 131, :_reduce_134, + 2, 130, :_reduce_135, + 1, 130, :_reduce_136, + 3, 130, :_reduce_137, + 2, 130, :_reduce_138, + 1, 132, :_reduce_139, + 2, 132, :_reduce_140, + 1, 134, :_reduce_141, + 3, 134, :_reduce_142, + 1, 136, :_reduce_143, + 3, 136, :_reduce_144, + 2, 137, :_reduce_145, + 2, 137, :_reduce_146, + 1, 137, :_reduce_147, + 1, 135, :_reduce_148, + 3, 135, :_reduce_149, + 2, 139, :_reduce_150, + 1, 139, :_reduce_151, + 1, 138, :_reduce_152, + 2, 138, :_reduce_153, + 1, 138, :_reduce_154, + 3, 140, :_reduce_155, + 4, 140, :_reduce_156, + 3, 140, :_reduce_157, + 3, 140, :_reduce_158, + 2, 140, :_reduce_159, + 4, 140, :_reduce_160, + 3, 140, :_reduce_161, + 4, 140, :_reduce_162, + 3, 140, :_reduce_163, + 3, 140, :_reduce_164, + 2, 140, :_reduce_165, + 1, 108, :_reduce_166, + 1, 118, :_reduce_167, + 3, 118, :_reduce_168, + 4, 118, :_reduce_169, + 2, 141, :_reduce_170, + 1, 141, :_reduce_171, + 4, 141, :_reduce_172, + 3, 141, :_reduce_173, + 2, 142, :_reduce_174, + 1, 143, :_reduce_175, + 2, 143, :_reduce_176, + 3, 144, :_reduce_177, + 2, 144, :_reduce_178, + 1, 145, :_reduce_179, + 1, 145, :_reduce_180, + 1, 145, :_reduce_181, + 3, 145, :_reduce_182, + 3, 145, :_reduce_183, + 1, 148, :_reduce_184, + 4, 148, :_reduce_185, + 4, 148, :_reduce_186, + 3, 148, :_reduce_187, + 3, 148, :_reduce_188, + 3, 148, :_reduce_189, + 2, 148, :_reduce_190, + 2, 148, :_reduce_191, + 6, 148, :_reduce_192, + 7, 148, :_reduce_193, + 1, 149, :_reduce_194, + 3, 149, :_reduce_195, + 1, 150, :_reduce_196, + 1, 150, :_reduce_197, + 1, 151, :_reduce_198, + 2, 151, :_reduce_199, + 2, 151, :_reduce_200, + 2, 151, :_reduce_201, + 2, 151, :_reduce_202, + 4, 151, :_reduce_203, + 1, 152, :_reduce_204, + 1, 152, :_reduce_205, + 1, 152, :_reduce_206, + 1, 152, :_reduce_207, + 1, 152, :_reduce_208, + 1, 152, :_reduce_209, + 1, 153, :_reduce_210, + 4, 153, :_reduce_211, + 1, 154, :_reduce_212, + 3, 154, :_reduce_213, + 3, 154, :_reduce_214, + 3, 154, :_reduce_215, + 1, 155, :_reduce_216, + 3, 155, :_reduce_217, + 3, 155, :_reduce_218, + 1, 156, :_reduce_219, + 3, 156, :_reduce_220, + 3, 156, :_reduce_221, + 1, 157, :_reduce_222, + 3, 157, :_reduce_223, + 3, 157, :_reduce_224, + 3, 157, :_reduce_225, + 3, 157, :_reduce_226, + 1, 158, :_reduce_227, + 3, 158, :_reduce_228, + 3, 158, :_reduce_229, + 1, 159, :_reduce_230, + 3, 159, :_reduce_231, + 1, 160, :_reduce_232, + 3, 160, :_reduce_233, + 1, 161, :_reduce_234, + 3, 161, :_reduce_235, + 1, 162, :_reduce_236, + 3, 162, :_reduce_237, + 1, 163, :_reduce_238, + 3, 163, :_reduce_239, + 1, 164, :_reduce_240, + 5, 164, :_reduce_241, + 1, 133, :_reduce_242, + 3, 133, :_reduce_243, + 1, 165, :_reduce_244, + 1, 165, :_reduce_245, + 1, 165, :_reduce_246, + 1, 165, :_reduce_247, + 1, 165, :_reduce_248, + 1, 165, :_reduce_249, + 1, 165, :_reduce_250, + 1, 165, :_reduce_251, + 1, 165, :_reduce_252, + 1, 165, :_reduce_253, + 1, 165, :_reduce_254, + 1, 111, :_reduce_255, + 3, 111, :_reduce_256, + 1, 107, :_reduce_257, + 1, 106, :_reduce_258, + 1, 146, :_reduce_259, + 1, 146, :_reduce_260, + 1, 146, :_reduce_261, + 1, 129, :_reduce_262, + 2, 147, :_reduce_263, + 1, 147, :_reduce_264 ] + +racc_reduce_n = 265 + +racc_shift_n = 460 + +racc_token_table = { + false => 0, + :error => 1, + :COLON => 2, + :CASE => 3, + :DEFAULT => 4, + :LBRACE => 5, + :RBRACE => 6, + :SEMICOLON => 7, + :IF => 8, + :LPAREN => 9, + :RPAREN => 10, + :ELSE => 11, + :SWITCH => 12, + :WHILE => 13, + :DO => 14, + :FOR => 15, + :GOTO => 16, + :CONTINUE => 17, + :BREAK => 18, + :RETURN => 19, + :COMMA => 20, + :EQ => 21, + :TYPEDEF => 22, + :EXTERN => 23, + :STATIC => 24, + :AUTO => 25, + :REGISTER => 26, + :VOID => 27, + :CHAR => 28, + :SHORT => 29, + :INT => 30, + :LONG => 31, + :FLOAT => 32, + :DOUBLE => 33, + :SIGNED => 34, + :UNSIGNED => 35, + :BOOL => 36, + :COMPLEX => 37, + :IMAGINARY => 38, + :STRUCT => 39, + :UNION => 40, + :ENUM => 41, + :CONST => 42, + :RESTRICT => 43, + :VOLATILE => 44, + :INLINE => 45, + :LBRACKET => 46, + :RBRACKET => 47, + :MUL => 48, + :ELLIPSIS => 49, + :TYPENAME => 50, + :DOT => 51, + :ARROW => 52, + :INC => 53, + :DEC => 54, + :SIZEOF => 55, + :AND => 56, + :ADD => 57, + :SUB => 58, + :NOT => 59, + :BANG => 60, + :DIV => 61, + :MOD => 62, + :LSHIFT => 63, + :RSHIFT => 64, + :LT => 65, + :GT => 66, + :LEQ => 67, + :GEQ => 68, + :EQEQ => 69, + :NEQ => 70, + :XOR => 71, + :OR => 72, + :ANDAND => 73, + :OROR => 74, + :QUESTION => 75, + :MULEQ => 76, + :DIVEQ => 77, + :MODEQ => 78, + :ADDEQ => 79, + :SUBEQ => 80, + :LSHIFTEQ => 81, + :RSHIFTEQ => 82, + :ANDEQ => 83, + :XOREQ => 84, + :OREQ => 85, + :ID => 86, + :ICON => 87, + :FCON => 88, + :CCON => 89, + :SCON => 90 } + +racc_nt_base = 91 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "COLON", + "CASE", + "DEFAULT", + "LBRACE", + "RBRACE", + "SEMICOLON", + "IF", + "LPAREN", + "RPAREN", + "ELSE", + "SWITCH", + "WHILE", + "DO", + "FOR", + "GOTO", + "CONTINUE", + "BREAK", + "RETURN", + "COMMA", + "EQ", + "TYPEDEF", + "EXTERN", + "STATIC", + "AUTO", + "REGISTER", + "VOID", + "CHAR", + "SHORT", + "INT", + "LONG", + "FLOAT", + "DOUBLE", + "SIGNED", + "UNSIGNED", + "BOOL", + "COMPLEX", + "IMAGINARY", + "STRUCT", + "UNION", + "ENUM", + "CONST", + "RESTRICT", + "VOLATILE", + "INLINE", + "LBRACKET", + "RBRACKET", + "MUL", + "ELLIPSIS", + "TYPENAME", + "DOT", + "ARROW", + "INC", + "DEC", + "SIZEOF", + "AND", + "ADD", + "SUB", + "NOT", + "BANG", + "DIV", + "MOD", + "LSHIFT", + "RSHIFT", + "LT", + "GT", + "LEQ", + "GEQ", + "EQEQ", + "NEQ", + "XOR", + "OR", + "ANDAND", + "OROR", + "QUESTION", + "MULEQ", + "DIVEQ", + "MODEQ", + "ADDEQ", + "SUBEQ", + "LSHIFTEQ", + "RSHIFTEQ", + "ANDEQ", + "XOREQ", + "OREQ", + "ID", + "ICON", + "FCON", + "CCON", + "SCON", + "$start", + "translation_unit", + "external_declaration", + "function_definition", + "declaration", + "declaration_specifiers", + "declarator", + "declaration_list", + "compound_statement", + "statement", + "labeled_statement", + "expression_statement", + "selection_statement", + "iteration_statement", + "jump_statement", + "identifier", + "constant_expression", + "typedef_name", + "block_item_list", + "block_item", + "expression", + "init_declarator_list", + "storage_class_specifier", + "type_specifier", + "type_qualifier", + "function_specifier", + "init_declarator", + "initializer", + "struct_or_union_specifier", + "enum_specifier", + "struct_or_union", + "struct_declaration_list", + "struct_declaration", + "specifier_qualifier_list", + "struct_declarator_list", + "struct_declarator", + "enumerator_list", + "enumerator", + "enumeration_constant", + "pointer", + "direct_declarator", + "type_qualifier_list", + "assignment_expression", + "parameter_type_list", + "identifier_list", + "parameter_list", + "parameter_declaration", + "abstract_declarator", + "type_name", + "direct_abstract_declarator", + "initializer_list", + "designation", + "designator_list", + "designator", + "primary_expression", + "constant", + "string_literal", + "postfix_expression", + "argument_expression_list", + "argument_expression", + "unary_expression", + "unary_operator", + "cast_expression", + "multiplicative_expression", + "additive_expression", + "shift_expression", + "relational_expression", + "equality_expression", + "and_expression", + "exclusive_or_expression", + "inclusive_or_expression", + "logical_and_expression", + "logical_or_expression", + "conditional_expression", + "assignment_operator" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'cast.y', 32) + def _reduce_1(val, _values, result) + result = TranslationUnit.new_at(val[0].pos, NodeChain[val[0]]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 33) + def _reduce_2(val, _values, result) + result = val[0]; result.entities << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 37) + def _reduce_3(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 38) + def _reduce_4(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 42) + def _reduce_5(val, _values, result) + result = make_function_def(val[0][0], val[0][1], val[1], val[2], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 43) + def _reduce_6(val, _values, result) + result = make_function_def(val[0][0], val[0][1], val[1], nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 47) + def _reduce_7(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 48) + def _reduce_8(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 54) + def _reduce_9(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 55) + def _reduce_10(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 56) + def _reduce_11(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 57) + def _reduce_12(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 58) + def _reduce_13(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 59) + def _reduce_14(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 63) + def _reduce_15(val, _values, result) + val[2].labels.unshift(PlainLabel.new_at(val[0].pos, val[0].val)); result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 64) + def _reduce_16(val, _values, result) + val[3].labels.unshift(Case .new_at(val[0].pos, val[1] )); result = val[3] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 65) + def _reduce_17(val, _values, result) + val[2].labels.unshift(Default .new_at(val[0].pos )); result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 67) + def _reduce_18(val, _values, result) + val[2].labels.unshift(PlainLabel.new_at(val[0].pos, val[0].name)); result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 71) + def _reduce_19(val, _values, result) + result = Block.new_at(val[0].pos, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 72) + def _reduce_20(val, _values, result) + result = Block.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 76) + def _reduce_21(val, _values, result) + result = NodeChain[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 77) + def _reduce_22(val, _values, result) + result = val[0] << val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 81) + def _reduce_23(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 82) + def _reduce_24(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 86) + def _reduce_25(val, _values, result) + result = ExpressionStatement.new_at(val[0].pos, val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 87) + def _reduce_26(val, _values, result) + result = ExpressionStatement.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 91) + def _reduce_27(val, _values, result) + result = If .new_at(val[0].pos, val[2], val[4] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 92) + def _reduce_28(val, _values, result) + result = If .new_at(val[0].pos, val[2], val[4], val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 93) + def _reduce_29(val, _values, result) + result = Switch.new_at(val[0].pos, val[2], val[4] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 97) + def _reduce_30(val, _values, result) + result = While.new_at(val[0].pos, val[2], val[4] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 98) + def _reduce_31(val, _values, result) + result = While.new_at(val[0].pos, val[4], val[1], :do => true ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 99) + def _reduce_32(val, _values, result) + result = For.new_at(val[0].pos, val[2], val[4], val[6], val[8]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 100) + def _reduce_33(val, _values, result) + result = For.new_at(val[0].pos, val[2], val[4], nil , val[7]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 101) + def _reduce_34(val, _values, result) + result = For.new_at(val[0].pos, val[2], nil , val[5], val[7]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 102) + def _reduce_35(val, _values, result) + result = For.new_at(val[0].pos, val[2], nil , nil , val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 103) + def _reduce_36(val, _values, result) + result = For.new_at(val[0].pos, nil , val[3], val[5], val[7]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 104) + def _reduce_37(val, _values, result) + result = For.new_at(val[0].pos, nil , val[3], nil , val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 105) + def _reduce_38(val, _values, result) + result = For.new_at(val[0].pos, nil , nil , val[4], val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 106) + def _reduce_39(val, _values, result) + result = For.new_at(val[0].pos, nil , nil , nil , val[5]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 107) + def _reduce_40(val, _values, result) + result = For.new_at(val[0].pos, val[2], val[3], val[5], val[7]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 108) + def _reduce_41(val, _values, result) + result = For.new_at(val[0].pos, val[2], val[3], nil , val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 109) + def _reduce_42(val, _values, result) + result = For.new_at(val[0].pos, val[2], nil , val[4], val[6]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 110) + def _reduce_43(val, _values, result) + result = For.new_at(val[0].pos, val[2], nil , nil , val[5]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 114) + def _reduce_44(val, _values, result) + result = Goto .new_at(val[0].pos, val[1].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 115) + def _reduce_45(val, _values, result) + result = Continue.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 116) + def _reduce_46(val, _values, result) + result = Break .new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 117) + def _reduce_47(val, _values, result) + result = Return .new_at(val[0].pos, val[1] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 118) + def _reduce_48(val, _values, result) + result = Return .new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 120) + def _reduce_49(val, _values, result) + result = Goto .new_at(val[0].pos, val[1].name) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 126) + def _reduce_50(val, _values, result) + result = make_declaration(val[0][0], val[0][1], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 127) + def _reduce_51(val, _values, result) + result = make_declaration(val[0][0], val[0][1], NodeArray[]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 131) + def _reduce_52(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 132) + def _reduce_53(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 133) + def _reduce_54(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 134) + def _reduce_55(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 135) + def _reduce_56(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 136) + def _reduce_57(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 137) + def _reduce_58(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 138) + def _reduce_59(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 142) + def _reduce_60(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 143) + def _reduce_61(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 147) + def _reduce_62(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 148) + def _reduce_63(val, _values, result) + val[0].init = val[2]; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 152) + def _reduce_64(val, _values, result) + result = [val[0].pos, :typedef ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 153) + def _reduce_65(val, _values, result) + result = [val[0].pos, :extern ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 154) + def _reduce_66(val, _values, result) + result = [val[0].pos, :static ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 155) + def _reduce_67(val, _values, result) + result = [val[0].pos, :auto ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 156) + def _reduce_68(val, _values, result) + result = [val[0].pos, :register] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 160) + def _reduce_69(val, _values, result) + result = [val[0].pos, :void ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 161) + def _reduce_70(val, _values, result) + result = [val[0].pos, :char ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 162) + def _reduce_71(val, _values, result) + result = [val[0].pos, :short ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 163) + def _reduce_72(val, _values, result) + result = [val[0].pos, :int ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 164) + def _reduce_73(val, _values, result) + result = [val[0].pos, :long ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 165) + def _reduce_74(val, _values, result) + result = [val[0].pos, :float ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 166) + def _reduce_75(val, _values, result) + result = [val[0].pos, :double ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 167) + def _reduce_76(val, _values, result) + result = [val[0].pos, :signed ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 168) + def _reduce_77(val, _values, result) + result = [val[0].pos, :unsigned ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 169) + def _reduce_78(val, _values, result) + result = [val[0].pos, :_Bool ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 170) + def _reduce_79(val, _values, result) + result = [val[0].pos, :_Complex ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 171) + def _reduce_80(val, _values, result) + result = [val[0].pos, :_Imaginary] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 172) + def _reduce_81(val, _values, result) + result = [val[0].pos, val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 173) + def _reduce_82(val, _values, result) + result = [val[0].pos, val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 174) + def _reduce_83(val, _values, result) + result = [val[0].pos, val[0] ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 178) + def _reduce_84(val, _values, result) + result = val[0][1].new_at(val[0][0], val[1].val, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 179) + def _reduce_85(val, _values, result) + result = val[0][1].new_at(val[0][0], nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 180) + def _reduce_86(val, _values, result) + result = val[0][1].new_at(val[0][0], val[1].val, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 182) + def _reduce_87(val, _values, result) + result = val[0][1].new_at(val[0][0], val[1].name, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 183) + def _reduce_88(val, _values, result) + result = val[0][1].new_at(val[0][0], val[1].name, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 187) + def _reduce_89(val, _values, result) + result = [val[0].pos, Struct] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 188) + def _reduce_90(val, _values, result) + result = [val[0].pos, Union ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 192) + def _reduce_91(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 193) + def _reduce_92(val, _values, result) + val[0] << val[1]; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 197) + def _reduce_93(val, _values, result) + result = make_declaration(val[0][0], val[0][1], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 201) + def _reduce_94(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 202) + def _reduce_95(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 203) + def _reduce_96(val, _values, result) + val[1][1] << val[0][1]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 204) + def _reduce_97(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 208) + def _reduce_98(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 209) + def _reduce_99(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 213) + def _reduce_100(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 214) + def _reduce_101(val, _values, result) + result = val[0]; val[0].num_bits = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 215) + def _reduce_102(val, _values, result) + result = Declarator.new_at(val[0].pos, :num_bits => val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 219) + def _reduce_103(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].val, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 220) + def _reduce_104(val, _values, result) + result = Enum.new_at(val[0].pos, nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 221) + def _reduce_105(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].val, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 222) + def _reduce_106(val, _values, result) + result = Enum.new_at(val[0].pos, nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 223) + def _reduce_107(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].val, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 225) + def _reduce_108(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].name, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 226) + def _reduce_109(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].name, val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 227) + def _reduce_110(val, _values, result) + result = Enum.new_at(val[0].pos, val[1].name, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 231) + def _reduce_111(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 232) + def _reduce_112(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 236) + def _reduce_113(val, _values, result) + result = Enumerator.new_at(val[0].pos, val[0].val, nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 237) + def _reduce_114(val, _values, result) + result = Enumerator.new_at(val[0].pos, val[0].val, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 241) + def _reduce_115(val, _values, result) + result = [val[0].pos, :const ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 242) + def _reduce_116(val, _values, result) + result = [val[0].pos, :restrict] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 243) + def _reduce_117(val, _values, result) + result = [val[0].pos, :volatile] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 247) + def _reduce_118(val, _values, result) + result = [val[0].pos, :inline] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 251) + def _reduce_119(val, _values, result) + result = add_decl_type(val[1], val[0]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 252) + def _reduce_120(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 256) + def _reduce_121(val, _values, result) + result = Declarator.new_at(val[0].pos, nil, val[0].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 257) + def _reduce_122(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 258) + def _reduce_123(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 259) + def _reduce_124(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 260) + def _reduce_125(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos, nil, val[2])) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 261) + def _reduce_126(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 262) + def _reduce_127(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 263) + def _reduce_128(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 264) + def _reduce_129(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 265) + def _reduce_130(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 266) + def _reduce_131(val, _values, result) + result = add_decl_type(val[0], Array.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 267) + def _reduce_132(val, _values, result) + result = add_decl_type(val[0], Function.new_at(val[0].pos, nil, param_list(*val[2]), :var_args => val[2][1])) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 268) + def _reduce_133(val, _values, result) + result = add_decl_type(val[0], Function.new_at(val[0].pos, nil, val[2])) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 269) + def _reduce_134(val, _values, result) + result = add_decl_type(val[0], Function.new_at(val[0].pos )) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 273) + def _reduce_135(val, _values, result) + result = add_type_quals(Pointer.new_at(val[0].pos), val[1][1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 274) + def _reduce_136(val, _values, result) + result = Pointer.new_at(val[0].pos) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 275) + def _reduce_137(val, _values, result) + p = add_type_quals(Pointer.new_at(val[0].pos), val[1][1]); val[2].direct_type = p; result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 276) + def _reduce_138(val, _values, result) + p = Pointer.new_at(val[0].pos) ; val[1].direct_type = p; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 280) + def _reduce_139(val, _values, result) + result = [val[0][0], [val[0][1]]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 281) + def _reduce_140(val, _values, result) + val[0][1] << val[1][1]; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 285) + def _reduce_141(val, _values, result) + result = [val[0], false] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 286) + def _reduce_142(val, _values, result) + result = [val[0], true ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 290) + def _reduce_143(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 291) + def _reduce_144(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 295) + def _reduce_145(val, _values, result) + ind_type = val[1].indirect_type and ind_type.detach + result = make_parameter(val[0][0], val[0][1], ind_type, val[1].name) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 297) + def _reduce_146(val, _values, result) + result = make_parameter(val[0][0], val[0][1], val[1] , nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 298) + def _reduce_147(val, _values, result) + result = make_parameter(val[0][0], val[0][1], nil , nil ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 302) + def _reduce_148(val, _values, result) + result = NodeArray[Parameter.new_at(val[0].pos, nil, val[0].val)] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 303) + def _reduce_149(val, _values, result) + result = val[0] << Parameter.new_at(val[2].pos, nil, val[2].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 307) + def _reduce_150(val, _values, result) + val[1].direct_type = make_direct_type(val[0][0], val[0][1]); result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 308) + def _reduce_151(val, _values, result) + result = make_direct_type(val[0][0], val[0][1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 312) + def _reduce_152(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 313) + def _reduce_153(val, _values, result) + val[1].direct_type = val[0]; result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 314) + def _reduce_154(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 318) + def _reduce_155(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 319) + def _reduce_156(val, _values, result) + val[0].direct_type = Array.new_at(val[0].pos, nil, val[2]); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 320) + def _reduce_157(val, _values, result) + val[0].direct_type = Array.new_at(val[0].pos, nil, nil ); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 321) + def _reduce_158(val, _values, result) + result = Array.new_at(val[0].pos, nil, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 322) + def _reduce_159(val, _values, result) + result = Array.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 323) + def _reduce_160(val, _values, result) + val[0].direct_type = Array.new_at(val[0].pos); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 324) + def _reduce_161(val, _values, result) + result = Array.new_at(val[0].pos) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 325) + def _reduce_162(val, _values, result) + val[0].direct_type = Function.new_at(val[0].pos, nil, param_list(*val[2]), val[2][1]); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 326) + def _reduce_163(val, _values, result) + val[0].direct_type = Function.new_at(val[0].pos ); result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 327) + def _reduce_164(val, _values, result) + result = Function.new_at(val[0].pos, nil, param_list(*val[1]), val[1][1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 328) + def _reduce_165(val, _values, result) + result = Function.new_at(val[0].pos ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 334) + def _reduce_166(val, _values, result) + result = CustomType.new_at(val[0].pos, val[0].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 338) + def _reduce_167(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 339) + def _reduce_168(val, _values, result) + result = CompoundLiteral.new_at(val[0].pos, nil, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 340) + def _reduce_169(val, _values, result) + result = CompoundLiteral.new_at(val[0].pos, nil, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 344) + def _reduce_170(val, _values, result) + result = NodeArray[MemberInit.new_at(val[0][0] , val[0][1], val[1])] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 345) + def _reduce_171(val, _values, result) + result = NodeArray[MemberInit.new_at(val[0].pos, nil , val[0])] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 346) + def _reduce_172(val, _values, result) + result = val[0] << MemberInit.new_at(val[2][0] , val[2][1], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 347) + def _reduce_173(val, _values, result) + result = val[0] << MemberInit.new_at(val[2].pos, nil , val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 351) + def _reduce_174(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 355) + def _reduce_175(val, _values, result) + result = val[0]; val[0][1] = NodeArray[val[0][1]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 356) + def _reduce_176(val, _values, result) + result = val[0]; val[0][1] << val[1][1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 360) + def _reduce_177(val, _values, result) + result = [val[1].pos, val[1] ] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 361) + def _reduce_178(val, _values, result) + result = [val[1].pos, Member.new_at(val[1].pos, val[1].val)] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 367) + def _reduce_179(val, _values, result) + result = Variable.new_at(val[0].pos, val[0].val) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 368) + def _reduce_180(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 369) + def _reduce_181(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 371) + def _reduce_182(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 372) + def _reduce_183(val, _values, result) + block_expressions_enabled? or parse_error val[0].pos, "compound statement found where expression expected" + result = BlockExpression.new(val[1]); result.pos = val[0].pos + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 377) + def _reduce_184(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 378) + def _reduce_185(val, _values, result) + result = Index .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 379) + def _reduce_186(val, _values, result) + result = Call .new_at(val[0].pos, val[0], val[2] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 380) + def _reduce_187(val, _values, result) + result = Call .new_at(val[0].pos, val[0], NodeArray[]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 381) + def _reduce_188(val, _values, result) + result = Dot .new_at(val[0].pos, val[0], Member.new(val[2].val)) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 382) + def _reduce_189(val, _values, result) + result = Arrow .new_at(val[0].pos, val[0], Member.new(val[2].val)) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 383) + def _reduce_190(val, _values, result) + result = PostInc .new_at(val[0].pos, val[0] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 384) + def _reduce_191(val, _values, result) + result = PostDec .new_at(val[0].pos, val[0] ) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 385) + def _reduce_192(val, _values, result) + result = CompoundLiteral.new_at(val[0].pos, val[1], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 386) + def _reduce_193(val, _values, result) + result = CompoundLiteral.new_at(val[0].pos, val[1], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 390) + def _reduce_194(val, _values, result) + result = NodeArray[val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 391) + def _reduce_195(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 395) + def _reduce_196(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 396) + def _reduce_197(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 400) + def _reduce_198(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 401) + def _reduce_199(val, _values, result) + result = PreInc.new_at(val[0].pos, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 402) + def _reduce_200(val, _values, result) + result = PreDec.new_at(val[0].pos, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 403) + def _reduce_201(val, _values, result) + result = val[0][0].new_at(val[0][1], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 404) + def _reduce_202(val, _values, result) + result = Sizeof.new_at(val[0].pos, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 405) + def _reduce_203(val, _values, result) + result = Sizeof.new_at(val[0].pos, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 409) + def _reduce_204(val, _values, result) + result = [Address , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 410) + def _reduce_205(val, _values, result) + result = [Dereference, val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 411) + def _reduce_206(val, _values, result) + result = [Positive , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 412) + def _reduce_207(val, _values, result) + result = [Negative , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 413) + def _reduce_208(val, _values, result) + result = [BitNot , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 414) + def _reduce_209(val, _values, result) + result = [Not , val[0].pos] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 418) + def _reduce_210(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 419) + def _reduce_211(val, _values, result) + result = Cast.new_at(val[0].pos, val[1], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 423) + def _reduce_212(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 424) + def _reduce_213(val, _values, result) + result = Multiply.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 425) + def _reduce_214(val, _values, result) + result = Divide .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 426) + def _reduce_215(val, _values, result) + result = Mod .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 430) + def _reduce_216(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 431) + def _reduce_217(val, _values, result) + result = Add .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 432) + def _reduce_218(val, _values, result) + result = Subtract.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 436) + def _reduce_219(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 437) + def _reduce_220(val, _values, result) + result = ShiftLeft .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 438) + def _reduce_221(val, _values, result) + result = ShiftRight.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 442) + def _reduce_222(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 443) + def _reduce_223(val, _values, result) + result = Less.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 444) + def _reduce_224(val, _values, result) + result = More.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 445) + def _reduce_225(val, _values, result) + result = LessOrEqual.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 446) + def _reduce_226(val, _values, result) + result = MoreOrEqual.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 450) + def _reduce_227(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 451) + def _reduce_228(val, _values, result) + result = Equal .new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 452) + def _reduce_229(val, _values, result) + result = NotEqual.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 456) + def _reduce_230(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 457) + def _reduce_231(val, _values, result) + result = BitAnd.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 461) + def _reduce_232(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 462) + def _reduce_233(val, _values, result) + result = BitXor.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 466) + def _reduce_234(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 467) + def _reduce_235(val, _values, result) + result = BitOr.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 471) + def _reduce_236(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 472) + def _reduce_237(val, _values, result) + result = And.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 476) + def _reduce_238(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 477) + def _reduce_239(val, _values, result) + result = Or.new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 481) + def _reduce_240(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 482) + def _reduce_241(val, _values, result) + result = Conditional.new_at(val[0].pos, val[0], val[2], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 486) + def _reduce_242(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 487) + def _reduce_243(val, _values, result) + result = val[1].new_at(val[0].pos, val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 491) + def _reduce_244(val, _values, result) + result = Assign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 492) + def _reduce_245(val, _values, result) + result = MultiplyAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 493) + def _reduce_246(val, _values, result) + result = DivideAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 494) + def _reduce_247(val, _values, result) + result = ModAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 495) + def _reduce_248(val, _values, result) + result = AddAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 496) + def _reduce_249(val, _values, result) + result = SubtractAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 497) + def _reduce_250(val, _values, result) + result = ShiftLeftAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 498) + def _reduce_251(val, _values, result) + result = ShiftRightAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 499) + def _reduce_252(val, _values, result) + result = BitAndAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 500) + def _reduce_253(val, _values, result) + result = BitXorAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 501) + def _reduce_254(val, _values, result) + result = BitOrAssign + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 505) + def _reduce_255(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 507) + def _reduce_256(val, _values, result) + if val[0].is_a? Comma + if val[2].is_a? Comma + val[0].exprs.push(*val[2].exprs) + else + val[0].exprs << val[2] + end + result = val[0] + else + if val[2].is_a? Comma + val[2].exprs.unshift(val[0]) + val[2].pos = val[0].pos + result = val[2] + else + result = Comma.new_at(val[0].pos, NodeArray[val[0], val[2]]) + end + end + + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 527) + def _reduce_257(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 542) + def _reduce_258(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 546) + def _reduce_259(val, _values, result) + result = val[0].val; result.pos = val[0].pos + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 547) + def _reduce_260(val, _values, result) + result = val[0].val; result.pos = val[0].pos + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 550) + def _reduce_261(val, _values, result) + result = val[0].val; result.pos = val[0].pos + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 554) + def _reduce_262(val, _values, result) + result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 559) + def _reduce_263(val, _values, result) + val[0].val << val[1].val.val; result = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cast.y', 560) + def _reduce_264(val, _values, result) + result = val[0].val; result.pos = val[0].pos + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module C diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 0a122993..55dca827 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -272,5 +272,13 @@ def test_rdtool assert_output 'rdblockparser.y' assert_output 'rdinlineparser.y' end + + # .y file from cast gem + + def test_cast + assert_compile 'cast.y' + assert_debugfile 'cast.y', [0, 0, 0, 0, 1] + assert_output 'cast.y' + end end end From a34f08c7c292b4a91a935bab3e7efc6b1d7de684 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Nov 2015 09:49:41 +0200 Subject: [PATCH 102/619] Add regression test based on cadenza.y from cadenza gem From the author, William Howard: Yes please feel free to include Cadenza's grammar in your test suite. The original project repo and homepage does not include any copyright notice, nor does it include a LICENSE file. The homepage simply states that the code is released under an MIT license. Therefore, add a note to the same effect at the top of the grammar file, along with links to the author's GitHub page and the original project repo. --- Manifest.txt | 2 + test/assets/cadenza.y | 170 +++++++++ test/regress/cadenza | 745 ++++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 925 insertions(+) create mode 100644 test/assets/cadenza.y create mode 100644 test/regress/cadenza diff --git a/Manifest.txt b/Manifest.txt index 0595c81f..ffb59fdb 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -55,6 +55,7 @@ setup.rb tasks/doc.rb tasks/email.rb test/assets/bibtex.y +test/assets/cadenza.y test/assets/cast.y test/assets/chk.y test/assets/conf.y @@ -105,6 +106,7 @@ test/bench.y test/helper.rb test/infini.y test/regress/bibtex +test/regress/cadenza test/regress/cast test/regress/csspool test/regress/edtf diff --git a/test/assets/cadenza.y b/test/assets/cadenza.y new file mode 100644 index 00000000..1940ead2 --- /dev/null +++ b/test/assets/cadenza.y @@ -0,0 +1,170 @@ +# This grammar is released under an MIT license +# Author: William Howard (http://github.com/whoward) +# Source: https://github.com/whoward/cadenza/blob/master/src/cadenza.y + +class Cadenza::RaccParser + +/* expect this many shift/reduce conflicts */ +expect 37 + +rule + target + : document + | /* none */ { result = nil } + ; + + parameter_list + : logical_expression { result = [val[0]] } + | parameter_list ',' logical_expression { result = val[0].push(val[2]) } + ; + + /* this has a shift/reduce conflict but since Racc will shift in this case it is the correct behavior */ + primary_expression + : IDENTIFIER { result = VariableNode.new(val[0].value) } + | IDENTIFIER parameter_list { result = VariableNode.new(val[0].value, val[1]) } + | INTEGER { result = ConstantNode.new(val[0].value) } + | REAL { result = ConstantNode.new(val[0].value) } + | STRING { result = ConstantNode.new(val[0].value) } + | '(' filtered_expression ')' { result = val[1] } + ; + + multiplicative_expression + : primary_expression + | multiplicative_expression '*' primary_expression { result = OperationNode.new(val[0], "*", val[2]) } + | multiplicative_expression '/' primary_expression { result = OperationNode.new(val[0], "/", val[2]) } + ; + + additive_expression + : multiplicative_expression + | additive_expression '+' multiplicative_expression { result = OperationNode.new(val[0], "+", val[2]) } + | additive_expression '-' multiplicative_expression { result = OperationNode.new(val[0], "-", val[2]) } + ; + + boolean_expression + : additive_expression + | boolean_expression OP_EQ additive_expression { result = OperationNode.new(val[0], "==", val[2]) } + | boolean_expression OP_NEQ additive_expression { result = OperationNode.new(val[0], "!=", val[2]) } + | boolean_expression OP_LEQ additive_expression { result = OperationNode.new(val[0], "<=", val[2]) } + | boolean_expression OP_GEQ additive_expression { result = OperationNode.new(val[0], ">=", val[2]) } + | boolean_expression '>' additive_expression { result = OperationNode.new(val[0], ">", val[2]) } + | boolean_expression '<' additive_expression { result = OperationNode.new(val[0], "<", val[2]) } + ; + + inverse_expression + : boolean_expression + | NOT boolean_expression { result = BooleanInverseNode.new(val[1]) } + ; + + logical_expression + : inverse_expression + | logical_expression AND inverse_expression { result = OperationNode.new(val[0], "and", val[2]) } + | logical_expression OR inverse_expression { result = OperationNode.new(val[0], "or", val[2]) } + ; + + filter + : IDENTIFIER { result = FilterNode.new(val[0].value) } + | IDENTIFIER ':' parameter_list { result = FilterNode.new(val[0].value, val[2]) } + ; + + filter_list + : filter { result = [val[0]] } + | filter_list '|' filter { result = val[0].push(val[2]) } + ; + + filtered_expression + : logical_expression + | logical_expression '|' filter_list { result = FilteredValueNode.new(val[0], val[2]) } + ; + + inject_statement + : VAR_OPEN filtered_expression VAR_CLOSE { result = val[1] } + ; + + if_tag + : STMT_OPEN IF logical_expression STMT_CLOSE { open_scope!; result = val[2] } + | STMT_OPEN UNLESS logical_expression STMT_CLOSE { open_scope!; result = BooleanInverseNode.new(val[2]) } + ; + + else_tag + : STMT_OPEN ELSE STMT_CLOSE { result = close_scope!; open_scope! } + ; + + end_if_tag + : STMT_OPEN ENDIF STMT_CLOSE { result = close_scope! } + | STMT_OPEN ENDUNLESS STMT_CLOSE { result = close_scope! } + ; + + if_block + : if_tag end_if_tag { result = IfNode.new(val[0], val[1]) } + | if_tag document end_if_tag { result = IfNode.new(val[0], val[2]) } + | if_tag else_tag document end_if_tag { result = IfNode.new(val[0], val[1], val[3]) } + | if_tag document else_tag end_if_tag { result = IfNode.new(val[0], val[2], val[3]) } + | if_tag document else_tag document end_if_tag { result = IfNode.new(val[0], val[2], val[4]) } + ; + + for_tag + : STMT_OPEN FOR IDENTIFIER IN filtered_expression STMT_CLOSE { open_scope!; result = [val[2].value, val[4]] } + ; + + end_for_tag + : STMT_OPEN ENDFOR STMT_CLOSE { result = close_scope! } + ; + + /* this has a shift/reduce conflict but since Racc will shift in this case it is the correct behavior */ + for_block + : for_tag end_for_tag { result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[1]) } + | for_tag document end_for_tag { result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[2]) } + ; + + block_tag + : STMT_OPEN BLOCK IDENTIFIER STMT_CLOSE { result = open_block_scope!(val[2].value) } + ; + + end_block_tag + : STMT_OPEN ENDBLOCK STMT_CLOSE { result = close_block_scope! } + ; + + /* this has a shift/reduce conflict but since Racc will shift in this case it is the correct behavior */ + block_block + : block_tag end_block_tag { result = BlockNode.new(val[0], val[1]) } + | block_tag document end_block_tag { result = BlockNode.new(val[0], val[2]) } + ; + + generic_block_tag + : STMT_OPEN IDENTIFIER STMT_CLOSE { open_scope!; result = [val[1].value, []] } + | STMT_OPEN IDENTIFIER parameter_list STMT_CLOSE { open_scope!; result = [val[1].value, val[2]] } + ; + + end_generic_block_tag + : STMT_OPEN END STMT_CLOSE { result = close_scope! } + ; + + generic_block + : generic_block_tag document end_generic_block_tag { result = GenericBlockNode.new(val[0].first, val[2], val[0].last) } + ; + + extends_statement + : STMT_OPEN EXTENDS STRING STMT_CLOSE { result = val[2].value } + | STMT_OPEN EXTENDS IDENTIFIER STMT_CLOSE { result = VariableNode.new(val[2].value) } + ; + + document_component + : TEXT_BLOCK { result = TextNode.new(val[0].value) } + | inject_statement + | if_block + | for_block + | generic_block + | block_block + ; + + document + : document_component { push val[0] } + | document document_component { push val[1] } + | extends_statement { document.extends = val[0] } + | document extends_statement { document.extends = val[1] } + ; + +---- header ---- +# racc_parser.rb : generated by racc + +---- inner ---- diff --git a/test/regress/cadenza b/test/regress/cadenza new file mode 100644 index 00000000..f0c668d1 --- /dev/null +++ b/test/regress/cadenza @@ -0,0 +1,745 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "cadenza.y". +# + +require 'racc/parser.rb' + +# racc_parser.rb : generated by racc + +module Cadenza + class RaccParser < Racc::Parser + +module_eval(<<'...end cadenza.y/module_eval...', 'cadenza.y', 171) + +...end cadenza.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +37, 89, 65, 66, 20, 21, 22, 23, 24, 17, 106, 37, 3, 76, 4, +3, 75, 4, 50, 37, 29, 68, 65, 66, 33, 67, 34, 110, 9, 74, +35, 9, 37, 36, 71, 33, 38, 34, 77, 78, 79, 35, 72, 33, 36, +34, 37, 38, 3, 35, 39, 83, 36, 54, 55, 38, 33, 89, 34, 37, +90, 3, 35, 43, 9, 36, 85, 103, 38, 108, 33, 109, 34, 56, 57, +111, 35, 9, 3, 36, 46, 122, 38, 33, 112, 34, 113, 78, 79, 35, +114, 3, 36, 4, 9, 38, 20, 21, 22, 23, 24, 20, 21, 22, 23, +24, 115, 9, 65, 66, 65, 66, 29, 54, 55, 120, 107, 29, 20, 21, +22, 23, 24, 20, 21, 22, 23, 24, 20, 21, 22, 23, 24, 3, 29, +39, 3, 121, 4, 29, 3, 3, 43, 46, 29, 3, 124, 87, 125, 9, +54, 55, 9, 56, 57, 128, 9, 9, 3, 103, 116, 9, 20, 21, 22, +23, 24, 20, 21, 22, 23, 24, 131, 3, 9, 116, 56, 57, 29, 3, +89, 116, nil, 29, 20, 21, 22, 23, 24, 9, 20, 21, 22, 23, 24, +9, 56, 57, 56, 57, 29, 20, 21, 22, 23, 24, 29, 58, 59, 60, +61, 62, 63, 56, 57, 56, 57, 29, 58, 59, 60, 61, 62, 63, 20, +21, 22, 23, 24, 20, 21, 22, 23, 24, 20, 21, 22, 23, 24, 20, +21, 22, 23, 24, 20, 21, 22, 23, 24, 20, 21, 22, 23, 24, 20, +21, 22, 23, 24, 20, 21, 22, 23, 24, 20, 21, 22, 23, 24, 20, +21, 22, 23, 24, 20, 21, 22, 23, 24, 65, 66] + +racc_action_check = [ +4, 73, 69, 69, 37, 37, 37, 37, 37, 1, 69, 39, 0, 38, 0, +2, 38, 2, 17, 43, 37, 32, 31, 31, 4, 31, 4, 73, 0, 37, +4, 2, 46, 4, 35, 39, 4, 39, 39, 39, 39, 39, 36, 43, 39, +43, 87, 39, 5, 43, 5, 43, 43, 26, 26, 43, 46, 52, 46, 116, +53, 6, 46, 6, 5, 46, 46, 67, 46, 71, 87, 72, 87, 27, 27, +75, 87, 6, 7, 87, 7, 87, 87, 116, 76, 116, 77, 116, 116, 116, +78, 8, 116, 8, 7, 116, 3, 3, 3, 3, 3, 20, 20, 20, 20, +20, 79, 8, 70, 70, 51, 51, 3, 93, 93, 83, 70, 20, 24, 24, +24, 24, 24, 33, 33, 33, 33, 33, 34, 34, 34, 34, 34, 41, 24, +41, 42, 85, 42, 33, 45, 48, 45, 48, 34, 49, 103, 49, 105, 41, +94, 94, 42, 95, 95, 122, 45, 48, 81, 125, 81, 49, 65, 65, 65, +65, 65, 66, 66, 66, 66, 66, 126, 82, 81, 82, 96, 96, 65, 118, +129, 118, nil, 66, 89, 89, 89, 89, 89, 82, 108, 108, 108, 108, 108, +118, 97, 97, 98, 98, 89, 124, 124, 124, 124, 124, 108, 28, 28, 28, +28, 28, 28, 99, 99, 100, 100, 124, 64, 64, 64, 64, 64, 64, 29, +29, 29, 29, 29, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 56, +56, 56, 56, 56, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 59, +59, 59, 59, 59, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 62, +62, 62, 62, 62, 63, 63, 63, 63, 63, 123, 123] + +racc_action_pointer = [-12, 9, -9, 93, - +3, 24, 37, 54, 67, nil, nil, nil, nil, nil, nil, nil, nil, 18, nil, +nil, 98, nil, nil, nil, 115, nil, 44, 62, 194, 221, nil, 2, - +4, 120, 125, 31, 39, 1, 10, 8, nil, 109, 112, 16, nil, 116, 29, +nil, 117, 121, nil, 90, 55, 52, 226, 231, 236, 241, 246, 251, 256, 261, +266, 271, 205, 159, 164, 64, nil, -18, 88, 35, 43, - +1, nil, 47, 56, 58, 62, 78, nil, 134, 149, 87, nil, 109, nil, 43, +nil, 181, nil, nil, nil, 104, 141, 142, 165, 185, 187, 202, 204, nil, nil, +124, nil, 125, nil, nil, 187, nil, nil, nil, nil, nil, nil, nil, 56, nil, +155, nil, nil, nil, 127, 259, 198, 156, 144, nil, nil, 178, nil, nil] + +racc_action_default = [-2, -70, -1, -70, -70, -70, -70, -70, -70, -60, -61, -62, -63, -64, -65, -66, -68, -70, -67, -69, -5, -7, -8, -9, -70, -11, -14, -17, -24, -70, -26, -33, -70, -70, -70, -70, -70, -70, -70, -70, -41, -70, -70, -70, -48, -70, -70, -52, -70, -70, 132, -3, -6, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -70, -25, -70, -70, -70, -35, -70, -70, -70, -70, -70, -54, -70, -70, -70, -70, -70, -42, -70, -70, -70, -49, -70, -53, -70, -57, -70, -10, -12, -13, -15, -16, -18, -19, -20, -21, -22, -23, -27, -28, -29, -31, -34, -36, -37, -70, -50, -55, -58, -59, -38, -39, -40, -70, -44, -70, -43, -47, -51, -70, -4, -70, -70, -70, -45, -56, -30, -32, -46] + +racc_goto_table = [ +19, 40, 18, 32, 104, 52, 51, 1, 2, 64, 47, 91, 92, 41, 45, +48, 49, 44, 42, 69, 70, 105, 73, 51, 53, 95, 96, 97, 98, 99, +100, 93, 94, 101, 102, 88, nil, 80, nil, 19, nil, 18, nil, 19, nil, +18, 19, 19, 18, 18, 82, 86, nil, nil, 81, nil, 84, nil, nil, nil, +nil, nil, 130, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +123, nil, 117, 119, nil, 19, nil, 18, nil, nil, nil, nil, nil, nil, 118, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 126, 129, 51, nil, nil, nil, 127, nil, 19, nil, 18] + +racc_goto_check = [ +27, 16, 28, 6, 11, 3, 4, 1, 2, 9, 22, 5, 5, 2, 2, +2, 2, 19, 15, 4, 4, 12, 3, 4, 6, 8, 8, 8, 8, 8, +8, 7, 7, 10, 10, 25, nil, 16, nil, 27, nil, 28, nil, 27, nil, +28, 27, 27, 28, 28, 2, 22, nil, nil, 15, nil, 19, nil, nil, nil, +nil, nil, 11, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +4, nil, 16, 16, nil, 27, nil, 28, nil, nil, nil, nil, nil, nil, 2, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 6, 3, 4, nil, nil, nil, 16, nil, 27, nil, 28] + +racc_goto_pointer = [nil, 7, 8, -15, -14, -43, 0, -25, -33, -20, -32, -63, -46, nil, nil, 13, -4, nil, nil, 11, nil, nil, 3, nil, nil, -14, nil, -2, 0] + +racc_goto_default = [ +nil, nil, nil, nil, 31, 25, nil, 26, 27, 28, 30, nil, nil, 10, 5, +nil, nil, 11, 6, nil, 12, 7, nil, 14, 8, nil, 13, 16, 15] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 42, :_reduce_none, + 0, 42, :_reduce_2, + 1, 44, :_reduce_3, + 3, 44, :_reduce_4, + 1, 46, :_reduce_5, + 2, 46, :_reduce_6, + 1, 46, :_reduce_7, + 1, 46, :_reduce_8, + 1, 46, :_reduce_9, + 3, 46, :_reduce_10, + 1, 48, :_reduce_none, + 3, 48, :_reduce_12, + 3, 48, :_reduce_13, + 1, 49, :_reduce_none, + 3, 49, :_reduce_15, + 3, 49, :_reduce_16, + 1, 50, :_reduce_none, + 3, 50, :_reduce_18, + 3, 50, :_reduce_19, + 3, 50, :_reduce_20, + 3, 50, :_reduce_21, + 3, 50, :_reduce_22, + 3, 50, :_reduce_23, + 1, 51, :_reduce_none, + 2, 51, :_reduce_25, + 1, 45, :_reduce_none, + 3, 45, :_reduce_27, + 3, 45, :_reduce_28, + 1, 52, :_reduce_29, + 3, 52, :_reduce_30, + 1, 53, :_reduce_31, + 3, 53, :_reduce_32, + 1, 47, :_reduce_none, + 3, 47, :_reduce_34, + 3, 54, :_reduce_35, + 4, 55, :_reduce_36, + 4, 55, :_reduce_37, + 3, 56, :_reduce_38, + 3, 57, :_reduce_39, + 3, 57, :_reduce_40, + 2, 58, :_reduce_41, + 3, 58, :_reduce_42, + 4, 58, :_reduce_43, + 4, 58, :_reduce_44, + 5, 58, :_reduce_45, + 6, 59, :_reduce_46, + 3, 60, :_reduce_47, + 2, 61, :_reduce_48, + 3, 61, :_reduce_49, + 4, 62, :_reduce_50, + 3, 63, :_reduce_51, + 2, 64, :_reduce_52, + 3, 64, :_reduce_53, + 3, 65, :_reduce_54, + 4, 65, :_reduce_55, + 3, 66, :_reduce_56, + 3, 67, :_reduce_57, + 4, 68, :_reduce_58, + 4, 68, :_reduce_59, + 1, 69, :_reduce_60, + 1, 69, :_reduce_none, + 1, 69, :_reduce_none, + 1, 69, :_reduce_none, + 1, 69, :_reduce_none, + 1, 69, :_reduce_none, + 1, 43, :_reduce_66, + 2, 43, :_reduce_67, + 1, 43, :_reduce_68, + 2, 43, :_reduce_69 ] + +racc_reduce_n = 70 + +racc_shift_n = 132 + +racc_token_table = { + false => 0, + :error => 1, + "," => 2, + :IDENTIFIER => 3, + :INTEGER => 4, + :REAL => 5, + :STRING => 6, + "(" => 7, + ")" => 8, + "*" => 9, + "/" => 10, + "+" => 11, + "-" => 12, + :OP_EQ => 13, + :OP_NEQ => 14, + :OP_LEQ => 15, + :OP_GEQ => 16, + ">" => 17, + "<" => 18, + :NOT => 19, + :AND => 20, + :OR => 21, + ":" => 22, + "|" => 23, + :VAR_OPEN => 24, + :VAR_CLOSE => 25, + :STMT_OPEN => 26, + :IF => 27, + :STMT_CLOSE => 28, + :UNLESS => 29, + :ELSE => 30, + :ENDIF => 31, + :ENDUNLESS => 32, + :FOR => 33, + :IN => 34, + :ENDFOR => 35, + :BLOCK => 36, + :ENDBLOCK => 37, + :END => 38, + :EXTENDS => 39, + :TEXT_BLOCK => 40 } + +racc_nt_base = 41 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "\",\"", + "IDENTIFIER", + "INTEGER", + "REAL", + "STRING", + "\"(\"", + "\")\"", + "\"*\"", + "\"/\"", + "\"+\"", + "\"-\"", + "OP_EQ", + "OP_NEQ", + "OP_LEQ", + "OP_GEQ", + "\">\"", + "\"<\"", + "NOT", + "AND", + "OR", + "\":\"", + "\"|\"", + "VAR_OPEN", + "VAR_CLOSE", + "STMT_OPEN", + "IF", + "STMT_CLOSE", + "UNLESS", + "ELSE", + "ENDIF", + "ENDUNLESS", + "FOR", + "IN", + "ENDFOR", + "BLOCK", + "ENDBLOCK", + "END", + "EXTENDS", + "TEXT_BLOCK", + "$start", + "target", + "document", + "parameter_list", + "logical_expression", + "primary_expression", + "filtered_expression", + "multiplicative_expression", + "additive_expression", + "boolean_expression", + "inverse_expression", + "filter", + "filter_list", + "inject_statement", + "if_tag", + "else_tag", + "end_if_tag", + "if_block", + "for_tag", + "end_for_tag", + "for_block", + "block_tag", + "end_block_tag", + "block_block", + "generic_block_tag", + "end_generic_block_tag", + "generic_block", + "extends_statement", + "document_component" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'cadenza.y', 12) + def _reduce_2(val, _values, result) + result = nil + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 16) + def _reduce_3(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 17) + def _reduce_4(val, _values, result) + result = val[0].push(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 22) + def _reduce_5(val, _values, result) + result = VariableNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 23) + def _reduce_6(val, _values, result) + result = VariableNode.new(val[0].value, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 24) + def _reduce_7(val, _values, result) + result = ConstantNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 25) + def _reduce_8(val, _values, result) + result = ConstantNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 26) + def _reduce_9(val, _values, result) + result = ConstantNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 27) + def _reduce_10(val, _values, result) + result = val[1] + result + end +.,., + +# reduce 11 omitted + +module_eval(<<'.,.,', 'cadenza.y', 32) + def _reduce_12(val, _values, result) + result = OperationNode.new(val[0], "*", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 33) + def _reduce_13(val, _values, result) + result = OperationNode.new(val[0], "/", val[2]) + result + end +.,., + +# reduce 14 omitted + +module_eval(<<'.,.,', 'cadenza.y', 38) + def _reduce_15(val, _values, result) + result = OperationNode.new(val[0], "+", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 39) + def _reduce_16(val, _values, result) + result = OperationNode.new(val[0], "-", val[2]) + result + end +.,., + +# reduce 17 omitted + +module_eval(<<'.,.,', 'cadenza.y', 44) + def _reduce_18(val, _values, result) + result = OperationNode.new(val[0], "==", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 45) + def _reduce_19(val, _values, result) + result = OperationNode.new(val[0], "!=", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 46) + def _reduce_20(val, _values, result) + result = OperationNode.new(val[0], "<=", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 47) + def _reduce_21(val, _values, result) + result = OperationNode.new(val[0], ">=", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 48) + def _reduce_22(val, _values, result) + result = OperationNode.new(val[0], ">", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 49) + def _reduce_23(val, _values, result) + result = OperationNode.new(val[0], "<", val[2]) + result + end +.,., + +# reduce 24 omitted + +module_eval(<<'.,.,', 'cadenza.y', 54) + def _reduce_25(val, _values, result) + result = BooleanInverseNode.new(val[1]) + result + end +.,., + +# reduce 26 omitted + +module_eval(<<'.,.,', 'cadenza.y', 59) + def _reduce_27(val, _values, result) + result = OperationNode.new(val[0], "and", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 60) + def _reduce_28(val, _values, result) + result = OperationNode.new(val[0], "or", val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 64) + def _reduce_29(val, _values, result) + result = FilterNode.new(val[0].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 65) + def _reduce_30(val, _values, result) + result = FilterNode.new(val[0].value, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 69) + def _reduce_31(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 70) + def _reduce_32(val, _values, result) + result = val[0].push(val[2]) + result + end +.,., + +# reduce 33 omitted + +module_eval(<<'.,.,', 'cadenza.y', 75) + def _reduce_34(val, _values, result) + result = FilteredValueNode.new(val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 79) + def _reduce_35(val, _values, result) + result = val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 83) + def _reduce_36(val, _values, result) + open_scope!; result = val[2] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 84) + def _reduce_37(val, _values, result) + open_scope!; result = BooleanInverseNode.new(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 88) + def _reduce_38(val, _values, result) + result = close_scope!; open_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 92) + def _reduce_39(val, _values, result) + result = close_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 93) + def _reduce_40(val, _values, result) + result = close_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 97) + def _reduce_41(val, _values, result) + result = IfNode.new(val[0], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 98) + def _reduce_42(val, _values, result) + result = IfNode.new(val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 99) + def _reduce_43(val, _values, result) + result = IfNode.new(val[0], val[1], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 100) + def _reduce_44(val, _values, result) + result = IfNode.new(val[0], val[2], val[3]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 101) + def _reduce_45(val, _values, result) + result = IfNode.new(val[0], val[2], val[4]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 105) + def _reduce_46(val, _values, result) + open_scope!; result = [val[2].value, val[4]] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 109) + def _reduce_47(val, _values, result) + result = close_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 114) + def _reduce_48(val, _values, result) + result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 115) + def _reduce_49(val, _values, result) + result = ForNode.new(VariableNode.new(val[0].first), val[0].last, val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 119) + def _reduce_50(val, _values, result) + result = open_block_scope!(val[2].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 123) + def _reduce_51(val, _values, result) + result = close_block_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 128) + def _reduce_52(val, _values, result) + result = BlockNode.new(val[0], val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 129) + def _reduce_53(val, _values, result) + result = BlockNode.new(val[0], val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 133) + def _reduce_54(val, _values, result) + open_scope!; result = [val[1].value, []] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 134) + def _reduce_55(val, _values, result) + open_scope!; result = [val[1].value, val[2]] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 138) + def _reduce_56(val, _values, result) + result = close_scope! + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 142) + def _reduce_57(val, _values, result) + result = GenericBlockNode.new(val[0].first, val[2], val[0].last) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 146) + def _reduce_58(val, _values, result) + result = val[2].value + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 147) + def _reduce_59(val, _values, result) + result = VariableNode.new(val[2].value) + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 151) + def _reduce_60(val, _values, result) + result = TextNode.new(val[0].value) + result + end +.,., + +# reduce 61 omitted + +# reduce 62 omitted + +# reduce 63 omitted + +# reduce 64 omitted + +# reduce 65 omitted + +module_eval(<<'.,.,', 'cadenza.y', 160) + def _reduce_66(val, _values, result) + push val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 161) + def _reduce_67(val, _values, result) + push val[1] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 162) + def _reduce_68(val, _values, result) + document.extends = val[0] + result + end +.,., + +module_eval(<<'.,.,', 'cadenza.y', 163) + def _reduce_69(val, _values, result) + document.extends = val[1] + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class RaccParser + end # module Cadenza diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 55dca827..3c18801c 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -280,5 +280,13 @@ def test_cast assert_debugfile 'cast.y', [0, 0, 0, 0, 1] assert_output 'cast.y' end + + # .y file from cadenza gem + + def test_cadenza + assert_compile 'cadenza.y' + assert_debugfile 'cadenza.y', [0, 0, 0, 0, 37] + assert_output 'cadenza.y' + end end end From 79408736e939090e4edb7dd5b3d439726233c3a5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 20 Nov 2015 07:46:22 +0200 Subject: [PATCH 103/619] Remove trailing whitespace in test grammars --- test/assets/intp.y | 8 +++---- test/assets/mailp.y | 54 +++++++++++++++++++++--------------------- test/assets/nullbug2.y | 4 ++-- test/assets/recv.y | 40 +++++++++++++++---------------- test/assets/syntax.y | 2 +- 5 files changed, 54 insertions(+), 54 deletions(-) diff --git a/test/assets/intp.y b/test/assets/intp.y index 24e547da..39e42afd 100644 --- a/test/assets/intp.y +++ b/test/assets/intp.y @@ -27,7 +27,7 @@ rule result.push val[1] } | stmt_list EOL - + stmt : expr | assign | IDENT realprim @@ -38,7 +38,7 @@ rule | if_stmt | while_stmt | defun - + if_stmt : IF stmt THEN EOL stmt_list else_stmt END { result = IfNode.new( @fname, val[0][0], @@ -261,7 +261,7 @@ module Intp class Core - def initialize + def initialize @ftab = {} @obj = Object.new @stack = [] @@ -318,7 +318,7 @@ module Intp def lvar?(name) @lvars.key? name end - + def [](key) @lvars[key] end diff --git a/test/assets/mailp.y b/test/assets/mailp.y index da332a33..eb7d4d52 100644 --- a/test/assets/mailp.y +++ b/test/assets/mailp.y @@ -35,7 +35,7 @@ rule @field.domain = mb.domain } ; - + datetime : day DIGIT ATOM DIGIT hour zone # 0 1 2 3 4 5 # day month year @@ -44,11 +44,11 @@ rule result = (t + val[4] - val[5]).localtime } ; - + day : /* none */ | ATOM ',' ; - + hour : DIGIT ':' DIGIT { result = (result.to_i * 60 * 60) + (val[2].to_i * 60) @@ -60,16 +60,16 @@ rule + val[4].to_i } ; - + zone : ATOM { result = ::TMail.zonestr2i( val[0] ) * 60 } ; - + received : from by via with id for recvdatetime ; - + from : /* none */ | FROM domain { @@ -84,28 +84,28 @@ rule @field.from = Address.join( val[1] ) } ; - + by : /* none */ | BY domain { @field.by = Address.join( val[1] ) } ; - + via : /* none */ | VIA ATOM { @field.via = val[1] } ; - + with : /* none */ | WITH ATOM { @field.with.push val[1] } ; - + id : /* none */ | ID msgid { @@ -116,14 +116,14 @@ rule @field.msgid = val[1] } ; - + for : /* none */ | FOR addr { @field.for_ = val[1].address } ; - + recvdatetime : /* none */ | ';' datetime @@ -131,7 +131,7 @@ rule @field.date = val[1] } ; - + returnpath: '<' '>' | routeaddr { @@ -173,7 +173,7 @@ rule } # | phrase ':' ';' { result = AddressGroup.new( result ) } ; - + routeaddr : '<' route spec '>' { result = val[2] @@ -184,22 +184,22 @@ rule result = val[1] } ; - + route : at_domains ':' ; - + at_domains: '@' domain { result = [ val[1] ] } | at_domains ',' '@' domain { result.push val[3] } ; - + spec : local '@' domain { result = Address.new( val[0], val[2] ) } | local { result = Address.new( result, nil ) } ; - + local : word { result = val } | local '.' word { result.push val[2] } ; - + domain : domword { result = val } | domain '.' domword { result.push val[2] } ; @@ -215,11 +215,11 @@ rule result = val.join('') } ; - + phrase : word | phrase word { result << ' ' << val[1] } ; - + word : atom | QUOTED | DIGIT @@ -228,7 +228,7 @@ rule keys : phrase | keys ',' phrase ; - + enc : word { @field.encrypter = val[0] @@ -258,7 +258,7 @@ rule @field.sub = '' } ; - + params : /* none */ | params ';' TOKEN '=' value { @@ -281,7 +281,7 @@ rule @field.disposition = val[0] } ; - + disp_params : /* none */ | disp_params ';' disp_param @@ -293,7 +293,7 @@ rule @field.params[ val[0].downcase ] = val[2] } ; - + atom : ATOM | FROM | BY @@ -302,7 +302,7 @@ rule | ID | FOR ; - + end @@ -382,7 +382,7 @@ module TMail @scanner.scan @pass_array end end - + def on_error( tok, val, vstack ) raise ParseError, "\nparse error in '#{@field.name}' header, on token #{val.inspect}" diff --git a/test/assets/nullbug2.y b/test/assets/nullbug2.y index f09ca625..0c1d43bf 100644 --- a/test/assets/nullbug2.y +++ b/test/assets/nullbug2.y @@ -6,10 +6,10 @@ class A rule targ: operation voidhead | variable - + voidhead : void B void: - + operation: A variable : A end diff --git a/test/assets/recv.y b/test/assets/recv.y index 0c672b3b..b6e849dd 100644 --- a/test/assets/recv.y +++ b/test/assets/recv.y @@ -4,19 +4,19 @@ rule content: RecvH received ; - + datetime: day ; - + msgid: '<' spec '>'; - + day: | ATOM ',' ; - + received: recvitem_list recvdatetime ; - + recvitem_list: | recvitem_list recvitem ; @@ -26,25 +26,25 @@ rule by: | BY domain ; - + via: | VIA ATOM ; - + with: WITH ATOM ; - + for: | FOR addr ; - + recvdatetime: | ';' datetime ; - + addr: mbox | group ; - mboxes: mbox + mboxes: mbox | mboxes ',' mbox ; @@ -59,21 +59,21 @@ rule routeaddr: '<' route spec '>' | '<' spec '>' ; - + route: at_domains ':' ; - - at_domains: '@' domain + + at_domains: '@' domain | at_domains ',' '@' domain ; - + spec: local '@' domain - | local + | local ; - + local: word | local '.' word ; - + domain: domword | domain '.' domword ; @@ -86,12 +86,12 @@ rule phrase: word | phrase word ; - + word: atom | QUOTED | DIGIT ; atom: ATOM | FROM | BY | VIA | WITH | ID | FOR ; - + end diff --git a/test/assets/syntax.y b/test/assets/syntax.y index e8bb1fb4..727f74a2 100644 --- a/test/assets/syntax.y +++ b/test/assets/syntax.y @@ -31,7 +31,7 @@ rule print 'cba' } | cont - + cont : A c2 B c2 C c2 : C C C C C From d0fbb1ea3c612cf4e580bd8fd82601c19065f44a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 20 Nov 2015 07:51:46 +0200 Subject: [PATCH 104/619] Add regression test based on mediawikiparser.y from mediacloth gem From the author, Alexander Dymo: Copyright to the gem actually belongs to Pluron, Inc., my previous startup. But given that mediacloth is MIT licensed, you can copy the grammar and add the license header just fine. I personally would be glad to see it used as a test. Good to see more work on Racc :) --- Manifest.txt | 2 + test/assets/mediacloth.y | 599 +++++++++++++++++ test/regress/mediacloth | 1337 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 1946 insertions(+) create mode 100644 test/assets/mediacloth.y create mode 100644 test/regress/mediacloth diff --git a/Manifest.txt b/Manifest.txt index ffb59fdb..4435b217 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -72,6 +72,7 @@ test/assets/intp.y test/assets/journey.y test/assets/liquor.y test/assets/macruby.y +test/assets/mediacloth.y test/assets/mailp.y test/assets/namae.y test/assets/nasl.y @@ -113,6 +114,7 @@ test/regress/edtf test/regress/journey test/regress/huia test/regress/liquor +test/regress/mediacloth test/regress/namae test/regress/nasl test/regress/nokogiri-css diff --git a/test/assets/mediacloth.y b/test/assets/mediacloth.y new file mode 100644 index 00000000..94cc411e --- /dev/null +++ b/test/assets/mediacloth.y @@ -0,0 +1,599 @@ +# Copyright (c) 2006 Pluron Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# The parser for the MediaWiki language. +# +# Usage together with a lexer: +# inputFile = File.new("data/input1", "r") +# input = inputFile.read +# parser = MediaWikiParser.new +# parser.lexer = MediaWikiLexer.new +# parser.parse(input) + +class MediaWikiParser + +token TEXT BOLD_START BOLD_END ITALIC_START ITALIC_END LINK_START LINK_END LINKSEP + INTLINK_START INTLINK_END INTLINKSEP RESOURCESEP CHAR_ENT + PRE_START PRE_END PREINDENT_START PREINDENT_END + SECTION_START SECTION_END HLINE SIGNATURE_NAME SIGNATURE_DATE SIGNATURE_FULL + PARA_START PARA_END UL_START UL_END OL_START OL_END LI_START LI_END + DL_START DL_END DT_START DT_END DD_START DD_END TAG_START TAG_END ATTR_NAME ATTR_VALUE + TABLE_START TABLE_END ROW_START ROW_END HEAD_START HEAD_END CELL_START CELL_END + KEYWORD TEMPLATE_START TEMPLATE_END CATEGORY PASTE_START PASTE_END + + +rule + +wiki: + repeated_contents + { + @nodes.push WikiAST.new(0, @wiki_ast_length) + #@nodes.last.children.insert(0, val[0]) + #puts val[0] + @nodes.last.children += val[0] + } + ; + +contents: + text + { + result = val[0] + } + | bulleted_list + { + result = val[0] + } + | numbered_list + { + result = val[0] + } + | dictionary_list + { + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Dictionary + list.children = val[0] + result = list + } + | preformatted + { + result = val[0] + } + | section + { + result = val[0] + } + | tag + { + result = val[0] + } + | template + { + result = val[0] + } + | KEYWORD + { + k = KeywordAST.new(@ast_index, @ast_length) + k.text = val[0] + result = k + } + | PARA_START para_contents PARA_END + { + p = ParagraphAST.new(@ast_index, @ast_length) + p.children = val[1] + result = p + } + | LINK_START link_contents LINK_END + { + l = LinkAST.new(@ast_index, @ast_length) + l.link_type = val[0] + l.url = val[1][0] + l.children += val[1][1..-1] if val[1].length > 1 + result = l + } + | PASTE_START para_contents PASTE_END + { + p = PasteAST.new(@ast_index, @ast_length) + p.children = val[1] + result = p + } + | INTLINK_START TEXT RESOURCESEP TEXT reslink_repeated_contents INTLINK_END + { + l = ResourceLinkAST.new(@ast_index, @ast_length) + l.prefix = val[1] + l.locator = val[3] + l.children = val[4] unless val[4].nil? or val[4].empty? + result = l + } + | INTLINK_START TEXT intlink_repeated_contents INTLINK_END + { + l = InternalLinkAST.new(@ast_index, @ast_length) + l.locator = val[1] + l.children = val[2] unless val[2].nil? or val[2].empty? + result = l + } + | INTLINK_START CATEGORY TEXT cat_sort_contents INTLINK_END + { + l = CategoryAST.new(@ast_index, @ast_length) + l.locator = val[2] + l.sort_as = val[3] + result = l + } + | INTLINK_START RESOURCESEP CATEGORY TEXT intlink_repeated_contents INTLINK_END + { + l = CategoryLinkAST.new(@ast_index, @ast_length) + l.locator = val[3] + l.children = val[4] unless val[4].nil? or val[4].empty? + result = l + } + | table + ; + +para_contents: + { + result = nil + } + | repeated_contents + { + result = val[0] + } + ; + +tag: + TAG_START tag_attributes TAG_END + { + if val[0] != val[2] + raise Racc::ParseError.new("XHTML end tag #{val[2]} does not match start tag #{val[0]}") + end + elem = ElementAST.new(@ast_index, @ast_length) + elem.name = val[0] + elem.attributes = val[1] + result = elem + } + | TAG_START tag_attributes repeated_contents TAG_END + { + if val[0] != val[3] + raise Racc::ParseError.new("XHTML end tag #{val[3]} does not match start tag #{val[0]}") + end + elem = ElementAST.new(@ast_index, @ast_length) + elem.name = val[0] + elem.attributes = val[1] + elem.children += val[2] + result = elem + } + ; + +tag_attributes: + { + result = nil + } + | ATTR_NAME tag_attributes + { + attr_map = val[2] ? val[2] : {} + attr_map[val[0]] = true + result = attr_map + } + | ATTR_NAME ATTR_VALUE tag_attributes + { + attr_map = val[2] ? val[2] : {} + attr_map[val[0]] = val[1] + result = attr_map + } + ; + + +link_contents: + TEXT + { + result = val + } + | TEXT LINKSEP link_repeated_contents + { + result = [val[0]] + result += val[2] + } + ; + + +link_repeated_contents: + repeated_contents + { + result = val[0] + } + | repeated_contents LINKSEP link_repeated_contents + { + result = val[0] + result += val[2] if val[2] + } + ; + + +intlink_repeated_contents: + { + result = nil + } + | INTLINKSEP repeated_contents + { + result = val[1] + } + ; + +cat_sort_contents: + { + result = nil + } + | INTLINKSEP TEXT + { + result = val[1] + } + ; + +reslink_repeated_contents: + { + result = nil + } + | INTLINKSEP reslink_repeated_contents + { + result = val[1] + } + | INTLINKSEP repeated_contents reslink_repeated_contents + { + i = InternalLinkItemAST.new(@ast_index, @ast_length) + i.children = val[1] + result = [i] + result += val[2] if val[2] + } + ; + +repeated_contents: contents + { + result = [] + result << val[0] + } + | repeated_contents contents + { + result = [] + result += val[0] + result << val[1] + } + ; + +text: element + { + p = TextAST.new(@ast_index, @ast_length) + p.formatting = val[0][0] + p.contents = val[0][1] + result = p + } + | formatted_element + { + result = val[0] + } + ; + +table: + TABLE_START table_contents TABLE_END + { + table = TableAST.new(@ast_index, @ast_length) + table.children = val[1] unless val[1].nil? or val[1].empty? + result = table + } + | TABLE_START TEXT table_contents TABLE_END + { + table = TableAST.new(@ast_index, @ast_length) + table.options = val[1] + table.children = val[2] unless val[2].nil? or val[2].empty? + result = table + } + +table_contents: + { + result = nil + } + | ROW_START row_contents ROW_END table_contents + { + row = TableRowAST.new(@ast_index, @ast_length) + row.children = val[1] unless val[1].nil? or val[1].empty? + result = [row] + result += val[3] unless val[3].nil? or val[3].empty? + } + | ROW_START TEXT row_contents ROW_END table_contents + { + row = TableRowAST.new(@ast_index, @ast_length) + row.children = val[2] unless val[2].nil? or val[2].empty? + row.options = val[1] + result = [row] + result += val[4] unless val[4].nil? or val[4].empty? + } + +row_contents: + { + result = nil + } + | HEAD_START HEAD_END row_contents + { + cell = TableCellAST.new(@ast_index, @ast_length) + cell.type = :head + result = [cell] + result += val[2] unless val[2].nil? or val[2].empty? + } + | HEAD_START repeated_contents HEAD_END row_contents + { + cell = TableCellAST.new(@ast_index, @ast_length) + cell.children = val[1] unless val[1].nil? or val[1].empty? + cell.type = :head + result = [cell] + result += val[3] unless val[3].nil? or val[3].empty? + } + | CELL_START CELL_END row_contents + { + cell = TableCellAST.new(@ast_index, @ast_length) + cell.type = :body + result = [cell] + result += val[2] unless val[2].nil? or val[2].empty? + } + | CELL_START repeated_contents CELL_END row_contents + { + if val[2] == 'attributes' + result = [] + else + cell = TableCellAST.new(@ast_index, @ast_length) + cell.children = val[1] unless val[1].nil? or val[1].empty? + cell.type = :body + result = [cell] + end + result += val[3] unless val[3].nil? or val[3].empty? + if val[2] == 'attributes' and val[3] and val[3].first.class == TableCellAST + val[3].first.attributes = val[1] + end + result + } + + +element: + TEXT + { return [:None, val[0]] } + | HLINE + { return [:HLine, val[0]] } + | CHAR_ENT + { return [:CharacterEntity, val[0]] } + | SIGNATURE_DATE + { return [:SignatureDate, val[0]] } + | SIGNATURE_NAME + { return [:SignatureName, val[0]] } + | SIGNATURE_FULL + { return [:SignatureFull, val[0]] } + ; + +formatted_element: + BOLD_START BOLD_END + { + result = FormattedAST.new(@ast_index, @ast_length) + result.formatting = :Bold + result + } + | ITALIC_START ITALIC_END + { + result = FormattedAST.new(@ast_index, @ast_length) + result.formatting = :Italic + result + } + | BOLD_START repeated_contents BOLD_END + { + p = FormattedAST.new(@ast_index, @ast_length) + p.formatting = :Bold + p.children += val[1] + result = p + } + | ITALIC_START repeated_contents ITALIC_END + { + p = FormattedAST.new(@ast_index, @ast_length) + p.formatting = :Italic + p.children += val[1] + result = p + } + ; + +bulleted_list: UL_START list_item list_contents UL_END + { + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Bulleted + list.children << val[1] + list.children += val[2] + result = list + } + ; + +numbered_list: OL_START list_item list_contents OL_END + { + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Numbered + list.children << val[1] + list.children += val[2] + result = list + } + ; + +list_contents: + { result = [] } + list_item list_contents + { + result << val[1] + result += val[2] + } + | + { result = [] } + ; + +list_item: + LI_START LI_END + { + result = ListItemAST.new(@ast_index, @ast_length) + } + | LI_START repeated_contents LI_END + { + li = ListItemAST.new(@ast_index, @ast_length) + li.children += val[1] + result = li + } + ; + +dictionary_list: + DL_START dictionary_term dictionary_contents DL_END + { + result = [val[1]] + result += val[2] + } + | DL_START dictionary_contents DL_END + { + result = val[1] + } + ; + +dictionary_term: + DT_START DT_END + { + result = ListTermAST.new(@ast_index, @ast_length) + } + | DT_START repeated_contents DT_END + { + term = ListTermAST.new(@ast_index, @ast_length) + term.children += val[1] + result = term + } + +dictionary_contents: + dictionary_definition dictionary_contents + { + result = [val[0]] + result += val[1] if val[1] + } + | + { + result = [] + } + +dictionary_definition: + DD_START DD_END + { + result = ListDefinitionAST.new(@ast_index, @ast_length) + } + | DD_START repeated_contents DD_END + { + term = ListDefinitionAST.new(@ast_index, @ast_length) + term.children += val[1] + result = term + } + +preformatted: PRE_START repeated_contents PRE_END + { + p = PreformattedAST.new(@ast_index, @ast_length) + p.children += val[1] + result = p + } + | PREINDENT_START repeated_contents PREINDENT_END + { + p = PreformattedAST.new(@ast_index, @ast_length) + p.indented = true + p.children += val[1] + result = p + } + ; + +section: SECTION_START repeated_contents SECTION_END + { result = [val[1], val[0].length] + s = SectionAST.new(@ast_index, @ast_length) + s.children = val[1] + s.level = val[0].length + result = s + } + ; + +template: TEMPLATE_START TEXT template_parameters TEMPLATE_END + { + t = TemplateAST.new(@ast_index, @ast_length) + t.template_name = val[1] + t.children = val[2] unless val[2].nil? or val[2].empty? + result = t + } + ; + +template_parameters: + { + result = nil + } + | INTLINKSEP TEXT template_parameters + { + p = TemplateParameterAST.new(@ast_index, @ast_length) + p.parameter_value = val[1] + result = [p] + result += val[2] if val[2] + } + | INTLINKSEP template template_parameters + { + p = TemplateParameterAST.new(@ast_index, @ast_length) + p.children << val[1] + result = [p] + result += val[2] if val[2] + } + ; + +end + +---- header ---- +require 'mediacloth/mediawikiast' + +---- inner ---- + +attr_accessor :lexer + +def initialize + @nodes = [] + @context = [] + @wiki_ast_length = 0 + super +end + +#Tokenizes input string and parses it. +def parse(input) + @yydebug=true + lexer.tokenize(input) + do_parse + return @nodes.last +end + +#Asks the lexer to return the next token. +def next_token + token = @lexer.lex + if token[0].to_s.upcase.include? "_START" + @context << token[2..3] + elsif token[0].to_s.upcase.include? "_END" + @ast_index = @context.last[0] + @ast_length = token[2] + token[3] - @context.last[0] + @context.pop + else + @ast_index = token[2] + @ast_length = token[3] + end + + @wiki_ast_length += token[3] + + return token[0..1] +end diff --git a/test/regress/mediacloth b/test/regress/mediacloth new file mode 100644 index 00000000..16ead8c7 --- /dev/null +++ b/test/regress/mediacloth @@ -0,0 +1,1337 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "mediacloth.y". +# + +require 'racc/parser.rb' + +require 'mediacloth/mediawikiast' + +class MediaWikiParser < Racc::Parser + +module_eval(<<'...end mediacloth.y/module_eval...', 'mediacloth.y', 564) + +attr_accessor :lexer + +def initialize + @nodes = [] + @context = [] + @wiki_ast_length = 0 + super +end + +#Tokenizes input string and parses it. +def parse(input) + @yydebug=true + lexer.tokenize(input) + do_parse + return @nodes.last +end + +#Asks the lexer to return the next token. +def next_token + token = @lexer.lex + if token[0].to_s.upcase.include? "_START" + @context << token[2..3] + elsif token[0].to_s.upcase.include? "_END" + @ast_index = @context.last[0] + @ast_length = token[2] + token[3] - @context.last[0] + @context.pop + else + @ast_index = token[2] + @ast_length = token[3] + end + + @wiki_ast_length += token[3] + + return token[0..1] +end +...end mediacloth.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +22, 28, 50, 29, 61, 13, 63, 132, 15, 86, 37, 87, 24, 33, 86, +34, 87, 35, 85, 23, 26, 25, 27, 12, 86, 30, 87, 31, 86, 42, +87, 32, 44, 86, 48, 87, 57, 17, 57, 22, 28, 21, 29, 46, 13, +51, 67, 15, 68, 11, 36, 24, 33, 14, 34, 69, 35, 36, 23, 26, +25, 27, 12, 86, 30, 87, 31, 75, 73, 70, 32, 48, 81, 71, 72, +76, 17, 77, 22, 28, 21, 29, 82, 13, 45, 51, 15, -65, 11, 36, 24, 33, 14, 34, - +65, 35, 63, 23, 26, 25, 27, 12, 96, 30, 63, 31, 106, 109, 110, +32, 113, 114, 48, 117, 118, 17, 124, 22, 28, 21, 29, 57, 13, 127, +128, 15, 131, 11, 36, 24, 33, 14, 34, 136, 35, 137, 23, 26, 25, +27, 12, 138, 30, 75, 31, 51, 141, - +63, 32, 106, 106, 150, 153, 51, 17, nil, nil, nil, 21, nil, 22, 28, +53, 29, nil, 13, 11, 36, 15, nil, 14, nil, 24, 33, nil, 34, nil, +35, nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, +nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, 55, 13, nil, nil, +15, nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, +12, nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, +nil, 22, 28, 21, 29, nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, +14, 34, nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, +nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, +13, nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, +26, 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, +nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, nil, nil, 15, nil, 11, +36, 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, +nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, +21, 29, nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, +35, nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, +nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, nil, nil, +15, nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, +12, nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, +78, nil, nil, 21, nil, 22, 28, 88, 29, nil, 13, 11, 36, 15, nil, +14, nil, 24, 33, nil, 34, nil, 35, nil, 23, 26, 25, 27, 12, nil, +30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, +28, 21, 29, 89, 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, +nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, +32, nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, nil, +nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, +27, 12, nil, 30, nil, 31, nil, nil, 93, 32, nil, nil, nil, nil, nil, +17, nil, 22, 28, 21, 29, nil, 13, nil, nil, 15, nil, 11, 36, 24, +33, 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, +nil, nil, nil, 32, nil, nil, 98, nil, nil, 17, nil, 22, 28, 21, 29, +nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, +23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, +nil, nil, 101, 17, nil, nil, nil, 21, nil, 22, 28, nil, 29, nil, 13, +11, 36, 15, nil, 14, nil, 24, 33, 102, 34, nil, 35, nil, 23, 26, +25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, +nil, 17, nil, 22, 28, 21, 29, nil, 13, nil, nil, 15, nil, 11, 36, +24, 33, 14, 34, 103, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, +31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, +29, nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, 35, +104, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, +nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, nil, nil, 15, +nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, +nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, +22, 28, 21, 29, nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, +34, nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, +nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, +nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, +25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, +nil, 17, 115, 22, 28, 21, 29, nil, 13, nil, nil, 15, nil, 11, 36, +24, 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, +31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, +29, nil, 13, nil, 121, 15, nil, 11, 36, 24, 33, 14, 34, nil, 35, +nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, +nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, nil, nil, 15, +123, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, +nil, 30, nil, 31, nil, nil, 126, 32, nil, nil, nil, nil, nil, 17, nil, +22, 28, 21, 29, nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, +34, nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, +nil, 32, nil, nil, 129, nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, +nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, +25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, +130, 17, nil, 22, 28, 21, 29, nil, 13, nil, 134, 15, nil, 11, 36, +24, 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, +31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, +29, nil, 13, nil, nil, 15, nil, 11, 36, 24, 33, 14, 34, nil, 35, +nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, +nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, nil, nil, 15, +nil, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, 25, 27, 12, +nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, +22, 28, 21, 29, nil, 13, nil, 142, 15, nil, 11, 36, 24, 33, 14, +34, nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, +nil, 32, nil, nil, nil, nil, nil, 17, nil, 22, 28, 21, 29, nil, 13, +nil, nil, 15, 144, 11, 36, 24, 33, 14, 34, nil, 35, nil, 23, 26, +25, 27, 12, nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, +nil, 17, nil, nil, nil, 21, nil, nil, nil, nil, nil, nil, nil, 11, 36, +22, 28, 14, 29, nil, 13, nil, nil, 15, nil, 136, nil, 24, 33, nil, +34, nil, 35, nil, 23, 26, 25, 27, 12, nil, 30, nil, 31, nil, nil, +nil, 32, nil, nil, nil, nil, nil, 17, nil, nil, nil, 21, nil, nil, nil, +nil, nil, nil, nil, 11, 36, 22, 28, 14, 29, nil, 13, nil, nil, 15, +nil, 136, nil, 24, 33, nil, 34, nil, 35, nil, 23, 26, 25, 27, 12, +nil, 30, nil, 31, nil, nil, nil, 32, nil, nil, nil, nil, nil, 17, nil, +nil, nil, 21, nil, nil, nil, nil, nil, nil, nil, 11, 36, nil, nil, 14] + +racc_action_check = [ +0, 0, 21, 0, 32, 0, 32, 106, 0, 85, 1, 85, 0, 0, 121, +0, 121, 0, 51, 0, 0, 0, 0, 0, 123, 0, 123, 0, 142, 13, +142, 0, 15, 144, 17, 144, 30, 0, 31, 2, 2, 0, 2, 15, 2, +21, 36, 2, 37, 0, 0, 2, 2, 0, 2, 39, 2, 106, 2, 2, +2, 2, 2, 51, 2, 51, 2, 44, 44, 41, 2, 48, 48, 42, 43, +45, 2, 46, 12, 12, 2, 12, 49, 12, 15, 50, 12, 56, 2, 2, +12, 12, 2, 12, 58, 12, 59, 12, 12, 12, 12, 12, 60, 12, 62, +12, 67, 73, 74, 12, 76, 77, 81, 83, 84, 12, 90, 14, 14, 12, +14, 91, 14, 94, 95, 14, 105, 12, 12, 14, 14, 12, 14, 109, 14, +112, 14, 14, 14, 14, 14, 113, 14, 114, 14, 118, 119, 125, 14, 132, +133, 135, 139, 141, 14, nil, nil, nil, 14, nil, 28, 28, 28, 28, nil, +28, 14, 14, 28, nil, 14, nil, 28, 28, nil, 28, nil, 28, nil, 28, +28, 28, 28, 28, nil, 28, nil, 28, nil, nil, nil, 28, nil, nil, nil, +nil, nil, 28, nil, 29, 29, 28, 29, 29, 29, nil, nil, 29, nil, 28, +28, 29, 29, 28, 29, nil, 29, nil, 29, 29, 29, 29, 29, nil, 29, +nil, 29, nil, nil, nil, 29, nil, nil, nil, nil, nil, 29, nil, 33, 33, +29, 33, nil, 33, nil, nil, 33, nil, 29, 29, 33, 33, 29, 33, nil, +33, nil, 33, 33, 33, 33, 33, nil, 33, nil, 33, nil, nil, nil, 33, +nil, nil, nil, nil, nil, 33, nil, 34, 34, 33, 34, nil, 34, nil, nil, +34, nil, 33, 33, 34, 34, 33, 34, nil, 34, nil, 34, 34, 34, 34, +34, nil, 34, nil, 34, nil, nil, nil, 34, nil, nil, nil, nil, nil, 34, +nil, 35, 35, 34, 35, nil, 35, nil, nil, 35, nil, 34, 34, 35, 35, +34, 35, nil, 35, nil, 35, 35, 35, 35, 35, nil, 35, nil, 35, nil, +nil, nil, 35, nil, nil, nil, nil, nil, 35, nil, 40, 40, 35, 40, nil, +40, nil, nil, 40, nil, 35, 35, 40, 40, 35, 40, nil, 40, nil, 40, +40, 40, 40, 40, nil, 40, nil, 40, nil, nil, nil, 40, nil, nil, nil, +nil, nil, 40, nil, 47, 47, 40, 47, nil, 47, nil, nil, 47, nil, 40, +40, 47, 47, 40, 47, nil, 47, nil, 47, 47, 47, 47, 47, nil, 47, +nil, 47, nil, nil, nil, 47, nil, nil, nil, nil, nil, 47, 47, nil, nil, +47, nil, 52, 52, 52, 52, nil, 52, 47, 47, 52, nil, 47, nil, 52, +52, nil, 52, nil, 52, nil, 52, 52, 52, 52, 52, nil, 52, nil, 52, +nil, nil, nil, 52, nil, nil, nil, nil, nil, 52, nil, 54, 54, 52, 54, +54, 54, nil, nil, 54, nil, 52, 52, 54, 54, 52, 54, nil, 54, nil, +54, 54, 54, 54, 54, nil, 54, nil, 54, nil, nil, nil, 54, nil, nil, +nil, nil, nil, 54, nil, 57, 57, 54, 57, nil, 57, nil, nil, 57, nil, +54, 54, 57, 57, 54, 57, nil, 57, nil, 57, 57, 57, 57, 57, nil, +57, nil, 57, nil, nil, 57, 57, nil, nil, nil, nil, nil, 57, nil, 61, +61, 57, 61, nil, 61, nil, nil, 61, nil, 57, 57, 61, 61, 57, 61, +nil, 61, nil, 61, 61, 61, 61, 61, nil, 61, nil, 61, nil, nil, nil, +61, nil, nil, 61, nil, nil, 61, nil, 63, 63, 61, 63, nil, 63, nil, +nil, 63, nil, 61, 61, 63, 63, 61, 63, nil, 63, nil, 63, 63, 63, +63, 63, nil, 63, nil, 63, nil, nil, nil, 63, nil, nil, nil, nil, 63, +63, nil, nil, nil, 63, nil, 64, 64, nil, 64, nil, 64, 63, 63, 64, +nil, 63, nil, 64, 64, 64, 64, nil, 64, nil, 64, 64, 64, 64, 64, +nil, 64, nil, 64, nil, nil, nil, 64, nil, nil, nil, nil, nil, 64, nil, +65, 65, 64, 65, nil, 65, nil, nil, 65, nil, 64, 64, 65, 65, 64, +65, 65, 65, nil, 65, 65, 65, 65, 65, nil, 65, nil, 65, nil, nil, +nil, 65, nil, nil, nil, nil, nil, 65, nil, 66, 66, 65, 66, nil, 66, +nil, nil, 66, nil, 65, 65, 66, 66, 65, 66, nil, 66, 66, 66, 66, +66, 66, 66, nil, 66, nil, 66, nil, nil, nil, 66, nil, nil, nil, nil, +nil, 66, nil, 71, 71, 66, 71, nil, 71, nil, nil, 71, nil, 66, 66, +71, 71, 66, 71, nil, 71, nil, 71, 71, 71, 71, 71, nil, 71, nil, +71, nil, nil, nil, 71, nil, nil, nil, nil, nil, 71, nil, 75, 75, 71, +75, nil, 75, nil, nil, 75, nil, 71, 71, 75, 75, 71, 75, nil, 75, +nil, 75, 75, 75, 75, 75, nil, 75, nil, 75, nil, nil, nil, 75, nil, +nil, nil, nil, nil, 75, nil, 79, 79, 75, 79, nil, 79, nil, nil, 79, +nil, 75, 75, 79, 79, 75, 79, nil, 79, nil, 79, 79, 79, 79, 79, +nil, 79, nil, 79, nil, nil, nil, 79, nil, nil, nil, nil, nil, 79, 79, +86, 86, 79, 86, nil, 86, nil, nil, 86, nil, 79, 79, 86, 86, 79, +86, nil, 86, nil, 86, 86, 86, 86, 86, nil, 86, nil, 86, nil, nil, +nil, 86, nil, nil, nil, nil, nil, 86, nil, 87, 87, 86, 87, nil, 87, +nil, 86, 87, nil, 86, 86, 87, 87, 86, 87, nil, 87, nil, 87, 87, +87, 87, 87, nil, 87, nil, 87, nil, nil, nil, 87, nil, nil, nil, nil, +nil, 87, nil, 92, 92, 87, 92, nil, 92, nil, nil, 92, 87, 87, 87, +92, 92, 87, 92, nil, 92, nil, 92, 92, 92, 92, 92, nil, 92, nil, +92, nil, nil, 92, 92, nil, nil, nil, nil, nil, 92, nil, 97, 97, 92, +97, nil, 97, nil, nil, 97, nil, 92, 92, 97, 97, 92, 97, nil, 97, +nil, 97, 97, 97, 97, 97, nil, 97, nil, 97, nil, nil, nil, 97, nil, +nil, 97, nil, nil, 97, nil, 100, 100, 97, 100, nil, 100, nil, nil, 100, +nil, 97, 97, 100, 100, 97, 100, nil, 100, nil, 100, 100, 100, 100, 100, +nil, 100, nil, 100, nil, nil, nil, 100, nil, nil, nil, nil, 100, 100, nil, +108, 108, 100, 108, nil, 108, nil, 108, 108, nil, 100, 100, 108, 108, 100, +108, nil, 108, nil, 108, 108, 108, 108, 108, nil, 108, nil, 108, nil, nil, +nil, 108, nil, nil, nil, nil, nil, 108, nil, 111, 111, 108, 111, nil, 111, +nil, nil, 111, nil, 108, 108, 111, 111, 108, 111, nil, 111, nil, 111, 111, +111, 111, 111, nil, 111, nil, 111, nil, nil, nil, 111, nil, nil, nil, nil, +nil, 111, nil, 120, 120, 111, 120, nil, 120, nil, nil, 120, nil, 111, 111, +120, 120, 111, 120, nil, 120, nil, 120, 120, 120, 120, 120, nil, 120, nil, +120, nil, nil, nil, 120, nil, nil, nil, nil, nil, 120, nil, 122, 122, 120, +122, nil, 122, nil, 120, 122, nil, 120, 120, 122, 122, 120, 122, nil, 122, +nil, 122, 122, 122, 122, 122, nil, 122, nil, 122, nil, nil, nil, 122, nil, +nil, nil, nil, nil, 122, nil, 134, 134, 122, 134, nil, 134, nil, nil, 134, +122, 122, 122, 134, 134, 122, 134, nil, 134, nil, 134, 134, 134, 134, 134, +nil, 134, nil, 134, nil, nil, nil, 134, nil, nil, nil, nil, nil, 134, nil, +nil, nil, 134, nil, nil, nil, nil, nil, nil, nil, 134, 134, 136, 136, 134, +136, nil, 136, nil, nil, 136, nil, 136, nil, 136, 136, nil, 136, nil, 136, +nil, 136, 136, 136, 136, 136, nil, 136, nil, 136, nil, nil, nil, 136, nil, +nil, nil, nil, nil, 136, nil, nil, nil, 136, nil, nil, nil, nil, nil, nil, +nil, 136, 136, 152, 152, 136, 152, nil, 152, nil, nil, 152, nil, 152, nil, +152, 152, nil, 152, nil, 152, nil, 152, 152, 152, 152, 152, nil, 152, nil, +152, nil, nil, nil, 152, nil, nil, nil, nil, nil, 152, nil, nil, nil, 152, +nil, nil, nil, nil, nil, nil, nil, 152, 152, nil, nil, 152] + +racc_action_pointer = [- +2, 10, 37, nil, nil, nil, nil, nil, nil, nil, nil, nil, 76, 27, 115, +30, nil, - +7, nil, nil, nil, 0, nil, nil, nil, nil, nil, nil, 158, 197, 5, 7, +- +31, 236, 275, 314, 44, 48, nil, 29, 353, 61, 64, 18, 55, 73, 23, +392, 30, 38, 40, 16, 435, nil, 474, nil, 59, 513, 64, 59, 68, 552, +67, 591, 634, 673, 712, 94, nil, nil, nil, 751, nil, 105, 97, 790, 98, +109, nil, 829, nil, 71, nil, 69, 68, - +38, 868, 907, nil, nil, 88, 90, 946, nil, 93, 90, nil, 985, nil, nil, +1024, nil, nil, nil, nil, 73, 5, nil, 1063, 121, nil, 1102, 124, 139, 131, +nil, nil, nil, 100, 100, 1141, -33, 1180, - +23, nil, 116, nil, nil, nil, nil, nil, nil, 137, 138, 1219, 140, 1270, nil, +nil, 141, nil, 108, -19, nil, -14, nil, nil, nil, nil, nil, nil, nil, 1321, nil, nil, nil, nil, nil] + +racc_action_default = [-83, -83, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -19, -83, -19, -83, -18, -23, -37, -39, -40, -43, -51, -52, -53, -54, -55, -56, -83, -83, -83, -83, -73, -83, -83, -83, -83, -83, -38, -83, -20, -83, -26, -83, -30, -83, -83, -83, -23, -83, -43, -46, -83, -57, -83, -58, -63, -83, -63, -73, -83, -83, -73, -83, -83, -83, -83, -80, 158, -11, -12, -83, -13, -83, -83, -83, -32, -83, -21, -83, -24, -23, -41, -83, -83, -46, -83, -83, -59, -60, -83, -83, -83, -66, -83, -83, -69, -83, -70, -72, -83, -74, -76, -77, -78, -83, -83, -27, -28, -34, -15, -31, -83, -83, -30, -22, -25, -42, -43, -83, -83, -46, -83, -46, -61, -65, -67, -62, -68, -71, -75, -79, -80, -80, -83, -83, -34, -16, -33, -83, -44, -43, -46, -47, -46, -49, -64, -81, -82, -29, -14, -35, -34, -17, -45, -48, -50, -36] + +racc_goto_table = [ +38, 84, 74, 105, 49, 39, 90, 43, 94, 60, 135, 1, 133, 2, 47, +41, 107, 112, 59, 56, 58, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 83, nil, 119, 95, 151, 38, 99, nil, 52, 54, nil, nil, +80, 64, 65, 66, nil, 38, nil, 38, 157, nil, nil, nil, nil, nil, nil, +79, nil, 38, 38, 38, nil, nil, nil, 147, 148, 92, 143, 139, 145, 97, +146, 100, 38, 116, 149, 125, nil, nil, nil, 108, nil, nil, nil, 111, nil, +38, nil, 155, nil, 156, 38, nil, nil, 38, 120, 122, 140, nil, nil, nil, +nil, 38, nil, nil, 38, nil, nil, nil, nil, nil, nil, nil, nil, 38, nil, +38, nil, nil, nil, 154, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 108, nil, 152, +38] + +racc_goto_check = [ +3, 23, 15, 30, 22, 12, 25, 12, 25, 28, 14, 1, 11, 2, 18, +13, 19, 16, 27, 24, 24, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 22, nil, 23, 28, 14, 3, 28, nil, 2, 2, nil, nil, +18, 2, 2, 2, nil, 3, nil, 3, 14, nil, nil, nil, nil, nil, nil, +2, nil, 3, 3, 3, nil, nil, nil, 30, 30, 2, 23, 15, 23, 2, +25, 2, 3, 18, 19, 24, nil, nil, nil, 2, nil, nil, nil, 2, nil, +3, nil, 23, nil, 23, 3, nil, nil, 3, 2, 2, 22, nil, nil, nil, +nil, 3, nil, nil, 3, nil, nil, nil, nil, nil, nil, nil, nil, 3, nil, +3, nil, nil, nil, 22, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 2, nil, 2, +3] + +racc_goto_pointer = [nil, 11, 13, -2, nil, nil, nil, nil, nil, nil, nil, -94, -7, 2, -99, -42, -59, nil, -3, -55, nil, nil, -17, -50, -11, -50, nil, -14, -23, nil, -64] + +racc_goto_default = [ +nil, nil, 40, 18, 3, 4, 5, 6, 7, 8, 9, 10, nil, nil, nil, +nil, nil, 16, nil, nil, 19, 20, nil, nil, nil, nil, 91, nil, nil, 62, +nil] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 58, :_reduce_1, + 1, 60, :_reduce_2, + 1, 60, :_reduce_3, + 1, 60, :_reduce_4, + 1, 60, :_reduce_5, + 1, 60, :_reduce_6, + 1, 60, :_reduce_7, + 1, 60, :_reduce_8, + 1, 60, :_reduce_9, + 1, 60, :_reduce_10, + 3, 60, :_reduce_11, + 3, 60, :_reduce_12, + 3, 60, :_reduce_13, + 6, 60, :_reduce_14, + 4, 60, :_reduce_15, + 5, 60, :_reduce_16, + 6, 60, :_reduce_17, + 1, 60, :_reduce_none, + 0, 69, :_reduce_19, + 1, 69, :_reduce_20, + 3, 67, :_reduce_21, + 4, 67, :_reduce_22, + 0, 75, :_reduce_23, + 2, 75, :_reduce_24, + 3, 75, :_reduce_25, + 1, 70, :_reduce_26, + 3, 70, :_reduce_27, + 1, 76, :_reduce_28, + 3, 76, :_reduce_29, + 0, 72, :_reduce_30, + 2, 72, :_reduce_31, + 0, 73, :_reduce_32, + 2, 73, :_reduce_33, + 0, 71, :_reduce_34, + 2, 71, :_reduce_35, + 3, 71, :_reduce_36, + 1, 59, :_reduce_37, + 2, 59, :_reduce_38, + 1, 61, :_reduce_39, + 1, 61, :_reduce_40, + 3, 74, :_reduce_41, + 4, 74, :_reduce_42, + 0, 79, :_reduce_43, + 4, 79, :_reduce_44, + 5, 79, :_reduce_45, + 0, 80, :_reduce_46, + 3, 80, :_reduce_47, + 4, 80, :_reduce_48, + 3, 80, :_reduce_49, + 4, 80, :_reduce_50, + 1, 77, :_reduce_51, + 1, 77, :_reduce_52, + 1, 77, :_reduce_53, + 1, 77, :_reduce_54, + 1, 77, :_reduce_55, + 1, 77, :_reduce_56, + 2, 78, :_reduce_57, + 2, 78, :_reduce_58, + 3, 78, :_reduce_59, + 3, 78, :_reduce_60, + 4, 62, :_reduce_61, + 4, 63, :_reduce_62, + 0, 83, :_reduce_63, + 3, 82, :_reduce_64, + 0, 82, :_reduce_65, + 2, 81, :_reduce_66, + 3, 81, :_reduce_67, + 4, 64, :_reduce_68, + 3, 64, :_reduce_69, + 2, 84, :_reduce_70, + 3, 84, :_reduce_71, + 2, 85, :_reduce_72, + 0, 85, :_reduce_73, + 2, 86, :_reduce_74, + 3, 86, :_reduce_75, + 3, 65, :_reduce_76, + 3, 65, :_reduce_77, + 3, 66, :_reduce_78, + 4, 68, :_reduce_79, + 0, 87, :_reduce_80, + 3, 87, :_reduce_81, + 3, 87, :_reduce_82 ] + +racc_reduce_n = 83 + +racc_shift_n = 158 + +racc_token_table = { + false => 0, + :error => 1, + :TEXT => 2, + :BOLD_START => 3, + :BOLD_END => 4, + :ITALIC_START => 5, + :ITALIC_END => 6, + :LINK_START => 7, + :LINK_END => 8, + :LINKSEP => 9, + :INTLINK_START => 10, + :INTLINK_END => 11, + :INTLINKSEP => 12, + :RESOURCESEP => 13, + :CHAR_ENT => 14, + :PRE_START => 15, + :PRE_END => 16, + :PREINDENT_START => 17, + :PREINDENT_END => 18, + :SECTION_START => 19, + :SECTION_END => 20, + :HLINE => 21, + :SIGNATURE_NAME => 22, + :SIGNATURE_DATE => 23, + :SIGNATURE_FULL => 24, + :PARA_START => 25, + :PARA_END => 26, + :UL_START => 27, + :UL_END => 28, + :OL_START => 29, + :OL_END => 30, + :LI_START => 31, + :LI_END => 32, + :DL_START => 33, + :DL_END => 34, + :DT_START => 35, + :DT_END => 36, + :DD_START => 37, + :DD_END => 38, + :TAG_START => 39, + :TAG_END => 40, + :ATTR_NAME => 41, + :ATTR_VALUE => 42, + :TABLE_START => 43, + :TABLE_END => 44, + :ROW_START => 45, + :ROW_END => 46, + :HEAD_START => 47, + :HEAD_END => 48, + :CELL_START => 49, + :CELL_END => 50, + :KEYWORD => 51, + :TEMPLATE_START => 52, + :TEMPLATE_END => 53, + :CATEGORY => 54, + :PASTE_START => 55, + :PASTE_END => 56 } + +racc_nt_base = 57 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "TEXT", + "BOLD_START", + "BOLD_END", + "ITALIC_START", + "ITALIC_END", + "LINK_START", + "LINK_END", + "LINKSEP", + "INTLINK_START", + "INTLINK_END", + "INTLINKSEP", + "RESOURCESEP", + "CHAR_ENT", + "PRE_START", + "PRE_END", + "PREINDENT_START", + "PREINDENT_END", + "SECTION_START", + "SECTION_END", + "HLINE", + "SIGNATURE_NAME", + "SIGNATURE_DATE", + "SIGNATURE_FULL", + "PARA_START", + "PARA_END", + "UL_START", + "UL_END", + "OL_START", + "OL_END", + "LI_START", + "LI_END", + "DL_START", + "DL_END", + "DT_START", + "DT_END", + "DD_START", + "DD_END", + "TAG_START", + "TAG_END", + "ATTR_NAME", + "ATTR_VALUE", + "TABLE_START", + "TABLE_END", + "ROW_START", + "ROW_END", + "HEAD_START", + "HEAD_END", + "CELL_START", + "CELL_END", + "KEYWORD", + "TEMPLATE_START", + "TEMPLATE_END", + "CATEGORY", + "PASTE_START", + "PASTE_END", + "$start", + "wiki", + "repeated_contents", + "contents", + "text", + "bulleted_list", + "numbered_list", + "dictionary_list", + "preformatted", + "section", + "tag", + "template", + "para_contents", + "link_contents", + "reslink_repeated_contents", + "intlink_repeated_contents", + "cat_sort_contents", + "table", + "tag_attributes", + "link_repeated_contents", + "element", + "formatted_element", + "table_contents", + "row_contents", + "list_item", + "list_contents", + "@1", + "dictionary_term", + "dictionary_contents", + "dictionary_definition", + "template_parameters" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'mediacloth.y', 47) + def _reduce_1(val, _values, result) + @nodes.push WikiAST.new(0, @wiki_ast_length) + #@nodes.last.children.insert(0, val[0]) + #puts val[0] + @nodes.last.children += val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 57) + def _reduce_2(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 61) + def _reduce_3(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 65) + def _reduce_4(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 69) + def _reduce_5(val, _values, result) + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Dictionary + list.children = val[0] + result = list + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 76) + def _reduce_6(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 80) + def _reduce_7(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 84) + def _reduce_8(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 88) + def _reduce_9(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 92) + def _reduce_10(val, _values, result) + k = KeywordAST.new(@ast_index, @ast_length) + k.text = val[0] + result = k + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 98) + def _reduce_11(val, _values, result) + p = ParagraphAST.new(@ast_index, @ast_length) + p.children = val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 104) + def _reduce_12(val, _values, result) + l = LinkAST.new(@ast_index, @ast_length) + l.link_type = val[0] + l.url = val[1][0] + l.children += val[1][1..-1] if val[1].length > 1 + result = l + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 112) + def _reduce_13(val, _values, result) + p = PasteAST.new(@ast_index, @ast_length) + p.children = val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 118) + def _reduce_14(val, _values, result) + l = ResourceLinkAST.new(@ast_index, @ast_length) + l.prefix = val[1] + l.locator = val[3] + l.children = val[4] unless val[4].nil? or val[4].empty? + result = l + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 126) + def _reduce_15(val, _values, result) + l = InternalLinkAST.new(@ast_index, @ast_length) + l.locator = val[1] + l.children = val[2] unless val[2].nil? or val[2].empty? + result = l + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 133) + def _reduce_16(val, _values, result) + l = CategoryAST.new(@ast_index, @ast_length) + l.locator = val[2] + l.sort_as = val[3] + result = l + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 140) + def _reduce_17(val, _values, result) + l = CategoryLinkAST.new(@ast_index, @ast_length) + l.locator = val[3] + l.children = val[4] unless val[4].nil? or val[4].empty? + result = l + + result + end +.,., + +# reduce 18 omitted + +module_eval(<<'.,.,', 'mediacloth.y', 150) + def _reduce_19(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 154) + def _reduce_20(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 161) + def _reduce_21(val, _values, result) + if val[0] != val[2] + raise Racc::ParseError.new("XHTML end tag #{val[2]} does not match start tag #{val[0]}") + end + elem = ElementAST.new(@ast_index, @ast_length) + elem.name = val[0] + elem.attributes = val[1] + result = elem + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 171) + def _reduce_22(val, _values, result) + if val[0] != val[3] + raise Racc::ParseError.new("XHTML end tag #{val[3]} does not match start tag #{val[0]}") + end + elem = ElementAST.new(@ast_index, @ast_length) + elem.name = val[0] + elem.attributes = val[1] + elem.children += val[2] + result = elem + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 184) + def _reduce_23(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 188) + def _reduce_24(val, _values, result) + attr_map = val[2] ? val[2] : {} + attr_map[val[0]] = true + result = attr_map + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 194) + def _reduce_25(val, _values, result) + attr_map = val[2] ? val[2] : {} + attr_map[val[0]] = val[1] + result = attr_map + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 204) + def _reduce_26(val, _values, result) + result = val + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 208) + def _reduce_27(val, _values, result) + result = [val[0]] + result += val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 217) + def _reduce_28(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 221) + def _reduce_29(val, _values, result) + result = val[0] + result += val[2] if val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 229) + def _reduce_30(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 233) + def _reduce_31(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 239) + def _reduce_32(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 243) + def _reduce_33(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 249) + def _reduce_34(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 253) + def _reduce_35(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 257) + def _reduce_36(val, _values, result) + i = InternalLinkItemAST.new(@ast_index, @ast_length) + i.children = val[1] + result = [i] + result += val[2] if val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 266) + def _reduce_37(val, _values, result) + result = [] + result << val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 271) + def _reduce_38(val, _values, result) + result = [] + result += val[0] + result << val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 279) + def _reduce_39(val, _values, result) + p = TextAST.new(@ast_index, @ast_length) + p.formatting = val[0][0] + p.contents = val[0][1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 286) + def _reduce_40(val, _values, result) + result = val[0] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 293) + def _reduce_41(val, _values, result) + table = TableAST.new(@ast_index, @ast_length) + table.children = val[1] unless val[1].nil? or val[1].empty? + result = table + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 299) + def _reduce_42(val, _values, result) + table = TableAST.new(@ast_index, @ast_length) + table.options = val[1] + table.children = val[2] unless val[2].nil? or val[2].empty? + result = table + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 307) + def _reduce_43(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 311) + def _reduce_44(val, _values, result) + row = TableRowAST.new(@ast_index, @ast_length) + row.children = val[1] unless val[1].nil? or val[1].empty? + result = [row] + result += val[3] unless val[3].nil? or val[3].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 318) + def _reduce_45(val, _values, result) + row = TableRowAST.new(@ast_index, @ast_length) + row.children = val[2] unless val[2].nil? or val[2].empty? + row.options = val[1] + result = [row] + result += val[4] unless val[4].nil? or val[4].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 327) + def _reduce_46(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 331) + def _reduce_47(val, _values, result) + cell = TableCellAST.new(@ast_index, @ast_length) + cell.type = :head + result = [cell] + result += val[2] unless val[2].nil? or val[2].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 338) + def _reduce_48(val, _values, result) + cell = TableCellAST.new(@ast_index, @ast_length) + cell.children = val[1] unless val[1].nil? or val[1].empty? + cell.type = :head + result = [cell] + result += val[3] unless val[3].nil? or val[3].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 346) + def _reduce_49(val, _values, result) + cell = TableCellAST.new(@ast_index, @ast_length) + cell.type = :body + result = [cell] + result += val[2] unless val[2].nil? or val[2].empty? + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 353) + def _reduce_50(val, _values, result) + if val[2] == 'attributes' + result = [] + else + cell = TableCellAST.new(@ast_index, @ast_length) + cell.children = val[1] unless val[1].nil? or val[1].empty? + cell.type = :body + result = [cell] + end + result += val[3] unless val[3].nil? or val[3].empty? + if val[2] == 'attributes' and val[3] and val[3].first.class == TableCellAST + val[3].first.attributes = val[1] + end + result + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 371) + def _reduce_51(val, _values, result) + return [:None, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 373) + def _reduce_52(val, _values, result) + return [:HLine, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 375) + def _reduce_53(val, _values, result) + return [:CharacterEntity, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 377) + def _reduce_54(val, _values, result) + return [:SignatureDate, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 379) + def _reduce_55(val, _values, result) + return [:SignatureName, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 381) + def _reduce_56(val, _values, result) + return [:SignatureFull, val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 387) + def _reduce_57(val, _values, result) + result = FormattedAST.new(@ast_index, @ast_length) + result.formatting = :Bold + result + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 393) + def _reduce_58(val, _values, result) + result = FormattedAST.new(@ast_index, @ast_length) + result.formatting = :Italic + result + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 399) + def _reduce_59(val, _values, result) + p = FormattedAST.new(@ast_index, @ast_length) + p.formatting = :Bold + p.children += val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 406) + def _reduce_60(val, _values, result) + p = FormattedAST.new(@ast_index, @ast_length) + p.formatting = :Italic + p.children += val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 415) + def _reduce_61(val, _values, result) + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Bulleted + list.children << val[1] + list.children += val[2] + result = list + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 425) + def _reduce_62(val, _values, result) + list = ListAST.new(@ast_index, @ast_length) + list.list_type = :Numbered + list.children << val[1] + list.children += val[2] + result = list + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 434) + def _reduce_63(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 437) + def _reduce_64(val, _values, result) + result << val[1] + result += val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 441) + def _reduce_65(val, _values, result) + result = [] + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 447) + def _reduce_66(val, _values, result) + result = ListItemAST.new(@ast_index, @ast_length) + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 451) + def _reduce_67(val, _values, result) + li = ListItemAST.new(@ast_index, @ast_length) + li.children += val[1] + result = li + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 460) + def _reduce_68(val, _values, result) + result = [val[1]] + result += val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 465) + def _reduce_69(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 472) + def _reduce_70(val, _values, result) + result = ListTermAST.new(@ast_index, @ast_length) + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 476) + def _reduce_71(val, _values, result) + term = ListTermAST.new(@ast_index, @ast_length) + term.children += val[1] + result = term + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 484) + def _reduce_72(val, _values, result) + result = [val[0]] + result += val[1] if val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 489) + def _reduce_73(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 495) + def _reduce_74(val, _values, result) + result = ListDefinitionAST.new(@ast_index, @ast_length) + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 499) + def _reduce_75(val, _values, result) + term = ListDefinitionAST.new(@ast_index, @ast_length) + term.children += val[1] + result = term + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 506) + def _reduce_76(val, _values, result) + p = PreformattedAST.new(@ast_index, @ast_length) + p.children += val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 512) + def _reduce_77(val, _values, result) + p = PreformattedAST.new(@ast_index, @ast_length) + p.indented = true + p.children += val[1] + result = p + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 520) + def _reduce_78(val, _values, result) + result = [val[1], val[0].length] + s = SectionAST.new(@ast_index, @ast_length) + s.children = val[1] + s.level = val[0].length + result = s + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 530) + def _reduce_79(val, _values, result) + t = TemplateAST.new(@ast_index, @ast_length) + t.template_name = val[1] + t.children = val[2] unless val[2].nil? or val[2].empty? + result = t + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 539) + def _reduce_80(val, _values, result) + result = nil + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 543) + def _reduce_81(val, _values, result) + p = TemplateParameterAST.new(@ast_index, @ast_length) + p.parameter_value = val[1] + result = [p] + result += val[2] if val[2] + + result + end +.,., + +module_eval(<<'.,.,', 'mediacloth.y', 550) + def _reduce_82(val, _values, result) + p = TemplateParameterAST.new(@ast_index, @ast_length) + p.children << val[1] + result = [p] + result += val[2] if val[2] + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + +end # class MediaWikiParser diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 3c18801c..845dce24 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -288,5 +288,13 @@ def test_cadenza assert_debugfile 'cadenza.y', [0, 0, 0, 0, 37] assert_output 'cadenza.y' end + + # .y file from mediacloth gem + + def test_mediacloth + assert_compile 'mediacloth.y' + assert_debugfile 'mediacloth.y', [0, 0, 0, 0] + assert_output 'mediacloth.y' + end end end From 1791ebfd36178a8c709a97609a628cdf31bc65b3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 4 Nov 2015 14:16:11 +0200 Subject: [PATCH 105/619] Correct test command in README.rdoc Wow, it actually works now! --- README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 99382f29..8fa522d5 100644 --- a/README.rdoc +++ b/README.rdoc @@ -54,7 +54,7 @@ Racc comes with simple calculator. To compile this, on shell: - $ racc -o calc calc.y + $ racc -o calc sample/calc.y This process costs few seconds (or less). Then type: From c8faa6049cf9aa7eeef71ccb5e9986330cdfdd59 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 05:30:46 +0200 Subject: [PATCH 106/619] Remove unused '_' alias from grammar definition DSL Racc contains a DSL for defining a grammar in Ruby code. This is used to define the grammar for Racc's own grammar files. (Otherwise, if the grammar for grammar files was defined in a grammar file, that would lead to a "chicken-or-egg" circular dependency...) This DSL is completely unused outside of Racc itself, so it doesn't need extra features which are not used within Racc. --- lib/racc/grammar.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 656b1e07..dbab4d63 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -277,8 +277,6 @@ def action(&block) id end - alias _ action - # Create a `Rule` which can either be null (like an empty RHS in a BNF grammar), # in which case the action will return `default`, or which can match a single # `sym` token. From 2a718d1f38ea7633801a561b59d6a0f5abc01c78 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 05:35:03 +0200 Subject: [PATCH 107/619] Remove unused DefinitionEnv#action method --- lib/racc/grammar.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index dbab4d63..60aaab52 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -271,12 +271,6 @@ def null(&block) seq(&block) end - def action(&block) - id = "@#{@seqs["action"] += 1}".to_sym - _delayed_add Rule.new(@grammar.intern(id), [], UserAction.proc(block)) - id - end - # Create a `Rule` which can either be null (like an empty RHS in a BNF grammar), # in which case the action will return `default`, or which can match a single # `sym` token. From a2a18a53554c5fa7bc341ea559eeb0761941759f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 05:37:54 +0200 Subject: [PATCH 108/619] Remove unused DefinitionEnv#precedence_table method As with the previous couple of commits, this is part of a DSL which is solely used for defining the grammar of Racc grammar files. But it is never used in that grammar definition. If the "grammar-file grammar" is amended later and needs a precedence table, we can reintroduce this code. It's still there in the git commit history, anyways... --- lib/racc/grammar.rb | 46 --------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 60aaab52..2af5ece1 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -210,12 +210,6 @@ def grammar @grammar end - def precedence_table(&block) - env = PrecedenceDefinitionEnv.new(@grammar) - env.instance_eval(&block) - @grammar.end_precedence_declaration env.reverse - end - # Intercept calls to `self.non_terminal = ...`, and use them to register # a new rule def method_missing(mid, *args, &block) @@ -351,46 +345,6 @@ def _wrap(target_name, sym, block) end end - class PrecedenceDefinitionEnv - def initialize(g) - @grammar = g - @prechigh_seen = false - @preclow_seen = false - @reverse = false - end - - attr_reader :reverse - - def higher - if @prechigh_seen - raise CompileError, "prechigh used twice" - end - @prechigh_seen = true - end - - def lower - if @preclow_seen - raise CompileError, "preclow used twice" - end - if @prechigh_seen - @reverse = true - end - @preclow_seen = true - end - - def left(*syms) - @grammar.declare_precedence :Left, syms.map {|s| @grammar.intern(s) } - end - - def right(*syms) - @grammar.declare_precedence :Right, syms.map {|s| @grammar.intern(s) } - end - - def nonassoc(*syms) - @grammar.declare_precedence :Nonassoc, syms.map {|s| @grammar.intern(s)} - end - end - # # Computation # From c94dc64b0756c786777cc8f297f670a158729859 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 05:41:19 +0200 Subject: [PATCH 109/619] Remove unused UserAction#proc? method --- lib/racc/grammar.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 2af5ece1..6afc1f26 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -699,10 +699,6 @@ def source? not @proc end - def proc? - not @source - end - def empty? not @proc and not @source end From ad295fcf2d699b70b5e04bcace771bcaa14e209b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 05:42:40 +0200 Subject: [PATCH 110/619] Remove unused LocationPointer#increment alias --- lib/racc/grammar.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 6afc1f26..89f790d4 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -766,8 +766,6 @@ def next @rule.ptrs[@index + 1] or ptr_bug! end - alias increment next - def before(len) @rule.ptrs[@index - len] or ptr_bug! end From 9a057ab837e375cac80483f5d29e4c5071513c14 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 05:47:07 +0200 Subject: [PATCH 111/619] Remove unused Sym#self_null? and method which initialized it Maybe this was used before, but was later just forgotten? Right now, there is absolutely nothing in the code which relies on this property. --- lib/racc/grammar.rb | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 89f790d4..cafe0af2 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -361,7 +361,6 @@ def init compute_hash compute_heads determine_terminals - compute_nullable_0 @symboltable.fix compute_locate @symboltable.each_nonterminal {|t| compute_expand t } @@ -412,17 +411,6 @@ def determine_terminals end end - # Sym#self_null? - def compute_nullable_0 - @symboltable.each do |s| - if s.terminal? - s.snull = false - else - s.snull = s.heads.any? {|loc| loc.reduce? } - end - end - end - # Sym#locate def compute_locate @rules.each do |rule| @@ -925,7 +913,6 @@ def initialize(value, dummyp) @heads = [] # RHS of rules which can reduce to this Sym @locate = [] # all rules which have this Sym on their RHS - @snull = nil @null = nil @expand = nil @useless = nil @@ -1013,12 +1000,6 @@ def rule attr_reader :heads attr_reader :locate - def self_null? - @snull - end - - once_writer :snull - def nullable? @null end From 328d8051211a1c5ad8f07476a937dd479bcf2e33 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 07:39:31 +0200 Subject: [PATCH 112/619] Use Set for 'expand' rather than Hash Indexed lookup is never done on the 'expand', so a Set is more appropriate than a Hash. --- lib/racc/grammar.rb | 7 ++++--- lib/racc/state.rb | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index cafe0af2..5ba44670 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -9,6 +9,7 @@ require 'racc/logfilegenerator' require 'racc/exception' require 'forwardable' +require 'set' module Racc @@ -429,17 +430,17 @@ def compute_locate # Sym#expand def compute_expand(t) puts "expand> #{t.to_s}" if @debug_symbol - t.expand = _compute_expand(t, {}, []) + t.expand = _compute_expand(t, Set.new, []) puts "expand< #{t.to_s}: #{t.expand.to_s}" if @debug_symbol end def _compute_expand(t, set, lock) if tmp = t.expand - return set.update(tmp) + return set.merge(tmp) end tok = nil - t.heads.each { |ptr| set[ptr.ident] = ptr } + t.heads.each { |ptr| set.add(ptr) } t.heads.each do |ptr| tok = ptr.dereference if tok and tok.nonterminal? diff --git a/lib/racc/state.rb b/lib/racc/state.rb index b7c79eee..6ade0907 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -8,6 +8,7 @@ require 'racc/statetransitiontable' require 'racc/exception' require 'forwardable' +require 'set' module Racc @@ -639,14 +640,14 @@ def ==(oth) alias eql? == def make_closure(core) - set = {} + set = Set.new core.each do |ptr| - set[ptr.ident] = ptr + set.add(ptr) if t = ptr.dereference and t.nonterminal? - t.expand.values.each { |i| set[i.ident] = i } + t.expand.each { |i| set.add(i) } end end - set.sort_by { |k, v| k }.map { |k, v| v } + set.sort_by(&:ident) end def check_la(la_rules) From d3f28a36e8f39334c4ef93dfdb18e76c7508ebfd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 07:41:41 +0200 Subject: [PATCH 113/619] LocationPointer#eql? was buggy all along, and no-one noticed This method has probably never, ever been executed before. --- lib/racc/grammar.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 5ba44670..62da3314 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -742,7 +742,7 @@ def to_s alias inspect to_s def eql?(ot) - @hash == ot.hash + hash == ot.hash end alias == eql? From 1268decfa68a7f4d5c274de3a48baea21cb49706 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 07:46:50 +0200 Subject: [PATCH 114/619] Set is also more appropriate than Hash in States#generate_states Also, there is no need to convert to an array and take a "fingerprint" before checking whether a set of LocationPointers is in the cache. Just use the Set itself as its own cache key. This means States#fingerprint is also unneeded. --- lib/racc/state.rb | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 6ade0907..6f51b3f4 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -106,7 +106,7 @@ def nfa def compute_nfa @grammar.init # add state 0 - core_to_state [ @grammar[0].ptrs[0] ] + core_to_state Set[@grammar[0].ptrs[0]] # generate LALR states @gotos = [] @states.each do |state| @@ -118,16 +118,16 @@ def compute_nfa def generate_states(state) puts "dstate: #{state}" if @d_state - table = Hash.new { |h,k| h[k] = {} } + table = Hash.new { |h,k| h[k] = Set.new } state.closure.each do |ptr| if sym = ptr.dereference - table[sym][ptr.next.ident] = ptr.next + table[sym].add(ptr.next) end end table.each do |sym, core| puts "dstate: sym=#{sym} ncore=#{core}" if @d_state - dest = core_to_state(core.values) + dest = core_to_state(core) state.goto_table[sym] = dest id = sym.nonterminal?() ? @gotos.size : nil g = Goto.new(id, sym, state, dest) @@ -145,20 +145,17 @@ def generate_states(state) end def core_to_state(core) - # # convert CORE to a State object. # If matching state does not exist, create it and add to the table. - # - k = fingerprint(core) - unless dest = @statecache[k] + unless dest = @statecache[core] # not registered yet dest = State.new(@states.size, core) @states.push dest - @statecache[k] = dest + @statecache[core] = dest - puts "core_to_state: create state ID #{dest.ident}" if @d_state + puts "core_to_state: create state ID #{dest.ident}" if @d_state else if @d_state puts "core_to_state: dest is cached ID #{dest.ident}" @@ -169,13 +166,7 @@ def core_to_state(core) dest end - def fingerprint(arr) - arr.map {|i| i.ident }.pack('L*') - end - - # # DFA (Deterministic Finite Automaton) Generation - # public From 3343779b6296ed51ce59564d6249aff31b4cc55b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 08:34:33 +0200 Subject: [PATCH 115/619] Removed now-unneeded Sym#ident method --- lib/racc/grammar.rb | 6 +++--- lib/racc/state.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 62da3314..d5970f47 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -722,7 +722,6 @@ def initialize(rule, i, sym) @index = i @symbol = sym # Sym which immediately follows this position in RHS # or nil if it points to the end of RHS - @ident = @rule.hash + i end attr_reader :rule @@ -731,8 +730,9 @@ def initialize(rule, i, sym) alias dereference symbol - attr_reader :ident - alias hash ident + def hash + @rule.hash + @index + end def to_s sprintf('(%d,%d %s)', diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 6f51b3f4..4383d5e6 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -638,7 +638,7 @@ def make_closure(core) t.expand.each { |i| set.add(i) } end end - set.sort_by(&:ident) + set.sort_by(&:hash) end def check_la(la_rules) From c5537a3ab82816eb4fac3c464e3c22fea63aa205 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 6 Nov 2015 08:47:00 +0200 Subject: [PATCH 116/619] Add RuboCop rake task (for checking code style) --- .rubocop.yml | 12 ++++++++++++ Gemfile | 1 + Rakefile | 7 +++++++ 3 files changed, 20 insertions(+) create mode 100644 .rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..d7d2d50d --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,12 @@ +AllCops: + Exclude: + - Gemfile + +Lint/AssignmentInCondition: + Enabled: false + +Style/Semicolon: + Enabled: false + +Style/TrivialAccessors: + AllowPredicates: true \ No newline at end of file diff --git a/Gemfile b/Gemfile index c92202b2..2efc0f29 100644 --- a/Gemfile +++ b/Gemfile @@ -15,5 +15,6 @@ gem "hoe-doofus", "~>1.0", :group => [:development, :test] gem "hoe-git", "~>1.6", :group => [:development, :test] gem "hoe-gemspec", "~>1.0", :group => [:development, :test] gem "hoe-bundler", "~>1.2", :group => [:development, :test] +gem "rubocop", "~>0.34", :group => [:development, :test] # vim: syntax=ruby diff --git a/Rakefile b/Rakefile index f6dcb99e..80a34a04 100644 --- a/Rakefile +++ b/Rakefile @@ -34,6 +34,8 @@ HOE = Hoe.spec 'racc' do dependency 'hoe-gemspec', '~> 1.0', :developer dependency 'hoe-bundler', '~> 1.2', :developer + dependency 'rubocop', '~> 0.34', :developer + if java? self.spec_extras[:platform] = 'java' else @@ -111,4 +113,9 @@ end task :test => :compile +require 'rubocop/rake_task' +RuboCop::RakeTask.new(:rubocop) do |task| + task.options = ['-a', '-D'] +end + Hoe.add_include_dirs('.:lib/racc') From 36a7d5f7c62c1ac74b3a47a4a76d9528d9d726c8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 07:55:57 +0200 Subject: [PATCH 117/619] In grammar file scanner, use symbols to remember which kind of block we are in --- lib/racc/grammarfileparser.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 188c69f8..810b4111 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -359,7 +359,7 @@ def next_line @line = nil if @in_block @lineno -= 1 - scan_error! sprintf('unterminated %s', @in_block) + scan_error!(sprintf('unterminated %s', @in_block)) end false else @@ -406,7 +406,7 @@ def atom_symbol(token) end def skip_comment - @in_block = 'comment' + @in_block = :comment until m = /\*\//.match(@line) next_line end @@ -420,7 +420,7 @@ def scan_action buf = '' nest = 1 pre = nil - @in_block = 'action' + @in_block = :action begin pre = nil if s = reads(/\A\s+/) From 7fb6724394b0db667cb11538394af2f445edfd97 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 08:13:45 +0200 Subject: [PATCH 118/619] Formatting tweaks --- lib/racc/grammarfileparser.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 810b4111..dc259b50 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -178,9 +178,11 @@ def parse(src, filename = '-', lineno = 1) @result = Result.new(@grammar, @filename) @embedded_action_seq = 0 + yyparse @scanner, :yylex parse_user_code + @result.grammar.init @result end @@ -241,9 +243,7 @@ def embedded_action(act) sym end - # # User Code Block - # def parse_user_code line = @scanner.lineno From 51ff7ff66fbc2fdb2e12ed759643f8e27d915dc7 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 11:16:02 +0200 Subject: [PATCH 119/619] Cleaning up grammar for Racc grammar files a little --- lib/racc/grammar.rb | 9 ++- lib/racc/grammarfileparser.rb | 140 +++++++++++++++------------------- 2 files changed, 70 insertions(+), 79 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index d5970f47..6d22c1b6 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -29,7 +29,7 @@ def initialize(debug_flags = DebugFlags.new) attr_reader :start attr_reader :symboltable - attr_accessor :n_expected_srconflicts + attr_reader :n_expected_srconflicts def [](x) @rules[x] @@ -91,6 +91,13 @@ def n_useless_rules @n_useless_rules ||= @rules.count(&:useless?) end + def n_expected_srconflicts=(value) + if @n_expected_srconflicts + raise CompileError, "'expect' seen twice" + end + @n_expected_srconflicts = value + end + def nfa (@states ||= States.new(self)).nfa end diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index dc259b50..2c024651 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -13,43 +13,42 @@ module Racc - grammar = Grammar.define { + grammar = Grammar.define do g = self g.class = seq(:CLASS, :cname, many(:param), :RULE, :rules, option(:END)) - g.cname = seq(:rubyconst) {|name| + g.cname = seq(:rubyconst) { |name| @result.params.classname = name - }\ - | seq(:rubyconst, "<", :rubyconst) {|c, _, s| + } \ + | seq(:rubyconst, "<", :rubyconst) { |c, _, s| @result.params.classname = c @result.params.superclass = s } - g.rubyconst = separated_by1(:colon2, :SYMBOL) {|syms| - syms.map {|s| s.to_s }.join('::') + g.rubyconst = separated_by1(:colon2, :SYMBOL) { |syms| + syms.map(&:to_s).join('::') } g.colon2 = seq(':', ':') - g.param = seq(:CONV, many1(:convdef), :END) {|*| + g.param = seq(:CONV, many1(:convdef), :END) { |*| #@grammar.end_convert_block # FIXME - }\ - | seq(:PRECHIGH, many1(:precdef), :PRECLOW) {|*| - @grammar.end_precedence_declaration true - }\ - | seq(:PRECLOW, many1(:precdef), :PRECHIGH) {|*| - @grammar.end_precedence_declaration false - }\ - | seq(:START, :symbol) {|_, sym| + } \ + | seq(:PRECHIGH, many1(:precdef), :PRECLOW) { |*| + @grammar.end_precedence_declaration(true) + } \ + | seq(:PRECLOW, many1(:precdef), :PRECHIGH) { |*| + @grammar.end_precedence_declaration(false) + } \ + | seq(:START, :symbol) { |_, sym| @grammar.start_symbol = sym - }\ - | seq(:TOKEN, :symbols) {|_, syms| - syms.each do |s| - s.should_terminal - end - }\ - | seq(:OPTION, :options) {|_, syms| + } \ + | seq(:TOKEN, :symbols) { |_, syms| + syms.each { |s| s.should_terminal } + } \ + | seq(:OPTION, :options) { |_, syms| + # TODO: pull setting of options into a separate methods syms.each do |opt| case opt when 'result_var' @@ -64,76 +63,56 @@ module Racc raise CompileError, "unknown option: #{opt}" end end - }\ - | seq(:EXPECT, :DIGIT) {|_, num| - if @grammar.n_expected_srconflicts - raise CompileError, "`expect' seen twice" - end + } \ + | seq(:EXPECT, :DIGIT) { |_, num| @grammar.n_expected_srconflicts = num } - g.convdef = seq(:symbol, :STRING) {|sym, code| - sym.serialized = code - } + g.convdef = seq(:symbol, :STRING) { |sym, code| sym.serialized = code } - g.precdef = seq(:LEFT, :symbols) {|_, syms| + g.precdef = seq(:LEFT, :symbols) { |_, syms| @grammar.declare_precedence :Left, syms - }\ - | seq(:RIGHT, :symbols) {|_, syms| + } \ + | seq(:RIGHT, :symbols) { |_, syms| @grammar.declare_precedence :Right, syms - }\ - | seq(:NONASSOC, :symbols) {|_, syms| + } \ + | seq(:NONASSOC, :symbols) { |_, syms| @grammar.declare_precedence :Nonassoc, syms } - g.symbols = seq(:symbol) {|sym| - [sym] - }\ - | seq(:symbols, :symbol) {|list, sym| - list.push sym - list - }\ + g.symbols = seq(:symbol) { |sym| [sym] } \ + | seq(:symbols, :symbol) { |list, sym| list << sym } \ | seq(:symbols, "|") - g.symbol = seq(:SYMBOL) {|sym| @grammar.intern(sym) }\ - | seq(:STRING) {|str| @grammar.intern(str) } + g.symbol = seq(:SYMBOL) { |sym| @grammar.intern(sym) } \ + | seq(:STRING) { |str| @grammar.intern(str) } - g.options = many(:SYMBOL) {|syms| syms.map {|s| s.to_s } } + g.options = many(:SYMBOL) { |syms| syms.map(&:to_s) } - g.rules = option(:rules_core) {|list| - add_rule_block list unless list.empty? - nil - } + g.rules = option(:rules_core) { |list| add_rule_block(list) } - g.rules_core = seq(:symbol) {|sym| - [sym] - }\ - | seq(:rules_core, :rule_item) {|list, i| - list.push i - list - }\ - | seq(:rules_core, ';') {|list, *| - add_rule_block list unless list.empty? + # a set of grammar rules with the same LHS, like: + # nonterminal: token1 token2 | token3 token4; + # the terminating ; is optional + g.rules_core = seq(:symbol) { |sym| [sym] } \ + | seq(:rules_core, :rule_item) { |list, i| list << i } \ + | seq(:rules_core, ';') { |list, _| + add_rule_block(list) list.clear - list - }\ - | seq(:rules_core, ':') {|list, *| + } \ + | seq(:rules_core, ':') { |list, _| + # terminating ; was missing, so the previous token was + # actually a new LHS next_target = list.pop - add_rule_block list unless list.empty? + add_rule_block(list) [next_target] } - g.rule_item = seq(:symbol)\ - | seq("|") {|*| - OrMark.new(@scanner.lineno) - }\ - | seq("=", :symbol) {|_, sym| - Prec.new(sym, @scanner.lineno) - }\ - | seq(:ACTION) {|src| - UserAction.source_text(src) - } - } + g.rule_item = seq(:symbol) \ + | seq("|") { |_| OrMark.new(@scanner.lineno) } \ + | seq("=", :symbol) { |_, sym| Prec.new(sym, @scanner.lineno) } \ + | seq(:ACTION) { |src| UserAction.source_text(src) } + end GrammarFileParser = grammar.parser_class @@ -202,27 +181,32 @@ def location end def add_rule_block(list) + return if list.empty? + sprec = nil target = list.shift + case target when OrMark, UserAction, Prec - raise CompileError, "#{target.lineno}: unexpected symbol #{target}" + fail(CompileError, "#{target.lineno}: unexpected symbol #{target.name}") end + curr = [] list.each do |i| case i when OrMark - add_rule target, curr, sprec + add_rule(target, curr, sprec) curr = [] sprec = nil when Prec - raise CompileError, "'=' used twice in one rule" if sprec + fail(CompileError, "'=' used twice in one rule") if sprec sprec = i.symbol else - curr.push i + curr.push(i) end end - add_rule target, curr, sprec + + add_rule(target, curr, sprec) end def add_rule(target, list, sprec) From a410c6665c8047e944c315595c65aa703279f6f8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 13:42:13 +0200 Subject: [PATCH 120/619] Rewrite GrammarFileParser#add_rule_block to enhance readability --- lib/racc/grammarfileparser.rb | 43 ++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 2c024651..0c1e1c45 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -182,34 +182,41 @@ def location def add_rule_block(list) return if list.empty? - - sprec = nil target = list.shift - case target - when OrMark, UserAction, Prec + if target.is_a?(OrMark) || target.is_a?(UserAction) || target.is_a?(Prec) fail(CompileError, "#{target.lineno}: unexpected symbol #{target.name}") end - curr = [] - list.each do |i| - case i - when OrMark - add_rule(target, curr, sprec) - curr = [] - sprec = nil - when Prec - fail(CompileError, "'=' used twice in one rule") if sprec - sprec = i.symbol + split_array(list) { |obj| obj.is_a?(OrMark) }.each do |rule_items| + sprec, rule_items = rule_items.partition { |obj| obj.is_a?(Prec) } + if sprec.empty? + add_rule(target, rule_items) + elsif sprec.one? + add_rule(target, rule_items, sprec.first.symbol) else - curr.push(i) + fail(CompileError, "'=' used twice in one rule") end end + end - add_rule(target, curr, sprec) + def split_array(array) + chunk, index = [], 0 + results = [chunk] + while index < array.size + obj = array[index] + if yield obj + chunk = [] + results << chunk + else + chunk << obj + end + index += 1 + end + results end - def add_rule(target, list, sprec) + def add_rule(target, list, prec = nil) if list.last.kind_of?(UserAction) act = list.pop else @@ -217,7 +224,7 @@ def add_rule(target, list, sprec) end list.map! {|s| s.kind_of?(UserAction) ? embedded_action(s) : s } rule = Rule.new(target, list, act) - rule.specified_prec = sprec + rule.specified_prec = prec @grammar.add rule end From 3f2c44a5003929a9e25391a726bb252f87a1b55c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 15:06:15 +0200 Subject: [PATCH 121/619] Greatly simplify Grammar#compute_useless It's not necessary to compute Rule#useless? here. Actually, which rules are "useless" is determined later, when building the action table. (It's all the rules which will never be used for a reduction, because in every instance where they *could* be used, there is another rule which has higher precedence.) Useless Syms are those which can never be part of a valid parse tree, because there is no sequence of rules which lead from the start symbol to that symbol. We can compute these more simply than what the legacy code did. --- lib/racc/grammar.rb | 49 +++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 6d22c1b6..deb6e57d 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -499,47 +499,30 @@ def check_symbols_nullable(symbols) end end - # Sym#useless?, Rule#useless? - # FIXME: what means "useless"? + # Sym#useless? + # A 'useless' Sym is a nonterminal which can never be part of a valid parse + # tree, because there is no sequence of rules by which that nonterminal + # could eventually reduce down to the 'start' node def compute_useless - @symboltable.each_terminal {|sym| sym.useless = false } - @symboltable.each_nonterminal {|sym| sym.useless = true } - @rules.each {|rule| rule.useless = true } - r = @rules.dup - s = @symboltable.nonterminals - begin - rs = r.size - ss = s.size - check_rules_useless r - check_symbols_useless s - end until r.size == rs and s.size == ss - end + @symboltable.each_terminal { |sym| sym.useless = false } + @symboltable.each_nonterminal { |sym| sym.useless = true } - def check_rules_useless(rules) - rules.delete_if do |rule| - rule.useless = false + @symboltable.error.useless = false + @symboltable.dummy.useless = false + @symboltable.anchor.useless = false + @start.useless = false + worklist = @start.heads.dup # all RHS of rules which reduce to 'start' NT + + until worklist.empty? + rule = worklist.shift.rule rule.symbols.each do |sym| if sym.useless? - rule.useless = true - break - end - end - not rule.useless? - end - end - - def check_symbols_useless(s) - s.delete_if do |t| - t.heads.each do |ptr| - unless ptr.rule.useless? - t.useless = false - break + sym.useless = false + worklist.concat(sym.heads) end end - not t.useless? end end - end # class Grammar From 4be32a4077f74f30420d6d68357aea8df984df73 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 15:56:43 +0200 Subject: [PATCH 122/619] Simplify Grammar#compute_nullable Rule#nullable is not actually needed -- it was only used for computing Sym#nullable, and we can do that in an easier way. --- lib/racc/grammar.rb | 57 +++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index deb6e57d..76a1a4a5 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -460,42 +460,26 @@ def _compute_expand(t, set, lock) set end - # Sym#nullable?, Rule#nullable? + # Sym#nullable? + # Can an empty sequence of tokens reduce to this nonterminal? + # (Can it be produced out of "nothing"?) def compute_nullable - @rules.each {|r| r.null = false } - @symboltable.each {|t| t.null = false } - r = @rules.dup - s = @symboltable.nonterminals - begin - rs = r.size - ss = s.size - check_rules_nullable r - check_symbols_nullable s - end until rs == r.size and ss == s.size - end - - def check_rules_nullable(rules) - rules.delete_if do |rule| - rule.null = true - rule.symbols.each do |t| - unless t.nullable? - rule.null = false - break - end + @symboltable.each { |t| t.null = false } + + worklist = [] + @symboltable.nonterminals.each do |sym| + if sym.heads.any?(&:reduce?) + sym.null = true + worklist.concat(sym.locate) end - rule.nullable? end - end - def check_symbols_nullable(symbols) - symbols.delete_if do |sym| - sym.heads.each do |ptr| - if ptr.rule.nullable? - sym.null = true - break - end + until worklist.empty? + rule = worklist.shift.rule + if !rule.target.nullable? && rule.symbols.all?(&:nullable?) + rule.target.null = true + worklist.concat(rule.target.locate) end - sym.nullable? end end @@ -539,7 +523,6 @@ def initialize(target, syms, act) @ptrs = nil @precedence = nil @specified_prec = nil - @null = nil @useless = nil end @@ -597,11 +580,13 @@ def prec(sym, &block) attr_accessor :specified_prec - def nullable?() @null end - def null=(n) @null = n end + def useless? + @useless + end - def useless?() @useless end - def useless=(u) @useless = u end + def useless=(u) + @useless = u + end def inspect "#" From d434857e635c6c739600f5474133c089f6b28ded Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 16:23:39 +0200 Subject: [PATCH 123/619] Move initialization code for Rule into constructor Why did anyone think of putting it in #hash=??? --- lib/racc/grammar.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 76a1a4a5..78c185f7 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -524,6 +524,13 @@ def initialize(target, syms, act) @precedence = nil @specified_prec = nil @useless = nil + + ptrs = [] + @symbols.each_with_index do |sym, idx| + ptrs.push LocationPointer.new(self, idx, sym) + end + ptrs.push LocationPointer.new(self, @symbols.size, nil) + @ptrs = ptrs end attr_accessor :target @@ -551,12 +558,6 @@ def each_rule(&block) def hash=(n) @hash = n - ptrs = [] - @symbols.each_with_index do |sym, idx| - ptrs.push LocationPointer.new(self, idx, sym) - end - ptrs.push LocationPointer.new(self, @symbols.size, nil) - @ptrs = ptrs end def precedence From c9055c8d70b65438095a3e97ee0fbaea32905db8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 16:51:50 +0200 Subject: [PATCH 124/619] Edit _defmetasyntax, _regist, _wrap for improved readability --- lib/racc/grammar.rb | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 78c185f7..576850bb 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -322,34 +322,43 @@ def _intern(x) private + # the passed block will define a `Rule` (which may be chained with + # 'alternative' `Rule`s) + # make all of those rules reduce to a (newly generated) nonterminal, + # executing `action` when they do so, + # and return the newly generated nonterminal def _defmetasyntax(type, id, action, &block) if action - idbase = "#{type}@#{id}-#{@seqs[type] += 1}" - target = _wrap(idbase, "#{idbase}-core", action) - _regist("#{idbase}-core", &block) + idbase = :"#{type}@#{id}-#{@seqs[type] += 1}" + _regist(:"#{idbase}-core", &block) + _wrap(idbase, :"#{idbase}-core", action) else - target = _regist("#{type}@#{id}", &block) + _regist(:"#{type}@#{id}", &block) end - @grammar.intern(target) end - def _regist(target_name) - target = target_name.to_sym - unless _added?(@grammar.intern(target)) + def _regist(target) + sym = @grammar.intern(target) + unless _added?(sym) yield(target).each_rule do |rule| - rule.target = @grammar.intern(target) - _delayed_add rule + rule.target = sym + _delayed_add(rule) end end - target - end - - def _wrap(target_name, sym, block) - target = target_name.to_sym - _delayed_add Rule.new(@grammar.intern(target), - [@grammar.intern(sym.to_sym)], + sym + end + + # create a rule which reduces wrapped -> wrapper and executes an + # action at the same time + # (this is a way to make sure an action is executed everytime a + # reduction is done using a particular generated rule) + def _wrap(wrapper, wrapped, block) + wrapped = @grammar.intern(wrapped) + wrapper = @grammar.intern(wrapper) + _delayed_add Rule.new(wrapper, + [wrapped], UserAction.proc(block)) - target + wrapper end end From 55ec8e9c63938269f0de8a4e7af695ee052d5a3e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 12 Nov 2015 17:05:08 +0200 Subject: [PATCH 125/619] More comments on grammar definition DSL --- lib/racc/grammar.rb | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 576850bb..b4859c80 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -275,14 +275,14 @@ def null(&block) # Create a `Rule` which can either be null (like an empty RHS in a BNF grammar), # in which case the action will return `default`, or which can match a single - # `sym` token. + # `sym`. def option(sym, default = nil, &block) _defmetasyntax("option", _intern(sym), block) {|target| seq() { default } | seq(sym) } end - # Create a `Rule` which matches 0 or more `sym` tokens in a row. + # Create a `Rule` which matches 0 or more instance of `sym` in a row. def many(sym, &block) _defmetasyntax("many", _intern(sym), block) {|target| seq() { [] }\ @@ -290,7 +290,7 @@ def many(sym, &block) } end - # Create a `Rule` which matches 1 or more `sym` tokens in a row. + # Create a `Rule` which matches 1 or more instances of `sym` in a row. def many1(sym, &block) _defmetasyntax("many1", _intern(sym), block) {|target| seq(sym) {|x| [x] }\ @@ -298,10 +298,14 @@ def many1(sym, &block) } end + # Create a `Rule` which matches 0 or more instances of `sym`, separated + # by `sep`. def separated_by(sep, sym, &block) option(separated_by1(sep, sym), [], &block) end + # Create a `Rule` which matches 1 or more instances of `sym`, separated + # by `sep`. def separated_by1(sep, sym, &block) _defmetasyntax("separated_by1", _intern(sym), block) {|target| seq(sym) {|x| [x] }\ @@ -324,9 +328,14 @@ def _intern(x) # the passed block will define a `Rule` (which may be chained with # 'alternative' `Rule`s) - # make all of those rules reduce to a (newly generated) nonterminal, + # make all of those rules reduce to a placeholder nonterminal, # executing `action` when they do so, - # and return the newly generated nonterminal + # and return the newly generated placeholder + # + # (when the placeholder is associated with a "real" nonterminal using the + # `self.non_terminal = ...` syntax, we will go through all the generated + # rules and rewrite the placeholder to the "real" nonterminal) + # def _defmetasyntax(type, id, action, &block) if action idbase = :"#{type}@#{id}-#{@seqs[type] += 1}" From 19cc695c445bdeed35939df77a9303d2bd1b7bcd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 05:37:14 +0200 Subject: [PATCH 126/619] Move start.y to ./test/assets --- Manifest.txt | 2 +- test/{ => assets}/start.y | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename test/{ => assets}/start.y (100%) diff --git a/Manifest.txt b/Manifest.txt index 4435b217..33767552 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -99,6 +99,7 @@ test/assets/ruby20.y test/assets/ruby21.y test/assets/ruby22.y test/assets/scan.y +test/assets/start.y test/assets/syntax.y test/assets/unterm.y test/assets/useless.y @@ -131,7 +132,6 @@ test/scandata/normal test/scandata/percent test/scandata/slash test/src.intp -test/start.y test/test_chk_y.rb test/test_grammar_file_parser.rb test/test_racc_command.rb diff --git a/test/start.y b/test/assets/start.y similarity index 100% rename from test/start.y rename to test/assets/start.y From f4174c0a2bb7b5df711dd48f8242d95a2f117020 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 05:39:31 +0200 Subject: [PATCH 127/619] Move src.intp to ./test/assets --- Manifest.txt | 2 +- test/assets/intp.y | 2 +- test/{ => assets}/src.intp | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename test/{ => assets}/src.intp (100%) diff --git a/Manifest.txt b/Manifest.txt index 33767552..936e57af 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -99,6 +99,7 @@ test/assets/ruby20.y test/assets/ruby21.y test/assets/ruby22.y test/assets/scan.y +test/assets/src.intp test/assets/start.y test/assets/syntax.y test/assets/unterm.y @@ -131,7 +132,6 @@ test/scandata/gvar test/scandata/normal test/scandata/percent test/scandata/slash -test/src.intp test/test_chk_y.rb test/test_grammar_file_parser.rb test/test_racc_command.rb diff --git a/test/assets/intp.y b/test/assets/intp.y index 39e42afd..4f7a7d7c 100644 --- a/test/assets/intp.y +++ b/test/assets/intp.y @@ -534,7 +534,7 @@ end # module Intp begin tree = nil - fname = 'src.intp' + fname = 'assets/src.intp' File.open(fname) {|f| tree = Intp::Parser.new.parse(f, fname) } diff --git a/test/src.intp b/test/assets/src.intp similarity index 100% rename from test/src.intp rename to test/assets/src.intp From 6c6fec4ea60f21d3843868004b2bf6c30eea5db9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 05:45:07 +0200 Subject: [PATCH 128/619] Move infini.y to ./test/assets --- Manifest.txt | 2 +- test/{ => assets}/infini.y | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename test/{ => assets}/infini.y (100%) diff --git a/Manifest.txt b/Manifest.txt index 936e57af..5ca83999 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -68,6 +68,7 @@ test/assets/expect.y test/assets/firstline.y test/assets/huia.y test/assets/ichk.y +test/assets/infini.y test/assets/intp.y test/assets/journey.y test/assets/liquor.y @@ -107,7 +108,6 @@ test/assets/useless.y test/assets/yyerr.y test/bench.y test/helper.rb -test/infini.y test/regress/bibtex test/regress/cadenza test/regress/cast diff --git a/test/infini.y b/test/assets/infini.y similarity index 100% rename from test/infini.y rename to test/assets/infini.y From 66fa6734a5957e0018768a42f1023b5d681c7d47 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 07:32:05 +0200 Subject: [PATCH 129/619] Move bench.y to ./test/assets --- Manifest.txt | 2 +- test/{ => assets}/bench.y | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename test/{ => assets}/bench.y (100%) diff --git a/Manifest.txt b/Manifest.txt index 5ca83999..ca0e9e3b 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -54,6 +54,7 @@ sample/yyerr.y setup.rb tasks/doc.rb tasks/email.rb +test/assets/bench.y test/assets/bibtex.y test/assets/cadenza.y test/assets/cast.y @@ -106,7 +107,6 @@ test/assets/syntax.y test/assets/unterm.y test/assets/useless.y test/assets/yyerr.y -test/bench.y test/helper.rb test/regress/bibtex test/regress/cadenza diff --git a/test/bench.y b/test/assets/bench.y similarity index 100% rename from test/bench.y rename to test/assets/bench.y From f818f58ab8c7129a275455d578d7357e8dbfdea7 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 07:41:35 +0200 Subject: [PATCH 130/619] Make Racc debug logs human-readable --- bin/racc | 10 +++++----- test/helper.rb | 17 +++++++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/bin/racc b/bin/racc index 2d0321ac..d4d341e2 100755 --- a/bin/racc +++ b/bin/racc @@ -214,12 +214,12 @@ end def log_conflict(states) logging('w') {|f| - f.puts "ex#{states.grammar.n_expected_srconflicts}" + f.puts "expected s/r conflicts:#{states.grammar.n_expected_srconflicts}" if states.should_report_srconflict? - f.puts "sr#{states.n_srconflicts}" + f.puts "s/r conflicts:#{states.n_srconflicts}" end if states.rrconflict_exist? - f.puts "rr#{states.n_rrconflicts}" + f.puts "r/r conflicts:#{states.n_rrconflicts}" end } end @@ -239,10 +239,10 @@ end def log_useless(grammar) logging('a') {|f| if grammar.useless_nonterminal_exist? - f.puts "un#{grammar.n_useless_nonterminals}" + f.puts "useless nts:#{grammar.n_useless_nonterminals}" end if grammar.useless_rule_exist? - f.puts "ur#{grammar.n_useless_rules}" + f.puts "useless rules:#{grammar.n_useless_rules}" end } end diff --git a/test/helper.rb b/test/helper.rb index bfbe8a05..fc6c1925 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -52,13 +52,18 @@ def assert_debugfile(asset, ok) File.foreach("log/#{file}.y") do |line| line.strip! case line - when /sr/ then assert_equal "sr#{ok[0]}", line - when /rr/ then assert_equal "rr#{ok[1]}", line - when /un/ then assert_equal "un#{ok[2]}", line - when /ur/ then assert_equal "ur#{ok[3]}", line - when /ex/ then assert_equal "ex#{ok[4]}", line + when %r{\As/r conflicts} + assert_equal "s/r conflicts:#{ok[0]}", line + when %r{\Ar/r conflicts} + assert_equal "r/r conflicts:#{ok[1]}", line + when /\Auseless nts/ + assert_equal "useless nts:#{ok[2]}", line + when /\Auseless rules/ + assert_equal "useless rules:#{ok[3]}", line + when %r{\Aexpected s/r conflicts} + assert_equal "expected s/r conflicts:#{ok[4]}", line else - raise TestFailed, 'racc outputs unknown debug report???' + raise "racc output unknown debug report! bad line: #{line}" end end end From 44052d2ad3cf3810e18c92b67e2d1284d58a7ad1 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 16:39:48 +0200 Subject: [PATCH 131/619] Remove unused 2nd argument to StateTransitionTableGenerator#set_table --- lib/racc/statetransitiontable.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index f7c47934..06834de1 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -95,7 +95,6 @@ def gen_action_tables(t, states) t.action_default = yydefact = [] t.action_pointer = yypact = [] e1 = [] - e2 = [] states.each do |state| yydefact.push act2actid(state.defact) if state.action.empty? @@ -108,7 +107,7 @@ def gen_action_tables(t, states) end addent e1, vector, state.ident, yypact end - set_table e1, e2, yytable, yycheck, yypact + set_table e1, yytable, yycheck, yypact end def gen_goto_tables(t, grammar) @@ -117,7 +116,6 @@ def gen_goto_tables(t, grammar) t.goto_pointer = yypgoto = [] t.goto_default = yydefgoto = [] e1 = [] - e2 = [] grammar.each_nonterminal do |tok| tmp = [] @@ -150,7 +148,7 @@ def gen_goto_tables(t, grammar) addent e1, tmp, (tok.ident - grammar.nonterminal_base), yypgoto end - set_table e1, e2, yytable2, yycheck2, yypgoto + set_table e1, yytable2, yycheck2, yypgoto end def addent(all, arr, chkval, ptr) @@ -200,7 +198,7 @@ def mkmapexp(arr) Regexp.compile(map, 'n') end - def set_table(entries, dummy, tbl, chk, ptr) + def set_table(entries, tbl, chk, ptr) upper = 0 map = '-' * 10240 From fccff33a39d57db74796f55d414cf1c6966530ac Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 16:48:31 +0200 Subject: [PATCH 132/619] Partially rewrite StateTransitionTableGenerator#mkmapexp for readability --- lib/racc/statetransitiontable.rb | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 06834de1..ad3a631e 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -168,33 +168,22 @@ def addent(all, arr, chkval, ptr) end def mkmapexp(arr) - i = ii = 0 - as = arr.size map = '' maxdup = RE_DUP_MAX - curr = nil - while i < as - ii = i + 1 - if arr[i] - ii += 1 while ii < as and arr[ii] - curr = '-' - else - ii += 1 while ii < as and not arr[ii] - curr = '.' - end - offset = ii - i - if offset == 1 - map << curr + arr.chunk(&:nil?).each do |is_nil, items| + char = is_nil ? '.' : '-' + if (offset = items.size) == 1 + map << char else while offset > maxdup - map << "#{curr}{#{maxdup}}" + map << "#{char}{#{maxdup}}" offset -= maxdup end - map << "#{curr}{#{offset}}" if offset > 1 + map << "#{char}{#{offset}}" if offset > 0 end - i = ii end + Regexp.compile(map, 'n') end From d52829ff44540aed3902fb865a44768359a4fca4 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 16:59:48 +0200 Subject: [PATCH 133/619] Remove redundant States#each_state method --- lib/racc/state.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 4383d5e6..7768bd68 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -14,7 +14,6 @@ module Racc # A table of LALR states. class States - include Enumerable def initialize(grammar, debug_flags = DebugFlags.new) @@ -47,18 +46,13 @@ def [](i) @states[i] end - def each_state(&block) - @states.each(&block) - end - - alias each each_state - def each_index(&block) @states.each_index(&block) end extend Forwardable + def_delegator "@states", :each def_delegator "@actions", :shift_n def_delegator "@actions", :reduce_n def_delegator "@actions", :nt_base @@ -576,9 +570,7 @@ def check_useless end end end - - end # class StateTable - + end # A LALR state. class State From c1411895a48b71c9268f5f087f3aa19cc8404bab Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 17:04:49 +0200 Subject: [PATCH 134/619] Remove redundant @nterm from Sym --- lib/racc/grammar.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index b4859c80..9d264f4d 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -882,7 +882,6 @@ def initialize(value, dummyp) @dummyp = dummyp @term = nil - @nterm = nil @should_terminal = false @precedence = nil case value @@ -941,13 +940,12 @@ def terminal? end def nonterminal? - @nterm + !@term end def term=(t) raise 'racc: fatal: term= called twice' unless @term.nil? @term = t - @nterm = !t end def should_terminal From 9296f347adbc0ce14c10c6c60b8ebe97ba9ab229 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 17:32:04 +0200 Subject: [PATCH 135/619] Remove unneeded LocationPointer#dereference alias --- lib/racc/grammar.rb | 6 ++---- lib/racc/state.rb | 7 ++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 9d264f4d..33d5fde8 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -443,7 +443,7 @@ def compute_locate t = nil rule.ptrs.each do |ptr| unless ptr.reduce? - tok = ptr.dereference + tok = ptr.symbol tok.locate.push ptr t = tok if tok.terminal? end @@ -467,7 +467,7 @@ def _compute_expand(t, set, lock) tok = nil t.heads.each { |ptr| set.add(ptr) } t.heads.each do |ptr| - tok = ptr.dereference + tok = ptr.symbol if tok and tok.nonterminal? unless lock[tok.ident] lock[tok.ident] = true @@ -722,8 +722,6 @@ def initialize(rule, i, sym) attr_reader :index attr_reader :symbol - alias dereference symbol - def hash @rule.hash + @index end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 7768bd68..810d8227 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -114,10 +114,11 @@ def generate_states(state) table = Hash.new { |h,k| h[k] = Set.new } state.closure.each do |ptr| - if sym = ptr.dereference + if sym = ptr.symbol table[sym].add(ptr.next) end end + table.each do |sym, core| puts "dstate: sym=#{sym} ncore=#{core}" if @d_state @@ -626,7 +627,7 @@ def make_closure(core) set = Set.new core.each do |ptr| set.add(ptr) - if t = ptr.dereference and t.nonterminal? + if t = ptr.symbol and t.nonterminal? t.expand.each { |i| set.add(i) } end end @@ -638,7 +639,7 @@ def check_la(la_rules) s = [] r = [] @closure.each do |ptr| - if t = ptr.dereference + if t = ptr.symbol if t.terminal? s[t.ident] = t if t.ident == 1 # $error From 78184350325dd4f271a40422eb415a0f0fa1e054 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 17:35:21 +0200 Subject: [PATCH 136/619] Remove redundant @symbol in LocationPointer It can be derived directly from the other 2 instance variables. --- lib/racc/grammar.rb | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 33d5fde8..9b575d0c 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -543,12 +543,9 @@ def initialize(target, syms, act) @specified_prec = nil @useless = nil - ptrs = [] - @symbols.each_with_index do |sym, idx| - ptrs.push LocationPointer.new(self, idx, sym) + @ptrs = (0..@symbols.size).map do |idx| + LocationPointer.new(self, idx) end - ptrs.push LocationPointer.new(self, @symbols.size, nil) - @ptrs = ptrs end attr_accessor :target @@ -706,29 +703,31 @@ def to_s end end - # A set of rules and positions in their RHS. + # A combination of a rule and a position in its RHS. # Note that the number of pointers is more than the rule's RHS array, # because pointer points to the right edge of the final symbol when reducing. # class LocationPointer - def initialize(rule, i, sym) - @rule = rule - @index = i - @symbol = sym # Sym which immediately follows this position in RHS - # or nil if it points to the end of RHS + def initialize(rule, i) + @rule = rule + @index = i end attr_reader :rule attr_reader :index - attr_reader :symbol + + # Sym which immediately follows this position in RHS + # or nil if it points to the end of RHS + def symbol + @rule.symbols[@index] + end def hash @rule.hash + @index end def to_s - sprintf('(%d,%d %s)', - @rule.ident, @index, (reduce? ? '#' : @symbol.to_s)) + sprintf('(%d,%d %s)', @rule.ident, @index, (reduce? ? '#' : symbol.to_s)) end alias inspect to_s @@ -752,7 +751,7 @@ def before(len) end def reduce? - @symbol.nil? + symbol.nil? end private From 2030165242a3c7e548ccbf980efcb2ec58985814 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 18:44:43 +0200 Subject: [PATCH 137/619] Make SymbolTable#fix_ident more concise --- lib/racc/grammar.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 9b575d0c..54afeee2 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -844,9 +844,7 @@ def fix private def fix_ident - @symbols.each_with_index do |t, i| - t.ident = i - end + @symbols.each_with_index(&:ident=) end def check_terminals From b2dee4a6d82c67650c1f3b2d804c67d0273affea Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 18:57:14 +0200 Subject: [PATCH 138/619] These # class comments bug me --- lib/racc/grammar.rb | 22 ++++++---------------- lib/racc/grammarfileparser.rb | 4 +--- lib/racc/logfilegenerator.rb | 4 +--- lib/racc/state.rb | 5 +---- lib/racc/statetransitiontable.rb | 4 +--- 5 files changed, 10 insertions(+), 29 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 54afeee2..7d152de5 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -525,11 +525,9 @@ def compute_useless end end end - end # class Grammar - + end class Rule - def initialize(target, syms, act) @target = target # LHS of rule (may be `nil` if not yet known) @symbols = syms # RHS of rule @@ -644,9 +642,7 @@ def replace(src, dest) @target = dest @symbols = @symbols.map {|s| s == src ? dest : s } end - - end # class Rule - + end class UserAction @@ -759,9 +755,7 @@ def reduce? def ptr_bug! raise "racc: fatal: pointer not exist: self: #{to_s}" end - - end # class LocationPointer - + end class SymbolTable @@ -864,9 +858,7 @@ def check_terminals raise CompileError, "symbol #{n} declared as terminal but is not terminal" end end - - end # class SymbolTable - + end # Stands terminal and nonterminal symbols. class Sym @@ -1006,7 +998,5 @@ def useless? def useless=(f) @useless = f end - - end # class Sym - -end # module Racc + end +end diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 0c1e1c45..9e223cd6 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -534,7 +534,5 @@ def get_quoted_re(left) def scan_error!(msg) raise CompileError, "#{lineno()}: #{msg}" end - end - -end # module Racc +end diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 41e9a4d5..6b89ebb0 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -201,7 +201,5 @@ def output_token(out) def symbol_locations(locs) locs.map {|loc| loc.rule.ident }.reject {|n| n == 0 }.uniq end - end - -end # module Racc +end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 810d8227..1acb4741 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -710,11 +710,8 @@ def n_srconflicts def n_rrconflicts @rrconf.size end + end - end # class State - - - # # Represents a transition on the grammar. # "Real goto" means a transition by nonterminal, # but this class treats also terminal's. diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index ad3a631e..c945edb7 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -280,7 +280,5 @@ def _reduce_#{rule.ident}(vals, vstack) end end end - end - -end # module Racc +end From df4e05361dad93fafcf82fb564446cb28b7953f7 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:01:33 +0200 Subject: [PATCH 139/619] Remove setup.rb Nowadays everybody (as in, EVERYBODY) uses Rubygems. This install script was useful in the past, but is now an anachronism. --- Manifest.txt | 1 - README.rdoc | 25 - misc/dist.sh | 2 - setup.rb | 1587 -------------------------------------------------- 4 files changed, 1615 deletions(-) delete mode 100644 setup.rb diff --git a/Manifest.txt b/Manifest.txt index ca0e9e3b..1a13cf53 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -51,7 +51,6 @@ sample/lalr.y sample/lists.y sample/syntax.y sample/yyerr.y -setup.rb tasks/doc.rb tasks/email.rb test/assets/bench.y diff --git a/README.rdoc b/README.rdoc index 8fa522d5..756b06ef 100644 --- a/README.rdoc +++ b/README.rdoc @@ -24,31 +24,6 @@ $ gem install racc - setup.rb install: - - Type this in the top directory of the extracted archive: - - $ ruby setup.rb config - $ ruby setup.rb setup - ($ su) - # ruby setup.rb install - - You can install Racc into your favorite directory by giving - options to setup.rb. e.g. - - $ ruby setup.rb config --prefix=/usr - - For details, try "ruby setup.rb --help". - - - If you don't have C Compiler - ---------------------------- - - You can install Racc without C compilers. Type following - command in config phase. - - $ ruby setup.rb config --without-ext - == Testing Racc diff --git a/misc/dist.sh b/misc/dist.sh index 6df8d1ba..d98b30d2 100644 --- a/misc/dist.sh +++ b/misc/dist.sh @@ -13,7 +13,6 @@ cd .. mkdir -p raccrt-$version/lib/racc mv racc-$version/lib/racc/parser.rb raccrt-$version/lib/racc mv racc-$version/ext raccrt-$version -cp racc-$version/setup.rb raccrt-$version cp racc-$version/README.* raccrt-$version cp racc-$version/COPYING raccrt-$version tar czf $ardir/racc/racc-$version.tar.gz racc-$version @@ -21,7 +20,6 @@ tar czf $ardir/raccrt/raccrt-$version.tar.gz raccrt-$version # -all mkdir -p racc-$version-all/packages -cp racc-$version/setup.rb racc-$version-all cp racc-$version/README.* racc-$version-all mv racc-$version racc-$version-all/packages/racc mv raccrt-$version racc-$version-all/packages/raccrt diff --git a/setup.rb b/setup.rb deleted file mode 100644 index 66271348..00000000 --- a/setup.rb +++ /dev/null @@ -1,1587 +0,0 @@ -# -# setup.rb -# -# Copyright (c) 2000-2006 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# - -unless Enumerable.method_defined?(:map) # Ruby 1.4.6 - module Enumerable - alias map collect - end -end - -unless File.respond_to?(:read) # Ruby 1.6 - def File.read(fname) - open(fname) {|f| - return f.read - } - end -end - -unless Errno.const_defined?(:ENOTEMPTY) # Windows? - module Errno - class ENOTEMPTY - # We do not raise this exception, implementation is not needed. - end - end -end - -def File.binread(fname) - open(fname, 'rb') {|f| - return f.read - } -end - -# for corrupted Windows' stat(2) -def File.dir?(path) - File.directory?((path[-1,1] == '/') ? path : path + '/') -end - - -class ConfigTable - - include Enumerable - - def initialize(rbconfig) - @rbconfig = rbconfig - @items = [] - @table = {} - # options - @install_prefix = nil - @config_opt = nil - @verbose = true - @no_harm = false - end - - attr_accessor :install_prefix - attr_accessor :config_opt - - attr_writer :verbose - - def verbose? - @verbose - end - - attr_writer :no_harm - - def no_harm? - @no_harm - end - - def [](key) - lookup(key).resolve(self) - end - - def []=(key, val) - lookup(key).set val - end - - def names - @items.map {|i| i.name } - end - - def each(&block) - @items.each(&block) - end - - def key?(name) - @table.key?(name) - end - - def lookup(name) - @table[name] or setup_rb_error "no such config item: #{name}" - end - - def add(item) - @items.push item - @table[item.name] = item - end - - def remove(name) - item = lookup(name) - @items.delete_if {|i| i.name == name } - @table.delete_if {|name, i| i.name == name } - item - end - - def load_script(path, inst = nil) - if File.file?(path) - MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path - end - end - - def savefile - '.config' - end - - def load_savefile - begin - File.foreach(savefile()) do |line| - k, v = *line.split(/=/, 2) - self[k] = v.strip - end - rescue Errno::ENOENT - setup_rb_error $!.message + "\n#{File.basename($0)} config first" - end - end - - def save - @items.each {|i| i.value } - File.open(savefile(), 'w') {|f| - @items.each do |i| - f.printf "%s=%s\n", i.name, i.value if i.value? and i.value - end - } - end - - def load_standard_entries - standard_entries(@rbconfig).each do |ent| - add ent - end - end - - def standard_entries(rbconfig) - c = rbconfig - - rubypath = File.join(c['bindir'], c['ruby_install_name'] + c['EXEEXT']) - - major = c['MAJOR'].to_i - minor = c['MINOR'].to_i - teeny = c['TEENY'].to_i - version = "#{major}.#{minor}" - - # ruby ver. >= 1.4.4? - newpath_p = ((major >= 2) or - ((major == 1) and - ((minor >= 5) or - ((minor == 4) and (teeny >= 4))))) - - if c['rubylibdir'] - # V > 1.6.3 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = c['rubylibdir'] - librubyverarch = c['archdir'] - siteruby = c['sitedir'] - siterubyver = c['sitelibdir'] - siterubyverarch = c['sitearchdir'] - elsif newpath_p - # 1.4.4 <= V <= 1.6.3 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = "#{c['prefix']}/lib/ruby/#{version}" - librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" - siteruby = c['sitedir'] - siterubyver = "$siteruby/#{version}" - siterubyverarch = "$siterubyver/#{c['arch']}" - else - # V < 1.4.4 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = "#{c['prefix']}/lib/ruby/#{version}" - librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" - siteruby = "#{c['prefix']}/lib/ruby/#{version}/site_ruby" - siterubyver = siteruby - siterubyverarch = "$siterubyver/#{c['arch']}" - end - parameterize = lambda {|path| - path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix') - } - - if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg } - makeprog = arg.sub(/'/, '').split(/=/, 2)[1] - else - makeprog = 'make' - end - - [ - ExecItem.new('installdirs', 'std/site/home', - 'std: install under libruby; site: install under site_ruby; home: install under $HOME')\ - {|val, table| - case val - when 'std' - table['rbdir'] = '$librubyver' - table['sodir'] = '$librubyverarch' - when 'site' - table['rbdir'] = '$siterubyver' - table['sodir'] = '$siterubyverarch' - when 'home' - setup_rb_error '$HOME was not set' unless ENV['HOME'] - table['prefix'] = ENV['HOME'] - table['rbdir'] = '$libdir/ruby' - table['sodir'] = '$libdir/ruby' - end - }, - PathItem.new('prefix', 'path', c['prefix'], - 'path prefix of target environment'), - PathItem.new('bindir', 'path', parameterize.call(c['bindir']), - 'the directory for commands'), - PathItem.new('libdir', 'path', parameterize.call(c['libdir']), - 'the directory for libraries'), - PathItem.new('datadir', 'path', parameterize.call(c['datadir']), - 'the directory for shared data'), - PathItem.new('mandir', 'path', parameterize.call(c['mandir']), - 'the directory for man pages'), - PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']), - 'the directory for system configuration files'), - PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']), - 'the directory for local state data'), - PathItem.new('libruby', 'path', libruby, - 'the directory for ruby libraries'), - PathItem.new('librubyver', 'path', librubyver, - 'the directory for standard ruby libraries'), - PathItem.new('librubyverarch', 'path', librubyverarch, - 'the directory for standard ruby extensions'), - PathItem.new('siteruby', 'path', siteruby, - 'the directory for version-independent aux ruby libraries'), - PathItem.new('siterubyver', 'path', siterubyver, - 'the directory for aux ruby libraries'), - PathItem.new('siterubyverarch', 'path', siterubyverarch, - 'the directory for aux ruby binaries'), - PathItem.new('rbdir', 'path', '$siterubyver', - 'the directory for ruby scripts'), - PathItem.new('sodir', 'path', '$siterubyverarch', - 'the directory for ruby extentions'), - PathItem.new('rubypath', 'path', rubypath, - 'the path to set to #! line'), - ProgramItem.new('rubyprog', 'name', rubypath, - 'the ruby program using for installation'), - ProgramItem.new('makeprog', 'name', makeprog, - 'the make program to compile ruby extentions'), - SelectItem.new('shebang', 'all/ruby/never', 'ruby', - 'shebang line (#!) editing mode'), - BoolItem.new('without-ext', 'yes/no', 'no', - 'does not compile/install ruby extentions') - ] - end - private :standard_entries - - def load_multipackage_entries - multipackage_entries().each do |ent| - add ent - end - end - - def multipackage_entries - [ - PackageSelectionItem.new('with', 'name,name...', '', 'ALL', - 'package names that you want to install'), - PackageSelectionItem.new('without', 'name,name...', '', 'NONE', - 'package names that you do not want to install') - ] - end - private :multipackage_entries - - ALIASES = { - 'std-ruby' => 'librubyver', - 'stdruby' => 'librubyver', - 'rubylibdir' => 'librubyver', - 'archdir' => 'librubyverarch', - 'site-ruby-common' => 'siteruby', # For backward compatibility - 'site-ruby' => 'siterubyver', # For backward compatibility - 'bin-dir' => 'bindir', - 'bin-dir' => 'bindir', - 'rb-dir' => 'rbdir', - 'so-dir' => 'sodir', - 'data-dir' => 'datadir', - 'ruby-path' => 'rubypath', - 'ruby-prog' => 'rubyprog', - 'ruby' => 'rubyprog', - 'make-prog' => 'makeprog', - 'make' => 'makeprog' - } - - def fixup - ALIASES.each do |ali, name| - @table[ali] = @table[name] - end - end - - def options_re - /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/ - end - - def parse_opt(opt) - m = options_re().match(opt) or setup_rb_error "config: unknown option #{opt}" - m.to_a[1,2] - end - - def dllext - @rbconfig['DLEXT'] - end - - def value_config?(name) - lookup(name).value? - end - - class Item - def initialize(name, template, default, desc) - @name = name.freeze - @template = template - @value = default - @default = default - @description = desc - end - - attr_reader :name - attr_reader :description - - attr_accessor :default - alias help_default default - - def help_opt - "--#{@name}=#{@template}" - end - - def value? - true - end - - def value - @value - end - - def resolve(table) - @value.gsub(%r<\$([^/]+)>) { table[$1] } - end - - def set(val) - @value = check(val) - end - - private - - def check(val) - setup_rb_error "config: --#{name} requires argument" unless val - val - end - end - - class BoolItem < Item - def config_type - 'bool' - end - - def help_opt - "--#{@name}" - end - - private - - def check(val) - return 'yes' unless val - case val - when /\Ay(es)?\z/i, /\At(rue)?\z/i then 'yes' - when /\An(o)?\z/i, /\Af(alse)\z/i then 'no' - else - setup_rb_error "config: --#{@name} accepts only yes/no for argument" - end - end - end - - class PathItem < Item - def config_type - 'path' - end - - private - - def check(path) - setup_rb_error "config: --#{@name} requires argument" unless path - path[0,1] == '$' ? path : File.expand_path(path) - end - end - - class ProgramItem < Item - def config_type - 'program' - end - end - - class SelectItem < Item - def initialize(name, selection, default, desc) - super - @ok = selection.split('/') - end - - def config_type - 'select' - end - - private - - def check(val) - unless @ok.include?(val.strip) - setup_rb_error "config: use --#{@name}=#{@template} (#{val})" - end - val.strip - end - end - - class ExecItem < Item - def initialize(name, selection, desc, &block) - super name, selection, nil, desc - @ok = selection.split('/') - @action = block - end - - def config_type - 'exec' - end - - def value? - false - end - - def resolve(table) - setup_rb_error "$#{name()} wrongly used as option value" - end - - undef set - - def evaluate(val, table) - v = val.strip.downcase - unless @ok.include?(v) - setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})" - end - @action.call v, table - end - end - - class PackageSelectionItem < Item - def initialize(name, template, default, help_default, desc) - super name, template, default, desc - @help_default = help_default - end - - attr_reader :help_default - - def config_type - 'package' - end - - private - - def check(val) - unless File.dir?("packages/#{val}") - setup_rb_error "config: no such package: #{val}" - end - val - end - end - - class MetaConfigEnvironment - def initialize(config, installer) - @config = config - @installer = installer - end - - def config_names - @config.names - end - - def config?(name) - @config.key?(name) - end - - def bool_config?(name) - @config.lookup(name).config_type == 'bool' - end - - def path_config?(name) - @config.lookup(name).config_type == 'path' - end - - def value_config?(name) - @config.lookup(name).config_type != 'exec' - end - - def add_config(item) - @config.add item - end - - def add_bool_config(name, default, desc) - @config.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc) - end - - def add_path_config(name, default, desc) - @config.add PathItem.new(name, 'path', default, desc) - end - - def set_config_default(name, default) - @config.lookup(name).default = default - end - - def remove_config(name) - @config.remove(name) - end - - # For only multipackage - def packages - raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' unless @installer - @installer.packages - end - - # For only multipackage - def declare_packages(list) - raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' unless @installer - @installer.packages = list - end - end - -end # class ConfigTable - - -# This module requires: #verbose?, #no_harm? -module FileOperations - - def mkdir_p(dirname, prefix = nil) - dirname = prefix + File.expand_path(dirname) if prefix - $stderr.puts "mkdir -p #{dirname}" if verbose? - return if no_harm? - - # Does not check '/', it's too abnormal. - dirs = File.expand_path(dirname).split(%r<(?=/)>) - if /\A[a-z]:\z/i =~ dirs[0] - disk = dirs.shift - dirs[0] = disk + dirs[0] - end - dirs.each_index do |idx| - path = dirs[0..idx].join('') - Dir.mkdir path unless File.dir?(path) - end - end - - def rm_f(path) - $stderr.puts "rm -f #{path}" if verbose? - return if no_harm? - force_remove_file path - end - - def rm_rf(path) - $stderr.puts "rm -rf #{path}" if verbose? - return if no_harm? - remove_tree path - end - - def remove_tree(path) - if File.symlink?(path) - remove_file path - elsif File.dir?(path) - remove_tree0 path - else - force_remove_file path - end - end - - def remove_tree0(path) - Dir.foreach(path) do |ent| - next if ent == '.' - next if ent == '..' - entpath = "#{path}/#{ent}" - if File.symlink?(entpath) - remove_file entpath - elsif File.dir?(entpath) - remove_tree0 entpath - else - force_remove_file entpath - end - end - begin - Dir.rmdir path - rescue Errno::ENOTEMPTY - # directory may not be empty - end - end - - def move_file(src, dest) - force_remove_file dest - begin - File.rename src, dest - rescue - File.open(dest, 'wb') {|f| - f.write File.binread(src) - } - File.chmod File.stat(src).mode, dest - File.unlink src - end - end - - def force_remove_file(path) - begin - remove_file path - rescue - end - end - - def remove_file(path) - File.chmod 0777, path - File.unlink path - end - - def install(from, dest, mode, prefix = nil) - $stderr.puts "install #{from} #{dest}" if verbose? - return if no_harm? - - realdest = prefix ? prefix + File.expand_path(dest) : dest - realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest) - str = File.binread(from) - if diff?(str, realdest) - verbose_off { - rm_f realdest if File.exist?(realdest) - } - File.open(realdest, 'wb') {|f| - f.write str - } - File.chmod mode, realdest - - File.open("#{objdir_root()}/InstalledFiles", 'a') {|f| - if prefix - f.puts realdest.sub(prefix, '') - else - f.puts realdest - end - } - end - end - - def diff?(new_content, path) - return true unless File.exist?(path) - new_content != File.binread(path) - end - - def command(*args) - $stderr.puts args.join(' ') if verbose? - system(*args) or raise RuntimeError, - "system(#{args.map{|a| a.inspect }.join(' ')}) failed" - end - - def ruby(*args) - command config('rubyprog'), *args - end - - def make(task = nil) - command(*[config('makeprog'), task].compact) - end - - def extdir?(dir) - File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb") - end - - def files_of(dir) - Dir.open(dir) {|d| - return d.select {|ent| File.file?("#{dir}/#{ent}") } - } - end - - DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn ) - - def directories_of(dir) - Dir.open(dir) {|d| - return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT - } - end - -end - - -# This module requires: #srcdir_root, #objdir_root, #relpath -module HookScriptAPI - - def get_config(key) - @config[key] - end - - alias config get_config - - # obsolete: use metaconfig to change configuration - def set_config(key, val) - @config[key] = val - end - - # - # srcdir/objdir (works only in the package directory) - # - - def curr_srcdir - "#{srcdir_root()}/#{relpath()}" - end - - def curr_objdir - "#{objdir_root()}/#{relpath()}" - end - - def srcfile(path) - "#{curr_srcdir()}/#{path}" - end - - def srcexist?(path) - File.exist?(srcfile(path)) - end - - def srcdirectory?(path) - File.dir?(srcfile(path)) - end - - def srcfile?(path) - File.file?(srcfile(path)) - end - - def srcentries(path = '.') - Dir.open("#{curr_srcdir()}/#{path}") {|d| - return d.to_a - %w(. ..) - } - end - - def srcfiles(path = '.') - srcentries(path).select {|fname| - File.file?(File.join(curr_srcdir(), path, fname)) - } - end - - def srcdirectories(path = '.') - srcentries(path).select {|fname| - File.dir?(File.join(curr_srcdir(), path, fname)) - } - end - -end - - -class ToplevelInstaller - - Version = '3.4.1' - Copyright = 'Copyright (c) 2000-2006 Minero Aoki' - - TASKS = [ - [ 'all', 'do config, setup, then install' ], - [ 'config', 'saves your configurations' ], - [ 'show', 'shows current configuration' ], - [ 'setup', 'compiles ruby extentions and others' ], - [ 'install', 'installs files' ], - [ 'test', 'run all tests in test/' ], - [ 'clean', "does `make clean' for each extention" ], - [ 'distclean',"does `make distclean' for each extention" ] - ] - - def ToplevelInstaller.invoke - config = ConfigTable.new(load_rbconfig()) - config.load_standard_entries - config.load_multipackage_entries if multipackage? - config.fixup - klass = (multipackage?() ? ToplevelInstallerMulti : ToplevelInstaller) - klass.new(File.dirname($0), config).invoke - end - - def ToplevelInstaller.multipackage? - File.dir?(File.dirname($0) + '/packages') - end - - def ToplevelInstaller.load_rbconfig - if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg } - ARGV.delete(arg) - load File.expand_path(arg.split(/=/, 2)[1]) - $".push 'rbconfig.rb' - else - require 'rbconfig' - end - ::Config::CONFIG - end - - def initialize(ardir_root, config) - @ardir = File.expand_path(ardir_root) - @config = config - # cache - @valid_task_re = nil - end - - def config(key) - @config[key] - end - - def inspect - "#<#{self.class} #{__id__()}>" - end - - def invoke - run_metaconfigs - case task = parsearg_global() - when nil, 'all' - parsearg_config - init_installers - exec_config - exec_setup - exec_install - else - case task - when 'config', 'test' - ; - when 'clean', 'distclean' - @config.load_savefile if File.exist?(@config.savefile) - else - @config.load_savefile - end - __send__ "parsearg_#{task}" - init_installers - __send__ "exec_#{task}" - end - end - - def run_metaconfigs - @config.load_script "#{@ardir}/metaconfig" - end - - def init_installers - @installer = Installer.new(@config, @ardir, File.expand_path('.')) - end - - # - # Hook Script API bases - # - - def srcdir_root - @ardir - end - - def objdir_root - '.' - end - - def relpath - '.' - end - - # - # Option Parsing - # - - def parsearg_global - while arg = ARGV.shift - case arg - when /\A\w+\z/ - setup_rb_error "invalid task: #{arg}" unless valid_task?(arg) - return arg - when '-q', '--quiet' - @config.verbose = false - when '--verbose' - @config.verbose = true - when '--help' - print_usage $stdout - exit 0 - when '--version' - puts "#{File.basename($0)} version #{Version}" - exit 0 - when '--copyright' - puts Copyright - exit 0 - else - setup_rb_error "unknown global option '#{arg}'" - end - end - nil - end - - def valid_task?(t) - valid_task_re() =~ t - end - - def valid_task_re - @valid_task_re ||= /\A(?:#{TASKS.map {|task,desc| task }.join('|')})\z/ - end - - def parsearg_no_options - unless ARGV.empty? - task = caller(0).first.slice(%r<`parsearg_(\w+)'>, 1) - setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}" - end - end - - alias parsearg_show parsearg_no_options - alias parsearg_setup parsearg_no_options - alias parsearg_test parsearg_no_options - alias parsearg_clean parsearg_no_options - alias parsearg_distclean parsearg_no_options - - def parsearg_config - evalopt = [] - set = [] - @config.config_opt = [] - while i = ARGV.shift - if /\A--?\z/ =~ i - @config.config_opt = ARGV.dup - break - end - name, value = *@config.parse_opt(i) - if @config.value_config?(name) - @config[name] = value - else - evalopt.push [name, value] - end - set.push name - end - evalopt.each do |name, value| - @config.lookup(name).evaluate value, @config - end - # Check if configuration is valid - set.each do |n| - @config[n] if @config.value_config?(n) - end - end - - def parsearg_install - @config.no_harm = false - @config.install_prefix = '' - while a = ARGV.shift - case a - when '--no-harm' - @config.no_harm = true - when /\A--prefix=/ - path = a.split(/=/, 2)[1] - path = File.expand_path(path) unless path[0,1] == '/' - @config.install_prefix = path - else - setup_rb_error "install: unknown option #{a}" - end - end - end - - def print_usage(out) - out.puts 'Typical Installation Procedure:' - out.puts " $ ruby #{File.basename $0} config" - out.puts " $ ruby #{File.basename $0} setup" - out.puts " # ruby #{File.basename $0} install (may require root privilege)" - out.puts - out.puts 'Detailed Usage:' - out.puts " ruby #{File.basename $0} " - out.puts " ruby #{File.basename $0} [] []" - - fmt = " %-24s %s\n" - out.puts - out.puts 'Global options:' - out.printf fmt, '-q,--quiet', 'suppress message outputs' - out.printf fmt, ' --verbose', 'output messages verbosely' - out.printf fmt, ' --help', 'print this message' - out.printf fmt, ' --version', 'print version and quit' - out.printf fmt, ' --copyright', 'print copyright and quit' - out.puts - out.puts 'Tasks:' - TASKS.each do |name, desc| - out.printf fmt, name, desc - end - - fmt = " %-24s %s [%s]\n" - out.puts - out.puts 'Options for CONFIG or ALL:' - @config.each do |item| - out.printf fmt, item.help_opt, item.description, item.help_default - end - out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's" - out.puts - out.puts 'Options for INSTALL:' - out.printf fmt, '--no-harm', 'only display what to do if given', 'off' - out.printf fmt, '--prefix=path', 'install path prefix', '' - out.puts - end - - # - # Task Handlers - # - - def exec_config - @installer.exec_config - @config.save # must be final - end - - def exec_setup - @installer.exec_setup - end - - def exec_install - @installer.exec_install - end - - def exec_test - @installer.exec_test - end - - def exec_show - @config.each do |i| - printf "%-20s %s\n", i.name, i.value if i.value? - end - end - - def exec_clean - @installer.exec_clean - end - - def exec_distclean - @installer.exec_distclean - end - -end # class ToplevelInstaller - - -class ToplevelInstallerMulti < ToplevelInstaller - - include FileOperations - - def initialize(ardir_root, config) - super - @packages = directories_of("#{@ardir}/packages") - raise 'no package exists' if @packages.empty? - @root_installer = Installer.new(@config, @ardir, File.expand_path('.')) - end - - def run_metaconfigs - @config.load_script "#{@ardir}/metaconfig", self - @packages.each do |name| - @config.load_script "#{@ardir}/packages/#{name}/metaconfig" - end - end - - attr_reader :packages - - def packages=(list) - raise 'package list is empty' if list.empty? - list.each do |name| - raise "directory packages/#{name} does not exist"\ - unless File.dir?("#{@ardir}/packages/#{name}") - end - @packages = list - end - - def init_installers - @installers = {} - @packages.each do |pack| - @installers[pack] = Installer.new(@config, - "#{@ardir}/packages/#{pack}", - "packages/#{pack}") - end - with = extract_selection(config('with')) - without = extract_selection(config('without')) - @selected = @installers.keys.select {|name| - (with.empty? or with.include?(name)) \ - and not without.include?(name) - } - end - - def extract_selection(list) - a = list.split(/,/) - a.each do |name| - setup_rb_error "no such package: #{name}" unless @installers.key?(name) - end - a - end - - def print_usage(f) - super - f.puts 'Inluded packages:' - f.puts ' ' + @packages.sort.join(' ') - f.puts - end - - # - # Task Handlers - # - - def exec_config - run_hook 'pre-config' - each_selected_installers {|inst| inst.exec_config } - run_hook 'post-config' - @config.save # must be final - end - - def exec_setup - run_hook 'pre-setup' - each_selected_installers {|inst| inst.exec_setup } - run_hook 'post-setup' - end - - def exec_install - run_hook 'pre-install' - each_selected_installers {|inst| inst.exec_install } - run_hook 'post-install' - end - - def exec_test - run_hook 'pre-test' - each_selected_installers {|inst| inst.exec_test } - run_hook 'post-test' - end - - def exec_clean - rm_f @config.savefile - run_hook 'pre-clean' - each_selected_installers {|inst| inst.exec_clean } - run_hook 'post-clean' - end - - def exec_distclean - rm_f @config.savefile - run_hook 'pre-distclean' - each_selected_installers {|inst| inst.exec_distclean } - run_hook 'post-distclean' - end - - # - # lib - # - - def each_selected_installers - Dir.mkdir 'packages' unless File.dir?('packages') - @selected.each do |pack| - $stderr.puts "Processing the package `#{pack}' ..." if verbose? - Dir.mkdir "packages/#{pack}" unless File.dir?("packages/#{pack}") - Dir.chdir "packages/#{pack}" - yield @installers[pack] - Dir.chdir '../..' - end - end - - def run_hook(id) - @root_installer.run_hook id - end - - # module FileOperations requires this - def verbose? - @config.verbose? - end - - # module FileOperations requires this - def no_harm? - @config.no_harm? - end - -end # class ToplevelInstallerMulti - - -class Installer - - FILETYPES = %w( bin lib ext data conf man ) - - include FileOperations - include HookScriptAPI - - def initialize(config, srcroot, objroot) - @config = config - @srcdir = File.expand_path(srcroot) - @objdir = File.expand_path(objroot) - @currdir = '.' - end - - def inspect - "#<#{self.class} #{File.basename(@srcdir)}>" - end - - def noop(rel) - end - - # - # Hook Script API base methods - # - - def srcdir_root - @srcdir - end - - def objdir_root - @objdir - end - - def relpath - @currdir - end - - # - # Config Access - # - - # module FileOperations requires this - def verbose? - @config.verbose? - end - - # module FileOperations requires this - def no_harm? - @config.no_harm? - end - - def verbose_off - begin - save, @config.verbose = @config.verbose?, false - yield - ensure - @config.verbose = save - end - end - - # - # TASK config - # - - def exec_config - exec_task_traverse 'config' - end - - alias config_dir_bin noop - alias config_dir_lib noop - - def config_dir_ext(rel) - extconf if extdir?(curr_srcdir()) - end - - alias config_dir_data noop - alias config_dir_conf noop - alias config_dir_man noop - - def extconf - ruby "#{curr_srcdir()}/extconf.rb", *@config.config_opt - end - - # - # TASK setup - # - - def exec_setup - exec_task_traverse 'setup' - end - - def setup_dir_bin(rel) - files_of(curr_srcdir()).each do |fname| - update_shebang_line "#{curr_srcdir()}/#{fname}" - end - end - - alias setup_dir_lib noop - - def setup_dir_ext(rel) - make if extdir?(curr_srcdir()) - end - - alias setup_dir_data noop - alias setup_dir_conf noop - alias setup_dir_man noop - - def update_shebang_line(path) - return if no_harm? - return if config('shebang') == 'never' - old = Shebang.load(path) - if old - $stderr.puts "warning: #{path}: Shebang line includes too many args. It is not portable and your program may not work." if old.args.size > 1 - new = new_shebang(old) - return if new.to_s == old.to_s - else - return unless config('shebang') == 'all' - new = Shebang.new(config('rubypath')) - end - $stderr.puts "updating shebang: #{File.basename(path)}" if verbose? - open_atomic_writer(path) {|output| - File.open(path, 'rb') {|f| - f.gets if old # discard - output.puts new.to_s - output.print f.read - } - } - end - - def new_shebang(old) - if /\Aruby/ =~ File.basename(old.cmd) - Shebang.new(config('rubypath'), old.args) - elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby' - Shebang.new(config('rubypath'), old.args[1..-1]) - else - return old unless config('shebang') == 'all' - Shebang.new(config('rubypath')) - end - end - - def open_atomic_writer(path, &block) - tmpfile = File.basename(path) + '.tmp' - begin - File.open(tmpfile, 'wb', &block) - File.rename tmpfile, File.basename(path) - ensure - File.unlink tmpfile if File.exist?(tmpfile) - end - end - - class Shebang - def Shebang.load(path) - line = nil - File.open(path) {|f| - line = f.gets - } - return nil unless /\A#!/ =~ line - parse(line) - end - - def Shebang.parse(line) - cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ') - new(cmd, args) - end - - def initialize(cmd, args = []) - @cmd = cmd - @args = args - end - - attr_reader :cmd - attr_reader :args - - def to_s - "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}") - end - end - - # - # TASK install - # - - def exec_install - rm_f 'InstalledFiles' - exec_task_traverse 'install' - end - - def install_dir_bin(rel) - install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755 - end - - def install_dir_lib(rel) - install_files libfiles(), "#{config('rbdir')}/#{rel}", 0644 - end - - def install_dir_ext(rel) - return unless extdir?(curr_srcdir()) - install_files rubyextentions('.'), - "#{config('sodir')}/#{File.dirname(rel)}", - 0555 - end - - def install_dir_data(rel) - install_files targetfiles(), "#{config('datadir')}/#{rel}", 0644 - end - - def install_dir_conf(rel) - # FIXME: should not remove current config files - # (rename previous file to .old/.org) - install_files targetfiles(), "#{config('sysconfdir')}/#{rel}", 0644 - end - - def install_dir_man(rel) - install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644 - end - - def install_files(list, dest, mode) - mkdir_p dest, @config.install_prefix - list.each do |fname| - install fname, dest, mode, @config.install_prefix - end - end - - def libfiles - glob_reject(%w(*.y *.output), targetfiles()) - end - - def rubyextentions(dir) - ents = glob_select("*.#{@config.dllext}", targetfiles()) - if ents.empty? - setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first" - end - ents - end - - def targetfiles - mapdir(existfiles() - hookfiles()) - end - - def mapdir(ents) - ents.map {|ent| - if File.exist?(ent) - then ent # objdir - else "#{curr_srcdir()}/#{ent}" # srcdir - end - } - end - - # picked up many entries from cvs-1.11.1/src/ignore.c - JUNK_FILES = %w( - core RCSLOG tags TAGS .make.state - .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb - *~ *.old *.bak *.BAK *.orig *.rej _$* *$ - - *.org *.in .* - ) - - def existfiles - glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.'))) - end - - def hookfiles - %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt| - %w( config setup install clean distclean ).map {|t| sprintf(fmt, t) } - }.flatten - end - - def glob_select(pat, ents) - re = globs2re([pat]) - ents.select {|ent| re =~ ent } - end - - def glob_reject(pats, ents) - re = globs2re(pats) - ents.reject {|ent| re =~ ent } - end - - GLOB2REGEX = { - '.' => '\.', - '$' => '\$', - '#' => '\#', - '*' => '.*' - } - - def globs2re(pats) - /\A(?:#{ - pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|') - })\z/ - end - - # - # TASK test - # - - TESTDIR = 'test' - - def exec_test - unless File.directory?('test') - $stderr.puts 'no test in this package' if verbose? - return - end - $stderr.puts 'Running tests...' if verbose? - begin - require 'test/unit' - rescue LoadError - setup_rb_error 'test/unit cannot loaded. You need Ruby 1.8 or later to invoke this task.' - end - runner = Test::Unit::AutoRunner.new(true) - runner.to_run << TESTDIR - runner.run - end - - # - # TASK clean - # - - def exec_clean - exec_task_traverse 'clean' - rm_f @config.savefile - rm_f 'InstalledFiles' - end - - alias clean_dir_bin noop - alias clean_dir_lib noop - alias clean_dir_data noop - alias clean_dir_conf noop - alias clean_dir_man noop - - def clean_dir_ext(rel) - return unless extdir?(curr_srcdir()) - make 'clean' if File.file?('Makefile') - end - - # - # TASK distclean - # - - def exec_distclean - exec_task_traverse 'distclean' - rm_f @config.savefile - rm_f 'InstalledFiles' - end - - alias distclean_dir_bin noop - alias distclean_dir_lib noop - - def distclean_dir_ext(rel) - return unless extdir?(curr_srcdir()) - make 'distclean' if File.file?('Makefile') - end - - alias distclean_dir_data noop - alias distclean_dir_conf noop - alias distclean_dir_man noop - - # - # Traversing - # - - def exec_task_traverse(task) - run_hook "pre-#{task}" - FILETYPES.each do |type| - if type == 'ext' and config('without-ext') == 'yes' - $stderr.puts 'skipping ext/* by user option' if verbose? - next - end - traverse task, type, "#{task}_dir_#{type}" - end - run_hook "post-#{task}" - end - - def traverse(task, rel, mid) - dive_into(rel) { - run_hook "pre-#{task}" - __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '') - directories_of(curr_srcdir()).each do |d| - traverse task, "#{rel}/#{d}", mid - end - run_hook "post-#{task}" - } - end - - def dive_into(rel) - return unless File.dir?("#{@srcdir}/#{rel}") - - dir = File.basename(rel) - Dir.mkdir dir unless File.dir?(dir) - prevdir = Dir.pwd - Dir.chdir dir - $stderr.puts '---> ' + rel if verbose? - @currdir = rel - yield - Dir.chdir prevdir - $stderr.puts '<--- ' + rel if verbose? - @currdir = File.dirname(rel) - end - - def run_hook(id) - path = [ "#{curr_srcdir()}/#{id}", - "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) } - return unless path - $stderr.puts "invoking hook script #{path}" if verbose? - begin - instance_eval File.read(path), path, 1 - rescue - raise if $DEBUG - setup_rb_error "hook #{path} failed:\n" + $!.message - end - end - -end # class Installer - - -class SetupError < StandardError; end - -def setup_rb_error(msg) - raise SetupError, msg -end - -if $0 == __FILE__ - begin - ToplevelInstaller.invoke - rescue SetupError - raise if $DEBUG - $stderr.puts $!.message - $stderr.puts "Try 'ruby #{$0} --help' for detailed usage." - exit 1 - end -end From 306e0d664758fb37624ce76fc3d016d7706d5659 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:04:31 +0200 Subject: [PATCH 140/619] Remove ./web The information in these files is long, long out of date. --- Manifest.txt | 2 -- web/racc.en.rhtml | 42 -------------------------------------- web/racc.ja.rhtml | 51 ----------------------------------------------- 3 files changed, 95 deletions(-) delete mode 100644 web/racc.en.rhtml delete mode 100644 web/racc.ja.rhtml diff --git a/Manifest.txt b/Manifest.txt index 1a13cf53..a29af678 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -136,5 +136,3 @@ test/test_grammar_file_parser.rb test/test_racc_command.rb test/test_scan_y.rb test/testscanner.rb -web/racc.en.rhtml -web/racc.ja.rhtml diff --git a/web/racc.en.rhtml b/web/racc.en.rhtml deleted file mode 100644 index 269011b4..00000000 --- a/web/racc.en.rhtml +++ /dev/null @@ -1,42 +0,0 @@ -% require 'makefile' -% version = Makefile.get_parameter('Makefile', 'version') -

Racc

-

-$Id$ -

- - - - - - - -
Version<%= version %>
TypeParser Generator
FormatRuby script + Ruby extention
Requirementruby (>=1.6)
LicenseLGPL
-

--- Download (.tar.gz) --- Old Versions --- Online Manual --- -

- -

-Racc (Ruby yACC) is a LALR(1) parser generator for Ruby. -Version 1.4.x is stable release. -

-

-Parsers generated by Racc requires "Racc Runtime Module". -Ruby 1.8.x comes with this runtime. -If you want to run your parsers with ruby 1.6.x, -use "racc -E" command. For details, see online manual. -

- -

Anonymous CVS

-

-You can true latest version of Racc via anonymous CVS. -To check out working copy, type: -

-
-$ cvs -d :pserver:anonymous@cvs.loveruby.net:/src login
-Password: (Just hit [Enter])
-$ cvs -d :pserver:anonymous@cvs.loveruby.net:/src co racc
-
diff --git a/web/racc.ja.rhtml b/web/racc.ja.rhtml deleted file mode 100644 index 92e5459b..00000000 --- a/web/racc.ja.rhtml +++ /dev/null @@ -1,51 +0,0 @@ -% require 'makefile' -% version = Makefile.get_parameter('Makefile', 'version') -

Racc

-

-$Id$ -

- - - - - - -
ǿ<%= version %>
parser generator
ruby script, ruby extention
ɬ״Ķruby (>=1.6)
۾LGPL
- -

-

-Ruby Ѥ LALR(1) ѡͥ졼Ǥ -ѡϤʤ˹®ưޤ -

-

-Racc ѡư˥󥿥⥸塼뤬ɬפǤ -Ruby 1.8 ˤϤΥ󥿥बǽ餫źդƤΤ -ͤʤפǤRuby 1.6 оݤˤȤ -racc -E ǥѡɬפޤ -

-

-ʤRacc 1.4.x Υ󥿥 Ruby 1.8 źդ Racc 󥿥ϡ -ɾǤ̯˰㤤ޤ˸ߴޤ -

- -

-

-⤦ŪʬϸϤƤϤǤ -TODO ϤޤĤޤ¾ˤäƤΤ -ʬ礭ѹĤϤޤ -

- -

CVS ݥȥ

-

-CVS Ȥ Racc οκǿǤǤޤ -ޥɥ饤ǼΤ褦ǤäƤ -

-
-$ cvs -d :pserver:anonymous@cvs.loveruby.net:/src login
-Password: (EnterǤ)
-$ cvs -d :pserver:anonymous@cvs.loveruby.net:/src co racc
-
From 07b904fb2d46e793a6440ff38a8c4560aaaff5b8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:05:10 +0200 Subject: [PATCH 141/619] Spelling and grammar improvements in README --- README.rdoc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/README.rdoc b/README.rdoc index 756b06ef..8517ea32 100644 --- a/README.rdoc +++ b/README.rdoc @@ -5,16 +5,16 @@ == DESCRIPTION: Racc is a LALR(1) parser generator. - It is written in Ruby itself, and generates Ruby program. + It is written in Ruby itself, and generates Ruby programs. - NOTE: Ruby 1.8.x comes with Racc runtime module. You + NOTE: Ruby 1.8+ comes with the Racc runtime module. You can run your parsers generated by racc 1.4.x out of the box. -== Requirement +== Requirements - * Ruby 1.8.x or later. + * Ruby 1.8+ (*) make and C compiler. @@ -27,16 +27,17 @@ == Testing Racc - Racc comes with simple calculator. To compile this, on shell: + Racc comes with a simple calculator. To compile this at the shell: $ racc -o calc sample/calc.y - This process costs few seconds (or less). Then type: + This process takes few seconds (or less). Then type: $ ruby calc - ... Does it works? - For details of Racc, see HTML documents placed under 'doc.en/' + ... Does it work? + + For details about Racc, see the HTML documents under 'doc.en/' and sample grammar files under 'sample/'. @@ -44,15 +45,15 @@ Racc is distributed under the terms of the GNU Lesser General Public License version 2. Note that you do NOT need to follow - LGPL for your own parser (racc outputs). You can provide those + LGPL for your own parser (racc outputs). You can distribute those files under any licenses you want. == Bug Reports Any kind of bug reports are welcome. - If you find a bug of Racc, please email me. Your grammar file, - debug output genereted by "racc -g", are helpful. + If you find a bug in Racc, please email me. Your grammar file, + and debug output genereted by "racc -g", will be helpful. Minero Aoki From 77012bb7dbaf4703c7ea70e97f1882261ca449a0 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:18:53 +0200 Subject: [PATCH 142/619] Remove unneeded State#stateid attribute --- lib/racc/logfilegenerator.rb | 4 ++-- lib/racc/state.rb | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 6b89ebb0..0269ae55 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -31,11 +31,11 @@ def output_conflict(out) @states.each do |state| if state.srconf out.printf "state %d contains %d shift/reduce conflicts\n", - state.stateid, state.srconf.size + state.ident, state.srconf.size end if state.rrconf out.printf "state %d contains %d reduce/reduce conflicts\n", - state.stateid, state.rrconf.size + state.ident, state.rrconf.size end end end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 1acb4741..62978f3e 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -592,7 +592,6 @@ def initialize(ident, core) end attr_reader :ident - alias stateid ident alias hash ident attr_reader :core From 9701ede3a6d8f8c2a785aa2b1d53e6b19abbfaec Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:22:38 +0200 Subject: [PATCH 143/619] Make Grammar#fix_ident more concise --- lib/racc/grammar.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 7d152de5..18accc0f 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -407,11 +407,8 @@ def add_start_rule end # Rule#ident - # LocationPointer#ident def fix_ident - @rules.each_with_index do |rule, idx| - rule.ident = idx - end + @rules.each_with_index(&:ident=) end # Rule#hash From 20f4221955aa5f01f2bc884c85c92a134e437eb5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:26:21 +0200 Subject: [PATCH 144/619] Remove redundant Rule#== method Each Rule is unique. There will never be 2 rules with the same hash code. So this comparison is useless. --- lib/racc/grammar.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 18accc0f..ee1a6197 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -603,10 +603,6 @@ def inspect "#" end - def ==(other) - other.kind_of?(Rule) and @ident == other.ident - end - def [](idx) @symbols[idx] end From 092c1be4e3575dcb210ed78cd94081db36c50a5d Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:28:53 +0200 Subject: [PATCH 145/619] Remove redundant LocationPointer#== method There are never duplicate LocationPointers. Each one is unique. So this comparison is useless. --- lib/racc/grammar.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index ee1a6197..7f19cd8d 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -721,12 +721,6 @@ def to_s alias inspect to_s - def eql?(ot) - hash == ot.hash - end - - alias == eql? - def head? @index == 0 end From 7266e8db4cb7aabfb7381179aaa445ffbd6f1939 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:30:28 +0200 Subject: [PATCH 146/619] Remove redundant assignment in Rule constructor --- lib/racc/grammar.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 7f19cd8d..2ba123cf 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -533,7 +533,6 @@ def initialize(target, syms, act) @ident = nil @hash = nil - @ptrs = nil @precedence = nil @specified_prec = nil @useless = nil From 7f0e9090c89701a7d87aabb59275434b3b86020e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:30:43 +0200 Subject: [PATCH 147/619] Use attr_accessor :hash to make Rule more concise --- lib/racc/grammar.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 2ba123cf..9ca6705f 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -561,14 +561,9 @@ def each_rule(&block) end attr_accessor :ident - - attr_reader :hash + attr_accessor :hash attr_reader :ptrs - def hash=(n) - @hash = n - end - def precedence @specified_prec || @precedence end From f17c88b49c749fa61f9db8c73fa0893e18d5b768 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:36:28 +0200 Subject: [PATCH 148/619] Use @terms for terminals in SymbolTable --- lib/racc/grammar.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 9ca6705f..e4ff5109 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -790,8 +790,8 @@ def each(&block) @symbols.each(&block) end - def terminals(&block) - @symbols[0, @nt_base] + def terminals + @terms end def each_terminal(&block) @@ -807,11 +807,9 @@ def each_nonterminal(&block) end def fix - terms, nterms = @symbols.partition {|s| s.terminal? } - @symbols = terms + nterms - @terms = terms - @nterms = nterms - @nt_base = terms.size + @terms, @nterms = @symbols.partition {|s| s.terminal? } + @symbols = @terms + @nterms + @nt_base = @terms.size fix_ident check_terminals end From 1a8186b8084bede3e0216dda4bb0ab115efe9f59 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:37:07 +0200 Subject: [PATCH 149/619] Use @nterms for nonterminals in SymbolTable --- lib/racc/grammar.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index e4ff5109..5c4d94f8 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -799,7 +799,7 @@ def each_terminal(&block) end def nonterminals - @symbols[@nt_base, @symbols.size - @nt_base] + @nterms end def each_nonterminal(&block) From 1a5f4df6b747046a35acb04be7fae6f521f8c261 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:45:11 +0200 Subject: [PATCH 150/619] Calculate nt_base (index of first nonterminal in @symbols) on demand rather than caching --- lib/racc/grammar.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 5c4d94f8..37a872c8 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -780,7 +780,9 @@ def delete(sym) @cache.delete(sym.value) end - attr_reader :nt_base + def nt_base + @terms.size + end def nt_max @symbols.size @@ -809,7 +811,6 @@ def each_nonterminal(&block) def fix @terms, @nterms = @symbols.partition {|s| s.terminal? } @symbols = @terms + @nterms - @nt_base = @terms.size fix_ident check_terminals end From d552252b4446d8cca0c587a5963873defc160b44 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:47:57 +0200 Subject: [PATCH 151/619] Remove unneeded SymbolTable#each_terminal method --- lib/racc/grammar.rb | 9 ++------- lib/racc/logfilegenerator.rb | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 37a872c8..2c5a2c1d 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -60,7 +60,6 @@ def to_s extend Forwardable def_delegator "@symboltable", :each, :each_symbol - def_delegator "@symboltable", :each_terminal def_delegator "@symboltable", :each_nonterminal def intern(value, dummy = false) @@ -503,7 +502,7 @@ def compute_nullable # tree, because there is no sequence of rules by which that nonterminal # could eventually reduce down to the 'start' node def compute_useless - @symboltable.each_terminal { |sym| sym.useless = false } + @symboltable.terminals.each { |sym| sym.useless = false } @symboltable.each_nonterminal { |sym| sym.useless = true } @symboltable.error.useless = false @@ -796,10 +795,6 @@ def terminals @terms end - def each_terminal(&block) - @terms.each(&block) - end - def nonterminals @nterms end @@ -825,7 +820,7 @@ def check_terminals return unless @symbols.any? {|s| s.should_terminal? } @anchor.should_terminal @error.should_terminal - each_terminal do |t| + terminals.each do |t| t.should_terminal if t.string_symbol? end each do |s| diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 0269ae55..cd1fba42 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -192,7 +192,7 @@ def output_token(out) end out.print "\n**Terminals, with rules where they appear\n\n" - @grammar.each_terminal do |t| + @grammar.symboltable.terminals.each do |t| out.printf " %s (%d) %s\n", t.to_s, t.ident, symbol_locations(t.locate).join(' ') end From 8765f3628442d68545efe9d49f1f2761dd977bba Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 19:52:55 +0200 Subject: [PATCH 152/619] Remove unneeded SymbolTable#each_nonterminal method --- lib/racc/grammar.rb | 9 ++------- lib/racc/logfilegenerator.rb | 4 ++-- lib/racc/statetransitiontable.rb | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 2c5a2c1d..de9750d6 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -60,7 +60,6 @@ def to_s extend Forwardable def_delegator "@symboltable", :each, :each_symbol - def_delegator "@symboltable", :each_nonterminal def intern(value, dummy = false) @symboltable.intern(value, dummy) @@ -388,7 +387,7 @@ def init determine_terminals @symboltable.fix compute_locate - @symboltable.each_nonterminal {|t| compute_expand t } + @symboltable.nonterminals.each {|t| compute_expand t } compute_nullable compute_useless end @@ -503,7 +502,7 @@ def compute_nullable # could eventually reduce down to the 'start' node def compute_useless @symboltable.terminals.each { |sym| sym.useless = false } - @symboltable.each_nonterminal { |sym| sym.useless = true } + @symboltable.nonterminals.each { |sym| sym.useless = true } @symboltable.error.useless = false @symboltable.dummy.useless = false @@ -799,10 +798,6 @@ def nonterminals @nterms end - def each_nonterminal(&block) - @nterms.each(&block) - end - def fix @terms, @nterms = @symbols.partition {|s| s.terminal? } @symbols = @terms + @nterms diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index cd1fba42..1dac7c26 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -47,7 +47,7 @@ def output_useless(out) rl.ident, rl.target.to_s end end - @grammar.each_nonterminal do |t| + @grammar.symboltable.nonterminals.each do |t| if t.useless? out.printf "useless nonterminal %s\n", t.to_s end @@ -180,7 +180,7 @@ def output_token(out) out.print "------- Symbols -------\n\n" out.print "**Nonterminals, with rules where they appear\n\n" - @grammar.each_nonterminal do |t| + @grammar.symboltable.nonterminals.each do |t| tmp = < Date: Fri, 13 Nov 2015 20:33:49 +0200 Subject: [PATCH 153/619] Grammar#each_rule is not actually used anywhere --- lib/racc/grammar.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index de9750d6..299ca9b9 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -35,12 +35,10 @@ def [](x) @rules[x] end - def each_rule(&block) + def each(&block) @rules.each(&block) end - alias each each_rule - def each_index(&block) @rules.each_index(&block) end From 9b6177cd0088b03ec02d122ff7df233c8a7c6918 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 20:34:34 +0200 Subject: [PATCH 154/619] Grammar is Enumerable --- lib/racc/grammar.rb | 16 +++------------- lib/racc/logfilegenerator.rb | 16 +++++----------- lib/racc/parserfilegenerator.rb | 6 ++---- lib/racc/state.rb | 4 +--- 4 files changed, 11 insertions(+), 31 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 299ca9b9..92bf9fd3 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -12,8 +12,8 @@ require 'set' module Racc - class Grammar + include Enumerable def initialize(debug_flags = DebugFlags.new) @symboltable = SymbolTable.new @@ -39,14 +39,6 @@ def each(&block) @rules.each(&block) end - def each_index(&block) - @rules.each_index(&block) - end - - def each_with_index(&block) - @rules.each_with_index(&block) - end - def size @rules.size end @@ -205,10 +197,8 @@ def initialize def grammar flush_delayed - @grammar.each do |rule| - if rule.specified_prec - rule.specified_prec = @grammar.intern(rule.specified_prec) - end + @grammar.select(&:specified_prec).each do |rule| + rule.specified_prec = @grammar.intern(rule.specified_prec) end @grammar.init @grammar diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 1dac7c26..ac541a59 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -41,22 +41,16 @@ def output_conflict(out) end def output_useless(out) - @grammar.each do |rl| - if rl.useless? - out.printf "rule %d (%s) never reduced\n", - rl.ident, rl.target.to_s - end + @grammar.select(&:useless?).each do |rl| + out.printf "rule %d (%s) never reduced\n", + rl.ident, rl.target.to_s end - @grammar.symboltable.nonterminals.each do |t| - if t.useless? - out.printf "useless nonterminal %s\n", t.to_s - end + @grammar.symboltable.nonterminals.select(&:useless?).each do |t| + out.printf "useless nonterminal %s\n", t.to_s end end - # # States - # def output_state(out) out << "--------- State ---------\n" diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index 0c435f04..0360f02c 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -350,10 +350,8 @@ def string_list(name, list) end def actions - @grammar.each do |rule| - unless rule.action.source? - raise "racc: fatal: cannot generate parser file when any action is a Proc" - end + if @grammar.any? { |rule| !rule.action.source? } + raise "racc: fatal: cannot generate parser file when any action is a Proc" end if @params.result_var? diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 62978f3e..27bd79d3 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -771,9 +771,7 @@ def initialize(rt, st) end def init - @grammar.each do |rule| - @reduce.push Reduce.new(rule) - end + @reduce.concat(@grammar.map { |rule| Reduce.new(rule) }) @statetable.each do |state| @shift.push Shift.new(state) end From 9149091522831411f3fbd647ce9a0167d978ac35 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 20:41:03 +0200 Subject: [PATCH 155/619] Removed unneeded Grammar#each_symbol method --- lib/racc/grammar.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 92bf9fd3..372a2a2f 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -49,8 +49,6 @@ def to_s extend Forwardable - def_delegator "@symboltable", :each, :each_symbol - def intern(value, dummy = false) @symboltable.intern(value, dummy) end From dbb5d5d779acf8c3faa04faa5fcf27c2e495f4a2 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 20:44:58 +0200 Subject: [PATCH 156/619] Oh yes, start statement is used... It's used by the liquor gem, for one. --- rdoc/en/grammar.en.rdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index ca31dd29..c3c0aa23 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -363,7 +363,6 @@ start real_target -- This is usually omitted and in that case, the start rule is the first rule in the file. -This statement will never be used, I think. In yacc, this is '%start'. From 32e44d8b54c295497d97080b6ffdc35e1e5cd2f9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 20:46:46 +0200 Subject: [PATCH 157/619] We don't need to explicitly mark the 'error' NT as useful --- lib/racc/grammar.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 372a2a2f..97edb5cc 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -490,7 +490,6 @@ def compute_useless @symboltable.terminals.each { |sym| sym.useless = false } @symboltable.nonterminals.each { |sym| sym.useless = true } - @symboltable.error.useless = false @symboltable.dummy.useless = false @symboltable.anchor.useless = false @start.useless = false From 1156f5c89e38a592bb811244a3d3976296b215e8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 20:57:44 +0200 Subject: [PATCH 158/619] Work on code style for terminal/NT checks --- lib/racc/grammar.rb | 18 ++++++++---------- lib/racc/grammarfileparser.rb | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 97edb5cc..11a12be8 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -784,7 +784,7 @@ def nonterminals end def fix - @terms, @nterms = @symbols.partition {|s| s.terminal? } + @terms, @nterms = @symbols.partition(&:terminal?) @symbols = @terms + @nterms fix_ident check_terminals @@ -797,19 +797,17 @@ def fix_ident end def check_terminals - return unless @symbols.any? {|s| s.should_terminal? } + # token declarations in Racc are optional + # however, if you declare some tokens, you must declare them all + return unless @symbols.any?(&:should_terminal?) @anchor.should_terminal @error.should_terminal - terminals.each do |t| - t.should_terminal if t.string_symbol? - end - each do |s| - s.should_terminal if s.assoc - end - terminals().reject {|t| t.should_terminal? }.each do |t| + terminals.select(&:string_symbol?).each(&:should_terminal) + select(&:assoc).each(&:should_terminal) + terminals.reject(&:should_terminal?).each do |t| raise CompileError, "terminal #{t} not declared as terminal" end - nonterminals().select {|n| n.should_terminal? }.each do |n| + nonterminals.select(&:should_terminal?).each do |n| raise CompileError, "symbol #{n} declared as terminal but is not terminal" end end diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 9e223cd6..2e9530ff 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -45,7 +45,7 @@ module Racc @grammar.start_symbol = sym } \ | seq(:TOKEN, :symbols) { |_, syms| - syms.each { |s| s.should_terminal } + syms.each(&:should_terminal) } \ | seq(:OPTION, :options) { |_, syms| # TODO: pull setting of options into a separate methods From 1dca04f357e9ee58ab46433d30df1c571b8e3e73 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 21:29:10 +0200 Subject: [PATCH 159/619] Any Sym which has no derivation rules is a terminal --- lib/racc/grammar.rb | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 11a12be8..a54dbaac 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -370,7 +370,6 @@ def init fix_ident compute_hash compute_heads - determine_terminals @symboltable.fix compute_locate @symboltable.nonterminals.each {|t| compute_expand t } @@ -411,13 +410,6 @@ def compute_heads end end - # Sym#terminal? - def determine_terminals - @symboltable.each do |s| - s.term = s.heads.empty? - end - end - # Sym#locate def compute_locate @rules.each do |rule| @@ -815,13 +807,11 @@ def check_terminals # Stands terminal and nonterminal symbols. class Sym - def initialize(value, dummyp) @ident = nil @value = value @dummyp = dummyp - @term = nil @should_terminal = false @precedence = nil case value @@ -876,11 +866,11 @@ def dummy? end def terminal? - @term + heads.empty? end def nonterminal? - !@term + !heads.empty? end def term=(t) @@ -912,6 +902,11 @@ def serialize attr_accessor :precedence attr_accessor :assoc + attr_reader :heads + attr_reader :locate + attr_reader :expand + once_writer :expand + def to_s @to_s.dup end @@ -926,12 +921,6 @@ def rule Rule.new(nil, [self], UserAction.empty) end - # - # cache - # - - attr_reader :heads - attr_reader :locate def nullable? @null @@ -941,9 +930,6 @@ def null=(n) @null = n end - attr_reader :expand - once_writer :expand - def useless? @useless end From 1bb6277eec1c96ec92707cff0eb3451889f92a7c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 21:31:49 +0200 Subject: [PATCH 160/619] Rename should_terminal to should_be_terminal --- lib/racc/grammar.rb | 26 ++++++++++++++------------ lib/racc/grammarfileparser.rb | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index a54dbaac..ce948dc4 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -791,15 +791,15 @@ def fix_ident def check_terminals # token declarations in Racc are optional # however, if you declare some tokens, you must declare them all - return unless @symbols.any?(&:should_terminal?) - @anchor.should_terminal - @error.should_terminal - terminals.select(&:string_symbol?).each(&:should_terminal) - select(&:assoc).each(&:should_terminal) - terminals.reject(&:should_terminal?).each do |t| + return unless @symbols.any?(&:should_be_terminal?) + @anchor.should_be_terminal! + @error.should_be_terminal! + terminals.select(&:string_symbol?).each(&:should_be_terminal!) + select(&:assoc).each(&:should_be_terminal!) + terminals.reject(&:should_be_terminal?).each do |t| raise CompileError, "terminal #{t} not declared as terminal" end - nonterminals.select(&:should_terminal?).each do |n| + nonterminals.select(&:should_be_terminal?).each do |n| raise CompileError, "symbol #{n} declared as terminal but is not terminal" end end @@ -812,7 +812,7 @@ def initialize(value, dummyp) @value = value @dummyp = dummyp - @should_terminal = false + @should_be_terminal = false @precedence = nil case value when Symbol @@ -878,12 +878,14 @@ def term=(t) @term = t end - def should_terminal - @should_terminal = true + def should_be_terminal! + @should_be_terminal = true end - def should_terminal? - @should_terminal + # has this Sym appeared in a token declaration, or in some other context + # where only a terminal should be used (such as associativity declaration)? + def should_be_terminal? + @should_be_terminal end def string_symbol? diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 2e9530ff..a101f449 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -45,7 +45,7 @@ module Racc @grammar.start_symbol = sym } \ | seq(:TOKEN, :symbols) { |_, syms| - syms.each(&:should_terminal) + syms.each(&:should_be_terminal!) } \ | seq(:OPTION, :options) { |_, syms| # TODO: pull setting of options into a separate methods From 1f1b9bd3bd445e9e8af5b9bed9b83d052b6a46e3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 21:47:43 +0200 Subject: [PATCH 161/619] Comment on numbering of Syms --- lib/racc/grammar.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index ce948dc4..4a221a9b 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -778,16 +778,13 @@ def nonterminals def fix @terms, @nterms = @symbols.partition(&:terminal?) @symbols = @terms + @nterms - fix_ident + # number Syms so terminals have the lower numbers + @symbols.each_with_index(&:ident=) check_terminals end private - def fix_ident - @symbols.each_with_index(&:ident=) - end - def check_terminals # token declarations in Racc are optional # however, if you declare some tokens, you must declare them all From d269f905c83369d8270853a14d849109195263ef Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 21:48:02 +0200 Subject: [PATCH 162/619] Rename @dummyp to @dummy in Sym --- lib/racc/grammar.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 4a221a9b..cd9376b7 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -804,13 +804,14 @@ def check_terminals # Stands terminal and nonterminal symbols. class Sym - def initialize(value, dummyp) + def initialize(value, dummy) @ident = nil @value = value - @dummyp = dummyp + @dummy = dummy @should_be_terminal = false @precedence = nil + case value when Symbol @to_s = value.to_s @@ -859,7 +860,7 @@ def #{nm}=(v) attr_reader :value def dummy? - @dummyp + @dummy end def terminal? From b3992fb1e8ad9621746f6c7bf5fc8a60466ad855 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 21:48:12 +0200 Subject: [PATCH 163/619] Comment on Sym#string_symbol? --- lib/racc/grammar.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index cd9376b7..e3f41362 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -886,6 +886,8 @@ def should_be_terminal? @should_be_terminal end + # is this a terminal which is written as a string literal in the grammar? + # (if so, it shouldn't appear on the LHS of any rule) def string_symbol? @string end From 78925c333b6860aea7adce7e1acedb5edde5b543 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 21:50:56 +0200 Subject: [PATCH 164/619] Simplify implementation of States#check_useless --- lib/racc/state.rb | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 27bd79d3..b54cf2b4 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -556,18 +556,10 @@ def pack(state) end def check_useless - used = [] + @symboltable.nonterminals.each { |nt| nt.useless = true } @actions.each_reduce do |act| - if act.refn == 0 - act.rule.useless = true - else - t = act.rule.target - used[t.ident] = t - end - end - @symboltable.nt_base.upto(@symboltable.nt_max - 1) do |n| - unless used[n] - @symboltable[n].useless = true + if act.refn > 0 + act.rule.target.useless = false end end end From 1fb66f70ecc15a3d66d66daa3cb110a9cbcc0de9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 21:51:33 +0200 Subject: [PATCH 165/619] SymbolTable#nt_max is now unused --- lib/racc/grammar.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index e3f41362..c1a081a5 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -759,10 +759,6 @@ def nt_base @terms.size end - def nt_max - @symbols.size - end - def each(&block) @symbols.each(&block) end From f0779c9d06fd69813aa429a10085719dca1bdf9f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 21:52:57 +0200 Subject: [PATCH 166/619] Use attr_reader to define reader methods on SymbolTable --- lib/racc/grammar.rb | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index c1a081a5..eb80d941 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -714,7 +714,6 @@ def ptr_bug! end class SymbolTable - include Enumerable def initialize @@ -747,6 +746,8 @@ def intern(val, dummy = false) end end + attr_reader :terminals + attr_reader :nonterminals attr_reader :symbols alias to_a symbols @@ -756,24 +757,16 @@ def delete(sym) end def nt_base - @terms.size + @terminals.size end def each(&block) @symbols.each(&block) end - def terminals - @terms - end - - def nonterminals - @nterms - end - def fix - @terms, @nterms = @symbols.partition(&:terminal?) - @symbols = @terms + @nterms + @terminals, @nonterminals = @symbols.partition(&:terminal?) + @symbols = @terminals + @nonterminals # number Syms so terminals have the lower numbers @symbols.each_with_index(&:ident=) check_terminals @@ -919,7 +912,6 @@ def rule Rule.new(nil, [self], UserAction.empty) end - def nullable? @null end From 6b6285df8fe6cec427f34b904f5bbc06d415d5dd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 21:54:08 +0200 Subject: [PATCH 167/619] Use attr_accessor :serialized to make Sym a little more concise --- lib/racc/grammar.rb | 6 +----- lib/racc/parserfilegenerator.rb | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index eb80d941..84bc6b8a 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -881,14 +881,10 @@ def string_symbol? @string end - def serialize - @serialized - end - # some tokens are written one way in the grammar, but the actual value # expected from the lexer is different # you can set this up using a 'convert' block - attr_writer :serialized + attr_accessor :serialized attr_accessor :precedence attr_accessor :assoc diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index 0360f02c..3d58ecb4 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -334,7 +334,7 @@ def sym_int_hash(name, h) @f.print "#{name} = {" h.to_a.sort_by {|sym, i| i }.each do |sym, i| @f.print sep; sep = ",\n" - @f.printf " %s => %d", sym.serialize, i + @f.printf " %s => %d", sym.serialized, i end line " }" end From 0327c30d86c99c50d22d234d810d0411571406b7 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:01:16 +0200 Subject: [PATCH 168/619] Nothing ever calls Rule#empty? --- lib/racc/grammar.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 84bc6b8a..a9241884 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -580,10 +580,6 @@ def size @symbols.size end - def empty? - @symbols.empty? - end - def to_s "#" end From 4010ca0ab9b6d0a9e0cd0ce0973c0831c6067b26 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:01:35 +0200 Subject: [PATCH 169/619] Simplify (and comment on) Rule#accept? --- lib/racc/grammar.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index a9241884..4452e5bf 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -584,12 +584,9 @@ def to_s "#" end + # is this the 'end' rule which is applied last in a successful parse? def accept? - if tok = @symbols[-1] - tok.anchor? - else - false - end + @symbols.last && @symbols.last.anchor? end def each(&block) From 99a5cd17f7913154c4824ff04ff52d2bf8bc8b39 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:03:59 +0200 Subject: [PATCH 170/619] Nothing ever calls Rule#prec --- lib/racc/grammar.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 4452e5bf..1c8bddbb 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -547,17 +547,6 @@ def precedence=(sym) @precedence ||= sym end - def prec(sym, &block) - @specified_prec = sym - if block - unless @action.empty? - raise CompileError, 'both of rule action block and prec block given' - end - @action = UserAction.proc(block) - end - self - end - attr_accessor :specified_prec def useless? From 2b285ec592126fcefdaa0ebe278b99019b07ed94 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:10:03 +0200 Subject: [PATCH 171/619] Specified precedence is always set to a Sym from the beginning --- lib/racc/grammar.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 1c8bddbb..6faabb03 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -195,9 +195,6 @@ def initialize def grammar flush_delayed - @grammar.select(&:specified_prec).each do |rule| - rule.specified_prec = @grammar.intern(rule.specified_prec) - end @grammar.init @grammar end From 54d1116d7ccf91a81304a2439efa273768d1d81a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:13:11 +0200 Subject: [PATCH 172/619] Rule#specified_precedence is redundant --- lib/racc/grammar.rb | 20 +++++++------------- lib/racc/grammarfileparser.rb | 4 +--- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 6faabb03..03549f23 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -382,7 +382,6 @@ def add_start_rule UserAction.empty) r.ident = 0 r.hash = 0 - r.precedence = nil @rules.unshift r end @@ -418,7 +417,10 @@ def compute_locate t = tok if tok.terminal? end end - rule.precedence = t + + # if no explicit precedence was set for this Rule, it automatically + # inherits the precedence value of its LAST terminal + rule.precedence ||= t end end @@ -497,7 +499,7 @@ def compute_useless end class Rule - def initialize(target, syms, act) + def initialize(target, syms, act, precedence = nil) @target = target # LHS of rule (may be `nil` if not yet known) @symbols = syms # RHS of rule @action = act # run this code when reducing @@ -505,9 +507,8 @@ def initialize(target, syms, act) @ident = nil @hash = nil - @precedence = nil - @specified_prec = nil @useless = nil + @precedence = precedence @ptrs = (0..@symbols.size).map do |idx| LocationPointer.new(self, idx) @@ -535,17 +536,12 @@ def each_rule(&block) attr_accessor :ident attr_accessor :hash attr_reader :ptrs - - def precedence - @specified_prec || @precedence - end + attr_reader :precedence def precedence=(sym) @precedence ||= sym end - attr_accessor :specified_prec - def useless? @useless end @@ -586,7 +582,6 @@ def replace(src, dest) end class UserAction - def UserAction.source_text(src) new(src, nil) end @@ -625,7 +620,6 @@ def to_s end alias inspect to_s - end class OrMark < Struct.new(:lineno) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index a101f449..df378c36 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -223,9 +223,7 @@ def add_rule(target, list, prec = nil) act = UserAction.empty end list.map! {|s| s.kind_of?(UserAction) ? embedded_action(s) : s } - rule = Rule.new(target, list, act) - rule.specified_prec = prec - @grammar.add rule + @grammar.add(Rule.new(target, list, act, prec)) end def embedded_action(act) From 7376e467bde46ed14640008fba755a535c50b12a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:38:26 +0200 Subject: [PATCH 173/619] Track Sym heads as we go, rather than computing them after the grammar is fully defined --- lib/racc/grammar.rb | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 03549f23..b42ff6b7 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -366,7 +366,6 @@ def init @rules.freeze fix_ident compute_hash - compute_heads @symboltable.fix compute_locate @symboltable.nonterminals.each {|t| compute_expand t } @@ -399,13 +398,6 @@ def compute_hash end end - # Sym#heads - def compute_heads - @rules.each do |rule| - rule.target.heads.push rule.ptrs[0] - end - end - # Sym#locate def compute_locate @rules.each do |rule| @@ -513,11 +505,19 @@ def initialize(target, syms, act, precedence = nil) @ptrs = (0..@symbols.size).map do |idx| LocationPointer.new(self, idx) end + + @target.heads << @ptrs[0] if @target end - attr_accessor :target attr_reader :symbols attr_reader :action + attr_reader :target + + def target=(target) + raise 'target already set' if @target + @target = target + @target.heads << @ptrs[0] + end def |(x) @alternatives.push x.rule @@ -575,9 +575,15 @@ def each(&block) @symbols.each(&block) end - def replace(src, dest) - @target = dest - @symbols = @symbols.map {|s| s == src ? dest : s } + # sometimes a Rule is instantiated before the target is actually known + # it may be given a "placeholder" target first, which is later replaced + # with the real one + def replace(placeholder, actual) + raise 'wrong placeholder' if placeholder != @target + @target.heads.delete(ptrs[0]) if @target + @target = actual + @target.heads << @ptrs[0] + @symbols.map! { |s| s == placeholder ? actual : s } end end From d3357299d13ff4fa15857179fe572777e0f4b8ee Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:45:12 +0200 Subject: [PATCH 174/619] Rename LocationPointer#hash to #ident This provides greater clarity. In reality, this property has nothing to do with hashing. Its purpose is to provide a canonical order for all the LocationPointers in the grammar. --- lib/racc/grammar.rb | 2 +- lib/racc/state.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index b42ff6b7..ed7a9b21 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -659,7 +659,7 @@ def symbol @rule.symbols[@index] end - def hash + def ident @rule.hash + @index end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index b54cf2b4..fe2048dc 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -622,7 +622,7 @@ def make_closure(core) t.expand.each { |i| set.add(i) } end end - set.sort_by(&:hash) + set.sort_by(&:ident) end def check_la(la_rules) From 9ad00278e0084edbb6d7de70ccc6a15b2e5a3669 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:48:35 +0200 Subject: [PATCH 175/619] Set LocationPointer#ident directly rather than deriving it from Rule#hash Again, calling Rule#hash a 'hash' is just confusing. It has nothing to do with hashing. It's just a number which is used to derive a canonical ordering for LocationPointers. Make that clear in the code. --- lib/racc/grammar.rb | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index ed7a9b21..3a15aab2 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -365,7 +365,6 @@ def init add_start_rule @rules.freeze fix_ident - compute_hash @symboltable.fix compute_locate @symboltable.nonterminals.each {|t| compute_expand t } @@ -379,23 +378,13 @@ def add_start_rule r = Rule.new(@symboltable.dummy, [@start, @symboltable.anchor, @symboltable.anchor], UserAction.empty) - r.ident = 0 - r.hash = 0 - @rules.unshift r + @rules.unshift(r) end # Rule#ident def fix_ident @rules.each_with_index(&:ident=) - end - - # Rule#hash - def compute_hash - hash = 4 # size of dummy rule - @rules.each do |rule| - rule.hash = hash - hash += (rule.size + 1) - end + @rules.flat_map(&:ptrs).each_with_index(&:ident=) end # Sym#locate @@ -498,7 +487,6 @@ def initialize(target, syms, act, precedence = nil) @alternatives = [] @ident = nil - @hash = nil @useless = nil @precedence = precedence @@ -534,7 +522,6 @@ def each_rule(&block) end attr_accessor :ident - attr_accessor :hash attr_reader :ptrs attr_reader :precedence @@ -648,10 +635,12 @@ class LocationPointer def initialize(rule, i) @rule = rule @index = i + @ident = nil # canonical ordering for all LocationPointers end attr_reader :rule attr_reader :index + attr_accessor :ident # Sym which immediately follows this position in RHS # or nil if it points to the end of RHS @@ -659,10 +648,6 @@ def symbol @rule.symbols[@index] end - def ident - @rule.hash + @index - end - def to_s sprintf('(%d,%d %s)', @rule.ident, @index, (reduce? ? '#' : symbol.to_s)) end From a9622e8204d346c8d80e9fcee4b42454f5d39cbd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:50:37 +0200 Subject: [PATCH 176/619] Don't mix setting default precedence into compute_locate compute_locate actually has nothing to do with precedence. Setting the default precedence for rules which did not have explicit precedence set doesn't belong there. --- lib/racc/grammar.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 3a15aab2..1cfd2395 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -398,10 +398,6 @@ def compute_locate t = tok if tok.terminal? end end - - # if no explicit precedence was set for this Rule, it automatically - # inherits the precedence value of its LAST terminal - rule.precedence ||= t end end @@ -523,7 +519,10 @@ def each_rule(&block) attr_accessor :ident attr_reader :ptrs - attr_reader :precedence + + def precedence + @precedence || @symbols.select(&:terminal?).last + end def precedence=(sym) @precedence ||= sym From 7ec0a4fdca4e41dce861cd92782baf3928fb9683 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 22:55:30 +0200 Subject: [PATCH 177/619] Track Sym locations as we go, rather than computing them after the grammar is fully defined --- lib/racc/grammar.rb | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 1cfd2395..6c2689c9 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -366,7 +366,6 @@ def init @rules.freeze fix_ident @symboltable.fix - compute_locate @symboltable.nonterminals.each {|t| compute_expand t } compute_nullable compute_useless @@ -387,20 +386,6 @@ def fix_ident @rules.flat_map(&:ptrs).each_with_index(&:ident=) end - # Sym#locate - def compute_locate - @rules.each do |rule| - t = nil - rule.ptrs.each do |ptr| - unless ptr.reduce? - tok = ptr.symbol - tok.locate.push ptr - t = tok if tok.terminal? - end - end - end - end - # Sym#expand def compute_expand(t) puts "expand> #{t.to_s}" if @debug_symbol @@ -486,10 +471,12 @@ def initialize(target, syms, act, precedence = nil) @useless = nil @precedence = precedence - @ptrs = (0..@symbols.size).map do |idx| - LocationPointer.new(self, idx) - end + @ptrs = (0..@symbols.size).map { |idx| LocationPointer.new(self, idx) } + + # reverse lookup from each Sym in RHS to location in rule where it appears + @symbols.each_with_index { |sym, idx| sym.locate << @ptrs[idx] } + # reverse lookup from LHS of rule to starting location in rule @target.heads << @ptrs[0] if @target end From 79ab5d081bc5376cea4ddc0f5b3180a248036631 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 13 Nov 2015 23:12:24 +0200 Subject: [PATCH 178/619] Simplify implementation of Grammar#compute_expand --- lib/racc/grammar.rb | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 6c2689c9..d9f6ac19 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -352,9 +352,7 @@ def _wrap(wrapper, wrapped, block) end end - # # Computation - # def init return if @closed @@ -366,7 +364,7 @@ def init @rules.freeze fix_ident @symboltable.fix - @symboltable.nonterminals.each {|t| compute_expand t } + compute_expand compute_nullable compute_useless end @@ -386,30 +384,25 @@ def fix_ident @rules.flat_map(&:ptrs).each_with_index(&:ident=) end - # Sym#expand - def compute_expand(t) - puts "expand> #{t.to_s}" if @debug_symbol - t.expand = _compute_expand(t, Set.new, []) - puts "expand< #{t.to_s}: #{t.expand.to_s}" if @debug_symbol - end - - def _compute_expand(t, set, lock) - if tmp = t.expand - return set.merge(tmp) - end - - tok = nil - t.heads.each { |ptr| set.add(ptr) } - t.heads.each do |ptr| - tok = ptr.symbol - if tok and tok.nonterminal? - unless lock[tok.ident] - lock[tok.ident] = true - _compute_expand tok, set, lock + # Sym#expand (non-terminals only) + # After we parse an instance of this non-terminal, + # what are all the locations in a Rule where we could possibly be? + # (Which tells us what all the Syms which could validly follow are, + # among other things...) + def compute_expand + @symboltable.nonterminals.each do |t| + worklist = t.heads.dup + t.expand = Set.new + + until worklist.empty? + ptr = worklist.shift + if t.expand.add?(ptr) + if (tok = ptr.symbol) && tok.nonterminal? + worklist.concat(tok.heads) + end end end end - set end # Sym#nullable? From 7e24387d94e28db2669691f593c1e1706e74acfa Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 05:50:06 +0200 Subject: [PATCH 179/619] Reordered some methods in Rule --- lib/racc/grammar.rb | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index d9f6ac19..40956c52 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -357,13 +357,14 @@ def _wrap(wrapper, wrapped, block) def init return if @closed @closed = true + # if 'start' nonterminal was not explicitly set, just take the first one @start ||= @rules.map(&:target).detect { |sym| !sym.dummy? } fail CompileError, 'no rule in input' if @rules.empty? add_start_rule @rules.freeze + fix_ident - @symboltable.fix compute_expand compute_nullable compute_useless @@ -382,6 +383,7 @@ def add_start_rule def fix_ident @rules.each_with_index(&:ident=) @rules.flat_map(&:ptrs).each_with_index(&:ident=) + @symboltable.fix_ident end # Sym#expand (non-terminals only) @@ -473,9 +475,11 @@ def initialize(target, syms, act, precedence = nil) @target.heads << @ptrs[0] if @target end + attr_accessor :ident attr_reader :symbols attr_reader :action attr_reader :target + attr_reader :ptrs def target=(target) raise 'target already set' if @target @@ -497,9 +501,6 @@ def each_rule(&block) @alternatives.each(&block) end - attr_accessor :ident - attr_reader :ptrs - def precedence @precedence || @symbols.select(&:terminal?).last end @@ -520,6 +521,14 @@ def inspect "#" end + def to_s + "#" + end + + def each(&block) + @symbols.each(&block) + end + def [](idx) @symbols[idx] end @@ -528,19 +537,11 @@ def size @symbols.size end - def to_s - "#" - end - # is this the 'end' rule which is applied last in a successful parse? def accept? @symbols.last && @symbols.last.anchor? end - def each(&block) - @symbols.each(&block) - end - # sometimes a Rule is instantiated before the target is actually known # it may be given a "placeholder" target first, which is later replaced # with the real one @@ -707,7 +708,7 @@ def each(&block) @symbols.each(&block) end - def fix + def fix_ident @terminals, @nonterminals = @symbols.partition(&:terminal?) @symbols = @terminals + @nonterminals # number Syms so terminals have the lower numbers From f4ae8b04ad3a55cdf91aa00dc0797c0f20dd1170 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 06:03:20 +0200 Subject: [PATCH 180/619] Grammar doesn't need Forwardable any more --- lib/racc/grammar.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 40956c52..9ed76537 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -8,7 +8,6 @@ require 'racc/sourcetext' require 'racc/logfilegenerator' require 'racc/exception' -require 'forwardable' require 'set' module Racc @@ -47,8 +46,6 @@ def to_s "" end - extend Forwardable - def intern(value, dummy = false) @symboltable.intern(value, dummy) end From b2e19d831233b4e7b3bf11e619e76519a96231ef Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 06:05:48 +0200 Subject: [PATCH 181/619] Replace #n_useless_nonterminals, etc with #useless_nonterminals and #useless_rules --- bin/racc | 16 ++++++++-------- lib/racc/grammar.rb | 30 +++++++++++------------------- test/test_chk_y.rb | 8 ++++---- test/test_scan_y.rb | 8 ++++---- 4 files changed, 27 insertions(+), 35 deletions(-) diff --git a/bin/racc b/bin/racc index d4d341e2..c421818e 100755 --- a/bin/racc +++ b/bin/racc @@ -225,11 +225,11 @@ def log_conflict(states) end def report_useless(grammar) - if grammar.useless_nonterminal_exist? - $stderr.puts "#{grammar.n_useless_nonterminals} useless nonterminals" + if grammar.useless_nonterminals.any? + $stderr.puts "#{grammar.useless_nonterminals.size} useless nonterminals" end - if grammar.useless_rule_exist? - $stderr.puts "#{grammar.n_useless_rules} useless rules" + if grammar.useless_rules.any? + $stderr.puts "#{grammar.useless_rules.size} useless rules" end if grammar.start.useless? $stderr.puts 'fatal: start symbol does not derive any sentence' @@ -238,11 +238,11 @@ end def log_useless(grammar) logging('a') {|f| - if grammar.useless_nonterminal_exist? - f.puts "useless nts:#{grammar.n_useless_nonterminals}" + if grammar.useless_nonterminals.any? + f.puts "useless nts:#{grammar.useless_nonterminals.size}" end - if grammar.useless_rule_exist? - f.puts "useless rules:#{grammar.n_useless_rules}" + if grammar.useless_rules.any? + f.puts "useless rules:#{grammar.useless_rules.size}" end } end diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 9ed76537..bd1c9247 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -58,20 +58,12 @@ def nonterminal_base @symboltable.nt_base end - def useless_nonterminal_exist? - n_useless_nonterminals() != 0 + def useless_nonterminals + @symboltable.nonterminals.select(&:useless?) end - def n_useless_nonterminals - @n_useless_nonterminals ||= @symboltable.nonterminals.count(&:useless?) - end - - def useless_rule_exist? - n_useless_rules() != 0 - end - - def n_useless_rules - @n_useless_rules ||= @rules.count(&:useless?) + def useless_rules + @rules.select(&:useless?) end def n_expected_srconflicts=(value) @@ -111,20 +103,20 @@ def parser_class report["#{states.n_rrconflicts} reduce/reduce conflicts"] end g = states.grammar - if g.useless_nonterminal_exist? - report["#{g.n_useless_nonterminals} useless nonterminals"] + if g.useless_nonterminals.any? + report["#{g.useless_nonterminals.size} useless nonterminals"] end - if g.useless_rule_exist? - report["#{g.n_useless_rules} useless rules"] + if g.useless_rules.any? + report["#{g.useless_rules.size} useless rules"] end end states.state_transition_table.parser_class end def write_log(path) - File.open(path, 'w') {|f| - LogFileGenerator.new(states()).output f - } + File.open(path, 'w') do |f| + LogFileGenerator.new(states()).output(f) + end end # diff --git a/test/test_chk_y.rb b/test/test_chk_y.rb index cabad157..4a409fa4 100644 --- a/test/test_chk_y.rb +++ b/test/test_chk_y.rb @@ -23,8 +23,8 @@ def test_compile_chk_y assert_equal 0, @states.n_srconflicts assert_equal 0, @states.n_rrconflicts - assert_equal 0, grammar.n_useless_nonterminals - assert_equal 0, grammar.n_useless_rules + assert_equal 0, grammar.useless_nonterminals.size + assert_equal 0, grammar.useless_rules.size assert_nil grammar.n_expected_srconflicts end @@ -43,8 +43,8 @@ def test_compile_chk_y_line_convert assert_equal 0, @states.n_srconflicts assert_equal 0, @states.n_rrconflicts - assert_equal 0, grammar.n_useless_nonterminals - assert_equal 0, grammar.n_useless_rules + assert_equal 0, grammar.useless_nonterminals.size + assert_equal 0, grammar.useless_rules.size assert_nil grammar.n_expected_srconflicts end end diff --git a/test/test_scan_y.rb b/test/test_scan_y.rb index b5f95936..6ff2ad66 100644 --- a/test/test_scan_y.rb +++ b/test/test_scan_y.rb @@ -23,8 +23,8 @@ def test_compile assert_equal 0, @states.n_srconflicts assert_equal 0, @states.n_rrconflicts - assert_equal 0, grammar.n_useless_nonterminals - assert_equal 0, grammar.n_useless_rules + assert_equal 0, grammar.useless_nonterminals.size + assert_equal 0, grammar.useless_rules.size assert_nil grammar.n_expected_srconflicts end @@ -43,8 +43,8 @@ def test_compile_line_convert assert_equal 0, @states.n_srconflicts assert_equal 0, @states.n_rrconflicts - assert_equal 0, grammar.n_useless_nonterminals - assert_equal 0, grammar.n_useless_rules + assert_equal 0, grammar.useless_nonterminals.size + assert_equal 0, grammar.useless_rules.size assert_nil grammar.n_expected_srconflicts end end From 9871d5f9b811fec3b20f665fa4b4bc78099cee2b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 06:21:56 +0200 Subject: [PATCH 182/619] Comment on Grammar#_add --- lib/racc/grammar.rb | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index bd1c9247..0ddea47d 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -198,27 +198,36 @@ def method_missing(mid, *args, &block) unless args.size == 1 raise ArgumentError, "too many arguments for #{mid} (#{args.size} for 1)" end - _add target, args.first - end - - def _add(target, x) - case x + _add(target, args.first) + end + + # We just received a call to `self.nonterminal = definition` + # But when we were executing that "definition", we didn't know what the + # nonterminal on the LHS would be + # Depending on the DSL method(s) which were used in the "definition", + # `rhs` may be: + # - A "placeholder" target symbol, which should be replaced with the + # "real" target in all the rules which the definition created + # - A `Rule`, whose target we didn't know at the time of definition. + # Its target will be `nil` right now; fix that up. + def _add(target, rhs) + case rhs when Sym @delayed.each do |rule| - rule.replace x, target if rule.target == x + rule.replace(rhs, target) if rule.target == rhs end - @grammar.symboltable.delete x + @grammar.symboltable.delete(rhs) else - x.each_rule do |r| - r.target = target - @grammar.add r + rhs.each_rule do |rule| + rule.target = target + @grammar.add(rule) end end flush_delayed end def _delayed_add(rule) - @delayed.push rule + @delayed.push(rule) end def _added?(sym) From eec0aa41a5c5a93186dcf7f7a31314076e646ed7 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 19:47:11 +0200 Subject: [PATCH 183/619] Simplify USER_CODE_LABELS (now that we don't support 'driver' or 'prepare' blocks) --- lib/racc/grammarfileparser.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index df378c36..0049eebc 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -123,8 +123,7 @@ module Racc raise 'Racc boot script fatal: R/R conflict in build' end - class GrammarFileParser # reopen - + class GrammarFileParser # reopen class Result def initialize(grammar, filename) @grammar = grammar @@ -249,24 +248,19 @@ def parse_user_code end end - USER_CODE_LABELS = { - 'header' => :header, - 'inner' => :inner, - 'footer' => :footer, - } + USER_CODE_LABELS = %w(header inner footer) def canonical_label(src) label = src.to_s.strip.downcase.slice(/\w+/) - unless USER_CODE_LABELS.key?(label) + unless USER_CODE_LABELS.include?(label) raise CompileError, "unknown user code type: #{label.inspect}" end label end def add_user_code(label, src) - @result.params.send(USER_CODE_LABELS[label]).push src + @result.params.send(label.to_sym).push(src) end - end From 85ce14e29dec09c1be98d5ea10f7c5fb687ab582 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 20:43:26 +0200 Subject: [PATCH 184/619] Remove undocumented (and never used) user code block file inclusion feature Racc has (or had) a feature, which probably no-one ever knew about, except the original author. If you wrote a user code block like this: ---- header=path/to/a/file.rb and/another/file.rb ...then the contents of those files would be copied into the user code. This was not documented. I have looked through the repos of every single gem on Rubygems which has a dependency on Racc, checked all of their grammars, and did not find a single example of anyone using this feature. Therefore, nuke it. --- lib/racc/grammarfileparser.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 0049eebc..f39c6f53 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -238,12 +238,8 @@ def parse_user_code _, *blocks = *@scanner.epilogue.split(/^----/) blocks.each do |block| header, *body = block.lines.to_a - label0, pathes = *header.sub(/\A-+/, '').split('=', 2) - label = canonical_label(label0) - (pathes ? pathes.strip.split(' ') : []).each do |path| - add_user_code label, SourceText.new(File.read(path), path, 1) - end - add_user_code label, SourceText.new(body.join(''), @filename, line + 1) + label = canonical_label(header.sub(/\A-+/, '')) + add_user_code(label, SourceText.new(body.join(''), @filename, line + 1)) line += (1 + body.size) end end From d68f3f1a192fbecf6ad7d84783de4ecf139bb4bf Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 20:47:07 +0200 Subject: [PATCH 185/619] Remove unneeded misc/dist.sh script The world has moved on, and Rubygems is now used for packaging Racc. This shell script for generating tarballs isn't needed. If someone wants a tarball, they can go to GitHub and click "Download Archive". --- Manifest.txt | 1 - misc/dist.sh | 29 ----------------------------- 2 files changed, 30 deletions(-) delete mode 100644 misc/dist.sh diff --git a/Manifest.txt b/Manifest.txt index a29af678..c671ff97 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -31,7 +31,6 @@ lib/racc/sourcetext.rb lib/racc/state.rb lib/racc/statetransitiontable.rb lib/racc/static.rb -misc/dist.sh rdoc/en/NEWS.en.rdoc rdoc/en/grammar.en.rdoc rdoc/ja/NEWS.ja.rdoc diff --git a/misc/dist.sh b/misc/dist.sh deleted file mode 100644 index d98b30d2..00000000 --- a/misc/dist.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -rm -rf tmp -mkdir tmp -cd tmp - -# racc, raccrt -cvs -Q export -r`echo V$version | tr . -` -d racc-$version racc -cd racc-$version - make bootstrap lib/racc/parser-text.rb doc - rm -r doc web bits fastcache -cd .. -mkdir -p raccrt-$version/lib/racc -mv racc-$version/lib/racc/parser.rb raccrt-$version/lib/racc -mv racc-$version/ext raccrt-$version -cp racc-$version/README.* raccrt-$version -cp racc-$version/COPYING raccrt-$version -tar czf $ardir/racc/racc-$version.tar.gz racc-$version -tar czf $ardir/raccrt/raccrt-$version.tar.gz raccrt-$version - -# -all -mkdir -p racc-$version-all/packages -cp racc-$version/README.* racc-$version-all -mv racc-$version racc-$version-all/packages/racc -mv raccrt-$version racc-$version-all/packages/raccrt -tar czf $ardir/racc/racc-$version-all.tar.gz racc-$version-all - -cd .. -rm -rf tmp From 4a2d3c7d7642b7818dc77132c188f0bb1d6f76ce Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 23:26:42 +0200 Subject: [PATCH 186/619] Rename Grammar#init to #finished! `init` is a misleading name. It implies that the method is called just when creating a new Grammar object and preparing it for use. Actually, it is called after all the rules have already been defined, in order to perform some computations which can only be done when all the rule definitions are available. --- lib/racc/grammar.rb | 4 ++-- lib/racc/grammarfileparser.rb | 2 +- lib/racc/state.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 0ddea47d..3cb371e5 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -184,7 +184,7 @@ def initialize def grammar flush_delayed - @grammar.init + @grammar.finished! @grammar end @@ -352,7 +352,7 @@ def _wrap(wrapper, wrapped, block) # Computation - def init + def finished! return if @closed @closed = true diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index f39c6f53..6619a11d 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -161,7 +161,7 @@ def parse(src, filename = '-', lineno = 1) parse_user_code - @result.grammar.init + @result.grammar.finished! @result end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index fe2048dc..abdf8324 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -98,7 +98,7 @@ def nfa private def compute_nfa - @grammar.init + @grammar.finished! # add state 0 core_to_state Set[@grammar[0].ptrs[0]] # generate LALR states From a455dcb699f6e5bbf4ddd9726d01d432683fc61a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 23:29:01 +0200 Subject: [PATCH 187/619] By the time we generate the NFA for a Grammar, it is already closed So there is no need to manually close it again. --- lib/racc/state.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index abdf8324..3417e2d1 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -98,7 +98,6 @@ def nfa private def compute_nfa - @grammar.finished! # add state 0 core_to_state Set[@grammar[0].ptrs[0]] # generate LALR states From a6113535b5dbc1f79ad3da56763d0c02b566dfa3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 23:29:48 +0200 Subject: [PATCH 188/619] Remove unused States#each_index --- lib/racc/state.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 3417e2d1..c0df3357 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -46,10 +46,6 @@ def [](i) @states[i] end - def each_index(&block) - @states.each_index(&block) - end - extend Forwardable def_delegator "@states", :each From 278aca129322081c457a1404ac3180570e49a5e5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 23:31:47 +0200 Subject: [PATCH 189/619] Make States#n_srconflicts and #n_rrconflicts more concise --- lib/racc/state.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index c0df3357..583a38e5 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -63,7 +63,7 @@ def srconflict_exist? end def n_srconflicts - @n_srconflicts ||= inject(0) {|sum, st| sum + st.n_srconflicts } + map(&:n_srconflicts).reduce(0, &:+) end def rrconflict_exist? @@ -71,7 +71,7 @@ def rrconflict_exist? end def n_rrconflicts - @n_rrconflicts ||= inject(0) {|sum, st| sum + st.n_rrconflicts } + map(&:n_rrconflicts).reduce(0, &:+) end def state_transition_table From e454d321bdc0061d14b69aad79b2961b92655da8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 23:32:19 +0200 Subject: [PATCH 190/619] Remove unneeded State#hash alias Each State is unique, so just using the default `Object#hash` method will work just fine. (I don't even know if States are used as hash keys or not...) --- lib/racc/state.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 583a38e5..6dc76b5b 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -579,7 +579,6 @@ def initialize(ident, core) end attr_reader :ident - alias hash ident attr_reader :core attr_reader :closure From e18805316dbb33d3caf5fe80c5c1b2fdce519857 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 23:33:38 +0200 Subject: [PATCH 191/619] Remove unneeded State#== method --- lib/racc/state.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 6dc76b5b..60c5dd3f 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -562,7 +562,6 @@ def check_useless # A LALR state. class State - def initialize(ident, core) @ident = ident @core = core @@ -602,12 +601,6 @@ def inspect alias to_s inspect - def ==(oth) - @ident == oth.ident - end - - alias eql? == - def make_closure(core) set = Set.new core.each do |ptr| From ca68335af531b4e7893e889a8d413aea805b98a6 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sat, 14 Nov 2015 23:34:20 +0200 Subject: [PATCH 192/619] Remove debug print statements --- lib/racc/state.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 60c5dd3f..6cb57bb6 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -654,11 +654,6 @@ def rruleid(rule) if i = @la_rules.index(rule.ident) @la_rules_i + i else - puts '/// rruleid' - p self - p rule - p @rrules - p @la_rules_i raise 'racc: fatal: cannot get reduce rule id' end end From e099d3ac51226dc0c8728061e6cf4729300d0d30 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 00:09:10 +0200 Subject: [PATCH 193/619] State#srconf and #rrconf can only ever contain 1 entry per key (token) --- lib/racc/logfilegenerator.rb | 20 ++++++++------------ lib/racc/state.rb | 8 ++++---- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index ac541a59..5d8f98c8 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -136,20 +136,16 @@ def outact(f, t, act) end end - def outsrconf(f, confs) - confs.each do |c| - r = c.reduce - f.printf " %-12s [reduce using rule %d (%s)]\n", - c.shift.to_s, r.ident, r.target.to_s - end + def outsrconf(f, conf) + r = conf.reduce + f.printf(" %-12s [reduce using rule %d (%s)]\n", + conf.shift.to_s, r.ident, r.target.to_s) end - def outrrconf(f, confs) - confs.each do |c| - r = c.low_prec - f.printf " %-12s [reduce using rule %d (%s)]\n", - c.token.to_s, r.ident, r.target.to_s - end + def outrrconf(f, conf) + r = conf.low_prec + f.printf(" %-12s [reduce using rule %d (%s)]\n", + conf.token.to_s, r.ident, r.target.to_s) end # diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 6cb57bb6..d5c4cdcb 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -571,8 +571,8 @@ def initialize(ident, core) @ritems = nil @action = {} @defact = nil - @rrconf = Hash.new { |h,k| h[k] = [] } - @srconf = Hash.new { |h,k| h[k] = [] } + @rrconf = {} + @srconf = {} @closure = make_closure(@core) end @@ -669,11 +669,11 @@ def la=(la) end def rr_conflict(high, low, ctok) - @rrconf[ctok] << RRconflict.new(@ident, high, low, ctok) + @rrconf[ctok] = RRconflict.new(@ident, high, low, ctok) end def sr_conflict(shift, reduce) - @srconf[shift] << SRconflict.new(@ident, shift, reduce) + @srconf[shift] = SRconflict.new(@ident, shift, reduce) end def n_srconflicts From 420796ade461ee2675023909437830ef73830520 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:27:52 +0200 Subject: [PATCH 194/619] Rename SRconflict/RRconflict to SRConflict/RRConflict --- lib/racc/state.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index d5c4cdcb..c9babe42 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -669,11 +669,11 @@ def la=(la) end def rr_conflict(high, low, ctok) - @rrconf[ctok] = RRconflict.new(@ident, high, low, ctok) + @rrconf[ctok] = RRConflict.new(@ident, high, low, ctok) end def sr_conflict(shift, reduce) - @srconf[shift] = SRconflict.new(@ident, shift, reduce) + @srconf[shift] = SRConflict.new(@ident, shift, reduce) end def n_srconflicts @@ -855,7 +855,7 @@ def inspect end end - class SRconflict + class SRConflict def initialize(sid, shift, reduce) @stateid = sid @shift = shift @@ -872,7 +872,7 @@ def to_s end end - class RRconflict + class RRConflict def initialize(sid, high, low, tok) @stateid = sid @high_prec = high From d3f5e098bcdd4da46cf4cb979531fb9d522b9e4a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:29:00 +0200 Subject: [PATCH 195/619] Use Struct to make SRConflict/RRConflict more concise --- lib/racc/state.rb | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index c9babe42..ef266066 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -855,40 +855,17 @@ def inspect end end - class SRConflict - def initialize(sid, shift, reduce) - @stateid = sid - @shift = shift - @reduce = reduce - end - - attr_reader :stateid - attr_reader :shift - attr_reader :reduce - + class SRConflict < Struct.new(:stateid, :shift, :reduce) def to_s sprintf('state %d: S/R conflict rule %d reduce and shift %s', - @stateid, @reduce.ruleid, @shift.to_s) + stateid, reduce.ruleid, shift.to_s) end end - class RRConflict - def initialize(sid, high, low, tok) - @stateid = sid - @high_prec = high - @low_prec = low - @token = tok - end - - attr_reader :stateid - attr_reader :high_prec - attr_reader :low_prec - attr_reader :token - + class RRConflict < Struct.new(:stateid, :high_prec, :low_prec, :token) def to_s sprintf('state %d: R/R conflict with rule %d and %d on %s', - @stateid, @high_prec.ident, @low_prec.ident, @token.to_s) + stateid, high_prec.ident, low_prec.ident, token.to_s) end end - end From a9d97d4f915b56c8a2d783df7d1009ffecc8cc8d Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:31:14 +0200 Subject: [PATCH 196/619] Rename Reduce#ruleid to #rule_id --- lib/racc/logfilegenerator.rb | 2 +- lib/racc/state.rb | 6 +++--- lib/racc/statetransitiontable.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 5d8f98c8..1b2c086b 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -126,7 +126,7 @@ def outact(f, t, act) t.to_s, act.goto_id when Reduce f.printf " %-12s reduce using rule %d (%s)\n", - t.to_s, act.ruleid, act.rule.target.to_s + t.to_s, act.rule_id, act.rule.target.to_s when Accept f.printf " %-12s accept\n", t.to_s when Error diff --git a/lib/racc/state.rb b/lib/racc/state.rb index ef266066..834400c1 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -533,7 +533,7 @@ def pack(state) act = state.action arr = Array.new(@grammar.size, 0) act.each do |t, a| - arr[a.ruleid] += 1 if a.kind_of?(Reduce) + arr[a.rule_id] += 1 if a.kind_of?(Reduce) end i = arr.max s = (i > 0) ? arr.index(i) : nil @@ -825,7 +825,7 @@ def initialize(rule) attr_reader :rule attr_reader :refn - def ruleid + def rule_id @rule.ident end @@ -858,7 +858,7 @@ def inspect class SRConflict < Struct.new(:stateid, :shift, :reduce) def to_s sprintf('state %d: S/R conflict rule %d reduce and shift %s', - stateid, reduce.ruleid, shift.to_s) + @stateid, reduce.ruleid, @shift.to_s) end end diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 11c57861..5e1d59f7 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -222,7 +222,7 @@ def set_table(entries, tbl, chk, ptr) def act2actid(act) case act when Shift then act.goto_id - when Reduce then -act.ruleid + when Reduce then -act.rule_id when Accept then @states.shift_n when Error then @states.reduce_n * -1 else From c0de5d88df4b0910a6384d40f9cd1350ed15e556 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:32:19 +0200 Subject: [PATCH 197/619] Use Struct to make Shift more concise --- lib/racc/state.rb | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 834400c1..5c93fc63 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -795,27 +795,18 @@ def each_shift(&block) attr_reader :accept attr_reader :error - end - - class Shift - def initialize(goto) - @goto_state = goto - end - - attr_reader :goto_state - + class Shift < Struct.new(:goto_state) def goto_id - @goto_state.ident + goto_state.ident end def inspect - "" + "" end end - class Reduce def initialize(rule) @rule = rule From 3d3d908fef6fd63f1bf17df1b1471e5012823015 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:35:48 +0200 Subject: [PATCH 198/619] Remove unused ActionTable#each_shift method --- lib/racc/state.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 5c93fc63..19711c93 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -733,7 +733,6 @@ def each_la(tbl) # The table of LALR actions. Actions are either # Shift, Reduce, Accept, or Error. class ActionTable - def initialize(rt, st) @grammar = rt @statetable = st @@ -789,10 +788,6 @@ def shift(i) @shift[i] or raise "racc: fatal: shift action #{i} does not exist" end - def each_shift(&block) - @shift.each(&block) - end - attr_reader :accept attr_reader :error end From b4b6eaa44034e8ef2a37aa0b0aa5754b553e75a2 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:36:52 +0200 Subject: [PATCH 199/619] Make ActionTable#init a bit more concise --- lib/racc/state.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 19711c93..b40adaca 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -745,9 +745,7 @@ def initialize(rt, st) def init @reduce.concat(@grammar.map { |rule| Reduce.new(rule) }) - @statetable.each do |state| - @shift.push Shift.new(state) - end + @shift.concat(@statetable.map { |state| Shift.new(state) }) @accept = Accept.new @error = Error.new end From 6c15abe87fa989da3663bcd46ec2b956891f971f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:39:18 +0200 Subject: [PATCH 200/619] Move most initialization of ActionTable into constructor --- lib/racc/state.rb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index b40adaca..c20ce328 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -733,21 +733,18 @@ def each_la(tbl) # The table of LALR actions. Actions are either # Shift, Reduce, Accept, or Error. class ActionTable - def initialize(rt, st) - @grammar = rt - @statetable = st + def initialize(grammar, statetable) + @grammar = grammar + @statetable = statetable - @reduce = [] + @reduce = @grammar.map { |rule| Reduce.new(rule) } @shift = [] - @accept = nil - @error = nil + @accept = Accept.new + @error = Error.new end def init - @reduce.concat(@grammar.map { |rule| Reduce.new(rule) }) - @shift.concat(@statetable.map { |state| Shift.new(state) }) - @accept = Accept.new - @error = Error.new + @shift = @statetable.map { |state| Shift.new(state) } end def reduce_n From 931fe9dc7dde1de1b9beef7a25e72fd0a2ca5ad1 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:49:37 +0200 Subject: [PATCH 201/619] Ruby 1.6 is long gone; remove compatibility shim --- bin/racc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bin/racc b/bin/racc index c421818e..90de277b 100755 --- a/bin/racc +++ b/bin/racc @@ -255,19 +255,13 @@ class RaccProfiler def initialize(really) @really = really @log = [] - unless ::Process.respond_to?(:times) - # Ruby 1.6 - @class = ::Time - else - @class = ::Process - end end def section(name) if @really - t1 = @class.times.utime + t1 = Process.times.utime result = yield - t2 = @class.times.utime + t2 = Process.times.utime @log.push [name, t2 - t1] result else From bd0aa584f5175c484ab888a0c179b0542c15112d Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:52:54 +0200 Subject: [PATCH 202/619] Remove useless useless_rules code (can't believe I didn't notice earlier) When first reading the code through, I thought that States#check_useless in state.rb set Rule#useless. After another look... I discover that *nothing* sets Rule#useless. Racc will never print warnings about 'useless rules', because it doesn't check for useless rules! Could a rule be... useless? Sure, it could, if there was no chance that it would ever be used in a successful parse. Can we detect this? Yeah, I think we can. BUT, if that is desired, it will be much easier to do it once all the code is nice and clean and readable. For now, just remove the useless code. --- bin/racc | 6 ------ lib/racc/grammar.rb | 16 ---------------- lib/racc/logfilegenerator.rb | 4 ---- test/test_chk_y.rb | 2 -- test/test_scan_y.rb | 2 -- 5 files changed, 30 deletions(-) diff --git a/bin/racc b/bin/racc index 90de277b..88e8dedd 100755 --- a/bin/racc +++ b/bin/racc @@ -228,9 +228,6 @@ def report_useless(grammar) if grammar.useless_nonterminals.any? $stderr.puts "#{grammar.useless_nonterminals.size} useless nonterminals" end - if grammar.useless_rules.any? - $stderr.puts "#{grammar.useless_rules.size} useless rules" - end if grammar.start.useless? $stderr.puts 'fatal: start symbol does not derive any sentence' end @@ -241,9 +238,6 @@ def log_useless(grammar) if grammar.useless_nonterminals.any? f.puts "useless nts:#{grammar.useless_nonterminals.size}" end - if grammar.useless_rules.any? - f.puts "useless rules:#{grammar.useless_rules.size}" - end } end diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 3cb371e5..e553116e 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -62,10 +62,6 @@ def useless_nonterminals @symboltable.nonterminals.select(&:useless?) end - def useless_rules - @rules.select(&:useless?) - end - def n_expected_srconflicts=(value) if @n_expected_srconflicts raise CompileError, "'expect' seen twice" @@ -106,9 +102,6 @@ def parser_class if g.useless_nonterminals.any? report["#{g.useless_nonterminals.size} useless nonterminals"] end - if g.useless_rules.any? - report["#{g.useless_rules.size} useless rules"] - end end states.state_transition_table.parser_class end @@ -461,7 +454,6 @@ def initialize(target, syms, act, precedence = nil) @alternatives = [] @ident = nil - @useless = nil @precedence = precedence @ptrs = (0..@symbols.size).map { |idx| LocationPointer.new(self, idx) } @@ -507,14 +499,6 @@ def precedence=(sym) @precedence ||= sym end - def useless? - @useless - end - - def useless=(u) - @useless = u - end - def inspect "#" end diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 1b2c086b..e537a542 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -41,10 +41,6 @@ def output_conflict(out) end def output_useless(out) - @grammar.select(&:useless?).each do |rl| - out.printf "rule %d (%s) never reduced\n", - rl.ident, rl.target.to_s - end @grammar.symboltable.nonterminals.select(&:useless?).each do |t| out.printf "useless nonterminal %s\n", t.to_s end diff --git a/test/test_chk_y.rb b/test/test_chk_y.rb index 4a409fa4..be051867 100644 --- a/test/test_chk_y.rb +++ b/test/test_chk_y.rb @@ -24,7 +24,6 @@ def test_compile_chk_y assert_equal 0, @states.n_srconflicts assert_equal 0, @states.n_rrconflicts assert_equal 0, grammar.useless_nonterminals.size - assert_equal 0, grammar.useless_rules.size assert_nil grammar.n_expected_srconflicts end @@ -44,7 +43,6 @@ def test_compile_chk_y_line_convert assert_equal 0, @states.n_srconflicts assert_equal 0, @states.n_rrconflicts assert_equal 0, grammar.useless_nonterminals.size - assert_equal 0, grammar.useless_rules.size assert_nil grammar.n_expected_srconflicts end end diff --git a/test/test_scan_y.rb b/test/test_scan_y.rb index 6ff2ad66..e9e27e9a 100644 --- a/test/test_scan_y.rb +++ b/test/test_scan_y.rb @@ -24,7 +24,6 @@ def test_compile assert_equal 0, @states.n_srconflicts assert_equal 0, @states.n_rrconflicts assert_equal 0, grammar.useless_nonterminals.size - assert_equal 0, grammar.useless_rules.size assert_nil grammar.n_expected_srconflicts end @@ -44,7 +43,6 @@ def test_compile_line_convert assert_equal 0, @states.n_srconflicts assert_equal 0, @states.n_rrconflicts assert_equal 0, grammar.useless_nonterminals.size - assert_equal 0, grammar.useless_rules.size assert_nil grammar.n_expected_srconflicts end end From ba7b3ac2ad5778fae1b6320da18d582a1da794f0 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 10:58:32 +0200 Subject: [PATCH 203/619] Remove useless States#check_useless States#check_useless checks whether there are any useless nonterminals in the grammar. Grammar#check_useless checks whether... there are any useless nonterminals in the grammar. Hmmm... what's wrong with this picture? States#check_useless does it by seeing whether there are any Reduce actions in the action tables which reduce to a certain NT. Grammar#check_useless checks whether there are any sequence of rules which lead from the start symbol, to a certain NT. Are these two methods of checking equivalent? They should be. So why check twice, *overwriting* the results of the first check when you do the second check? --- lib/racc/state.rb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index c20ce328..a1f1fb0c 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -180,7 +180,6 @@ def compute_dfa @states.each do |state| pack state end - check_useless end def lookahead @@ -549,15 +548,6 @@ def pack(state) state.defact ||= @actions.error end end - - def check_useless - @symboltable.nonterminals.each { |nt| nt.useless = true } - @actions.each_reduce do |act| - if act.refn > 0 - act.rule.target.useless = false - end - end - end end # A LALR state. From f41d110c4891dbdf52ca769406b04e27dee3c4b5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 11:06:19 +0200 Subject: [PATCH 204/619] Remove redundant reference-counting for Reduce objects This was part of a mechanism for detecting useless nonterminals. But that whole mechanism was redundant and has been removed, because Racc contained 2 separate mechanisms for detecting useless NTs, both of which worked just fine. --- lib/racc/state.rb | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index a1f1fb0c..e668464d 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -463,16 +463,13 @@ def resolve_sr(state, s) when :Shift # overwrite - act.decref state.action[stok] = @actions.shift(goto) when :Error - act.decref state.action[stok] = @actions.error when :CantResolve # shift as default - act.decref state.action[stok] = @actions.shift(goto) state.sr_conflict stok, act.rule end @@ -749,9 +746,7 @@ def reduce(i) raise "racc: fatal: wrong class #{i.class} for reduce" end - r = @reduce[i] or raise "racc: fatal: reduce action #{i.inspect} not exist" - r.incref - r + @reduce[i] or raise "racc: fatal: reduce action #{i.inspect} not exist" end def each_reduce(&block) @@ -790,11 +785,9 @@ def inspect class Reduce def initialize(rule) @rule = rule - @refn = 0 end attr_reader :rule - attr_reader :refn def rule_id @rule.ident @@ -803,15 +796,6 @@ def rule_id def inspect "" end - - def incref - @refn += 1 - end - - def decref - @refn -= 1 - raise 'racc: fatal: act.refn < 0' if @refn < 0 - end end class Accept From fb28d2d6cb266c82e487bb3e519332987eee1a31 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 11:07:52 +0200 Subject: [PATCH 205/619] Use Struct to make Reduce more concise --- lib/racc/state.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index e668464d..1f312e21 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -782,19 +782,13 @@ def inspect end end - class Reduce - def initialize(rule) - @rule = rule - end - - attr_reader :rule - + class Reduce < Struct.new(:rule) def rule_id - @rule.ident + rule.ident end def inspect - "" + "" end end From 5d87c864acecc1dd37237492589c22648b12ca8a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 11:08:38 +0200 Subject: [PATCH 206/619] Use Struct to make Goto more concise --- lib/racc/state.rb | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 1f312e21..aae45f85 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -677,21 +677,9 @@ def n_rrconflicts # but this class treats also terminal's. # If one is a terminal transition, .ident returns nil. # - class Goto - def initialize(ident, sym, from, to) - @ident = ident - @symbol = sym - @from_state = from - @to_state = to - end - - attr_reader :ident - attr_reader :symbol - attr_reader :from_state - attr_reader :to_state - + class Goto < Struct.new(:ident, :symbol, :from_state, :to_state) def inspect - "(#{@from_state.ident}-#{@symbol}->#{@to_state.ident})" + "(#{from_state.ident}-#{symbol}->#{to_state.ident})" end end From 7b1fda2ec4fe038662a46e75b74388446c5c773c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 11:10:52 +0200 Subject: [PATCH 207/619] Don't print redundant conflict messages in debug log The 'if' condition was redundant. It was always true, and would cause messages saying such-and-such a state has 0 R/R conflicts and 0 S/R conflicts to be printed in the debug logs. Now the condition actually does something. --- lib/racc/logfilegenerator.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index e537a542..fc5eb4f1 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -6,9 +6,7 @@ # For details of the GNU LGPL, see the file "COPYING". module Racc - class LogFileGenerator - def initialize(states, debug_flags = DebugFlags.new) @states = states @grammar = states.grammar @@ -29,11 +27,11 @@ def output(out) def output_conflict(out) @states.each do |state| - if state.srconf + if state.srconf.any? out.printf "state %d contains %d shift/reduce conflicts\n", state.ident, state.srconf.size end - if state.rrconf + if state.rrconf.any? out.printf "state %d contains %d reduce/reduce conflicts\n", state.ident, state.rrconf.size end From e58b3d13917c615aed33056ec3ebf3b9e4850e83 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 11:22:06 +0200 Subject: [PATCH 208/619] Simplify code in LogFileGenerator#action_out --- lib/racc/logfilegenerator.rb | 46 ++++++++++++++---------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index fc5eb4f1..ca9e5b41 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -73,42 +73,32 @@ def pointer_out(out, ptr) end def action_out(f, state) - sr = state.srconf && state.srconf.dup - rr = state.rrconf && state.rrconf.dup - acts = state.action - keys = acts.keys - keys.sort! {|a,b| a.ident <=> b.ident } - - [ Shift, Reduce, Error, Accept ].each do |klass| - keys.delete_if do |tok| - act = acts[tok] + sr = state.srconf + rr = state.rrconf + tokens = state.action.keys.sort_by(&:ident) + + [Shift, Reduce, Error, Accept].each do |klass| + tokens.each do |tok| + act = state.action[tok] if act.kind_of?(klass) - outact f, tok, act - if sr and c = sr.delete(tok) - outsrconf f, c - end - if rr and c = rr.delete(tok) - outrrconf f, c - end - - true - else - false + outact(f, tok, act) + outsrconf(f, sr[tok]) if sr.key?(tok) + outrrconf(f, rr[tok]) if rr.key?(tok) end end end - sr.each {|tok, c| outsrconf f, c } if sr - rr.each {|tok, c| outrrconf f, c } if rr - act = state.defact - if not act.kind_of?(Error) or @debug_flags.any? - outact f, '$default', act + sr.each { |tok, c| outsrconf(f, c) if state.action[tok].nil? } + rr.each { |tok, c| outrrconf(f, c) if state.action[tok].nil? } + + if !state.defact.kind_of?(Error) || @debug_flags.any? + outact(f, '$default', state.defact) end f.puts - state.goto_table.each do |t, st| - if t.nonterminal? - f.printf " %-12s go to state %d\n", t.to_s, st.ident + state.goto_table.each do |tok, next_state| + if tok.nonterminal? + f.printf(" %-12s go to state %d\n", tok.to_s, next_state.ident) end end end From a5b6c0272767df1d0f09904e6a2ee0ad96c2b449 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 11:23:49 +0200 Subject: [PATCH 209/619] Rename #create_tmap to #create_bitmap --- lib/racc/state.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index aae45f85..2a2f87e5 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -201,7 +201,7 @@ def lookahead end ### initialize_F() - f = create_tmap(gotos.size) + f = create_bitmap(gotos.size) reads = [] edge = [] gotos.each do |goto| @@ -260,7 +260,7 @@ def lookahead end ### compute_lookaheads - la = create_tmap(la_rules.size) + la = create_bitmap(la_rules.size) lookback.each_with_index do |arr, i| if arr arr.each do |g| @@ -276,8 +276,8 @@ def lookahead la end - def create_tmap(size) - Array.new(size, 0) # use Integer as bitmap + def create_bitmap(size) + Array.new(size, 0) # use Integer as bitmap end def addrel(tbl, i, item) From 480c7ce92dabfd3163dff684c1f5fdcede0f3a0e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 11:26:01 +0200 Subject: [PATCH 210/619] Remove unused ActionTable#each_reduce method --- lib/racc/state.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 2a2f87e5..f0279cf3 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -737,10 +737,6 @@ def reduce(i) @reduce[i] or raise "racc: fatal: reduce action #{i.inspect} not exist" end - def each_reduce(&block) - @reduce.each(&block) - end - def shift_n @shift.size end From 4b8d4b4ecce258b622e658cf26ec38e3f4ee4e6f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 11:27:47 +0200 Subject: [PATCH 211/619] Remove unused States#[] method --- lib/racc/state.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index f0279cf3..b0325652 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -42,10 +42,6 @@ def inspect alias to_s inspect - def [](i) - @states[i] - end - extend Forwardable def_delegator "@states", :each From 9998166e31447b7180d5063c2d29fd535693a8f1 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 11:57:35 +0200 Subject: [PATCH 212/619] Remove unused States#nt_base method --- lib/racc/state.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index b0325652..98406c3d 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -47,7 +47,6 @@ def inspect def_delegator "@states", :each def_delegator "@actions", :shift_n def_delegator "@actions", :reduce_n - def_delegator "@actions", :nt_base def should_report_srconflict? srconflict_exist? and From c628bf4ad3b3b658eb46d19e07fb7ddfa028d7bd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 21:00:04 +0200 Subject: [PATCH 213/619] Rename State#sr_conflict/#rr_conflict to #sr_conflict!/#rr_conflict! --- lib/racc/state.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 98406c3d..c759a13d 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -421,7 +421,7 @@ def resolve_rr(state, r) end # Cannot resolve R/R conflict (on t). # Reduce with upper rule as default. - state.rr_conflict act.rule, item.rule, t + state.rr_conflict!(act.rule, item.rule, t) else # No conflict. state.action[t] = @actions.reduce(item.rule) @@ -466,7 +466,7 @@ def resolve_sr(state, s) when :CantResolve # shift as default state.action[stok] = @actions.shift(goto) - state.sr_conflict stok, act.rule + state.sr_conflict!(stok, act.rule) end end end @@ -650,11 +650,11 @@ def la=(la) end end - def rr_conflict(high, low, ctok) + def rr_conflict!(high, low, ctok) @rrconf[ctok] = RRConflict.new(@ident, high, low, ctok) end - def sr_conflict(shift, reduce) + def sr_conflict!(shift, reduce) @srconf[shift] = SRConflict.new(@ident, shift, reduce) end From 2abf5f68a0e193a6bcbac26532ec5e8f3922282b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 21:03:28 +0200 Subject: [PATCH 214/619] Rename State#srconf/#rrconf to #sr_conflicts/#rr_conflicts At the same time, remove the (redundant) #n_srconflicts and #n_rrconflicts methods. Also remove similar (and redundant) methods from States. --- bin/racc | 12 +++++------ lib/racc/grammar.rb | 6 +++--- lib/racc/grammarfileparser.rb | 4 ++-- lib/racc/logfilegenerator.rb | 12 +++++------ lib/racc/state.rb | 39 ++++++++++------------------------- test/test_chk_y.rb | 8 +++---- test/test_scan_y.rb | 8 +++---- 7 files changed, 36 insertions(+), 53 deletions(-) diff --git a/bin/racc b/bin/racc index 88e8dedd..cb99cabe 100755 --- a/bin/racc +++ b/bin/racc @@ -205,10 +205,10 @@ end def report_conflict(states) if states.should_report_srconflict? - $stderr.puts "#{states.n_srconflicts} shift/reduce conflicts" + $stderr.puts "#{states.sr_conflicts.size} shift/reduce conflicts" end - if states.rrconflict_exist? - $stderr.puts "#{states.n_rrconflicts} reduce/reduce conflicts" + if states.rr_conflicts.any? + $stderr.puts "#{states.rr_conflicts.size} reduce/reduce conflicts" end end @@ -216,10 +216,10 @@ def log_conflict(states) logging('w') {|f| f.puts "expected s/r conflicts:#{states.grammar.n_expected_srconflicts}" if states.should_report_srconflict? - f.puts "s/r conflicts:#{states.n_srconflicts}" + f.puts "s/r conflicts:#{states.sr_conflicts.size}" end - if states.rrconflict_exist? - f.puts "r/r conflicts:#{states.n_rrconflicts}" + if states.rr_conflicts.any? + f.puts "r/r conflicts:#{states.rr_conflicts.size}" end } end diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index e553116e..27649bbb 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -93,10 +93,10 @@ def parser_class end report = lambda {|s| $stderr.puts "racc: #{srcfilename}: #{s}" } if states.should_report_srconflict? - report["#{states.n_srconflicts} shift/reduce conflicts"] + report["#{states.sr_conflicts.size} shift/reduce conflicts"] end - if states.rrconflict_exist? - report["#{states.n_rrconflicts} reduce/reduce conflicts"] + if states.rr_conflicts.any? + report["#{states.rr_conflicts.size} reduce/reduce conflicts"] end g = states.grammar if g.useless_nonterminals.any? diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 6619a11d..7509f6a2 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -116,10 +116,10 @@ module Racc GrammarFileParser = grammar.parser_class - if grammar.states.srconflict_exist? + if grammar.states.sr_conflicts.any? raise 'Racc boot script fatal: S/R conflict in build' end - if grammar.states.rrconflict_exist? + if grammar.states.rr_conflicts.any? raise 'Racc boot script fatal: R/R conflict in build' end diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index ca9e5b41..2616f78d 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -27,13 +27,13 @@ def output(out) def output_conflict(out) @states.each do |state| - if state.srconf.any? + if state.sr_conflicts.any? out.printf "state %d contains %d shift/reduce conflicts\n", - state.ident, state.srconf.size + state.ident, state.sr_conflicts.size end - if state.rrconf.any? + if state.rr_conflicts.any? out.printf "state %d contains %d reduce/reduce conflicts\n", - state.ident, state.rrconf.size + state.ident, state.rr_conflicts.size end end end @@ -73,8 +73,8 @@ def pointer_out(out, ptr) end def action_out(f, state) - sr = state.srconf - rr = state.rrconf + sr = state.sr_conflicts + rr = state.rr_conflicts tokens = state.action.keys.sort_by(&:ident) [Shift, Reduce, Error, Accept].each do |klass| diff --git a/lib/racc/state.rb b/lib/racc/state.rb index c759a13d..70b28d8d 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -49,24 +49,15 @@ def inspect def_delegator "@actions", :reduce_n def should_report_srconflict? - srconflict_exist? and - (n_srconflicts() != @grammar.n_expected_srconflicts) + sr_conflicts.any? && (sr_conflicts.size != @grammar.n_expected_srconflicts) end - def srconflict_exist? - n_srconflicts() != 0 + def sr_conflicts + flat_map { |state| state.sr_conflicts.values } end - def n_srconflicts - map(&:n_srconflicts).reduce(0, &:+) - end - - def rrconflict_exist? - n_rrconflicts() != 0 - end - - def n_rrconflicts - map(&:n_rrconflicts).reduce(0, &:+) + def rr_conflicts + flat_map { |state| state.rr_conflicts.values } end def state_transition_table @@ -553,8 +544,8 @@ def initialize(ident, core) @ritems = nil @action = {} @defact = nil - @rrconf = {} - @srconf = {} + @rr_conflicts = {} + @sr_conflicts = {} @closure = make_closure(@core) end @@ -574,8 +565,8 @@ def initialize(ident, core) attr_reader :action attr_accessor :defact # default action - attr_reader :rrconf - attr_reader :srconf + attr_reader :rr_conflicts + attr_reader :sr_conflicts def inspect "" @@ -651,19 +642,11 @@ def la=(la) end def rr_conflict!(high, low, ctok) - @rrconf[ctok] = RRConflict.new(@ident, high, low, ctok) + @rr_conflicts[ctok] = RRConflict.new(@ident, high, low, ctok) end def sr_conflict!(shift, reduce) - @srconf[shift] = SRConflict.new(@ident, shift, reduce) - end - - def n_srconflicts - @srconf.size - end - - def n_rrconflicts - @rrconf.size + @sr_conflicts[shift] = SRConflict.new(@ident, shift, reduce) end end diff --git a/test/test_chk_y.rb b/test/test_chk_y.rb index be051867..0ce89c9d 100644 --- a/test/test_chk_y.rb +++ b/test/test_chk_y.rb @@ -21,8 +21,8 @@ def test_compile_chk_y grammar = @states.grammar - assert_equal 0, @states.n_srconflicts - assert_equal 0, @states.n_rrconflicts + assert_equal 0, @states.sr_conflicts.size + assert_equal 0, @states.rr_conflicts.size assert_equal 0, grammar.useless_nonterminals.size assert_nil grammar.n_expected_srconflicts end @@ -40,8 +40,8 @@ def test_compile_chk_y_line_convert grammar = @states.grammar - assert_equal 0, @states.n_srconflicts - assert_equal 0, @states.n_rrconflicts + assert_equal 0, @states.sr_conflicts.size + assert_equal 0, @states.rr_conflicts.size assert_equal 0, grammar.useless_nonterminals.size assert_nil grammar.n_expected_srconflicts end diff --git a/test/test_scan_y.rb b/test/test_scan_y.rb index e9e27e9a..2c2eccb1 100644 --- a/test/test_scan_y.rb +++ b/test/test_scan_y.rb @@ -21,8 +21,8 @@ def test_compile grammar = @states.grammar - assert_equal 0, @states.n_srconflicts - assert_equal 0, @states.n_rrconflicts + assert_equal 0, @states.sr_conflicts.size + assert_equal 0, @states.rr_conflicts.size assert_equal 0, grammar.useless_nonterminals.size assert_nil grammar.n_expected_srconflicts end @@ -40,8 +40,8 @@ def test_compile_line_convert grammar = @states.grammar - assert_equal 0, @states.n_srconflicts - assert_equal 0, @states.n_rrconflicts + assert_equal 0, @states.sr_conflicts.size + assert_equal 0, @states.rr_conflicts.size assert_equal 0, grammar.useless_nonterminals.size assert_nil grammar.n_expected_srconflicts end From 952e8486fa43cf183ec1cb8a7debbc37e6f54c62 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 22:33:37 +0200 Subject: [PATCH 215/619] Initialize @gotos in States#initialize --- lib/racc/state.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 70b28d8d..5527192b 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -27,6 +27,7 @@ def initialize(grammar, debug_flags = DebugFlags.new) @actions = ActionTable.new(@grammar, self) @nfa_computed = false @dfa_computed = false + @gotos = [] end attr_reader :grammar @@ -81,12 +82,9 @@ def nfa def compute_nfa # add state 0 - core_to_state Set[@grammar[0].ptrs[0]] + core_to_state(Set[@grammar[0].ptrs[0]]) # generate LALR states - @gotos = [] - @states.each do |state| - generate_states(state) - end + @states.each { |state| generate_states(state) } @actions.init end From 12a8fed35008b3c037c097f963f543938b438665 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 22:46:29 +0200 Subject: [PATCH 216/619] Add comments in States#core_to_state --- lib/racc/state.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 5527192b..aa274fba 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -119,14 +119,14 @@ def generate_states(state) end def core_to_state(core) - # convert CORE to a State object. - # If matching state does not exist, create it and add to the table. + # a 'core' is a set of LocationPointers, indicating all the possible + # positions within the RHS of a rule where we could be right now + # convert core to a State object; if state does not exist, create it unless dest = @statecache[core] # not registered yet dest = State.new(@states.size, core) - @states.push dest - + @states << dest @statecache[core] = dest puts "core_to_state: create state ID #{dest.ident}" if @d_state From 7bdc6c6a1e929cd8e56fbff3a8c388d5f734515d Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 22:49:31 +0200 Subject: [PATCH 217/619] Rename States#nfa/#dfa to #compute_nfa/#compute_dfa The previous name incorrectly implied that an NFA or DFA object, distinct from the States object, would be returned. This is not the case. It simply performs some computation and then returns the same States object. --- bin/racc | 4 ++-- lib/racc/grammar.rb | 4 ++-- lib/racc/state.rb | 32 ++++++++++++++------------------ test/test_chk_y.rb | 3 +-- test/test_scan_y.rb | 3 +-- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/bin/racc b/bin/racc index cb99cabe..f398a70b 100755 --- a/bin/racc +++ b/bin/racc @@ -146,12 +146,12 @@ def main $stderr.puts 'Generating LALR states...' if verbose states = profiler.section('nfa') { - Racc::States.new(result.grammar).nfa + Racc::States.new(result.grammar).compute_nfa } $stderr.puts "Resolving #{states.size} states..." if verbose profiler.section('dfa') { - states.dfa + states.compute_dfa } $stderr.puts 'Creating parser file...' if verbose diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 27649bbb..b5611e6d 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -70,11 +70,11 @@ def n_expected_srconflicts=(value) end def nfa - (@states ||= States.new(self)).nfa + (@states ||= States.new(self)).compute_nfa end def dfa - (@states ||= States.new(self)).dfa + (@states ||= States.new(self)).compute_dfa end alias states dfa diff --git a/lib/racc/state.rb b/lib/racc/state.rb index aa274fba..e95052b3 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -62,7 +62,7 @@ def rr_conflicts end def state_transition_table - @state_transition_table ||= StateTransitionTable.generate(self.dfa) + @state_transition_table ||= StateTransitionTable.generate(compute_dfa) end # @@ -71,23 +71,21 @@ def state_transition_table public - def nfa + def compute_nfa return self if @nfa_computed - compute_nfa - @nfa_computed = true - self - end - - private - def compute_nfa # add state 0 core_to_state(Set[@grammar[0].ptrs[0]]) # generate LALR states @states.each { |state| generate_states(state) } @actions.init + + @nfa_computed = true + self end + private + def generate_states(state) puts "dstate: #{state}" if @d_state @@ -144,17 +142,10 @@ def core_to_state(core) public - def dfa + def compute_dfa return self if @dfa_computed - nfa - compute_dfa - @dfa_computed = true - self - end - - private + compute_nfa - def compute_dfa la = lookahead() @states.each do |state| state.la = la @@ -164,8 +155,13 @@ def compute_dfa @states.each do |state| pack state end + + @dfa_computed = true + self end + private + def lookahead # # lookahead algorithm ver.3 -- from bison 1.26 diff --git a/test/test_chk_y.rb b/test/test_chk_y.rb index 0ce89c9d..941ddd2c 100644 --- a/test/test_chk_y.rb +++ b/test/test_chk_y.rb @@ -7,8 +7,7 @@ def setup @debug_flags = Racc::DebugFlags.parse_option_string('o') parser = Racc::GrammarFileParser.new(@debug_flags) @result = parser.parse(File.read(file), File.basename(file)) - @states = Racc::States.new(@result.grammar).nfa - @states.dfa + @states = Racc::States.new(@result.grammar).compute_nfa.compute_dfa end def test_compile_chk_y diff --git a/test/test_scan_y.rb b/test/test_scan_y.rb index 2c2eccb1..6ff14396 100644 --- a/test/test_scan_y.rb +++ b/test/test_scan_y.rb @@ -7,8 +7,7 @@ def setup @debug_flags = Racc::DebugFlags.parse_option_string('o') parser = Racc::GrammarFileParser.new(@debug_flags) @result = parser.parse(File.read(file), File.basename(file)) - @states = Racc::States.new(@result.grammar).nfa - @states.dfa + @states = Racc::States.new(@result.grammar).compute_nfa.compute_dfa end def test_compile From cb3b00c7f633a445750659e568674264012d710a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:01:09 +0200 Subject: [PATCH 218/619] Initialize @states in Grammar#initialize --- lib/racc/grammar.rb | 9 ++++----- lib/racc/state.rb | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index b5611e6d..50d8851d 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -23,9 +23,10 @@ def initialize(debug_flags = DebugFlags.new) @prec_table = [] @prec_table_closed = false @closed = false - @states = nil + @states = States.new(self) end + attr_reader :states attr_reader :start attr_reader :symboltable attr_reader :n_expected_srconflicts @@ -70,15 +71,13 @@ def n_expected_srconflicts=(value) end def nfa - (@states ||= States.new(self)).compute_nfa + @states.compute_nfa end def dfa - (@states ||= States.new(self)).compute_dfa + @states.compute_dfa end - alias states dfa - def state_transition_table states().state_transition_table end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index e95052b3..adc81452 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -684,13 +684,14 @@ def initialize(grammar, statetable) @grammar = grammar @statetable = statetable - @reduce = @grammar.map { |rule| Reduce.new(rule) } + @reduce = [] @shift = [] @accept = Accept.new @error = Error.new end def init + @reduce = @grammar.map { |rule| Reduce.new(rule) } @shift = @statetable.map { |state| Shift.new(state) } end From 211198c1ffa069eea261e3134d5708b430c73727 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:04:28 +0200 Subject: [PATCH 219/619] Remove redundant local variable in Grammar#parser_class As it turns out, the variable 'g' is ALWAYS equal to `self`. --- lib/racc/grammar.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 50d8851d..7fac58eb 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -97,9 +97,8 @@ def parser_class if states.rr_conflicts.any? report["#{states.rr_conflicts.size} reduce/reduce conflicts"] end - g = states.grammar - if g.useless_nonterminals.any? - report["#{g.useless_nonterminals.size} useless nonterminals"] + if useless_nonterminals.any? + report["#{useless_nonterminals.size} useless nonterminals"] end end states.state_transition_table.parser_class From 047624619d219b6dfcb87077fa2717b22a1d5acb Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:05:35 +0200 Subject: [PATCH 220/619] Remove unused Grammar#nfa and #dfa methods --- lib/racc/grammar.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 7fac58eb..a68067a4 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -70,14 +70,6 @@ def n_expected_srconflicts=(value) @n_expected_srconflicts = value end - def nfa - @states.compute_nfa - end - - def dfa - @states.compute_dfa - end - def state_transition_table states().state_transition_table end From b45eedc180196f370ecf47f026dcf67b78e8d1bb Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:06:24 +0200 Subject: [PATCH 221/619] Introduce Grammar#sr_conflicts and #rr_conflicts --- lib/racc/grammar.rb | 8 ++++++++ lib/racc/grammarfileparser.rb | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index a68067a4..31a92ddd 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -63,6 +63,14 @@ def useless_nonterminals @symboltable.nonterminals.select(&:useless?) end + def sr_conflicts + @states.sr_conflicts + end + + def rr_conflicts + @states.rr_conflicts + end + def n_expected_srconflicts=(value) if @n_expected_srconflicts raise CompileError, "'expect' seen twice" diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 7509f6a2..55d0db28 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -116,10 +116,10 @@ module Racc GrammarFileParser = grammar.parser_class - if grammar.states.sr_conflicts.any? + if grammar.sr_conflicts.any? raise 'Racc boot script fatal: S/R conflict in build' end - if grammar.states.rr_conflicts.any? + if grammar.rr_conflicts.any? raise 'Racc boot script fatal: R/R conflict in build' end From b55a0d42ca30a950d155ea37118d8430a5851dfc Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:07:04 +0200 Subject: [PATCH 222/619] Use @states in Grammar rather than calling states method --- lib/racc/grammar.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 31a92ddd..544db022 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -79,11 +79,10 @@ def n_expected_srconflicts=(value) end def state_transition_table - states().state_transition_table + @states.state_transition_table end def parser_class - states = states() # cache if $DEBUG srcfilename = caller(1).first.slice(/\A(.*?):/, 1) begin @@ -91,22 +90,22 @@ def parser_class rescue SystemCallError end report = lambda {|s| $stderr.puts "racc: #{srcfilename}: #{s}" } - if states.should_report_srconflict? - report["#{states.sr_conflicts.size} shift/reduce conflicts"] + if @states.should_report_srconflict? + report["#{@states.sr_conflicts.size} shift/reduce conflicts"] end - if states.rr_conflicts.any? - report["#{states.rr_conflicts.size} reduce/reduce conflicts"] + if @states.rr_conflicts.any? + report["#{@states.rr_conflicts.size} reduce/reduce conflicts"] end if useless_nonterminals.any? report["#{useless_nonterminals.size} useless nonterminals"] end end - states.state_transition_table.parser_class + state_transition_table.parser_class end def write_log(path) File.open(path, 'w') do |f| - LogFileGenerator.new(states()).output(f) + LogFileGenerator.new(@states).output(f) end end From 92af573321e6d5aded30d1ad7ae03d3f736ed024 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:07:19 +0200 Subject: [PATCH 223/619] Comments in State#initialize --- lib/racc/state.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index adc81452..2c21fa53 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -530,8 +530,9 @@ def pack(state) # A LALR state. class State def initialize(ident, core) - @ident = ident - @core = core + @ident = ident # ID number used to provide a canonical ordering + @core = core # LocationPointers to all the possible positions within the + # RHS of a rule where we could be when in this state @goto_table = {} @gotos = {} @stokens = nil From c4d02818970cc4440bee56a7071f6770589b0d45 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:07:32 +0200 Subject: [PATCH 224/619] Comment in States#generate_states --- lib/racc/state.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 2c21fa53..5de18b43 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -89,6 +89,8 @@ def compute_nfa def generate_states(state) puts "dstate: #{state}" if @d_state + # build table of what the 'core' of the following state will be, if the + # next token appearing in the input was 'sym' table = Hash.new { |h,k| h[k] = Set.new } state.closure.each do |ptr| if sym = ptr.symbol From 121484948c206b818b32f4b81a714f30d865678a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:13:18 +0200 Subject: [PATCH 225/619] Add (long) comment to State#make_closure --- lib/racc/state.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 5de18b43..93174ee8 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -572,11 +572,21 @@ def inspect alias to_s inspect def make_closure(core) + # Say we know that we are at "A = B . C" right now; in other words, + # we know that we are parsing an "A", we have already finished the "B", + # and the "C" should be coming next + # If "C" is a non-terminal, then that means the RHS of one of the rules + # for C should come next (but we don't know which one) + # So we could possibly be beginning ANY of the rules for C here + # But if one of the rules for C itself starts with non-terminal "D"... + # well, to find all the possible positions where we could be in each + # rule, we have to recurse down into all the rules for D (and so on) + # This recursion has already been done and the result cached in Sym#expand set = Set.new core.each do |ptr| set.add(ptr) - if t = ptr.symbol and t.nonterminal? - t.expand.each { |i| set.add(i) } + if sym = ptr.symbol and sym.nonterminal? + set.merge(sym.expand) end end set.sort_by(&:ident) From c4a8a4ca1afe314ab08b892ffaf71752614b16b3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:25:23 +0200 Subject: [PATCH 226/619] Remove redundant State#goto_table State#gotos contains just the same information. --- lib/racc/logfilegenerator.rb | 3 ++- lib/racc/state.rb | 18 +++++++----------- lib/racc/statetransitiontable.rb | 10 ++++++---- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 2616f78d..a1cc14f0 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -96,8 +96,9 @@ def action_out(f, state) end f.puts - state.goto_table.each do |tok, next_state| + state.gotos.each do |tok, goto| if tok.nonterminal? + next_state = goto.to_state f.printf(" %-12s go to state %d\n", tok.to_s, next_state.ident) end end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 93174ee8..ae2f319f 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -102,7 +102,6 @@ def generate_states(state) puts "dstate: sym=#{sym} ncore=#{core}" if @d_state dest = core_to_state(core) - state.goto_table[sym] = dest id = sym.nonterminal?() ? @gotos.size : nil g = Goto.new(id, sym, state, dest) @gotos.push g if sym.nonterminal? @@ -187,7 +186,7 @@ def lookahead reads = [] edge = [] gotos.each do |goto| - goto.to_state.goto_table.each do |t, st| + goto.to_state.gotos.each do |t, other| if t.terminal? f[goto.ident] |= (1 << t.ident) elsif t.nullable? @@ -389,7 +388,7 @@ def resolve(state) if state.rrules.empty? # shift state.stokens.each do |t| - state.action[t] = @actions.shift(state.goto_table[t]) + state.action[t] = @actions.shift(state.gotos[t].to_state) end else # reduce @@ -419,12 +418,12 @@ def resolve_rr(state, r) def resolve_sr(state, s) s.each do |stok| - goto = state.goto_table[stok] + goto = state.gotos[stok] act = state.action[stok] unless act # no conflict - state.action[stok] = @actions.shift(goto) + state.action[stok] = @actions.shift(goto.to_state) else unless act.kind_of?(Reduce) puts 'DEBUG -------------------------------' @@ -445,14 +444,14 @@ def resolve_sr(state, s) when :Shift # overwrite - state.action[stok] = @actions.shift(goto) + state.action[stok] = @actions.shift(goto.to_state) when :Error state.action[stok] = @actions.error when :CantResolve # shift as default - state.action[stok] = @actions.shift(goto) + state.action[stok] = @actions.shift(goto.to_state) state.sr_conflict!(stok, act.rule) end end @@ -497,12 +496,11 @@ def do_resolve_sr(stok, rtok) def set_accept anch = @symboltable.anchor - init_state = @states[0].goto_table[@grammar.start] + init_state = @states[0].gotos[@grammar.start].to_state targ_state = init_state.action[anch].goto_state acc_state = targ_state.action[anch].goto_state acc_state.action.clear - acc_state.goto_table.clear acc_state.defact = @actions.accept end @@ -535,7 +533,6 @@ def initialize(ident, core) @ident = ident # ID number used to provide a canonical ordering @core = core # LocationPointers to all the possible positions within the # RHS of a rule where we could be when in this state - @goto_table = {} @gotos = {} @stokens = nil @ritems = nil @@ -552,7 +549,6 @@ def initialize(ident, core) attr_reader :core attr_reader :closure - attr_reader :goto_table attr_reader :gotos attr_reader :stokens diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 5e1d59f7..d18931f7 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -122,12 +122,14 @@ def gen_goto_tables(t, grammar) # decide default freq = Array.new(@states.size, 0) @states.each do |state| - st = state.goto_table[tok] - if st - st = st.ident + goto = state.gotos[tok] + if goto + st = goto.to_state.ident freq[st] += 1 + tmp[state.ident] = st + else + tmp[state.ident] = nil end - tmp[state.ident] = st end max = freq.max if max > 1 From 9bcc481ba2af5e0766dbe7f2e13876705c4109ce Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Sun, 15 Nov 2015 23:35:20 +0200 Subject: [PATCH 227/619] Hash is more appropriate than Array for 'lookback' in States#lookahead --- lib/racc/state.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index ae2f319f..c4993a50 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -210,7 +210,7 @@ def lookahead ### compute_FOLLOWS path = nil edge = [] - lookback = Array.new(la_rules.size, nil) + lookback = Hash.new { |h, k| h[k] = [] } includes = [] gotos.each do |goto| goto.symbol.heads.each do |ptr| @@ -218,7 +218,7 @@ def lookahead lastgoto = path.last st = lastgoto ? lastgoto.to_state : goto.from_state if st.conflict? - addrel lookback, st.rruleid(ptr.rule), goto + lookback[st.rruleid(ptr.rule)] << goto end path.reverse_each do |g| break if g.symbol.terminal? @@ -242,11 +242,9 @@ def lookahead ### compute_lookaheads la = create_bitmap(la_rules.size) - lookback.each_with_index do |arr, i| - if arr - arr.each do |g| - la[i] |= f[g.ident] - end + lookback.each_pair do |i, arr| + arr.each do |g| + la[i] |= f[g.ident] end end if @d_la From 615d04587aa9d3acef495041ecc0afc4290d5b70 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 05:43:04 +0200 Subject: [PATCH 228/619] Tweak initialization of Gotos in States#core_to_state --- lib/racc/state.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index c4993a50..8fcbeaa8 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -102,10 +102,9 @@ def generate_states(state) puts "dstate: sym=#{sym} ncore=#{core}" if @d_state dest = core_to_state(core) - id = sym.nonterminal?() ? @gotos.size : nil - g = Goto.new(id, sym, state, dest) - @gotos.push g if sym.nonterminal? - state.gotos[sym] = g + goto = Goto.new(sym.nonterminal? && @gotos.size, sym, state, dest) + @gotos << goto if sym.nonterminal? + state.gotos[sym] = goto puts "dstate: #{state.ident} --#{sym}--> #{dest.ident}" if @d_state # check infinite recursion From 9b7728a827e78939045194efd46ba2d46df98e1f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 05:51:44 +0200 Subject: [PATCH 229/619] Tweak formatting in States#lookahead --- lib/racc/state.rb | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 8fcbeaa8..c2fe109a 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -163,24 +163,19 @@ def compute_dfa private def lookahead - # # lookahead algorithm ver.3 -- from bison 1.26 - # - gotos = @gotos if @d_la puts "\n--- goto ---" - gotos.each_with_index {|g, i| print i, ' '; p g } + gotos.each_with_index { |g, i| puts "#{i} #{g.inspect}" } end - ### initialize_LA() - ### set_goto_map() + # initialize_LA() + # set_goto_map() la_rules = [] - @states.each do |state| - state.check_la la_rules - end + @states.each { |state| state.check_la(la_rules) } - ### initialize_F() + # initialize_F() f = create_bitmap(gotos.size) reads = [] edge = [] @@ -205,8 +200,8 @@ def lookahead print_tab gotos, reads, f end - ### build_relations() - ### compute_FOLLOWS + # build_relations() + # compute_FOLLOWS path = nil edge = [] lookback = Hash.new { |h, k| h[k] = [] } @@ -239,7 +234,7 @@ def lookahead print_tab gotos, includes, f end - ### compute_lookaheads + # compute_lookaheads la = create_bitmap(la_rules.size) lookback.each_pair do |i, arr| arr.each do |g| From 91f1b2d57d30fdf4390bda6345a2ed0c1d2f35a6 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 05:51:57 +0200 Subject: [PATCH 230/619] Reduce level of nesting in States#resolve --- lib/racc/state.rb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index c2fe109a..2631ee87 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -374,18 +374,16 @@ def each_t(tbl, set) def resolve(state) if state.conflict? - resolve_rr state, state.ritems - resolve_sr state, state.stokens - else - if state.rrules.empty? - # shift - state.stokens.each do |t| - state.action[t] = @actions.shift(state.gotos[t].to_state) - end - else - # reduce - state.defact = @actions.reduce(state.rrules[0]) + resolve_rr(state, state.ritems) + resolve_sr(state, state.stokens) + elsif state.rrules.empty? + # shift + state.stokens.each do |t| + state.action[t] = @actions.shift(state.gotos[t].to_state) end + else + # reduce + state.defact = @actions.reduce(state.rrules[0]) end end From 180e5a4caa9921d0f0ad72067da274ab6ad88fa2 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 05:52:36 +0200 Subject: [PATCH 231/619] Set is more appropriate than Array for shift actions in State#check_la --- lib/racc/state.rb | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 2631ee87..4f5ccf3a 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -580,27 +580,24 @@ def make_closure(core) def check_la(la_rules) @conflict = false - s = [] - r = [] + s = Set.new + r = [] # what reductions could we do in this state? @closure.each do |ptr| if t = ptr.symbol if t.terminal? - s[t.ident] = t - if t.ident == 1 # $error - @conflict = true - end + s << t + @conflict = true if t.ident == 1 # $error end else - r.push ptr.rule + r << ptr.rule end end - unless r.empty? - if not s.empty? or r.size > 1 - @conflict = true - end + + if (s.any? && r.any?) || r.size > 1 + @conflict = true end - s.compact! - @stokens = s + + @stokens = s.sort_by(&:ident) @rrules = r if @conflict From cf34017c0444d900223c96596bd32ee2a3b24a64 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 07:37:04 +0200 Subject: [PATCH 232/619] More detailed comment on Goto class --- lib/racc/state.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 4f5ccf3a..a066f411 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -640,10 +640,12 @@ def sr_conflict!(shift, reduce) end end - # Represents a transition on the grammar. - # "Real goto" means a transition by nonterminal, - # but this class treats also terminal's. - # If one is a terminal transition, .ident returns nil. + # Represents a transition between states in the grammar + # Descriptions of the LR algorithm only talk about doing a "goto" after + # reducing, but this class can also represent a state transition which occurs + # after shifting + # If 'symbol' is a terminal, then ident will be nil (there is no global + # ordering of such Gotos). # class Goto < Struct.new(:ident, :symbol, :from_state, :to_state) def inspect From ce5a065b7c14d7145fd73ef189f530f485050368 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 07:52:23 +0200 Subject: [PATCH 233/619] Gradually simplifying code for lookahead calculation --- lib/racc/state.rb | 50 ++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index a066f411..f0cf6e88 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -170,31 +170,35 @@ def lookahead gotos.each_with_index { |g, i| puts "#{i} #{g.inspect}" } end - # initialize_LA() - # set_goto_map() + # find all cases where we have more than one reduction possible, + # or where both a reduction and a shift are possible; in such cases, we + # will try to use the lookahead table to disambiguate la_rules = [] @states.each { |state| state.check_la(la_rules) } - # initialize_F() + # build a bitmap which shows which terminals could possibly appear next + # after each reduction in the grammar f = create_bitmap(gotos.size) reads = [] - edge = [] gotos.each do |goto| + # for each goto-after-reduce, which nullable NTs could come next? + edge = [] + goto.to_state.gotos.each do |t, other| if t.terminal? + # set bit for terminal which could be shifted after this reduction f[goto.ident] |= (1 << t.ident) elsif t.nullable? - edge.push goto.to_state.gotos[t].ident + # if a nullable NT could come next, then we have to look past it + # to see which terminals could appear next + edge.push(other.ident) end end - if edge.empty? - reads.push nil - else - reads.push edge - edge = [] - end + + reads << edge end - digraph f, reads + digraph(f, reads) + if @d_la puts "\n--- F1 (reads) ---" print_tab gotos, reads, f @@ -203,35 +207,36 @@ def lookahead # build_relations() # compute_FOLLOWS path = nil - edge = [] lookback = Hash.new { |h, k| h[k] = [] } includes = [] gotos.each do |goto| + edge = [] + goto.symbol.heads.each do |ptr| path = record_path(goto.from_state, ptr.rule) lastgoto = path.last st = lastgoto ? lastgoto.to_state : goto.from_state + if st.conflict? lookback[st.rruleid(ptr.rule)] << goto end + path.reverse_each do |g| break if g.symbol.terminal? edge.push g.ident break unless g.symbol.nullable? end end - if edge.empty? - includes.push nil - else - includes.push edge - edge = [] - end + + includes << edge end + includes = transpose(includes) - digraph f, includes + digraph(f, includes) + if @d_la puts "\n--- F2 (includes) ---" - print_tab gotos, includes, f + print_tab(gotos, includes, f) end # compute_lookaheads @@ -241,9 +246,10 @@ def lookahead la[i] |= f[g.ident] end end + if @d_la puts "\n--- LA (lookback) ---" - print_tab la_rules, lookback, la + print_tab(la_rules, lookback, la) end la From eee60d51f944e2203f2ebdfad5ad8615e72b5081 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 08:01:01 +0200 Subject: [PATCH 234/619] Rename States#digraph to States#walk_graph, add comment --- lib/racc/state.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index f0cf6e88..0590d03a 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -197,7 +197,7 @@ def lookahead reads << edge end - digraph(f, reads) + walk_graph(f, reads) if @d_la puts "\n--- F1 (reads) ---" @@ -232,7 +232,7 @@ def lookahead end includes = transpose(includes) - digraph(f, includes) + walk_graph(f, includes) if @d_la puts "\n--- F2 (includes) ---" @@ -290,7 +290,15 @@ def transpose(rel) new end - def digraph(map, relation) + # traverse a directed graph + # (represented by an array, of arrays, of indices into the parent array + # each member of the parent array is a 'node', each member of a nested + # array is an 'arrow', pointing to another node) + # each entry in 'bitmap' also corresponds to a graph node + # after the traversal, the bitmap for each node will be the union of its + # original value, and ALL the values for all the nodes which are reachable + # from it + def walk_graph(bitmap, relation) n = relation.size index = Array.new(n, nil) vertices = [] @@ -298,7 +306,7 @@ def digraph(map, relation) index.each_index do |i| if not index[i] and relation[i] - traverse i, index, vertices, map, relation + traverse i, index, vertices, bitmap, relation end end end From 54cf8af03434638af7828f23d99f1a5b79ff59ee Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 08:16:59 +0200 Subject: [PATCH 235/619] Rename a couple of variables in States#lookahead --- lib/racc/state.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 0590d03a..d36bff3f 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -184,14 +184,14 @@ def lookahead # for each goto-after-reduce, which nullable NTs could come next? edge = [] - goto.to_state.gotos.each do |t, other| - if t.terminal? + goto.to_state.gotos.each do |tok, next_goto| + if tok.terminal? # set bit for terminal which could be shifted after this reduction - f[goto.ident] |= (1 << t.ident) - elsif t.nullable? + f[goto.ident] |= (1 << tok.ident) + elsif tok.nullable? # if a nullable NT could come next, then we have to look past it # to see which terminals could appear next - edge.push(other.ident) + edge.push(next_goto.ident) end end From 3414f52016fa170f2a2d1b8e388b5b05dab9ac51 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 08:21:27 +0200 Subject: [PATCH 236/619] Simplify code in States#record_path a bit, add comment --- lib/racc/state.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index d36bff3f..3adecd8a 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -267,15 +267,15 @@ def addrel(tbl, i, item) end end + # Sequence of Gotos which would be taken when following a Rule all the + # way to its end def record_path(begst, rule) st = begst - path = [] - rule.symbols.each do |t| + rule.symbols.each_with_object([]) do |t, path| goto = st.gotos[t] - path.push goto + path.push(goto) st = goto.to_state end - path end def transpose(rel) From f9f6852cc368b81917a54f92672ba1a283318352 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 08:22:29 +0200 Subject: [PATCH 237/619] Rename variables in States#transpose for clarity, add comment --- lib/racc/state.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 3adecd8a..3c8f4b1a 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -278,16 +278,17 @@ def record_path(begst, rule) end end - def transpose(rel) - new = Array.new(rel.size, nil) - rel.each_with_index do |arr, idx| - if arr - arr.each do |i| - addrel new, i, idx - end + # reverse a directed graph, so the arrows point in the opposite direction + # (regarding the structure used to represent a directed graph, see the + # comment on #walk_graph, below) + def transpose(out_arrows) + array = Array.new(out_arrows.size) { [] } + out_arrows.each_with_index do |to_indices, from_idx| + to_indices.each do |to_idx| + array[to_idx] << from_idx end end - new + array end # traverse a directed graph From 4ee9265442a018f2d72d0ec1dbbeaa9eb0bc4a9a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 08:27:16 +0200 Subject: [PATCH 238/619] States#addrel is not used any more --- lib/racc/state.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 3c8f4b1a..2a36bd59 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -259,14 +259,6 @@ def create_bitmap(size) Array.new(size, 0) # use Integer as bitmap end - def addrel(tbl, i, item) - if a = tbl[i] - a.push item - else - tbl[i] = [item] - end - end - # Sequence of Gotos which would be taken when following a Rule all the # way to its end def record_path(begst, rule) From a2b96ac9806adc3573eae34ea496a512733be1d8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 09:00:52 +0200 Subject: [PATCH 239/619] Minor code tweaks in state.rb --- lib/racc/state.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 2a36bd59..c59139c3 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -609,8 +609,8 @@ def check_la(la_rules) if @conflict @la_rules_i = la_rules.size - @la_rules = r.map {|i| i.ident } - la_rules.concat r + @la_rules = r.map(&:ident) + la_rules.concat(r) else @la_rules_i = @la_rules = nil end @@ -631,9 +631,9 @@ def rruleid(rule) def la=(la) return unless @conflict i = @la_rules_i - @ritems = r = [] + @ritems = [] @rrules.each do |rule| - r.push Item.new(rule, la[i]) + @ritems.push(Item.new(rule, la[i])) i += 1 end end From d96f81b854f5615f90e02a204aaa761da1bba8c0 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 09:11:13 +0200 Subject: [PATCH 240/619] Introduce DirectedGraph in States (makes algorithm much clearer) --- lib/racc/state.rb | 110 +++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index c59139c3..165eed28 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -179,11 +179,8 @@ def lookahead # build a bitmap which shows which terminals could possibly appear next # after each reduction in the grammar f = create_bitmap(gotos.size) - reads = [] + reads = DirectedGraph.new(gotos.size) gotos.each do |goto| - # for each goto-after-reduce, which nullable NTs could come next? - edge = [] - goto.to_state.gotos.each do |tok, next_goto| if tok.terminal? # set bit for terminal which could be shifted after this reduction @@ -191,11 +188,9 @@ def lookahead elsif tok.nullable? # if a nullable NT could come next, then we have to look past it # to see which terminals could appear next - edge.push(next_goto.ident) + reads.add_arrow(goto.ident, next_goto.ident) end end - - reads << edge end walk_graph(f, reads) @@ -208,10 +203,8 @@ def lookahead # compute_FOLLOWS path = nil lookback = Hash.new { |h, k| h[k] = [] } - includes = [] + includes = DirectedGraph.new(gotos.size) gotos.each do |goto| - edge = [] - goto.symbol.heads.each do |ptr| path = record_path(goto.from_state, ptr.rule) lastgoto = path.last @@ -223,16 +216,13 @@ def lookahead path.reverse_each do |g| break if g.symbol.terminal? - edge.push g.ident + includes.add_arrow(goto.ident, g.ident) break unless g.symbol.nullable? end end - - includes << edge end - includes = transpose(includes) - walk_graph(f, includes) + walk_graph(f, includes.invert) if @d_la puts "\n--- F2 (includes) ---" @@ -270,64 +260,47 @@ def record_path(begst, rule) end end - # reverse a directed graph, so the arrows point in the opposite direction - # (regarding the structure used to represent a directed graph, see the - # comment on #walk_graph, below) - def transpose(out_arrows) - array = Array.new(out_arrows.size) { [] } - out_arrows.each_with_index do |to_indices, from_idx| - to_indices.each do |to_idx| - array[to_idx] << from_idx - end - end - array - end - # traverse a directed graph - # (represented by an array, of arrays, of indices into the parent array - # each member of the parent array is a 'node', each member of a nested - # array is an 'arrow', pointing to another node) - # each entry in 'bitmap' also corresponds to a graph node + # each entry in 'bitmap' corresponds to a graph node # after the traversal, the bitmap for each node will be the union of its # original value, and ALL the values for all the nodes which are reachable # from it - def walk_graph(bitmap, relation) - n = relation.size - index = Array.new(n, nil) + def walk_graph(bitmap, graph) + index = Array.new(graph.size, nil) vertices = [] - @infinity = n + 2 + @infinity = graph.size + 2 index.each_index do |i| - if not index[i] and relation[i] - traverse i, index, vertices, bitmap, relation + if !index[i] + traverse(i, index, vertices, bitmap, graph) end end end - def traverse(i, index, vertices, map, relation) - vertices.push i - index[i] = height = vertices.size + def traverse(node, index, vertices, map, graph) + vertices.push(node) + index[node] = height = vertices.size - if rp = relation[i] - rp.each do |proci| - unless index[proci] - traverse proci, index, vertices, map, relation - end - if index[i] > index[proci] - # circulative recursion !!! - index[i] = index[proci] - end - map[i] |= map[proci] + graph.arrows(node) do |next_node| + unless index[next_node] + traverse(next_node, index, vertices, map, graph) + end + + if index[node] > index[next_node] + # circulative recursion !!! + index[node] = index[next_node] end + + map[node] |= map[next_node] end - if index[i] == height + if index[node] == height while true - proci = vertices.pop - index[proci] = @infinity - break if i == proci + next_node = vertices.pop + index[next_node] = @infinity + break if node == next_node - map[proci] |= map[i] + map[next_node] |= map[node] end end end @@ -524,6 +497,31 @@ def pack(state) end end + class DirectedGraph < Array + def initialize(size) + super(size) { [] } + end + + def add_arrow(from, to) + self[from] << to + end + + alias nodes each_index + + def arrows(from, &block) + self[from].each(&block) + end + + # reverse direction of all arrows + def invert + graph = DirectedGraph.new(size) + nodes do |from| + arrows(from) { |to| graph.add_arrow(to, from) } + end + graph + end + end + # A LALR state. class State def initialize(ident, core) From 0c9a2943a93c8b9f51247be24d0d049dfca82aea Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 09:54:50 +0200 Subject: [PATCH 241/619] Adjust comment in States#traverse --- lib/racc/state.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 165eed28..820012c1 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -287,7 +287,8 @@ def traverse(node, index, vertices, map, graph) end if index[node] > index[next_node] - # circulative recursion !!! + # there is a cycle in the graph + # we already passed through 'next_node' to reach here index[node] = index[next_node] end From 2903cf697130a570dd7396afbcce6f3468ea7ffb Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 09:56:20 +0200 Subject: [PATCH 242/619] Introduce 'traversed' Set into graph traversal (a bit easier to understand) --- lib/racc/state.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 820012c1..7f396786 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -269,21 +269,22 @@ def walk_graph(bitmap, graph) index = Array.new(graph.size, nil) vertices = [] @infinity = graph.size + 2 + traversed = Set.new - index.each_index do |i| - if !index[i] - traverse(i, index, vertices, bitmap, graph) - end + graph.nodes do |node| + next if traversed.include?(node) + traverse(node, traversed, index, vertices, bitmap, graph) end end - def traverse(node, index, vertices, map, graph) + def traverse(node, traversed, index, vertices, map, graph) + traversed.add(node) vertices.push(node) index[node] = height = vertices.size graph.arrows(node) do |next_node| unless index[next_node] - traverse(next_node, index, vertices, map, graph) + traverse(next_node, traversed, index, vertices, map, graph) end if index[node] > index[next_node] From da0e186db8e9a9a4bb5360cda155cec667e4ae90 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 09:59:00 +0200 Subject: [PATCH 243/619] Rename 'vertices' to 'stack' --- lib/racc/state.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 7f396786..bb432c71 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -267,24 +267,23 @@ def record_path(begst, rule) # from it def walk_graph(bitmap, graph) index = Array.new(graph.size, nil) - vertices = [] @infinity = graph.size + 2 traversed = Set.new graph.nodes do |node| next if traversed.include?(node) - traverse(node, traversed, index, vertices, bitmap, graph) + traverse(node, traversed, index, [], bitmap, graph) end end - def traverse(node, traversed, index, vertices, map, graph) + def traverse(node, traversed, index, stack, map, graph) traversed.add(node) - vertices.push(node) - index[node] = height = vertices.size + stack.push(node) + index[node] = stack_depth = stack.size graph.arrows(node) do |next_node| unless index[next_node] - traverse(next_node, traversed, index, vertices, map, graph) + traverse(next_node, traversed, index, stack, map, graph) end if index[node] > index[next_node] @@ -296,9 +295,9 @@ def traverse(node, traversed, index, vertices, map, graph) map[node] |= map[next_node] end - if index[node] == height + if index[node] == stack_depth while true - next_node = vertices.pop + next_node = stack.pop index[next_node] = @infinity break if node == next_node From 04fcb654f42472f15d46bca7e850e57ffc85a3e3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 09:59:33 +0200 Subject: [PATCH 244/619] Rename 'map' to 'bitmap' --- lib/racc/state.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index bb432c71..6d271136 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -276,14 +276,14 @@ def walk_graph(bitmap, graph) end end - def traverse(node, traversed, index, stack, map, graph) + def traverse(node, traversed, index, stack, bitmap, graph) traversed.add(node) stack.push(node) index[node] = stack_depth = stack.size graph.arrows(node) do |next_node| unless index[next_node] - traverse(next_node, traversed, index, stack, map, graph) + traverse(next_node, traversed, index, stack, bitmap, graph) end if index[node] > index[next_node] @@ -292,7 +292,7 @@ def traverse(node, traversed, index, stack, map, graph) index[node] = index[next_node] end - map[node] |= map[next_node] + bitmap[node] |= bitmap[next_node] end if index[node] == stack_depth @@ -301,7 +301,7 @@ def traverse(node, traversed, index, stack, map, graph) index[next_node] = @infinity break if node == next_node - map[next_node] |= map[node] + bitmap[next_node] |= bitmap[node] end end end From b14733ca76f5dc59e2ddf86cd2f273fe77d5b094 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 10:03:17 +0200 Subject: [PATCH 245/619] Remove unneeded @infinity ivar in States --- lib/racc/state.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 6d271136..76a8b22c 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -267,7 +267,6 @@ def record_path(begst, rule) # from it def walk_graph(bitmap, graph) index = Array.new(graph.size, nil) - @infinity = graph.size + 2 traversed = Set.new graph.nodes do |node| @@ -298,7 +297,7 @@ def traverse(node, traversed, index, stack, bitmap, graph) if index[node] == stack_depth while true next_node = stack.pop - index[next_node] = @infinity + index[next_node] = graph.size + 2 break if node == next_node bitmap[next_node] |= bitmap[node] From dbd6aeb5bbd795d63456d56680d967b06451b866 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 10:46:50 +0200 Subject: [PATCH 246/619] Remove debug code for lookahead calculation We can add better visualizations of intermediate data structures later if desired. For now, this stuff is just getting in the way. --- lib/racc/state.rb | 62 ----------------------------------------------- 1 file changed, 62 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 76a8b22c..3478a1d5 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -165,10 +165,6 @@ def compute_dfa def lookahead # lookahead algorithm ver.3 -- from bison 1.26 gotos = @gotos - if @d_la - puts "\n--- goto ---" - gotos.each_with_index { |g, i| puts "#{i} #{g.inspect}" } - end # find all cases where we have more than one reduction possible, # or where both a reduction and a shift are possible; in such cases, we @@ -194,11 +190,6 @@ def lookahead end walk_graph(f, reads) - if @d_la - puts "\n--- F1 (reads) ---" - print_tab gotos, reads, f - end - # build_relations() # compute_FOLLOWS path = nil @@ -224,11 +215,6 @@ def lookahead walk_graph(f, includes.invert) - if @d_la - puts "\n--- F2 (includes) ---" - print_tab(gotos, includes, f) - end - # compute_lookaheads la = create_bitmap(la_rules.size) lookback.each_pair do |i, arr| @@ -237,11 +223,6 @@ def lookahead end end - if @d_la - puts "\n--- LA (lookback) ---" - print_tab(la_rules, lookback, la) - end - la end @@ -305,49 +286,6 @@ def traverse(node, traversed, index, stack, bitmap, graph) end end - # for debug - def print_atab(idx, tab) - tab.each_with_index do |i,ii| - printf '%-20s', idx[ii].inspect - p i - end - end - - def print_tab(idx, rel, tab) - tab.each_with_index do |bin,i| - print i, ' ', idx[i].inspect, ' << '; p rel[i] - print ' ' - each_t(@symboltable, bin) {|t| print ' ', t } - puts - end - end - - # for debug - def print_tab_i(idx, rel, tab, i) - bin = tab[i] - print i, ' ', idx[i].inspect, ' << '; p rel[i] - print ' ' - each_t(@symboltable, bin) {|t| print ' ', t } - end - - # for debug - def printb(i) - each_t(@symboltable, i) do |t| - print t, ' ' - end - puts - end - - def each_t(tbl, set) - 0.upto( set.size ) do |i| - (0..7).each do |ii| - if set[idx = i * 8 + ii] == 1 - yield tbl[idx] - end - end - end - end - # # resolve # From 6dc951ecd6d88def511fc4b14dd77fd965c6617c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 11:07:07 +0200 Subject: [PATCH 247/619] Build 'includes' graph with arrows in right direction, so we don't need to invert it --- lib/racc/state.rb | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 3478a1d5..74d1787b 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -207,13 +207,13 @@ def lookahead path.reverse_each do |g| break if g.symbol.terminal? - includes.add_arrow(goto.ident, g.ident) + includes.add_arrow(g.ident, goto.ident) break unless g.symbol.nullable? end end end - walk_graph(f, includes.invert) + walk_graph(f, includes) # compute_lookaheads la = create_bitmap(la_rules.size) @@ -449,15 +449,6 @@ def add_arrow(from, to) def arrows(from, &block) self[from].each(&block) end - - # reverse direction of all arrows - def invert - graph = DirectedGraph.new(size) - nodes do |from| - arrows(from) { |to| graph.add_arrow(to, from) } - end - graph - end end # A LALR state. From a9c01fbf2f29743f0a9d131f87abf7fae7c8ace5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 11:30:42 +0200 Subject: [PATCH 248/619] Add many clarifying comments to lookahead calculation --- lib/racc/state.rb | 74 ++++++++++++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 74d1787b..d0e85852 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -174,52 +174,75 @@ def lookahead # build a bitmap which shows which terminals could possibly appear next # after each reduction in the grammar - f = create_bitmap(gotos.size) - reads = DirectedGraph.new(gotos.size) + # (we will use this information to decide which reduction to perform if + # two of them are possible, or whether to do a shift or a reduce if both + # are possible) + # (if both reductions A and B are possible, but we see that the next token + # can only validly appear after reduction A and not B, then we will choose + # to perform reduction A) + following_terminals = create_bitmap(gotos.size) + look_past = DirectedGraph.new(gotos.size) gotos.each do |goto| goto.to_state.gotos.each do |tok, next_goto| if tok.terminal? # set bit for terminal which could be shifted after this reduction - f[goto.ident] |= (1 << tok.ident) + following_terminals[goto.ident] |= (1 << tok.ident) elsif tok.nullable? # if a nullable NT could come next, then we have to look past it # to see which terminals could appear next - reads.add_arrow(goto.ident, next_goto.ident) + look_past.add_arrow(goto.ident, next_goto.ident) end end end - walk_graph(f, reads) + # traverse graph with arrows connecting reductions which could occur + # directly after another without shifting any terminal first (because the + # reduced nonterminal is null) + walk_graph(following_terminals, look_past) + + # there is another case we have to consider to get the full set of tokens + # which can validly appear after each reduction... + # what if we do 2 reductions in a row? or 3, 4, 5...? + # if terminal T1 can appear after nonterminal A, and we can reduce to A + # immediately after reducing to B, that means terminal T1 could also + # appear after B + + # but that's not all! think about this: + # what if we have a rule like "A = BC", and we know terminal T1 can appear + # after A, *and C is nullable*? + # that means T1 can also appear after B, not just after C - # build_relations() - # compute_FOLLOWS - path = nil lookback = Hash.new { |h, k| h[k] = [] } includes = DirectedGraph.new(gotos.size) + # look at the state transition triggered by each reduction in the grammar + # (at each place in the state graph where that reduction can occur) gotos.each do |goto| + # look at RHS of each rule which could have lead to this reduction goto.symbol.heads.each do |ptr| + # what sequence of state transitions would we have made to reach + # this reduction, if this is the rule that was used? path = record_path(goto.from_state, ptr.rule) - lastgoto = path.last - st = lastgoto ? lastgoto.to_state : goto.from_state + # and what would the last state before the reduction have been? + prev_state = (path.last && path.last.to_state) || goto.from_state - if st.conflict? - lookback[st.rruleid(ptr.rule)] << goto + if prev_state.conflict? + lookback[prev_state.rruleid(ptr.rule)] << goto end - path.reverse_each do |g| - break if g.symbol.terminal? - includes.add_arrow(g.ident, goto.ident) - break unless g.symbol.nullable? + path.reverse_each do |preceding_goto| + break if preceding_goto.symbol.terminal? + includes.add_arrow(preceding_goto.ident, goto.ident) + break unless preceding_goto.symbol.nullable? end end end - walk_graph(f, includes) + walk_graph(following_terminals, includes) # compute_lookaheads la = create_bitmap(la_rules.size) lookback.each_pair do |i, arr| arr.each do |g| - la[i] |= f[g.ident] + la[i] |= following_terminals[g.ident] end end @@ -230,14 +253,13 @@ def create_bitmap(size) Array.new(size, 0) # use Integer as bitmap end - # Sequence of Gotos which would be taken when following a Rule all the - # way to its end - def record_path(begst, rule) - st = begst - rule.symbols.each_with_object([]) do |t, path| - goto = st.gotos[t] - path.push(goto) - st = goto.to_state + # Sequence of state transitions which would be taken when starting + # from 'state', then following the RHS of 'rule' right to the end + def record_path(state, rule) + rule.symbols.each_with_object([]) do |tok, path| + goto = state.gotos[tok] + path << goto + state = goto.to_state end end From 34a4f73c277931cf1b35e2047346d40875087df6 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 11:49:53 +0200 Subject: [PATCH 249/619] Further refactoring of lookahead algorithm --- lib/racc/state.rb | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index d0e85852..9d2204c5 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -169,7 +169,7 @@ def lookahead # find all cases where we have more than one reduction possible, # or where both a reduction and a shift are possible; in such cases, we # will try to use the lookahead table to disambiguate - la_rules = [] + la_rules = [] # rules for which lookahead will be used @states.each { |state| state.check_la(la_rules) } # build a bitmap which shows which terminals could possibly appear next @@ -211,7 +211,6 @@ def lookahead # after A, *and C is nullable*? # that means T1 can also appear after B, not just after C - lookback = Hash.new { |h, k| h[k] = [] } includes = DirectedGraph.new(gotos.size) # look at the state transition triggered by each reduction in the grammar # (at each place in the state graph where that reduction can occur) @@ -220,15 +219,7 @@ def lookahead goto.symbol.heads.each do |ptr| # what sequence of state transitions would we have made to reach # this reduction, if this is the rule that was used? - path = record_path(goto.from_state, ptr.rule) - # and what would the last state before the reduction have been? - prev_state = (path.last && path.last.to_state) || goto.from_state - - if prev_state.conflict? - lookback[prev_state.rruleid(ptr.rule)] << goto - end - - path.reverse_each do |preceding_goto| + path(goto.from_state, ptr.rule).reverse_each do |preceding_goto| break if preceding_goto.symbol.terminal? includes.add_arrow(preceding_goto.ident, goto.ident) break unless preceding_goto.symbol.nullable? @@ -238,15 +229,27 @@ def lookahead walk_graph(following_terminals, includes) - # compute_lookaheads - la = create_bitmap(la_rules.size) - lookback.each_pair do |i, arr| - arr.each do |g| - la[i] |= following_terminals[g.ident] + # Now we know which terminals can follow each reduction + # But this lookahead information is only needed when there would otherwise + # be a S/R or R/R conflict + + # So, find all the states leading to a possible reduce, where there is a + # S/R or R/R conflict, and copy the lookahead set for each reduce to the + # preceding state which has the conflict + lookahead_tbl = create_bitmap(la_rules.size) + + gotos.each do |goto| + goto.symbol.heads.each do |ptr| + path = path(goto.from_state, ptr.rule) + prev_state = (path.last && path.last.to_state) || goto.from_state + if prev_state.conflict? + tbl_idx = prev_state.rruleid(ptr.rule) + lookahead_tbl[tbl_idx] |= following_terminals[goto.ident] + end end end - la + lookahead_tbl end def create_bitmap(size) @@ -255,7 +258,7 @@ def create_bitmap(size) # Sequence of state transitions which would be taken when starting # from 'state', then following the RHS of 'rule' right to the end - def record_path(state, rule) + def path(state, rule) rule.symbols.each_with_object([]) do |tok, path| goto = state.gotos[tok] path << goto From fa254d168aaa14dedd6eb7aa0a0720d4beef0eda Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:04:06 +0200 Subject: [PATCH 250/619] Clarify comment in States#resolve --- lib/racc/state.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 9d2204c5..70fd06ce 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -325,7 +325,8 @@ def resolve(state) state.action[t] = @actions.shift(state.gotos[t].to_state) end else - # reduce + # only reduce is possible; we won't even bother looking at the next + # token in this state state.defact = @actions.reduce(state.rrules[0]) end end From 4a09ff4240b25ebd3bc0eb7068f04acdfffc5209 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:10:38 +0200 Subject: [PATCH 251/619] Remove unused Rule#precedence= method The only way to set the precedence of a Rule is using the "=" syntax on the RHS, but that does not use #precedence=. So this method is never used. --- lib/racc/grammar.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 544db022..6be3a492 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -492,10 +492,6 @@ def precedence @precedence || @symbols.select(&:terminal?).last end - def precedence=(sym) - @precedence ||= sym - end - def inspect "#" end From 275064b4cb357b3c742209b14829295452cf60bc Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:13:21 +0200 Subject: [PATCH 252/619] Remove unneeded debug print code --- lib/racc/state.rb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 70fd06ce..abd93d0d 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -359,18 +359,7 @@ def resolve_sr(state, s) # no conflict state.action[stok] = @actions.shift(goto.to_state) else - unless act.kind_of?(Reduce) - puts 'DEBUG -------------------------------' - p stok - p act - state.action.each do |k,v| - print k.inspect, ' ', v.inspect, "\n" - end - raise "racc: fatal: #{act.class} in action table" - end - - # conflict on stok - + # conflict rtok = act.rule.precedence case do_resolve_sr(stok, rtok) when :Reduce From b5a7585e847c0da3f75599496bda988170744c5a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:21:47 +0200 Subject: [PATCH 253/619] Compute State#stokens on demand rather than caching --- lib/racc/state.rb | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index abd93d0d..bcb57030 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -350,8 +350,8 @@ def resolve_rr(state, r) end end - def resolve_sr(state, s) - s.each do |stok| + def resolve_sr(state, stokens) + stokens.each do |stok| goto = state.gotos[stok] act = state.action[stok] @@ -473,7 +473,6 @@ def initialize(ident, core) @core = core # LocationPointers to all the possible positions within the # RHS of a rule where we could be when in this state @gotos = {} - @stokens = nil @ritems = nil @action = {} @defact = nil @@ -484,13 +483,9 @@ def initialize(ident, core) end attr_reader :ident - attr_reader :core attr_reader :closure - attr_reader :gotos - - attr_reader :stokens attr_reader :ritems attr_reader :rrules @@ -527,14 +522,16 @@ def make_closure(core) set.sort_by(&:ident) end + def stokens + @stokens ||= @closure.map(&:symbol).compact.select(&:terminal?).uniq.sort_by(&:ident) + end + def check_la(la_rules) @conflict = false - s = Set.new r = [] # what reductions could we do in this state? @closure.each do |ptr| if t = ptr.symbol if t.terminal? - s << t @conflict = true if t.ident == 1 # $error end else @@ -542,11 +539,10 @@ def check_la(la_rules) end end - if (s.any? && r.any?) || r.size > 1 + if (stokens.any? && r.any?) || r.size > 1 @conflict = true end - @stokens = s.sort_by(&:ident) @rrules = r if @conflict From 34e803a3404561770656eb1321b712c536768b8a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:40:35 +0200 Subject: [PATCH 254/619] Pull State#conflict? logic into that method ...rather than doing the computation in #check_la. --- lib/racc/state.rb | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index bcb57030..f50c35bd 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -527,25 +527,16 @@ def stokens end def check_la(la_rules) - @conflict = false r = [] # what reductions could we do in this state? @closure.each do |ptr| - if t = ptr.symbol - if t.terminal? - @conflict = true if t.ident == 1 # $error - end - else + if !ptr.symbol r << ptr.rule end end - if (stokens.any? && r.any?) || r.size > 1 - @conflict = true - end - @rrules = r - if @conflict + if conflict? @la_rules_i = la_rules.size @la_rules = r.map(&:ident) la_rules.concat(r) @@ -554,8 +545,13 @@ def check_la(la_rules) end end + # would there be a S/R or R/R conflict IF lookahead was not used? def conflict? - @conflict + @conflict ||= begin + (rrules.size > 1) || + (stokens.any? { |tok| tok.ident == 1 }) || # $error symbol + (stokens.any? && rrules.any?) + end end def rruleid(rule) @@ -567,7 +563,7 @@ def rruleid(rule) end def la=(la) - return unless @conflict + return unless conflict? i = @la_rules_i @ritems = [] @rrules.each do |rule| From 42abc32b99855cca66095253806ad00102d95acd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:43:23 +0200 Subject: [PATCH 255/619] Pulled State#rrules logic out into its own method --- lib/racc/state.rb | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index f50c35bd..65e527af 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -487,7 +487,6 @@ def initialize(ident, core) attr_reader :closure attr_reader :gotos attr_reader :ritems - attr_reader :rrules attr_reader :action attr_accessor :defact # default action @@ -526,20 +525,15 @@ def stokens @stokens ||= @closure.map(&:symbol).compact.select(&:terminal?).uniq.sort_by(&:ident) end - def check_la(la_rules) - r = [] # what reductions could we do in this state? - @closure.each do |ptr| - if !ptr.symbol - r << ptr.rule - end - end - - @rrules = r + def rrules + @rrules ||= @closure.select(&:reduce?).map(&:rule) + end + def check_la(la_rules) if conflict? @la_rules_i = la_rules.size - @la_rules = r.map(&:ident) - la_rules.concat(r) + @la_rules = rrules.map(&:ident) + la_rules.concat(rrules) else @la_rules_i = @la_rules = nil end From 3f7d43c235c56a4ab297f43c7b43faf7dbc98fa0 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:44:57 +0200 Subject: [PATCH 256/619] Adjustment to State#closure --- lib/racc/state.rb | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 65e527af..1c1ebefb 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -478,13 +478,10 @@ def initialize(ident, core) @defact = nil @rr_conflicts = {} @sr_conflicts = {} - - @closure = make_closure(@core) end attr_reader :ident attr_reader :core - attr_reader :closure attr_reader :gotos attr_reader :ritems @@ -500,7 +497,7 @@ def inspect alias to_s inspect - def make_closure(core) + def closure # Say we know that we are at "A = B . C" right now; in other words, # we know that we are parsing an "A", we have already finished the "B", # and the "C" should be coming next @@ -511,22 +508,20 @@ def make_closure(core) # well, to find all the possible positions where we could be in each # rule, we have to recurse down into all the rules for D (and so on) # This recursion has already been done and the result cached in Sym#expand - set = Set.new - core.each do |ptr| + @closure ||= @core.each_with_object(Set.new) do |ptr, set| set.add(ptr) if sym = ptr.symbol and sym.nonterminal? set.merge(sym.expand) end - end - set.sort_by(&:ident) + end.sort_by(&:ident) end def stokens - @stokens ||= @closure.map(&:symbol).compact.select(&:terminal?).uniq.sort_by(&:ident) + @stokens ||= closure.map(&:symbol).compact.select(&:terminal?).uniq.sort_by(&:ident) end def rrules - @rrules ||= @closure.select(&:reduce?).map(&:rule) + @rrules ||= closure.select(&:reduce?).map(&:rule) end def check_la(la_rules) From 55b0efcdfd4cf90acf8413431ddccf9cbe0d18a9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:56:10 +0200 Subject: [PATCH 257/619] No more la_rules shenanigans --- lib/racc/state.rb | 61 +++++++++++------------------------------------ 1 file changed, 14 insertions(+), 47 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 1c1ebefb..93abe3f3 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -145,15 +145,14 @@ def core_to_state(core) def compute_dfa return self if @dfa_computed compute_nfa + compute_lookahead - la = lookahead() @states.each do |state| - state.la = la - resolve state + resolve(state) end set_accept @states.each do |state| - pack state + pack(state) end @dfa_computed = true @@ -162,16 +161,10 @@ def compute_dfa private - def lookahead + def compute_lookahead # lookahead algorithm ver.3 -- from bison 1.26 gotos = @gotos - # find all cases where we have more than one reduction possible, - # or where both a reduction and a shift are possible; in such cases, we - # will try to use the lookahead table to disambiguate - la_rules = [] # rules for which lookahead will be used - @states.each { |state| state.check_la(la_rules) } - # build a bitmap which shows which terminals could possibly appear next # after each reduction in the grammar # (we will use this information to decide which reduction to perform if @@ -236,20 +229,17 @@ def lookahead # So, find all the states leading to a possible reduce, where there is a # S/R or R/R conflict, and copy the lookahead set for each reduce to the # preceding state which has the conflict - lookahead_tbl = create_bitmap(la_rules.size) gotos.each do |goto| goto.symbol.heads.each do |ptr| path = path(goto.from_state, ptr.rule) prev_state = (path.last && path.last.to_state) || goto.from_state if prev_state.conflict? - tbl_idx = prev_state.rruleid(ptr.rule) - lookahead_tbl[tbl_idx] |= following_terminals[goto.ident] + ritem = prev_state.ritems.find { |item| item.rule == ptr.rule } + ritem.la |= following_terminals[goto.ident] end end end - - lookahead_tbl end def create_bitmap(size) @@ -483,7 +473,6 @@ def initialize(ident, core) attr_reader :ident attr_reader :core attr_reader :gotos - attr_reader :ritems attr_reader :action attr_accessor :defact # default action @@ -524,16 +513,6 @@ def rrules @rrules ||= closure.select(&:reduce?).map(&:rule) end - def check_la(la_rules) - if conflict? - @la_rules_i = la_rules.size - @la_rules = rrules.map(&:ident) - la_rules.concat(rrules) - else - @la_rules_i = @la_rules = nil - end - end - # would there be a S/R or R/R conflict IF lookahead was not used? def conflict? @conflict ||= begin @@ -543,22 +522,10 @@ def conflict? end end - def rruleid(rule) - if i = @la_rules.index(rule.ident) - @la_rules_i + i - else - raise 'racc: fatal: cannot get reduce rule id' - end - end - - def la=(la) - return unless conflict? - i = @la_rules_i - @ritems = [] - @rrules.each do |rule| - @ritems.push(Item.new(rule, la[i])) - i += 1 - end + # rules for which we need a lookahead set (to disambiguate which of them we + # should apply next) + def ritems + @ritems ||= conflict? ? rrules.map { |rule| Item.new(rule) } : [] end def rr_conflict!(high, low, ctok) @@ -583,15 +550,15 @@ def inspect end end - # LALR item. A set of rules and its lookahead tokens. + # LALR item. A rule and its lookahead tokens. class Item - def initialize(rule, la) + def initialize(rule) @rule = rule - @la = la + @la = 0 # bitmap end attr_reader :rule - attr_reader :la + attr_accessor :la def each_la(tbl) la = @la From c620e84ef4cc900f7ff479f8b95fb081642068b4 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:58:03 +0200 Subject: [PATCH 258/619] Remove unneeded debug assertion --- lib/racc/state.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 93abe3f3..688ef4ee 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -326,9 +326,6 @@ def resolve_rr(state, r) item.each_la(@symboltable) do |t| act = state.action[t] if act - unless act.kind_of?(Reduce) - raise "racc: fatal: #{act.class} in action table" - end # Cannot resolve R/R conflict (on t). # Reduce with upper rule as default. state.rr_conflict!(act.rule, item.rule, t) From 96264e1053c197cb6105dc5dcf2250e4fa4a4073 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 13:58:58 +0200 Subject: [PATCH 259/619] Refactoring in States#resolve_rr --- lib/racc/state.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 688ef4ee..1de777a4 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -321,17 +321,16 @@ def resolve(state) end end - def resolve_rr(state, r) - r.each do |item| - item.each_la(@symboltable) do |t| - act = state.action[t] - if act + def resolve_rr(state, ritems) + ritems.each do |item| + item.each_lookahead_token(@symboltable) do |tok| + if act = state.action[tok] # Cannot resolve R/R conflict (on t). # Reduce with upper rule as default. - state.rr_conflict!(act.rule, item.rule, t) + state.rr_conflict!(act.rule, item.rule, tok) else # No conflict. - state.action[t] = @actions.reduce(item.rule) + state.action[tok] = @actions.reduce(item.rule) end end end @@ -557,7 +556,7 @@ def initialize(rule) attr_reader :rule attr_accessor :la - def each_la(tbl) + def each_lookahead_token(tbl) la = @la 0.upto(la.size - 1) do |i| (0..7).each do |ii| From 4657cd96e5624e650b63b89891a4acb4aa193634 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:09:56 +0200 Subject: [PATCH 260/619] Simplify code in Item#each_lookahead_token --- lib/racc/state.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 1de777a4..e3826332 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -557,13 +557,8 @@ def initialize(rule) attr_accessor :la def each_lookahead_token(tbl) - la = @la - 0.upto(la.size - 1) do |i| - (0..7).each do |ii| - if la[idx = i * 8 + ii] == 1 - yield tbl[idx] - end - end + 0.upto((@la.size * 8) - 1) do |idx| + yield tbl[idx] if @la[idx] == 1 end end end From 09a9af0db9c4cb2c192aae58205098708d1cb44b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:10:04 +0200 Subject: [PATCH 261/619] Comments in State#initialize --- lib/racc/state.rb | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index e3826332..ef16da31 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -456,12 +456,15 @@ def arrows(from, &block) class State def initialize(ident, core) @ident = ident # ID number used to provide a canonical ordering - @core = core # LocationPointers to all the possible positions within the - # RHS of a rule where we could be when in this state - @gotos = {} - @ritems = nil - @action = {} - @defact = nil + @core = core # LocationPointers to all the possible positions within the + # RHS of a rule where we could be when in this state + @gotos = {} # Sym -> Goto describing state transition if we encounter + # that Sym next + @action = {} # Sym -> Shift/Reduce/Accept/Error describing what we will + # do if we encounter that Sym next + @defact = nil # if this state is totally unambiguous as to what to do + # next, then just perform this action (don't use action + # table) @rr_conflicts = {} @sr_conflicts = {} end @@ -469,10 +472,8 @@ def initialize(ident, core) attr_reader :ident attr_reader :core attr_reader :gotos - attr_reader :action - attr_accessor :defact # default action - + attr_accessor :defact # default action attr_reader :rr_conflicts attr_reader :sr_conflicts From e7dc3c7467a3d30230d6b1279c0283ea41c0a2db Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:15:15 +0200 Subject: [PATCH 262/619] Remove redundant ActionTable#reduce_n method --- lib/racc/state.rb | 5 ----- lib/racc/statetransitiontable.rb | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index ef16da31..912468b0 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -47,7 +47,6 @@ def inspect def_delegator "@states", :each def_delegator "@actions", :shift_n - def_delegator "@actions", :reduce_n def should_report_srconflict? sr_conflicts.any? && (sr_conflicts.size != @grammar.n_expected_srconflicts) @@ -582,10 +581,6 @@ def init @shift = @statetable.map { |state| Shift.new(state) } end - def reduce_n - @reduce.size - end - def reduce(i) case i when Rule then i = i.ident diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index d18931f7..913ff655 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -64,7 +64,7 @@ def generate gen_goto_tables t, @grammar t.token_table = token_table(@grammar) t.reduce_table = reduce_table(@grammar) - t.reduce_n = @states.reduce_n + t.reduce_n = @grammar.size t.shift_n = @states.shift_n t.nt_base = @grammar.nonterminal_base t.token_to_s_table = @grammar.symbols.map {|sym| sym.to_s } @@ -226,7 +226,7 @@ def act2actid(act) when Shift then act.goto_id when Reduce then -act.rule_id when Accept then @states.shift_n - when Error then @states.reduce_n * -1 + when Error then @grammar.size * -1 else raise "racc: fatal: wrong act type #{act.class} in action table" end From ee9cdcc78e58c9bd6701b0f12eaba0f4550446b2 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:19:58 +0200 Subject: [PATCH 263/619] Remove redundant ActionTable#reduce --- lib/racc/state.rb | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 912468b0..7064585e 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -316,7 +316,7 @@ def resolve(state) else # only reduce is possible; we won't even bother looking at the next # token in this state - state.defact = @actions.reduce(state.rrules[0]) + state.defact = Reduce.new(state.rrules[0]) end end @@ -329,7 +329,7 @@ def resolve_rr(state, ritems) state.rr_conflict!(act.rule, item.rule, tok) else # No conflict. - state.action[tok] = @actions.reduce(item.rule) + state.action[tok] = Reduce.new(item.rule) end end end @@ -417,14 +417,14 @@ def pack(state) act = state.action arr = Array.new(@grammar.size, 0) act.each do |t, a| - arr[a.rule_id] += 1 if a.kind_of?(Reduce) + arr[a.rule_id] += 1 if a.kind_of?(Reduce) end i = arr.max s = (i > 0) ? arr.index(i) : nil ### set & delete default action if s - r = @actions.reduce(s) + r = Reduce.new(@grammar[s]) if not state.defact or state.defact == r act.delete_if {|t, a| a == r } state.defact = r @@ -570,28 +570,15 @@ def initialize(grammar, statetable) @grammar = grammar @statetable = statetable - @reduce = [] @shift = [] @accept = Accept.new @error = Error.new end def init - @reduce = @grammar.map { |rule| Reduce.new(rule) } @shift = @statetable.map { |state| Shift.new(state) } end - def reduce(i) - case i - when Rule then i = i.ident - when Integer then ; - else - raise "racc: fatal: wrong class #{i.class} for reduce" - end - - @reduce[i] or raise "racc: fatal: reduce action #{i.inspect} not exist" - end - def shift_n @shift.size end From 98074a4a081f5b1b6663cb8753fa07ee86203b2c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:21:21 +0200 Subject: [PATCH 264/619] Remove redundant States#shift_n --- lib/racc/state.rb | 5 ----- lib/racc/statetransitiontable.rb | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 7064585e..ff3b1373 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -46,7 +46,6 @@ def inspect extend Forwardable def_delegator "@states", :each - def_delegator "@actions", :shift_n def should_report_srconflict? sr_conflicts.any? && (sr_conflicts.size != @grammar.n_expected_srconflicts) @@ -579,10 +578,6 @@ def init @shift = @statetable.map { |state| Shift.new(state) } end - def shift_n - @shift.size - end - def shift(i) case i when State then i = i.ident diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 913ff655..290e96e3 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -65,7 +65,7 @@ def generate t.token_table = token_table(@grammar) t.reduce_table = reduce_table(@grammar) t.reduce_n = @grammar.size - t.shift_n = @states.shift_n + t.shift_n = @states.size t.nt_base = @grammar.nonterminal_base t.token_to_s_table = @grammar.symbols.map {|sym| sym.to_s } t @@ -225,7 +225,7 @@ def act2actid(act) case act when Shift then act.goto_id when Reduce then -act.rule_id - when Accept then @states.shift_n + when Accept then @states.size when Error then @grammar.size * -1 else raise "racc: fatal: wrong act type #{act.class} in action table" From 48d84e75da26f96c758f1bf82ea093046443c5f9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:22:29 +0200 Subject: [PATCH 265/619] Remove redundant ActionTable#shift --- lib/racc/state.rb | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index ff3b1373..ed70195c 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -310,7 +310,7 @@ def resolve(state) elsif state.rrules.empty? # shift state.stokens.each do |t| - state.action[t] = @actions.shift(state.gotos[t].to_state) + state.action[t] = Shift.new(state.gotos[t].to_state) end else # only reduce is possible; we won't even bother looking at the next @@ -341,7 +341,7 @@ def resolve_sr(state, stokens) unless act # no conflict - state.action[stok] = @actions.shift(goto.to_state) + state.action[stok] = Shift.new(goto.to_state) else # conflict rtok = act.rule.precedence @@ -351,14 +351,14 @@ def resolve_sr(state, stokens) when :Shift # overwrite - state.action[stok] = @actions.shift(goto.to_state) + state.action[stok] = Shift.new(goto.to_state) when :Error state.action[stok] = @actions.error when :CantResolve # shift as default - state.action[stok] = @actions.shift(goto.to_state) + state.action[stok] = Shift.new(goto.to_state) state.sr_conflict!(stok, act.rule) end end @@ -569,24 +569,11 @@ def initialize(grammar, statetable) @grammar = grammar @statetable = statetable - @shift = [] @accept = Accept.new @error = Error.new end def init - @shift = @statetable.map { |state| Shift.new(state) } - end - - def shift(i) - case i - when State then i = i.ident - when Integer then ; - else - raise "racc: fatal: wrong class #{i.class} for shift" - end - - @shift[i] or raise "racc: fatal: shift action #{i} does not exist" end attr_reader :accept From 4509575ea0c15921cdd18a88ba0c8d61d6289b2e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:22:49 +0200 Subject: [PATCH 266/619] Remove redundant ActionTable#init --- lib/racc/state.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index ed70195c..a5fec42c 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -76,7 +76,6 @@ def compute_nfa core_to_state(Set[@grammar[0].ptrs[0]]) # generate LALR states @states.each { |state| generate_states(state) } - @actions.init @nfa_computed = true self @@ -573,9 +572,6 @@ def initialize(grammar, statetable) @error = Error.new end - def init - end - attr_reader :accept attr_reader :error end From 468ef8dd765fe2b81f11f5994e54bf00683cda93 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:23:39 +0200 Subject: [PATCH 267/619] Remove redundant ActionTable class --- lib/racc/state.rb | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index a5fec42c..c42952b2 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -24,7 +24,6 @@ def initialize(grammar, debug_flags = DebugFlags.new) @d_prec = debug_flags.prec @states = [] @statecache = {} - @actions = ActionTable.new(@grammar, self) @nfa_computed = false @dfa_computed = false @gotos = [] @@ -353,7 +352,7 @@ def resolve_sr(state, stokens) state.action[stok] = Shift.new(goto.to_state) when :Error - state.action[stok] = @actions.error + state.action[stok] = Error.new when :CantResolve # shift as default @@ -407,7 +406,7 @@ def set_accept acc_state = targ_state.action[anch].goto_state acc_state.action.clear - acc_state.defact = @actions.accept + acc_state.defact = Accept.new end def pack(state) @@ -428,7 +427,7 @@ def pack(state) state.defact = r end else - state.defact ||= @actions.error + state.defact ||= Error.new end end end @@ -561,21 +560,6 @@ def each_lookahead_token(tbl) end end - # The table of LALR actions. Actions are either - # Shift, Reduce, Accept, or Error. - class ActionTable - def initialize(grammar, statetable) - @grammar = grammar - @statetable = statetable - - @accept = Accept.new - @error = Error.new - end - - attr_reader :accept - attr_reader :error - end - class Shift < Struct.new(:goto_state) def goto_id goto_state.ident From ce412659a0f232ad7e20a88dec3b70f880fabf8b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:29:43 +0200 Subject: [PATCH 268/619] Simplify code in States#pack --- lib/racc/state.rb | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index c42952b2..a0eb6716 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -410,24 +410,21 @@ def set_accept end def pack(state) - ### find most frequently used reduce rule - act = state.action - arr = Array.new(@grammar.size, 0) - act.each do |t, a| - arr[a.rule_id] += 1 if a.kind_of?(Reduce) - end - i = arr.max - s = (i > 0) ? arr.index(i) : nil - - ### set & delete default action - if s - r = Reduce.new(@grammar[s]) - if not state.defact or state.defact == r - act.delete_if {|t, a| a == r } - state.defact = r + # find most frequently used reduce rule, and make it the default action + state.defact ||= begin + freq = Hash.new(0) + state.action.each do |tok, act| + freq[act.rule] += 1 if act.kind_of?(Reduce) + end + + if freq.empty? + Error.new + else + most_common = freq.keys.max_by { |rule| freq[rule] } + reduce = Reduce.new(most_common) + state.action.delete_if { |tok, act| act == reduce } + reduce end - else - state.defact ||= Error.new end end end From 3fa8f0db4c64863fb3b18141051ec134e91b7bf8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:31:03 +0200 Subject: [PATCH 269/619] Remove redundant Reduce#rule_id method --- lib/racc/logfilegenerator.rb | 2 +- lib/racc/state.rb | 4 ---- lib/racc/statetransitiontable.rb | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index a1cc14f0..1f389a1f 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -111,7 +111,7 @@ def outact(f, t, act) t.to_s, act.goto_id when Reduce f.printf " %-12s reduce using rule %d (%s)\n", - t.to_s, act.rule_id, act.rule.target.to_s + t.to_s, act.rule.ident, act.rule.target.to_s when Accept f.printf " %-12s accept\n", t.to_s when Error diff --git a/lib/racc/state.rb b/lib/racc/state.rb index a0eb6716..8cb7c25b 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -568,10 +568,6 @@ def inspect end class Reduce < Struct.new(:rule) - def rule_id - rule.ident - end - def inspect "" end diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 290e96e3..810eb165 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -224,7 +224,7 @@ def set_table(entries, tbl, chk, ptr) def act2actid(act) case act when Shift then act.goto_id - when Reduce then -act.rule_id + when Reduce then -act.rule.ident when Accept then @states.size when Error then @grammar.size * -1 else From 6bf42bdd4829fb7b27eb00b0d6b58466a880a26e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:32:27 +0200 Subject: [PATCH 270/619] Remove redundant Shift#goto_id method --- lib/racc/logfilegenerator.rb | 2 +- lib/racc/state.rb | 4 ---- lib/racc/statetransitiontable.rb | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 1f389a1f..7de678be 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -108,7 +108,7 @@ def outact(f, t, act) case act when Shift f.printf " %-12s shift, and go to state %d\n", - t.to_s, act.goto_id + t.to_s, act.goto_state.ident when Reduce f.printf " %-12s reduce using rule %d (%s)\n", t.to_s, act.rule.ident, act.rule.target.to_s diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 8cb7c25b..9ecbebd6 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -558,10 +558,6 @@ def each_lookahead_token(tbl) end class Shift < Struct.new(:goto_state) - def goto_id - goto_state.ident - end - def inspect "" end diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 810eb165..8d399107 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -223,7 +223,7 @@ def set_table(entries, tbl, chk, ptr) def act2actid(act) case act - when Shift then act.goto_id + when Shift then act.goto_state.ident when Reduce then -act.rule.ident when Accept then @states.size when Error then @grammar.size * -1 From 4b02e9c1bad9369133541c2c0380cda1c8ea695a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:36:02 +0200 Subject: [PATCH 271/619] Remove debug print code, simplify States#do_resolve_sr --- lib/racc/state.rb | 42 ++++++------------------------------------ 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 9ecbebd6..24505d42 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -19,9 +19,6 @@ class States def initialize(grammar, debug_flags = DebugFlags.new) @grammar = grammar @symboltable = grammar.symboltable - @d_state = debug_flags.state - @d_la = debug_flags.la - @d_prec = debug_flags.prec @states = [] @statecache = {} @nfa_computed = false @@ -83,8 +80,6 @@ def compute_nfa private def generate_states(state) - puts "dstate: #{state}" if @d_state - # build table of what the 'core' of the following state will be, if the # next token appearing in the input was 'sym' table = Hash.new { |h,k| h[k] = Set.new } @@ -95,13 +90,10 @@ def generate_states(state) end table.each do |sym, core| - puts "dstate: sym=#{sym} ncore=#{core}" if @d_state - dest = core_to_state(core) goto = Goto.new(sym.nonterminal? && @gotos.size, sym, state, dest) @gotos << goto if sym.nonterminal? state.gotos[sym] = goto - puts "dstate: #{state.ident} --#{sym}--> #{dest.ident}" if @d_state # check infinite recursion if state.ident == dest.ident and state.closure.size == 1 @@ -122,13 +114,6 @@ def core_to_state(core) dest = State.new(@states.size, core) @states << dest @statecache[core] = dest - - puts "core_to_state: create state ID #{dest.ident}" if @d_state - else - if @d_state - puts "core_to_state: dest is cached ID #{dest.ident}" - puts "core_to_state: dest core #{dest.core.join(' ')}" - end end dest @@ -370,29 +355,14 @@ def resolve_sr(state, stokens) } def do_resolve_sr(stok, rtok) - puts "resolve_sr: s/r conflict: rtok=#{rtok}, stok=#{stok}" if @d_prec + return :CantResolve unless rtok && (rprec = rtok.precedence) + return :CantResolve unless stok && (sprec = stok.precedence) - unless rtok and rtok.precedence - puts "resolve_sr: no prec for #{rtok}(R)" if @d_prec - return :CantResolve - end - rprec = rtok.precedence - - unless stok and stok.precedence - puts "resolve_sr: no prec for #{stok}(S)" if @d_prec - return :CantResolve + if rprec == sprec + ASSOC[rtok.assoc] || (raise "racc: fatal: #{rtok}.assoc is not Left/Right/Nonassoc") + else + (rprec > sprec) ? :Reduce : :Shift end - sprec = stok.precedence - - ret = if rprec == sprec - ASSOC[rtok.assoc] or - raise "racc: fatal: #{rtok}.assoc is not Left/Right/Nonassoc" - else - (rprec > sprec) ? (:Reduce) : (:Shift) - end - - puts "resolve_sr: resolved as #{ret.id2name}" if @d_prec - ret end # From 7d5f610a4e9d147bf3e5e3813b3d4d5842958a8d Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:37:18 +0200 Subject: [PATCH 272/619] Comment in States#initialize --- lib/racc/state.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 24505d42..7e94676a 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -19,11 +19,16 @@ class States def initialize(grammar, debug_flags = DebugFlags.new) @grammar = grammar @symboltable = grammar.symboltable + @states = [] @statecache = {} + @nfa_computed = false @dfa_computed = false - @gotos = [] + + @gotos = [] # all state transitions performed when reducing + # Goto is also used for state transitions when shifting, + # but those objects don't go in this array end attr_reader :grammar From dffd8980f9f619d2161e509f6e90224dfe86a6dc Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:37:36 +0200 Subject: [PATCH 273/619] Code formatting tweak in States#compute_dfa --- lib/racc/state.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 7e94676a..b47f3244 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -133,13 +133,9 @@ def compute_dfa compute_nfa compute_lookahead - @states.each do |state| - resolve(state) - end + @states.each { |state| resolve(state) } set_accept - @states.each do |state| - pack(state) - end + @states.each { |state| pack(state) } @dfa_computed = true self From 661f5605275f14a0bae6856aa4cd70d9d34dd7db Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:38:04 +0200 Subject: [PATCH 274/619] Some comments really, really don't help --- lib/racc/state.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index b47f3244..ed0ef4a1 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -366,10 +366,6 @@ def do_resolve_sr(stok, rtok) end end - # - # complete - # - def set_accept anch = @symboltable.anchor init_state = @states[0].gotos[@grammar.start].to_state @@ -416,7 +412,6 @@ def arrows(from, &block) end end - # A LALR state. class State def initialize(ident, core) @ident = ident # ID number used to provide a canonical ordering From 3bf4ecada0fbd4ec4f71cca938ba5d3b2f169306 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 14:42:37 +0200 Subject: [PATCH 275/619] StateTransitionTable inherits from Struct --- lib/racc/statetransitiontable.rb | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 8d399107..b8382b2a 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -9,23 +9,14 @@ module Racc - StateTransitionTable = Struct.new(:action_table, - :action_check, - :action_default, - :action_pointer, - :goto_table, - :goto_check, - :goto_default, - :goto_pointer, - :token_table, - :reduce_table, - :reduce_n, - :shift_n, - :nt_base, - :token_to_s_table, - :use_result_var, - :debug_parser) - class StateTransitionTable # reopen + TRANSITION_TABLE_ATTRS = + [:action_table, :action_check, :action_default, :action_pointer, + :goto_table, :goto_check, :goto_default, :goto_pointer, + :token_table, :reduce_table, :reduce_n, :shift_n, + :nt_base, :token_to_s_table, + :use_result_var, :debug_parser] + + class StateTransitionTable < Struct.new(*TRANSITION_TABLE_ATTRS) def StateTransitionTable.generate(states) StateTransitionTableGenerator.new(states).generate end From 947be7a3049a84e677382ad5aa052c25d5acea82 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 15:08:13 +0200 Subject: [PATCH 276/619] Comment in StateTransitionTableGenerator#reduce_table --- lib/racc/statetransitiontable.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index b8382b2a..eb369041 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -63,15 +63,16 @@ def generate end def reduce_table(grammar) + # reduce_table has 3 items for each grammar rule: + # [number of items to pop off stack when reducing, + # ID number of non-terminal to push on stack after reducing, + # method to call to perform the rule's action] t = [0, 0, :racc_error] grammar.each_with_index do |rule, idx| next if idx == 0 t.push rule.size t.push rule.target.ident - t.push(if rule.action.empty? # and @params.omit_action_call? - then :_reduce_none - else "_reduce_#{idx}".to_sym - end) + t.push(rule.action.empty? ? :_reduce_none : "_reduce_#{idx}".to_sym) end t end From 6b787cdb207c68d9dfa75b62244ebcdd2c785da7 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 15:08:39 +0200 Subject: [PATCH 277/619] Separate out code which generates action_default within #gen_action_tables --- lib/racc/statetransitiontable.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index eb369041..69488bc6 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -82,13 +82,14 @@ def token_table(grammar) end def gen_action_tables(t, states) + t.action_default = states.map { |s| act2actid(s.defact) } + t.action_table = yytable = [] t.action_check = yycheck = [] - t.action_default = yydefact = [] t.action_pointer = yypact = [] e1 = [] + states.each do |state| - yydefact.push act2actid(state.defact) if state.action.empty? yypact.push nil next From 762bf58008472bdb2fbfd55e2f34e8dff3e97850 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 15:38:59 +0200 Subject: [PATCH 278/619] Remove tasks/doc.rb -- Hoe already provides a 'rake docs' task --- Manifest.txt | 1 - tasks/doc.rb | 12 ------------ 2 files changed, 13 deletions(-) delete mode 100644 tasks/doc.rb diff --git a/Manifest.txt b/Manifest.txt index c671ff97..1cb88529 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -50,7 +50,6 @@ sample/lalr.y sample/lists.y sample/syntax.y sample/yyerr.y -tasks/doc.rb tasks/email.rb test/assets/bench.y test/assets/bibtex.y diff --git a/tasks/doc.rb b/tasks/doc.rb deleted file mode 100644 index 73eaab52..00000000 --- a/tasks/doc.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'rake/rdoctask' - -Rake::RDocTask.new(:docs) do |rd| - rd.main = "README.en.rdoc" - rd.rdoc_files.include(SPEC.files.find_all { |file_name| - file_name =~ /^(bin|lib|ext)/ || file_name !~ /\// - }) - - title = "#{SPEC.name}-#{SPEC.version} Documentation" - - rd.options << "-t #{title}" -end From 5b5939499828c9701689ea074fe9163074ca06e2 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 15:39:47 +0200 Subject: [PATCH 279/619] Remove anachronistic EmailTask Nobody is sending out release notices to a Racc mailing list anymore. Even if they are, I'm sure they are not using this Rake task to prepare the e-mails. --- Manifest.txt | 1 - tasks/email.rb | 57 -------------------------------------------------- 2 files changed, 58 deletions(-) delete mode 100644 tasks/email.rb diff --git a/Manifest.txt b/Manifest.txt index 1cb88529..9c243358 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -50,7 +50,6 @@ sample/lalr.y sample/lists.y sample/syntax.y sample/yyerr.y -tasks/email.rb test/assets/bench.y test/assets/bibtex.y test/assets/cadenza.y diff --git a/tasks/email.rb b/tasks/email.rb deleted file mode 100644 index b275312e..00000000 --- a/tasks/email.rb +++ /dev/null @@ -1,57 +0,0 @@ -# coding: UTF-8 - -class EmailTask - def initialize language, readme, changelog - @language = language - @readme = readme - @changelog = changelog - @languages = { - :en => { - :release => 'release', - :released => 'has been released', - }, - :ja => { - :release => 'リリース', - :released => 'はリリースしました', - } - } - define_tasks - end - - private - def define_tasks - namespace :email do - task @language do - subject = "#{SPEC.name} #{SPEC.version} #{@languages[@language][:release]}" - title = "#{SPEC.name} #{SPEC.version} #{@languages[@language][:released]}!" - readme = Hash[*(File.read(@readme).split(/^(=+ .*)$/)[1..-1])] - description = readme[readme.keys.find { |x| x =~ /description/i }] - description = description.split(/\n\n+/).find { |x| - x.length > 0 - }.gsub(/^\s*/, '') - urls = readme[readme.keys.find { |x| x =~ /#{SPEC.name}/i }] - urls = urls.strip.gsub(/\*\s/, '').split(/\n/).map { |s| "* <#{s}>" } - File.open("email.#{@language}.txt", "wb") { |file| - file.puts(<<-eomail) -Subject: [ANN] #{subject} - -#{title} - -#{urls.join("\n")} - -#{description} - -Changes: - -#{File.read(@changelog).split(/^(===.*)/)[1..2].join.strip.gsub(/=/, '#')} - -#{urls.join("\n")} -eomail - } - end - end - end -end - -EmailTask.new(:en, 'README.en.rdoc', 'doc/en/NEWS.en.rdoc') -EmailTask.new(:ja, 'README.ja.rdoc', 'doc/ja/NEWS.ja.rdoc') From 29a3776f7ec16a012965806d727dbea65ec07f32 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 15:43:21 +0200 Subject: [PATCH 280/619] Remove unused 'fastcache' extension This (very small) extension was just a hash table for LALR states. It's not used anywhere. It looks like the author wanted to make Racc run a bit faster by using something with higher performance than a plain Ruby Hash... but storing and retrieving States from a Hash is not a bottleneck for performance anyway. --- Manifest.txt | 2 - fastcache/extconf.rb | 2 - fastcache/fastcache.c | 185 ------------------------------------------ 3 files changed, 189 deletions(-) delete mode 100644 fastcache/extconf.rb delete mode 100644 fastcache/fastcache.c diff --git a/Manifest.txt b/Manifest.txt index 9c243358..60085707 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -14,8 +14,6 @@ ext/racc/cparse.c ext/racc/depend ext/racc/extconf.rb ext/racc/com/headius/racc/Cparse.java -fastcache/extconf.rb -fastcache/fastcache.c lib/racc.rb lib/racc/debugflags.rb lib/racc/exception.rb diff --git a/fastcache/extconf.rb b/fastcache/extconf.rb deleted file mode 100644 index e010aa79..00000000 --- a/fastcache/extconf.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'mkmf' -create_makefile 'corecache' diff --git a/fastcache/fastcache.c b/fastcache/fastcache.c deleted file mode 100644 index 2656ce8d..00000000 --- a/fastcache/fastcache.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - $Id$ - - Copyright (C) 2005 Minero Aoki - - This program is free software. - You can distribute/modify this program under the terms of - the GNU LGPL, Lesser General Public Licese version 2.1. -*/ - -#include "ruby.h" - -static VALUE LALRcoreCache; - -struct item_holder { - unsigned long hashval; - VALUE core; - VALUE state; - struct item_holder *next; -}; - -struct lalr_state_cache { - struct item_holder **bin; - long size; - long num; -}; - -static void -lalrc_free(struct lalr_state_cache *p) -{ - struct item_holder *tmp; - long i; - - for (i = 0; i < p->size; i++) { - while (tmp = p->bin[i]) { - p->bin[i] = tmp->next; - free(tmp); - } - } - free(p->bin); - free(p); -} - -#define INIT_BIN 256 - -static VALUE -lalrc_s_new(VALUE self) -{ - struct lalr_state_cache *cache; - - cache = ALLOC_N(struct lalr_state_cache, 1); - cache->bin = ALLOC_N(struct item_holder*, INIT_BIN); - cache->size = INIT_BIN; - cache->num = 0; - return Data_Wrap_Struct(LALRcoreCache, 0, lalrc_free, cache); -} - -#define GET_LALRC(self, p) Data_Get_Struct(self, struct lalr_state_cache, p) - -static void -lalrc_rehash(struct lalr_state_cache *p) -{ - struct item_holder *top = 0, *tmp = 0; - long i; - - for (i = p->size / 2; i < p->size; i++) { - p->bin[i] = 0; - } - for (i = 0; i < p->size / 2; i++) { - if (!p->bin[i]) - continue; - - tmp = p->bin[i]; - while (tmp->next) - tmp = tmp->next; - tmp->next = top; - top = p->bin[i]; - p->bin[i] = 0; - } - - while (top) { - tmp = top; - top = tmp->next; - tmp->next = 0; - - i = tmp->hashval % p->size; - if (p->bin[i]) { - tmp->next = p->bin[i]; - p->bin[i] = tmp; - } - else { - p->bin[i] = tmp; - } - } -} - -static int -coreeql(VALUE a, VALUE b) -{ - long i; - - /* Check_Type(a, T_ARRAY); - Check_Type(b, T_ARRAY); */ - if (RARRAY(a)->len != RARRAY(b)->len) - return 0; - for (i = 0; i < RARRAY(a)->len; i++) - if (RARRAY(a)->ptr[i] != RARRAY(b)->ptr[i]) - return 0; - - return 1; -} - -static unsigned long -hashval(VALUE core) -{ - unsigned long v = 0; - long i, j; - - for (i = 0; i < RARRAY(core)->len; i++) { - v *= RARRAY(core)->ptr[i]; - v ^= RARRAY(core)->ptr[i]; - } - return v; -} - -static VALUE -lalrc_aref(VALUE self, VALUE core) -{ - struct lalr_state_cache *p; - unsigned long v; - long i; - struct item_holder *ad; - - /* Check_Type(core, T_ARRAY); */ - GET_LALRC(self, p); - v = hashval(core); - i = v % p->size; - ad = p->bin[i]; - while (ad) { - if (ad->hashval == v) { - if (coreeql(core, ad->core)) { - return ad->state; - } - else { -printf("."); - } - } - ad = ad->next; - } - return Qnil; -} - -static VALUE -lalrc_add_direct(VALUE self, VALUE core, VALUE state) -{ - struct lalr_state_cache *p; - struct item_holder *ad; - long i; - - GET_LALRC(self, p); - ad = ALLOC_N(struct item_holder, 1); - ad->hashval = hashval(core); - ad->core = core; - ad->state = state; - - i = ad->hashval % p->size; - ad->next = p->bin[i]; - p->bin[i] = ad; - p->num++; - if ((p->num / p->size) >= 1) { - REALLOC_N(p->bin, struct item_holder*, p->size * 2); - p->size *= 2; - lalrc_rehash(p); - } - return Qnil; -} - -void -Init_corecache(void) -{ - LALRcoreCache = rb_define_class("LALRcoreCache", rb_cObject); - rb_define_singleton_method(LALRcoreCache, "new", lalrc_s_new, 0); - rb_define_method(LALRcoreCache, "[]", lalrc_aref, 1); - rb_define_method(LALRcoreCache, "[]=", lalrc_add_direct, 2); -} From ec39ed222b0dc816e8e4d2de5bca59bb8b9212fd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 16:04:24 +0200 Subject: [PATCH 281/619] Remove unneeded Racc_Runtime_Revision/Version/etc constants I have looked through the source of every single gem on Rubygems which depends on Racc, and I didn't see anything anywhere which used these constants. I can't imagine why anyone would want to use them, either. If they need to know the version, they have Racc::VERSION. --- bin/racc | 20 +++++--------------- ext/racc/cparse.c | 4 ---- lib/racc/parser.rb | 14 +------------- 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/bin/racc b/bin/racc index f398a70b..7d9af762 100755 --- a/bin/racc +++ b/bin/racc @@ -91,21 +91,11 @@ def main #} parser.on('--version', 'Prints version and quit.') { puts "racc version #{Racc::Version}" - exit 0 - } - parser.on('--runtime-version', 'Prints runtime version and quit.') { - printf "racc runtime version %s (rev. %s); %s\n", - Racc::Parser::Racc_Runtime_Version, - Racc::Parser::Racc_Runtime_Revision, - if Racc::Parser.racc_runtime_type == 'ruby' - sprintf('ruby core version %s (rev. %s)', - Racc::Parser::Racc_Runtime_Core_Version_R, - Racc::Parser::Racc_Runtime_Core_Revision_R) - else - sprintf('c core version %s (rev. %s)', - Racc::Parser::Racc_Runtime_Core_Version_C, - Racc::Parser::Racc_Runtime_Core_Revision_C) - end + if Racc::Parser.racc_runtime_type == 'ruby' + puts '(ruby core)' + else + puts '(c core)' + end exit 0 } parser.on('--copyright', 'Prints copyright and quit.') { diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index ee9afe1f..16eb5c3b 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -804,10 +804,6 @@ Init_cparse(void) } rb_define_private_method(Parser, "_racc_do_parse_c", racc_cparse, 2); rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 4); - rb_define_const(Parser, "Racc_Runtime_Core_Version_C", - rb_str_new2(RACC_VERSION)); - rb_define_const(Parser, "Racc_Runtime_Core_Id_C", - rb_str_new2("$originalId: cparse.c,v 1.8 2006/07/06 11:39:46 aamine Exp $")); CparseParams = rb_define_class_under(Racc, "CparseParams", rb_cObject); diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index e1b1946a..f48d04c5 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -171,18 +171,11 @@ class ParseError < StandardError; end # Note: parser.rb is LGPL, but your parser is not. # Your own parser is completely yours. module Racc - unless defined?(Racc_No_Extentions) Racc_No_Extentions = false # :nodoc: end class Parser - - Racc_Runtime_Version = ::Racc::VERSION - Racc_Runtime_Revision = '$Id$' - - Racc_Runtime_Core_Version_R = ::Racc::VERSION - Racc_Runtime_Core_Revision_R = '$Id$'.split[1] begin if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby' require 'racc/cparse-jruby.jar' @@ -190,8 +183,7 @@ class Parser else require 'racc/cparse' end - # Racc_Runtime_Core_Version_C = (defined in extention) - Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2] + unless new.respond_to?(:_racc_do_parse_c, true) raise LoadError, 'old cparse.so' end @@ -201,16 +193,12 @@ class Parser Racc_Main_Parsing_Routine = :_racc_do_parse_c # :nodoc: Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc: - Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C # :nodoc: - Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C # :nodoc: Racc_Runtime_Type = 'c' # :nodoc: rescue LoadError puts $! puts $!.backtrace Racc_Main_Parsing_Routine = :_racc_do_parse_rb Racc_YY_Parse_Method = :_racc_yyparse_rb - Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R - Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R Racc_Runtime_Type = 'ruby' end From ece69200fac2e47a06357b2a1d8cf866ddacf053 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 16:25:06 +0200 Subject: [PATCH 282/619] rake test_pure works again --- lib/racc/parser.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index f48d04c5..372c648f 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -171,8 +171,8 @@ class ParseError < StandardError; end # Note: parser.rb is LGPL, but your parser is not. # Your own parser is completely yours. module Racc - unless defined?(Racc_No_Extentions) - Racc_No_Extentions = false # :nodoc: + unless defined?(Racc_No_Extensions) + Racc_No_Extensions = ENV['PURERUBY'] # :nodoc: end class Parser @@ -187,7 +187,7 @@ class Parser unless new.respond_to?(:_racc_do_parse_c, true) raise LoadError, 'old cparse.so' end - if Racc_No_Extentions + if Racc_No_Extensions raise LoadError, 'selecting ruby version of racc runtime core' end From d3b1e2dcba967265782be49e0d65dbacdffa7b8a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 16:25:20 +0200 Subject: [PATCH 283/619] rake test_pure is not unbearably noisy --- lib/racc/parser.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 372c648f..89d923f8 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -195,8 +195,6 @@ class Parser Racc_YY_Parse_Method = :_racc_yyparse_c # :nodoc: Racc_Runtime_Type = 'c' # :nodoc: rescue LoadError -puts $! -puts $!.backtrace Racc_Main_Parsing_Routine = :_racc_do_parse_rb Racc_YY_Parse_Method = :_racc_yyparse_rb Racc_Runtime_Type = 'ruby' From 1e2f8d196d38621fd8424289ef1597e3997ed773 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 16:29:49 +0200 Subject: [PATCH 284/619] Add explanatory comment to parser-text.rb --- Rakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Rakefile b/Rakefile index 80a34a04..699a2757 100644 --- a/Rakefile +++ b/Rakefile @@ -64,6 +64,8 @@ file 'lib/racc/parser-text.rb' => ['lib/racc/parser.rb'] do |t| open(t.name, 'wb') { |io| io.write(<<-eorb) +# Generated from parser.rb; do not edit +# This file is used for embedding the Racc runtime into a generated parser module Racc PARSER_TEXT = <<'__end_of_file__' #{File.read(source)} From dbd54e138112911266adc6c2c57e6f8ba55cfdd1 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 16:38:36 +0200 Subject: [PATCH 285/619] Comment explaining compression scheme used in StateTransitionTableGenerator --- lib/racc/statetransitiontable.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index 69488bc6..f4892ce3 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -81,6 +81,30 @@ def token_table(grammar) Hash[grammar.symboltable.terminals.map { |t| [t, t.ident]}] end + # The action and goto tables use a clever trick for compression + # Each state should have its own action table (one per lookahead token) + # Each state from which we can reduce should also have its own goto table + # (Again, one entry per lookahead token) + # But those tables are very sparse (most entries are nil) + # + # So, to save space, we OVERLAY all the action tables into one big array + # And same with the goto tables + # We must choose an offset for each state, so its populated entries don't + # collide with the populated entries of any other state + # The chosen offsets go in the 'action_pointer' and 'goto_pointer' arrays + # At runtime, we will retrieve the offset for the current state, add the + # token number of the lookahead token, and index into the action/goto table + # + # BUT, what if the lookahead token is one which is illegal in this state? + # OR, what if it's legal, but its entry is the default entry (which does + # not explicitly appear in the main action/goto tables)? + # We could blindly hit an entry which belongs to a different state, and go + # off into some random sequence of states + # To prevent this, there are 'check' arrays with the state numbers which + # each action/goto entry belong to + # So before we retrieve an action/goto and use it, we see whether the + # corresponding 'check' number is the current state number + def gen_action_tables(t, states) t.action_default = states.map { |s| act2actid(s.defact) } From 805b5ea6a3a6a619f45fc9780f93021a58d013a5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 19:53:12 +0200 Subject: [PATCH 286/619] Improve readability of StateTransitionTableGenerator#gen_action_tables --- lib/racc/statetransitiontable.rb | 48 +++++++++++++++++++------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index f4892ce3..dc33a475 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -107,24 +107,30 @@ def token_table(grammar) def gen_action_tables(t, states) t.action_default = states.map { |s| act2actid(s.defact) } + t.action_table = [] + t.action_check = [] + t.action_pointer = [] - t.action_table = yytable = [] - t.action_check = yycheck = [] - t.action_pointer = yypact = [] - e1 = [] - + entries = [] states.each do |state| if state.action.empty? - yypact.push nil - next - end - vector = [] - state.action.each do |tok, act| - vector[tok.ident] = act2actid(act) + # there is ONLY one default action in this state + # when the parser sees that the 'action pointer' (or offset) for this + # state is nil, it will just execute the default action + t.action_pointer << nil + else + # build the action table for this state + actions = [] + state.action.each do |tok, act| + actions[tok.ident] = act2actid(act) + end + # then store data which will be used when we overlay all the per-state + # action tables into one big action table + add_entry(entries, actions, state.ident, t.action_pointer) end - addent e1, vector, state.ident, yypact end - set_table e1, yytable, yycheck, yypact + + set_table(entries, t.action_table, t.action_check, t.action_pointer) end def gen_goto_tables(t, grammar) @@ -165,16 +171,20 @@ def gen_goto_tables(t, grammar) next end - addent e1, tmp, (tok.ident - grammar.nonterminal_base), yypgoto + add_entry(e1, tmp, (tok.ident - grammar.nonterminal_base), yypgoto) end set_table e1, yytable2, yycheck2, yypgoto end - def addent(all, arr, chkval, ptr) - min = arr.index { |item| item } - ptr.push(-7777) # mark - arr = arr.drop(min) - all.push [arr, chkval, mkmapexp(arr), min, ptr.size - 1] + def add_entry(all, array, chkval, ptr_array) + # array is an action/goto array for one state + # the array indices are token numbers + # prepare the data which will be needed when we overall ALL these arrays + # into one big array: + min = array.index { |item| item } + array = array.drop(min) + ptr_array << :just_reserving_space_and_will_be_overwritten + all << [array, chkval, mkmapexp(array), min, ptr_array.size - 1] end n = 2 ** 16 From 0c22d7982c386b754e5eb5d0416141ff83a4d0f3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:02:06 +0200 Subject: [PATCH 287/619] Improve readability of StateTransitionTableGenerator#gen_goto_tables --- lib/racc/statetransitiontable.rb | 67 +++++++++++++++++--------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index dc33a475..ba1d5894 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -134,46 +134,51 @@ def gen_action_tables(t, states) end def gen_goto_tables(t, grammar) - t.goto_table = yytable2 = [] - t.goto_check = yycheck2 = [] - t.goto_pointer = yypgoto = [] - t.goto_default = yydefgoto = [] - e1 = [] - grammar.symboltable.nonterminals.each do |tok| - tmp = [] + t.goto_table = [] + t.goto_check = [] + t.goto_pointer = [] + t.goto_default = [] + entries = [] - # decide default - freq = Array.new(@states.size, 0) + # for each nonterminal, choose most common destination state after + # reduce as the default destination state + grammar.symboltable.nonterminals.each do |tok| + freq = Hash.new(0) @states.each do |state| - goto = state.gotos[tok] - if goto - st = goto.to_state.ident - freq[st] += 1 - tmp[state.ident] = st - else - tmp[state.ident] = nil + if goto = state.gotos[tok] + freq[goto.to_state.ident] += 1 end end - max = freq.max - if max > 1 - default = freq.index(max) - tmp.map! {|i| default == i ? nil : i } + + most_common = freq.keys.max_by { |k| freq[k] } + if most_common && freq[most_common] > 1 + t.goto_default << most_common else - default = nil + t.goto_default << nil end - yydefgoto.push default - - # delete default value - tmp.pop until tmp.last or tmp.empty? - if tmp.compact.empty? - # only default - yypgoto.push nil - next + end + + # now build goto table for each nonterminal, and record data which will + # be used when overlaying all the individual goto tables into the main + # goto table + grammar.symboltable.nonterminals.zip(t.goto_default).each do |tok, default| + array = @states.map do |state| + if goto = state.gotos[tok] + to_state = goto.to_state.ident + to_state unless to_state == default + end end - add_entry(e1, tmp, (tok.ident - grammar.nonterminal_base), yypgoto) + if array.compact.empty? + t.goto_pointer << nil + else + array.pop until array.last || array.empty? + add_entry(entries, array, (tok.ident - grammar.nonterminal_base), + t.goto_pointer) + end end - set_table e1, yytable2, yycheck2, yypgoto + + set_table(entries, t.goto_table, t.goto_check, t.goto_pointer) end def add_entry(all, array, chkval, ptr_array) From 39906a8f08760075552fb64faf5cd67c89128005 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:23:25 +0200 Subject: [PATCH 288/619] Formatting tweaks --- lib/racc/parserfilegenerator.rb | 2 -- lib/racc/statetransitiontable.rb | 3 --- 2 files changed, 5 deletions(-) diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index 3d58ecb4..2bf2550a 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -450,7 +450,5 @@ def detab(str, ts = 8) ' ' * len } end - end - end diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb index ba1d5894..c2649652 100644 --- a/lib/racc/statetransitiontable.rb +++ b/lib/racc/statetransitiontable.rb @@ -263,12 +263,9 @@ def act2actid(act) raise "racc: fatal: wrong act type #{act.class} in action table" end end - end - class ParserClassGenerator - def initialize(states) @states = states @grammar = states.grammar From 979235ecf661a07f2693bc216498dcbc8fa3ffdb Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:28:19 +0200 Subject: [PATCH 289/619] Remove lib/racc/pre-setup -- we have Rake task instead --- Manifest.txt | 1 - lib/racc/pre-setup | 13 ------------- 2 files changed, 14 deletions(-) delete mode 100644 lib/racc/pre-setup diff --git a/Manifest.txt b/Manifest.txt index 60085707..37b54215 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -24,7 +24,6 @@ lib/racc/logfilegenerator.rb lib/racc/parser-text.rb lib/racc/parser.rb lib/racc/parserfilegenerator.rb -lib/racc/pre-setup lib/racc/sourcetext.rb lib/racc/state.rb lib/racc/statetransitiontable.rb diff --git a/lib/racc/pre-setup b/lib/racc/pre-setup deleted file mode 100644 index 5027d865..00000000 --- a/lib/racc/pre-setup +++ /dev/null @@ -1,13 +0,0 @@ -def generate_parser_text_rb(target) - return if File.exist?(srcfile(target)) - $stderr.puts "generating #{target}..." - File.open(target, 'w') {|f| - f.puts "module Racc" - f.puts " PARSER_TEXT = <<'__end_of_file__'" - f.puts File.read(srcfile('parser.rb')) - f.puts "__end_of_file__" - f.puts "end" - } -end - -generate_parser_text_rb 'parser-text.rb' From f242c5cf40aae18f998ae91dbf66f3a9ac3f66e8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:30:02 +0200 Subject: [PATCH 290/619] Remove (unmaintained, out-of-date) changelog No-one has been maintaining this changelog for a long time. The information it contains is extremely old. --- ChangeLog | 846 --------------------------------------------------- Manifest.txt | 1 - 2 files changed, 847 deletions(-) delete mode 100644 ChangeLog diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 762b5ee7..00000000 --- a/ChangeLog +++ /dev/null @@ -1,846 +0,0 @@ -Tue Feb 20 18:45:45 2007 Minero Aoki - - * lib/racc/grammar.rb (separated_by): last commit was wrong. use - optional default return value of #option. - -Tue Feb 20 18:27:48 2007 Minero Aoki - - * lib/racc/grammar.rb (separated_by): return [] for empty list. - -Tue Nov 7 07:13:47 2006 Minero Aoki - - * lib/racc/grammar.rb (Rule#prec): rule.prec{...} should set - action. - -Tue Nov 7 06:38:57 2006 Minero Aoki - - * lib/racc/grammar.rb: system call error on writing log file - should be ignored. - - * lib/racc/grammar.rb: never define lvar which have same name with - block local variable. - - * lib/racc/iset.rb: ditto. - - * lib/racc/logfilegenerator.rb: ditto. - - * lib/racc/parser.rb: ditto. - - * lib/racc/state.rb: ditto. - - * lib/racc/statetransitiontable.rb: ditto. - - * test/test.rb: racc -c is obsolete, use --line-convert-all. - -Sun Oct 29 13:27:30 2006 Minero Aoki - - * lib/racc/grammarfileparser.rb: use String#lines instead of - #to_a. - - * lib/racc/parserfilegenerator.rb: ditto. - - * lib/racc/compat.rb: provide Object#__send. - - * lib/racc/compat.rb: provide Object#__send!. - - * lib/racc/compat.rb: provide String#lines. - -Thu Aug 24 23:14:16 2006 Minero Aoki - - * lib/racc/grammar.rb: report conflicts/useless if $DEBUG. - - * lib/racc/statetransitiontable.rb: remove code for Ruby 1.4 - compatibility. - -Fri Aug 4 01:02:36 2006 Minero Aoki - - * lib/racc/grammar.rb: #should_terminal should be called in - #check_terminals. - -Fri Aug 4 00:44:56 2006 Minero Aoki - - * bin/racc: getopts -> optparse. - - * lib/racc/grammar.rb: value of error symbol is :error. - - * lib/racc/grammar.rb (check_terminals): string symbols are - terminal. - - * lib/racc/grammarfileparser.rb (add_rule_block): specified-prec - did not work. - -Fri Aug 4 00:29:53 2006 Minero Aoki - - * lib/racc/parserfilegenerator.rb - (serialize_integer_list_compressed): fix typo. - -Thu Aug 3 22:20:34 2006 Minero Aoki - - * bin/y2racc: fix filename. - -Thu Aug 3 21:10:48 2006 Minero Aoki - - * bin/y2racc: getopts -> optparse. - -Thu Aug 3 19:35:34 2006 Minero Aoki - - * setup.rb: updated. - -Thu Aug 3 19:34:55 2006 Minero Aoki - - * bin/racc2y: getopts -> optparse. - - * bin/racc2y: rewrite code for new generator. - - * lib/racc/grammar.rb (_regist): did not check @delayed rules (it - causes registering same dummy rules many times). - - * lib/racc/grammarfileparser.rb: refactoring: simplify syntax. - - * lib/racc/grammarfileparser.rb: new method - GrammarFileParser.parse. - - * lib/racc/grammarfileparser.rb: new method - GrammarFileParser.parse_file. - -Sat Jul 29 04:51:42 2006 Minero Aoki - - * lib/racc/pre-setup: We need not make grammarfileparser.rb. - -Sat Jul 29 04:30:33 2006 Minero Aoki - - * lib/racc/grammar.rb: allow '|' operation with meta rules - (many, option...). - -Sat Jul 29 03:17:20 2006 Minero Aoki - - * lib/racc/grammar.rb (Grammar#parser_class): write log file when - $DEBUG=true. - - * lib/racc/grammar.rb (Grammar.define): run block on a - Racc::Grammar::DefinitionEnv object, instead of a Racc::Grammar - object. - - * lib/racc/grammar.rb (DefinitionEnv): new method #null. - - * lib/racc/grammar.rb (DefinitionEnv): new method #many. - - * lib/racc/grammar.rb (DefinitionEnv): new method #many1. - - * lib/racc/grammar.rb (DefinitionEnv): new method #option. - - * lib/racc/grammar.rb (DefinitionEnv): new method #seperated_by. - - * lib/racc/grammar.rb (DefinitionEnv): new method #seperated_by1. - - * lib/racc/grammar.rb (DefinitionEnv): new method #action. - -Sat Jul 29 03:13:22 2006 Minero Aoki - - * lib/racc/compat.rb: reduce warning. - -Sun Jul 16 05:07:12 2006 Minero Aoki - - * lib/racc/compat.rb: implement Enumerable#each_slice for Ruby - 1.8. - - * lib/racc/parserfilegenerator.rb: better output. - - * ext/racc/cparse/cparse.c: always use VALUE instead of struct - cparse_params. - - * ext/racc/cparse/cparse.c: mark params->value_v. - -Thu Jul 6 20:44:48 2006 Minero Aoki - - * lib/racc/grammar.rb: on-the-fly generator implemented. - - * lib/racc/generator.rb -> statetransitiontable.rb, - parserfilegenerator.rb, logfilegenerator.rb. - - * lib/racc/statetransitiontable.rb: new file. - - * lib/racc/parserfilegenerator.rb: new file. - - * lib/racc/logfilegenerator.rb: new file. - - * lib/racc/grammarfileparser.rb.in: removed. - - * lib/racc/grammarfileparser.rb: new file. uses on-the-fly - generator. - - * misc/boot.rb: removed. - - * lib/racc/static.rb: new file, to import static generator - (lib/racc.rb provides dynamic generator). - - * lib/racc/grammar.rb: grand refactoring. - - * lib/racc/sourcetext.rb: new method #to_s, #location. - - * lib/racc/state.rb: compute NFA/DFA on demand. - - * bin/racc: follow these changes. - -Thu Jul 6 20:39:42 2006 Minero Aoki - - * ext/racc/cparse/cparse.so: should mark VALUEs in cparse_params. - -Tue Jul 4 02:24:27 2006 Minero Aoki - - * bin/racc: simplify report code. - - * lib/racc/grammar.rb: introduce new methods for racc command. - - * lib/racc/states.rb: ditto. - - * lib/racc/generator.rb: class CodeGenerator -> - ParserFileGenerator. - - * lib/racc/generator.rb: new class ParserFileGenerator::Params. - - * bin/racc: ditto. - - * misc/boot.rb: ditto. - - * lib/racc/grammarfileparser.rb.in: ditto. - - * lib/racc/grammarfileparser.rb.in: merge grammarfilescanner.rb. - - * lib/racc/grammarfilescanner.rb: removed. - - * lib/racc/grammarfileparser.rb.in: parses user code blocks. - - * lib/racc/usercodeparser.rb: removed. - - * lib/racc/generator.rb: remove user code parsing code. - - * lib/racc/grammarfileparser.rb.in: passes user code block by a - SourceText object. - - * lib/racc/generator.rb: ditto. - - * lib/racc/sourcetext.rb: new file. - - * lib/racc/generator.rb: introduce DSL to describe file contents. - -Tue Jul 4 02:15:36 2006 Minero Aoki - - * lib/racc/debugflags.rb: remove unused class GenerationOptions. - -Tue Jul 4 02:14:48 2006 Minero Aoki - - * lib/racc/compat.rb: update coding style. - -Mon Jul 3 04:34:32 2006 Minero Aoki - - * lib/racc/compiler.rb: do not export Grammar/SymbolTable/States. - - * lib/racc/compiler.rb: make a new class for debug flags - (Racc::DebugFlags). - - * lib/racc/compiler.rb: removed. - - * bin/racc: eliminate Racc::Compiler class. - - * bin/racc: refactor profiling code. - - * bin/racc: move file generation code to racc/generator.rb. - - * misc/boot.rb: does not emulate Racc::Compiler interface. - - * lib/racc.rb: new file to require whole generator. - - * lib/racc/grammar.rb: class RuleTable -> Grammar. - - * lib/racc/grammar.rb: Grammar.new does not acccept a Compiler. - - * lib/racc/grammar.rb: refactoring. - - * lib/racc/grammarfileparser.rb.in: GrammarFileParser.new does not - accept a Compiler. - - * lib/racc/grammarfileparser.rb.in: #parser takes more 2 args, a - filename and a base line number. - - * lib/racc/grammarfileparser.rb.in: refactoring. - - * lib/racc/output.rb -> generate.rb - - * lib/racc/generate.rb: class Formatter -> CodeGenerator. - - * lib/racc/generate.rb: CodeGenerator.new does not accept a - Compiler. - - * lib/racc/generate.rb: a CodeGenerator got many parameters via - setter method. - - * lib/racc/generate.rb: class VerboseOutputter -> - LogFileGenerator. - - * lib/racc/generate.rb: LogFileGenerator.new does not accept a - Compiler. - - * lib/racc/generate.rb: refactoring. - - * lib/racc/state.rb: class StateTable -> States. - - * lib/racc/state.rb: States.new does not acccept a Compiler. - - * lib/racc/state.rb: refactoring. - - * test/test.rb: -Da is obsolete (I forgot what this flag is). - - * test/test.rb: allow replacing racc via environment variable - $RACC. - -Mon Jul 3 04:18:49 2006 Minero Aoki - - * Makefile: new task bootstrap-force. - -Sun Jul 2 19:46:58 2006 Minero Aoki - - * test/ichk.y: update coding style. - -Sun Jul 2 19:01:55 2006 Minero Aoki - - * ext/racc/cparse/cparse.c: must require version.h to get - RUBY_VERSION_CODE. - -Sun Jul 2 18:33:32 2006 Minero Aoki - - * ext/racc/cparse/cparse.c: do not use rb_iterate to give a block - to the method, use rb_block_call instead. [ruby-dev:28445] - -Mon Jun 19 02:38:18 2006 Minero Aoki - - * bin/racc: -g option is now -t. -g option is obsolete and is an - alias of -t. - -Mon Jun 19 02:35:59 2006 Minero Aoki - - * ext/racc/cparse/cparse.c: K&R -> ANSI C. - -Mon Nov 21 02:37:10 2005 Minero Aoki - - * version 1.4.5 released. - -Mon Nov 21 02:31:18 2005 Minero Aoki - - * bin/racc: shebang line should include file extension. - - * lib/racc/compat.rb: method removed: bug!. - - * lib/racc/*.rb: racc compiler should not depend on - Racc::ParseError. - - * lib/racc/*.rb: update copyright year. - - * lib/racc/*.rb: update coding style. - - * lib/racc/exception.rb: new file. - -Mon Nov 21 00:49:18 2005 Minero Aoki - - * Makefile: remove useless target `import'. - - * Makefile: generate parser-text.rb. - - * misc/dist.sh: setup.rb and COPYING is now in repository. - - * misc/dist.sh: generate parser-text.rb. - -Mon Nov 21 00:14:21 2005 Minero Aoki - - * bin/racc: read racc/parser.rb from parser-text.rb. - - * lib/racc/rubyloader.rb: no longer needed. - - * lib/racc/pre-setup: new file. - - * lib/racc/pre-setup: generate parser-text.rb. - - * lib/racc/pre-setup: generate grammarfileparser.rb. - - * misc/boot.rb: new method BootstrapCompiler.main. - - * misc/boot.rb: new method BootstrapCompiler.generate, which is - used from pre-setup. - -Mon Nov 21 00:09:04 2005 Minero Aoki - - * bin/racc2y: refactoring. - - * bin/y2racc: refactoring. - -Sun Nov 20 23:46:42 2005 Minero Aoki - - * lib/racc/pre-setup: new file. - -Sun Nov 20 22:46:21 2005 Minero Aoki - - * COPYING: new file. - -Sun Nov 20 22:25:15 2005 Minero Aoki - - * setup.rb: import setup.rb 3.4.1. - -Thu Sep 29 02:51:56 2005 Minero Aoki - - * Makefile (clean): invoke `make clean' in ext. - -Thu Sep 29 02:50:56 2005 Minero Aoki - - * lib/racc/.cvsignore: removed. - -Thu Sep 29 02:46:30 2005 Minero Aoki - - * Makefile: use .makeparams system. - - * Makefile: unify lib/racc/Makefile. - - * Makefile: new target lib/racc/grammarfileparser.rb. - - * lib/racc/Makefile: unified by ./Makefile. - - * lib/racc/boot: removed (moved under misc). - - * misc/boot.rb: new file. - -Thu Sep 29 02:43:30 2005 Minero Aoki - - * setup.rb: new file. - -Tue Jul 26 23:37:46 2005 Minero Aoki - - * bin/racc: --no-omit-actions did not work (This patch is - contributed by OHKUBO Takuya). - -Sun Jan 2 11:48:19 2005 Minero Aoki - - * lib/racc/grammer.rb (once_writer): bug! needs argument. - -Mon Feb 16 16:14:16 2004 Minero Aoki - - * test/echk.y: fix typo. - - * test/ichk.y: does not use amstd. - - * test/opt.y: untabify. - -Mon Feb 16 16:10:46 2004 Minero Aoki - - * lib/racc/boot: update coding style. - - * lib/racc/compat.rb: ditto. - - * lib/racc/compiler.rb: ditto. - - * lib/racc/grammar.rb: ditto. - - * lib/racc/grammarfileparser.rb.in: ditto. - - * lib/racc/grammarfilescanner.rb: ditto. - - * lib/racc/info.rb: ditto. - - * lib/racc/iset.rb: ditto. - - * lib/racc/output.rb: ditto. - - * lib/racc/parser.rb: ditto. - - * lib/racc/state.rb: ditto. - - * lib/racc/usercodeparser.rb: ditto. - -Mon Feb 16 16:01:34 2004 Minero Aoki - - * lib/racc/rubyloader.rb: imported rev1.6. - -Fri Dec 12 01:57:47 2003 Minero Aoki - - * sample/hash.y: use no_result_var option. - - * sample/array.y: use latest (my) coding style. - - * sample/array2.y: ditto. - - * sample/hash.y: ditto. - - * sample/lists.y: ditto. - -Wed Nov 5 19:50:35 2003 Minero Aoki - - * test/bench.y: remove dependency on amstd. - - * test/chk.y: ditto. - - * test/echk.y: ditto. - - * test/ichk.y: ditto. - - * test/intp.y: ditto. - - * test/opt.y: ditto. - - * test/percent.y: ditto. - -Wed Nov 5 19:11:15 2003 Minero Aoki - - * bin/racc (get_options): remove --no-extensions option; - racc/parser is preloaded, Racc_No_Extension does not work. - -Mon Nov 3 22:41:42 2003 Minero Aoki - - * bin/racc: apply latest coding style. - - * lib/racc/parser.rb: ditto. - - * lib/racc/compat.rb: add File.read. - -Mon Nov 3 21:20:25 2003 Minero Aoki - - * ext/racc/cparse/cparse.c (parse_main): abort if length of state - stack <=1, not ==0. - - * lib/racc/parser.rb: use <=1, not <2. - - * ext/racc/cparse/cparse.c: check_*() -> assert_*() - - * ext/racc/cparse/cparse.c (racc_cparse): define lvar `v' for - debugging. - - * ext/racc/cparse/cparse.c (racc_yyparse): ditto. - -Mon Nov 3 17:21:55 2003 Minero Aoki - - * Makefile (all): make cparse.so. - -Mon Nov 3 17:19:26 2003 Minero Aoki - - * lib/racc/parser.rb: update version. - - * ext/racc/cparse/cparse.c: update version. - -Mon Nov 3 17:19:01 2003 Minero Aoki - - * Makefile: update version in parser.rb, cparse.c. - -Sun Oct 12 23:49:58 2003 Minero Aoki - - * version 1.4.4. - -Sun Oct 12 23:49:40 2003 Minero Aoki - - * bin/y2racc: did not work. - - * bin/y2racc: -u options did not work. - -Sun Oct 12 23:41:46 2003 Minero Aoki - - * misc/dist.sh: cd before make. - -Sun Oct 12 23:38:04 2003 Minero Aoki - - * Makefile (site): create $siteroot/{ja,en}/man/racc/*.html. - -Sun Oct 12 23:37:18 2003 Minero Aoki - - * doc/parser.rrd.m: missing 'j'. - -Sun Oct 12 23:29:11 2003 Minero Aoki - - * Makefile: new target `doc'. - - * Makefile: new target `clean'. - - * lib/racc/Makefile: new target `clean'. - - * misc/dist.sh: create documents before pack. - -Sun Oct 12 23:27:58 2003 Minero Aoki - - * doc/debug.rd.m: junk char was inserted. - - * doc/index.html.m: en/ja text were mixed. - - * doc/parser.rrd.m: add return values. - - * doc/usage.html.m: fix hyper link. - -Sun Oct 12 22:57:28 2003 Minero Aoki - - * doc.en/changes.html, doc.ja/changes.html -> doc/NEWS.rd.m - - * doc.en/command.html, doc.ja/command.html -> doc/command.html.m - - * doc.en/debug.html, doc.ja/debug.html -> doc/debug.rd.m - - * doc.en/grammar.html, doc.ja/grammar.html -> doc/grammar.rd.m - - * doc.en/index.html, doc.ja/index.html -> doc/index.html.m - - * doc.en/parser.html, doc.ja/parser.html -> doc/parser.rrd.m - - * doc.en/usage.html, doc.ja/usage.html -> doc/usage.html.m - -Sun Oct 12 18:46:21 2003 Minero Aoki - - * web/racc.ja.html: update descriptions. - - * web/racc.en.html: ditto. - -Sun Oct 12 18:43:45 2003 Minero Aoki - - * misc/dist.sh: remove web/ directory before distribute. - -Sun Oct 12 18:37:29 2003 Minero Aoki - - * Makefile: new target `site'. - - * web/racc.ja.html: new file. - - * web/racc.en.html: new file. - -Sun Oct 12 18:30:55 2003 Minero Aoki - - * misc/dist.sh: forgot to remove tmp comment out. - -Sun Oct 12 18:12:09 2003 Minero Aoki - - * lib/racc/info.rb: version 1.4.4. - -Sun Oct 12 18:11:42 2003 Minero Aoki - - * Makefile (dist): split out misc/dist.sh. - - * misc/dist.sh: new file. - -Sun Oct 12 17:18:47 2003 Minero Aoki - - * README.en: update documents. - - * README.ja: ditto. - - * doc.en/changes.html: ditto. - - * doc.en/command.html: ditto. - - * doc.en/debug.html: ditto. - - * doc.en/grammar.html: ditto. - - * doc.en/index.html: ditto. - - * doc.en/parser.html: ditto. - - * doc.en/usage.html: ditto. - - * doc.ja/changes.html: ditto. - - * doc.ja/command.html: ditto. - - * doc.ja/debug.html: ditto. - - * doc.ja/index.html: ditto. - - * doc.ja/parser.html: ditto. - - * doc.ja/usage.html: ditto. - -Sun Oct 12 16:24:46 2003 Minero Aoki - - * sameple/calc-ja.y: simplify. - -Sun Oct 12 16:24:16 2003 Minero Aoki - - * misc/y2racc -> bin/y2racc - - * misc/racc2y -> bin/racc2y - -Sun Oct 12 15:56:30 2003 Minero Aoki - - * bin/racc: follow method name change. - -Sun Oct 12 15:34:14 2003 Minero Aoki - - * Makefile: new target `test'. - - * Makefile: missing $datadir. - -Sun Oct 12 15:33:02 2003 Minero Aoki - - * README.ja: update description. - - * README.en: ditto. - -Sun Oct 12 15:25:23 2003 Minero Aoki - - * lib/racc/compiler.rb: adjust file names. - - * lib/racc/grammarfileparser.rb.in: ditto. - - * lib/racc/grammarfilescanner.rb: ditto. - -Sun Oct 12 15:24:53 2003 Minero Aoki - - * Makefile: new file. - -Sun Oct 12 15:19:57 2003 Minero Aoki - - * BUGS.en: removed. - - * BUGS.ja: removed. - -Sun Oct 12 15:10:38 2003 Minero Aoki - - * racc -> bin/racc - - * .cvsignore -> lib/racc/.cvsignore - - * lib/racc/Makefile: new file. - - * boot.rb -> lib/racc/boot - - * compat.rb -> lib/racc/compat.rb - - * compiler.rb -> lib/racc/compiler.rb - - * grammar.rb -> lib/racc/grammar.rb - - * in.raccp.rb -> lib/racc/grammarfileparser.rb.in - - * raccs.rb -> lib/racc/grammarfilescanner.rb - - * info.rb -> lib/racc/info.rb - - * iset.rb -> lib/racc/iset.rb - - * outpur.rb -> lib/racc/output.rb - - * parser.rb -> lib/racc/parser.rb - - * rubyloader.rb -> lib/racc/rubyloader.rb - - * state.rb -> lib/racc/state.rb - - * ucodep.rb -> lib/racc/usercodeparser.rb - - * cparse/MANIFEST -> ext/racc/cparse/MANIFEST - - * cparse/cparse.c -> ext/racc/cparse/cparse.c - - * cparse/depend -> ext/racc/cparse/depend - - * cparse/extconf.rb -> ext/racc/cparse/extconf.rb - - * cparse/.cvsignore -> ext/racc/cparse/.cvsignore - -Sun Oct 12 15:10:13 2003 Minero Aoki - - * test/test.rb: use /bin/rm if exists. - -Sun Oct 12 14:33:29 2003 Minero Aoki - - * rubyloader.rb: imported from amstd, rev 1.5. - -Sun Oct 12 14:24:47 2003 Minero Aoki - - * boot.rb: reformat only. - - * compiler.rb: ditto. - - * grammar.rb: ditto. - - * in.raccp.rb: ditto. - - * iset.rb: ditto. - - * output.rb: ditto. - - * raccs.rb: ditto. - - * state.rb: ditto. - -Sun Oct 12 14:17:22 2003 Minero Aoki - - * test/test.rb: refactoring. - -Tue Jun 24 03:14:01 2003 Minero Aoki - - * ucodep.rb: typo: Grammer -> Grammar - -Mon May 26 23:06:58 2003 Minero Aoki - - * compiler.rb: update copyright year. - - * grammar.rb: ditto. - - * in.raccp.rb: ditto. - - * info.rb: ditto. - - * iset.rb: ditto. - - * output.rb: ditto. - - * parser.rb: ditto. - - * raccs.rb: ditto. - - * state.rb: ditto. - - * ucodep.rb: ditto. - -Sun May 25 13:21:27 2003 Minero Aoki - - * raccs.rb: update coding style. - -Fri Nov 15 17:53:12 2002 Minero Aoki - - * racc: changes style. - - * parser.rb: ditto. - -Fri Nov 15 17:11:52 2002 Minero Aoki - - version 1.4.3. - -Fri Nov 15 17:08:01 2002 Minero Aoki - - * boot.rb, compiler.rb, grammar.rb, in.raccp.rb, iset.rb, - output.rb, parser.rb, racc, raccs.rb, state.rb, ucodep.rb, - misc/racc2y, misc/y2racc: follows (my) latest coding styles. - -Thu Nov 14 14:39:53 2002 Minero Aoki - - * raccs.rb: explicit method call for VCALL. - -Wed Oct 16 15:45:11 2002 Minero Aoki - - * parser.rb: reformat. - -Fri Aug 9 18:21:01 2002 Minero Aoki - - * cparse/cparse.c: use better variable/macro names. - -Wed Aug 7 08:39:19 2002 Minero Aoki - - * cparse/cparse.c: goto label requires stmt. - -Mon Aug 5 21:53:07 2002 Minero Aoki - - * cparse/cparse.c: grand refine. - - * cparse/depend: re-added from ruby/ext/racc/cparse. - -Tue Jun 4 00:15:28 2002 Minero Aoki - - * boot.rb: allow to omit last 'end'. - -Mon Jun 3 23:29:45 2002 Minero Aoki - - * racc (write_table_file): shebang must placed on first line. - (reported by Hiroyuki Sato) - diff --git a/Manifest.txt b/Manifest.txt index 37b54215..1977f4a5 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -1,5 +1,4 @@ COPYING -ChangeLog DEPENDS Manifest.txt README.ja.rdoc From 635bcddc67a2415554c7246b46d63684d23cf07c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:35:03 +0200 Subject: [PATCH 291/619] Don't define Racc::Error Exception subclass In state.rb, we also define a class called Racc::Error, for a totally different purpose! --- bin/racc | 2 +- lib/racc/exception.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/racc b/bin/racc index 7d9af762..5c8a9f89 100755 --- a/bin/racc +++ b/bin/racc @@ -181,7 +181,7 @@ def main end profiler.report - rescue Racc::Error, Errno::ENOENT, Errno::EPERM => err + rescue Racc::CompileError, Errno::ENOENT, Errno::EPERM => err raise if $DEBUG or debug_flags.any? lineno = err.message.slice(/\A\d+:/).to_s $stderr.puts "#{File.basename $0}: #{input}:#{lineno} #{err.message.strip}" diff --git a/lib/racc/exception.rb b/lib/racc/exception.rb index 38a4aefe..d0692919 100644 --- a/lib/racc/exception.rb +++ b/lib/racc/exception.rb @@ -6,6 +6,5 @@ # For details of the GNU LGPL, see the file "COPYING". module Racc - class Error < StandardError; end - class CompileError < Error; end + class CompileError < StandardError; end end From fd206c0128e9db598eca066340acdb960cf1d4db Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:37:31 +0200 Subject: [PATCH 292/619] Drop obsolete -g CLI option --- bin/racc | 4 ---- lib/racc/parser.rb | 16 ++++++++-------- test/test_racc_command.rb | 4 ++-- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/bin/racc b/bin/racc index 5c8a9f89..eafd0090 100755 --- a/bin/racc +++ b/bin/racc @@ -36,10 +36,6 @@ def main parser.on('-t', '--debug', 'Outputs debugging parser.') {|fl| debug_parser = fl } - parser.on('-g', 'Equivalent to -t (obsolete).') {|fl| - $stderr.puts "racc -g is obsolete. Use racc -t instead." if $VERBOSE - debug_parser = fl - } parser.on('-v', '--verbose', 'Creates .output log file.') {|fl| make_logfile = fl diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 89d923f8..fac48bab 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -25,7 +25,7 @@ class ParseError < StandardError; end # [-erubypath] [--embedded=rubypath] # [-v] [--verbose] # [-Ofilename] [--log-file=filename] -# [-g] [--debug] +# [-t] [--debug] # [-E] [--embedded] # [-l] [--no-line-convert] # [-c] [--line-convert-all] @@ -45,9 +45,9 @@ class ParseError < StandardError; end # output executable file(mode 755). where +path+ is the Ruby interpreter. # [-v, --verbose] # verbose mode. create +filename+.output file, like yacc's y.output file. -# [-g, --debug] -# add debug code to parser class. To display debuggin information, -# use this '-g' option and set @yydebug true in parser class. +# [-t, --debug] +# add debug code to parser class. To display debugging information, +# use this '-t' option and set @yydebug to true in parser class. # [-E, --embedded] # Output parser which doesn't need runtime files (racc/parser.rb). # [-C, --check-only] @@ -127,11 +127,11 @@ class ParseError < StandardError; end # When debugging, "-v" or/and the "-g" option is helpful. # # "-v" creates verbose log file (.output). -# "-g" creates a "Verbose Parser". +# "-t" creates a "Verbose Parser". # Verbose Parser prints the internal status when parsing. # But it's _not_ automatic. -# You must use -g option and set +@yydebug+ to +true+ in order to get output. -# -g option only creates the verbose parser. +# You must use -t option and set +@yydebug+ to +true+ in order to get output. +# -t option only creates the verbose parser. # # === Racc reported syntax error. # @@ -147,7 +147,7 @@ class ParseError < StandardError; end # # === Generated parsers does not work correctly # -# Try "racc -g xxxx.y". +# Try "racc -t xxxx.y". # This command let racc generate "debugging parser". # Then set @yydebug=true in your parser. # It produces a working log of your parser. diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 845dce24..477715ee 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -28,12 +28,12 @@ def test_normal_y assert_compile 'normal.y' assert_debugfile 'normal.y', [] - assert_compile 'normal.y', '-vg' + assert_compile 'normal.y', '-vt' assert_debugfile 'normal.y', [] end def test_chk_y - assert_compile 'chk.y', '-vg' + assert_compile 'chk.y', '-vt' assert_debugfile 'chk.y', [] assert_exec 'chk.y' From 26b218a9f9adb5a53b37a85e5faa6df08350ab9d Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:42:12 +0200 Subject: [PATCH 293/619] Remove redundant Racc::Version, use only Racc::VERSION --- bin/racc | 2 +- bin/racc2y | 2 +- bin/y2racc | 4 ++-- lib/racc/info.rb | 1 - lib/racc/parserfilegenerator.rb | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/racc b/bin/racc index eafd0090..ce001ab5 100755 --- a/bin/racc +++ b/bin/racc @@ -86,7 +86,7 @@ def main # Racc.const_set :Racc_No_Extentions, true #} parser.on('--version', 'Prints version and quit.') { - puts "racc version #{Racc::Version}" + puts "racc version #{Racc::VERSION}" if Racc::Parser.racc_runtime_type == 'ruby' puts '(ruby core)' else diff --git a/bin/racc2y b/bin/racc2y index 1a136dee..7dd8ba06 100755 --- a/bin/racc2y +++ b/bin/racc2y @@ -35,7 +35,7 @@ def main with_footer = true } parser.on('--version', 'Prints version and quit.') { - puts "racc2y version #{Racc::Version}" + puts "racc2y version #{Racc::VERSION}" exit 0 } parser.on('--copyright', 'Prints copyright and quit.') { diff --git a/bin/y2racc b/bin/y2racc index e44a075a..ddb392b1 100755 --- a/bin/y2racc +++ b/bin/y2racc @@ -37,7 +37,7 @@ def main @with_usercode = true } parser.on('--version', 'Prints version and quit.') { - puts "y2racc version #{Racc::Version}" + puts "y2racc version #{Racc::VERSION}" exit 0 } parser.on('--copyright', 'Prints copyright and quit.') { @@ -78,7 +78,7 @@ end def convert(classname, result, f) init_indent = 'token'.size - f.puts %<# Converted from "#{result.filename}" by y2racc version #{Racc::Version}> + f.puts %<# Converted from "#{result.filename}" by y2racc version #{Racc::VERSION}> f.puts f.puts "class #{classname}" unless result.terminals.empty? diff --git a/lib/racc/info.rb b/lib/racc/info.rb index b6d94e70..ac69c66d 100644 --- a/lib/racc/info.rb +++ b/lib/racc/info.rb @@ -7,6 +7,5 @@ module Racc VERSION = '1.4.13' - Version = VERSION Copyright = 'Copyright (c) 1999-2006 Minero Aoki' end diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index 2bf2550a..c6a08682 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -119,7 +119,7 @@ def shebang(path) def notice line %q[#] line %q[# DO NOT MODIFY!!!!] - line %Q[# This file is automatically generated by Racc #{Racc::Version}] + line %Q[# This file is automatically generated by Racc #{Racc::VERSION}] line %Q[# from Racc grammar file "#{@params.filename}".] line %q[#] end From 7ddf8c5cd4781f04c5378bb17070718b61e854a0 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:43:07 +0200 Subject: [PATCH 294/619] Remove useless 'funcall' alias in y2racc --- bin/y2racc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bin/y2racc b/bin/y2racc index ddb392b1..f1255681 100755 --- a/bin/y2racc +++ b/bin/y2racc @@ -323,14 +323,6 @@ class YaccFileParser $stderr.puts "warning: unterminated action in #{@filename}" buf end - end -unless Object.method_defined?(:funcall) - class Object - alias funcall __send__ - end -end - - main From 0f79f8312679b451c63697f5d487ffbe8d1c2f06 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:44:28 +0200 Subject: [PATCH 295/619] Remove --runtime CLI option It's very, very hard to imagine that anyone would ever use this. If, in some very special case, one wanted to use the Racc parsing tables but not the parser runtime, they could run some postprocessing script on the generated parser file. --- bin/racc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bin/racc b/bin/racc index ce001ab5..bc7068bf 100755 --- a/bin/racc +++ b/bin/racc @@ -66,10 +66,6 @@ def main 'Uses CLASSNAME instead of Racc::Parser.') {|name| superclass = name } - parser.on('--runtime=FEATURE', - "Uses FEATURE instead of 'racc/parser'") {|feat| - runtime = feature - } parser.on('-C', '--check-only', 'Checks syntax and quit immediately.') {|fl| check_only = fl } From 3bd070ab80ae410cbdb7838ace53e48571acaab8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 16 Nov 2015 20:49:06 +0200 Subject: [PATCH 296/619] Grammar and spelling tweaks --- bin/racc | 2 +- bin/racc2y | 2 +- bin/y2racc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/racc b/bin/racc index bc7068bf..fc9d0841 100755 --- a/bin/racc +++ b/bin/racc @@ -52,7 +52,7 @@ def main parser.on('-E', '--embedded', "Embeds Racc runtime in output.") { embed_runtime = true } - parser.on('--line-convert-all', 'Converts line numbers of user codes.') { + parser.on('--line-convert-all', 'Converts line numbers of user code.') { line_convert_all = true } parser.on('-l', '--no-line-convert', 'Never convert line numbers.') { diff --git a/bin/racc2y b/bin/racc2y index 7dd8ba06..e86712ee 100755 --- a/bin/racc2y +++ b/bin/racc2y @@ -128,7 +128,7 @@ end def print_precedence_table(f, table) return if table.empty? - f.puts '/* precedance table */' + f.puts '/* precedence table */' table.each do |syms| assoc = syms.shift f.printf '%%%-8s ', assoc.to_s.downcase diff --git a/bin/y2racc b/bin/y2racc index f1255681..3a201de1 100755 --- a/bin/y2racc +++ b/bin/y2racc @@ -60,7 +60,7 @@ def main exit 1 end if ARGV.size > 1 - $stderr.puts 'too many input' + $stderr.puts 'too many inputs' exit 1 end input = ARGV[0] From 2f7d6473e5b8e6d6a524e7575fd24cb9b74f964a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Nov 2015 05:47:55 +0200 Subject: [PATCH 297/619] Comments on Racc error recovery --- lib/racc/parser.rb | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index fac48bab..48e061aa 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -411,11 +411,25 @@ def _racc_evalact(act, arg) # # error # + + # Like yacc, Racc calls `on_error` when an error occurs, and then starts + # to attempt auto-recovery by discarding states on the stack until it + # gets to a state where the 'error' token is acceptable + # + # Often, this leads to another error, and another, until all the tokens + # in the erroneous portion of input have been shifted (and then + # discarded by the auto-recovery code) + # + # So to avoid an outpouring of error messages, @racc_error_status is + # used to suppress 3 calls to `on_error` after each error is detected + # Each successful shift decrements @racc_error_status, so after the + # erroneous portion of input is cleared, it quickly returns to zero, + # and then Racc is ready to report another error again case @racc_error_status when 0 - unless arg[21] # user_yyerror + unless arg[21] # user_yyerror nerr += 1 - on_error @racc_t, @racc_val, @racc_vstack + on_error(@racc_t, @racc_val, @racc_vstack) end when 3 if @racc_t == 0 # is $ @@ -515,7 +529,7 @@ def on_error(t, val, vstack) end # Enter error recovering mode. - # This method does not call #on_error. + # This method does not call `on_error`. def yyerror throw :racc_jump, 1 end @@ -526,7 +540,15 @@ def yyaccept throw :racc_jump, 2 end - # Leave error recovering mode. + # Leave error recovery mode. + # + # When in error recovery mode, Racc suppresses 3 errors after each error + # which is reported (by calling `on_error`). + # To get out of error recovery mode, normally Racc must successfully shift + # 3 tokens. + # You can call this from `on_error`, or from an action block, to immediately + # get out of error recovery and stop suppressing the reporting of further + # errors. def yyerrok @racc_error_status = 0 end From 906948e08c6bfed18716a69d83780fc6d6fa487e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Nov 2015 05:50:38 +0200 Subject: [PATCH 298/619] [Bugfix] Don't infinite-loop if error recovery is attempted at EOF There is a well-known bug with Racc which often makes it 'hang' when an error occurs in the input. For example, the bug is discussed here: https://github.com/whitequark/parser/issues/93 The problem occurs when error recovery is attempted at EOF. To avoid an infinite loop, error recovery should always 1) consume some of the input by shifting, or 2) consume some of the stack by reducing. Normally, Racc's error recovery does number 1. In this way, if it gets into a loop of hitting an error, trying to recover, then hitting another error indefinitely, it should eventually run out of input and stop. Except... Racc's code for getting a token from the input has a guard clause which makes it do nothing when at EOF. Makes sense, but the code for shifting *still* behaves as if a token had been successfully consumed and decrements @racc_error_status. When error recovery is entered again, it aborts the parse if at EOF... but only if @racc_error_status == 3. In other words: only if no token was successfully shifted since the last error was hit. This easily leads to an infinite loop where Racc hits an error at EOF, tries error recovery, pops a state off the stack and goes back to the previous state, tries to continue the parse, tries to shift (but gets nothing because of EOF), the shifting code still looks up the next state in its action table and pushes it on the stack (restoring the state which the error recovery code discarded), hits another error, tries to recover, and so on ad infinitum. To avoid this, do not decrement @racc_error_status on shifting, if the 'shift' didn't actually shift anything due to being at EOF. I am almost certain that this is what the original author actually intended. --- Manifest.txt | 1 + lib/racc/parser.rb | 5 ++++- test/assets/error_recovery.y | 35 +++++++++++++++++++++++++++++++++++ test/helper.rb | 1 + test/test_racc_command.rb | 13 +++++++++++++ 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 test/assets/error_recovery.y diff --git a/Manifest.txt b/Manifest.txt index 1977f4a5..6f4ad946 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -57,6 +57,7 @@ test/assets/digraph.y test/assets/echk.y test/assets/edtf.y test/assets/err.y +test/assets/error_recovery.y test/assets/expect.y test/assets/firstline.y test/assets/huia.y diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 48e061aa..40a332c6 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -370,7 +370,7 @@ def _racc_evalact(act, arg) # shift # if @racc_error_status > 0 - @racc_error_status -= 1 unless @racc_t == 1 # error token + @racc_error_status -= 1 unless @racc_t <= 1 # error token or EOF end @racc_vstack.push @racc_val @racc_state.push act @@ -425,6 +425,7 @@ def _racc_evalact(act, arg) # Each successful shift decrements @racc_error_status, so after the # erroneous portion of input is cleared, it quickly returns to zero, # and then Racc is ready to report another error again + case @racc_error_status when 0 unless arg[21] # user_yyerror @@ -433,6 +434,8 @@ def _racc_evalact(act, arg) end when 3 if @racc_t == 0 # is $ + # We're at EOF, and another error occurred immediately after + # attempting auto-recovery throw :racc_end_parse, nil end @racc_read_next = true diff --git a/test/assets/error_recovery.y b/test/assets/error_recovery.y new file mode 100644 index 00000000..1fd21ac7 --- /dev/null +++ b/test/assets/error_recovery.y @@ -0,0 +1,35 @@ +# Regression test case for the bug discussed here: +# https://github.com/whitequark/parser/issues/93 +# In short, a Racc-generated parser could go into an infinite loop when +# attempting error recovery at EOF + +class InfiniteLoop + +rule + + stmts: stmt + | error stmt + + stmt: '%' stmt + +end + +---- inner + + def parse + @errors = [] + do_parse + end + + def next_token + nil + end + + def on_error(error_token, error_value, value_stack) + # oh my, an error + @errors << [error_token, error_value] + end + +---- footer + +InfiniteLoop.new.parse \ No newline at end of file diff --git a/test/helper.rb b/test/helper.rb index fc6c1925..c5141a18 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -3,6 +3,7 @@ require 'racc/static' require 'fileutils' require 'tempfile' +require 'timeout' module Racc class TestCase < Minitest::Test diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 477715ee..d8b78cad 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -152,6 +152,19 @@ def test_unterm_y } end + # Regression test for a problem where error recovery at EOF would cause + # a Racc-generated parser to go into an infinite loop (on some grammars) + def test_error_recovery_y + assert_compile 'error_recovery.y' + Timeout.timeout(10) do + assert_exec 'error_recovery.y' + end + end + + # Regression tests based on real-world gramamrs from various gems + # For each test, we check whether the generated parser file is byte-for-byte + # identical to the known-good file in test/regress + # .y files from parser gem def test_ruby18 From e46b773e9a46444eff068222153a4617664e536c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Nov 2015 08:02:28 +0200 Subject: [PATCH 299/619] Rename grammarfileparser.rb to grammar_file_parser.rb ...In order to follow generally-accepted conventions on the naming of Ruby source files. --- Manifest.txt | 2 +- bin/racc2y | 2 +- lib/racc/{grammarfileparser.rb => grammar_file_parser.rb} | 0 lib/racc/static.rb | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename lib/racc/{grammarfileparser.rb => grammar_file_parser.rb} (100%) diff --git a/Manifest.txt b/Manifest.txt index 6f4ad946..b744f092 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -17,7 +17,7 @@ lib/racc.rb lib/racc/debugflags.rb lib/racc/exception.rb lib/racc/grammar.rb -lib/racc/grammarfileparser.rb +lib/racc/grammar_file_parser.rb lib/racc/info.rb lib/racc/logfilegenerator.rb lib/racc/parser-text.rb diff --git a/bin/racc2y b/bin/racc2y index e86712ee..978e7860 100755 --- a/bin/racc2y +++ b/bin/racc2y @@ -7,7 +7,7 @@ # the GNU LGPL, Lesser General Public License version 2.1. # For details of the LGPL, see the file "COPYING". -require 'racc/grammarfileparser' +require 'racc/grammar_file_parser' require 'racc/info' require 'optparse' diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammar_file_parser.rb similarity index 100% rename from lib/racc/grammarfileparser.rb rename to lib/racc/grammar_file_parser.rb diff --git a/lib/racc/static.rb b/lib/racc/static.rb index bebbeb5a..a6c48cc5 100644 --- a/lib/racc/static.rb +++ b/lib/racc/static.rb @@ -1,5 +1,5 @@ require 'racc' require 'racc/parser' -require 'racc/grammarfileparser' +require 'racc/grammar_file_parser' require 'racc/parserfilegenerator' require 'racc/logfilegenerator' From 0ac112202975bd685b6ff16b32b93947803fbe09 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Nov 2015 08:04:20 +0200 Subject: [PATCH 300/619] Rename logfilegenerator.rb to log_file_generator.rb --- Manifest.txt | 2 +- lib/racc/grammar.rb | 2 +- lib/racc/{logfilegenerator.rb => log_file_generator.rb} | 0 lib/racc/static.rb | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename lib/racc/{logfilegenerator.rb => log_file_generator.rb} (100%) diff --git a/Manifest.txt b/Manifest.txt index b744f092..a2d29a15 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -19,7 +19,7 @@ lib/racc/exception.rb lib/racc/grammar.rb lib/racc/grammar_file_parser.rb lib/racc/info.rb -lib/racc/logfilegenerator.rb +lib/racc/log_file_generator.rb lib/racc/parser-text.rb lib/racc/parser.rb lib/racc/parserfilegenerator.rb diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 6be3a492..c48a2039 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -6,7 +6,7 @@ # For details of the GNU LGPL, see the file "COPYING". require 'racc/sourcetext' -require 'racc/logfilegenerator' +require 'racc/log_file_generator' require 'racc/exception' require 'set' diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/log_file_generator.rb similarity index 100% rename from lib/racc/logfilegenerator.rb rename to lib/racc/log_file_generator.rb diff --git a/lib/racc/static.rb b/lib/racc/static.rb index a6c48cc5..97418f9d 100644 --- a/lib/racc/static.rb +++ b/lib/racc/static.rb @@ -2,4 +2,4 @@ require 'racc/parser' require 'racc/grammar_file_parser' require 'racc/parserfilegenerator' -require 'racc/logfilegenerator' +require 'racc/log_file_generator' From a3456c50509ba7ac47e2f1428f9f352af588b88c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Nov 2015 08:05:56 +0200 Subject: [PATCH 301/619] Rename parserfilegenerator.rb to parser_file_generator.rb --- Manifest.txt | 2 +- lib/racc/grammar_file_parser.rb | 2 +- lib/racc/{parserfilegenerator.rb => parser_file_generator.rb} | 0 lib/racc/static.rb | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename lib/racc/{parserfilegenerator.rb => parser_file_generator.rb} (100%) diff --git a/Manifest.txt b/Manifest.txt index a2d29a15..1b1be79e 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -22,7 +22,7 @@ lib/racc/info.rb lib/racc/log_file_generator.rb lib/racc/parser-text.rb lib/racc/parser.rb -lib/racc/parserfilegenerator.rb +lib/racc/parser_file_generator.rb lib/racc/sourcetext.rb lib/racc/state.rb lib/racc/statetransitiontable.rb diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index 55d0db28..707e1443 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -7,7 +7,7 @@ require 'racc' require 'racc/grammar' -require 'racc/parserfilegenerator' +require 'racc/parser_file_generator' require 'racc/sourcetext' require 'stringio' diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parser_file_generator.rb similarity index 100% rename from lib/racc/parserfilegenerator.rb rename to lib/racc/parser_file_generator.rb diff --git a/lib/racc/static.rb b/lib/racc/static.rb index 97418f9d..5ebb54db 100644 --- a/lib/racc/static.rb +++ b/lib/racc/static.rb @@ -1,5 +1,5 @@ require 'racc' require 'racc/parser' require 'racc/grammar_file_parser' -require 'racc/parserfilegenerator' +require 'racc/parser_file_generator' require 'racc/log_file_generator' From a6278fc9e031cc071049b1c7327c6e170445fab6 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Nov 2015 08:07:22 +0200 Subject: [PATCH 302/619] Rename sourcetext.rb to source_text.rb --- Manifest.txt | 2 +- lib/racc/grammar.rb | 2 +- lib/racc/grammar_file_parser.rb | 2 +- lib/racc/parser_file_generator.rb | 2 +- lib/racc/{sourcetext.rb => source_text.rb} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename lib/racc/{sourcetext.rb => source_text.rb} (100%) diff --git a/Manifest.txt b/Manifest.txt index 1b1be79e..ef4c85f8 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -23,7 +23,7 @@ lib/racc/log_file_generator.rb lib/racc/parser-text.rb lib/racc/parser.rb lib/racc/parser_file_generator.rb -lib/racc/sourcetext.rb +lib/racc/source_text.rb lib/racc/state.rb lib/racc/statetransitiontable.rb lib/racc/static.rb diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index c48a2039..8e0df57a 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -5,7 +5,7 @@ # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". -require 'racc/sourcetext' +require 'racc/source_text' require 'racc/log_file_generator' require 'racc/exception' require 'set' diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index 707e1443..69db41cd 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -8,7 +8,7 @@ require 'racc' require 'racc/grammar' require 'racc/parser_file_generator' -require 'racc/sourcetext' +require 'racc/source_text' require 'stringio' module Racc diff --git a/lib/racc/parser_file_generator.rb b/lib/racc/parser_file_generator.rb index c6a08682..b12da009 100644 --- a/lib/racc/parser_file_generator.rb +++ b/lib/racc/parser_file_generator.rb @@ -6,7 +6,7 @@ # For details of the GNU LGPL, see the file "COPYING". require 'enumerator' -require 'racc/sourcetext' +require 'racc/source_text' require 'racc/parser-text' require 'rbconfig' diff --git a/lib/racc/sourcetext.rb b/lib/racc/source_text.rb similarity index 100% rename from lib/racc/sourcetext.rb rename to lib/racc/source_text.rb From 7866d05bd7fa16198d3bcb6fd5849fabc7205380 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 17 Nov 2015 08:08:49 +0200 Subject: [PATCH 303/619] Rename statetransitiontable.rb to state_transition_table.rb --- Manifest.txt | 2 +- lib/racc/state.rb | 2 +- lib/racc/{statetransitiontable.rb => state_transition_table.rb} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename lib/racc/{statetransitiontable.rb => state_transition_table.rb} (100%) diff --git a/Manifest.txt b/Manifest.txt index ef4c85f8..a1486087 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -25,7 +25,7 @@ lib/racc/parser.rb lib/racc/parser_file_generator.rb lib/racc/source_text.rb lib/racc/state.rb -lib/racc/statetransitiontable.rb +lib/racc/state_transition_table.rb lib/racc/static.rb rdoc/en/NEWS.en.rdoc rdoc/en/grammar.en.rdoc diff --git a/lib/racc/state.rb b/lib/racc/state.rb index ed0ef4a1..cf4485ba 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -5,7 +5,7 @@ # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". -require 'racc/statetransitiontable' +require 'racc/state_transition_table' require 'racc/exception' require 'forwardable' require 'set' diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/state_transition_table.rb similarity index 100% rename from lib/racc/statetransitiontable.rb rename to lib/racc/state_transition_table.rb From 0ede971a0a12e4ec143aeff8fe0d1175b959758e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 20 Nov 2015 09:11:10 +0200 Subject: [PATCH 304/619] Remove DebugFlags Good diagnostic/debugging facilities are important for any program of even moderate complexity. So why axe the debug flags? - The usage help itself says "don't use them". - The information they log is extremely arcane, including state numbers, etc. - They are undocumented. - There is almost no test coverage for them. Before long, we are going to add much better diagnostics and visualizations of internal parser state. In the meantime, our test suites still rely on some of the debugging information logged by -Do. Move that functionality to -v instead, so the tests keep working. Again, this is only temporary and we will have a better solution later. --- Manifest.txt | 1 - bin/racc | 21 +++++------- lib/racc.rb | 1 - lib/racc/debugflags.rb | 55 -------------------------------- lib/racc/grammar.rb | 3 +- lib/racc/grammar_file_parser.rb | 7 ---- lib/racc/log_file_generator.rb | 12 +++---- lib/racc/state.rb | 3 +- test/helper.rb | 1 - test/test_chk_y.rb | 3 +- test/test_grammar_file_parser.rb | 5 +-- test/test_scan_y.rb | 3 +- 12 files changed, 18 insertions(+), 97 deletions(-) delete mode 100644 lib/racc/debugflags.rb diff --git a/Manifest.txt b/Manifest.txt index a1486087..2e6a991d 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -14,7 +14,6 @@ ext/racc/depend ext/racc/extconf.rb ext/racc/com/headius/racc/Cparse.java lib/racc.rb -lib/racc/debugflags.rb lib/racc/exception.rb lib/racc/grammar.rb lib/racc/grammar_file_parser.rb diff --git a/bin/racc b/bin/racc index fc9d0841..e233ded5 100755 --- a/bin/racc +++ b/bin/racc @@ -18,7 +18,6 @@ def main make_executable = false rubypath = nil embed_runtime = false - debug_flags = Racc::DebugFlags.new line_convert = true line_convert_all = false omit_action_call = true @@ -75,9 +74,6 @@ def main parser.on('-P', 'Enables generator profile') { profiler = RaccProfiler.new(true) } - parser.on('-D flags', "Flags for Racc debugging (do not use).") {|flags| - debug_flags = Racc::DebugFlags.parse_option_string(flags) - } #parser.on('--no-extensions', 'Run Racc without any Ruby extension.') { # Racc.const_set :Racc_No_Extentions, true #} @@ -118,7 +114,7 @@ def main begin $stderr.puts 'Parsing grammar file...' if verbose result = profiler.section('parse') { - parser = Racc::GrammarFileParser.new(debug_flags) + parser = Racc::GrammarFileParser.new parser.parse(File.read(input), File.basename(input)) } if check_only @@ -160,21 +156,20 @@ def main $stderr.puts 'Creating log file...' if verbose logfilename ||= make_filename(output || File.basename(input), '.output') File.open(logfilename, 'w') {|f| - Racc::LogFileGenerator.new(states, debug_flags).output f + Racc::LogFileGenerator.new(states).output f } } - end - if debug_flags.status_logging - log_useless states.grammar - log_conflict states + + log_useless(states.grammar) + log_conflict(states) else - report_useless states.grammar - report_conflict states + report_useless(states.grammar) + report_conflict(states) end profiler.report rescue Racc::CompileError, Errno::ENOENT, Errno::EPERM => err - raise if $DEBUG or debug_flags.any? + raise if $DEBUG lineno = err.message.slice(/\A\d+:/).to_s $stderr.puts "#{File.basename $0}: #{input}:#{lineno} #{err.message.strip}" exit 1 diff --git a/lib/racc.rb b/lib/racc.rb index 71f2a960..eefd0327 100644 --- a/lib/racc.rb +++ b/lib/racc.rb @@ -1,4 +1,3 @@ -require 'racc/debugflags' require 'racc/grammar' require 'racc/state' require 'racc/exception' diff --git a/lib/racc/debugflags.rb b/lib/racc/debugflags.rb deleted file mode 100644 index aa061da5..00000000 --- a/lib/racc/debugflags.rb +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) 1999-2006 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of LGPL, see the file "COPYING". - -module Racc - - class DebugFlags - def DebugFlags.parse_option_string(s) - parse = rule = token = state = la = prec = conf = false - s.split(//).each do |ch| - case ch - when 'p' then parse = true - when 'r' then rule = true - when 't' then token = true - when 's' then state = true - when 'l' then la = true - when 'c' then prec = true - when 'o' then conf = true - else - raise "unknown debug flag char: #{ch.inspect}" - end - end - new(parse, rule, token, state, la, prec, conf) - end - - def initialize(parse = false, rule = false, token = false, state = false, - la = false, prec = false, conf = false) - @parse = parse - @rule = rule - @token = token - @state = state - @la = la - @prec = prec - @any = (parse || rule || token || state || la || prec) - @status_logging = conf - end - - attr_reader :parse - attr_reader :rule - attr_reader :token - attr_reader :state - attr_reader :la - attr_reader :prec - - def any? - @any - end - - attr_reader :status_logging - end - -end diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 8e0df57a..d46234c7 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -14,9 +14,8 @@ module Racc class Grammar include Enumerable - def initialize(debug_flags = DebugFlags.new) + def initialize @symboltable = SymbolTable.new - @debug_symbol = debug_flags.token @rules = [] # :: [Rule] @start = nil @n_expected_srconflicts = nil diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index 69db41cd..41828d13 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -143,15 +143,10 @@ def GrammarFileParser.parse(src, filename = '-', lineno = 1) new().parse(src, filename, lineno) end - def initialize(debug_flags = DebugFlags.new) - @yydebug = debug_flags.parse - end - def parse(src, filename = '-', lineno = 1) @filename = filename @lineno = lineno @scanner = GrammarFileScanner.new(src, @filename) - @scanner.debug = @yydebug @grammar = Grammar.new @result = Result.new(@grammar, @filename) @@ -259,9 +254,7 @@ def add_user_code(label, src) end end - class GrammarFileScanner - def initialize(str, filename = '-') @lines = str.split(/\n|\r\n|\r/) @filename = filename diff --git a/lib/racc/log_file_generator.rb b/lib/racc/log_file_generator.rb index 7de678be..496afd36 100644 --- a/lib/racc/log_file_generator.rb +++ b/lib/racc/log_file_generator.rb @@ -7,10 +7,9 @@ module Racc class LogFileGenerator - def initialize(states, debug_flags = DebugFlags.new) + def initialize(states) @states = states @grammar = states.grammar - @debug_flags = debug_flags end def output(out) @@ -49,12 +48,11 @@ def output_useless(out) def output_state(out) out << "--------- State ---------\n" - showall = @debug_flags.la || @debug_flags.state @states.each do |state| out << "\nstate #{state.ident}\n\n" - (showall ? state.closure : state.core).each do |ptr| - pointer_out(out, ptr) if ptr.rule.ident != 0 or showall + state.core.each do |ptr| + pointer_out(out, ptr) if ptr.rule.ident != 0 end out << "\n" @@ -91,7 +89,7 @@ def action_out(f, state) sr.each { |tok, c| outsrconf(f, c) if state.action[tok].nil? } rr.each { |tok, c| outrrconf(f, c) if state.action[tok].nil? } - if !state.defact.kind_of?(Error) || @debug_flags.any? + if !state.defact.kind_of?(Error) outact(f, '$default', state.defact) end @@ -140,7 +138,7 @@ def outrrconf(f, conf) def output_rule(out) out.print "-------- Grammar --------\n\n" @grammar.each do |rl| - if @debug_flags.any? or rl.ident != 0 + if rl.ident != 0 out.printf "rule %d %s: %s\n", rl.ident, rl.target.to_s, rl.symbols.join(' ') end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index cf4485ba..5eca2ea0 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -15,8 +15,7 @@ module Racc # A table of LALR states. class States include Enumerable - - def initialize(grammar, debug_flags = DebugFlags.new) + def initialize(grammar) @grammar = grammar @symboltable = grammar.symboltable diff --git a/test/helper.rb b/test/helper.rb index c5141a18..f1395ae3 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -40,7 +40,6 @@ def assert_compile(asset, args = []) file = File.basename(asset, '.y') args = ([args].flatten) + [ "#{ASSET_DIR}/#{file}.y", - '-Do', "-O#{OUT_DIR}/#{file}", "-o#{TAB_DIR}/#{file}", ] diff --git a/test/test_chk_y.rb b/test/test_chk_y.rb index 941ddd2c..a21a1d8c 100644 --- a/test/test_chk_y.rb +++ b/test/test_chk_y.rb @@ -4,8 +4,7 @@ module Racc class TestChkY < TestCase def setup file = File.join(ASSET_DIR, 'chk.y') - @debug_flags = Racc::DebugFlags.parse_option_string('o') - parser = Racc::GrammarFileParser.new(@debug_flags) + parser = Racc::GrammarFileParser.new @result = parser.parse(File.read(file), File.basename(file)) @states = Racc::States.new(@result.grammar).compute_nfa.compute_dfa end diff --git a/test/test_grammar_file_parser.rb b/test/test_grammar_file_parser.rb index b187bdca..61f80d1e 100644 --- a/test/test_grammar_file_parser.rb +++ b/test/test_grammar_file_parser.rb @@ -5,10 +5,7 @@ class TestGrammarFileParser < TestCase def test_parse file = File.join(ASSET_DIR, 'yyerr.y') - debug_flags = Racc::DebugFlags.parse_option_string('o') - assert debug_flags.status_logging - - parser = Racc::GrammarFileParser.new(debug_flags) + parser = Racc::GrammarFileParser.new parser.parse(File.read(file), File.basename(file)) end end diff --git a/test/test_scan_y.rb b/test/test_scan_y.rb index 6ff14396..5ddff83b 100644 --- a/test/test_scan_y.rb +++ b/test/test_scan_y.rb @@ -4,8 +4,7 @@ module Racc class TestScanY < TestCase def setup file = File.join(ASSET_DIR, 'scan.y') - @debug_flags = Racc::DebugFlags.parse_option_string('o') - parser = Racc::GrammarFileParser.new(@debug_flags) + parser = Racc::GrammarFileParser.new @result = parser.parse(File.read(file), File.basename(file)) @states = Racc::States.new(@result.grammar).compute_nfa.compute_dfa end From 79035ac6651946b8d3814404105b9e8fc16cc14a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 20 Nov 2015 09:15:09 +0200 Subject: [PATCH 305/619] Grammar and capitalization tweaks for usage help --- bin/racc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/racc b/bin/racc index e233ded5..15ee8b0f 100755 --- a/bin/racc +++ b/bin/racc @@ -29,7 +29,7 @@ def main parser = OptionParser.new parser.banner = "Usage: #{File.basename($0)} [options] " parser.on('-o', '--output-file=PATH', - 'output file name [.tab.rb]') {|name| + 'Output file name [.tab.rb]') {|name| output = name } parser.on('-t', '--debug', 'Outputs debugging parser.') {|fl| @@ -77,7 +77,7 @@ def main #parser.on('--no-extensions', 'Run Racc without any Ruby extension.') { # Racc.const_set :Racc_No_Extentions, true #} - parser.on('--version', 'Prints version and quit.') { + parser.on('--version', 'Prints version and quits.') { puts "racc version #{Racc::VERSION}" if Racc::Parser.racc_runtime_type == 'ruby' puts '(ruby core)' @@ -86,11 +86,11 @@ def main end exit 0 } - parser.on('--copyright', 'Prints copyright and quit.') { + parser.on('--copyright', 'Prints copyright and quits.') { puts Racc::Copyright exit 0 } - parser.on('--help', 'Prints this message and quit.') { + parser.on('--help', 'Prints this message and quits.') { puts parser.help exit 1 } From 92be0cfd05d31427335b4ce44bb8874faa27f5a0 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 20 Nov 2015 09:15:17 +0200 Subject: [PATCH 306/619] Remove commented-out --no-extensions CLI option --- bin/racc | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/racc b/bin/racc index 15ee8b0f..21ed6b58 100755 --- a/bin/racc +++ b/bin/racc @@ -74,9 +74,6 @@ def main parser.on('-P', 'Enables generator profile') { profiler = RaccProfiler.new(true) } - #parser.on('--no-extensions', 'Run Racc without any Ruby extension.') { - # Racc.const_set :Racc_No_Extentions, true - #} parser.on('--version', 'Prints version and quits.') { puts "racc version #{Racc::VERSION}" if Racc::Parser.racc_runtime_type == 'ruby' From c6226de1beeaa937b8c7d404dd91be3a7b3c4073 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 20 Nov 2015 09:17:17 +0200 Subject: [PATCH 307/619] Remove unneeded action block for convert blocks in GrammarFileParser All the work is done in the action block for convdef. This one is unneeded. --- lib/racc/grammar_file_parser.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index 41828d13..9d7840db 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -32,9 +32,7 @@ module Racc g.colon2 = seq(':', ':') - g.param = seq(:CONV, many1(:convdef), :END) { |*| - #@grammar.end_convert_block # FIXME - } \ + g.param = seq(:CONV, many1(:convdef), :END) \ | seq(:PRECHIGH, many1(:precdef), :PRECLOW) { |*| @grammar.end_precedence_declaration(true) } \ From 64cdf92ec3bc0b42cb36ef0d730a0d5582231eef Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 23 Nov 2015 21:06:55 +0200 Subject: [PATCH 308/619] Add regression test case based on parser.y from twowaysql gem From the author, Takuto Wada: Of course! Please feel free to use my grammar file. I like Racc ;) --- Manifest.txt | 1 + test/assets/twowaysql.y | 278 ++++++++++++++++++++ test/regress/twowaysql | 538 ++++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 825 insertions(+) create mode 100644 test/assets/twowaysql.y create mode 100644 test/regress/twowaysql diff --git a/Manifest.txt b/Manifest.txt index 2e6a991d..f6395905 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -96,6 +96,7 @@ test/assets/scan.y test/assets/src.intp test/assets/start.y test/assets/syntax.y +test/assets/twowaysql.y test/assets/unterm.y test/assets/useless.y test/assets/yyerr.y diff --git a/test/assets/twowaysql.y b/test/assets/twowaysql.y new file mode 100644 index 00000000..c729b08f --- /dev/null +++ b/test/assets/twowaysql.y @@ -0,0 +1,278 @@ +# Copyright 2008-2015 Takuto Wada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +class TwoWaySQL::Parser + +rule + +sql : stmt_list + { + result = RootNode.new( val[0] ) + } + +stmt_list : + { + result = [] + } + | stmt_list stmt + { + result.push val[1] + } + +stmt : primary + | if_stmt + | begin_stmt + +begin_stmt : BEGIN stmt_list END + { + result = BeginNode.new( val[1] ) + } + +if_stmt : IF sub_stmt else_stmt END + { + result = IfNode.new( val[0][1], val[1], val[2] ) + } + +else_stmt : ELSE sub_stmt + { + result = val[1] + } + | + { + result = nil + } + +sub_stmt : and_stmt + | or_stmt + | stmt_list + +and_stmt : AND stmt_list + { + result = SubStatementNode.new( val[0][1], val[1] ) + } + +or_stmt : OR stmt_list + { + result = SubStatementNode.new( val[0][1], val[1] ) + } + +primary : IDENT + { + result = LiteralNode.new( val[0][1] ) + } + | STRING_LITERAL + { + result = LiteralNode.new( val[0][1] ) + } + | AND + { + result = LiteralNode.new( val[0][1] ) + } + | OR + { + result = LiteralNode.new( val[0][1] ) + } + | SPACES + { + result = WhiteSpaceNode.new( val[0][1], @preserve_space ) + } + | COMMA + { + result = LiteralNode.new( val[0][1] ) + } + | LPAREN + { + result = LiteralNode.new( val[0][1] ) + } + | RPAREN + { + result = LiteralNode.new( val[0][1] ) + } + | QUESTION + { + @num_questions += 1 + result = QuestionNode.new( @num_questions ) + } + | ACTUAL_COMMENT + { + result = ActualCommentNode.new( val[0][1] , val[0][2] ) + } + | bind_var + | embed_var + +bind_var : BIND_VARIABLE STRING_LITERAL + { + result = BindVariableNode.new( val[0][1] ) + } + | BIND_VARIABLE SPACES STRING_LITERAL + { + result = BindVariableNode.new( val[0][1] ) + } + | BIND_VARIABLE IDENT + { + result = BindVariableNode.new( val[0][1] ) + } + | BIND_VARIABLE SPACES IDENT + { + result = BindVariableNode.new( val[0][1] ) + } + | PAREN_BIND_VARIABLE + { + result = ParenBindVariableNode.new( val[0][1] ) + } + +embed_var : EMBED_VARIABLE IDENT + { + result = EmbedVariableNode.new( val[0][1] ) + } + | EMBED_VARIABLE SPACES IDENT + { + result = EmbedVariableNode.new( val[0][1] ) + } + +end + + +---- inner + +require 'strscan' + +def initialize(opts={}) + opts = { + :debug => false, + :preserve_space => true, + :preserve_comment => false + }.merge(opts) + @yydebug = opts[:debug] + @preserve_space = opts[:preserve_space] + @preserve_comment = opts[:preserve_comment] + @num_questions = 0 +end + + +PAREN_EXAMPLE = '\([^\)]+\)' +BEGIN_BIND_VARIABLE = '(\/|\#)\*([^\*]+)\*\1' +BIND_VARIABLE_PATTERN = /\A#{BEGIN_BIND_VARIABLE}\s*/ +PAREN_BIND_VARIABLE_PATTERN = /\A#{BEGIN_BIND_VARIABLE}\s*#{PAREN_EXAMPLE}/ +EMBED_VARIABLE_PATTERN = /\A(\/|\#)\*\$([^\*]+)\*\1\s*/ + +CONDITIONAL_PATTERN = /\A(\/|\#)\*(IF)\s+([^\*]+)\s*\*\1/ +BEGIN_END_PATTERN = /\A(\/|\#)\*(BEGIN|END)\s*\*\1/ +STRING_LITERAL_PATTERN = /\A(\'(?:[^\']+|\'\')*\')/ ## quoted string +SPLIT_TOKEN_PATTERN = /\A(\S+?)(?=\s*(?:(?:\/|\#)\*|-{2,}|\(|\)|\,))/ ## stop on delimiters --,/*,#*,',',(,) +LITERAL_PATTERN = /\A([^;\s]+)/ +SPACES_PATTERN = /\A(\s+)/ +QUESTION_PATTERN = /\A\?/ +COMMA_PATTERN = /\A\,/ +LPAREN_PATTERN = /\A\(/ +RPAREN_PATTERN = /\A\)/ +ACTUAL_COMMENT_PATTERN = /\A(\/|\#)\*(\s{1,}(?:.*?))\*\1/m ## start with spaces +SEMICOLON_AT_INPUT_END_PATTERN = /\A\;\s*\Z/ +UNMATCHED_COMMENT_START_PATTERN = /\A(?:(?:\/|\#)\*)/ + +#TODO: remove trailing spaces for S2Dao compatibility, but this spec sometimes causes SQL bugs... +ELSE_PATTERN = /\A\-{2,}\s*ELSE\s*/ +AND_PATTERN = /\A(\ *AND)\b/i +OR_PATTERN = /\A(\ *OR)\b/i + + +def parse( io ) + @q = [] + io.each_line(nil) do |whole| + @s = StringScanner.new(whole) + end + scan_str + + # @q.push [ false, nil ] + @q.push [ false, [@s.pos, nil] ] + + ## call racc's private parse method + do_parse +end + + +## called by racc +def next_token + @q.shift +end + + +def scan_str + until @s.eos? do + case + when @s.scan(AND_PATTERN) + @q.push [ :AND, [@s.pos, @s[1]] ] + when @s.scan(OR_PATTERN) + @q.push [ :OR, [@s.pos, @s[1]] ] + when @s.scan(SPACES_PATTERN) + @q.push [ :SPACES, [@s.pos, @s[1]] ] + when @s.scan(QUESTION_PATTERN) + @q.push [ :QUESTION, [@s.pos, nil] ] + when @s.scan(COMMA_PATTERN) + @q.push [ :COMMA, [@s.pos, ','] ] + when @s.scan(LPAREN_PATTERN) + @q.push [ :LPAREN, [@s.pos, '('] ] + when @s.scan(RPAREN_PATTERN) + @q.push [ :RPAREN, [@s.pos, ')'] ] + when @s.scan(ELSE_PATTERN) + @q.push [ :ELSE, [@s.pos, nil] ] + when @s.scan(ACTUAL_COMMENT_PATTERN) + @q.push [ :ACTUAL_COMMENT, [@s.pos, @s[1], @s[2]] ] if @preserve_comment + when @s.scan(BEGIN_END_PATTERN) + @q.push [ @s[2].intern, [@s.pos, nil] ] + when @s.scan(CONDITIONAL_PATTERN) + @q.push [ @s[2].intern, [@s.pos, @s[3]] ] + when @s.scan(EMBED_VARIABLE_PATTERN) + @q.push [ :EMBED_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(PAREN_BIND_VARIABLE_PATTERN) + @q.push [ :PAREN_BIND_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(BIND_VARIABLE_PATTERN) + @q.push [ :BIND_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(STRING_LITERAL_PATTERN) + @q.push [ :STRING_LITERAL, [@s.pos, @s[1]] ] + when @s.scan(SPLIT_TOKEN_PATTERN) + @q.push [ :IDENT, [@s.pos, @s[1]] ] + when @s.scan(UNMATCHED_COMMENT_START_PATTERN) ## unmatched comment start, '/*','#*' + raise Racc::ParseError, "unmatched comment. line:[#{line_no(@s.pos)}], str:[#{@s.rest}]" + when @s.scan(LITERAL_PATTERN) ## other string token + @q.push [ :IDENT, [@s.pos, @s[1]] ] + when @s.scan(SEMICOLON_AT_INPUT_END_PATTERN) + #drop semicolon at input end + else + raise Racc::ParseError, "syntax error at or near line:[#{line_no(@s.pos)}], str:[#{@s.rest}]" + end + end +end + + +## override racc's default on_error method +def on_error(t, v, vstack) + ## cursor in value-stack is an array of two items, + ## that have position value as 0th item. like [731, "ctx[:limit] "] + cursor = vstack.find do |tokens| + tokens.size == 2 and tokens[0].kind_of?(Fixnum) + end + pos = cursor[0] + line = line_no(pos) + rest = @s.string[pos .. -1] + raise Racc::ParseError, "syntax error at or near line:[#{line}], str:[#{rest}]" +end + + +def line_no(pos) + lines = 0 + scanned = @s.string[0..(pos)] + scanned.each_line { lines += 1 } + lines +end diff --git a/test/regress/twowaysql b/test/regress/twowaysql new file mode 100644 index 00000000..7724c1c9 --- /dev/null +++ b/test/regress/twowaysql @@ -0,0 +1,538 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "twowaysql.y". +# + +require 'racc/parser.rb' +module TwoWaySQL + class Parser < Racc::Parser + +module_eval(<<'...end twowaysql.y/module_eval...', 'twowaysql.y', 148) + +require 'strscan' + +def initialize(opts={}) + opts = { + :debug => false, + :preserve_space => true, + :preserve_comment => false + }.merge(opts) + @yydebug = opts[:debug] + @preserve_space = opts[:preserve_space] + @preserve_comment = opts[:preserve_comment] + @num_questions = 0 +end + + +PAREN_EXAMPLE = '\([^\)]+\)' +BEGIN_BIND_VARIABLE = '(\/|\#)\*([^\*]+)\*\1' +BIND_VARIABLE_PATTERN = /\A#{BEGIN_BIND_VARIABLE}\s*/ +PAREN_BIND_VARIABLE_PATTERN = /\A#{BEGIN_BIND_VARIABLE}\s*#{PAREN_EXAMPLE}/ +EMBED_VARIABLE_PATTERN = /\A(\/|\#)\*\$([^\*]+)\*\1\s*/ + +CONDITIONAL_PATTERN = /\A(\/|\#)\*(IF)\s+([^\*]+)\s*\*\1/ +BEGIN_END_PATTERN = /\A(\/|\#)\*(BEGIN|END)\s*\*\1/ +STRING_LITERAL_PATTERN = /\A(\'(?:[^\']+|\'\')*\')/ ## quoted string +SPLIT_TOKEN_PATTERN = /\A(\S+?)(?=\s*(?:(?:\/|\#)\*|-{2,}|\(|\)|\,))/ ## stop on delimiters --,/*,#*,',',(,) +LITERAL_PATTERN = /\A([^;\s]+)/ +SPACES_PATTERN = /\A(\s+)/ +QUESTION_PATTERN = /\A\?/ +COMMA_PATTERN = /\A\,/ +LPAREN_PATTERN = /\A\(/ +RPAREN_PATTERN = /\A\)/ +ACTUAL_COMMENT_PATTERN = /\A(\/|\#)\*(\s{1,}(?:.*?))\*\1/m ## start with spaces +SEMICOLON_AT_INPUT_END_PATTERN = /\A\;\s*\Z/ +UNMATCHED_COMMENT_START_PATTERN = /\A(?:(?:\/|\#)\*)/ + +#TODO: remove trailing spaces for S2Dao compatibility, but this spec sometimes causes SQL bugs... +ELSE_PATTERN = /\A\-{2,}\s*ELSE\s*/ +AND_PATTERN = /\A(\ *AND)\b/i +OR_PATTERN = /\A(\ *OR)\b/i + + +def parse( io ) + @q = [] + io.each_line(nil) do |whole| + @s = StringScanner.new(whole) + end + scan_str + + # @q.push [ false, nil ] + @q.push [ false, [@s.pos, nil] ] + + ## call racc's private parse method + do_parse +end + + +## called by racc +def next_token + @q.shift +end + + +def scan_str + until @s.eos? do + case + when @s.scan(AND_PATTERN) + @q.push [ :AND, [@s.pos, @s[1]] ] + when @s.scan(OR_PATTERN) + @q.push [ :OR, [@s.pos, @s[1]] ] + when @s.scan(SPACES_PATTERN) + @q.push [ :SPACES, [@s.pos, @s[1]] ] + when @s.scan(QUESTION_PATTERN) + @q.push [ :QUESTION, [@s.pos, nil] ] + when @s.scan(COMMA_PATTERN) + @q.push [ :COMMA, [@s.pos, ','] ] + when @s.scan(LPAREN_PATTERN) + @q.push [ :LPAREN, [@s.pos, '('] ] + when @s.scan(RPAREN_PATTERN) + @q.push [ :RPAREN, [@s.pos, ')'] ] + when @s.scan(ELSE_PATTERN) + @q.push [ :ELSE, [@s.pos, nil] ] + when @s.scan(ACTUAL_COMMENT_PATTERN) + @q.push [ :ACTUAL_COMMENT, [@s.pos, @s[1], @s[2]] ] if @preserve_comment + when @s.scan(BEGIN_END_PATTERN) + @q.push [ @s[2].intern, [@s.pos, nil] ] + when @s.scan(CONDITIONAL_PATTERN) + @q.push [ @s[2].intern, [@s.pos, @s[3]] ] + when @s.scan(EMBED_VARIABLE_PATTERN) + @q.push [ :EMBED_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(PAREN_BIND_VARIABLE_PATTERN) + @q.push [ :PAREN_BIND_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(BIND_VARIABLE_PATTERN) + @q.push [ :BIND_VARIABLE, [@s.pos, @s[2]] ] + when @s.scan(STRING_LITERAL_PATTERN) + @q.push [ :STRING_LITERAL, [@s.pos, @s[1]] ] + when @s.scan(SPLIT_TOKEN_PATTERN) + @q.push [ :IDENT, [@s.pos, @s[1]] ] + when @s.scan(UNMATCHED_COMMENT_START_PATTERN) ## unmatched comment start, '/*','#*' + raise Racc::ParseError, "unmatched comment. line:[#{line_no(@s.pos)}], str:[#{@s.rest}]" + when @s.scan(LITERAL_PATTERN) ## other string token + @q.push [ :IDENT, [@s.pos, @s[1]] ] + when @s.scan(SEMICOLON_AT_INPUT_END_PATTERN) + #drop semicolon at input end + else + raise Racc::ParseError, "syntax error at or near line:[#{line_no(@s.pos)}], str:[#{@s.rest}]" + end + end +end + + +## override racc's default on_error method +def on_error(t, v, vstack) + ## cursor in value-stack is an array of two items, + ## that have position value as 0th item. like [731, "ctx[:limit] "] + cursor = vstack.find do |tokens| + tokens.size == 2 and tokens[0].kind_of?(Fixnum) + end + pos = cursor[0] + line = line_no(pos) + rest = @s.string[pos .. -1] + raise Racc::ParseError, "syntax error at or near line:[#{line}], str:[#{rest}]" +end + + +def line_no(pos) + lines = 0 + scanned = @s.string[0..(pos)] + scanned.each_line { lines += 1 } + lines +end +...end twowaysql.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +8, 36, 9, 37, 12, 13, 10, 11, 14, 15, 16, 17, 18, 19, 22, +23, 24, 8, 38, 9, 3, 12, 13, 10, 11, 14, 15, 16, 17, 18, +19, 22, 23, 24, 8, 25, 9, 40, 12, 13, 10, 11, 14, 15, 16, +17, 18, 19, 22, 23, 24, 8, 45, 9, 46, 12, 13, 10, 11, 14, +15, 16, 17, 18, 19, 22, 23, 24, 8, nil, 9, nil, 12, 13, 10, +11, 14, 15, 16, 17, 18, 19, 22, 23, 24, 35, 33, 34, 31, 32, +44, 43, 31, 32] + +racc_action_check = [ +2, 24, 2, 24, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +2, 2, 26, 26, 26, 1, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 27, 3, 27, 28, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 41, 37, 41, 39, 41, 41, 41, 41, 41, +41, 41, 41, 41, 41, 41, 41, 41, 42, nil, 42, nil, 42, 42, 42, +42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 22, 22, 22, 9, 9, +34, 34, 40, 40] + +racc_action_pointer = [nil, 20, - +2, 35, nil, nil, nil, nil, nil, 82, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, 77, nil, - +7, nil, 15, 32, 32, nil, nil, nil, nil, nil, 82, nil, nil, 44, nil, +51, 86, 49, 66, nil, nil, nil, nil, nil] + +racc_action_default = [-2, -35, -1, -35, -3, -4, -5, -6, -2, -2, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -35, -32, -35, 48, -35, -13, -10, -11, -12, -2, -2, -28, -35, -30, -33, -35, -7, -35, -2, -14, -15, -29, -31, -34, -8, -9] + +racc_goto_table = [ +2, 1, 28, 39, nil, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 41, 42, 47] + +racc_goto_check = [ +2, 1, 7, 8, nil, nil, nil, nil, 2, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, 2, 2, 7] + +racc_goto_pointer = [nil, 1, 0, nil, nil, nil, nil, -7, -25, nil, nil, nil, nil] + +racc_goto_default = [nil, nil, 27, 4, 5, 6, 7, nil, nil, 29, 30, 20, 21] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 20, :_reduce_1, + 0, 21, :_reduce_2, + 2, 21, :_reduce_3, + 1, 22, :_reduce_none, + 1, 22, :_reduce_none, + 1, 22, :_reduce_none, + 3, 25, :_reduce_7, + 4, 24, :_reduce_8, + 2, 27, :_reduce_9, + 0, 27, :_reduce_10, + 1, 26, :_reduce_none, + 1, 26, :_reduce_none, + 1, 26, :_reduce_none, + 2, 28, :_reduce_14, + 2, 29, :_reduce_15, + 1, 23, :_reduce_16, + 1, 23, :_reduce_17, + 1, 23, :_reduce_18, + 1, 23, :_reduce_19, + 1, 23, :_reduce_20, + 1, 23, :_reduce_21, + 1, 23, :_reduce_22, + 1, 23, :_reduce_23, + 1, 23, :_reduce_24, + 1, 23, :_reduce_25, + 1, 23, :_reduce_none, + 1, 23, :_reduce_none, + 2, 30, :_reduce_28, + 3, 30, :_reduce_29, + 2, 30, :_reduce_30, + 3, 30, :_reduce_31, + 1, 30, :_reduce_32, + 2, 31, :_reduce_33, + 3, 31, :_reduce_34 ] + +racc_reduce_n = 35 + +racc_shift_n = 48 + +racc_token_table = { + false => 0, + :error => 1, + :BEGIN => 2, + :END => 3, + :IF => 4, + :ELSE => 5, + :AND => 6, + :OR => 7, + :IDENT => 8, + :STRING_LITERAL => 9, + :SPACES => 10, + :COMMA => 11, + :LPAREN => 12, + :RPAREN => 13, + :QUESTION => 14, + :ACTUAL_COMMENT => 15, + :BIND_VARIABLE => 16, + :PAREN_BIND_VARIABLE => 17, + :EMBED_VARIABLE => 18 } + +racc_nt_base = 19 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "BEGIN", + "END", + "IF", + "ELSE", + "AND", + "OR", + "IDENT", + "STRING_LITERAL", + "SPACES", + "COMMA", + "LPAREN", + "RPAREN", + "QUESTION", + "ACTUAL_COMMENT", + "BIND_VARIABLE", + "PAREN_BIND_VARIABLE", + "EMBED_VARIABLE", + "$start", + "sql", + "stmt_list", + "stmt", + "primary", + "if_stmt", + "begin_stmt", + "sub_stmt", + "else_stmt", + "and_stmt", + "or_stmt", + "bind_var", + "embed_var" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +module_eval(<<'.,.,', 'twowaysql.y', 20) + def _reduce_1(val, _values, result) + result = RootNode.new( val[0] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 25) + def _reduce_2(val, _values, result) + result = [] + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 29) + def _reduce_3(val, _values, result) + result.push val[1] + + result + end +.,., + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +module_eval(<<'.,.,', 'twowaysql.y', 38) + def _reduce_7(val, _values, result) + result = BeginNode.new( val[1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 43) + def _reduce_8(val, _values, result) + result = IfNode.new( val[0][1], val[1], val[2] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 48) + def _reduce_9(val, _values, result) + result = val[1] + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 52) + def _reduce_10(val, _values, result) + result = nil + + result + end +.,., + +# reduce 11 omitted + +# reduce 12 omitted + +# reduce 13 omitted + +module_eval(<<'.,.,', 'twowaysql.y', 61) + def _reduce_14(val, _values, result) + result = SubStatementNode.new( val[0][1], val[1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 66) + def _reduce_15(val, _values, result) + result = SubStatementNode.new( val[0][1], val[1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 71) + def _reduce_16(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 75) + def _reduce_17(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 79) + def _reduce_18(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 83) + def _reduce_19(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 87) + def _reduce_20(val, _values, result) + result = WhiteSpaceNode.new( val[0][1], @preserve_space ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 91) + def _reduce_21(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 95) + def _reduce_22(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 99) + def _reduce_23(val, _values, result) + result = LiteralNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 103) + def _reduce_24(val, _values, result) + @num_questions += 1 + result = QuestionNode.new( @num_questions ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 108) + def _reduce_25(val, _values, result) + result = ActualCommentNode.new( val[0][1] , val[0][2] ) + + result + end +.,., + +# reduce 26 omitted + +# reduce 27 omitted + +module_eval(<<'.,.,', 'twowaysql.y', 115) + def _reduce_28(val, _values, result) + result = BindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 119) + def _reduce_29(val, _values, result) + result = BindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 123) + def _reduce_30(val, _values, result) + result = BindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 127) + def _reduce_31(val, _values, result) + result = BindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 131) + def _reduce_32(val, _values, result) + result = ParenBindVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 136) + def _reduce_33(val, _values, result) + result = EmbedVariableNode.new( val[0][1] ) + + result + end +.,., + +module_eval(<<'.,.,', 'twowaysql.y', 140) + def _reduce_34(val, _values, result) + result = EmbedVariableNode.new( val[0][1] ) + + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module TwoWaySQL diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index d8b78cad..59f703b9 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -309,5 +309,13 @@ def test_mediacloth assert_debugfile 'mediacloth.y', [0, 0, 0, 0] assert_output 'mediacloth.y' end + + # .y file from twowaysql gem + + def test_twowaysql + assert_compile 'twowaysql.y' + assert_debugfile 'twowaysql.y', [4, 0, 0, 0] + assert_output 'twowaysql.y' + end end end From b7c5d1a3233262d6c2db965ddafa5bf4566dac79 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 24 Nov 2015 11:31:20 +0200 Subject: [PATCH 309/619] Include test/regress/machete in Manifest --- Manifest.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Manifest.txt b/Manifest.txt index f6395905..5c9a3ee4 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -120,6 +120,7 @@ test/regress/rdinlineparser test/regress/riml test/regress/ruby18 test/regress/ruby22 +test/regress/twowaysql test/scandata/brace test/scandata/gvar test/scandata/normal From 1e4aaf837fd21bfadbd3635505d0ed16cd049e64 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 24 Nov 2015 11:30:31 +0200 Subject: [PATCH 310/619] Add regression test case based on parser.y from machete gem Thanks to the original author, David Majda! --- Manifest.txt | 2 + test/assets/machete.y | 423 ++++++++++++++++++++ test/regress/machete | 806 ++++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 1239 insertions(+) create mode 100644 test/assets/machete.y create mode 100644 test/regress/machete diff --git a/Manifest.txt b/Manifest.txt index 5c9a3ee4..a897582c 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -65,6 +65,7 @@ test/assets/infini.y test/assets/intp.y test/assets/journey.y test/assets/liquor.y +test/assets/machete.y test/assets/macruby.y test/assets/mediacloth.y test/assets/mailp.y @@ -109,6 +110,7 @@ test/regress/edtf test/regress/journey test/regress/huia test/regress/liquor +test/regress/machete test/regress/mediacloth test/regress/namae test/regress/nasl diff --git a/test/assets/machete.y b/test/assets/machete.y new file mode 100644 index 00000000..ea92d47a --- /dev/null +++ b/test/assets/machete.y @@ -0,0 +1,423 @@ +# Copyright (c) 2011 SUSE +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +class Machete::Parser + +token NIL +token TRUE +token FALSE +token INTEGER +token SYMBOL +token STRING +token REGEXP +token ANY +token EVEN +token ODD +token METHOD_NAME +token CLASS_NAME + +start expression + +rule + +expression : primary + | expression "|" primary { + result = if val[0].is_a?(ChoiceMatcher) + ChoiceMatcher.new(val[0].alternatives << val[2]) + else + ChoiceMatcher.new([val[0], val[2]]) + end + } + +primary : node + | array + | literal + | any + +node : CLASS_NAME { + result = NodeMatcher.new(val[0].to_sym) + } + | CLASS_NAME "<" attrs ">" { + result = NodeMatcher.new(val[0].to_sym, val[2]) + } + +attrs : attr + | attrs "," attr { result = val[0].merge(val[2]) } + +attr : method_name "=" expression { result = { val[0].to_sym => val[2] } } + | method_name "^=" SYMBOL { + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new("^" + Regexp.escape(symbol_value(val[2]).to_s)) + ) + } + } + | method_name "$=" SYMBOL { + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new(Regexp.escape(symbol_value(val[2]).to_s) + "$") + ) + } + } + | method_name "*=" SYMBOL { + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new(Regexp.escape(symbol_value(val[2]).to_s)) + ) + } + } + | method_name "^=" STRING { + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new("^" + Regexp.escape(string_value(val[2]))) + ) + } + } + | method_name "$=" STRING { + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new(Regexp.escape(string_value(val[2])) + "$") + ) + } + } + | method_name "*=" STRING { + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new(Regexp.escape(string_value(val[2]))) + ) + } + } + | method_name "*=" REGEXP { + result = { + val[0].to_sym => IndifferentRegexpMatcher.new( + Regexp.new(regexp_value(val[2])) + ) + } + } + +# Hack to overcome the fact that some tokens will lex as simple tokens, not +# METHOD_NAME tokens, and that "reserved words" will lex as separate kinds of +# tokens. +method_name : METHOD_NAME + | NIL + | TRUE + | FALSE + | ANY + | EVEN + | ODD + | "*" + | "+" + | "<" + | ">" + | "^" + | "|" + +array : "[" items_opt "]" { result = ArrayMatcher.new(val[1]) } + +items_opt : /* empty */ { result = [] } + | items + +items : item { result = [val[0]] } + | items "," item { result = val[0] << val[2] } + +item : expression + | expression quantifier { result = Quantifier.new(val[0], *val[1]) } + +quantifier : "*" { result = [0, nil, 1] } + | "+" { result = [1, nil, 1] } + | "?" { result = [0, 1, 1] } + | "{" INTEGER "}" { + result = [integer_value(val[1]), integer_value(val[1]), 1] + } + | "{" INTEGER "," "}" { + result = [integer_value(val[1]), nil, 1] + } + | "{" "," INTEGER "}" { + result = [0, integer_value(val[2]), 1] + } + | "{" INTEGER "," INTEGER "}" { + result = [integer_value(val[1]), integer_value(val[3]), 1] + } + | "{" EVEN "}" { result = [0, nil, 2] } + | "{" ODD "}" { result = [1, nil, 2] } + +literal : NIL { result = LiteralMatcher.new(nil) } + | TRUE { result = LiteralMatcher.new(true) } + | FALSE { result = LiteralMatcher.new(false) } + | INTEGER { result = LiteralMatcher.new(integer_value(val[0])) } + | SYMBOL { result = LiteralMatcher.new(symbol_value(val[0])) } + | STRING { result = LiteralMatcher.new(string_value(val[0])) } + | REGEXP { result = LiteralMatcher.new(regexp_value(val[0])) } + +any : ANY { result = AnyMatcher.new } + +---- inner + +include Matchers + +class SyntaxError < StandardError; end + +def parse(input) + @input = input + @pos = 0 + + do_parse +end + +private + +def integer_value(value) + if value =~ /^0[bB]/ + value[2..-1].to_i(2) + elsif value =~ /^0[oO]/ + value[2..-1].to_i(8) + elsif value =~ /^0[dD]/ + value[2..-1].to_i(10) + elsif value =~ /^0[xX]/ + value[2..-1].to_i(16) + elsif value =~ /^0/ + value.to_i(8) + else + value.to_i + end +end + +def symbol_value(value) + value[1..-1].to_sym +end + +def string_value(value) + quote = value[0..0] + if quote == "'" + value[1..-2].gsub("\\\\", "\\").gsub("\\'", "'") + elsif quote == '"' + value[1..-2]. + gsub("\\\\", "\\"). + gsub('\\"', '"'). + gsub("\\n", "\n"). + gsub("\\t", "\t"). + gsub("\\r", "\r"). + gsub("\\f", "\f"). + gsub("\\v", "\v"). + gsub("\\a", "\a"). + gsub("\\e", "\e"). + gsub("\\b", "\b"). + gsub("\\s", "\s"). + gsub(/\\([0-7]{1,3})/) { $1.to_i(8).chr }. + gsub(/\\x([0-9a-fA-F]{1,2})/) { $1.to_i(16).chr } + else + raise "Unknown quote: #{quote.inspect}." + end +end + +REGEXP_OPTIONS = { + 'i' => Regexp::IGNORECASE, + 'm' => Regexp::MULTILINE, + 'x' => Regexp::EXTENDED +} + +def regexp_value(value) + /\A\/(.*)\/([imx]*)\z/ =~ value + pattern, options = $1, $2 + + Regexp.new(pattern, options.chars.map { |ch| REGEXP_OPTIONS[ch] }.inject(:|)) +end + +# "^" needs to be here because if it were among operators recognized by +# METHOD_NAME, "^=" would be recognized as two tokens. +SIMPLE_TOKENS = [ + "|", + "<", + ">", + ",", + "=", + "^=", + "^", + "$=", + "[", + "]", + "*=", + "*", + "+", + "?", + "{", + "}" +] + +COMPLEX_TOKENS = [ + [:NIL, /^nil/], + [:TRUE, /^true/], + [:FALSE, /^false/], + # INTEGER needs to be before METHOD_NAME, otherwise e.g. "+1" would be + # recognized as two tokens. + [ + :INTEGER, + /^ + [+-]? # sign + ( + 0[bB][01]+(_[01]+)* # binary (prefixed) + | + 0[oO][0-7]+(_[0-7]+)* # octal (prefixed) + | + 0[dD]\d+(_\d+)* # decimal (prefixed) + | + 0[xX][0-9a-fA-F]+(_[0-9a-fA-F]+)* # hexadecimal (prefixed) + | + 0[0-7]*(_[0-7]+)* # octal (unprefixed) + | + [1-9]\d*(_\d+)* # decimal (unprefixed) + ) + /x + ], + [ + :SYMBOL, + /^ + : + ( + # class name + [A-Z][a-zA-Z0-9_]* + | + # regular method name + [a-z_][a-zA-Z0-9_]*[?!=]? + | + # instance variable name + @[a-zA-Z_][a-zA-Z0-9_]* + | + # class variable name + @@[a-zA-Z_][a-zA-Z0-9_]* + | + # operator (sorted by length, then alphabetically) + (<=>|===|\[\]=|\*\*|\+@|-@|<<|<=|==|=~|>=|>>|\[\]|[%&*+\-\/<>^`|~]) + ) + /x + ], + [ + :STRING, + /^ + ( + ' # sinqle-quoted string + ( + \\[\\'] # escape + | + [^'] # regular character + )* + ' + | + " # double-quoted string + ( + \\ # escape + ( + [\\"ntrfvaebs] # one-character escape + | + [0-7]{1,3} # octal number escape + | + x[0-9a-fA-F]{1,2} # hexadecimal number escape + ) + | + [^"] # regular character + )* + " + ) + /x + ], + [ + :REGEXP, + /^ + \/ + ( + \\ # escape + ( + [\\\/ntrfvaebs\(\)\[\]\{\}\-\.\?\*\+\|\^\$] # one-character escape + | + [0-7]{2,3} # octal number escape + | + x[0-9a-fA-F]{1,2} # hexadecimal number escape + ) + | + [^\/] # regular character + )* + \/ + [imx]* + /x + ], + # ANY, EVEN and ODD need to be before METHOD_NAME, otherwise they would be + # recognized as method names. + [:ANY, /^any/], + [:EVEN, /^even/], + [:ODD, /^odd/], + # We exclude "*", "+", "<", ">", "^" and "|" from method names since they are + # lexed as simple tokens. This is because they have also other meanings in + # Machette patterns beside Ruby method names. + [ + :METHOD_NAME, + /^ + ( + # regular name + [a-z_][a-zA-Z0-9_]*[?!=]? + | + # operator (sorted by length, then alphabetically) + (<=>|===|\[\]=|\*\*|\+@|-@|<<|<=|==|=~|>=|>>|\[\]|[%&\-\/`~]) + ) + /x + ], + [:CLASS_NAME, /^[A-Z][a-zA-Z0-9_]*/] +] + +def next_token + skip_whitespace + + return false if remaining_input.empty? + + # Complex tokens need to be before simple tokens, otherwise e.g. "<<" would be + # recognized as two tokens. + + COMPLEX_TOKENS.each do |type, regexp| + if remaining_input =~ regexp + @pos += $&.length + return [type, $&] + end + end + + SIMPLE_TOKENS.each do |token| + if remaining_input[0...token.length] == token + @pos += token.length + return [token, token] + end + end + + raise SyntaxError, "Unexpected character: #{remaining_input[0..0].inspect}." +end + +def skip_whitespace + if remaining_input =~ /\A^[ \t\r\n]+/ + @pos += $&.length + end +end + +def remaining_input + @input[@pos..-1] +end + +def on_error(error_token_id, error_value, value_stack) + raise SyntaxError, "Unexpected token: #{error_value.inspect}." +end diff --git a/test/regress/machete b/test/regress/machete new file mode 100644 index 00000000..9f1767f8 --- /dev/null +++ b/test/regress/machete @@ -0,0 +1,806 @@ +# +# DO NOT MODIFY!!!! +# This file is automatically generated by Racc 1.4.13 +# from Racc grammar file "machete.y". +# + +require 'racc/parser.rb' +module Machete + class Parser < Racc::Parser + +module_eval(<<'...end machete.y/module_eval...', 'machete.y', 175) + +include Matchers + +class SyntaxError < StandardError; end + +def parse(input) + @input = input + @pos = 0 + + do_parse +end + +private + +def integer_value(value) + if value =~ /^0[bB]/ + value[2..-1].to_i(2) + elsif value =~ /^0[oO]/ + value[2..-1].to_i(8) + elsif value =~ /^0[dD]/ + value[2..-1].to_i(10) + elsif value =~ /^0[xX]/ + value[2..-1].to_i(16) + elsif value =~ /^0/ + value.to_i(8) + else + value.to_i + end +end + +def symbol_value(value) + value[1..-1].to_sym +end + +def string_value(value) + quote = value[0..0] + if quote == "'" + value[1..-2].gsub("\\\\", "\\").gsub("\\'", "'") + elsif quote == '"' + value[1..-2]. + gsub("\\\\", "\\"). + gsub('\\"', '"'). + gsub("\\n", "\n"). + gsub("\\t", "\t"). + gsub("\\r", "\r"). + gsub("\\f", "\f"). + gsub("\\v", "\v"). + gsub("\\a", "\a"). + gsub("\\e", "\e"). + gsub("\\b", "\b"). + gsub("\\s", "\s"). + gsub(/\\([0-7]{1,3})/) { $1.to_i(8).chr }. + gsub(/\\x([0-9a-fA-F]{1,2})/) { $1.to_i(16).chr } + else + raise "Unknown quote: #{quote.inspect}." + end +end + +REGEXP_OPTIONS = { + 'i' => Regexp::IGNORECASE, + 'm' => Regexp::MULTILINE, + 'x' => Regexp::EXTENDED +} + +def regexp_value(value) + /\A\/(.*)\/([imx]*)\z/ =~ value + pattern, options = $1, $2 + + Regexp.new(pattern, options.chars.map { |ch| REGEXP_OPTIONS[ch] }.inject(:|)) +end + +# "^" needs to be here because if it were among operators recognized by +# METHOD_NAME, "^=" would be recognized as two tokens. +SIMPLE_TOKENS = [ + "|", + "<", + ">", + ",", + "=", + "^=", + "^", + "$=", + "[", + "]", + "*=", + "*", + "+", + "?", + "{", + "}" +] + +COMPLEX_TOKENS = [ + [:NIL, /^nil/], + [:TRUE, /^true/], + [:FALSE, /^false/], + # INTEGER needs to be before METHOD_NAME, otherwise e.g. "+1" would be + # recognized as two tokens. + [ + :INTEGER, + /^ + [+-]? # sign + ( + 0[bB][01]+(_[01]+)* # binary (prefixed) + | + 0[oO][0-7]+(_[0-7]+)* # octal (prefixed) + | + 0[dD]\d+(_\d+)* # decimal (prefixed) + | + 0[xX][0-9a-fA-F]+(_[0-9a-fA-F]+)* # hexadecimal (prefixed) + | + 0[0-7]*(_[0-7]+)* # octal (unprefixed) + | + [1-9]\d*(_\d+)* # decimal (unprefixed) + ) + /x + ], + [ + :SYMBOL, + /^ + : + ( + # class name + [A-Z][a-zA-Z0-9_]* + | + # regular method name + [a-z_][a-zA-Z0-9_]*[?!=]? + | + # instance variable name + @[a-zA-Z_][a-zA-Z0-9_]* + | + # class variable name + @@[a-zA-Z_][a-zA-Z0-9_]* + | + # operator (sorted by length, then alphabetically) + (<=>|===|\[\]=|\*\*|\+@|-@|<<|<=|==|=~|>=|>>|\[\]|[%&*+\-\/<>^`|~]) + ) + /x + ], + [ + :STRING, + /^ + ( + ' # sinqle-quoted string + ( + \\[\\'] # escape + | + [^'] # regular character + )* + ' + | + " # double-quoted string + ( + \\ # escape + ( + [\\"ntrfvaebs] # one-character escape + | + [0-7]{1,3} # octal number escape + | + x[0-9a-fA-F]{1,2} # hexadecimal number escape + ) + | + [^"] # regular character + )* + " + ) + /x + ], + [ + :REGEXP, + /^ + \/ + ( + \\ # escape + ( + [\\\/ntrfvaebs\(\)\[\]\{\}\-\.\?\*\+\|\^\$] # one-character escape + | + [0-7]{2,3} # octal number escape + | + x[0-9a-fA-F]{1,2} # hexadecimal number escape + ) + | + [^\/] # regular character + )* + \/ + [imx]* + /x + ], + # ANY, EVEN and ODD need to be before METHOD_NAME, otherwise they would be + # recognized as method names. + [:ANY, /^any/], + [:EVEN, /^even/], + [:ODD, /^odd/], + # We exclude "*", "+", "<", ">", "^" and "|" from method names since they are + # lexed as simple tokens. This is because they have also other meanings in + # Machette patterns beside Ruby method names. + [ + :METHOD_NAME, + /^ + ( + # regular name + [a-z_][a-zA-Z0-9_]*[?!=]? + | + # operator (sorted by length, then alphabetically) + (<=>|===|\[\]=|\*\*|\+@|-@|<<|<=|==|=~|>=|>>|\[\]|[%&\-\/`~]) + ) + /x + ], + [:CLASS_NAME, /^[A-Z][a-zA-Z0-9_]*/] +] + +def next_token + skip_whitespace + + return false if remaining_input.empty? + + # Complex tokens need to be before simple tokens, otherwise e.g. "<<" would be + # recognized as two tokens. + + COMPLEX_TOKENS.each do |type, regexp| + if remaining_input =~ regexp + @pos += $&.length + return [type, $&] + end + end + + SIMPLE_TOKENS.each do |token| + if remaining_input[0...token.length] == token + @pos += token.length + return [token, token] + end + end + + raise SyntaxError, "Unexpected character: #{remaining_input[0..0].inspect}." +end + +def skip_whitespace + if remaining_input =~ /\A^[ \t\r\n]+/ + @pos += $&.length + end +end + +def remaining_input + @input[@pos..-1] +end + +def on_error(error_token_id, error_value, value_stack) + raise SyntaxError, "Unexpected token: #{error_value.inspect}." +end +...end machete.y/module_eval... +##### State transition tables begin ### + +racc_action_table = [ +75, 19, 9, 10, 11, 12, 13, 14, 15, 16, 66, 67, 68, 7, 24, +9, 10, 11, 12, 13, 14, 15, 16, 17, 74, 8, 7, 47, 9, 10, +11, 12, 13, 14, 15, 16, 48, 18, 8, 7, 71, 9, 10, 11, 12, +13, 14, 15, 16, 72, 70, 8, 7, 73, 9, 10, 11, 12, 13, 14, +15, 16, 69, 18, 8, 7, 30, 31, 32, 51, 52, 53, 54, 33, 34, +35, 29, 8, 41, 38, 39, 76, 30, 31, 32, 77, 36, 37, 40, 33, +34, 35, 29, nil, 41, 38, 39, 18, 49, 50, 62, 63, 36, 37, 40, +43, 44, 55, 64, 65, 45, 46, 57, 58, nil, nil, nil, nil, nil, 56] + +racc_action_check = [ +70, 7, 0, 0, 0, 0, 0, 0, 0, 0, 54, 54, 54, 0, 17, +8, 8, 8, 8, 8, 8, 8, 8, 1, 70, 0, 8, 21, 18, 18, +18, 18, 18, 18, 18, 18, 22, 1, 8, 18, 56, 48, 48, 48, 48, +48, 48, 48, 48, 57, 55, 18, 48, 58, 51, 51, 51, 51, 51, 51, +51, 51, 55, 61, 48, 51, 19, 19, 19, 28, 28, 28, 28, 19, 19, +19, 19, 51, 19, 19, 19, 71, 50, 50, 50, 75, 19, 19, 19, 50, +50, 50, 50, nil, 50, 50, 50, 20, 26, 26, 52, 52, 50, 50, 50, +20, 20, 46, 53, 53, 20, 20, 46, 46, nil, nil, nil, nil, nil, 46] + +racc_action_pointer = [0, 23, nil, nil, nil, nil, nil, - +14, 13, nil, nil, nil, nil, nil, nil, nil, nil, 14, 26, 64, 83, 1, +19, nil, nil, nil, 82, nil, 51, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, 102, nil, 39, nil, 80, 52, +94, 102, 4, 33, 35, 20, 24, nil, nil, 49, nil, nil, nil, nil, nil, +nil, nil, nil, -5, 52, nil, nil, nil, 56, nil, nil] + +racc_action_default = [-56, -56, -1, -3, -4, -5, -6, -7, -33, -48, -49, -50, -51, -52, -53, -54, -55, -56, -56, -56, -37, -56, -34, -35, 78, -2, -56, -9, -56, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, -38, -39, -40, -41, -56, -32, -56, -8, -56, -56, -56, -56, -56, -56, -56, -56, -56, -36, -10, -11, -12, -15, -13, -16, -14, -17, -18, -42, -56, -56, -46, -47, -43, -56, -44, -45] + +racc_goto_table = [ +1, 23, 27, 25, 26, 21, 22, 42, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 60, nil, nil, nil, nil, nil, nil, nil, 59, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 61] + +racc_goto_check = [ +1, 12, 8, 2, 7, 10, 11, 13, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, +nil, nil, nil, 8, nil, nil, nil, nil, nil, nil, nil, 12, nil, nil, nil, +nil, nil, nil, nil, nil, nil, 1] + +racc_goto_pointer = [nil, 0, -15, nil, nil, nil, nil, -15, -17, nil, -3, -2, -7, -13] + +racc_goto_default = [nil, 20, 2, 3, 4, 5, 6, nil, nil, 28, nil, nil, nil, nil] + +racc_reduce_table = [ + 0, 0, :racc_error, + 1, 31, :_reduce_none, + 3, 31, :_reduce_2, + 1, 32, :_reduce_none, + 1, 32, :_reduce_none, + 1, 32, :_reduce_none, + 1, 32, :_reduce_none, + 1, 33, :_reduce_7, + 4, 33, :_reduce_8, + 1, 37, :_reduce_none, + 3, 37, :_reduce_10, + 3, 38, :_reduce_11, + 3, 38, :_reduce_12, + 3, 38, :_reduce_13, + 3, 38, :_reduce_14, + 3, 38, :_reduce_15, + 3, 38, :_reduce_16, + 3, 38, :_reduce_17, + 3, 38, :_reduce_18, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 1, 39, :_reduce_none, + 3, 34, :_reduce_32, + 0, 40, :_reduce_33, + 1, 40, :_reduce_none, + 1, 41, :_reduce_35, + 3, 41, :_reduce_36, + 1, 42, :_reduce_none, + 2, 42, :_reduce_38, + 1, 43, :_reduce_39, + 1, 43, :_reduce_40, + 1, 43, :_reduce_41, + 3, 43, :_reduce_42, + 4, 43, :_reduce_43, + 4, 43, :_reduce_44, + 5, 43, :_reduce_45, + 3, 43, :_reduce_46, + 3, 43, :_reduce_47, + 1, 35, :_reduce_48, + 1, 35, :_reduce_49, + 1, 35, :_reduce_50, + 1, 35, :_reduce_51, + 1, 35, :_reduce_52, + 1, 35, :_reduce_53, + 1, 35, :_reduce_54, + 1, 36, :_reduce_55 ] + +racc_reduce_n = 56 + +racc_shift_n = 78 + +racc_token_table = { + false => 0, + :error => 1, + :NIL => 2, + :TRUE => 3, + :FALSE => 4, + :INTEGER => 5, + :SYMBOL => 6, + :STRING => 7, + :REGEXP => 8, + :ANY => 9, + :EVEN => 10, + :ODD => 11, + :METHOD_NAME => 12, + :CLASS_NAME => 13, + "|" => 14, + "<" => 15, + ">" => 16, + "," => 17, + "=" => 18, + "^=" => 19, + "$=" => 20, + "*=" => 21, + "*" => 22, + "+" => 23, + "^" => 24, + "[" => 25, + "]" => 26, + "?" => 27, + "{" => 28, + "}" => 29 } + +racc_nt_base = 30 + +racc_use_result_var = true + +Racc_arg = [ + racc_action_table, + racc_action_check, + racc_action_default, + racc_action_pointer, + racc_goto_table, + racc_goto_check, + racc_goto_default, + racc_goto_pointer, + racc_nt_base, + racc_reduce_table, + racc_token_table, + racc_shift_n, + racc_reduce_n, + racc_use_result_var ] + +Racc_token_to_s_table = [ + "$end", + "error", + "NIL", + "TRUE", + "FALSE", + "INTEGER", + "SYMBOL", + "STRING", + "REGEXP", + "ANY", + "EVEN", + "ODD", + "METHOD_NAME", + "CLASS_NAME", + "\"|\"", + "\"<\"", + "\">\"", + "\",\"", + "\"=\"", + "\"^=\"", + "\"$=\"", + "\"*=\"", + "\"*\"", + "\"+\"", + "\"^\"", + "\"[\"", + "\"]\"", + "\"?\"", + "\"{\"", + "\"}\"", + "$start", + "expression", + "primary", + "node", + "array", + "literal", + "any", + "attrs", + "attr", + "method_name", + "items_opt", + "items", + "item", + "quantifier" ] + +Racc_debug_parser = false + +##### State transition tables end ##### + +# reduce 0 omitted + +# reduce 1 omitted + +module_eval(<<'.,.,', 'machete.y', 44) + def _reduce_2(val, _values, result) + result = if val[0].is_a?(ChoiceMatcher) + ChoiceMatcher.new(val[0].alternatives << val[2]) + else + ChoiceMatcher.new([val[0], val[2]]) + end + + result + end +.,., + +# reduce 3 omitted + +# reduce 4 omitted + +# reduce 5 omitted + +# reduce 6 omitted + +module_eval(<<'.,.,', 'machete.y', 57) + def _reduce_7(val, _values, result) + result = NodeMatcher.new(val[0].to_sym) + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 60) + def _reduce_8(val, _values, result) + result = NodeMatcher.new(val[0].to_sym, val[2]) + + result + end +.,., + +# reduce 9 omitted + +module_eval(<<'.,.,', 'machete.y', 64) + def _reduce_10(val, _values, result) + result = val[0].merge(val[2]) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 66) + def _reduce_11(val, _values, result) + result = { val[0].to_sym => val[2] } + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 68) + def _reduce_12(val, _values, result) + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new("^" + Regexp.escape(symbol_value(val[2]).to_s)) + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 75) + def _reduce_13(val, _values, result) + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new(Regexp.escape(symbol_value(val[2]).to_s) + "$") + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 82) + def _reduce_14(val, _values, result) + result = { + val[0].to_sym => SymbolRegexpMatcher.new( + Regexp.new(Regexp.escape(symbol_value(val[2]).to_s)) + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 89) + def _reduce_15(val, _values, result) + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new("^" + Regexp.escape(string_value(val[2]))) + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 96) + def _reduce_16(val, _values, result) + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new(Regexp.escape(string_value(val[2])) + "$") + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 103) + def _reduce_17(val, _values, result) + result = { + val[0].to_sym => StringRegexpMatcher.new( + Regexp.new(Regexp.escape(string_value(val[2]))) + ) + } + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 110) + def _reduce_18(val, _values, result) + result = { + val[0].to_sym => IndifferentRegexpMatcher.new( + Regexp.new(regexp_value(val[2])) + ) + } + + result + end +.,., + +# reduce 19 omitted + +# reduce 20 omitted + +# reduce 21 omitted + +# reduce 22 omitted + +# reduce 23 omitted + +# reduce 24 omitted + +# reduce 25 omitted + +# reduce 26 omitted + +# reduce 27 omitted + +# reduce 28 omitted + +# reduce 29 omitted + +# reduce 30 omitted + +# reduce 31 omitted + +module_eval(<<'.,.,', 'machete.y', 134) + def _reduce_32(val, _values, result) + result = ArrayMatcher.new(val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 136) + def _reduce_33(val, _values, result) + result = [] + result + end +.,., + +# reduce 34 omitted + +module_eval(<<'.,.,', 'machete.y', 139) + def _reduce_35(val, _values, result) + result = [val[0]] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 140) + def _reduce_36(val, _values, result) + result = val[0] << val[2] + result + end +.,., + +# reduce 37 omitted + +module_eval(<<'.,.,', 'machete.y', 143) + def _reduce_38(val, _values, result) + result = Quantifier.new(val[0], *val[1]) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 145) + def _reduce_39(val, _values, result) + result = [0, nil, 1] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 146) + def _reduce_40(val, _values, result) + result = [1, nil, 1] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 147) + def _reduce_41(val, _values, result) + result = [0, 1, 1] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 149) + def _reduce_42(val, _values, result) + result = [integer_value(val[1]), integer_value(val[1]), 1] + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 152) + def _reduce_43(val, _values, result) + result = [integer_value(val[1]), nil, 1] + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 155) + def _reduce_44(val, _values, result) + result = [0, integer_value(val[2]), 1] + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 158) + def _reduce_45(val, _values, result) + result = [integer_value(val[1]), integer_value(val[3]), 1] + + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 160) + def _reduce_46(val, _values, result) + result = [0, nil, 2] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 161) + def _reduce_47(val, _values, result) + result = [1, nil, 2] + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 163) + def _reduce_48(val, _values, result) + result = LiteralMatcher.new(nil) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 164) + def _reduce_49(val, _values, result) + result = LiteralMatcher.new(true) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 165) + def _reduce_50(val, _values, result) + result = LiteralMatcher.new(false) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 166) + def _reduce_51(val, _values, result) + result = LiteralMatcher.new(integer_value(val[0])) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 167) + def _reduce_52(val, _values, result) + result = LiteralMatcher.new(symbol_value(val[0])) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 168) + def _reduce_53(val, _values, result) + result = LiteralMatcher.new(string_value(val[0])) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 169) + def _reduce_54(val, _values, result) + result = LiteralMatcher.new(regexp_value(val[0])) + result + end +.,., + +module_eval(<<'.,.,', 'machete.y', 171) + def _reduce_55(val, _values, result) + result = AnyMatcher.new + result + end +.,., + +def _reduce_none(val, _values, result) + val[0] +end + + end # class Parser + end # module Machete diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 59f703b9..5fe584a2 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -317,5 +317,13 @@ def test_twowaysql assert_debugfile 'twowaysql.y', [4, 0, 0, 0] assert_output 'twowaysql.y' end + + # .y file from machete gem + + def test_machete + assert_compile 'machete.y' + assert_debugfile 'machete.y', [0, 0, 0, 0] + assert_output 'machete.y' + end end end From d1912479e18c49f65a5a433ce2b8e7e75face116 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 24 Nov 2015 15:53:57 +0200 Subject: [PATCH 311/619] Convert Copyright constant to COPYRIGHT --- bin/racc | 2 +- bin/racc2y | 2 +- bin/y2racc | 2 +- lib/racc/info.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/racc b/bin/racc index 21ed6b58..eac899f5 100755 --- a/bin/racc +++ b/bin/racc @@ -84,7 +84,7 @@ def main exit 0 } parser.on('--copyright', 'Prints copyright and quits.') { - puts Racc::Copyright + puts Racc::COPYRIGHT exit 0 } parser.on('--help', 'Prints this message and quits.') { diff --git a/bin/racc2y b/bin/racc2y index 978e7860..f5add2ce 100755 --- a/bin/racc2y +++ b/bin/racc2y @@ -39,7 +39,7 @@ def main exit 0 } parser.on('--copyright', 'Prints copyright and quit.') { - puts Racc::Copyright + puts Racc::COPYRIGHT exit 0 } parser.on('--help', 'Prints this message and quit.') { diff --git a/bin/y2racc b/bin/y2racc index 3a201de1..103632bd 100755 --- a/bin/y2racc +++ b/bin/y2racc @@ -41,7 +41,7 @@ def main exit 0 } parser.on('--copyright', 'Prints copyright and quit.') { - puts Racc::Copyright + puts Racc::COPYRIGHT exit 0 } parser.on('--help', 'Prints this message and quit.') { diff --git a/lib/racc/info.rb b/lib/racc/info.rb index ac69c66d..70ab5d28 100644 --- a/lib/racc/info.rb +++ b/lib/racc/info.rb @@ -7,5 +7,5 @@ module Racc VERSION = '1.4.13' - Copyright = 'Copyright (c) 1999-2006 Minero Aoki' + COPYRIGHT = 'Copyright (c) 1999-2006 Minero Aoki' end From f3cbaa51c21d86d012e069af52582bd5cae12574 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 24 Nov 2015 16:01:30 +0200 Subject: [PATCH 312/619] Bump version to 2.0.0-dev, add codename --- bin/racc | 8 ++------ lib/racc/info.rb | 3 ++- lib/racc/parser_file_generator.rb | 4 ++-- test/regress/bibtex | 4 ++-- test/regress/cadenza | 4 ++-- test/regress/cast | 4 ++-- test/regress/csspool | 4 ++-- test/regress/edtf | 4 ++-- test/regress/huia | 4 ++-- test/regress/journey | 4 ++-- test/regress/liquor | 4 ++-- test/regress/machete | 4 ++-- test/regress/mediacloth | 4 ++-- test/regress/namae | 4 ++-- test/regress/nasl | 4 ++-- test/regress/nokogiri-css | 4 ++-- test/regress/opal | 4 ++-- test/regress/php_serialization | 4 ++-- test/regress/rdblockparser | 4 ++-- test/regress/rdinlineparser | 4 ++-- test/regress/riml | 4 ++-- test/regress/ruby18 | 4 ++-- test/regress/ruby22 | 4 ++-- test/regress/twowaysql | 4 ++-- 24 files changed, 48 insertions(+), 51 deletions(-) diff --git a/bin/racc b/bin/racc index eac899f5..3521bbd4 100755 --- a/bin/racc +++ b/bin/racc @@ -75,12 +75,8 @@ def main profiler = RaccProfiler.new(true) } parser.on('--version', 'Prints version and quits.') { - puts "racc version #{Racc::VERSION}" - if Racc::Parser.racc_runtime_type == 'ruby' - puts '(ruby core)' - else - puts '(c core)' - end + core = Racc::Parser.racc_runtime_type == 'ruby' ? '(ruby core)' : '(c core)' + puts "racc #{Racc::VERSION}, codename: #{Racc::CODENAME} #{core}" exit 0 } parser.on('--copyright', 'Prints copyright and quits.') { diff --git a/lib/racc/info.rb b/lib/racc/info.rb index 70ab5d28..11bdc048 100644 --- a/lib/racc/info.rb +++ b/lib/racc/info.rb @@ -6,6 +6,7 @@ # For details of the GNU LGPL, see the file "COPYING". module Racc - VERSION = '1.4.13' + VERSION = '2.0.0-dev' + CODENAME = 'Mecha Oishii' COPYRIGHT = 'Copyright (c) 1999-2006 Minero Aoki' end diff --git a/lib/racc/parser_file_generator.rb b/lib/racc/parser_file_generator.rb index b12da009..126bc71a 100644 --- a/lib/racc/parser_file_generator.rb +++ b/lib/racc/parser_file_generator.rb @@ -119,8 +119,8 @@ def shebang(path) def notice line %q[#] line %q[# DO NOT MODIFY!!!!] - line %Q[# This file is automatically generated by Racc #{Racc::VERSION}] - line %Q[# from Racc grammar file "#{@params.filename}".] + line %Q[# This file was automatically generated by Racc #{Racc::VERSION}] + line %Q[# (codename: #{Racc::CODENAME}) from Racc grammar file "#{@params.filename}".] line %q[#] end diff --git a/test/regress/bibtex b/test/regress/bibtex index dff6f301..82d943e6 100644 --- a/test/regress/bibtex +++ b/test/regress/bibtex @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "bibtex.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "bibtex.y". # require 'racc/parser.rb' diff --git a/test/regress/cadenza b/test/regress/cadenza index f0c668d1..aaffacdc 100644 --- a/test/regress/cadenza +++ b/test/regress/cadenza @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "cadenza.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "cadenza.y". # require 'racc/parser.rb' diff --git a/test/regress/cast b/test/regress/cast index 74412425..f11f2026 100644 --- a/test/regress/cast +++ b/test/regress/cast @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "cast.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "cast.y". # require 'racc/parser.rb' diff --git a/test/regress/csspool b/test/regress/csspool index f0b70461..7c6ee5ba 100644 --- a/test/regress/csspool +++ b/test/regress/csspool @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "csspool.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "csspool.y". # require 'racc/parser.rb' diff --git a/test/regress/edtf b/test/regress/edtf index 20a6076d..38af5e52 100644 --- a/test/regress/edtf +++ b/test/regress/edtf @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "edtf.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "edtf.y". # require 'racc/parser.rb' diff --git a/test/regress/huia b/test/regress/huia index 6c980d26..7ea9ac74 100644 --- a/test/regress/huia +++ b/test/regress/huia @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "huia.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "huia.y". # require 'racc/parser.rb' diff --git a/test/regress/journey b/test/regress/journey index 87d91ff1..b1c8257e 100644 --- a/test/regress/journey +++ b/test/regress/journey @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "journey.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "journey.y". # require 'racc/parser.rb' diff --git a/test/regress/liquor b/test/regress/liquor index 8b16f3bd..10230482 100644 --- a/test/regress/liquor +++ b/test/regress/liquor @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "liquor.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "liquor.y". # require 'racc/parser.rb' diff --git a/test/regress/machete b/test/regress/machete index 9f1767f8..0d4047d6 100644 --- a/test/regress/machete +++ b/test/regress/machete @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "machete.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "machete.y". # require 'racc/parser.rb' diff --git a/test/regress/mediacloth b/test/regress/mediacloth index 16ead8c7..f50d5482 100644 --- a/test/regress/mediacloth +++ b/test/regress/mediacloth @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "mediacloth.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "mediacloth.y". # require 'racc/parser.rb' diff --git a/test/regress/namae b/test/regress/namae index 9e58dd73..a9071dd6 100644 --- a/test/regress/namae +++ b/test/regress/namae @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "namae.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "namae.y". # require 'racc/parser.rb' diff --git a/test/regress/nasl b/test/regress/nasl index 39aafff1..fe028ccf 100644 --- a/test/regress/nasl +++ b/test/regress/nasl @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "nasl.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "nasl.y". # require 'racc/parser.rb' diff --git a/test/regress/nokogiri-css b/test/regress/nokogiri-css index 75eaa45b..2e715094 100644 --- a/test/regress/nokogiri-css +++ b/test/regress/nokogiri-css @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "nokogiri-css.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "nokogiri-css.y". # require 'racc/parser.rb' diff --git a/test/regress/opal b/test/regress/opal index 6c84c828..ac3304df 100644 --- a/test/regress/opal +++ b/test/regress/opal @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "opal.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "opal.y". # require 'racc/parser.rb' diff --git a/test/regress/php_serialization b/test/regress/php_serialization index a75a9e12..db24498e 100644 --- a/test/regress/php_serialization +++ b/test/regress/php_serialization @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "php_serialization.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "php_serialization.y". # require 'racc/parser.rb' diff --git a/test/regress/rdblockparser b/test/regress/rdblockparser index d5e70f92..177a2a29 100644 --- a/test/regress/rdblockparser +++ b/test/regress/rdblockparser @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "rdblockparser.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "rdblockparser.y". # require 'racc/parser.rb' diff --git a/test/regress/rdinlineparser b/test/regress/rdinlineparser index 80d6f967..0d7a3e80 100644 --- a/test/regress/rdinlineparser +++ b/test/regress/rdinlineparser @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "rdinlineparser.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "rdinlineparser.y". # require 'racc/parser.rb' diff --git a/test/regress/riml b/test/regress/riml index 31f430af..6fcc3801 100644 --- a/test/regress/riml +++ b/test/regress/riml @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "riml.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "riml.y". # require 'racc/parser.rb' diff --git a/test/regress/ruby18 b/test/regress/ruby18 index eaee890d..64b4822a 100644 --- a/test/regress/ruby18 +++ b/test/regress/ruby18 @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "ruby18.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "ruby18.y". # require 'racc/parser.rb' diff --git a/test/regress/ruby22 b/test/regress/ruby22 index 8e3395b3..5fd7c055 100644 --- a/test/regress/ruby22 +++ b/test/regress/ruby22 @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "ruby22.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "ruby22.y". # require 'racc/parser.rb' diff --git a/test/regress/twowaysql b/test/regress/twowaysql index 7724c1c9..822b9ec6 100644 --- a/test/regress/twowaysql +++ b/test/regress/twowaysql @@ -1,7 +1,7 @@ # # DO NOT MODIFY!!!! -# This file is automatically generated by Racc 1.4.13 -# from Racc grammar file "twowaysql.y". +# This file was automatically generated by Racc 2.0.0-dev +# (codename: Mecha Oishii) from Racc grammar file "twowaysql.y". # require 'racc/parser.rb' From 60d4193ab920c2660e8ee0ee8326d2bacf2bdfa5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 24 Nov 2015 16:22:48 +0200 Subject: [PATCH 313/619] Add regression test case based on parser.y from mof gem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From the author, Klaus Kämpf (when asked whether he objects to the grammar being used in our test suite): no, not at all. The license explicitly allows you to do that. Thanks for asking! --- Manifest.txt | 2 + test/assets/mof.y | 649 +++++++++++++++++++ test/regress/mof | 1294 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 8 + 4 files changed, 1953 insertions(+) create mode 100644 test/assets/mof.y create mode 100644 test/regress/mof diff --git a/Manifest.txt b/Manifest.txt index a897582c..0593dc07 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -69,6 +69,7 @@ test/assets/machete.y test/assets/macruby.y test/assets/mediacloth.y test/assets/mailp.y +test/assets/mof.y test/assets/namae.y test/assets/nasl.y test/assets/newsyn.y @@ -112,6 +113,7 @@ test/regress/huia test/regress/liquor test/regress/machete test/regress/mediacloth +test/regress/mof test/regress/namae test/regress/nasl test/regress/nokogiri-css diff --git a/test/assets/mof.y b/test/assets/mof.y new file mode 100644 index 00000000..1adc5ade --- /dev/null +++ b/test/assets/mof.y @@ -0,0 +1,649 @@ +# Distributed under the Ruby license +# See http://www.ruby-lang.org/en/LICENSE.txt for the full license text +# Copyright (c) 2010 Klaus Kämpf + +/* + * According to appendix A of + * http://www.dmtf.org/standards/cim/cim_spec_v22 + */ + +class MOF::Parser + prechigh +/* nonassoc UMINUS */ + left '*' '/' + left '+' '-' + preclow + + token PRAGMA INCLUDE IDENTIFIER CLASS ASSOCIATION INDICATION + AMENDED ENABLEOVERRIDE DISABLEOVERRIDE RESTRICTED TOSUBCLASS TOINSTANCE + TRANSLATABLE QUALIFIER SCOPE SCHEMA PROPERTY REFERENCE + METHOD PARAMETER FLAVOR INSTANCE + AS REF ANY OF + DT_VOID + DT_UINT8 DT_SINT8 DT_UINT16 DT_SINT16 DT_UINT32 DT_SINT32 + DT_UINT64 DT_SINT64 DT_REAL32 DT_REAL64 DT_CHAR16 DT_STR + DT_BOOLEAN DT_DATETIME + positiveDecimalValue + stringValue + realValue + charValue + booleanValue + nullValue + binaryValue + octalValue + decimalValue + hexValue + +rule + + /* Returns a Hash of filename and MofResult */ + mofSpecification + : /* empty */ + { result = Hash.new } + | mofProduction + { result = { @name => @result } } + | mofSpecification mofProduction + { result = val[0] + result[@name] = @result + } + ; + + mofProduction + : compilerDirective + | classDeclaration + { #puts "Class '#{val[0].name}'" + @result.classes << val[0] + } + | qualifierDeclaration + { @result.qualifiers << val[0] + @qualifiers[val[0].name.downcase] = val[0] + } + | instanceDeclaration + { @result.instances << val[0] } + ; + +/*** + * compilerDirective + * + */ + + compilerDirective + : "#" PRAGMA INCLUDE pragmaParameters_opt + { raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#pragma include'") unless val[3] + open val[3], :pragma + } + | "#" PRAGMA pragmaName pragmaParameters_opt + | "#" INCLUDE pragmaParameters_opt + { raise StyleError.new(@name,@lineno,@line,"Use '#pragma include' instead of '#include'") unless @style == :wmi + raise MOF::Helper::Error.new(@name,@lineno,@line,"Missing filename after '#include'") unless val[2] + open val[2], :pragma + } + ; + + pragmaName + : IDENTIFIER + ; + + pragmaParameters_opt + : /* empty */ + { raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi } + | "(" pragmaParameterValues ")" + { result = val[1] } + ; + + pragmaParameterValues + : pragmaParameterValue + | pragmaParameterValues "," pragmaParameterValue + ; + + pragmaParameterValue + : string + | integerValue + { raise StyleError.new(@name,@lineno,@line,"#pragma parameter missing") unless @style == :wmi } + | IDENTIFIER + ; + +/*** + * classDeclaration + * + */ + + classDeclaration + : qualifierList_opt CLASS className alias_opt superClass_opt "{" classFeatures "}" ";" + { qualifiers = val[0] + features = val[6] + # FIXME: features must not include references + result = CIM::Class.new(val[2],qualifiers,val[3],val[4],features) + } + ; + + classFeatures + : /* empty */ + { result = [] } + | classFeatures classFeature + { result = val[0] << val[1] } + ; + + classFeature + : propertyDeclaration + | methodDeclaration + | referenceDeclaration /* must have association qualifier */ + ; + + + qualifierList_opt + : /* empty */ + | qualifierList + { result = CIM::QualifierSet.new val[0] } + ; + + qualifierList + : "[" qualifier qualifiers "]" + { result = val[2] + result.unshift val[1] if val[1] } + ; + + qualifiers + : /* empty */ + { result = [] } + | qualifiers "," qualifier + { result = val[0] + result << val[2] if val[2] + } + ; + + qualifier + : qualifierName qualifierParameter_opt flavor_opt + { # Get qualifier decl + qualifier = case val[0] + when CIM::Qualifier then val[0].definition + when CIM::QualifierDeclaration then val[0] + when String then @qualifiers[val[0].downcase] + else + nil + end + raise MOF::Helper::Error.new(@name,@lineno,@line,"'#{val[0]}' is not a valid qualifier") unless qualifier + value = val[1] + raise MOF::Helper::Error.new(@name,@lineno,@line,"#{value.inspect} does not match qualifier type '#{qualifier.type}'") unless qualifier.type.matches?(value)||@style == :wmi + # Don't propagate a boolean 'false' + if qualifier.type == :boolean && value == false + result = nil + else + result = CIM::Qualifier.new(qualifier,value,val[2]) + end + } + ; + + flavor_opt + : /* empty */ + | ":" flavor + { result = CIM::QualifierFlavors.new val[1] } + ; + + qualifierParameter_opt + : /* empty */ + | qualifierParameter + ; + + qualifierParameter + : "(" constantValue ")" + { result = val[1] } + | arrayInitializer + ; + + /* CIM::Flavors */ + flavor + : AMENDED | ENABLEOVERRIDE | DISABLEOVERRIDE | RESTRICTED | TOSUBCLASS | TRANSLATABLE | TOINSTANCE + { case val[0].to_sym + when :amended, :toinstance + raise StyleError.new(@name,@lineno,@line,"'#{val[0]}' is not a valid flavor") unless @style == :wmi + end + } + ; + + alias_opt + : /* empty */ + | alias + ; + + superClass_opt + : /* empty */ + | superClass + ; + + className + : IDENTIFIER /* must be _ in CIM v2.x */ + { raise ParseError.new("Class name must be prefixed by '_'") unless val[0].include?("_") || @style == :wmi } + ; + + alias + : AS aliasIdentifier + { result = val[1] } + ; + + aliasIdentifier + : "$" IDENTIFIER /* NO whitespace ! */ + { result = val[1] } + ; + + superClass + : ":" className + { result = val[1] } + ; + + + propertyDeclaration + : qualifierList_opt dataType propertyName array_opt defaultValue_opt ";" + { if val[3] + type = CIM::Array.new val[3],val[1] + else + type = val[1] + end + result = CIM::Property.new(type,val[2],val[0],val[4]) + } + ; + + referenceDeclaration + : qualifierList_opt objectRef referenceName array_opt defaultValue_opt ";" + { if val[4] + raise StyleError.new(@name,@lineno,@line,"Array not allowed in reference declaration") unless @style == :wmi + end + result = CIM::Reference.new(val[1],val[2],val[0],val[4]) } + ; + + methodDeclaration + : qualifierList_opt dataType methodName "(" parameterList_opt ")" ";" + { result = CIM::Method.new(val[1],val[2],val[0],val[4]) } + ; + + propertyName + : IDENTIFIER + | PROPERTY + { # tmplprov.mof has 'string Property;' + raise StyleError.new(@name,@lineno,@line,"Invalid keyword '#{val[0]}' used for property name") unless @style == :wmi + } + ; + + referenceName + : IDENTIFIER + | INDICATION + { result = "Indication" } + ; + + methodName + : IDENTIFIER + ; + + dataType + : DT_UINT8 + | DT_SINT8 + | DT_UINT16 + | DT_SINT16 + | DT_UINT32 + | DT_SINT32 + | DT_UINT64 + | DT_SINT64 + | DT_REAL32 + | DT_REAL64 + | DT_CHAR16 + | DT_STR + | DT_BOOLEAN + | DT_DATETIME + | DT_VOID + { raise StyleError.new(@name,@lineno,@line,"'void' is not a valid datatype") unless @style == :wmi } + ; + + objectRef + : className + { # WMI uses class names as data types (without REF ?!) + raise StyleError.new(@name,@lineno,@line,"Expected 'ref' keyword after classname '#{val[0]}'") unless @style == :wmi + result = CIM::ReferenceType.new val[0] + } + + | className REF + { result = CIM::ReferenceType.new val[0] } + ; + + parameterList_opt + : /* empty */ + | parameterList + ; + + parameterList + : parameter parameters + { result = val[1].unshift val[0] } + ; + + parameters + : /* empty */ + { result = [] } + | parameters "," parameter + { result = val[0] << val[2] } + ; + + parameter + : qualifierList_opt typespec parameterName array_opt parameterValue_opt + { if val[3] + type = CIM::Array.new val[3], val[1] + else + type = val[1] + end + result = CIM::Property.new(type,val[2],val[0]) + } + ; + + typespec + : dataType + | objectRef + ; + + parameterName + : IDENTIFIER + ; + + array_opt + : /* empty */ + | array + ; + + parameterValue_opt + : /* empty */ + | defaultValue + { raise "Default parameter value not allowed in syntax style '{@style}'" unless @style == :wmi } + ; + + array + : "[" positiveDecimalValue_opt "]" + { result = val[1] } + ; + + positiveDecimalValue_opt + : /* empty */ + { result = -1 } + | positiveDecimalValue + ; + + defaultValue_opt + : /* empty */ + | defaultValue + ; + + defaultValue + : "=" initializer + { result = val[1] } + ; + + initializer + : constantValue + | arrayInitializer + | referenceInitializer + ; + + arrayInitializer + : "{" constantValues "}" + { result = val[1] } + ; + + constantValues + : /* empty */ + | constantValue + { result = [ val[0] ] } + | constantValues "," constantValue + { result = val[0] << val[2] } + ; + + constantValue + : integerValue + | realValue + | charValue + | string + | booleanValue + | nullValue + | instance + { raise "Instance as property value not allowed in syntax style '{@style}'" unless @style == :wmi } + ; + + integerValue + : binaryValue + | octalValue + | decimalValue + | positiveDecimalValue + | hexValue + ; + + string + : stringValue + | string stringValue + { result = val[0] + val[1] } + ; + + referenceInitializer + : objectHandle + | aliasIdentifier + ; + + objectHandle + : namespace_opt modelPath + ; + + namespace_opt + : /* empty */ + | namespaceHandle ":" + ; + + namespaceHandle + : IDENTIFIER + ; + + /* + * Note + : structure depends on type of namespace + */ + + modelPath + : className "." keyValuePairList + ; + + keyValuePairList + : keyValuePair keyValuePairs + ; + + keyValuePairs + : /* empty */ + | keyValuePairs "," keyValuePair + ; + + keyValuePair + : keyname "=" initializer + ; + + keyname + : propertyName | referenceName + ; + +/*** + * qualifierDeclaration + * + */ + + qualifierDeclaration + /* 0 1 2 3 4 */ + : QUALIFIER qualifierName qualifierType scope defaultFlavor_opt ";" + { result = CIM::QualifierDeclaration.new( val[1], val[2][0], val[2][1], val[3], val[4]) } + ; + + defaultFlavor_opt + : /* empty */ + | defaultFlavor + ; + + qualifierName + : IDENTIFIER + | ASSOCIATION /* meta qualifier */ + | INDICATION /* meta qualifier */ + | REFERENCE /* Added in DSP0004 2.7.0 */ + | SCHEMA + ; + + /* [type, value] */ + qualifierType + : ":" dataType array_opt defaultValue_opt + { type = val[2].nil? ? val[1] : CIM::Array.new(val[2],val[1]) + result = [ type, val[3] ] + } + ; + + scope + : "," SCOPE "(" metaElements ")" + { result = CIM::QualifierScopes.new(val[3]) } + ; + + metaElements + : metaElement + { result = [ val[0] ] } + | metaElements "," metaElement + { result = val[0] << val[2] } + ; + + metaElement + : SCHEMA + | CLASS + | ASSOCIATION + | INDICATION + | QUALIFIER + | PROPERTY + | REFERENCE + | METHOD + | PARAMETER + | ANY + ; + + defaultFlavor + : "," FLAVOR "(" flavors ")" + { result = CIM::QualifierFlavors.new val[3] } + ; + + flavors + : flavor + { result = [ val[0] ] } + | flavors "," flavor + { result = val[0] << val[2] } + ; + +/*** + * instanceDeclaration + * + */ + + instanceDeclaration + : instance ";" + ; + + instance + : qualifierList_opt INSTANCE OF className alias_opt "{" valueInitializers "}" + ; + + valueInitializers + : valueInitializer + | valueInitializers valueInitializer + ; + + valueInitializer + : qualifierList_opt keyname "=" initializer ";" + | qualifierList_opt keyname ";" + { raise "Instance property '#{val[1]} must have a value" unless @style == :wmi } + ; + +end # class Parser + +---- header ---- + +# parser.rb - generated by racc + +require 'strscan' +require 'rubygems' +require 'cim' +require File.join(File.dirname(__FILE__), 'result') +require File.join(File.dirname(__FILE__), 'scanner') +require File.join(File.dirname(__FILE__), 'helper') + +---- inner ---- + +# +# Initialize MOF::Parser +# MOF::Parser.new options = {} +# +# options -> Hash of options +# :debug -> boolean +# :includes -> array of include dirs +# :style -> :cim or :wmi +# +def initialize options = {} + @yydebug = options[:debug] + @includes = options[:includes] || [] + @quiet = options[:quiet] + @style = options[:style] || :cim # default to style CIM v2.2 syntax + + @lineno = 1 + @file = nil + @iconv = nil + @eol = "\n" + @fname = nil + @fstack = [] + @in_comment = false + @seen_files = [] + @qualifiers = {} +end + +# +# Make options hash from argv +# +# returns [ files, options ] +# + + def self.argv_handler name, argv + files = [] + options = { :namespace => "" } + while argv.size > 0 + case opt = argv.shift + when "-h" + $stderr.puts "Ruby MOF compiler" + $stderr.puts "#{name} [-h] [-d] [-I ] []" + $stderr.puts "Compiles " + $stderr.puts "\t-d debug" + $stderr.puts "\t-h this help" + $stderr.puts "\t-I include dir" + $stderr.puts "\t-f force" + $stderr.puts "\t-n " + $stderr.puts "\t-o " + $stderr.puts "\t-s + + + + <% @states.each do |state| %> +

<% print_state_title(state) %>

+ +

+ <% + state.core.each do |ptr| + print_loc_ptr_as_tr(ptr) + end + %> +

+ + <% unless state.shortest_detailed_path.empty? %>

+ This state can be reached from the start state by:
+ <% print_shortest_path(state) %>
+

<% end %> + +

+ <% if state.action.empty? %> + From here, we <% print_action_phrase(state.defact) %> regardless of what token + comes next.
+ <% if state.defact.is_a?(Reduce) %> + <% print_state_links(@states.possible_reduce_destinations(state, state.defact.rule)) %> + <% end %> + <% else %> + Action table:
+ <% print_action_table(state) %>
+ <% end %> +

+
+ <% end %> + + + + END + end +end \ No newline at end of file From 191fc95c8ca53f633ba1b1187bcb9d9db9c02496 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 4 Dec 2015 10:19:58 +0200 Subject: [PATCH 513/619] Format of error message when -o is missing --- bin/racc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/racc b/bin/racc index 0588af04..eb1570c1 100755 --- a/bin/racc +++ b/bin/racc @@ -106,8 +106,9 @@ def main if output_file.nil? output_file = make_filename(input, '.rb') if File.exist?(output_file) - $stderr.puts "'#{output_file}' already exists. Please use '-o " \ - "#{output_file}' if you are sure that you want to overwrite this file." + $stderr.puts "#{red('Error: ')}'#{output_file}' already exists. " \ + "Please use '-o #{output_file}' if you are sure that you want to " \ + "overwrite this file." exit 1 end end From 2aab45b5af9529185d7116dde9e2645cf1598a83 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 07:57:52 +0200 Subject: [PATCH 514/619] Add pry as a development dependency --- Gemfile | 1 + Rakefile | 1 + 2 files changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 2efc0f29..8e16233c 100644 --- a/Gemfile +++ b/Gemfile @@ -16,5 +16,6 @@ gem "hoe-git", "~>1.6", :group => [:development, :test] gem "hoe-gemspec", "~>1.0", :group => [:development, :test] gem "hoe-bundler", "~>1.2", :group => [:development, :test] gem "rubocop", "~>0.34", :group => [:development, :test] +gem "pry", "~>0.10", :group => [:development, :test] # vim: syntax=ruby diff --git a/Rakefile b/Rakefile index 8fa1a9a0..8f7a4160 100644 --- a/Rakefile +++ b/Rakefile @@ -35,6 +35,7 @@ HOE = Hoe.spec 'racc' do dependency 'hoe-bundler', '~> 1.2', :developer dependency 'rubocop', '~> 0.34', :developer + dependency 'pry', '~> 0.10', :developer if java? self.spec_extras[:platform] = 'java' From 4fd88dab23c4503ddcb952c438517a4973219a72 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 08:31:42 +0200 Subject: [PATCH 515/619] Add 'pry' task to open REPL --- Rakefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 8f7a4160..ee0ffda1 100644 --- a/Rakefile +++ b/Rakefile @@ -6,7 +6,8 @@ require 'hoe' gem 'rake-compiler', '>= 0.4.1' Hoe.plugin :debugging, :doofus, :git, :gemspec, :bundler -$: << '.' # instead of require_relative for 1.8 compatibility + +$:.unshift(File.dirname(__FILE__) + '/lib') def java? /java/ === RUBY_PLATFORM @@ -44,7 +45,6 @@ HOE = Hoe.spec 'racc' do end self.clean_globs << "lib/#{self.name}/*.{so,bundle,dll,jar}" # from hoe/compiler - end def add_file_to_gem relative_path @@ -85,7 +85,6 @@ unless jruby? end task :compile => 'lib/racc/parser-text.rb' - # else # JRUBY require "rake/javaextensiontask" @@ -120,6 +119,15 @@ RuboCop::RakeTask.new(:rubocop) do |task| task.options = ['-a', '-D'] end +task :pry, [:grammar_file] do |t, args| + require 'pry' + require 'racc' + require 'racc/grammar_file_parser' + puts "Parsing #{args[:grammar_file]}" + grammar = Racc::GrammarFileParser.parse_file(args[:grammar_file]).grammar + grammar.pry +end + Hoe.add_include_dirs('.:lib/racc') rule '.rb' => '.rl' do |t| From fa9ea6af112b4437de76cb2cfdd9934d7076e4bd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 08:32:16 +0200 Subject: [PATCH 516/619] Fix display of 'shortest path to each parser state' The algorithm used had a bug which resulted in a sometimes-incorrect display of the shortest parser actions which could lead to each parser state. --- lib/racc/directed_graph.rb | 2 +- lib/racc/grammar.rb | 26 +++++++++++++ lib/racc/state.rb | 77 ++++++++++++++++++-------------------- 3 files changed, 64 insertions(+), 41 deletions(-) diff --git a/lib/racc/directed_graph.rb b/lib/racc/directed_graph.rb index 83ac6ac9..f0b821c5 100644 --- a/lib/racc/directed_graph.rb +++ b/lib/racc/directed_graph.rb @@ -278,7 +278,7 @@ def shortest_vector_paths node_path = paths[node] vectors(node) do |label, child| child_path = paths[child] - cost = block_given? ? yield(node, child) : 1 + cost = block_given? ? yield(label) : 1 if child_path.nil? || child_path[0] > node_path[0] + cost paths[child] = node_path.dup.tap { |p| p[0] += cost } << label end diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 4a8321ec..8c73ec8b 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -245,6 +245,32 @@ def nullable_symbols Sym.set_closure(@symbols.select { |nt| nt.heads.any?(&:reduce?) }) end + # What is the shortest series of terminals which can reduce to each NT? + def shortest_productions + @shortest_productions ||= begin + # nullable symbols can expand to... nothing + # terminals just map to themselves + result = Hash[nullable_symbols.map { |sym| [sym, []] } + + terminals.map { |t| [t, [t]] }] + + worklist = result.keys + while sym = worklist.shift + sym.locate.each do |ptr| + target = ptr.rule.target + rules = target.heads.map(&:rule) + rules.reject! { |r| r.symbols.any? { |rs| !result.key?(rs) }} + next if rules.empty? + best = rules.map { |r| r.symbols.flat_map { |rs| result[rs] }}.min_by(&:size) + if !result.key?(target) || best.size < result[target].size + result[target] = best + worklist.push(target) + end + end + end + result + end + end + private def add_start_rule diff --git a/lib/racc/state.rb b/lib/racc/state.rb index e97d543c..fd898dbf 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -412,74 +412,71 @@ def warnings(warnings, verbose = false) warnings end - def summarized_transition_graph + def transition_graph # this graph does not have vectors for reduce operations -- rather, # the nodes where the reduces go to have vectors for the reduced NTs - @stgraph ||= each_with_object(Graph::Labeled.new(size)) do |s, graph| + @tgraph ||= each_with_object(Graph::Labeled.new(size)) do |s, graph| s.gotos.each do |tok, goto| graph.add_vector(s.ident, goto.to_state.ident, tok) end end.tap { |graph| graph.start = 0 } end + # Like `transition_graph`, but rather than vectors labeled with NTs, we + # have vectors labeled with the shortest series of terminals and reduce + # operations which could take us through the same transition def detailed_transition_graph - # this graph does not have vectors for 'gotos' -- rather, the vectors - # run from nodes where a reduce is initiated, to the nodes where the - # 'gotos' could reach after reducing - @dtgraph ||= begin - graph = Graph::Labeled.new(size) - - each do |s| - s.action.each do |tok, act| - next unless act.is_a?(Shift) - graph.add_vector(s.ident, act.goto_state.ident, tok) - end - end - - # now add vectors for reduces - reduce_vectors = Set.new - add_reduce_vectors = proc do |s, act| - possible_reduce_destinations(s, act.rule).each do |dest| - label = ReduceStep.new(s, dest, act.rule, act.rule.target) - reduce_vectors << [s.ident, dest.ident, label] + @dtgraph ||= each_with_object(Graph::Labeled.new(size)) do |s, graph| + s.gotos.each do |tok, goto| + path = if tok.terminal? + [tok] + else + actions_to_reach_reduce(s.ident, tok) end + graph.add_vector(s.ident, goto.to_state.ident, path) end + end.tap { |graph| graph.start = 0 } + end - each do |s| - s.action.each do |tok, act| - next unless act.is_a?(Reduce) - add_reduce_vectors[s, act] - end - if s.defact.is_a?(Reduce) - add_reduce_vectors[s, s.defact] - end - # defact could also be Accept or Error... - end + # What series of shifts/reduces can produce `target`, starting from state + # `state_idx`? + def actions_to_reach_reduce(state_idx, target) + rule = target.heads.map(&:rule).min_by do |r| + r.symbols.flat_map { |rs| @grammar.shortest_productions[rs] }.size + end - reduce_vectors.each do |from, to, label| - graph.add_vector(from, to, label) + actions, cur_state = [], state_idx + rule.symbols.each do |sym| + if sym.terminal? + actions << sym + else + actions.concat(actions_to_reach_reduce(cur_state, sym)) end - - graph.start = 0 - graph + cur_state = transition_graph[cur_state][sym] end + cur_state = transition_graph[state_idx][target] + + actions << ReduceStep.new(state_idx, cur_state, rule, target) end def shortest_summarized_paths - @shortest_spaths ||= summarized_transition_graph.shortest_vector_paths + @shortest_spaths ||= transition_graph.shortest_vector_paths end def shortest_detailed_paths - @shortest_dpaths ||= detailed_transition_graph.shortest_vector_paths + @shortest_dpaths ||= begin + paths = detailed_transition_graph.shortest_vector_paths(&:size) + Hash[paths.map { |state, steps| [state, steps.flatten] }] + end end def possible_reduce_destinations(state, rule) # after popping states off the stack and following the goto, # what states might we end up in? - sgraph = summarized_transition_graph + graph = transition_graph steps_back = rule.symbols.size dest_indices = steps_back.times.reduce([state.ident]) do |dsts, _| - dsts.map { |dst| sgraph.parents(dst) }.reduce(Set.new, &:merge) + dsts.map { |dst| graph.parents(dst) }.reduce(Set.new, &:merge) end dest_indices.map { |idx| self[idx].gotos[rule.target].to_state }.uniq end From b09058010ed9fcba017f236d52e62e7545842a14 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 08:50:12 +0200 Subject: [PATCH 517/619] Rename Sym#dummy? to Sym#generated? Each grammar has one symbol called the 'dummy' symbol. But, there was also a `Sym#dummy?` method which would return true for other symbols, too! Really, the point of this method is whether the symbol was automatically generated, or whether it appeared explicitly in the input file. So name the method accordingly. --- lib/racc/grammar.rb | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 8c73ec8b..dcd7490c 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -38,8 +38,8 @@ def initialize # 'dummy : start anchor . anchor' to be an 'accept state' @dummy = intern(:$start, true) - @anchor = intern(false, true) # Symbol ID = 0 - @error = intern(:error, false) # Symbol ID = 1 + @anchor = intern(false, true) # Symbol ID = 0 + @error = intern(:error, true) # Symbol ID = 1 end attr_reader :start @@ -67,11 +67,11 @@ def to_s "" end - def intern(val, dummy = false) + def intern(val, generated = false) if @closed @cache[val] || (raise "No such symbol: #{val}") else - @cache[val] ||= Sym.new(val, self, dummy).tap { |sym| @symbols.push(sym) } + @cache[val] ||= Sym.new(val, self, generated).tap { |sym| @symbols.push(sym) } end end @@ -191,7 +191,7 @@ def finished! @closed = true # if 'start' nonterminal was not explicitly set, just take the first one - @start ||= map(&:target).detect { |sym| !sym.dummy? } + @start ||= map(&:target).detect { |sym| !sym.generated? } fail CompileError, 'no rules in input' if @rules.empty? add_start_rule @@ -214,8 +214,7 @@ def useless_symbols raise 'Grammar not yet closed' unless @closed @useless_symbols ||= begin @symbols.select do |sym| - !sym.dummy? && - sym != @error && + !sym.generated? && sym != @start && (!sym.reachable.include?(@start) || !productive_symbols.include?(sym)) && none? { |rule| rule.explicit_precedence == sym } @@ -598,10 +597,10 @@ def ptr_bug! # A terminal or nonterminal symbol class Sym - def initialize(value, grammar, dummy) + def initialize(value, grammar, generated) @ident = nil @value = value - @dummy = dummy + @genned = generated @grammar = grammar @declared_terminal = false @@ -655,8 +654,8 @@ def self.set_closure(seed) end end - def dummy? - @dummy + def generated? + @genned end def terminal? From 1cd19a472658ec09e79239257bc2fd2851deb34a Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 09:00:49 +0200 Subject: [PATCH 518/619] All generated symbols aside from start, end, and error are hidden --- lib/racc/grammar.rb | 14 +++++++++----- lib/racc/grammar_file_parser.rb | 1 - lib/racc/state.rb | 2 +- lib/racc/state_summary_generator.rb | 8 ++++---- lib/racc/warning.rb | 12 ++++++------ 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index dcd7490c..4a2b4db8 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -443,7 +443,7 @@ def to_s end def display - rule = "#{@target} : #{@symbols.reject(&:hidden).map(&:to_s).join(' ')}" + rule = "#{@target} : #{@symbols.reject(&:hidden?).map(&:to_s).join(' ')}" if @precedence rule << ' ' << Color.explicit_prec('=' << @precedence.display_name) end @@ -561,12 +561,12 @@ def symbol def to_s result = "#{@rule.target} : " if @index > 0 - result << "#{@rule.symbols[0...@index].reject(&:hidden).map(&:to_s).join(' ')} ." + result << "#{@rule.symbols[0...@index].reject(&:hidden?).map(&:to_s).join(' ')} ." else result << '.' end unless reduce? - result << " #{rule.symbols[@index..-1].reject(&:hidden).map(&:to_s).join(' ')}" + result << " #{rule.symbols[@index..-1].reject(&:hidden?).map(&:to_s).join(' ')}" end if sym = @rule.explicit_precedence result << ' ' << Color.explicit_prec('=' << sym.display_name) @@ -624,7 +624,6 @@ def initialize(value, grammar, generated) @heads = [] # RHS of rules which can reduce to this Sym @locate = [] # all locations where this Sym appears on RHS of a rule - @hidden = false # don't show in diagnostic messages end attr_reader :value @@ -634,7 +633,6 @@ def initialize(value, grammar, generated) attr_accessor :display_name attr_accessor :precedence attr_accessor :assoc - attr_accessor :hidden # some tokens are written one way in the grammar, but the actual value # expected from the lexer is different @@ -658,6 +656,12 @@ def generated? @genned end + # Don't show in diagnostic messages... EXCEPT very technical diagnostics + # which show the internal parser states + def hidden? + @genned && @value != :$start && @value != false && @value != :error + end + def terminal? heads.empty? end diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index 98e5d8c7..57870f33 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -246,7 +246,6 @@ def add_rule(target, list, range, prec = nil) def embedded_action(act, target) sym = @grammar.intern("@#{@embedded_action_seq += 1}".to_sym, true) @grammar.add(Rule.new(sym, [], act)) - sym.hidden = true sym end diff --git a/lib/racc/state.rb b/lib/racc/state.rb index fd898dbf..8fde34d3 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -586,7 +586,7 @@ def shortest_detailed_path # sample sequence of terminals/reduces which would lead here # from start state (for diagnostics) @sdpath ||= @states.shortest_detailed_paths[@ident].reject do |step| - step.is_a?(ReduceStep) && step.symbol.hidden + step.is_a?(ReduceStep) && step.symbol.hidden? end end end diff --git a/lib/racc/state_summary_generator.rb b/lib/racc/state_summary_generator.rb index 4ee6dc15..f4e18c20 100644 --- a/lib/racc/state_summary_generator.rb +++ b/lib/racc/state_summary_generator.rb @@ -40,14 +40,14 @@ def print_loc_ptr_as_tr(ptr) print_symbol(rule.target) @output << ':' if ptr.index > 0 - rule.symbols[0...ptr.index].reject(&:hidden).each do |sym| + rule.symbols[0...ptr.index].reject(&:hidden?).each do |sym| print_symbol(sym) @output << ' ' end end @output << '. ' unless ptr.reduce? - rule.symbols[ptr.index..-1].reject(&:hidden).each do |sym| + rule.symbols[ptr.index..-1].reject(&:hidden?).each do |sym| print_symbol(sym) @output << ' ' end @@ -81,7 +81,7 @@ def print_overridden_rules(rules, action) def print_symbols(syms) syms.each do |sym| - next if sym.hidden + next if sym.hidden? @output << ' ' print_symbol(sym) end @@ -122,7 +122,7 @@ def print_shortest_path(state) print_symbols(stack) @output << '' else - rhs = step.rule.symbols.reject(&:hidden) + rhs = step.rule.symbols.reject(&:hidden?) reduced = rhs.size.times.map { stack.pop }.reverse stack << step.symbol diff --git a/lib/racc/warning.rb b/lib/racc/warning.rb index 9981568d..99eafb55 100644 --- a/lib/racc/warning.rb +++ b/lib/racc/warning.rb @@ -149,16 +149,16 @@ def initialize(conflict, grammar, verbose) def title "Shift/reduce conflict on #{@sym}," << - (@path.reject(&:hidden).empty? ? + (@path.reject(&:hidden?).empty? ? ' at the beginning of the parse.' : ' after the following input:') end def details - if @path.reject(&:hidden).empty? + if @path.reject(&:hidden?).empty? result = '' else - result = @path.reject(&:hidden).map(&:to_s).join(' ') << "\n" + result = @path.reject(&:hidden?).map(&:to_s).join(' ') << "\n" end result << "\nThe following rule#{'s' unless @srules.one?} " \ @@ -204,16 +204,16 @@ def initialize(conflict, grammar, verbose) def title "Reduce/reduce conflict on #{@sym}," << - (@path.reject(&:hidden).empty? ? + (@path.reject(&:hidden?).empty? ? ' at the beginning of the parse.' : ' after the following input:') end def details - if @path.reject(&:hidden).empty? + if @path.reject(&:hidden?).empty? result = '' else - result = @path.reject(&:hidden).map(&:to_s).join(' ') << "\n" + result = @path.reject(&:hidden?).map(&:to_s).join(' ') << "\n" end result << "\nIt is possible to reduce by " \ From 292b563cbc198b13d5ecb667c7e365c6b0849cc3 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 09:22:51 +0200 Subject: [PATCH 519/619] Names of generated symbols for embedded actions contain 'action' This should make it easier for people to make sense of what they are for. --- lib/racc/grammar_file_parser.rb | 2 +- test/regress/csspool.rb | 2 +- test/regress/mediacloth.rb | 2 +- test/regress/opal.rb | 46 ++++++++++++------------- test/regress/ruby18.rb | 46 ++++++++++++------------- test/regress/ruby22.rb | 60 ++++++++++++++++----------------- 6 files changed, 79 insertions(+), 79 deletions(-) diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index 57870f33..9cb30110 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -244,7 +244,7 @@ def add_rule(target, list, range, prec = nil) end def embedded_action(act, target) - sym = @grammar.intern("@#{@embedded_action_seq += 1}".to_sym, true) + sym = @grammar.intern("@action#{@embedded_action_seq += 1}".to_sym, true) @grammar.add(Rule.new(sym, [], act)) sym end diff --git a/test/regress/csspool.rb b/test/regress/csspool.rb index 7c6ee5ba..c5951108 100644 --- a/test/regress/csspool.rb +++ b/test/regress/csspool.rb @@ -641,7 +641,7 @@ def current_pos "$start", "document", "stylesheet", - "@1", + "@action1", "charset", "import", "namespace", diff --git a/test/regress/mediacloth.rb b/test/regress/mediacloth.rb index 0b9772d6..3a453a15 100644 --- a/test/regress/mediacloth.rb +++ b/test/regress/mediacloth.rb @@ -542,7 +542,7 @@ def next_token "row_contents", "list_item", "list_contents", - "@1", + "@action1", "dictionary_term", "dictionary_contents", "dictionary_definition", diff --git a/test/regress/opal.rb b/test/regress/opal.rb index ac3304df..65e3537f 100644 --- a/test/regress/opal.rb +++ b/test/regress/opal.rb @@ -4581,7 +4581,7 @@ class Parser < Racc::Parser "mrhs", "arg_value", "expr", - "@1", + "@action1", "arg", "command", "block_command", @@ -4619,7 +4619,7 @@ class Parser < Racc::Parser "block_arg", "call_args2", "open_args", - "@2", + "@action2", "literal", "strings", "xstring", @@ -4641,21 +4641,21 @@ class Parser < Racc::Parser "f_arglist", "singleton", "dot_or_colon", - "@3", - "@4", - "@5", - "@6", - "@7", - "@8", - "@9", - "@10", - "@11", - "@12", - "@13", - "@14", - "@15", - "@16", - "@17", + "@action3", + "@action4", + "@action5", + "@action6", + "@action7", + "@action8", + "@action9", + "@action10", + "@action11", + "@action12", + "@action13", + "@action14", + "@action15", + "@action16", + "@action17", "f_larglist", "lambda_body", "block_param", @@ -4667,12 +4667,12 @@ class Parser < Racc::Parser "f_arg", "f_rest_arg", "do_block", - "@18", + "@action18", "operation3", - "@19", - "@20", + "@action19", + "@action20", "cases", - "@21", + "@action21", "exc_list", "exc_var", "numeric", @@ -4686,8 +4686,8 @@ class Parser < Racc::Parser "string_content", "qword_list", "string_dvar", - "@22", - "@23", + "@action22", + "@action23", "sym", "f_args", "kwrest_mark", diff --git a/test/regress/ruby18.rb b/test/regress/ruby18.rb index 60aff4a8..8fbf0d03 100644 --- a/test/regress/ruby18.rb +++ b/test/regress/ruby18.rb @@ -4432,7 +4432,7 @@ def default_encoding "mrhs", "arg_value", "expr", - "@1", + "@action1", "arg", "command", "block_command", @@ -4442,7 +4442,7 @@ def default_encoding "command_args", "cmd_brace_block", "opt_block_var", - "@2", + "@action2", "operation", "mlhs_basic", "mlhs_entry", @@ -4458,7 +4458,7 @@ def default_encoding "fsym", "symbol", "dsym", - "@3", + "@action3", "opt_nl", "primary", "none", @@ -4471,9 +4471,9 @@ def default_encoding "block_arg", "call_args2", "open_args", - "@4", - "@5", - "@6", + "@action4", + "@action5", + "@action6", "literal", "strings", "xstring", @@ -4494,26 +4494,26 @@ def default_encoding "f_arglist", "singleton", "dot_or_colon", - "@7", - "@8", - "@9", - "@10", - "@11", - "@12", - "@13", - "@14", - "@15", - "@16", - "@17", - "@18", - "@19", + "@action7", + "@action8", + "@action9", + "@action10", + "@action11", + "@action12", + "@action13", + "@action14", + "@action15", + "@action16", + "@action17", + "@action18", + "@action19", "block_par", "block_var", "do_block", - "@20", + "@action20", "operation3", - "@21", - "@22", + "@action21", + "@action22", "when_args", "cases", "exc_list", @@ -4528,7 +4528,7 @@ def default_encoding "string_content", "qword_list", "string_dvar", - "@23", + "@action23", "f_args", "f_arg", "f_optarg", diff --git a/test/regress/ruby22.rb b/test/regress/ruby22.rb index c4a17f97..5aeca736 100644 --- a/test/regress/ruby22.rb +++ b/test/regress/ruby22.rb @@ -4765,7 +4765,7 @@ def default_encoding "mrhs", "mrhs_arg", "expr", - "@1", + "@action1", "opt_nl", "arg", "command", @@ -4777,7 +4777,7 @@ def default_encoding "cmd_brace_block", "opt_block_param", "fcall", - "@2", + "@action2", "operation", "call_args", "mlhs_basic", @@ -4797,12 +4797,12 @@ def default_encoding "fsym", "symbol", "dsym", - "@3", + "@action3", "simple_numeric", "primary", "arg_value", - "@4", - "@5", + "@action4", + "@action5", "aref_args", "none", "args", @@ -4812,7 +4812,7 @@ def default_encoding "opt_paren_args", "opt_block_arg", "block_arg", - "@6", + "@action6", "literal", "strings", "xstring", @@ -4835,22 +4835,22 @@ def default_encoding "term", "f_arglist", "singleton", - "@7", - "@8", - "@9", - "@10", - "@11", - "@12", - "@13", - "@14", - "@15", - "@16", - "@17", - "@18", - "@19", - "@20", - "@21", - "@22", + "@action7", + "@action8", + "@action9", + "@action10", + "@action11", + "@action12", + "@action13", + "@action14", + "@action15", + "@action16", + "@action17", + "@action18", + "@action19", + "@action20", + "@action21", + "@action22", "f_marg", "f_norm_arg", "f_margs", @@ -4872,14 +4872,14 @@ def default_encoding "f_bad_arg", "f_larglist", "lambda_body", - "@23", - "@24", + "@action23", + "@action24", "f_args", "do_block", - "@25", + "@action25", "operation3", - "@26", - "@27", + "@action26", + "@action27", "cases", "exc_list", "exc_var", @@ -4896,10 +4896,10 @@ def default_encoding "qword_list", "qsym_list", "string_dvar", - "@28", - "@29", + "@action28", + "@action29", "args_tail", - "@30", + "@action30", "f_kwarg", "opt_args_tail", "f_optarg", From a8a60a58da2712743a6bce21b80efb10dff6e67b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 09:30:29 +0200 Subject: [PATCH 520/619] Compiler error for derivation rules for error symbol --- Manifest.txt | 2 ++ lib/racc/grammar.rb | 6 ++++++ test/assets/badrule3.y | 5 +++++ test/regress/badrule3.out | 2 ++ test/test_racc_command.rb | 5 +++++ 5 files changed, 20 insertions(+) create mode 100644 test/assets/badrule3.y create mode 100644 test/regress/badrule3.out diff --git a/Manifest.txt b/Manifest.txt index 9df82eb5..08681cdc 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -53,6 +53,7 @@ test/assets/badprec1.y test/assets/badprec2.y test/assets/badrule1.y test/assets/badrule2.y +test/assets/badrule3.y test/assets/badsyntax.y test/assets/bench.y test/assets/bibtex.y @@ -121,6 +122,7 @@ test/regress/badprec1.out test/regress/badprec2.out test/regress/badrule1.out test/regress/badrule2.out +test/regress/badrule3.out test/regress/badsyntax.out test/regress/bibtex.rb test/regress/cadenza.rb diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 4a2b4db8..7ff29efd 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -356,6 +356,12 @@ def check_rules Source::SparseLines.merge(same_rhs.map(&:source)).map(&:spifferific).join("\n\n") end end + + unless @error.heads.empty? + raise CompileError, "You cannot create rules for the error symbol:\n" << + Source::SparseLines.merge(@error.heads.map { |ptr| ptr.rule.source} ) + .map(&:spifferific).join("\n\n") + end end end diff --git a/test/assets/badrule3.y b/test/assets/badrule3.y new file mode 100644 index 00000000..e1ef3eb8 --- /dev/null +++ b/test/assets/badrule3.y @@ -0,0 +1,5 @@ +class A +rule + A : a b error + error: a b +end diff --git a/test/regress/badrule3.out b/test/regress/badrule3.out new file mode 100644 index 00000000..daced5fb --- /dev/null +++ b/test/regress/badrule3.out @@ -0,0 +1,2 @@ +Error: test/assets/badrule3.y: You cannot create rules for the error symbol: +badrule3.y:4: error: a b diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 75026845..24e4adc8 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -101,6 +101,11 @@ def test_badrule2_y assert_output_unchanged 'badrule2.out', '--color', err end + def test_badrule3_y + err = assert_error 'badrule3.y', '--color' + assert_output_unchanged 'badrule3.out', '--color', err + end + def test_not_lalr # grammars which are LR(1), but not LALR(1) err = assert_compile 'lr_not_lalr.y', '--color -v' From fa2e0e468505244df2bfa9bdf69f68cc5e2e8086 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 11:39:23 +0200 Subject: [PATCH 521/619] Introduce SparseLines.render --- lib/racc/grammar.rb | 17 +++++++---------- lib/racc/source.rb | 4 ++++ lib/racc/warning.rb | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 7ff29efd..dd6e567b 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -305,7 +305,7 @@ def check_terminals raise CompileError, "terminal#{'s' unless undeclared.one?} " \ "#{Racc.to_sentence(undeclared)} #{undeclared.one? ? 'was' : 'were'} " \ "not declared in a 'token' block:\n" << - Source::SparseLines.merge(locations.map(&:source)).map(&:spifferific).join("\n\n") + Source::SparseLines.render(locations.map(&:source)) end wrongly_declared = nonterminals.select(&:declared_as_terminal?) @@ -314,8 +314,7 @@ def check_terminals raise CompileError, "token#{'s' unless wrongly_declared.one?} " \ "#{Racc.to_sentence(wrongly_declared)} were declared in a 'token'" \ " block, but #{wrongly_declared.one? ? 'it also has' : 'they also have'}" \ - " derivation rules:\n" << - Source::SparseLines.merge(bad_rules.map(&:source)).map(&:spifferific).join("\n\n") + " derivation rules:\n" << Source::SparseLines.render(bad_rules.map(&:source)) end end @@ -323,8 +322,7 @@ def check_terminals unless bad_strings.empty? bad_rules = bad_strings.flat_map(&:heads).map(&:rule) raise CompileError, 'you may not create derivation rules for a ' \ - "string literal:\n" << - Source::SparseLines.merge(bad_rules.map(&:source)).map(&:spifferific).join("\n\n") + "string literal:\n" << Source::SparseLines.render(bad_rules.map(&:source)) end bad_prec = @symbols.select { |s| s.assoc && s.nonterminal? } @@ -334,7 +332,7 @@ def check_terminals "#{Racc.to_sentence(bad_prec)} appeared in a prechigh/preclow " \ "block, but #{bad_prec.one? ? 'it is not a' : 'they are not'} " \ "terminal#{'s' unless bad_prec.one?}:\n" << - Source::SparseLines.merge(bad_rules.map(&:source)).map(&:spifferific).join("\n\n") + Source::SparseLines.render(bad_rules.map(&:source)) end bad_prec = @rules.select do |rule| @@ -344,7 +342,7 @@ def check_terminals raise CompileError, "The following rule#{'s' unless bad_prec.one?} " \ "use#{'s' if bad_prec.one?} nonterminals for explicit precedence, " \ "which is not allowed:\n" << - Source::SparseLines.merge(bad_prec.map(&:source)).map(&:spifferific).join("\n\n") + Source::SparseLines.render(bad_prec.map(&:source)) end end @@ -353,14 +351,13 @@ def check_rules same_lhs.group_by(&:symbols).each_value do |same_rhs| next unless same_rhs.size > 1 raise CompileError, "The following rules are duplicates:\n" << - Source::SparseLines.merge(same_rhs.map(&:source)).map(&:spifferific).join("\n\n") + Source::SparseLines.render(same_rhs.map(&:source)) end end unless @error.heads.empty? raise CompileError, "You cannot create rules for the error symbol:\n" << - Source::SparseLines.merge(@error.heads.map { |ptr| ptr.rule.source} ) - .map(&:spifferific).join("\n\n") + Source::SparseLines.render(@error.heads.map { |ptr| ptr.rule.source} ) end end end diff --git a/lib/racc/source.rb b/lib/racc/source.rb index c16392ee..1e4663d4 100644 --- a/lib/racc/source.rb +++ b/lib/racc/source.rb @@ -228,6 +228,10 @@ def self.merge(sparse) end end + def self.render(sparse) + merge(sparse).map(&:spifferific).join("\n\n") + end + def spifferific cooked = @textobj.spiffier.lines.map(&:chomp) base_line = @textobj.lineno diff --git a/lib/racc/warning.rb b/lib/racc/warning.rb index 99eafb55..33b9e3b9 100644 --- a/lib/racc/warning.rb +++ b/lib/racc/warning.rb @@ -128,7 +128,7 @@ def details "When the next token is #{connective}#{Racc.to_sentence(tokens, 'or')}" \ ", it is overridden by #{rules.one? ? 'this' : 'these'} " \ "higher-precedence rule#{'s' unless rules.one?}:\n" << - Source::SparseLines.merge(rules.map(&:source)).map(&:spifferific).join("\n\n") + Source::SparseLines.render(rules.map(&:source)) end.join("\n\n") end From 7d109c49128b7f0744bc089ebe5f5b62ad7fa1d8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 11:44:26 +0200 Subject: [PATCH 522/619] Freeze digraphs after building (to avoid bugs) --- lib/racc/directed_graph.rb | 13 +++++++++++++ lib/racc/state.rb | 7 +++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/racc/directed_graph.rb b/lib/racc/directed_graph.rb index f0b821c5..df0c2566 100644 --- a/lib/racc/directed_graph.rb +++ b/lib/racc/directed_graph.rb @@ -143,6 +143,10 @@ def leaves def dup super.map!(&:dup) end + + def freeze + each(&:freeze) + end end # Like Graph::Finite, but with backpointers from children to parents as well @@ -293,6 +297,10 @@ def shortest_vector_paths def dup super.map!(&:dup) end + + def freeze + each(&:freeze) + end end # This implementation uses an object for each node, rather than identifying @@ -357,6 +365,11 @@ def leaves def node_caption(node) Color.without_color { node.ptr.to_s } end + + def freeze + super + @nodes.each(&:freeze) + end end class Node diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 8fde34d3..b6f6a9d8 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -142,6 +142,8 @@ def compute_lookahead end end end + look_past.freeze + # traverse graph with arrows connecting reductions which could occur # directly after another without shifting any terminal first (because the # reduced nonterminal is null) @@ -174,6 +176,7 @@ def compute_lookahead end end end + includes.freeze walk_graph(following_terminals, includes) @@ -419,7 +422,7 @@ def transition_graph s.gotos.each do |tok, goto| graph.add_vector(s.ident, goto.to_state.ident, tok) end - end.tap { |graph| graph.start = 0 } + end.tap { |graph| graph.start = 0 }.freeze end # Like `transition_graph`, but rather than vectors labeled with NTs, we @@ -435,7 +438,7 @@ def detailed_transition_graph end graph.add_vector(s.ident, goto.to_state.ident, path) end - end.tap { |graph| graph.start = 0 } + end.tap { |graph| graph.start = 0 }.freeze end # What series of shifts/reduces can produce `target`, starting from state From 147b992f69058dbd03bd0ef10784e0f70083757f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 11:54:30 +0200 Subject: [PATCH 523/619] Add regression test for HTML state summary (for csspool.y) --- Manifest.txt | 1 + test/helper.rb | 14 + test/regress/csspool.html | 7389 +++++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 1 + 4 files changed, 7405 insertions(+) create mode 100644 test/regress/csspool.html diff --git a/Manifest.txt b/Manifest.txt index 08681cdc..44ddeabc 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -127,6 +127,7 @@ test/regress/badsyntax.out test/regress/bibtex.rb test/regress/cadenza.rb test/regress/cast.rb +test/regress/csspool.html test/regress/csspool.out test/regress/csspool.rb test/regress/duplicate.out diff --git a/test/helper.rb b/test/helper.rb index f5c06a32..51841517 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -94,6 +94,20 @@ def assert_output_unchanged(file, args, actual = nil) "test/regress/#{file}") end + def assert_html_unchanged(asset) + assert_compile asset, '-S' + + file = File.basename(asset, '.y') + result = Dir.chdir(PROJECT_DIR) do + File.read("#{REGRESS_DIR}/#{file}.html") == File.read("#{TAB_DIR}/#{file}") + end + + assert(result, "HTML state summary for test/assets/#{asset} differed from " \ + "expectation. Try compiling it and diff with test/regress/#{file}.html:" \ + "\nruby -I./lib ./bin/racc -S -o tmp/#{file} test/assets/#{asset}; " \ + "colordiff tmp/#{file} test/regress/#{file}.html") + end + def racc(arg, expect_success = true) ruby "#{RACC} #{arg}", expect_success end diff --git a/test/regress/csspool.html b/test/regress/csspool.html new file mode 100644 index 00000000..4fdad768 --- /dev/null +++ b/test/regress/csspool.html @@ -0,0 +1,7389 @@ + + + + LR parser states for test/assets/csspool.y + + + + + +

State 0 (start state)

+ +

+ +
$start:. document $end $end

+ + + +

+ + From here, we reduce by @action1 : regardless of what token + comes next.
+ + (This takes us to 2) + + +

+
+ +

State 1

+ +

+ +
$start:document . $end $end

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stylesheet by:
stylesheet :
stylesheet
Reduce to document by:
document : stylesheet
document
+

+ +

+ + Action table:
+
Lookahead tokenAction
$endShift and go to state 3
OtherError
+ +

+
+ +

State 2

+ +

+ +
document:. stylesheet

+ + + +

+ + Action table:
+
Lookahead tokenAction
CHARSET_SYMShift and go to state 9
IMPORT_SYMShift and go to state 10
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
NAMESPACE_SYMShift and go to state 11
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by stylesheet :
(This takes us to 4)
+ +

+
+ +

State 3

+ +

+ +
$start:document $end . $end

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stylesheet by:
stylesheet :
stylesheet
Reduce to document by:
document : stylesheet
document
Shift $end document $end
+

+ +

+ + Action table:
+
Lookahead tokenAction
$endShift and go to state 49
OtherError
+ +

+
+ +

State 4

+ +

+ +
document:stylesheet .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stylesheet by:
stylesheet :
stylesheet
+

+ +

+ + From here, we reduce by document : stylesheet regardless of what token + comes next.
+ + (This takes us to 1) + + +

+
+ +

State 5

+ +

+ +
stylesheet:charset . stylesheet
stylesheet:charset .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift CHARSET_SYM CHARSET_SYM
Shift STRING CHARSET_SYM STRING
Shift SEMI CHARSET_SYM STRING SEMI
Reduce to charset by:
charset : CHARSET_SYM STRING SEMI
charset
+

+ +

+ + Action table:
+
Lookahead tokenAction
CHARSET_SYMShift and go to state 9
IMPORT_SYMShift and go to state 10
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
NAMESPACE_SYMShift and go to state 11
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by stylesheet : charset
(This can take us to 4, 50, 51 or 52)
+ +

+
+ +

State 6

+ +

+ +
stylesheet:import . stylesheet
stylesheet:import .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
Shift SEMI IMPORT_SYM import_location SEMI
Reduce to import by:
import : IMPORT_SYM import_location SEMI
import
+

+ +

+ + Action table:
+
Lookahead tokenAction
CHARSET_SYMShift and go to state 9
IMPORT_SYMShift and go to state 10
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
NAMESPACE_SYMShift and go to state 11
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by stylesheet : import
(This can take us to 4, 50, 51 or 52)
+ +

+
+ +

State 7

+ +

+ +
stylesheet:namespace . stylesheet
stylesheet:namespace .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
Shift STRING NAMESPACE_SYM STRING
Reduce to import_location by:
import_location : STRING
NAMESPACE_SYM import_location
Shift SEMI NAMESPACE_SYM import_location SEMI
Reduce to namespace by:
namespace : NAMESPACE_SYM import_location SEMI
namespace
+

+ +

+ + Action table:
+
Lookahead tokenAction
CHARSET_SYMShift and go to state 9
IMPORT_SYMShift and go to state 10
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
NAMESPACE_SYMShift and go to state 11
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by stylesheet : namespace
(This can take us to 4, 50, 51 or 52)
+ +

+
+ +

State 8

+ +

+ +
stylesheet:body .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Reduce to selectors by:
selectors : selector
selectors
Shift LBRACE selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_selector
Shift RBRACE start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
ruleset
Reduce to body by:
body : ruleset
body
+

+ +

+ + From here, we reduce by stylesheet : body regardless of what token + comes next.
+ + (This can take us to 4, 50, 51 or 52) + + +

+
+ +

State 9

+ +

+ +
charset:CHARSET_SYM . STRING SEMI

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift CHARSET_SYM CHARSET_SYM
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 53
OtherError
+ +

+
+ +

State 10

+ +

+ +
import:IMPORT_SYM . import_location medium SEMI
import:IMPORT_SYM . import_location SEMI

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 55
URIShift and go to state 56
OtherError
+ +

+
+ +

State 11

+ +

+ +
namespace:NAMESPACE_SYM . ident import_location SEMI
namespace:NAMESPACE_SYM . import_location SEMI

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 55
IDENTShift and go to state 59
URIShift and go to state 56
OtherError
+ +

+
+ +

State 12

+ +

+ +
body:ruleset . body
body:ruleset .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Reduce to selectors by:
selectors : selector
selectors
Shift LBRACE selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_selector
Shift RBRACE start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
ruleset
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by body : ruleset
(This can take us to 8, 60, 61, 62, 63, 65, 76 or 86)
+ +

+
+ +

State 13

+ +

+ +
body:conditional_rule . body
body:conditional_rule .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
Reduce to optional_space by:
optional_space :
start_media optional_space
Reduce to empty_ruleset by:
empty_ruleset : optional_space
start_media empty_ruleset
Reduce to body_in_media by:
body_in_media : empty_ruleset
start_media body_in_media
Shift RBRACE start_media body_in_media RBRACE
Reduce to media by:
media : start_media body_in_media RBRACE
media
Reduce to conditional_rule by:
conditional_rule : media
conditional_rule
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by body : conditional_rule
(This can take us to 8, 60, 61, 62, 63, 65, 76 or 86)
+ +

+
+ +

State 14

+ +

+ +
body:keyframes_rule . body
body:keyframes_rule .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Shift RBRACE start_keyframes_rule RBRACE
Reduce to keyframes_rule by:
keyframes_rule : start_keyframes_rule RBRACE
keyframes_rule
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by body : keyframes_rule
(This can take us to 8, 60, 61, 62, 63, 65, 76 or 86)
+ +

+
+ +

State 15

+ +

+ +
body:fontface_rule . body
body:fontface_rule .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift RBRACE start_fontface_rule RBRACE
Reduce to fontface_rule by:
fontface_rule : start_fontface_rule RBRACE
fontface_rule
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by body : fontface_rule
(This can take us to 8, 60, 61, 62, 63, 65, 76 or 86)
+ +

+
+ +

State 16

+ +

+ +
conditional_rule:media .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
Reduce to optional_space by:
optional_space :
start_media optional_space
Reduce to empty_ruleset by:
empty_ruleset : optional_space
start_media empty_ruleset
Reduce to body_in_media by:
body_in_media : empty_ruleset
start_media body_in_media
Shift RBRACE start_media body_in_media RBRACE
Reduce to media by:
media : start_media body_in_media RBRACE
media
+

+ +

+ + From here, we reduce by conditional_rule : media regardless of what token + comes next.
+ + (This takes us to 13) + + +

+
+ +

State 17

+ +

+ +
conditional_rule:document_query .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
Reduce to url_match_fns by:
url_match_fns : url_match_fn
start_document_query_pos url_match_fns
Shift LBRACE start_document_query_pos url_match_fns LBRACE
Reduce to start_document_query by:
start_document_query : start_document_query_pos url_match_fns LBRACE
start_document_query
Shift RBRACE start_document_query RBRACE
Reduce to document_query by:
document_query : start_document_query RBRACE
document_query
+

+ +

+ + From here, we reduce by conditional_rule : document_query regardless of what token + comes next.
+ + (This takes us to 13) + + +

+
+ +

State 18

+ +

+ +
conditional_rule:supports .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Reduce to supports_condition_root by:
supports_condition_root : supports_condition_in_parens
SUPPORTS_SYM supports_condition_root
Shift LBRACE SUPPORTS_SYM supports_condition_root LBRACE
Reduce to start_supports by:
start_supports : SUPPORTS_SYM supports_condition_root LBRACE
start_supports
Shift RBRACE start_supports RBRACE
Reduce to supports by:
supports : start_supports RBRACE
supports
+

+ +

+ + From here, we reduce by conditional_rule : supports regardless of what token + comes next.
+ + (This takes us to 13) + + +

+
+ +

State 19

+ +

+ +
media:start_media . body_in_media RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
SShift and go to state 64
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by optional_space :
(This takes us to 68)
+ +

+
+ +

State 20

+ +

+ +
start_media:MEDIA_SYM . media_query_list LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTReduce by optional_only_or_not :
(This takes us to 71)
LPARENShift and go to state 75
NOTShift and go to state 74
ONLYShift and go to state 73
OtherReduce by media_query_list :
(This takes us to 70)
+ +

+
+ +

State 21

+ +

+ +
document_query:start_document_query . body RBRACE
document_query:start_document_query . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
Reduce to url_match_fns by:
url_match_fns : url_match_fn
start_document_query_pos url_match_fns
Shift LBRACE start_document_query_pos url_match_fns LBRACE
Reduce to start_document_query by:
start_document_query : start_document_query_pos url_match_fns LBRACE
start_document_query
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
SShift and go to state 31
RBRACEShift and go to state 77
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherError
+ +

+
+ +

State 22

+ +

+ +
start_document_query:start_document_query_pos . url_match_fns LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
+

+ +

+ + Action table:
+
Lookahead tokenAction
FUNCTIONShift and go to state 83
URIShift and go to state 85
FUNCTION_NO_QUOTEShift and go to state 84
OtherError
+ +

+
+ +

State 23

+ +

+ +
start_document_query_pos:DOCUMENT_QUERY_SYM .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
+

+ +

+ + From here, we reduce by start_document_query_pos : DOCUMENT_QUERY_SYM regardless of what token + comes next.
+ + (This takes us to 22) + + +

+
+ +

State 24

+ +

+ +
supports:start_supports . body RBRACE
supports:start_supports . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Reduce to supports_condition_root by:
supports_condition_root : supports_condition_in_parens
SUPPORTS_SYM supports_condition_root
Shift LBRACE SUPPORTS_SYM supports_condition_root LBRACE
Reduce to start_supports by:
start_supports : SUPPORTS_SYM supports_condition_root LBRACE
start_supports
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
SShift and go to state 31
RBRACEShift and go to state 87
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
MEDIA_SYMShift and go to state 20
DOCUMENT_QUERY_SYMShift and go to state 23
KEYFRAMES_SYMShift and go to state 27
COLONShift and go to state 48
SUPPORTS_SYMShift and go to state 25
FONTFACE_SYMShift and go to state 29
"|"Shift and go to state 38
"."Shift and go to state 46
OtherError
+ +

+
+ +

State 25

+ +

+ +
start_supports:SUPPORTS_SYM . supports_condition_root LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 92
NOTShift and go to state 94
OtherError
+ +

+
+ +

State 26

+ +

+ +
keyframes_rule:start_keyframes_rule . keyframes_blocks RBRACE
keyframes_rule:start_keyframes_rule . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 103
RBRACEShift and go to state 98
PERCENTAGEShift and go to state 104
OtherReduce by keyframes_selectors :
(This takes us to 101)
+ +

+
+ +

State 27

+ +

+ +
start_keyframes_rule:KEYFRAMES_SYM . IDENT LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 105
OtherError
+ +

+
+ +

State 28

+ +

+ +
fontface_rule:start_fontface_rule . declarations RBRACE
fontface_rule:start_fontface_rule . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 108
IDENTShift and go to state 113
RBRACEShift and go to state 107
STARShift and go to state 114
VARIABLE_NAMEShift and go to state 115
OtherError
+ +

+
+ +

State 29

+ +

+ +
start_fontface_rule:FONTFACE_SYM . LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
+

+ +

+ + Action table:
+
Lookahead tokenAction
LBRACEShift and go to state 116
OtherError
+ +

+
+ +

State 30

+ +

+ +
ruleset:start_selector . declarations RBRACE
ruleset:start_selector . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Reduce to selectors by:
selectors : selector
selectors
Shift LBRACE selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_selector
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 108
IDENTShift and go to state 113
RBRACEShift and go to state 118
STARShift and go to state 114
VARIABLE_NAMEShift and go to state 115
OtherError
+ +

+
+ +

State 31

+ +

+ +
start_selector:S . start_selector

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift S S
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"|"Shift and go to state 38
"."Shift and go to state 46
OtherError
+ +

+
+ +

State 32

+ +

+ +
start_selector:selectors . LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Reduce to selectors by:
selectors : selector
selectors
+

+ +

+ + Action table:
+
Lookahead tokenAction
LBRACEShift and go to state 120
OtherError
+ +

+
+ +

State 33

+ +

+ +
selectors:selector . COMMA selectors
selectors:selector .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
+

+ +

+ + Action table:
+
Lookahead tokenAction
COMMAShift and go to state 121
OtherReduce by selectors : selector
(This can take us to 32 or 227)
+ +

+
+ +

State 34

+ +

+ +
selector:simple_selector . combinator selector
selector:simple_selector .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 123
GREATERShift and go to state 124
PLUSShift and go to state 125
TILDEShift and go to state 126
OtherReduce by selector : simple_selector
(This can take us to 33 or 228)
+ +

+
+ +

State 35

+ +

+ +
simple_selector:element_name . hcap
simple_selector:element_name .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
+

+ +

+ + Action table:
+
Lookahead tokenAction
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"."Shift and go to state 46
OtherReduce by simple_selector : element_name
(This can take us to 34, 246 or 247)
+ +

+
+ +

State 36

+ +

+ +
simple_selector:hcap .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift HASH HASH
Reduce to hash by:
hash : HASH
hash
Reduce to hcap by:
hcap : hash
hcap
+

+ +

+ + From here, we reduce by simple_selector : hcap regardless of what token + comes next.
+ + (This can take us to 34, 246 or 247) + + +

+
+ +

State 37

+ +

+ +
ident_with_namespace:IDENT .
ident_with_namespace:IDENT . "|" IDENT
element_name:IDENT . "|" STAR

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
"|"Shift and go to state 128
OtherReduce by ident_with_namespace : IDENT
(This takes us to 40)
+ +

+
+ +

State 38

+ +

+ +
ident_with_namespace:"|" . IDENT
element_name:"|" . STAR

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift "|" "|"
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 129
STARShift and go to state 130
OtherError
+ +

+
+ +

State 39

+ +

+ +
ident_with_namespace:STAR . "|" IDENT
element_name:STAR .
element_name:STAR . "|" STAR

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift STAR STAR
+

+ +

+ + Action table:
+
Lookahead tokenAction
"|"Shift and go to state 131
OtherReduce by element_name : STAR
(This takes us to 35)
+ +

+
+ +

State 40

+ +

+ +
element_name:ident_with_namespace .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
+

+ +

+ + From here, we reduce by element_name : ident_with_namespace regardless of what token + comes next.
+ + (This takes us to 35) + + +

+
+ +

State 41

+ +

+ +
hcap:hash .
hcap:hash . hcap

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift HASH HASH
Reduce to hash by:
hash : HASH
hash
+

+ +

+ + Action table:
+
Lookahead tokenAction
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"."Shift and go to state 46
OtherReduce by hcap : hash
(This can take us to 36, 127, 132, 133, 134 or 135)
+ +

+
+ +

State 42

+ +

+ +
hcap:class .
hcap:class . hcap

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift "." "."
Shift IDENT "." IDENT
Reduce to class by:
class : "." IDENT
class
+

+ +

+ + Action table:
+
Lookahead tokenAction
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"."Shift and go to state 46
OtherReduce by hcap : class
(This can take us to 36, 127, 132, 133, 134 or 135)
+ +

+
+ +

State 43

+ +

+ +
hcap:attrib .
hcap:attrib . hcap

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift RSQUARE LSQUARE ident_with_namespace RSQUARE
Reduce to attrib by:
attrib : LSQUARE ident_with_namespace RSQUARE
attrib
+

+ +

+ + Action table:
+
Lookahead tokenAction
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"."Shift and go to state 46
OtherReduce by hcap : attrib
(This can take us to 36, 127, 132, 133, 134 or 135)
+ +

+
+ +

State 44

+ +

+ +
hcap:pseudo .
hcap:pseudo . hcap

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift IDENT COLON IDENT
Reduce to pseudo by:
pseudo : COLON IDENT
pseudo
+

+ +

+ + Action table:
+
Lookahead tokenAction
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"."Shift and go to state 46
OtherReduce by hcap : pseudo
(This can take us to 36, 127, 132, 133, 134 or 135)
+ +

+
+ +

State 45

+ +

+ +
hash:HASH .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift HASH HASH
+

+ +

+ + From here, we reduce by hash : HASH regardless of what token + comes next.
+ + (This takes us to 41) + + +

+
+ +

State 46

+ +

+ +
class:"." . IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift "." "."
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 136
OtherError
+ +

+
+ +

State 47

+ +

+ +
attrib:LSQUARE . ident_with_namespace EQUAL IDENT RSQUARE
attrib:LSQUARE . ident_with_namespace EQUAL STRING RSQUARE
attrib:LSQUARE . ident_with_namespace INCLUDES STRING RSQUARE
attrib:LSQUARE . ident_with_namespace INCLUDES IDENT RSQUARE
attrib:LSQUARE . ident_with_namespace DASHMATCH IDENT RSQUARE
attrib:LSQUARE . ident_with_namespace DASHMATCH STRING RSQUARE
attrib:LSQUARE . ident_with_namespace PREFIXMATCH IDENT RSQUARE
attrib:LSQUARE . ident_with_namespace PREFIXMATCH STRING RSQUARE
attrib:LSQUARE . ident_with_namespace SUFFIXMATCH IDENT RSQUARE
attrib:LSQUARE . ident_with_namespace SUFFIXMATCH STRING RSQUARE
attrib:LSQUARE . ident_with_namespace SUBSTRINGMATCH IDENT RSQUARE
attrib:LSQUARE . ident_with_namespace SUBSTRINGMATCH STRING RSQUARE
attrib:LSQUARE . ident_with_namespace RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 137
STARShift and go to state 139
"|"Shift and go to state 138
OtherError
+ +

+
+ +

State 48

+ +

+ +
pseudo:COLON . IDENT
pseudo:COLON . COLON IDENT
pseudo:COLON . FUNCTION RPAREN
pseudo:COLON . FUNCTION IDENT RPAREN
pseudo:COLON . NOT_PSEUDO_CLASS simple_selector RPAREN
pseudo:COLON . NTH_PSEUDO_CLASS
pseudo:COLON . MATCHES_PSEUDO_CLASS simple_selectors RPAREN
pseudo:COLON . MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN
pseudo:COLON . COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 141
FUNCTIONShift and go to state 143
NTH_PSEUDO_CLASSShift and go to state 145
NOT_PSEUDO_CLASSShift and go to state 144
MATCHES_PSEUDO_CLASSShift and go to state 146
MOZ_PSEUDO_ELEMENTShift and go to state 147
COLONShift and go to state 142
OtherError
+ +

+
+ +

State 49 (end state)

+ +

+ +
$start:document $end $end .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stylesheet by:
stylesheet :
stylesheet
Reduce to document by:
document : stylesheet
document
Shift $end document $end
Shift $end document $end $end
+

+ +

+ + From here, we stop parsing and return success regardless of what token + comes next.
+ + +

+
+ +

State 50

+ +

+ +
stylesheet:charset stylesheet .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift CHARSET_SYM CHARSET_SYM
Shift STRING CHARSET_SYM STRING
Shift SEMI CHARSET_SYM STRING SEMI
Reduce to charset by:
charset : CHARSET_SYM STRING SEMI
charset
Reduce to stylesheet by:
stylesheet :
charset stylesheet
+

+ +

+ + From here, we reduce by stylesheet : charset stylesheet regardless of what token + comes next.
+ + (This can take us to 4, 50, 51 or 52) + + +

+
+ +

State 51

+ +

+ +
stylesheet:import stylesheet .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
Shift SEMI IMPORT_SYM import_location SEMI
Reduce to import by:
import : IMPORT_SYM import_location SEMI
import
Reduce to stylesheet by:
stylesheet :
import stylesheet
+

+ +

+ + From here, we reduce by stylesheet : import stylesheet regardless of what token + comes next.
+ + (This can take us to 4, 50, 51 or 52) + + +

+
+ +

State 52

+ +

+ +
stylesheet:namespace stylesheet .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
Shift STRING NAMESPACE_SYM STRING
Reduce to import_location by:
import_location : STRING
NAMESPACE_SYM import_location
Shift SEMI NAMESPACE_SYM import_location SEMI
Reduce to namespace by:
namespace : NAMESPACE_SYM import_location SEMI
namespace
Reduce to stylesheet by:
stylesheet :
namespace stylesheet
+

+ +

+ + From here, we reduce by stylesheet : namespace stylesheet regardless of what token + comes next.
+ + (This can take us to 4, 50, 51 or 52) + + +

+
+ +

State 53

+ +

+ +
charset:CHARSET_SYM STRING . SEMI

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift CHARSET_SYM CHARSET_SYM
Shift STRING CHARSET_SYM STRING
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 148
OtherError
+ +

+
+ +

State 54

+ +

+ +
import:IMPORT_SYM import_location . medium SEMI
import:IMPORT_SYM import_location . SEMI
import_location:import_location . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 150
IDENTShift and go to state 152
SShift and go to state 151
OtherError
+ +

+
+ +

State 55

+ +

+ +
import_location:STRING .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
+

+ +

+ + From here, we reduce by import_location : STRING regardless of what token + comes next.
+ + (This can take us to 54, 57 or 154) + + +

+
+ +

State 56

+ +

+ +
import_location:URI .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift URI IMPORT_SYM URI
+

+ +

+ + From here, we reduce by import_location : URI regardless of what token + comes next.
+ + (This can take us to 54, 57 or 154) + + +

+
+ +

State 57

+ +

+ +
import_location:import_location . S
namespace:NAMESPACE_SYM import_location . SEMI

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
Shift STRING NAMESPACE_SYM STRING
Reduce to import_location by:
import_location : STRING
NAMESPACE_SYM import_location
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 153
SShift and go to state 151
OtherError
+ +

+
+ +

State 58

+ +

+ +
namespace:NAMESPACE_SYM ident . import_location SEMI
ident:ident . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
Shift IDENT NAMESPACE_SYM IDENT
Reduce to ident by:
ident : IDENT
NAMESPACE_SYM ident
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 55
SShift and go to state 155
URIShift and go to state 56
OtherError
+ +

+
+ +

State 59

+ +

+ +
ident:IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
Shift IDENT NAMESPACE_SYM IDENT
+

+ +

+ + From here, we reduce by ident : IDENT regardless of what token + comes next.
+ + (This can take us to 58 or 172) + + +

+
+ +

State 60

+ +

+ +
body:ruleset body .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Reduce to selectors by:
selectors : selector
selectors
Shift LBRACE selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_selector
Shift RBRACE start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
ruleset
Shift IDENT ruleset IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ruleset ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
ruleset element_name
Reduce to simple_selector by:
simple_selector : element_name
ruleset simple_selector
Reduce to selector by:
selector : simple_selector
ruleset selector
Reduce to selectors by:
selectors : selector
ruleset selectors
Shift LBRACE ruleset selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
ruleset start_selector
Shift RBRACE ruleset start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
ruleset ruleset
Reduce to body by:
body : ruleset
ruleset body
+

+ +

+ + From here, we reduce by body : ruleset body regardless of what token + comes next.
+ + (This can take us to 8, 60, 61, 62, 63, 65, 76 or 86) + + +

+
+ +

State 61

+ +

+ +
body:conditional_rule body .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
Reduce to optional_space by:
optional_space :
start_media optional_space
Reduce to empty_ruleset by:
empty_ruleset : optional_space
start_media empty_ruleset
Reduce to body_in_media by:
body_in_media : empty_ruleset
start_media body_in_media
Shift RBRACE start_media body_in_media RBRACE
Reduce to media by:
media : start_media body_in_media RBRACE
media
Reduce to conditional_rule by:
conditional_rule : media
conditional_rule
Shift IDENT conditional_rule IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
conditional_rule ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
conditional_rule element_name
Reduce to simple_selector by:
simple_selector : element_name
conditional_rule simple_selector
Reduce to selector by:
selector : simple_selector
conditional_rule selector
Reduce to selectors by:
selectors : selector
conditional_rule selectors
Shift LBRACE conditional_rule selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
conditional_rule start_selector
Shift RBRACE conditional_rule start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
conditional_rule ruleset
Reduce to body by:
body : ruleset
conditional_rule body
+

+ +

+ + From here, we reduce by body : conditional_rule body regardless of what token + comes next.
+ + (This can take us to 8, 60, 61, 62, 63, 65, 76 or 86) + + +

+
+ +

State 62

+ +

+ +
body:keyframes_rule body .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Shift RBRACE start_keyframes_rule RBRACE
Reduce to keyframes_rule by:
keyframes_rule : start_keyframes_rule RBRACE
keyframes_rule
Shift IDENT keyframes_rule IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
keyframes_rule ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
keyframes_rule element_name
Reduce to simple_selector by:
simple_selector : element_name
keyframes_rule simple_selector
Reduce to selector by:
selector : simple_selector
keyframes_rule selector
Reduce to selectors by:
selectors : selector
keyframes_rule selectors
Shift LBRACE keyframes_rule selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
keyframes_rule start_selector
Shift RBRACE keyframes_rule start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
keyframes_rule ruleset
Reduce to body by:
body : ruleset
keyframes_rule body
+

+ +

+ + From here, we reduce by body : keyframes_rule body regardless of what token + comes next.
+ + (This can take us to 8, 60, 61, 62, 63, 65, 76 or 86) + + +

+
+ +

State 63

+ +

+ +
body:fontface_rule body .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift RBRACE start_fontface_rule RBRACE
Reduce to fontface_rule by:
fontface_rule : start_fontface_rule RBRACE
fontface_rule
Shift IDENT fontface_rule IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
fontface_rule ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
fontface_rule element_name
Reduce to simple_selector by:
simple_selector : element_name
fontface_rule simple_selector
Reduce to selector by:
selector : simple_selector
fontface_rule selector
Reduce to selectors by:
selectors : selector
fontface_rule selectors
Shift LBRACE fontface_rule selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
fontface_rule start_selector
Shift RBRACE fontface_rule start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
fontface_rule ruleset
Reduce to body by:
body : ruleset
fontface_rule body
+

+ +

+ + From here, we reduce by body : fontface_rule body regardless of what token + comes next.
+ + (This can take us to 8, 60, 61, 62, 63, 65, 76 or 86) + + +

+
+ +

State 64

+ +

+ +
optional_space:S .
start_selector:S . start_selector

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
Shift S start_media S
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
SShift and go to state 31
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"|"Shift and go to state 38
"."Shift and go to state 46
OtherReduce by optional_space : S
(This takes us to 68)
+ +

+
+ +

State 65

+ +

+ +
body_in_media:body .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
Shift IDENT start_media IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
start_media ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
start_media element_name
Reduce to simple_selector by:
simple_selector : element_name
start_media simple_selector
Reduce to selector by:
selector : simple_selector
start_media selector
Reduce to selectors by:
selectors : selector
start_media selectors
Shift LBRACE start_media selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_media start_selector
Shift RBRACE start_media start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
start_media ruleset
Reduce to body by:
body : ruleset
start_media body
+

+ +

+ + From here, we reduce by body_in_media : body regardless of what token + comes next.
+ + (This takes us to 67) + + +

+
+ +

State 66

+ +

+ +
body_in_media:empty_ruleset .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
Reduce to optional_space by:
optional_space :
start_media optional_space
Reduce to empty_ruleset by:
empty_ruleset : optional_space
start_media empty_ruleset
+

+ +

+ + From here, we reduce by body_in_media : empty_ruleset regardless of what token + comes next.
+ + (This takes us to 67) + + +

+
+ +

State 67

+ +

+ +
media:start_media body_in_media . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
Reduce to optional_space by:
optional_space :
start_media optional_space
Reduce to empty_ruleset by:
empty_ruleset : optional_space
start_media empty_ruleset
Reduce to body_in_media by:
body_in_media : empty_ruleset
start_media body_in_media
+

+ +

+ + Action table:
+
Lookahead tokenAction
RBRACEShift and go to state 156
OtherError
+ +

+
+ +

State 68

+ +

+ +
empty_ruleset:optional_space .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
Reduce to optional_space by:
optional_space :
start_media optional_space
+

+ +

+ + From here, we reduce by empty_ruleset : optional_space regardless of what token + comes next.
+ + (This takes us to 66) + + +

+
+ +

State 69

+ +

+ +
media_query_list:media_query .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to optional_only_or_not by:
optional_only_or_not :
MEDIA_SYM optional_only_or_not
Shift IDENT MEDIA_SYM optional_only_or_not IDENT
Reduce to media_type by:
media_type : IDENT
MEDIA_SYM optional_only_or_not media_type
Reduce to optional_and_exprs by:
optional_and_exprs :
MEDIA_SYM optional_only_or_not media_type optional_and_exprs
Reduce to media_query by:
media_query : optional_only_or_not media_type optional_and_exprs
MEDIA_SYM media_query
+

+ +

+ + From here, we reduce by media_query_list : media_query regardless of what token + comes next.
+ + (This takes us to 70) + + +

+
+ +

State 70

+ +

+ +
media_query_list:media_query_list . COMMA media_query
start_media:MEDIA_SYM media_query_list . LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
+

+ +

+ + Action table:
+
Lookahead tokenAction
COMMAShift and go to state 157
LBRACEShift and go to state 158
OtherError
+ +

+
+ +

State 71

+ +

+ +
media_query:optional_only_or_not . media_type optional_and_exprs

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to optional_only_or_not by:
optional_only_or_not :
MEDIA_SYM optional_only_or_not
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 160
OtherError
+ +

+
+ +

State 72

+ +

+ +
media_query:media_expr . optional_and_exprs

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space
Shift RPAREN MEDIA_SYM LPAREN optional_space IDENT optional_space RPAREN
Reduce to media_expr by:
media_expr : LPAREN optional_space IDENT optional_space RPAREN
MEDIA_SYM media_expr
+

+ +

+ + From here, we reduce by optional_and_exprs : regardless of what token + comes next.
+ + (This takes us to 161) + + +

+
+ +

State 73

+ +

+ +
optional_only_or_not:ONLY .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift ONLY MEDIA_SYM ONLY
+

+ +

+ + From here, we reduce by optional_only_or_not : ONLY regardless of what token + comes next.
+ + (This takes us to 71) + + +

+
+ +

State 74

+ +

+ +
optional_only_or_not:NOT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift NOT MEDIA_SYM NOT
+

+ +

+ + From here, we reduce by optional_only_or_not : NOT regardless of what token + comes next.
+ + (This takes us to 71) + + +

+
+ +

State 75

+ +

+ +
media_expr:LPAREN . optional_space IDENT optional_space RPAREN
media_expr:LPAREN . optional_space IDENT optional_space COLON optional_space expr RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 163
OtherReduce by optional_space :
(This takes us to 162)
+ +

+
+ +

State 76

+ +

+ +
document_query:start_document_query body . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
Reduce to url_match_fns by:
url_match_fns : url_match_fn
start_document_query_pos url_match_fns
Shift LBRACE start_document_query_pos url_match_fns LBRACE
Reduce to start_document_query by:
start_document_query : start_document_query_pos url_match_fns LBRACE
start_document_query
Shift IDENT start_document_query IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
start_document_query ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
start_document_query element_name
Reduce to simple_selector by:
simple_selector : element_name
start_document_query simple_selector
Reduce to selector by:
selector : simple_selector
start_document_query selector
Reduce to selectors by:
selectors : selector
start_document_query selectors
Shift LBRACE start_document_query selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_document_query start_selector
Shift RBRACE start_document_query start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
start_document_query ruleset
Reduce to body by:
body : ruleset
start_document_query body
+

+ +

+ + Action table:
+
Lookahead tokenAction
RBRACEShift and go to state 164
OtherError
+ +

+
+ +

State 77

+ +

+ +
document_query:start_document_query RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
Reduce to url_match_fns by:
url_match_fns : url_match_fn
start_document_query_pos url_match_fns
Shift LBRACE start_document_query_pos url_match_fns LBRACE
Reduce to start_document_query by:
start_document_query : start_document_query_pos url_match_fns LBRACE
start_document_query
Shift RBRACE start_document_query RBRACE
+

+ +

+ + From here, we reduce by document_query : start_document_query RBRACE regardless of what token + comes next.
+ + (This takes us to 17) + + +

+
+ +

State 78

+ +

+ +
start_document_query:start_document_query_pos url_match_fns . LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
Reduce to url_match_fns by:
url_match_fns : url_match_fn
start_document_query_pos url_match_fns
+

+ +

+ + Action table:
+
Lookahead tokenAction
LBRACEShift and go to state 165
OtherError
+ +

+
+ +

State 79

+ +

+ +
url_match_fns:url_match_fn . COMMA url_match_fns
url_match_fns:url_match_fn .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
+

+ +

+ + Action table:
+
Lookahead tokenAction
COMMAShift and go to state 166
OtherReduce by url_match_fns : url_match_fn
(This can take us to 78 or 257)
+ +

+
+ +

State 80

+ +

+ +
url_match_fn:function_no_quote .
function_no_quote:function_no_quote . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 167
OtherReduce by url_match_fn : function_no_quote
(This takes us to 79)
+ +

+
+ +

State 81

+ +

+ +
url_match_fn:function .
function:function . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift RPAREN start_document_query_pos FUNCTION RPAREN
Reduce to function by:
function : FUNCTION RPAREN
start_document_query_pos function
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 168
OtherReduce by url_match_fn : function
(This takes us to 79)
+ +

+
+ +

State 82

+ +

+ +
url_match_fn:uri .
uri:uri . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift URI start_document_query_pos URI
Reduce to uri by:
uri : URI
start_document_query_pos uri
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 169
OtherReduce by url_match_fn : uri
(This takes us to 79)
+ +

+
+ +

State 83

+ +

+ +
function:FUNCTION . expr RPAREN
function:FUNCTION . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 188
IDENTShift and go to state 59
HASHShift and go to state 187
RPARENShift and go to state 184
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
URIShift and go to state 85
RESOLUTIONShift and go to state 170
VARIABLE_NAMEShift and go to state 181
CALC_SYMShift and go to state 186
UNICODE_RANGEShift and go to state 185
RATIOShift and go to state 196
OtherError
+ +

+
+ +

State 84

+ +

+ +
function_no_quote:FUNCTION_NO_QUOTE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
+

+ +

+ + From here, we reduce by function_no_quote : FUNCTION_NO_QUOTE regardless of what token + comes next.
+ + (This takes us to 80) + + +

+
+ +

State 85

+ +

+ +
uri:URI .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift URI start_document_query_pos URI
+

+ +

+ + From here, we reduce by uri : URI regardless of what token + comes next.
+ + (This can take us to 82 or 176) + + +

+
+ +

State 86

+ +

+ +
supports:start_supports body . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Reduce to supports_condition_root by:
supports_condition_root : supports_condition_in_parens
SUPPORTS_SYM supports_condition_root
Shift LBRACE SUPPORTS_SYM supports_condition_root LBRACE
Reduce to start_supports by:
start_supports : SUPPORTS_SYM supports_condition_root LBRACE
start_supports
Shift IDENT start_supports IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
start_supports ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
start_supports element_name
Reduce to simple_selector by:
simple_selector : element_name
start_supports simple_selector
Reduce to selector by:
selector : simple_selector
start_supports selector
Reduce to selectors by:
selectors : selector
start_supports selectors
Shift LBRACE start_supports selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_supports start_selector
Shift RBRACE start_supports start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
start_supports ruleset
Reduce to body by:
body : ruleset
start_supports body
+

+ +

+ + Action table:
+
Lookahead tokenAction
RBRACEShift and go to state 199
OtherError
+ +

+
+ +

State 87

+ +

+ +
supports:start_supports RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Reduce to supports_condition_root by:
supports_condition_root : supports_condition_in_parens
SUPPORTS_SYM supports_condition_root
Shift LBRACE SUPPORTS_SYM supports_condition_root LBRACE
Reduce to start_supports by:
start_supports : SUPPORTS_SYM supports_condition_root LBRACE
start_supports
Shift RBRACE start_supports RBRACE
+

+ +

+ + From here, we reduce by supports : start_supports RBRACE regardless of what token + comes next.
+ + (This takes us to 18) + + +

+
+ +

State 88

+ +

+ +
start_supports:SUPPORTS_SYM supports_condition_root . LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Reduce to supports_condition_root by:
supports_condition_root : supports_condition_in_parens
SUPPORTS_SYM supports_condition_root
+

+ +

+ + Action table:
+
Lookahead tokenAction
LBRACEShift and go to state 200
OtherError
+ +

+
+ +

State 89

+ +

+ +
supports_condition_root:supports_negation .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift NOT SUPPORTS_SYM NOT
Shift LPAREN SUPPORTS_SYM NOT LPAREN
Shift IDENT SUPPORTS_SYM NOT LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM NOT LPAREN property
Shift COLON SUPPORTS_SYM NOT LPAREN property COLON
Shift IDENT SUPPORTS_SYM NOT LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM NOT LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM NOT LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM NOT LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM NOT LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM NOT LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM NOT LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM NOT supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM NOT supports_condition_in_parens
Reduce to supports_negation by:
supports_negation : NOT supports_condition_in_parens
SUPPORTS_SYM supports_negation
+

+ +

+ + From here, we reduce by supports_condition_root : supports_negation regardless of what token + comes next.
+ + (This takes us to 88) + + +

+
+ +

State 90

+ +

+ +
supports_condition_root:supports_conjunction_or_disjunction .
supports_conjunction:supports_conjunction_or_disjunction . AND supports_condition_in_parens
supports_disjunction:supports_conjunction_or_disjunction . OR supports_condition_in_parens

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift AND SUPPORTS_SYM supports_condition_in_parens AND
Shift LPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property
Shift COLON SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_condition_in_parens AND supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens AND supports_condition_in_parens
Reduce to supports_conjunction by:
supports_conjunction : supports_condition_in_parens AND supports_condition_in_parens
SUPPORTS_SYM supports_conjunction
Reduce to supports_conjunction_or_disjunction by:
supports_conjunction_or_disjunction : supports_conjunction
SUPPORTS_SYM supports_conjunction_or_disjunction
+

+ +

+ + Action table:
+
Lookahead tokenAction
ANDShift and go to state 201
ORShift and go to state 202
OtherReduce by supports_condition_root : supports_conjunction_or_disjunction
(This takes us to 88)
+ +

+
+ +

State 91

+ +

+ +
supports_condition_root:supports_condition_in_parens .
supports_conjunction:supports_condition_in_parens . AND supports_condition_in_parens
supports_disjunction:supports_condition_in_parens . OR supports_condition_in_parens

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
+

+ +

+ + Action table:
+
Lookahead tokenAction
ANDShift and go to state 203
ORShift and go to state 204
OtherReduce by supports_condition_root : supports_condition_in_parens
(This takes us to 88)
+ +

+
+ +

State 92

+ +

+ +
supports_condition_in_parens:LPAREN . supports_condition RPAREN
supports_declaration_condition:LPAREN . declaration_internal RPAREN
supports_declaration_condition:LPAREN . S declaration_internal RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 113
SShift and go to state 210
STARShift and go to state 114
LPARENShift and go to state 92
NOTShift and go to state 94
VARIABLE_NAMEShift and go to state 115
OtherError
+ +

+
+ +

State 93

+ +

+ +
supports_condition_in_parens:supports_declaration_condition .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
+

+ +

+ + From here, we reduce by supports_condition_in_parens : supports_declaration_condition regardless of what token + comes next.
+ + (This can take us to 91, 207, 211, 274, 275, 276 or 277) + + +

+
+ +

State 94

+ +

+ +
supports_negation:NOT . supports_condition_in_parens

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift NOT SUPPORTS_SYM NOT
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 92
OtherError
+ +

+
+ +

State 95

+ +

+ +
supports_conjunction_or_disjunction:supports_conjunction .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift AND SUPPORTS_SYM supports_condition_in_parens AND
Shift LPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property
Shift COLON SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_condition_in_parens AND supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens AND supports_condition_in_parens
Reduce to supports_conjunction by:
supports_conjunction : supports_condition_in_parens AND supports_condition_in_parens
SUPPORTS_SYM supports_conjunction
+

+ +

+ + From here, we reduce by supports_conjunction_or_disjunction : supports_conjunction regardless of what token + comes next.
+ + (This can take us to 90 or 206) + + +

+
+ +

State 96

+ +

+ +
supports_conjunction_or_disjunction:supports_disjunction .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift OR SUPPORTS_SYM supports_condition_in_parens OR
Shift LPAREN SUPPORTS_SYM supports_condition_in_parens OR LPAREN
Shift IDENT SUPPORTS_SYM supports_condition_in_parens OR LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property
Shift COLON SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_condition_in_parens OR LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_condition_in_parens OR LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_condition_in_parens OR supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens OR supports_condition_in_parens
Reduce to supports_disjunction by:
supports_disjunction : supports_condition_in_parens OR supports_condition_in_parens
SUPPORTS_SYM supports_disjunction
+

+ +

+ + From here, we reduce by supports_conjunction_or_disjunction : supports_disjunction regardless of what token + comes next.
+ + (This can take us to 90 or 206) + + +

+
+ +

State 97

+ +

+ +
keyframes_rule:start_keyframes_rule keyframes_blocks . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_selectors LBRACE
Reduce to start_keyframes_block by:
start_keyframes_block : keyframes_selectors LBRACE
start_keyframes_rule start_keyframes_block
Shift RBRACE start_keyframes_rule start_keyframes_block RBRACE
Reduce to keyframes_block by:
keyframes_block : start_keyframes_block RBRACE
start_keyframes_rule keyframes_block
Reduce to keyframes_blocks by:
keyframes_blocks : keyframes_block
start_keyframes_rule keyframes_blocks
+

+ +

+ + Action table:
+
Lookahead tokenAction
RBRACEShift and go to state 212
OtherError
+ +

+
+ +

State 98

+ +

+ +
keyframes_rule:start_keyframes_rule RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Shift RBRACE start_keyframes_rule RBRACE
+

+ +

+ + From here, we reduce by keyframes_rule : start_keyframes_rule RBRACE regardless of what token + comes next.
+ + (This takes us to 14) + + +

+
+ +

State 99

+ +

+ +
keyframes_blocks:keyframes_block . keyframes_blocks
keyframes_blocks:keyframes_block .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_selectors LBRACE
Reduce to start_keyframes_block by:
start_keyframes_block : keyframes_selectors LBRACE
start_keyframes_rule start_keyframes_block
Shift RBRACE start_keyframes_rule start_keyframes_block RBRACE
Reduce to keyframes_block by:
keyframes_block : start_keyframes_block RBRACE
start_keyframes_rule keyframes_block
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 103
LBRACEReduce by keyframes_selectors :
(This takes us to 101)
PERCENTAGEShift and go to state 104
OtherReduce by keyframes_blocks : keyframes_block
(This can take us to 97 or 213)
+ +

+
+ +

State 100

+ +

+ +
keyframes_block:start_keyframes_block . declarations RBRACE
keyframes_block:start_keyframes_block . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_selectors LBRACE
Reduce to start_keyframes_block by:
start_keyframes_block : keyframes_selectors LBRACE
start_keyframes_rule start_keyframes_block
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 108
IDENTShift and go to state 113
RBRACEShift and go to state 215
STARShift and go to state 114
VARIABLE_NAMEShift and go to state 115
OtherError
+ +

+
+ +

State 101

+ +

+ +
start_keyframes_block:keyframes_selectors . LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
+

+ +

+ + Action table:
+
Lookahead tokenAction
LBRACEShift and go to state 216
OtherError
+ +

+
+ +

State 102

+ +

+ +
keyframes_selectors:keyframes_selector . COMMA keyframes_selectors
keyframes_selectors:keyframes_selector .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Shift IDENT start_keyframes_rule IDENT
Reduce to keyframes_selector by:
keyframes_selector : IDENT
start_keyframes_rule keyframes_selector
+

+ +

+ + Action table:
+
Lookahead tokenAction
COMMAShift and go to state 217
OtherReduce by keyframes_selectors : keyframes_selector
(This can take us to 101 or 282)
+ +

+
+ +

State 103

+ +

+ +
keyframes_selector:IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Shift IDENT start_keyframes_rule IDENT
+

+ +

+ + From here, we reduce by keyframes_selector : IDENT regardless of what token + comes next.
+ + (This takes us to 102) + + +

+
+ +

State 104

+ +

+ +
keyframes_selector:PERCENTAGE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Shift PERCENTAGE start_keyframes_rule PERCENTAGE
+

+ +

+ + From here, we reduce by keyframes_selector : PERCENTAGE regardless of what token + comes next.
+ + (This takes us to 102) + + +

+
+ +

State 105

+ +

+ +
start_keyframes_rule:KEYFRAMES_SYM IDENT . LBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
LBRACEShift and go to state 218
OtherError
+ +

+
+ +

State 106

+ +

+ +
fontface_rule:start_fontface_rule declarations . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift SEMI start_fontface_rule SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_fontface_rule one_or_more_semis
Reduce to declarations by:
declarations : one_or_more_semis
start_fontface_rule declarations
+

+ +

+ + Action table:
+
Lookahead tokenAction
RBRACEShift and go to state 219
OtherError
+ +

+
+ +

State 107

+ +

+ +
fontface_rule:start_fontface_rule RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift RBRACE start_fontface_rule RBRACE
+

+ +

+ + From here, we reduce by fontface_rule : start_fontface_rule RBRACE regardless of what token + comes next.
+ + (This takes us to 15) + + +

+
+ +

State 108

+ +

+ +
one_or_more_semis:SEMI .
one_or_more_semis:SEMI . one_or_more_semis

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift SEMI start_fontface_rule SEMI
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 108
(Overridden: reduce by one_or_more_semis : SEMI)
OtherReduce by one_or_more_semis : SEMI
(This can take us to 110, 220 or 221)
+ +

+
+ +

State 109

+ +

+ +
declarations:declaration . one_or_more_semis declarations
declarations:declaration . one_or_more_semis
declarations:declaration .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift IDENT start_fontface_rule IDENT
Reduce to property by:
property : IDENT
start_fontface_rule property
Shift COLON start_fontface_rule property COLON
Shift IDENT start_fontface_rule property COLON IDENT
Reduce to ident by:
ident : IDENT
start_fontface_rule property COLON ident
Reduce to term by:
term : ident
start_fontface_rule property COLON term
Reduce to expr by:
expr : term
start_fontface_rule property COLON expr
Reduce to prio by:
prio :
start_fontface_rule property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
start_fontface_rule declaration_internal
Reduce to declaration by:
declaration : declaration_internal
start_fontface_rule declaration
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 108
OtherReduce by declarations : declaration
(This can take us to 106, 117, 214, 222 or 283)
+ +

+
+ +

State 110

+ +

+ +
declarations:one_or_more_semis . declarations
declarations:one_or_more_semis .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift SEMI start_fontface_rule SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_fontface_rule one_or_more_semis
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 108
IDENTShift and go to state 113
STARShift and go to state 114
VARIABLE_NAMEShift and go to state 115
OtherReduce by declarations : one_or_more_semis
(This can take us to 106, 117, 214, 222 or 283)
+ +

+
+ +

State 111

+ +

+ +
declaration:declaration_internal .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift IDENT start_fontface_rule IDENT
Reduce to property by:
property : IDENT
start_fontface_rule property
Shift COLON start_fontface_rule property COLON
Shift IDENT start_fontface_rule property COLON IDENT
Reduce to ident by:
ident : IDENT
start_fontface_rule property COLON ident
Reduce to term by:
term : ident
start_fontface_rule property COLON term
Reduce to expr by:
expr : term
start_fontface_rule property COLON expr
Reduce to prio by:
prio :
start_fontface_rule property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
start_fontface_rule declaration_internal
+

+ +

+ + From here, we reduce by declaration : declaration_internal regardless of what token + comes next.
+ + (This takes us to 109) + + +

+
+ +

State 112

+ +

+ +
declaration_internal:property . COLON expr prio
declaration_internal:property . COLON S expr prio
declaration_internal:property . S COLON expr prio
declaration_internal:property . S COLON S expr prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 224
COLONShift and go to state 223
OtherError
+ +

+
+ +

State 113

+ +

+ +
property:IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
+

+ +

+ + From here, we reduce by property : IDENT regardless of what token + comes next.
+ + (This takes us to 112) + + +

+
+ +

State 114

+ +

+ +
property:STAR . IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift STAR SUPPORTS_SYM LPAREN STAR
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 225
OtherError
+ +

+
+ +

State 115

+ +

+ +
property:VARIABLE_NAME .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift VARIABLE_NAME SUPPORTS_SYM LPAREN VARIABLE_NAME
+

+ +

+ + From here, we reduce by property : VARIABLE_NAME regardless of what token + comes next.
+ + (This takes us to 112) + + +

+
+ +

State 116

+ +

+ +
start_fontface_rule:FONTFACE_SYM LBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
+

+ +

+ + From here, we reduce by start_fontface_rule : FONTFACE_SYM LBRACE regardless of what token + comes next.
+ + (This takes us to 28) + + +

+
+ +

State 117

+ +

+ +
ruleset:start_selector declarations . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Reduce to selectors by:
selectors : selector
selectors
Shift LBRACE selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_selector
Shift SEMI start_selector SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_selector one_or_more_semis
Reduce to declarations by:
declarations : one_or_more_semis
start_selector declarations
+

+ +

+ + Action table:
+
Lookahead tokenAction
RBRACEShift and go to state 226
OtherError
+ +

+
+ +

State 118

+ +

+ +
ruleset:start_selector RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Reduce to selectors by:
selectors : selector
selectors
Shift LBRACE selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_selector
Shift RBRACE start_selector RBRACE
+

+ +

+ + From here, we reduce by ruleset : start_selector RBRACE regardless of what token + comes next.
+ + (This takes us to 12) + + +

+
+ +

State 119

+ +

+ +
start_selector:S start_selector .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift S S
Shift IDENT S IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
S ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
S element_name
Reduce to simple_selector by:
simple_selector : element_name
S simple_selector
Reduce to selector by:
selector : simple_selector
S selector
Reduce to selectors by:
selectors : selector
S selectors
Shift LBRACE S selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
S start_selector
+

+ +

+ + From here, we reduce by start_selector : S start_selector regardless of what token + comes next.
+ + (This can take us to 30 or 119) + + +

+
+ +

State 120

+ +

+ +
start_selector:selectors LBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Reduce to selectors by:
selectors : selector
selectors
Shift LBRACE selectors LBRACE
+

+ +

+ + From here, we reduce by start_selector : selectors LBRACE regardless of what token + comes next.
+ + (This can take us to 30 or 119) + + +

+
+ +

State 121

+ +

+ +
selectors:selector COMMA . selectors

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Shift COMMA selector COMMA
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"|"Shift and go to state 38
"."Shift and go to state 46
OtherError
+ +

+
+ +

State 122

+ +

+ +
selector:simple_selector combinator . selector

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Shift S simple_selector S
Reduce to combinator by:
combinator : S
simple_selector combinator
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"|"Shift and go to state 38
"."Shift and go to state 46
OtherError
+ +

+
+ +

State 123

+ +

+ +
combinator:S .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Shift S simple_selector S
+

+ +

+ + From here, we reduce by combinator : S regardless of what token + comes next.
+ + (This takes us to 122) + + +

+
+ +

State 124

+ +

+ +
combinator:GREATER .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Shift GREATER simple_selector GREATER
+

+ +

+ + From here, we reduce by combinator : GREATER regardless of what token + comes next.
+ + (This takes us to 122) + + +

+
+ +

State 125

+ +

+ +
combinator:PLUS .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Shift PLUS simple_selector PLUS
+

+ +

+ + From here, we reduce by combinator : PLUS regardless of what token + comes next.
+ + (This takes us to 122) + + +

+
+ +

State 126

+ +

+ +
combinator:TILDE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Shift TILDE simple_selector TILDE
+

+ +

+ + From here, we reduce by combinator : TILDE regardless of what token + comes next.
+ + (This takes us to 122) + + +

+
+ +

State 127

+ +

+ +
simple_selector:element_name hcap .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Shift HASH element_name HASH
Reduce to hash by:
hash : HASH
element_name hash
Reduce to hcap by:
hcap : hash
element_name hcap
+

+ +

+ + From here, we reduce by simple_selector : element_name hcap regardless of what token + comes next.
+ + (This can take us to 34, 246 or 247) + + +

+
+ +

State 128

+ +

+ +
ident_with_namespace:IDENT "|" . IDENT
element_name:IDENT "|" . STAR

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Shift "|" IDENT "|"
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 229
STARShift and go to state 230
OtherError
+ +

+
+ +

State 129

+ +

+ +
ident_with_namespace:"|" IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift "|" "|"
Shift IDENT "|" IDENT
+

+ +

+ + From here, we reduce by ident_with_namespace : "|" IDENT regardless of what token + comes next.
+ + (This can take us to 40 or 140) + + +

+
+ +

State 130

+ +

+ +
element_name:"|" STAR .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift "|" "|"
Shift STAR "|" STAR
+

+ +

+ + From here, we reduce by element_name : "|" STAR regardless of what token + comes next.
+ + (This takes us to 35) + + +

+
+ +

State 131

+ +

+ +
ident_with_namespace:STAR "|" . IDENT
element_name:STAR "|" . STAR

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift STAR STAR
Shift "|" STAR "|"
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 231
STARShift and go to state 232
OtherError
+ +

+
+ +

State 132

+ +

+ +
hcap:hash hcap .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift HASH HASH
Reduce to hash by:
hash : HASH
hash
Shift HASH hash HASH
Reduce to hash by:
hash : HASH
hash hash
Reduce to hcap by:
hcap : hash
hash hcap
+

+ +

+ + From here, we reduce by hcap : hash hcap regardless of what token + comes next.
+ + (This can take us to 36, 127, 132, 133, 134 or 135) + + +

+
+ +

State 133

+ +

+ +
hcap:class hcap .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift "." "."
Shift IDENT "." IDENT
Reduce to class by:
class : "." IDENT
class
Shift HASH class HASH
Reduce to hash by:
hash : HASH
class hash
Reduce to hcap by:
hcap : hash
class hcap
+

+ +

+ + From here, we reduce by hcap : class hcap regardless of what token + comes next.
+ + (This can take us to 36, 127, 132, 133, 134 or 135) + + +

+
+ +

State 134

+ +

+ +
hcap:attrib hcap .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift RSQUARE LSQUARE ident_with_namespace RSQUARE
Reduce to attrib by:
attrib : LSQUARE ident_with_namespace RSQUARE
attrib
Shift HASH attrib HASH
Reduce to hash by:
hash : HASH
attrib hash
Reduce to hcap by:
hcap : hash
attrib hcap
+

+ +

+ + From here, we reduce by hcap : attrib hcap regardless of what token + comes next.
+ + (This can take us to 36, 127, 132, 133, 134 or 135) + + +

+
+ +

State 135

+ +

+ +
hcap:pseudo hcap .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift IDENT COLON IDENT
Reduce to pseudo by:
pseudo : COLON IDENT
pseudo
Shift HASH pseudo HASH
Reduce to hash by:
hash : HASH
pseudo hash
Reduce to hcap by:
hcap : hash
pseudo hcap
+

+ +

+ + From here, we reduce by hcap : pseudo hcap regardless of what token + comes next.
+ + (This can take us to 36, 127, 132, 133, 134 or 135) + + +

+
+ +

State 136

+ +

+ +
class:"." IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift "." "."
Shift IDENT "." IDENT
+

+ +

+ + From here, we reduce by class : "." IDENT regardless of what token + comes next.
+ + (This takes us to 42) + + +

+
+ +

State 137

+ +

+ +
ident_with_namespace:IDENT .
ident_with_namespace:IDENT . "|" IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
"|"Shift and go to state 233
OtherReduce by ident_with_namespace : IDENT
(This takes us to 140)
+ +

+
+ +

State 138

+ +

+ +
ident_with_namespace:"|" . IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift "|" LSQUARE "|"
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 129
OtherError
+ +

+
+ +

State 139

+ +

+ +
ident_with_namespace:STAR . "|" IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift STAR LSQUARE STAR
+

+ +

+ + Action table:
+
Lookahead tokenAction
"|"Shift and go to state 234
OtherError
+ +

+
+ +

State 140

+ +

+ +
attrib:LSQUARE ident_with_namespace . EQUAL IDENT RSQUARE
attrib:LSQUARE ident_with_namespace . EQUAL STRING RSQUARE
attrib:LSQUARE ident_with_namespace . INCLUDES STRING RSQUARE
attrib:LSQUARE ident_with_namespace . INCLUDES IDENT RSQUARE
attrib:LSQUARE ident_with_namespace . DASHMATCH IDENT RSQUARE
attrib:LSQUARE ident_with_namespace . DASHMATCH STRING RSQUARE
attrib:LSQUARE ident_with_namespace . PREFIXMATCH IDENT RSQUARE
attrib:LSQUARE ident_with_namespace . PREFIXMATCH STRING RSQUARE
attrib:LSQUARE ident_with_namespace . SUFFIXMATCH IDENT RSQUARE
attrib:LSQUARE ident_with_namespace . SUFFIXMATCH STRING RSQUARE
attrib:LSQUARE ident_with_namespace . SUBSTRINGMATCH IDENT RSQUARE
attrib:LSQUARE ident_with_namespace . SUBSTRINGMATCH STRING RSQUARE
attrib:LSQUARE ident_with_namespace . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 241
EQUALShift and go to state 235
INCLUDESShift and go to state 236
DASHMATCHShift and go to state 237
PREFIXMATCHShift and go to state 238
SUFFIXMATCHShift and go to state 239
SUBSTRINGMATCHShift and go to state 240
OtherError
+ +

+
+ +

State 141

+ +

+ +
pseudo:COLON IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift IDENT COLON IDENT
+

+ +

+ + From here, we reduce by pseudo : COLON IDENT regardless of what token + comes next.
+ + (This takes us to 44) + + +

+
+ +

State 142

+ +

+ +
pseudo:COLON COLON . IDENT
pseudo:COLON COLON . MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift COLON COLON COLON
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 242
MOZ_PSEUDO_ELEMENTShift and go to state 243
OtherError
+ +

+
+ +

State 143

+ +

+ +
pseudo:COLON FUNCTION . RPAREN
pseudo:COLON FUNCTION . IDENT RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift FUNCTION COLON FUNCTION
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 245
RPARENShift and go to state 244
OtherError
+ +

+
+ +

State 144

+ +

+ +
pseudo:COLON NOT_PSEUDO_CLASS . simple_selector RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift NOT_PSEUDO_CLASS COLON NOT_PSEUDO_CLASS
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"|"Shift and go to state 38
"."Shift and go to state 46
OtherError
+ +

+
+ +

State 145

+ +

+ +
pseudo:COLON NTH_PSEUDO_CLASS .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift NTH_PSEUDO_CLASS COLON NTH_PSEUDO_CLASS
+

+ +

+ + From here, we reduce by pseudo : COLON NTH_PSEUDO_CLASS regardless of what token + comes next.
+ + (This takes us to 44) + + +

+
+ +

State 146

+ +

+ +
pseudo:COLON MATCHES_PSEUDO_CLASS . simple_selectors RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MATCHES_PSEUDO_CLASS COLON MATCHES_PSEUDO_CLASS
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"|"Shift and go to state 38
"."Shift and go to state 46
OtherError
+ +

+
+ +

State 147

+ +

+ +
pseudo:COLON MOZ_PSEUDO_ELEMENT . optional_space any_number_of_idents optional_space RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON MOZ_PSEUDO_ELEMENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 163
(Overridden: reduce by optional_space :)
OtherReduce by optional_space :
(This takes us to 249)
+ +

+
+ +

State 148

+ +

+ +
charset:CHARSET_SYM STRING SEMI .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift CHARSET_SYM CHARSET_SYM
Shift STRING CHARSET_SYM STRING
Shift SEMI CHARSET_SYM STRING SEMI
+

+ +

+ + From here, we reduce by charset : CHARSET_SYM STRING SEMI regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 149

+ +

+ +
import:IMPORT_SYM import_location medium . SEMI
medium:medium . COMMA IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
Shift IDENT IMPORT_SYM import_location IDENT
Reduce to medium by:
medium : IDENT
IMPORT_SYM import_location medium
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 250
COMMAShift and go to state 251
OtherError
+ +

+
+ +

State 150

+ +

+ +
import:IMPORT_SYM import_location SEMI .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
Shift SEMI IMPORT_SYM import_location SEMI
+

+ +

+ + From here, we reduce by import : IMPORT_SYM import_location SEMI regardless of what token + comes next.
+ + (This takes us to 6) + + +

+
+ +

State 151

+ +

+ +
import_location:import_location S .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
Shift S IMPORT_SYM import_location S
+

+ +

+ + From here, we reduce by import_location : import_location S regardless of what token + comes next.
+ + (This can take us to 54, 57 or 154) + + +

+
+ +

State 152

+ +

+ +
medium:IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
Shift IDENT IMPORT_SYM import_location IDENT
+

+ +

+ + From here, we reduce by medium : IDENT regardless of what token + comes next.
+ + (This takes us to 149) + + +

+
+ +

State 153

+ +

+ +
namespace:NAMESPACE_SYM import_location SEMI .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
Shift STRING NAMESPACE_SYM STRING
Reduce to import_location by:
import_location : STRING
NAMESPACE_SYM import_location
Shift SEMI NAMESPACE_SYM import_location SEMI
+

+ +

+ + From here, we reduce by namespace : NAMESPACE_SYM import_location SEMI regardless of what token + comes next.
+ + (This takes us to 7) + + +

+
+ +

State 154

+ +

+ +
import_location:import_location . S
namespace:NAMESPACE_SYM ident import_location . SEMI

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
Shift IDENT NAMESPACE_SYM IDENT
Reduce to ident by:
ident : IDENT
NAMESPACE_SYM ident
Shift STRING NAMESPACE_SYM ident STRING
Reduce to import_location by:
import_location : STRING
NAMESPACE_SYM ident import_location
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 252
SShift and go to state 151
OtherError
+ +

+
+ +

State 155

+ +

+ +
ident:ident S .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
Shift IDENT NAMESPACE_SYM IDENT
Reduce to ident by:
ident : IDENT
NAMESPACE_SYM ident
Shift S NAMESPACE_SYM ident S
+

+ +

+ + From here, we reduce by ident : ident S regardless of what token + comes next.
+ + (This can take us to 58 or 172) + + +

+
+ +

State 156

+ +

+ +
media:start_media body_in_media RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
Reduce to start_media by:
start_media : MEDIA_SYM media_query_list LBRACE
start_media
Reduce to optional_space by:
optional_space :
start_media optional_space
Reduce to empty_ruleset by:
empty_ruleset : optional_space
start_media empty_ruleset
Reduce to body_in_media by:
body_in_media : empty_ruleset
start_media body_in_media
Shift RBRACE start_media body_in_media RBRACE
+

+ +

+ + From here, we reduce by media : start_media body_in_media RBRACE regardless of what token + comes next.
+ + (This takes us to 16) + + +

+
+ +

State 157

+ +

+ +
media_query_list:media_query_list COMMA . media_query

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift COMMA MEDIA_SYM media_query_list COMMA
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 75
NOTShift and go to state 74
ONLYShift and go to state 73
OtherReduce by optional_only_or_not :
(This takes us to 71)
+ +

+
+ +

State 158

+ +

+ +
start_media:MEDIA_SYM media_query_list LBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift LBRACE MEDIA_SYM media_query_list LBRACE
+

+ +

+ + From here, we reduce by start_media : MEDIA_SYM media_query_list LBRACE regardless of what token + comes next.
+ + (This takes us to 19) + + +

+
+ +

State 159

+ +

+ +
media_query:optional_only_or_not media_type . optional_and_exprs

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to optional_only_or_not by:
optional_only_or_not :
MEDIA_SYM optional_only_or_not
Shift IDENT MEDIA_SYM optional_only_or_not IDENT
Reduce to media_type by:
media_type : IDENT
MEDIA_SYM optional_only_or_not media_type
+

+ +

+ + From here, we reduce by optional_and_exprs : regardless of what token + comes next.
+ + (This takes us to 254) + + +

+
+ +

State 160

+ +

+ +
media_type:IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to optional_only_or_not by:
optional_only_or_not :
MEDIA_SYM optional_only_or_not
Shift IDENT MEDIA_SYM optional_only_or_not IDENT
+

+ +

+ + From here, we reduce by media_type : IDENT regardless of what token + comes next.
+ + (This takes us to 159) + + +

+
+ +

State 161

+ +

+ +
media_query:media_expr optional_and_exprs .
optional_and_exprs:optional_and_exprs . AND media_expr

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space
Shift RPAREN MEDIA_SYM LPAREN optional_space IDENT optional_space RPAREN
Reduce to media_expr by:
media_expr : LPAREN optional_space IDENT optional_space RPAREN
MEDIA_SYM media_expr
Reduce to optional_and_exprs by:
optional_and_exprs :
MEDIA_SYM media_expr optional_and_exprs
+

+ +

+ + Action table:
+
Lookahead tokenAction
ANDShift and go to state 255
OtherReduce by media_query : media_expr optional_and_exprs
(This can take us to 69 or 253)
+ +

+
+ +

State 162

+ +

+ +
media_expr:LPAREN optional_space . IDENT optional_space RPAREN
media_expr:LPAREN optional_space . IDENT optional_space COLON optional_space expr RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 256
OtherError
+ +

+
+ +

State 163

+ +

+ +
optional_space:S .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Shift S MEDIA_SYM LPAREN S
+

+ +

+ + From here, we reduce by optional_space : S regardless of what token + comes next.
+ + (This can take us to 162, 249, 299, 309, 315, 337, 341, 350 or 353) + + +

+
+ +

State 164

+ +

+ +
document_query:start_document_query body RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
Reduce to url_match_fns by:
url_match_fns : url_match_fn
start_document_query_pos url_match_fns
Shift LBRACE start_document_query_pos url_match_fns LBRACE
Reduce to start_document_query by:
start_document_query : start_document_query_pos url_match_fns LBRACE
start_document_query
Shift IDENT start_document_query IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
start_document_query ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
start_document_query element_name
Reduce to simple_selector by:
simple_selector : element_name
start_document_query simple_selector
Reduce to selector by:
selector : simple_selector
start_document_query selector
Reduce to selectors by:
selectors : selector
start_document_query selectors
Shift LBRACE start_document_query selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_document_query start_selector
Shift RBRACE start_document_query start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
start_document_query ruleset
Reduce to body by:
body : ruleset
start_document_query body
Shift RBRACE start_document_query body RBRACE
+

+ +

+ + From here, we reduce by document_query : start_document_query body RBRACE regardless of what token + comes next.
+ + (This takes us to 17) + + +

+
+ +

State 165

+ +

+ +
start_document_query:start_document_query_pos url_match_fns LBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
Reduce to url_match_fns by:
url_match_fns : url_match_fn
start_document_query_pos url_match_fns
Shift LBRACE start_document_query_pos url_match_fns LBRACE
+

+ +

+ + From here, we reduce by start_document_query : start_document_query_pos url_match_fns LBRACE regardless of what token + comes next.
+ + (This takes us to 21) + + +

+
+ +

State 166

+ +

+ +
url_match_fns:url_match_fn COMMA . url_match_fns

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
Shift COMMA start_document_query_pos url_match_fn COMMA
+

+ +

+ + Action table:
+
Lookahead tokenAction
FUNCTIONShift and go to state 83
URIShift and go to state 85
FUNCTION_NO_QUOTEShift and go to state 84
OtherError
+ +

+
+ +

State 167

+ +

+ +
function_no_quote:function_no_quote S .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Shift S start_document_query_pos function_no_quote S
+

+ +

+ + From here, we reduce by function_no_quote : function_no_quote S regardless of what token + comes next.
+ + (This takes us to 80) + + +

+
+ +

State 168

+ +

+ +
function:function S .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift RPAREN start_document_query_pos FUNCTION RPAREN
Reduce to function by:
function : FUNCTION RPAREN
start_document_query_pos function
Shift S start_document_query_pos function S
+

+ +

+ + From here, we reduce by function : function S regardless of what token + comes next.
+ + (This can take us to 81, 179 or 267) + + +

+
+ +

State 169

+ +

+ +
uri:uri S .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift URI start_document_query_pos URI
Reduce to uri by:
uri : URI
start_document_query_pos uri
Shift S start_document_query_pos uri S
+

+ +

+ + From here, we reduce by uri : uri S regardless of what token + comes next.
+ + (This can take us to 82 or 176) + + +

+
+ +

State 170

+ +

+ +
resolution:RESOLUTION .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift RESOLUTION start_document_query_pos FUNCTION RESOLUTION
+

+ +

+ + From here, we reduce by resolution : RESOLUTION regardless of what token + comes next.
+ + (This takes us to 180) + + +

+
+ +

State 171

+ +

+ +
expr:term . operator expr
expr:term . expr
expr:term .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 188
IDENTShift and go to state 59
COMMAShift and go to state 258
HASHShift and go to state 187
EQUALShift and go to state 260
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
SLASHShift and go to state 259
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
URIShift and go to state 85
RESOLUTIONShift and go to state 170
VARIABLE_NAMEShift and go to state 181
CALC_SYMShift and go to state 186
UNICODE_RANGEShift and go to state 185
RATIOShift and go to state 196
OtherReduce by expr : term
(This can take us to 183, 262, 284, 310, 320, 321, 349 or 358)
+ +

+
+ +

State 172

+ +

+ +
term:ident .
ident:ident . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 155
OtherReduce by term : ident
(This takes us to 171)
+ +

+
+ +

State 173

+ +

+ +
term:ratio .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift RATIO start_document_query_pos FUNCTION RATIO
Reduce to ratio by:
ratio : RATIO
start_document_query_pos FUNCTION ratio
+

+ +

+ + From here, we reduce by term : ratio regardless of what token + comes next.
+ + (This takes us to 171) + + +

+
+ +

State 174

+ +

+ +
term:numeric .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift NUMBER start_document_query_pos FUNCTION NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION numeric
+

+ +

+ + From here, we reduce by term : numeric regardless of what token + comes next.
+ + (This takes us to 171) + + +

+
+ +

State 175

+ +

+ +
term:string .
string:string . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift STRING start_document_query_pos FUNCTION STRING
Reduce to string by:
string : STRING
start_document_query_pos FUNCTION string
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 263
OtherReduce by term : string
(This takes us to 171)
+ +

+
+ +

State 176

+ +

+ +
term:uri .
uri:uri . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift URI start_document_query_pos FUNCTION URI
Reduce to uri by:
uri : URI
start_document_query_pos FUNCTION uri
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 169
OtherReduce by term : uri
(This takes us to 171)
+ +

+
+ +

State 177

+ +

+ +
term:hexcolor .
hexcolor:hexcolor . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift HASH start_document_query_pos FUNCTION HASH
Reduce to hexcolor by:
hexcolor : HASH
start_document_query_pos FUNCTION hexcolor
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 264
OtherReduce by term : hexcolor
(This takes us to 171)
+ +

+
+ +

State 178

+ +

+ +
term:calc .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product
Reduce to calc_sum by:
calc_sum : calc_product
start_document_query_pos FUNCTION CALC_SYM calc_sum
Shift RPAREN start_document_query_pos FUNCTION CALC_SYM calc_sum RPAREN
Reduce to optional_space by:
optional_space :
start_document_query_pos FUNCTION CALC_SYM calc_sum RPAREN optional_space
Reduce to calc by:
calc : CALC_SYM calc_sum RPAREN optional_space
start_document_query_pos FUNCTION calc
+

+ +

+ + From here, we reduce by term : calc regardless of what token + comes next.
+ + (This takes us to 171) + + +

+
+ +

State 179

+ +

+ +
term:function .
function:function . S

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift FUNCTION start_document_query_pos FUNCTION FUNCTION
Shift RPAREN start_document_query_pos FUNCTION FUNCTION RPAREN
Reduce to function by:
function : FUNCTION RPAREN
start_document_query_pos FUNCTION function
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 168
OtherReduce by term : function
(This takes us to 171)
+ +

+
+ +

State 180

+ +

+ +
term:resolution .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift RESOLUTION start_document_query_pos FUNCTION RESOLUTION
Reduce to resolution by:
resolution : RESOLUTION
start_document_query_pos FUNCTION resolution
+

+ +

+ + From here, we reduce by term : resolution regardless of what token + comes next.
+ + (This takes us to 171) + + +

+
+ +

State 181

+ +

+ +
term:VARIABLE_NAME .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift VARIABLE_NAME start_document_query_pos FUNCTION VARIABLE_NAME
+

+ +

+ + From here, we reduce by term : VARIABLE_NAME regardless of what token + comes next.
+ + (This takes us to 171) + + +

+
+ +

State 182

+ +

+ +
term:uranges .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift UNICODE_RANGE start_document_query_pos FUNCTION UNICODE_RANGE
Reduce to uranges by:
uranges : UNICODE_RANGE
start_document_query_pos FUNCTION uranges
+

+ +

+ + From here, we reduce by term : uranges regardless of what token + comes next.
+ + (This takes us to 171) + + +

+
+ +

State 183

+ +

+ +
function:FUNCTION expr . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term
Reduce to expr by:
expr : term
start_document_query_pos FUNCTION expr
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 265
OtherError
+ +

+
+ +

State 184

+ +

+ +
function:FUNCTION RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift RPAREN start_document_query_pos FUNCTION RPAREN
+

+ +

+ + From here, we reduce by function : FUNCTION RPAREN regardless of what token + comes next.
+ + (This can take us to 81, 179 or 267) + + +

+
+ +

State 185

+ +

+ +
uranges:UNICODE_RANGE . COMMA uranges
uranges:UNICODE_RANGE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift UNICODE_RANGE start_document_query_pos FUNCTION UNICODE_RANGE
+

+ +

+ + Action table:
+
Lookahead tokenAction
COMMAShift and go to state 266
(Overridden: reduce by uranges : UNICODE_RANGE)
OtherReduce by uranges : UNICODE_RANGE
(This can take us to 182 or 311)
+ +

+
+ +

State 186

+ +

+ +
calc:CALC_SYM . calc_sum RPAREN optional_space

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 272
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
OtherError
+ +

+
+ +

State 187

+ +

+ +
hexcolor:HASH .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift HASH start_document_query_pos FUNCTION HASH
+

+ +

+ + From here, we reduce by hexcolor : HASH regardless of what token + comes next.
+ + (This takes us to 177) + + +

+
+ +

State 188

+ +

+ +
string:STRING .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift STRING start_document_query_pos FUNCTION STRING
+

+ +

+ + From here, we reduce by string : STRING regardless of what token + comes next.
+ + (This takes us to 175) + + +

+
+ +

State 189

+ +

+ +
numeric:unary_operator . numeric

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift MINUS start_document_query_pos FUNCTION MINUS
Reduce to unary_operator by:
unary_operator : MINUS
start_document_query_pos FUNCTION unary_operator
+

+ +

+ + Action table:
+
Lookahead tokenAction
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
OtherError
+ +

+
+ +

State 190

+ +

+ +
numeric:NUMBER .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift NUMBER start_document_query_pos FUNCTION NUMBER
+

+ +

+ + From here, we reduce by numeric : NUMBER regardless of what token + comes next.
+ + (This can take us to 174, 271 or 273) + + +

+
+ +

State 191

+ +

+ +
numeric:PERCENTAGE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift PERCENTAGE start_document_query_pos FUNCTION PERCENTAGE
+

+ +

+ + From here, we reduce by numeric : PERCENTAGE regardless of what token + comes next.
+ + (This can take us to 174, 271 or 273) + + +

+
+ +

State 192

+ +

+ +
numeric:LENGTH .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift LENGTH start_document_query_pos FUNCTION LENGTH
+

+ +

+ + From here, we reduce by numeric : LENGTH regardless of what token + comes next.
+ + (This can take us to 174, 271 or 273) + + +

+
+ +

State 193

+ +

+ +
numeric:ANGLE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift ANGLE start_document_query_pos FUNCTION ANGLE
+

+ +

+ + From here, we reduce by numeric : ANGLE regardless of what token + comes next.
+ + (This can take us to 174, 271 or 273) + + +

+
+ +

State 194

+ +

+ +
numeric:TIME .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift TIME start_document_query_pos FUNCTION TIME
+

+ +

+ + From here, we reduce by numeric : TIME regardless of what token + comes next.
+ + (This can take us to 174, 271 or 273) + + +

+
+ +

State 195

+ +

+ +
numeric:FREQ .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift FREQ start_document_query_pos FUNCTION FREQ
+

+ +

+ + From here, we reduce by numeric : FREQ regardless of what token + comes next.
+ + (This can take us to 174, 271 or 273) + + +

+
+ +

State 196

+ +

+ +
ratio:RATIO .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift RATIO start_document_query_pos FUNCTION RATIO
+

+ +

+ + From here, we reduce by ratio : RATIO regardless of what token + comes next.
+ + (This takes us to 173) + + +

+
+ +

State 197

+ +

+ +
unary_operator:MINUS .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift MINUS start_document_query_pos FUNCTION MINUS
+

+ +

+ + From here, we reduce by unary_operator : MINUS regardless of what token + comes next.
+ + (This takes us to 189) + + +

+
+ +

State 198

+ +

+ +
unary_operator:PLUS .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift PLUS start_document_query_pos FUNCTION PLUS
+

+ +

+ + From here, we reduce by unary_operator : PLUS regardless of what token + comes next.
+ + (This takes us to 189) + + +

+
+ +

State 199

+ +

+ +
supports:start_supports body RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Reduce to supports_condition_root by:
supports_condition_root : supports_condition_in_parens
SUPPORTS_SYM supports_condition_root
Shift LBRACE SUPPORTS_SYM supports_condition_root LBRACE
Reduce to start_supports by:
start_supports : SUPPORTS_SYM supports_condition_root LBRACE
start_supports
Shift IDENT start_supports IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
start_supports ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
start_supports element_name
Reduce to simple_selector by:
simple_selector : element_name
start_supports simple_selector
Reduce to selector by:
selector : simple_selector
start_supports selector
Reduce to selectors by:
selectors : selector
start_supports selectors
Shift LBRACE start_supports selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_supports start_selector
Shift RBRACE start_supports start_selector RBRACE
Reduce to ruleset by:
ruleset : start_selector RBRACE
start_supports ruleset
Reduce to body by:
body : ruleset
start_supports body
Shift RBRACE start_supports body RBRACE
+

+ +

+ + From here, we reduce by supports : start_supports body RBRACE regardless of what token + comes next.
+ + (This takes us to 18) + + +

+
+ +

State 200

+ +

+ +
start_supports:SUPPORTS_SYM supports_condition_root LBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Reduce to supports_condition_root by:
supports_condition_root : supports_condition_in_parens
SUPPORTS_SYM supports_condition_root
Shift LBRACE SUPPORTS_SYM supports_condition_root LBRACE
+

+ +

+ + From here, we reduce by start_supports : SUPPORTS_SYM supports_condition_root LBRACE regardless of what token + comes next.
+ + (This takes us to 24) + + +

+
+ +

State 201

+ +

+ +
supports_conjunction:supports_conjunction_or_disjunction AND . supports_condition_in_parens

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift AND SUPPORTS_SYM supports_condition_in_parens AND
Shift LPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property
Shift COLON SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_condition_in_parens AND supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens AND supports_condition_in_parens
Reduce to supports_conjunction by:
supports_conjunction : supports_condition_in_parens AND supports_condition_in_parens
SUPPORTS_SYM supports_conjunction
Reduce to supports_conjunction_or_disjunction by:
supports_conjunction_or_disjunction : supports_conjunction
SUPPORTS_SYM supports_conjunction_or_disjunction
Shift AND SUPPORTS_SYM supports_conjunction_or_disjunction AND
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 92
OtherError
+ +

+
+ +

State 202

+ +

+ +
supports_disjunction:supports_conjunction_or_disjunction OR . supports_condition_in_parens

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift AND SUPPORTS_SYM supports_condition_in_parens AND
Shift LPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property
Shift COLON SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_condition_in_parens AND supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens AND supports_condition_in_parens
Reduce to supports_conjunction by:
supports_conjunction : supports_condition_in_parens AND supports_condition_in_parens
SUPPORTS_SYM supports_conjunction
Reduce to supports_conjunction_or_disjunction by:
supports_conjunction_or_disjunction : supports_conjunction
SUPPORTS_SYM supports_conjunction_or_disjunction
Shift OR SUPPORTS_SYM supports_conjunction_or_disjunction OR
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 92
OtherError
+ +

+
+ +

State 203

+ +

+ +
supports_conjunction:supports_condition_in_parens AND . supports_condition_in_parens

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift AND SUPPORTS_SYM supports_condition_in_parens AND
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 92
OtherError
+ +

+
+ +

State 204

+ +

+ +
supports_disjunction:supports_condition_in_parens OR . supports_condition_in_parens

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift OR SUPPORTS_SYM supports_condition_in_parens OR
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 92
OtherError
+ +

+
+ +

State 205

+ +

+ +
supports_condition:supports_negation .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift NOT SUPPORTS_SYM LPAREN NOT
Shift LPAREN SUPPORTS_SYM LPAREN NOT LPAREN
Shift IDENT SUPPORTS_SYM LPAREN NOT LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN NOT LPAREN property
Shift COLON SUPPORTS_SYM LPAREN NOT LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN NOT LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN NOT LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN NOT LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN NOT LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN NOT LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN NOT LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN NOT LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM LPAREN NOT supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM LPAREN NOT supports_condition_in_parens
Reduce to supports_negation by:
supports_negation : NOT supports_condition_in_parens
SUPPORTS_SYM LPAREN supports_negation
+

+ +

+ + From here, we reduce by supports_condition : supports_negation regardless of what token + comes next.
+ + (This takes us to 208) + + +

+
+ +

State 206

+ +

+ +
supports_condition:supports_conjunction_or_disjunction .
supports_conjunction:supports_conjunction_or_disjunction . AND supports_condition_in_parens
supports_disjunction:supports_conjunction_or_disjunction . OR supports_condition_in_parens

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift LPAREN SUPPORTS_SYM LPAREN LPAREN
Shift IDENT SUPPORTS_SYM LPAREN LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN LPAREN property
Shift COLON SUPPORTS_SYM LPAREN LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM LPAREN supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM LPAREN supports_condition_in_parens
Shift AND SUPPORTS_SYM LPAREN supports_condition_in_parens AND
Shift LPAREN SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN
Shift IDENT SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN property
Shift COLON SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN supports_condition_in_parens AND LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM LPAREN supports_condition_in_parens AND supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM LPAREN supports_condition_in_parens AND supports_condition_in_parens
Reduce to supports_conjunction by:
supports_conjunction : supports_condition_in_parens AND supports_condition_in_parens
SUPPORTS_SYM LPAREN supports_conjunction
Reduce to supports_conjunction_or_disjunction by:
supports_conjunction_or_disjunction : supports_conjunction
SUPPORTS_SYM LPAREN supports_conjunction_or_disjunction
+

+ +

+ + Action table:
+
Lookahead tokenAction
ANDShift and go to state 201
ORShift and go to state 202
OtherReduce by supports_condition : supports_conjunction_or_disjunction
(This takes us to 208)
+ +

+
+ +

State 207

+ +

+ +
supports_condition:supports_condition_in_parens .
supports_conjunction:supports_condition_in_parens . AND supports_condition_in_parens
supports_disjunction:supports_condition_in_parens . OR supports_condition_in_parens

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift LPAREN SUPPORTS_SYM LPAREN LPAREN
Shift IDENT SUPPORTS_SYM LPAREN LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN LPAREN property
Shift COLON SUPPORTS_SYM LPAREN LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM LPAREN supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM LPAREN supports_condition_in_parens
+

+ +

+ + Action table:
+
Lookahead tokenAction
ANDShift and go to state 203
ORShift and go to state 204
OtherReduce by supports_condition : supports_condition_in_parens
(This takes us to 208)
+ +

+
+ +

State 208

+ +

+ +
supports_condition_in_parens:LPAREN supports_condition . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift LPAREN SUPPORTS_SYM LPAREN LPAREN
Shift IDENT SUPPORTS_SYM LPAREN LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN LPAREN property
Shift COLON SUPPORTS_SYM LPAREN LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM LPAREN supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM LPAREN supports_condition_in_parens
Reduce to supports_condition by:
supports_condition : supports_condition_in_parens
SUPPORTS_SYM LPAREN supports_condition
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 278
OtherError
+ +

+
+ +

State 209

+ +

+ +
supports_declaration_condition:LPAREN declaration_internal . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 279
OtherError
+ +

+
+ +

State 210

+ +

+ +
supports_declaration_condition:LPAREN S . declaration_internal RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift S SUPPORTS_SYM LPAREN S
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 113
STARShift and go to state 114
VARIABLE_NAMEShift and go to state 115
OtherError
+ +

+
+ +

State 211

+ +

+ +
supports_negation:NOT supports_condition_in_parens .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift NOT SUPPORTS_SYM NOT
Shift LPAREN SUPPORTS_SYM NOT LPAREN
Shift IDENT SUPPORTS_SYM NOT LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM NOT LPAREN property
Shift COLON SUPPORTS_SYM NOT LPAREN property COLON
Shift IDENT SUPPORTS_SYM NOT LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM NOT LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM NOT LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM NOT LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM NOT LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM NOT LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM NOT LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM NOT supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM NOT supports_condition_in_parens
+

+ +

+ + From here, we reduce by supports_negation : NOT supports_condition_in_parens regardless of what token + comes next.
+ + (This can take us to 89 or 205) + + +

+
+ +

State 212

+ +

+ +
keyframes_rule:start_keyframes_rule keyframes_blocks RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_selectors LBRACE
Reduce to start_keyframes_block by:
start_keyframes_block : keyframes_selectors LBRACE
start_keyframes_rule start_keyframes_block
Shift RBRACE start_keyframes_rule start_keyframes_block RBRACE
Reduce to keyframes_block by:
keyframes_block : start_keyframes_block RBRACE
start_keyframes_rule keyframes_block
Reduce to keyframes_blocks by:
keyframes_blocks : keyframes_block
start_keyframes_rule keyframes_blocks
Shift RBRACE start_keyframes_rule keyframes_blocks RBRACE
+

+ +

+ + From here, we reduce by keyframes_rule : start_keyframes_rule keyframes_blocks RBRACE regardless of what token + comes next.
+ + (This takes us to 14) + + +

+
+ +

State 213

+ +

+ +
keyframes_blocks:keyframes_block keyframes_blocks .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_selectors LBRACE
Reduce to start_keyframes_block by:
start_keyframes_block : keyframes_selectors LBRACE
start_keyframes_rule start_keyframes_block
Shift RBRACE start_keyframes_rule start_keyframes_block RBRACE
Reduce to keyframes_block by:
keyframes_block : start_keyframes_block RBRACE
start_keyframes_rule keyframes_block
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_block keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_block keyframes_selectors LBRACE
Reduce to start_keyframes_block by:
start_keyframes_block : keyframes_selectors LBRACE
start_keyframes_rule keyframes_block start_keyframes_block
Shift RBRACE start_keyframes_rule keyframes_block start_keyframes_block RBRACE
Reduce to keyframes_block by:
keyframes_block : start_keyframes_block RBRACE
start_keyframes_rule keyframes_block keyframes_block
Reduce to keyframes_blocks by:
keyframes_blocks : keyframes_block
start_keyframes_rule keyframes_block keyframes_blocks
+

+ +

+ + From here, we reduce by keyframes_blocks : keyframes_block keyframes_blocks regardless of what token + comes next.
+ + (This can take us to 97 or 213) + + +

+
+ +

State 214

+ +

+ +
keyframes_block:start_keyframes_block declarations . RBRACE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_selectors LBRACE
Reduce to start_keyframes_block by:
start_keyframes_block : keyframes_selectors LBRACE
start_keyframes_rule start_keyframes_block
Shift SEMI start_keyframes_rule start_keyframes_block SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_keyframes_rule start_keyframes_block one_or_more_semis
Reduce to declarations by:
declarations : one_or_more_semis
start_keyframes_rule start_keyframes_block declarations
+

+ +

+ + Action table:
+
Lookahead tokenAction
RBRACEShift and go to state 281
OtherError
+ +

+
+ +

State 215

+ +

+ +
keyframes_block:start_keyframes_block RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_selectors LBRACE
Reduce to start_keyframes_block by:
start_keyframes_block : keyframes_selectors LBRACE
start_keyframes_rule start_keyframes_block
Shift RBRACE start_keyframes_rule start_keyframes_block RBRACE
+

+ +

+ + From here, we reduce by keyframes_block : start_keyframes_block RBRACE regardless of what token + comes next.
+ + (This takes us to 99) + + +

+
+ +

State 216

+ +

+ +
start_keyframes_block:keyframes_selectors LBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_selectors LBRACE
+

+ +

+ + From here, we reduce by start_keyframes_block : keyframes_selectors LBRACE regardless of what token + comes next.
+ + (This takes us to 100) + + +

+
+ +

State 217

+ +

+ +
keyframes_selectors:keyframes_selector COMMA . keyframes_selectors

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Shift IDENT start_keyframes_rule IDENT
Reduce to keyframes_selector by:
keyframes_selector : IDENT
start_keyframes_rule keyframes_selector
Shift COMMA start_keyframes_rule keyframes_selector COMMA
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 103
PERCENTAGEShift and go to state 104
OtherReduce by keyframes_selectors :
(This takes us to 282)
+ +

+
+ +

State 218

+ +

+ +
start_keyframes_rule:KEYFRAMES_SYM IDENT LBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
+

+ +

+ + From here, we reduce by start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE regardless of what token + comes next.
+ + (This takes us to 26) + + +

+
+ +

State 219

+ +

+ +
fontface_rule:start_fontface_rule declarations RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift SEMI start_fontface_rule SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_fontface_rule one_or_more_semis
Reduce to declarations by:
declarations : one_or_more_semis
start_fontface_rule declarations
Shift RBRACE start_fontface_rule declarations RBRACE
+

+ +

+ + From here, we reduce by fontface_rule : start_fontface_rule declarations RBRACE regardless of what token + comes next.
+ + (This takes us to 15) + + +

+
+ +

State 220

+ +

+ +
one_or_more_semis:SEMI one_or_more_semis .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift SEMI start_fontface_rule SEMI
Shift SEMI start_fontface_rule SEMI SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_fontface_rule SEMI one_or_more_semis
+

+ +

+ + From here, we reduce by one_or_more_semis : SEMI one_or_more_semis regardless of what token + comes next.
+ + (This can take us to 110, 220 or 221) + + +

+
+ +

State 221

+ +

+ +
declarations:declaration one_or_more_semis . declarations
declarations:declaration one_or_more_semis .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift IDENT start_fontface_rule IDENT
Reduce to property by:
property : IDENT
start_fontface_rule property
Shift COLON start_fontface_rule property COLON
Shift IDENT start_fontface_rule property COLON IDENT
Reduce to ident by:
ident : IDENT
start_fontface_rule property COLON ident
Reduce to term by:
term : ident
start_fontface_rule property COLON term
Reduce to expr by:
expr : term
start_fontface_rule property COLON expr
Reduce to prio by:
prio :
start_fontface_rule property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
start_fontface_rule declaration_internal
Reduce to declaration by:
declaration : declaration_internal
start_fontface_rule declaration
Shift SEMI start_fontface_rule declaration SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_fontface_rule declaration one_or_more_semis
+

+ +

+ + Action table:
+
Lookahead tokenAction
SEMIShift and go to state 108
IDENTShift and go to state 113
STARShift and go to state 114
VARIABLE_NAMEShift and go to state 115
OtherReduce by declarations : declaration one_or_more_semis
(This can take us to 106, 117, 214, 222 or 283)
+ +

+
+ +

State 222

+ +

+ +
declarations:one_or_more_semis declarations .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift SEMI start_fontface_rule SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_fontface_rule one_or_more_semis
Shift SEMI start_fontface_rule one_or_more_semis SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_fontface_rule one_or_more_semis one_or_more_semis
Reduce to declarations by:
declarations : one_or_more_semis
start_fontface_rule one_or_more_semis declarations
+

+ +

+ + From here, we reduce by declarations : one_or_more_semis declarations regardless of what token + comes next.
+ + (This can take us to 106, 117, 214, 222 or 283) + + +

+
+ +

State 223

+ +

+ +
declaration_internal:property COLON . expr prio
declaration_internal:property COLON . S expr prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 188
IDENTShift and go to state 59
SShift and go to state 285
HASHShift and go to state 187
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
URIShift and go to state 85
RESOLUTIONShift and go to state 170
VARIABLE_NAMEShift and go to state 181
CALC_SYMShift and go to state 186
UNICODE_RANGEShift and go to state 185
RATIOShift and go to state 196
OtherError
+ +

+
+ +

State 224

+ +

+ +
declaration_internal:property S . COLON expr prio
declaration_internal:property S . COLON S expr prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift S SUPPORTS_SYM LPAREN property S
+

+ +

+ + Action table:
+
Lookahead tokenAction
COLONShift and go to state 286
OtherError
+ +

+
+ +

State 225

+ +

+ +
property:STAR IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift STAR SUPPORTS_SYM LPAREN STAR
Shift IDENT SUPPORTS_SYM LPAREN STAR IDENT
+

+ +

+ + From here, we reduce by property : STAR IDENT regardless of what token + comes next.
+ + (This takes us to 112) + + +

+
+ +

State 226

+ +

+ +
ruleset:start_selector declarations RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Reduce to selectors by:
selectors : selector
selectors
Shift LBRACE selectors LBRACE
Reduce to start_selector by:
start_selector : selectors LBRACE
start_selector
Shift SEMI start_selector SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_selector one_or_more_semis
Reduce to declarations by:
declarations : one_or_more_semis
start_selector declarations
Shift RBRACE start_selector declarations RBRACE
+

+ +

+ + From here, we reduce by ruleset : start_selector declarations RBRACE regardless of what token + comes next.
+ + (This takes us to 12) + + +

+
+ +

State 227

+ +

+ +
selectors:selector COMMA selectors .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Reduce to selector by:
selector : simple_selector
selector
Shift COMMA selector COMMA
Shift IDENT selector COMMA IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
selector COMMA ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
selector COMMA element_name
Reduce to simple_selector by:
simple_selector : element_name
selector COMMA simple_selector
Reduce to selector by:
selector : simple_selector
selector COMMA selector
Reduce to selectors by:
selectors : selector
selector COMMA selectors
+

+ +

+ + From here, we reduce by selectors : selector COMMA selectors regardless of what token + comes next.
+ + (This can take us to 32 or 227) + + +

+
+ +

State 228

+ +

+ +
selector:simple_selector combinator selector .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector
Shift S simple_selector S
Reduce to combinator by:
combinator : S
simple_selector combinator
Shift IDENT simple_selector combinator IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
simple_selector combinator ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
simple_selector combinator element_name
Reduce to simple_selector by:
simple_selector : element_name
simple_selector combinator simple_selector
Reduce to selector by:
selector : simple_selector
simple_selector combinator selector
+

+ +

+ + From here, we reduce by selector : simple_selector combinator selector regardless of what token + comes next.
+ + (This can take us to 33 or 228) + + +

+
+ +

State 229

+ +

+ +
ident_with_namespace:IDENT "|" IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Shift "|" IDENT "|"
Shift IDENT IDENT "|" IDENT
+

+ +

+ + From here, we reduce by ident_with_namespace : IDENT "|" IDENT regardless of what token + comes next.
+ + (This can take us to 40 or 140) + + +

+
+ +

State 230

+ +

+ +
element_name:IDENT "|" STAR .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IDENT IDENT
Shift "|" IDENT "|"
Shift STAR IDENT "|" STAR
+

+ +

+ + From here, we reduce by element_name : IDENT "|" STAR regardless of what token + comes next.
+ + (This takes us to 35) + + +

+
+ +

State 231

+ +

+ +
ident_with_namespace:STAR "|" IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift STAR STAR
Shift "|" STAR "|"
Shift IDENT STAR "|" IDENT
+

+ +

+ + From here, we reduce by ident_with_namespace : STAR "|" IDENT regardless of what token + comes next.
+ + (This can take us to 40 or 140) + + +

+
+ +

State 232

+ +

+ +
element_name:STAR "|" STAR .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift STAR STAR
Shift "|" STAR "|"
Shift STAR STAR "|" STAR
+

+ +

+ + From here, we reduce by element_name : STAR "|" STAR regardless of what token + comes next.
+ + (This takes us to 35) + + +

+
+ +

State 233

+ +

+ +
ident_with_namespace:IDENT "|" . IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Shift "|" LSQUARE IDENT "|"
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 229
OtherError
+ +

+
+ +

State 234

+ +

+ +
ident_with_namespace:STAR "|" . IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift STAR LSQUARE STAR
Shift "|" LSQUARE STAR "|"
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 231
OtherError
+ +

+
+ +

State 235

+ +

+ +
attrib:LSQUARE ident_with_namespace EQUAL . IDENT RSQUARE
attrib:LSQUARE ident_with_namespace EQUAL . STRING RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift EQUAL LSQUARE ident_with_namespace EQUAL
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 288
IDENTShift and go to state 287
OtherError
+ +

+
+ +

State 236

+ +

+ +
attrib:LSQUARE ident_with_namespace INCLUDES . STRING RSQUARE
attrib:LSQUARE ident_with_namespace INCLUDES . IDENT RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift INCLUDES LSQUARE ident_with_namespace INCLUDES
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 289
IDENTShift and go to state 290
OtherError
+ +

+
+ +

State 237

+ +

+ +
attrib:LSQUARE ident_with_namespace DASHMATCH . IDENT RSQUARE
attrib:LSQUARE ident_with_namespace DASHMATCH . STRING RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift DASHMATCH LSQUARE ident_with_namespace DASHMATCH
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 292
IDENTShift and go to state 291
OtherError
+ +

+
+ +

State 238

+ +

+ +
attrib:LSQUARE ident_with_namespace PREFIXMATCH . IDENT RSQUARE
attrib:LSQUARE ident_with_namespace PREFIXMATCH . STRING RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift PREFIXMATCH LSQUARE ident_with_namespace PREFIXMATCH
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 294
IDENTShift and go to state 293
OtherError
+ +

+
+ +

State 239

+ +

+ +
attrib:LSQUARE ident_with_namespace SUFFIXMATCH . IDENT RSQUARE
attrib:LSQUARE ident_with_namespace SUFFIXMATCH . STRING RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUFFIXMATCH LSQUARE ident_with_namespace SUFFIXMATCH
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 296
IDENTShift and go to state 295
OtherError
+ +

+
+ +

State 240

+ +

+ +
attrib:LSQUARE ident_with_namespace SUBSTRINGMATCH . IDENT RSQUARE
attrib:LSQUARE ident_with_namespace SUBSTRINGMATCH . STRING RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUBSTRINGMATCH LSQUARE ident_with_namespace SUBSTRINGMATCH
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 298
IDENTShift and go to state 297
OtherError
+ +

+
+ +

State 241

+ +

+ +
attrib:LSQUARE ident_with_namespace RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift RSQUARE LSQUARE ident_with_namespace RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 242

+ +

+ +
pseudo:COLON COLON IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift COLON COLON COLON
Shift IDENT COLON COLON IDENT
+

+ +

+ + From here, we reduce by pseudo : COLON COLON IDENT regardless of what token + comes next.
+ + (This takes us to 44) + + +

+
+ +

State 243

+ +

+ +
pseudo:COLON COLON MOZ_PSEUDO_ELEMENT . optional_space any_number_of_idents optional_space RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift COLON COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON COLON MOZ_PSEUDO_ELEMENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 163
(Overridden: reduce by optional_space :)
OtherReduce by optional_space :
(This takes us to 299)
+ +

+
+ +

State 244

+ +

+ +
pseudo:COLON FUNCTION RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift FUNCTION COLON FUNCTION
Shift RPAREN COLON FUNCTION RPAREN
+

+ +

+ + From here, we reduce by pseudo : COLON FUNCTION RPAREN regardless of what token + comes next.
+ + (This takes us to 44) + + +

+
+ +

State 245

+ +

+ +
pseudo:COLON FUNCTION IDENT . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift FUNCTION COLON FUNCTION
Shift IDENT COLON FUNCTION IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 300
OtherError
+ +

+
+ +

State 246

+ +

+ +
pseudo:COLON NOT_PSEUDO_CLASS simple_selector . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift NOT_PSEUDO_CLASS COLON NOT_PSEUDO_CLASS
Shift IDENT COLON NOT_PSEUDO_CLASS IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
COLON NOT_PSEUDO_CLASS ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
COLON NOT_PSEUDO_CLASS element_name
Reduce to simple_selector by:
simple_selector : element_name
COLON NOT_PSEUDO_CLASS simple_selector
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 301
OtherError
+ +

+
+ +

State 247

+ +

+ +
simple_selectors:simple_selector . COMMA simple_selectors
simple_selectors:simple_selector .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MATCHES_PSEUDO_CLASS COLON MATCHES_PSEUDO_CLASS
Shift IDENT COLON MATCHES_PSEUDO_CLASS IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
COLON MATCHES_PSEUDO_CLASS ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
COLON MATCHES_PSEUDO_CLASS element_name
Reduce to simple_selector by:
simple_selector : element_name
COLON MATCHES_PSEUDO_CLASS simple_selector
+

+ +

+ + Action table:
+
Lookahead tokenAction
COMMAShift and go to state 302
OtherReduce by simple_selectors : simple_selector
(This can take us to 248 or 336)
+ +

+
+ +

State 248

+ +

+ +
pseudo:COLON MATCHES_PSEUDO_CLASS simple_selectors . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MATCHES_PSEUDO_CLASS COLON MATCHES_PSEUDO_CLASS
Shift IDENT COLON MATCHES_PSEUDO_CLASS IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
COLON MATCHES_PSEUDO_CLASS ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
COLON MATCHES_PSEUDO_CLASS element_name
Reduce to simple_selector by:
simple_selector : element_name
COLON MATCHES_PSEUDO_CLASS simple_selector
Reduce to simple_selectors by:
simple_selectors : simple_selector
COLON MATCHES_PSEUDO_CLASS simple_selectors
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 303
OtherError
+ +

+
+ +

State 249

+ +

+ +
pseudo:COLON MOZ_PSEUDO_ELEMENT optional_space . any_number_of_idents optional_space RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 306
OtherReduce by any_number_of_idents :
(This takes us to 304)
+ +

+
+ +

State 250

+ +

+ +
import:IMPORT_SYM import_location medium SEMI .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
Shift IDENT IMPORT_SYM import_location IDENT
Reduce to medium by:
medium : IDENT
IMPORT_SYM import_location medium
Shift SEMI IMPORT_SYM import_location medium SEMI
+

+ +

+ + From here, we reduce by import : IMPORT_SYM import_location medium SEMI regardless of what token + comes next.
+ + (This takes us to 6) + + +

+
+ +

State 251

+ +

+ +
medium:medium COMMA . IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
Shift IDENT IMPORT_SYM import_location IDENT
Reduce to medium by:
medium : IDENT
IMPORT_SYM import_location medium
Shift COMMA IMPORT_SYM import_location medium COMMA
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 307
OtherError
+ +

+
+ +

State 252

+ +

+ +
namespace:NAMESPACE_SYM ident import_location SEMI .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift NAMESPACE_SYM NAMESPACE_SYM
Shift IDENT NAMESPACE_SYM IDENT
Reduce to ident by:
ident : IDENT
NAMESPACE_SYM ident
Shift STRING NAMESPACE_SYM ident STRING
Reduce to import_location by:
import_location : STRING
NAMESPACE_SYM ident import_location
Shift SEMI NAMESPACE_SYM ident import_location SEMI
+

+ +

+ + From here, we reduce by namespace : NAMESPACE_SYM ident import_location SEMI regardless of what token + comes next.
+ + (This takes us to 7) + + +

+
+ +

State 253

+ +

+ +
media_query_list:media_query_list COMMA media_query .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to media_query_list by:
media_query_list :
MEDIA_SYM media_query_list
Shift COMMA MEDIA_SYM media_query_list COMMA
Reduce to optional_only_or_not by:
optional_only_or_not :
MEDIA_SYM media_query_list COMMA optional_only_or_not
Shift IDENT MEDIA_SYM media_query_list COMMA optional_only_or_not IDENT
Reduce to media_type by:
media_type : IDENT
MEDIA_SYM media_query_list COMMA optional_only_or_not media_type
Reduce to optional_and_exprs by:
optional_and_exprs :
MEDIA_SYM media_query_list COMMA optional_only_or_not media_type optional_and_exprs
Reduce to media_query by:
media_query : optional_only_or_not media_type optional_and_exprs
MEDIA_SYM media_query_list COMMA media_query
+

+ +

+ + From here, we reduce by media_query_list : media_query_list COMMA media_query regardless of what token + comes next.
+ + (This takes us to 70) + + +

+
+ +

State 254

+ +

+ +
media_query:optional_only_or_not media_type optional_and_exprs .
optional_and_exprs:optional_and_exprs . AND media_expr

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to optional_only_or_not by:
optional_only_or_not :
MEDIA_SYM optional_only_or_not
Shift IDENT MEDIA_SYM optional_only_or_not IDENT
Reduce to media_type by:
media_type : IDENT
MEDIA_SYM optional_only_or_not media_type
Reduce to optional_and_exprs by:
optional_and_exprs :
MEDIA_SYM optional_only_or_not media_type optional_and_exprs
+

+ +

+ + Action table:
+
Lookahead tokenAction
ANDShift and go to state 255
OtherReduce by media_query : optional_only_or_not media_type optional_and_exprs
(This can take us to 69 or 253)
+ +

+
+ +

State 255

+ +

+ +
optional_and_exprs:optional_and_exprs AND . media_expr

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to optional_only_or_not by:
optional_only_or_not :
MEDIA_SYM optional_only_or_not
Shift IDENT MEDIA_SYM optional_only_or_not IDENT
Reduce to media_type by:
media_type : IDENT
MEDIA_SYM optional_only_or_not media_type
Reduce to optional_and_exprs by:
optional_and_exprs :
MEDIA_SYM optional_only_or_not media_type optional_and_exprs
Shift AND MEDIA_SYM optional_only_or_not media_type optional_and_exprs AND
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 75
OtherError
+ +

+
+ +

State 256

+ +

+ +
media_expr:LPAREN optional_space IDENT . optional_space RPAREN
media_expr:LPAREN optional_space IDENT . optional_space COLON optional_space expr RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 163
OtherReduce by optional_space :
(This takes us to 309)
+ +

+
+ +

State 257

+ +

+ +
url_match_fns:url_match_fn COMMA url_match_fns .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION_NO_QUOTE start_document_query_pos FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn
Shift COMMA start_document_query_pos url_match_fn COMMA
Shift FUNCTION_NO_QUOTE start_document_query_pos url_match_fn COMMA FUNCTION_NO_QUOTE
Reduce to function_no_quote by:
function_no_quote : FUNCTION_NO_QUOTE
start_document_query_pos url_match_fn COMMA function_no_quote
Reduce to url_match_fn by:
url_match_fn : function_no_quote
start_document_query_pos url_match_fn COMMA url_match_fn
Reduce to url_match_fns by:
url_match_fns : url_match_fn
start_document_query_pos url_match_fn COMMA url_match_fns
+

+ +

+ + From here, we reduce by url_match_fns : url_match_fn COMMA url_match_fns regardless of what token + comes next.
+ + (This can take us to 78 or 257) + + +

+
+ +

State 258

+ +

+ +
operator:COMMA .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term
Shift COMMA start_document_query_pos FUNCTION term COMMA
+

+ +

+ + From here, we reduce by operator : COMMA regardless of what token + comes next.
+ + (This takes us to 261) + + +

+
+ +

State 259

+ +

+ +
operator:SLASH .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term
Shift SLASH start_document_query_pos FUNCTION term SLASH
+

+ +

+ + From here, we reduce by operator : SLASH regardless of what token + comes next.
+ + (This takes us to 261) + + +

+
+ +

State 260

+ +

+ +
operator:EQUAL .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term
Shift EQUAL start_document_query_pos FUNCTION term EQUAL
+

+ +

+ + From here, we reduce by operator : EQUAL regardless of what token + comes next.
+ + (This takes us to 261) + + +

+
+ +

State 261

+ +

+ +
expr:term operator . expr

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term
Shift COMMA start_document_query_pos FUNCTION term COMMA
Reduce to operator by:
operator : COMMA
start_document_query_pos FUNCTION term operator
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 188
IDENTShift and go to state 59
HASHShift and go to state 187
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
URIShift and go to state 85
RESOLUTIONShift and go to state 170
VARIABLE_NAMEShift and go to state 181
CALC_SYMShift and go to state 186
UNICODE_RANGEShift and go to state 185
RATIOShift and go to state 196
OtherError
+ +

+
+ +

State 262

+ +

+ +
expr:term expr .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term
Shift IDENT start_document_query_pos FUNCTION term IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION term ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term term
Reduce to expr by:
expr : term
start_document_query_pos FUNCTION term expr
+

+ +

+ + From here, we reduce by expr : term expr regardless of what token + comes next.
+ + (This can take us to 183, 262, 284, 310, 320, 321, 349 or 358) + + +

+
+ +

State 263

+ +

+ +
string:string S .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift STRING start_document_query_pos FUNCTION STRING
Reduce to string by:
string : STRING
start_document_query_pos FUNCTION string
Shift S start_document_query_pos FUNCTION string S
+

+ +

+ + From here, we reduce by string : string S regardless of what token + comes next.
+ + (This takes us to 175) + + +

+
+ +

State 264

+ +

+ +
hexcolor:hexcolor S .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift HASH start_document_query_pos FUNCTION HASH
Reduce to hexcolor by:
hexcolor : HASH
start_document_query_pos FUNCTION hexcolor
Shift S start_document_query_pos FUNCTION hexcolor S
+

+ +

+ + From here, we reduce by hexcolor : hexcolor S regardless of what token + comes next.
+ + (This takes us to 177) + + +

+
+ +

State 265

+ +

+ +
function:FUNCTION expr RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term
Reduce to expr by:
expr : term
start_document_query_pos FUNCTION expr
Shift RPAREN start_document_query_pos FUNCTION expr RPAREN
+

+ +

+ + From here, we reduce by function : FUNCTION expr RPAREN regardless of what token + comes next.
+ + (This can take us to 81, 179 or 267) + + +

+
+ +

State 266

+ +

+ +
uranges:UNICODE_RANGE COMMA . uranges

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift UNICODE_RANGE start_document_query_pos FUNCTION UNICODE_RANGE
Shift COMMA start_document_query_pos FUNCTION UNICODE_RANGE COMMA
+

+ +

+ + Action table:
+
Lookahead tokenAction
UNICODE_RANGEShift and go to state 185
OtherError
+ +

+
+ +

State 267

+ +

+ +
function:function . S
calc_value:function .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift FUNCTION start_document_query_pos FUNCTION CALC_SYM FUNCTION
Shift RPAREN start_document_query_pos FUNCTION CALC_SYM FUNCTION RPAREN
Reduce to function by:
function : FUNCTION RPAREN
start_document_query_pos FUNCTION CALC_SYM function
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 168
(Overridden: reduce by calc_value : function)
OtherReduce by calc_value : function
(This can take us to 270, 354 or 355)
+ +

+
+ +

State 268

+ +

+ +
calc:CALC_SYM calc_sum . RPAREN optional_space

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product
Reduce to calc_sum by:
calc_sum : calc_product
start_document_query_pos FUNCTION CALC_SYM calc_sum
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 312
OtherError
+ +

+
+ +

State 269

+ +

+ +
calc_sum:calc_product .
calc_sum:calc_product . PLUS calc_sum
calc_sum:calc_product . MINUS calc_sum

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product
+

+ +

+ + Action table:
+
Lookahead tokenAction
PLUSShift and go to state 313
MINUSShift and go to state 314
OtherReduce by calc_sum : calc_product
(This can take us to 268, 316, 342 or 343)
+ +

+
+ +

State 270

+ +

+ +
calc_product:calc_value .
calc_product:calc_value . optional_space STAR calc_value
calc_product:calc_value . optional_space SLASH calc_value

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 163
STARReduce by optional_space :
(This takes us to 315)
SLASHReduce by optional_space :
(This takes us to 315)
OtherReduce by calc_product : calc_value
(This takes us to 269)
+ +

+
+ +

State 271

+ +

+ +
calc_value:numeric .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
+

+ +

+ + From here, we reduce by calc_value : numeric regardless of what token + comes next.
+ + (This can take us to 270, 354 or 355) + + +

+
+ +

State 272

+ +

+ +
calc_value:LPAREN . calc_sum RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift LPAREN start_document_query_pos FUNCTION CALC_SYM LPAREN
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 272
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
OtherError
+ +

+
+ +

State 273

+ +

+ +
numeric:unary_operator numeric .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift MINUS start_document_query_pos FUNCTION MINUS
Reduce to unary_operator by:
unary_operator : MINUS
start_document_query_pos FUNCTION unary_operator
Shift NUMBER start_document_query_pos FUNCTION unary_operator NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION unary_operator numeric
+

+ +

+ + From here, we reduce by numeric : unary_operator numeric regardless of what token + comes next.
+ + (This can take us to 174, 271 or 273) + + +

+
+ +

State 274

+ +

+ +
supports_conjunction:supports_conjunction_or_disjunction AND supports_condition_in_parens .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift AND SUPPORTS_SYM supports_condition_in_parens AND
Shift LPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property
Shift COLON SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_condition_in_parens AND supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens AND supports_condition_in_parens
Reduce to supports_conjunction by:
supports_conjunction : supports_condition_in_parens AND supports_condition_in_parens
SUPPORTS_SYM supports_conjunction
Reduce to supports_conjunction_or_disjunction by:
supports_conjunction_or_disjunction : supports_conjunction
SUPPORTS_SYM supports_conjunction_or_disjunction
Shift AND SUPPORTS_SYM supports_conjunction_or_disjunction AND
Shift LPAREN SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN
Shift IDENT SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN property
Shift COLON SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_conjunction_or_disjunction AND LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_conjunction_or_disjunction AND supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_conjunction_or_disjunction AND supports_condition_in_parens
+

+ +

+ + From here, we reduce by supports_conjunction : supports_conjunction_or_disjunction AND supports_condition_in_parens regardless of what token + comes next.
+ + (This takes us to 95) + + +

+
+ +

State 275

+ +

+ +
supports_disjunction:supports_conjunction_or_disjunction OR supports_condition_in_parens .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift AND SUPPORTS_SYM supports_condition_in_parens AND
Shift LPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property
Shift COLON SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_condition_in_parens AND supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens AND supports_condition_in_parens
Reduce to supports_conjunction by:
supports_conjunction : supports_condition_in_parens AND supports_condition_in_parens
SUPPORTS_SYM supports_conjunction
Reduce to supports_conjunction_or_disjunction by:
supports_conjunction_or_disjunction : supports_conjunction
SUPPORTS_SYM supports_conjunction_or_disjunction
Shift OR SUPPORTS_SYM supports_conjunction_or_disjunction OR
Shift LPAREN SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN
Shift IDENT SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN property
Shift COLON SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_conjunction_or_disjunction OR LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_conjunction_or_disjunction OR supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_conjunction_or_disjunction OR supports_condition_in_parens
+

+ +

+ + From here, we reduce by supports_disjunction : supports_conjunction_or_disjunction OR supports_condition_in_parens regardless of what token + comes next.
+ + (This takes us to 96) + + +

+
+ +

State 276

+ +

+ +
supports_conjunction:supports_condition_in_parens AND supports_condition_in_parens .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift AND SUPPORTS_SYM supports_condition_in_parens AND
Shift LPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property
Shift COLON SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_condition_in_parens AND LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_condition_in_parens AND LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_condition_in_parens AND supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens AND supports_condition_in_parens
+

+ +

+ + From here, we reduce by supports_conjunction : supports_condition_in_parens AND supports_condition_in_parens regardless of what token + comes next.
+ + (This takes us to 95) + + +

+
+ +

State 277

+ +

+ +
supports_disjunction:supports_condition_in_parens OR supports_condition_in_parens .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens
Shift OR SUPPORTS_SYM supports_condition_in_parens OR
Shift LPAREN SUPPORTS_SYM supports_condition_in_parens OR LPAREN
Shift IDENT SUPPORTS_SYM supports_condition_in_parens OR LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property
Shift COLON SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON
Shift IDENT SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM supports_condition_in_parens OR LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM supports_condition_in_parens OR LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM supports_condition_in_parens OR LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM supports_condition_in_parens OR supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM supports_condition_in_parens OR supports_condition_in_parens
+

+ +

+ + From here, we reduce by supports_disjunction : supports_condition_in_parens OR supports_condition_in_parens regardless of what token + comes next.
+ + (This takes us to 96) + + +

+
+ +

State 278

+ +

+ +
supports_condition_in_parens:LPAREN supports_condition RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift LPAREN SUPPORTS_SYM LPAREN LPAREN
Shift IDENT SUPPORTS_SYM LPAREN LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN LPAREN property
Shift COLON SUPPORTS_SYM LPAREN LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN LPAREN declaration_internal RPAREN
Reduce to supports_declaration_condition by:
supports_declaration_condition : LPAREN declaration_internal RPAREN
SUPPORTS_SYM LPAREN supports_declaration_condition
Reduce to supports_condition_in_parens by:
supports_condition_in_parens : supports_declaration_condition
SUPPORTS_SYM LPAREN supports_condition_in_parens
Reduce to supports_condition by:
supports_condition : supports_condition_in_parens
SUPPORTS_SYM LPAREN supports_condition
Shift RPAREN SUPPORTS_SYM LPAREN supports_condition RPAREN
+

+ +

+ + From here, we reduce by supports_condition_in_parens : LPAREN supports_condition RPAREN regardless of what token + comes next.
+ + (This can take us to 91, 207, 211, 274, 275, 276 or 277) + + +

+
+ +

State 279

+ +

+ +
supports_declaration_condition:LPAREN declaration_internal RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN declaration_internal RPAREN
+

+ +

+ + From here, we reduce by supports_declaration_condition : LPAREN declaration_internal RPAREN regardless of what token + comes next.
+ + (This takes us to 93) + + +

+
+ +

State 280

+ +

+ +
supports_declaration_condition:LPAREN S declaration_internal . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift S SUPPORTS_SYM LPAREN S
Shift IDENT SUPPORTS_SYM LPAREN S IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN S property
Shift COLON SUPPORTS_SYM LPAREN S property COLON
Shift IDENT SUPPORTS_SYM LPAREN S property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN S property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN S property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN S property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN S property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN S declaration_internal
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 317
OtherError
+ +

+
+ +

State 281

+ +

+ +
keyframes_block:start_keyframes_block declarations RBRACE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selectors
Shift LBRACE start_keyframes_rule keyframes_selectors LBRACE
Reduce to start_keyframes_block by:
start_keyframes_block : keyframes_selectors LBRACE
start_keyframes_rule start_keyframes_block
Shift SEMI start_keyframes_rule start_keyframes_block SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_keyframes_rule start_keyframes_block one_or_more_semis
Reduce to declarations by:
declarations : one_or_more_semis
start_keyframes_rule start_keyframes_block declarations
Shift RBRACE start_keyframes_rule start_keyframes_block declarations RBRACE
+

+ +

+ + From here, we reduce by keyframes_block : start_keyframes_block declarations RBRACE regardless of what token + comes next.
+ + (This takes us to 99) + + +

+
+ +

State 282

+ +

+ +
keyframes_selectors:keyframes_selector COMMA keyframes_selectors .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift KEYFRAMES_SYM KEYFRAMES_SYM
Shift IDENT KEYFRAMES_SYM IDENT
Shift LBRACE KEYFRAMES_SYM IDENT LBRACE
Reduce to start_keyframes_rule by:
start_keyframes_rule : KEYFRAMES_SYM IDENT LBRACE
start_keyframes_rule
Shift IDENT start_keyframes_rule IDENT
Reduce to keyframes_selector by:
keyframes_selector : IDENT
start_keyframes_rule keyframes_selector
Shift COMMA start_keyframes_rule keyframes_selector COMMA
Reduce to keyframes_selectors by:
keyframes_selectors :
start_keyframes_rule keyframes_selector COMMA keyframes_selectors
+

+ +

+ + From here, we reduce by keyframes_selectors : keyframes_selector COMMA keyframes_selectors regardless of what token + comes next.
+ + (This can take us to 101 or 282) + + +

+
+ +

State 283

+ +

+ +
declarations:declaration one_or_more_semis declarations .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift FONTFACE_SYM FONTFACE_SYM
Shift LBRACE FONTFACE_SYM LBRACE
Reduce to start_fontface_rule by:
start_fontface_rule : FONTFACE_SYM LBRACE
start_fontface_rule
Shift IDENT start_fontface_rule IDENT
Reduce to property by:
property : IDENT
start_fontface_rule property
Shift COLON start_fontface_rule property COLON
Shift IDENT start_fontface_rule property COLON IDENT
Reduce to ident by:
ident : IDENT
start_fontface_rule property COLON ident
Reduce to term by:
term : ident
start_fontface_rule property COLON term
Reduce to expr by:
expr : term
start_fontface_rule property COLON expr
Reduce to prio by:
prio :
start_fontface_rule property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
start_fontface_rule declaration_internal
Reduce to declaration by:
declaration : declaration_internal
start_fontface_rule declaration
Shift SEMI start_fontface_rule declaration SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_fontface_rule declaration one_or_more_semis
Shift SEMI start_fontface_rule declaration one_or_more_semis SEMI
Reduce to one_or_more_semis by:
one_or_more_semis : SEMI
start_fontface_rule declaration one_or_more_semis one_or_more_semis
Reduce to declarations by:
declarations : one_or_more_semis
start_fontface_rule declaration one_or_more_semis declarations
+

+ +

+ + From here, we reduce by declarations : declaration one_or_more_semis declarations regardless of what token + comes next.
+ + (This can take us to 106, 117, 214, 222 or 283) + + +

+
+ +

State 284

+ +

+ +
declaration_internal:property COLON expr . prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
+

+ +

+ + Action table:
+
Lookahead tokenAction
IMPORTANT_SYMShift and go to state 319
OtherReduce by prio :
(This takes us to 318)
+ +

+
+ +

State 285

+ +

+ +
declaration_internal:property COLON S . expr prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift S SUPPORTS_SYM LPAREN property COLON S
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 188
IDENTShift and go to state 59
HASHShift and go to state 187
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
URIShift and go to state 85
RESOLUTIONShift and go to state 170
VARIABLE_NAMEShift and go to state 181
CALC_SYMShift and go to state 186
UNICODE_RANGEShift and go to state 185
RATIOShift and go to state 196
OtherError
+ +

+
+ +

State 286

+ +

+ +
declaration_internal:property S COLON . expr prio
declaration_internal:property S COLON . S expr prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift S SUPPORTS_SYM LPAREN property S
Shift COLON SUPPORTS_SYM LPAREN property S COLON
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 188
IDENTShift and go to state 59
SShift and go to state 322
HASHShift and go to state 187
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
URIShift and go to state 85
RESOLUTIONShift and go to state 170
VARIABLE_NAMEShift and go to state 181
CALC_SYMShift and go to state 186
UNICODE_RANGEShift and go to state 185
RATIOShift and go to state 196
OtherError
+ +

+
+ +

State 287

+ +

+ +
attrib:LSQUARE ident_with_namespace EQUAL IDENT . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift EQUAL LSQUARE ident_with_namespace EQUAL
Shift IDENT LSQUARE ident_with_namespace EQUAL IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 323
OtherError
+ +

+
+ +

State 288

+ +

+ +
attrib:LSQUARE ident_with_namespace EQUAL STRING . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift EQUAL LSQUARE ident_with_namespace EQUAL
Shift STRING LSQUARE ident_with_namespace EQUAL STRING
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 324
OtherError
+ +

+
+ +

State 289

+ +

+ +
attrib:LSQUARE ident_with_namespace INCLUDES STRING . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift INCLUDES LSQUARE ident_with_namespace INCLUDES
Shift STRING LSQUARE ident_with_namespace INCLUDES STRING
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 325
OtherError
+ +

+
+ +

State 290

+ +

+ +
attrib:LSQUARE ident_with_namespace INCLUDES IDENT . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift INCLUDES LSQUARE ident_with_namespace INCLUDES
Shift IDENT LSQUARE ident_with_namespace INCLUDES IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 326
OtherError
+ +

+
+ +

State 291

+ +

+ +
attrib:LSQUARE ident_with_namespace DASHMATCH IDENT . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift DASHMATCH LSQUARE ident_with_namespace DASHMATCH
Shift IDENT LSQUARE ident_with_namespace DASHMATCH IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 327
OtherError
+ +

+
+ +

State 292

+ +

+ +
attrib:LSQUARE ident_with_namespace DASHMATCH STRING . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift DASHMATCH LSQUARE ident_with_namespace DASHMATCH
Shift STRING LSQUARE ident_with_namespace DASHMATCH STRING
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 328
OtherError
+ +

+
+ +

State 293

+ +

+ +
attrib:LSQUARE ident_with_namespace PREFIXMATCH IDENT . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift PREFIXMATCH LSQUARE ident_with_namespace PREFIXMATCH
Shift IDENT LSQUARE ident_with_namespace PREFIXMATCH IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 329
OtherError
+ +

+
+ +

State 294

+ +

+ +
attrib:LSQUARE ident_with_namespace PREFIXMATCH STRING . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift PREFIXMATCH LSQUARE ident_with_namespace PREFIXMATCH
Shift STRING LSQUARE ident_with_namespace PREFIXMATCH STRING
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 330
OtherError
+ +

+
+ +

State 295

+ +

+ +
attrib:LSQUARE ident_with_namespace SUFFIXMATCH IDENT . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUFFIXMATCH LSQUARE ident_with_namespace SUFFIXMATCH
Shift IDENT LSQUARE ident_with_namespace SUFFIXMATCH IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 331
OtherError
+ +

+
+ +

State 296

+ +

+ +
attrib:LSQUARE ident_with_namespace SUFFIXMATCH STRING . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUFFIXMATCH LSQUARE ident_with_namespace SUFFIXMATCH
Shift STRING LSQUARE ident_with_namespace SUFFIXMATCH STRING
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 332
OtherError
+ +

+
+ +

State 297

+ +

+ +
attrib:LSQUARE ident_with_namespace SUBSTRINGMATCH IDENT . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUBSTRINGMATCH LSQUARE ident_with_namespace SUBSTRINGMATCH
Shift IDENT LSQUARE ident_with_namespace SUBSTRINGMATCH IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 333
OtherError
+ +

+
+ +

State 298

+ +

+ +
attrib:LSQUARE ident_with_namespace SUBSTRINGMATCH STRING . RSQUARE

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUBSTRINGMATCH LSQUARE ident_with_namespace SUBSTRINGMATCH
Shift STRING LSQUARE ident_with_namespace SUBSTRINGMATCH STRING
+

+ +

+ + Action table:
+
Lookahead tokenAction
RSQUAREShift and go to state 334
OtherError
+ +

+
+ +

State 299

+ +

+ +
pseudo:COLON COLON MOZ_PSEUDO_ELEMENT optional_space . any_number_of_idents optional_space RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift COLON COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON COLON MOZ_PSEUDO_ELEMENT optional_space
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 306
OtherReduce by any_number_of_idents :
(This takes us to 335)
+ +

+
+ +

State 300

+ +

+ +
pseudo:COLON FUNCTION IDENT RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift FUNCTION COLON FUNCTION
Shift IDENT COLON FUNCTION IDENT
Shift RPAREN COLON FUNCTION IDENT RPAREN
+

+ +

+ + From here, we reduce by pseudo : COLON FUNCTION IDENT RPAREN regardless of what token + comes next.
+ + (This takes us to 44) + + +

+
+ +

State 301

+ +

+ +
pseudo:COLON NOT_PSEUDO_CLASS simple_selector RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift NOT_PSEUDO_CLASS COLON NOT_PSEUDO_CLASS
Shift IDENT COLON NOT_PSEUDO_CLASS IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
COLON NOT_PSEUDO_CLASS ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
COLON NOT_PSEUDO_CLASS element_name
Reduce to simple_selector by:
simple_selector : element_name
COLON NOT_PSEUDO_CLASS simple_selector
Shift RPAREN COLON NOT_PSEUDO_CLASS simple_selector RPAREN
+

+ +

+ + From here, we reduce by pseudo : COLON NOT_PSEUDO_CLASS simple_selector RPAREN regardless of what token + comes next.
+ + (This takes us to 44) + + +

+
+ +

State 302

+ +

+ +
simple_selectors:simple_selector COMMA . simple_selectors

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MATCHES_PSEUDO_CLASS COLON MATCHES_PSEUDO_CLASS
Shift IDENT COLON MATCHES_PSEUDO_CLASS IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
COLON MATCHES_PSEUDO_CLASS ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
COLON MATCHES_PSEUDO_CLASS element_name
Reduce to simple_selector by:
simple_selector : element_name
COLON MATCHES_PSEUDO_CLASS simple_selector
Shift COMMA COLON MATCHES_PSEUDO_CLASS simple_selector COMMA
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 37
STARShift and go to state 39
HASHShift and go to state 45
LSQUAREShift and go to state 47
COLONShift and go to state 48
"|"Shift and go to state 38
"."Shift and go to state 46
OtherError
+ +

+
+ +

State 303

+ +

+ +
pseudo:COLON MATCHES_PSEUDO_CLASS simple_selectors RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MATCHES_PSEUDO_CLASS COLON MATCHES_PSEUDO_CLASS
Shift IDENT COLON MATCHES_PSEUDO_CLASS IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
COLON MATCHES_PSEUDO_CLASS ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
COLON MATCHES_PSEUDO_CLASS element_name
Reduce to simple_selector by:
simple_selector : element_name
COLON MATCHES_PSEUDO_CLASS simple_selector
Reduce to simple_selectors by:
simple_selectors : simple_selector
COLON MATCHES_PSEUDO_CLASS simple_selectors
Shift RPAREN COLON MATCHES_PSEUDO_CLASS simple_selectors RPAREN
+

+ +

+ + From here, we reduce by pseudo : COLON MATCHES_PSEUDO_CLASS simple_selectors RPAREN regardless of what token + comes next.
+ + (This takes us to 44) + + +

+
+ +

State 304

+ +

+ +
pseudo:COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents . optional_space RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space
Reduce to any_number_of_idents by:
any_number_of_idents :
COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 163
OtherReduce by optional_space :
(This takes us to 337)
+ +

+
+ +

State 305

+ +

+ +
any_number_of_idents:multiple_idents .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space
Shift IDENT COLON MOZ_PSEUDO_ELEMENT optional_space IDENT
Reduce to multiple_idents by:
multiple_idents : IDENT
COLON MOZ_PSEUDO_ELEMENT optional_space multiple_idents
+

+ +

+ + From here, we reduce by any_number_of_idents : multiple_idents regardless of what token + comes next.
+ + (This can take us to 304 or 335) + + +

+
+ +

State 306

+ +

+ +
multiple_idents:IDENT .
multiple_idents:IDENT . COMMA multiple_idents

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space
Shift IDENT COLON MOZ_PSEUDO_ELEMENT optional_space IDENT
+

+ +

+ + Action table:
+
Lookahead tokenAction
COMMAShift and go to state 338
OtherReduce by multiple_idents : IDENT
(This can take us to 305 or 352)
+ +

+
+ +

State 307

+ +

+ +
medium:medium COMMA IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift IMPORT_SYM IMPORT_SYM
Shift STRING IMPORT_SYM STRING
Reduce to import_location by:
import_location : STRING
IMPORT_SYM import_location
Shift IDENT IMPORT_SYM import_location IDENT
Reduce to medium by:
medium : IDENT
IMPORT_SYM import_location medium
Shift COMMA IMPORT_SYM import_location medium COMMA
Shift IDENT IMPORT_SYM import_location medium COMMA IDENT
+

+ +

+ + From here, we reduce by medium : medium COMMA IDENT regardless of what token + comes next.
+ + (This takes us to 149) + + +

+
+ +

State 308

+ +

+ +
optional_and_exprs:optional_and_exprs AND media_expr .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Reduce to optional_only_or_not by:
optional_only_or_not :
MEDIA_SYM optional_only_or_not
Shift IDENT MEDIA_SYM optional_only_or_not IDENT
Reduce to media_type by:
media_type : IDENT
MEDIA_SYM optional_only_or_not media_type
Reduce to optional_and_exprs by:
optional_and_exprs :
MEDIA_SYM optional_only_or_not media_type optional_and_exprs
Shift AND MEDIA_SYM optional_only_or_not media_type optional_and_exprs AND
Shift LPAREN MEDIA_SYM optional_only_or_not media_type optional_and_exprs AND LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM optional_only_or_not media_type optional_and_exprs AND LPAREN optional_space
Shift IDENT MEDIA_SYM optional_only_or_not media_type optional_and_exprs AND LPAREN optional_space IDENT
Reduce to optional_space by:
optional_space :
MEDIA_SYM optional_only_or_not media_type optional_and_exprs AND LPAREN optional_space IDENT optional_space
Shift RPAREN MEDIA_SYM optional_only_or_not media_type optional_and_exprs AND LPAREN optional_space IDENT optional_space RPAREN
Reduce to media_expr by:
media_expr : LPAREN optional_space IDENT optional_space RPAREN
MEDIA_SYM optional_only_or_not media_type optional_and_exprs AND media_expr
+

+ +

+ + From here, we reduce by optional_and_exprs : optional_and_exprs AND media_expr regardless of what token + comes next.
+ + (This can take us to 161 or 254) + + +

+
+ +

State 309

+ +

+ +
media_expr:LPAREN optional_space IDENT optional_space . RPAREN
media_expr:LPAREN optional_space IDENT optional_space . COLON optional_space expr RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 339
COLONShift and go to state 340
OtherError
+ +

+
+ +

State 310

+ +

+ +
expr:term operator expr .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift IDENT start_document_query_pos FUNCTION IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term
Shift COMMA start_document_query_pos FUNCTION term COMMA
Reduce to operator by:
operator : COMMA
start_document_query_pos FUNCTION term operator
Shift IDENT start_document_query_pos FUNCTION term operator IDENT
Reduce to ident by:
ident : IDENT
start_document_query_pos FUNCTION term operator ident
Reduce to term by:
term : ident
start_document_query_pos FUNCTION term operator term
Reduce to expr by:
expr : term
start_document_query_pos FUNCTION term operator expr
+

+ +

+ + From here, we reduce by expr : term operator expr regardless of what token + comes next.
+ + (This can take us to 183, 262, 284, 310, 320, 321, 349 or 358) + + +

+
+ +

State 311

+ +

+ +
uranges:UNICODE_RANGE COMMA uranges .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift UNICODE_RANGE start_document_query_pos FUNCTION UNICODE_RANGE
Shift COMMA start_document_query_pos FUNCTION UNICODE_RANGE COMMA
Shift UNICODE_RANGE start_document_query_pos FUNCTION UNICODE_RANGE COMMA UNICODE_RANGE
Reduce to uranges by:
uranges : UNICODE_RANGE
start_document_query_pos FUNCTION UNICODE_RANGE COMMA uranges
+

+ +

+ + From here, we reduce by uranges : UNICODE_RANGE COMMA uranges regardless of what token + comes next.
+ + (This can take us to 182 or 311) + + +

+
+ +

State 312

+ +

+ +
calc:CALC_SYM calc_sum RPAREN . optional_space

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product
Reduce to calc_sum by:
calc_sum : calc_product
start_document_query_pos FUNCTION CALC_SYM calc_sum
Shift RPAREN start_document_query_pos FUNCTION CALC_SYM calc_sum RPAREN
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 163
OtherReduce by optional_space :
(This takes us to 341)
+ +

+
+ +

State 313

+ +

+ +
calc_sum:calc_product PLUS . calc_sum

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product
Shift PLUS start_document_query_pos FUNCTION CALC_SYM calc_product PLUS
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 272
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
OtherError
+ +

+
+ +

State 314

+ +

+ +
calc_sum:calc_product MINUS . calc_sum

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product
Shift MINUS start_document_query_pos FUNCTION CALC_SYM calc_product MINUS
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 272
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
OtherError
+ +

+
+ +

State 315

+ +

+ +
calc_product:calc_value optional_space . STAR calc_value
calc_product:calc_value optional_space . SLASH calc_value

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to optional_space by:
optional_space :
start_document_query_pos FUNCTION CALC_SYM calc_value optional_space
+

+ +

+ + Action table:
+
Lookahead tokenAction
STARShift and go to state 344
SLASHShift and go to state 345
OtherError
+ +

+
+ +

State 316

+ +

+ +
calc_value:LPAREN calc_sum . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift LPAREN start_document_query_pos FUNCTION CALC_SYM LPAREN
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM LPAREN NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM LPAREN numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM LPAREN calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM LPAREN calc_product
Reduce to calc_sum by:
calc_sum : calc_product
start_document_query_pos FUNCTION CALC_SYM LPAREN calc_sum
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 346
OtherError
+ +

+
+ +

State 317

+ +

+ +
supports_declaration_condition:LPAREN S declaration_internal RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift S SUPPORTS_SYM LPAREN S
Shift IDENT SUPPORTS_SYM LPAREN S IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN S property
Shift COLON SUPPORTS_SYM LPAREN S property COLON
Shift IDENT SUPPORTS_SYM LPAREN S property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN S property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN S property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN S property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN S property COLON expr prio
Reduce to declaration_internal by:
declaration_internal : property COLON expr prio
SUPPORTS_SYM LPAREN S declaration_internal
Shift RPAREN SUPPORTS_SYM LPAREN S declaration_internal RPAREN
+

+ +

+ + From here, we reduce by supports_declaration_condition : LPAREN S declaration_internal RPAREN regardless of what token + comes next.
+ + (This takes us to 93) + + +

+
+ +

State 318

+ +

+ +
declaration_internal:property COLON expr prio .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON expr prio
+

+ +

+ + From here, we reduce by declaration_internal : property COLON expr prio regardless of what token + comes next.
+ + (This can take us to 111, 209 or 280) + + +

+
+ +

State 319

+ +

+ +
prio:IMPORTANT_SYM .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift IDENT SUPPORTS_SYM LPAREN property COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON expr
Shift IMPORTANT_SYM SUPPORTS_SYM LPAREN property COLON expr IMPORTANT_SYM
+

+ +

+ + From here, we reduce by prio : IMPORTANT_SYM regardless of what token + comes next.
+ + (This can take us to 318, 347, 348 or 356) + + +

+
+ +

State 320

+ +

+ +
declaration_internal:property COLON S expr . prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift S SUPPORTS_SYM LPAREN property COLON S
Shift IDENT SUPPORTS_SYM LPAREN property COLON S IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON S ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON S term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON S expr
+

+ +

+ + Action table:
+
Lookahead tokenAction
IMPORTANT_SYMShift and go to state 319
OtherReduce by prio :
(This takes us to 347)
+ +

+
+ +

State 321

+ +

+ +
declaration_internal:property S COLON expr . prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift S SUPPORTS_SYM LPAREN property S
Shift COLON SUPPORTS_SYM LPAREN property S COLON
Shift IDENT SUPPORTS_SYM LPAREN property S COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property S COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property S COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property S COLON expr
+

+ +

+ + Action table:
+
Lookahead tokenAction
IMPORTANT_SYMShift and go to state 319
OtherReduce by prio :
(This takes us to 348)
+ +

+
+ +

State 322

+ +

+ +
declaration_internal:property S COLON S . expr prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift S SUPPORTS_SYM LPAREN property S
Shift COLON SUPPORTS_SYM LPAREN property S COLON
Shift S SUPPORTS_SYM LPAREN property S COLON S
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 188
IDENTShift and go to state 59
HASHShift and go to state 187
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
URIShift and go to state 85
RESOLUTIONShift and go to state 170
VARIABLE_NAMEShift and go to state 181
CALC_SYMShift and go to state 186
UNICODE_RANGEShift and go to state 185
RATIOShift and go to state 196
OtherError
+ +

+
+ +

State 323

+ +

+ +
attrib:LSQUARE ident_with_namespace EQUAL IDENT RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift EQUAL LSQUARE ident_with_namespace EQUAL
Shift IDENT LSQUARE ident_with_namespace EQUAL IDENT
Shift RSQUARE LSQUARE ident_with_namespace EQUAL IDENT RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace EQUAL IDENT RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 324

+ +

+ +
attrib:LSQUARE ident_with_namespace EQUAL STRING RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift EQUAL LSQUARE ident_with_namespace EQUAL
Shift STRING LSQUARE ident_with_namespace EQUAL STRING
Shift RSQUARE LSQUARE ident_with_namespace EQUAL STRING RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace EQUAL STRING RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 325

+ +

+ +
attrib:LSQUARE ident_with_namespace INCLUDES STRING RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift INCLUDES LSQUARE ident_with_namespace INCLUDES
Shift STRING LSQUARE ident_with_namespace INCLUDES STRING
Shift RSQUARE LSQUARE ident_with_namespace INCLUDES STRING RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace INCLUDES STRING RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 326

+ +

+ +
attrib:LSQUARE ident_with_namespace INCLUDES IDENT RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift INCLUDES LSQUARE ident_with_namespace INCLUDES
Shift IDENT LSQUARE ident_with_namespace INCLUDES IDENT
Shift RSQUARE LSQUARE ident_with_namespace INCLUDES IDENT RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace INCLUDES IDENT RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 327

+ +

+ +
attrib:LSQUARE ident_with_namespace DASHMATCH IDENT RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift DASHMATCH LSQUARE ident_with_namespace DASHMATCH
Shift IDENT LSQUARE ident_with_namespace DASHMATCH IDENT
Shift RSQUARE LSQUARE ident_with_namespace DASHMATCH IDENT RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace DASHMATCH IDENT RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 328

+ +

+ +
attrib:LSQUARE ident_with_namespace DASHMATCH STRING RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift DASHMATCH LSQUARE ident_with_namespace DASHMATCH
Shift STRING LSQUARE ident_with_namespace DASHMATCH STRING
Shift RSQUARE LSQUARE ident_with_namespace DASHMATCH STRING RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace DASHMATCH STRING RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 329

+ +

+ +
attrib:LSQUARE ident_with_namespace PREFIXMATCH IDENT RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift PREFIXMATCH LSQUARE ident_with_namespace PREFIXMATCH
Shift IDENT LSQUARE ident_with_namespace PREFIXMATCH IDENT
Shift RSQUARE LSQUARE ident_with_namespace PREFIXMATCH IDENT RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace PREFIXMATCH IDENT RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 330

+ +

+ +
attrib:LSQUARE ident_with_namespace PREFIXMATCH STRING RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift PREFIXMATCH LSQUARE ident_with_namespace PREFIXMATCH
Shift STRING LSQUARE ident_with_namespace PREFIXMATCH STRING
Shift RSQUARE LSQUARE ident_with_namespace PREFIXMATCH STRING RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace PREFIXMATCH STRING RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 331

+ +

+ +
attrib:LSQUARE ident_with_namespace SUFFIXMATCH IDENT RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUFFIXMATCH LSQUARE ident_with_namespace SUFFIXMATCH
Shift IDENT LSQUARE ident_with_namespace SUFFIXMATCH IDENT
Shift RSQUARE LSQUARE ident_with_namespace SUFFIXMATCH IDENT RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace SUFFIXMATCH IDENT RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 332

+ +

+ +
attrib:LSQUARE ident_with_namespace SUFFIXMATCH STRING RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUFFIXMATCH LSQUARE ident_with_namespace SUFFIXMATCH
Shift STRING LSQUARE ident_with_namespace SUFFIXMATCH STRING
Shift RSQUARE LSQUARE ident_with_namespace SUFFIXMATCH STRING RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace SUFFIXMATCH STRING RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 333

+ +

+ +
attrib:LSQUARE ident_with_namespace SUBSTRINGMATCH IDENT RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUBSTRINGMATCH LSQUARE ident_with_namespace SUBSTRINGMATCH
Shift IDENT LSQUARE ident_with_namespace SUBSTRINGMATCH IDENT
Shift RSQUARE LSQUARE ident_with_namespace SUBSTRINGMATCH IDENT RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace SUBSTRINGMATCH IDENT RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 334

+ +

+ +
attrib:LSQUARE ident_with_namespace SUBSTRINGMATCH STRING RSQUARE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift LSQUARE LSQUARE
Shift IDENT LSQUARE IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
LSQUARE ident_with_namespace
Shift SUBSTRINGMATCH LSQUARE ident_with_namespace SUBSTRINGMATCH
Shift STRING LSQUARE ident_with_namespace SUBSTRINGMATCH STRING
Shift RSQUARE LSQUARE ident_with_namespace SUBSTRINGMATCH STRING RSQUARE
+

+ +

+ + From here, we reduce by attrib : LSQUARE ident_with_namespace SUBSTRINGMATCH STRING RSQUARE regardless of what token + comes next.
+ + (This takes us to 43) + + +

+
+ +

State 335

+ +

+ +
pseudo:COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents . optional_space RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift COLON COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON COLON MOZ_PSEUDO_ELEMENT optional_space
Reduce to any_number_of_idents by:
any_number_of_idents :
COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 163
OtherReduce by optional_space :
(This takes us to 350)
+ +

+
+ +

State 336

+ +

+ +
simple_selectors:simple_selector COMMA simple_selectors .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MATCHES_PSEUDO_CLASS COLON MATCHES_PSEUDO_CLASS
Shift IDENT COLON MATCHES_PSEUDO_CLASS IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
COLON MATCHES_PSEUDO_CLASS ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
COLON MATCHES_PSEUDO_CLASS element_name
Reduce to simple_selector by:
simple_selector : element_name
COLON MATCHES_PSEUDO_CLASS simple_selector
Shift COMMA COLON MATCHES_PSEUDO_CLASS simple_selector COMMA
Shift IDENT COLON MATCHES_PSEUDO_CLASS simple_selector COMMA IDENT
Reduce to ident_with_namespace by:
ident_with_namespace : IDENT
COLON MATCHES_PSEUDO_CLASS simple_selector COMMA ident_with_namespace
Reduce to element_name by:
element_name : ident_with_namespace
COLON MATCHES_PSEUDO_CLASS simple_selector COMMA element_name
Reduce to simple_selector by:
simple_selector : element_name
COLON MATCHES_PSEUDO_CLASS simple_selector COMMA simple_selector
Reduce to simple_selectors by:
simple_selectors : simple_selector
COLON MATCHES_PSEUDO_CLASS simple_selector COMMA simple_selectors
+

+ +

+ + From here, we reduce by simple_selectors : simple_selector COMMA simple_selectors regardless of what token + comes next.
+ + (This can take us to 248 or 336) + + +

+
+ +

State 337

+ +

+ +
pseudo:COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space
Reduce to any_number_of_idents by:
any_number_of_idents :
COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 351
OtherError
+ +

+
+ +

State 338

+ +

+ +
multiple_idents:IDENT COMMA . multiple_idents

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space
Shift IDENT COLON MOZ_PSEUDO_ELEMENT optional_space IDENT
Shift COMMA COLON MOZ_PSEUDO_ELEMENT optional_space IDENT COMMA
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 306
OtherError
+ +

+
+ +

State 339

+ +

+ +
media_expr:LPAREN optional_space IDENT optional_space RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space
Shift RPAREN MEDIA_SYM LPAREN optional_space IDENT optional_space RPAREN
+

+ +

+ + From here, we reduce by media_expr : LPAREN optional_space IDENT optional_space RPAREN regardless of what token + comes next.
+ + (This can take us to 72 or 308) + + +

+
+ +

State 340

+ +

+ +
media_expr:LPAREN optional_space IDENT optional_space COLON . optional_space expr RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space
Shift COLON MEDIA_SYM LPAREN optional_space IDENT optional_space COLON
+

+ +

+ + Action table:
+
Lookahead tokenAction
SShift and go to state 163
OtherReduce by optional_space :
(This takes us to 353)
+ +

+
+ +

State 341

+ +

+ +
calc:CALC_SYM calc_sum RPAREN optional_space .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product
Reduce to calc_sum by:
calc_sum : calc_product
start_document_query_pos FUNCTION CALC_SYM calc_sum
Shift RPAREN start_document_query_pos FUNCTION CALC_SYM calc_sum RPAREN
Reduce to optional_space by:
optional_space :
start_document_query_pos FUNCTION CALC_SYM calc_sum RPAREN optional_space
+

+ +

+ + From here, we reduce by calc : CALC_SYM calc_sum RPAREN optional_space regardless of what token + comes next.
+ + (This takes us to 178) + + +

+
+ +

State 342

+ +

+ +
calc_sum:calc_product PLUS calc_sum .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product
Shift PLUS start_document_query_pos FUNCTION CALC_SYM calc_product PLUS
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM calc_product PLUS NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM calc_product PLUS numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_product PLUS calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product PLUS calc_product
Reduce to calc_sum by:
calc_sum : calc_product
start_document_query_pos FUNCTION CALC_SYM calc_product PLUS calc_sum
+

+ +

+ + From here, we reduce by calc_sum : calc_product PLUS calc_sum regardless of what token + comes next.
+ + (This can take us to 268, 316, 342 or 343) + + +

+
+ +

State 343

+ +

+ +
calc_sum:calc_product MINUS calc_sum .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product
Shift MINUS start_document_query_pos FUNCTION CALC_SYM calc_product MINUS
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM calc_product MINUS NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM calc_product MINUS numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_product MINUS calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM calc_product MINUS calc_product
Reduce to calc_sum by:
calc_sum : calc_product
start_document_query_pos FUNCTION CALC_SYM calc_product MINUS calc_sum
+

+ +

+ + From here, we reduce by calc_sum : calc_product MINUS calc_sum regardless of what token + comes next.
+ + (This can take us to 268, 316, 342 or 343) + + +

+
+ +

State 344

+ +

+ +
calc_product:calc_value optional_space STAR . calc_value

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to optional_space by:
optional_space :
start_document_query_pos FUNCTION CALC_SYM calc_value optional_space
Shift STAR start_document_query_pos FUNCTION CALC_SYM calc_value optional_space STAR
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 272
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
OtherError
+ +

+
+ +

State 345

+ +

+ +
calc_product:calc_value optional_space SLASH . calc_value

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to optional_space by:
optional_space :
start_document_query_pos FUNCTION CALC_SYM calc_value optional_space
Shift SLASH start_document_query_pos FUNCTION CALC_SYM calc_value optional_space SLASH
+

+ +

+ + Action table:
+
Lookahead tokenAction
LPARENShift and go to state 272
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
OtherError
+ +

+
+ +

State 346

+ +

+ +
calc_value:LPAREN calc_sum RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift LPAREN start_document_query_pos FUNCTION CALC_SYM LPAREN
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM LPAREN NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM LPAREN numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM LPAREN calc_value
Reduce to calc_product by:
calc_product : calc_value
start_document_query_pos FUNCTION CALC_SYM LPAREN calc_product
Reduce to calc_sum by:
calc_sum : calc_product
start_document_query_pos FUNCTION CALC_SYM LPAREN calc_sum
Shift RPAREN start_document_query_pos FUNCTION CALC_SYM LPAREN calc_sum RPAREN
+

+ +

+ + From here, we reduce by calc_value : LPAREN calc_sum RPAREN regardless of what token + comes next.
+ + (This can take us to 270, 354 or 355) + + +

+
+ +

State 347

+ +

+ +
declaration_internal:property COLON S expr prio .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift COLON SUPPORTS_SYM LPAREN property COLON
Shift S SUPPORTS_SYM LPAREN property COLON S
Shift IDENT SUPPORTS_SYM LPAREN property COLON S IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property COLON S ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property COLON S term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property COLON S expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property COLON S expr prio
+

+ +

+ + From here, we reduce by declaration_internal : property COLON S expr prio regardless of what token + comes next.
+ + (This can take us to 111, 209 or 280) + + +

+
+ +

State 348

+ +

+ +
declaration_internal:property S COLON expr prio .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift S SUPPORTS_SYM LPAREN property S
Shift COLON SUPPORTS_SYM LPAREN property S COLON
Shift IDENT SUPPORTS_SYM LPAREN property S COLON IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property S COLON ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property S COLON term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property S COLON expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property S COLON expr prio
+

+ +

+ + From here, we reduce by declaration_internal : property S COLON expr prio regardless of what token + comes next.
+ + (This can take us to 111, 209 or 280) + + +

+
+ +

State 349

+ +

+ +
declaration_internal:property S COLON S expr . prio

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift S SUPPORTS_SYM LPAREN property S
Shift COLON SUPPORTS_SYM LPAREN property S COLON
Shift S SUPPORTS_SYM LPAREN property S COLON S
Shift IDENT SUPPORTS_SYM LPAREN property S COLON S IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property S COLON S ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property S COLON S term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property S COLON S expr
+

+ +

+ + Action table:
+
Lookahead tokenAction
IMPORTANT_SYMShift and go to state 319
OtherReduce by prio :
(This takes us to 356)
+ +

+
+ +

State 350

+ +

+ +
pseudo:COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift COLON COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON COLON MOZ_PSEUDO_ELEMENT optional_space
Reduce to any_number_of_idents by:
any_number_of_idents :
COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents
Reduce to optional_space by:
optional_space :
COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 357
OtherError
+ +

+
+ +

State 351

+ +

+ +
pseudo:COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space
Reduce to any_number_of_idents by:
any_number_of_idents :
COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space
Shift RPAREN COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN
+

+ +

+ + From here, we reduce by pseudo : COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN regardless of what token + comes next.
+ + (This takes us to 44) + + +

+
+ +

State 352

+ +

+ +
multiple_idents:IDENT COMMA multiple_idents .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON MOZ_PSEUDO_ELEMENT optional_space
Shift IDENT COLON MOZ_PSEUDO_ELEMENT optional_space IDENT
Shift COMMA COLON MOZ_PSEUDO_ELEMENT optional_space IDENT COMMA
Shift IDENT COLON MOZ_PSEUDO_ELEMENT optional_space IDENT COMMA IDENT
Reduce to multiple_idents by:
multiple_idents : IDENT
COLON MOZ_PSEUDO_ELEMENT optional_space IDENT COMMA multiple_idents
+

+ +

+ + From here, we reduce by multiple_idents : IDENT COMMA multiple_idents regardless of what token + comes next.
+ + (This can take us to 305 or 352) + + +

+
+ +

State 353

+ +

+ +
media_expr:LPAREN optional_space IDENT optional_space COLON optional_space . expr RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space
Shift COLON MEDIA_SYM LPAREN optional_space IDENT optional_space COLON
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space
+

+ +

+ + Action table:
+
Lookahead tokenAction
STRINGShift and go to state 188
IDENTShift and go to state 59
HASHShift and go to state 187
FUNCTIONShift and go to state 83
PLUSShift and go to state 198
NUMBERShift and go to state 190
MINUSShift and go to state 197
LENGTHShift and go to state 192
PERCENTAGEShift and go to state 191
ANGLEShift and go to state 193
TIMEShift and go to state 194
FREQShift and go to state 195
URIShift and go to state 85
RESOLUTIONShift and go to state 170
VARIABLE_NAMEShift and go to state 181
CALC_SYMShift and go to state 186
UNICODE_RANGEShift and go to state 185
RATIOShift and go to state 196
OtherError
+ +

+
+ +

State 354

+ +

+ +
calc_product:calc_value optional_space STAR calc_value .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to optional_space by:
optional_space :
start_document_query_pos FUNCTION CALC_SYM calc_value optional_space
Shift STAR start_document_query_pos FUNCTION CALC_SYM calc_value optional_space STAR
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM calc_value optional_space STAR NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM calc_value optional_space STAR numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value optional_space STAR calc_value
+

+ +

+ + From here, we reduce by calc_product : calc_value optional_space STAR calc_value regardless of what token + comes next.
+ + (This takes us to 269) + + +

+
+ +

State 355

+ +

+ +
calc_product:calc_value optional_space SLASH calc_value .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift DOCUMENT_QUERY_SYM DOCUMENT_QUERY_SYM
Reduce to start_document_query_pos by:
start_document_query_pos : DOCUMENT_QUERY_SYM
start_document_query_pos
Shift FUNCTION start_document_query_pos FUNCTION
Shift CALC_SYM start_document_query_pos FUNCTION CALC_SYM
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value
Reduce to optional_space by:
optional_space :
start_document_query_pos FUNCTION CALC_SYM calc_value optional_space
Shift SLASH start_document_query_pos FUNCTION CALC_SYM calc_value optional_space SLASH
Shift NUMBER start_document_query_pos FUNCTION CALC_SYM calc_value optional_space SLASH NUMBER
Reduce to numeric by:
numeric : NUMBER
start_document_query_pos FUNCTION CALC_SYM calc_value optional_space SLASH numeric
Reduce to calc_value by:
calc_value : numeric
start_document_query_pos FUNCTION CALC_SYM calc_value optional_space SLASH calc_value
+

+ +

+ + From here, we reduce by calc_product : calc_value optional_space SLASH calc_value regardless of what token + comes next.
+ + (This takes us to 269) + + +

+
+ +

State 356

+ +

+ +
declaration_internal:property S COLON S expr prio .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift SUPPORTS_SYM SUPPORTS_SYM
Shift LPAREN SUPPORTS_SYM LPAREN
Shift IDENT SUPPORTS_SYM LPAREN IDENT
Reduce to property by:
property : IDENT
SUPPORTS_SYM LPAREN property
Shift S SUPPORTS_SYM LPAREN property S
Shift COLON SUPPORTS_SYM LPAREN property S COLON
Shift S SUPPORTS_SYM LPAREN property S COLON S
Shift IDENT SUPPORTS_SYM LPAREN property S COLON S IDENT
Reduce to ident by:
ident : IDENT
SUPPORTS_SYM LPAREN property S COLON S ident
Reduce to term by:
term : ident
SUPPORTS_SYM LPAREN property S COLON S term
Reduce to expr by:
expr : term
SUPPORTS_SYM LPAREN property S COLON S expr
Reduce to prio by:
prio :
SUPPORTS_SYM LPAREN property S COLON S expr prio
+

+ +

+ + From here, we reduce by declaration_internal : property S COLON S expr prio regardless of what token + comes next.
+ + (This can take us to 111, 209 or 280) + + +

+
+ +

State 357

+ +

+ +
pseudo:COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift COLON COLON
Shift COLON COLON COLON
Shift MOZ_PSEUDO_ELEMENT COLON COLON MOZ_PSEUDO_ELEMENT
Reduce to optional_space by:
optional_space :
COLON COLON MOZ_PSEUDO_ELEMENT optional_space
Reduce to any_number_of_idents by:
any_number_of_idents :
COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents
Reduce to optional_space by:
optional_space :
COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space
Shift RPAREN COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN
+

+ +

+ + From here, we reduce by pseudo : COLON COLON MOZ_PSEUDO_ELEMENT optional_space any_number_of_idents optional_space RPAREN regardless of what token + comes next.
+ + (This takes us to 44) + + +

+
+ +

State 358

+ +

+ +
media_expr:LPAREN optional_space IDENT optional_space COLON optional_space expr . RPAREN

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space
Shift COLON MEDIA_SYM LPAREN optional_space IDENT optional_space COLON
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space IDENT
Reduce to ident by:
ident : IDENT
MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space ident
Reduce to term by:
term : ident
MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space term
Reduce to expr by:
expr : term
MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space expr
+

+ +

+ + Action table:
+
Lookahead tokenAction
RPARENShift and go to state 359
OtherError
+ +

+
+ +

State 359

+ +

+ +
media_expr:LPAREN optional_space IDENT optional_space COLON optional_space expr RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Shift MEDIA_SYM MEDIA_SYM
Shift LPAREN MEDIA_SYM LPAREN
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space
Shift COLON MEDIA_SYM LPAREN optional_space IDENT optional_space COLON
Reduce to optional_space by:
optional_space :
MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space
Shift IDENT MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space IDENT
Reduce to ident by:
ident : IDENT
MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space ident
Reduce to term by:
term : ident
MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space term
Reduce to expr by:
expr : term
MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space expr
Shift RPAREN MEDIA_SYM LPAREN optional_space IDENT optional_space COLON optional_space expr RPAREN
+

+ +

+ + From here, we reduce by media_expr : LPAREN optional_space IDENT optional_space COLON optional_space expr RPAREN regardless of what token + comes next.
+ + (This can take us to 72 or 308) + + +

+
+ + + + diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 24e4adc8..7178e3ca 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -227,6 +227,7 @@ def test_csspool assert_warnings err, sr_conflicts: 5, rr_conflicts: 3 assert_parser_unchanged 'csspool.y' assert_output_unchanged 'csspool.out', '--color -v', err + assert_html_unchanged 'csspool.y' end # .y file from opal gem From 22fa83b2064f7446d8684b647ab1d5b203cfbb96 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 12:00:41 +0200 Subject: [PATCH 524/619] Add regression test for HTML state summary (for twowaysql.y) --- Manifest.txt | 1 + test/regress/twowaysql.html | 1026 +++++++++++++++++++++++++++++++++++ test/test_racc_command.rb | 1 + 3 files changed, 1028 insertions(+) create mode 100644 test/regress/twowaysql.html diff --git a/Manifest.txt b/Manifest.txt index 44ddeabc..6ca9383f 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -156,6 +156,7 @@ test/regress/riml.rb test/regress/ruby18.rb test/regress/ruby22.rb test/regress/tp_plus.rb +test/regress/twowaysql.html test/regress/twowaysql.rb test/scandata/blockcomment test/scandata/brace diff --git a/test/regress/twowaysql.html b/test/regress/twowaysql.html new file mode 100644 index 00000000..d8b6d025 --- /dev/null +++ b/test/regress/twowaysql.html @@ -0,0 +1,1026 @@ + + + + LR parser states for test/assets/twowaysql.y + + + + + +

State 0 (start state)

+ +

+ +
$start:. sql $end $end

+ + + +

+ + From here, we reduce by stmt_list : regardless of what token + comes next.
+ + (This takes us to 2) + + +

+
+ +

State 1

+ +

+ +
$start:sql . $end $end

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Reduce to sql by:
sql : stmt_list
sql
+

+ +

+ + Action table:
+
Lookahead tokenAction
$endShift and go to state 3
OtherError
+ +

+
+ +

State 2

+ +

+ +
sql:stmt_list .
stmt_list:stmt_list . stmt

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
+

+ +

+ + Action table:
+
Lookahead tokenAction
BEGINShift and go to state 8
IFShift and go to state 9
ANDShift and go to state 12
ORShift and go to state 13
IDENTShift and go to state 10
STRING_LITERALShift and go to state 11
SPACESShift and go to state 14
COMMAShift and go to state 15
LPARENShift and go to state 16
RPARENShift and go to state 17
QUESTIONShift and go to state 18
ACTUAL_COMMENTShift and go to state 19
BIND_VARIABLEShift and go to state 22
PAREN_BIND_VARIABLEShift and go to state 23
EMBED_VARIABLEShift and go to state 24
OtherReduce by sql : stmt_list
(This takes us to 1)
+ +

+
+ +

State 3

+ +

+ +
$start:sql $end . $end

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Reduce to sql by:
sql : stmt_list
sql
Shift $end sql $end
+

+ +

+ + Action table:
+
Lookahead tokenAction
$endShift and go to state 25
OtherError
+ +

+
+ +

State 4

+ +

+ +
stmt_list:stmt_list stmt .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IDENT stmt_list IDENT
Reduce to primary by:
primary : IDENT
stmt_list primary
Reduce to stmt by:
stmt : primary
stmt_list stmt
+

+ +

+ + From here, we reduce by stmt_list : stmt_list stmt regardless of what token + comes next.
+ + (This can take us to 2, 26, 27, 41 or 42) + + +

+
+ +

State 5

+ +

+ +
stmt:primary .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IDENT stmt_list IDENT
Reduce to primary by:
primary : IDENT
stmt_list primary
+

+ +

+ + From here, we reduce by stmt : primary regardless of what token + comes next.
+ + (This takes us to 4) + + +

+
+ +

State 6

+ +

+ +
stmt:if_stmt .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Reduce to stmt_list by:
stmt_list :
stmt_list IF stmt_list
Reduce to sub_stmt by:
sub_stmt : stmt_list
stmt_list IF sub_stmt
Reduce to else_stmt by:
else_stmt :
stmt_list IF sub_stmt else_stmt
Shift END stmt_list IF sub_stmt else_stmt END
Reduce to if_stmt by:
if_stmt : IF sub_stmt else_stmt END
stmt_list if_stmt
+

+ +

+ + From here, we reduce by stmt : if_stmt regardless of what token + comes next.
+ + (This takes us to 4) + + +

+
+ +

State 7

+ +

+ +
stmt:begin_stmt .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BEGIN stmt_list BEGIN
Reduce to stmt_list by:
stmt_list :
stmt_list BEGIN stmt_list
Shift END stmt_list BEGIN stmt_list END
Reduce to begin_stmt by:
begin_stmt : BEGIN stmt_list END
stmt_list begin_stmt
+

+ +

+ + From here, we reduce by stmt : begin_stmt regardless of what token + comes next.
+ + (This takes us to 4) + + +

+
+ +

State 8

+ +

+ +
begin_stmt:BEGIN . stmt_list END

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BEGIN stmt_list BEGIN
+

+ +

+ + From here, we reduce by stmt_list : regardless of what token + comes next.
+ + (This takes us to 26) + + +

+
+ +

State 9

+ +

+ +
if_stmt:IF . sub_stmt else_stmt END

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
+

+ +

+ + Action table:
+
Lookahead tokenAction
ANDShift and go to state 31
(Overridden: reduce by stmt_list :)
ORShift and go to state 32
(Overridden: reduce by stmt_list :)
OtherReduce by stmt_list :
(This takes us to 27)
+ +

+
+ +

State 10

+ +

+ +
primary:IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IDENT stmt_list IDENT
+

+ +

+ + From here, we reduce by primary : IDENT regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 11

+ +

+ +
primary:STRING_LITERAL .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift STRING_LITERAL stmt_list STRING_LITERAL
+

+ +

+ + From here, we reduce by primary : STRING_LITERAL regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 12

+ +

+ +
primary:AND .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift AND stmt_list AND
+

+ +

+ + From here, we reduce by primary : AND regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 13

+ +

+ +
primary:OR .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift OR stmt_list OR
+

+ +

+ + From here, we reduce by primary : OR regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 14

+ +

+ +
primary:SPACES .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift SPACES stmt_list SPACES
+

+ +

+ + From here, we reduce by primary : SPACES regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 15

+ +

+ +
primary:COMMA .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift COMMA stmt_list COMMA
+

+ +

+ + From here, we reduce by primary : COMMA regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 16

+ +

+ +
primary:LPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift LPAREN stmt_list LPAREN
+

+ +

+ + From here, we reduce by primary : LPAREN regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 17

+ +

+ +
primary:RPAREN .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift RPAREN stmt_list RPAREN
+

+ +

+ + From here, we reduce by primary : RPAREN regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 18

+ +

+ +
primary:QUESTION .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift QUESTION stmt_list QUESTION
+

+ +

+ + From here, we reduce by primary : QUESTION regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 19

+ +

+ +
primary:ACTUAL_COMMENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift ACTUAL_COMMENT stmt_list ACTUAL_COMMENT
+

+ +

+ + From here, we reduce by primary : ACTUAL_COMMENT regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 20

+ +

+ +
primary:bind_var .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift PAREN_BIND_VARIABLE stmt_list PAREN_BIND_VARIABLE
Reduce to bind_var by:
bind_var : PAREN_BIND_VARIABLE
stmt_list bind_var
+

+ +

+ + From here, we reduce by primary : bind_var regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 21

+ +

+ +
primary:embed_var .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift EMBED_VARIABLE stmt_list EMBED_VARIABLE
Shift IDENT stmt_list EMBED_VARIABLE IDENT
Reduce to embed_var by:
embed_var : EMBED_VARIABLE IDENT
stmt_list embed_var
+

+ +

+ + From here, we reduce by primary : embed_var regardless of what token + comes next.
+ + (This takes us to 5) + + +

+
+ +

State 22

+ +

+ +
bind_var:BIND_VARIABLE . STRING_LITERAL
bind_var:BIND_VARIABLE . SPACES STRING_LITERAL
bind_var:BIND_VARIABLE . IDENT
bind_var:BIND_VARIABLE . SPACES IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BIND_VARIABLE stmt_list BIND_VARIABLE
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 35
STRING_LITERALShift and go to state 33
SPACESShift and go to state 34
OtherError
+ +

+
+ +

State 23

+ +

+ +
bind_var:PAREN_BIND_VARIABLE .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift PAREN_BIND_VARIABLE stmt_list PAREN_BIND_VARIABLE
+

+ +

+ + From here, we reduce by bind_var : PAREN_BIND_VARIABLE regardless of what token + comes next.
+ + (This takes us to 20) + + +

+
+ +

State 24

+ +

+ +
embed_var:EMBED_VARIABLE . IDENT
embed_var:EMBED_VARIABLE . SPACES IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift EMBED_VARIABLE stmt_list EMBED_VARIABLE
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 36
SPACESShift and go to state 37
OtherError
+ +

+
+ +

State 25 (end state)

+ +

+ +
$start:sql $end $end .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Reduce to sql by:
sql : stmt_list
sql
Shift $end sql $end
Shift $end sql $end $end
+

+ +

+ + From here, we stop parsing and return success regardless of what token + comes next.
+ + +

+
+ +

State 26

+ +

+ +
stmt_list:stmt_list . stmt
begin_stmt:BEGIN stmt_list . END

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BEGIN stmt_list BEGIN
Reduce to stmt_list by:
stmt_list :
stmt_list BEGIN stmt_list
+

+ +

+ + Action table:
+
Lookahead tokenAction
BEGINShift and go to state 8
ENDShift and go to state 38
IFShift and go to state 9
ANDShift and go to state 12
ORShift and go to state 13
IDENTShift and go to state 10
STRING_LITERALShift and go to state 11
SPACESShift and go to state 14
COMMAShift and go to state 15
LPARENShift and go to state 16
RPARENShift and go to state 17
QUESTIONShift and go to state 18
ACTUAL_COMMENTShift and go to state 19
BIND_VARIABLEShift and go to state 22
PAREN_BIND_VARIABLEShift and go to state 23
EMBED_VARIABLEShift and go to state 24
OtherError
+ +

+
+ +

State 27

+ +

+ +
stmt_list:stmt_list . stmt
sub_stmt:stmt_list .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Reduce to stmt_list by:
stmt_list :
stmt_list IF stmt_list
+

+ +

+ + Action table:
+
Lookahead tokenAction
BEGINShift and go to state 8
IFShift and go to state 9
ANDShift and go to state 12
ORShift and go to state 13
IDENTShift and go to state 10
STRING_LITERALShift and go to state 11
SPACESShift and go to state 14
COMMAShift and go to state 15
LPARENShift and go to state 16
RPARENShift and go to state 17
QUESTIONShift and go to state 18
ACTUAL_COMMENTShift and go to state 19
BIND_VARIABLEShift and go to state 22
PAREN_BIND_VARIABLEShift and go to state 23
EMBED_VARIABLEShift and go to state 24
OtherReduce by sub_stmt : stmt_list
(This can take us to 28 or 47)
+ +

+
+ +

State 28

+ +

+ +
if_stmt:IF sub_stmt . else_stmt END

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Reduce to stmt_list by:
stmt_list :
stmt_list IF stmt_list
Reduce to sub_stmt by:
sub_stmt : stmt_list
stmt_list IF sub_stmt
+

+ +

+ + Action table:
+
Lookahead tokenAction
ELSEShift and go to state 40
OtherReduce by else_stmt :
(This takes us to 39)
+ +

+
+ +

State 29

+ +

+ +
sub_stmt:and_stmt .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Shift AND stmt_list IF AND
Reduce to stmt_list by:
stmt_list :
stmt_list IF AND stmt_list
Reduce to and_stmt by:
and_stmt : AND stmt_list
stmt_list IF and_stmt
+

+ +

+ + From here, we reduce by sub_stmt : and_stmt regardless of what token + comes next.
+ + (This can take us to 28 or 47) + + +

+
+ +

State 30

+ +

+ +
sub_stmt:or_stmt .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Shift OR stmt_list IF OR
Reduce to stmt_list by:
stmt_list :
stmt_list IF OR stmt_list
Reduce to or_stmt by:
or_stmt : OR stmt_list
stmt_list IF or_stmt
+

+ +

+ + From here, we reduce by sub_stmt : or_stmt regardless of what token + comes next.
+ + (This can take us to 28 or 47) + + +

+
+ +

State 31

+ +

+ +
and_stmt:AND . stmt_list

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Shift AND stmt_list IF AND
+

+ +

+ + From here, we reduce by stmt_list : regardless of what token + comes next.
+ + (This takes us to 41) + + +

+
+ +

State 32

+ +

+ +
or_stmt:OR . stmt_list

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Shift OR stmt_list IF OR
+

+ +

+ + From here, we reduce by stmt_list : regardless of what token + comes next.
+ + (This takes us to 42) + + +

+
+ +

State 33

+ +

+ +
bind_var:BIND_VARIABLE STRING_LITERAL .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BIND_VARIABLE stmt_list BIND_VARIABLE
Shift STRING_LITERAL stmt_list BIND_VARIABLE STRING_LITERAL
+

+ +

+ + From here, we reduce by bind_var : BIND_VARIABLE STRING_LITERAL regardless of what token + comes next.
+ + (This takes us to 20) + + +

+
+ +

State 34

+ +

+ +
bind_var:BIND_VARIABLE SPACES . STRING_LITERAL
bind_var:BIND_VARIABLE SPACES . IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BIND_VARIABLE stmt_list BIND_VARIABLE
Shift SPACES stmt_list BIND_VARIABLE SPACES
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 44
STRING_LITERALShift and go to state 43
OtherError
+ +

+
+ +

State 35

+ +

+ +
bind_var:BIND_VARIABLE IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BIND_VARIABLE stmt_list BIND_VARIABLE
Shift IDENT stmt_list BIND_VARIABLE IDENT
+

+ +

+ + From here, we reduce by bind_var : BIND_VARIABLE IDENT regardless of what token + comes next.
+ + (This takes us to 20) + + +

+
+ +

State 36

+ +

+ +
embed_var:EMBED_VARIABLE IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift EMBED_VARIABLE stmt_list EMBED_VARIABLE
Shift IDENT stmt_list EMBED_VARIABLE IDENT
+

+ +

+ + From here, we reduce by embed_var : EMBED_VARIABLE IDENT regardless of what token + comes next.
+ + (This takes us to 21) + + +

+
+ +

State 37

+ +

+ +
embed_var:EMBED_VARIABLE SPACES . IDENT

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift EMBED_VARIABLE stmt_list EMBED_VARIABLE
Shift SPACES stmt_list EMBED_VARIABLE SPACES
+

+ +

+ + Action table:
+
Lookahead tokenAction
IDENTShift and go to state 45
OtherError
+ +

+
+ +

State 38

+ +

+ +
begin_stmt:BEGIN stmt_list END .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BEGIN stmt_list BEGIN
Reduce to stmt_list by:
stmt_list :
stmt_list BEGIN stmt_list
Shift END stmt_list BEGIN stmt_list END
+

+ +

+ + From here, we reduce by begin_stmt : BEGIN stmt_list END regardless of what token + comes next.
+ + (This takes us to 7) + + +

+
+ +

State 39

+ +

+ +
if_stmt:IF sub_stmt else_stmt . END

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Reduce to stmt_list by:
stmt_list :
stmt_list IF stmt_list
Reduce to sub_stmt by:
sub_stmt : stmt_list
stmt_list IF sub_stmt
Reduce to else_stmt by:
else_stmt :
stmt_list IF sub_stmt else_stmt
+

+ +

+ + Action table:
+
Lookahead tokenAction
ENDShift and go to state 46
OtherError
+ +

+
+ +

State 40

+ +

+ +
else_stmt:ELSE . sub_stmt

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Reduce to stmt_list by:
stmt_list :
stmt_list IF stmt_list
Reduce to sub_stmt by:
sub_stmt : stmt_list
stmt_list IF sub_stmt
Shift ELSE stmt_list IF sub_stmt ELSE
+

+ +

+ + Action table:
+
Lookahead tokenAction
ANDShift and go to state 31
(Overridden: reduce by stmt_list :)
ORShift and go to state 32
(Overridden: reduce by stmt_list :)
OtherReduce by stmt_list :
(This takes us to 27)
+ +

+
+ +

State 41

+ +

+ +
stmt_list:stmt_list . stmt
and_stmt:AND stmt_list .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Shift AND stmt_list IF AND
Reduce to stmt_list by:
stmt_list :
stmt_list IF AND stmt_list
+

+ +

+ + Action table:
+
Lookahead tokenAction
BEGINShift and go to state 8
IFShift and go to state 9
ANDShift and go to state 12
ORShift and go to state 13
IDENTShift and go to state 10
STRING_LITERALShift and go to state 11
SPACESShift and go to state 14
COMMAShift and go to state 15
LPARENShift and go to state 16
RPARENShift and go to state 17
QUESTIONShift and go to state 18
ACTUAL_COMMENTShift and go to state 19
BIND_VARIABLEShift and go to state 22
PAREN_BIND_VARIABLEShift and go to state 23
EMBED_VARIABLEShift and go to state 24
OtherReduce by and_stmt : AND stmt_list
(This takes us to 29)
+ +

+
+ +

State 42

+ +

+ +
stmt_list:stmt_list . stmt
or_stmt:OR stmt_list .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Shift OR stmt_list IF OR
Reduce to stmt_list by:
stmt_list :
stmt_list IF OR stmt_list
+

+ +

+ + Action table:
+
Lookahead tokenAction
BEGINShift and go to state 8
IFShift and go to state 9
ANDShift and go to state 12
ORShift and go to state 13
IDENTShift and go to state 10
STRING_LITERALShift and go to state 11
SPACESShift and go to state 14
COMMAShift and go to state 15
LPARENShift and go to state 16
RPARENShift and go to state 17
QUESTIONShift and go to state 18
ACTUAL_COMMENTShift and go to state 19
BIND_VARIABLEShift and go to state 22
PAREN_BIND_VARIABLEShift and go to state 23
EMBED_VARIABLEShift and go to state 24
OtherReduce by or_stmt : OR stmt_list
(This takes us to 30)
+ +

+
+ +

State 43

+ +

+ +
bind_var:BIND_VARIABLE SPACES STRING_LITERAL .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BIND_VARIABLE stmt_list BIND_VARIABLE
Shift SPACES stmt_list BIND_VARIABLE SPACES
Shift STRING_LITERAL stmt_list BIND_VARIABLE SPACES STRING_LITERAL
+

+ +

+ + From here, we reduce by bind_var : BIND_VARIABLE SPACES STRING_LITERAL regardless of what token + comes next.
+ + (This takes us to 20) + + +

+
+ +

State 44

+ +

+ +
bind_var:BIND_VARIABLE SPACES IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift BIND_VARIABLE stmt_list BIND_VARIABLE
Shift SPACES stmt_list BIND_VARIABLE SPACES
Shift IDENT stmt_list BIND_VARIABLE SPACES IDENT
+

+ +

+ + From here, we reduce by bind_var : BIND_VARIABLE SPACES IDENT regardless of what token + comes next.
+ + (This takes us to 20) + + +

+
+ +

State 45

+ +

+ +
embed_var:EMBED_VARIABLE SPACES IDENT .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift EMBED_VARIABLE stmt_list EMBED_VARIABLE
Shift SPACES stmt_list EMBED_VARIABLE SPACES
Shift IDENT stmt_list EMBED_VARIABLE SPACES IDENT
+

+ +

+ + From here, we reduce by embed_var : EMBED_VARIABLE SPACES IDENT regardless of what token + comes next.
+ + (This takes us to 21) + + +

+
+ +

State 46

+ +

+ +
if_stmt:IF sub_stmt else_stmt END .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Reduce to stmt_list by:
stmt_list :
stmt_list IF stmt_list
Reduce to sub_stmt by:
sub_stmt : stmt_list
stmt_list IF sub_stmt
Reduce to else_stmt by:
else_stmt :
stmt_list IF sub_stmt else_stmt
Shift END stmt_list IF sub_stmt else_stmt END
+

+ +

+ + From here, we reduce by if_stmt : IF sub_stmt else_stmt END regardless of what token + comes next.
+ + (This takes us to 6) + + +

+
+ +

State 47

+ +

+ +
else_stmt:ELSE sub_stmt .

+ +

+ This state can be reached from the start state by:
+
Action:Stack:
Reduce to stmt_list by:
stmt_list :
stmt_list
Shift IF stmt_list IF
Reduce to stmt_list by:
stmt_list :
stmt_list IF stmt_list
Reduce to sub_stmt by:
sub_stmt : stmt_list
stmt_list IF sub_stmt
Shift ELSE stmt_list IF sub_stmt ELSE
Reduce to stmt_list by:
stmt_list :
stmt_list IF sub_stmt ELSE stmt_list
Reduce to sub_stmt by:
sub_stmt : stmt_list
stmt_list IF sub_stmt ELSE sub_stmt
+

+ +

+ + From here, we reduce by else_stmt : ELSE sub_stmt regardless of what token + comes next.
+ + (This takes us to 39) + + +

+
+ + + + diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 7178e3ca..ccca876e 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -365,6 +365,7 @@ def test_twowaysql err = assert_compile 'twowaysql.y' assert_warnings err, sr_conflicts: 4 assert_parser_unchanged 'twowaysql.y' + assert_html_unchanged 'twowaysql.y' end # .y file from machete gem From b9e641a6190d43a290f741d7688bbb431f3843b8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 13:37:51 +0200 Subject: [PATCH 525/619] Introduce Warning::UnusedTerminal and Warning::UnusedNonterminal --- lib/racc/grammar.rb | 10 +++++----- lib/racc/warning.rb | 29 +++++++++++++++++++++++++++++ test/regress/edtf.out | 4 ++-- test/regress/mof.out | 8 ++++---- test/regress/opal.out | 6 +++--- 5 files changed, 43 insertions(+), 14 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index dd6e567b..36990ff4 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -122,11 +122,11 @@ def warnings(verbose) useless_symbols.each do |sym| if sym.locate.empty? - what = sym.terminal? ? 'terminal' : 'nonterminal' - type = "useless_#{what}".to_sym - warnings.add_for_symbol(sym, Warning.new(type, "Useless #{what} #{sym} does not " \ - 'appear on the right side of any rule, neither is it the start ' \ - 'symbol.')) + if sym.terminal? + warnings.add_for_symbol(sym, Warning::UnusedTerminal.new(sym)) + else + warnings.add_for_symbol(sym, Warning::UnusedNonterminal.new(sym)) + end elsif !sym.reachable.include?(@start) && sym.reachable.include?(sym) if sym.reachable.one? warnings.add_for_symbol(sym, Warning.new(:useless_nonterminal, 'Useless ' \ diff --git a/lib/racc/warning.rb b/lib/racc/warning.rb index 33b9e3b9..e74e5af3 100644 --- a/lib/racc/warning.rb +++ b/lib/racc/warning.rb @@ -63,6 +63,35 @@ def verbose_details? type == :sr_conflict || type == :rr_conflict end + class UnusedTerminal < Warning + def initialize(sym) + @sym = sym + end + + def title + "Useless terminal #{@sym} does not appear on the right side of any rule" + end + + def type + :useless_terminal + end + end + + class UnusedNonterminal < Warning + def initialize(sym) + @sym = sym + end + + def title + "Useless nonterminal #{@sym} does not appear on the right side of " \ + "any rule, neither is it the start symbol" + end + + def type + :useless_nonterminal + end + end + class InfiniteLoop < Warning def initialize(sym) @sym = sym diff --git a/test/regress/edtf.out b/test/regress/edtf.out index 3085119f..af5dc078 100644 --- a/test/regress/edtf.out +++ b/test/regress/edtf.out @@ -2,8 +2,8 @@ Parsing grammar file... Generating and resolving LALR states... Creating parser file... -Warning: Useless terminal UNMATCHED does not appear on the right side of any rule, neither is it the start symbol. +Warning: Useless terminal UNMATCHED does not appear on the right side of any rule -Warning: Useless terminal PUA does not appear on the right side of any rule, neither is it the start symbol. +Warning: Useless terminal PUA does not appear on the right side of any rule 2 useless terminals diff --git a/test/regress/mof.out b/test/regress/mof.out index 1acbd6a6..ac89fa50 100644 --- a/test/regress/mof.out +++ b/test/regress/mof.out @@ -2,13 +2,13 @@ Parsing grammar file... Generating and resolving LALR states... Creating parser file... -Warning: Useless terminal "*" does not appear on the right side of any rule, neither is it the start symbol. +Warning: Useless terminal "*" does not appear on the right side of any rule -Warning: Useless terminal "/" does not appear on the right side of any rule, neither is it the start symbol. +Warning: Useless terminal "/" does not appear on the right side of any rule -Warning: Useless terminal "+" does not appear on the right side of any rule, neither is it the start symbol. +Warning: Useless terminal "+" does not appear on the right side of any rule -Warning: Useless terminal "-" does not appear on the right side of any rule, neither is it the start symbol. +Warning: Useless terminal "-" does not appear on the right side of any rule Warning: This rule will never be used due to low precedence: mof.y:429: namespace_opt diff --git a/test/regress/opal.out b/test/regress/opal.out index 3f0a218b..122f1201 100644 --- a/test/regress/opal.out +++ b/test/regress/opal.out @@ -2,11 +2,11 @@ Parsing grammar file... Generating and resolving LALR states... Creating parser file... -Warning: Useless terminal k__ENCODING__ does not appear on the right side of any rule, neither is it the start symbol. +Warning: Useless terminal k__ENCODING__ does not appear on the right side of any rule -Warning: Useless terminal tUMINUS_NUM does not appear on the right side of any rule, neither is it the start symbol. +Warning: Useless terminal tUMINUS_NUM does not appear on the right side of any rule -Warning: Useless terminal ARRAY_BEG does not appear on the right side of any rule, neither is it the start symbol. +Warning: Useless terminal ARRAY_BEG does not appear on the right side of any rule Warning: The explicit precedence declaration on this rule does not resolve any conflicts and can be removed: opal.y:1412: numeric: tINTEGER From 6a5f1e5f868ac52d4389441add3c20c2643a7586 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 13:44:06 +0200 Subject: [PATCH 526/619] Introduce Warning::UnreachableTerminal --- lib/racc/grammar.rb | 6 +----- lib/racc/warning.rb | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 36990ff4..7419977f 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -133,11 +133,7 @@ def warnings(verbose) "nonterminal #{sym} only appears on the right side of its " \ 'own rules.')) else - warnings.add_for_symbol(sym, Warning.new(:useless_nonterminal, 'Useless ' \ - "nonterminal #{sym} cannot be part of a valid parse tree, " \ - 'since there is no sequence of reductions from it to the ' \ - 'start symbol.', 'It can only reduce to: ' \ - "#{sym.reachable.map(&:to_s).join(', ')}")) + warnings.add_for_symbol(sym, Warning::UnreachableNonterminal.new(sym)) end elsif !productive_symbols.include?(sym) warnings.add_for_symbol(sym, Warning::InfiniteLoop.new(sym)) diff --git a/lib/racc/warning.rb b/lib/racc/warning.rb index e74e5af3..5f4a1a83 100644 --- a/lib/racc/warning.rb +++ b/lib/racc/warning.rb @@ -113,6 +113,25 @@ def type end end + class UnreachableNonterminal < Warning + def initialize(sym) + @sym = sym + end + + def title + "Useless nonterminal #{sym} cannot be part of a valid parse tree, " \ + 'since there is no sequence of reductions from it to the start symbol.' + end + + def details + "It can only reduce to: #{sym.reachable.map(&:to_s).join(', ')}" + end + + def type + :useless_nonterminal + end + end + class UselessPrecedence < Warning def initialize(rule) @rule = rule From d1c3c212ff6b50c5faba1d98fec5bbdee1f155dd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 16:03:26 +0200 Subject: [PATCH 527/619] Use SimulatedAutomaton rather than SimulatedParseContext SimulatedParseContext had exponential runtime in some (not so uncommon) circumstances. --- Manifest.txt | 3 +- lib/racc/grammar.rb | 4 + lib/racc/simulated_automaton.rb | 152 +++++++++++++++ lib/racc/simulated_parse_context.rb | 285 ---------------------------- lib/racc/state.rb | 5 +- lib/racc/warning.rb | 61 +++--- test/regress/csspool.out | 20 +- test/regress/mof.out | 40 ++-- test/test_simulated_parse.rb | 212 --------------------- 9 files changed, 224 insertions(+), 558 deletions(-) create mode 100644 lib/racc/simulated_automaton.rb delete mode 100644 lib/racc/simulated_parse_context.rb delete mode 100644 test/test_simulated_parse.rb diff --git a/Manifest.txt b/Manifest.txt index 6ca9383f..95ea7bb3 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -23,7 +23,7 @@ lib/racc/info.rb lib/racc/parser-text.rb lib/racc/parser.rb lib/racc/parser_file_generator.rb -lib/racc/simulated_parse_context.rb +lib/racc/simulated_automaton.rb lib/racc/source.rb lib/racc/state.rb lib/racc/state_summary_generator.rb @@ -179,4 +179,3 @@ test/test_grammar_file_parser.rb test/test_racc_command.rb test/test_scan_y.rb test/test_scanner.rb -test/test_simulated_parse.rb diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 7419977f..014891e4 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -710,6 +710,10 @@ def nullable? @nullable ||= @grammar.nullable_symbols.include?(self) end + def shortest_production + @shortest_prod ||= @grammar.shortest_productions[self] + end + # What NTs can be reached from this symbol, by traversing from the RHS of # a rule where the symbol appears, to the target of the rule, then to the # RHS of its rules, and so on? diff --git a/lib/racc/simulated_automaton.rb b/lib/racc/simulated_automaton.rb new file mode 100644 index 00000000..47e2bafe --- /dev/null +++ b/lib/racc/simulated_automaton.rb @@ -0,0 +1,152 @@ +require 'racc/state' +require 'racc/directed_graph' +require 'set' + +module Racc + class SimulatedAutomaton + def self.from_path(grammar, path) + path.each_with_object(self.new(grammar.states)) do |sym, automaton| + if sym.terminal? + automaton.consume!(sym) + else + automaton.goto!(sym) + end + end + end + + def initialize(states) + @states = states + @state = states.first + @sstack = [] + @error = false + end + + attr_reader :state + + def stack + @sstack + end + + def error? + @error + end + + # consuming a terminal may set off a series of reduces before the terminal + # is shifted + def consume!(token) + return self if @error + + action = @state.action[token] || @state.defact + case action + when Shift + @sstack.push(@state) + @state = action.goto_state + shifted(token) + when Reduce + reduce_by!(action.rule) + consume!(token) + when Accept + done + when Error + @error = true + error + else + raise "Illegal action type: #{action.class}" + end + + self + end + + def goto!(nt) + @sstack.push(@state) + @state = @state.gotos[nt].to_state + goto(nt) + self + end + + def reduce_by!(rule) + rule.symbols.size.times { @state = @sstack.pop } + reduced(rule.target) + goto!(rule.target) + end + + # Callbacks; can be overridden + + def shifted(symbol) + end + + def reduced(nt) + end + + def goto(nt) + end + + def done + end + + def error + end + + def path_to_success(traversed = Set.new) + # Find the shortest series of terminals/reduce operations which will take + # us to the accept state + return [] if @state.ident == 1 + return nil if @error + + # Don't go into an infinite loop exploring the same states + return unless traversed.add?(@sstack + [@state]) + + # The state stack will guide us + # How many symbols could we reduce the stack size by for each reduce + # reachable from this state? + core = @state.core.group_by { |ptr| [ptr.rule.target, ptr.index] } + + core.map do |(target, offset), ptrs| + ptr = ptrs.min_by do |p| + # how many terminals will it take to reach reduce, if we try to + # follow this rule? + remaining_syms = p.rule.symbols[p.index..-1] + remaining_syms.flat_map(&:shortest_production).size + end + + automaton = self.dup + path1 = automaton.follow_rule(ptr) + next if automaton.error? + + path2 = automaton.path_to_success(traversed) + # If that led to an infinite loop, `path2` will be `nil`. + path2 && path1.concat(path2) + end.compact.min_by(&:size) + end + + def follow_shortest_rule_for(sym) + rule = sym.heads.map(&:rule).min_by do |r| + r.symbols.flat_map(&:shortest_production).size + end + follow_rule(rule.ptrs[0]) + end + + def follow_rule(ptr) + actions = [] + initial_state = @state + + ptr.rule.symbols[ptr.index..-1].each do |sym| + if sym.terminal? + actions << sym + consume!(sym) + else + actions.concat(follow_shortest_rule_for(sym)) + end + end + + reduce_by!(ptr.rule) + actions << ReduceStep.new(initial_state, @state, ptr.rule, ptr.rule.target) + end + + def dup + result = super + @sstack = @sstack.dup + result + end + end +end \ No newline at end of file diff --git a/lib/racc/simulated_parse_context.rb b/lib/racc/simulated_parse_context.rb deleted file mode 100644 index 01a2b751..00000000 --- a/lib/racc/simulated_parse_context.rb +++ /dev/null @@ -1,285 +0,0 @@ -require 'racc/directed_graph' -require 'set' - -module Racc - # Tree structure which describes the entire context, from top down, of a - # (simulated) in-progress parse - # What rules could we be "in" at a certain point in the parsing process? - class SimulatedParseContext < Graph::Generic - class Node < Graph::Node - def initialize(ptr) - super() - @ptr = ptr - end - - attr_reader :ptr - - # all nodes on this graph have only one parent node (it's a tree) - def parent - raise 'Should have 1 parent' unless self.in.one? - self.in.first - end - - def ancestors - # don't include the "dummy" start node which does not contain a valid - # LocationPointer - result, node = [], self - until node.in.empty? - result << node - node = node.parent - end - result - end - end - - def self.from_path(grammar, path) - path.each_with_object(SimulatedParseContext.new(grammar)) do |sym, context| - context.consume!(sym) - end - end - - def initialize(grammar) - super() - self.start = Node.new(nil) - add_child(@start, grammar[0].ptrs[0]) - end - - def add_child(parent, ptr) - # avoid cluttering the tree up with redundant nodes - if child = parent.out.find { |node| node.ptr == ptr } - child - else - super(parent, Node.new(ptr)) - end - end - - #=========================================== - # Override some methods from Graph::Generic: - #=========================================== - - def leaves - super.tap { |set| set.delete(@start) } - end - - def reachable - super.tap { |set| set.delete(@start) } - end - - def can_reach(dests) - super.tap { |set| set.delete(@start) } - end - - def shortest_paths - super.tap { |h| h.delete(@start) }.tap { |h| h.each_value { |path| path.shift }} - end - - def node_caption(node) - Color.without_color { (node.ptr && node.ptr.to_s) || 'ROOT' } - end - - #====================================================== - # Taking steps forward in the simulated parsing process - #====================================================== - - # This method can be passed a terminal OR nonterminal - # Passing a nonterminal means "a series of tokens appeared next in the - # input which was recognized as and reduced to this nonterminal" - # Any reduces which must be done before accepting that "series of tokens", - # or even a single token, are done implicitly - def consume!(sym) - new_leaves = leaves.each_with_object([]) do |node, added| - consume_symbol!(node, sym, added) - end - keep_nodes!(new_leaves) - end - - # Shift a single terminal - # No implicit reduce is done first - def shift!(sym) - raise 'Can only shift a terminal' unless sym.terminal? - new_leaves = leaves.each_with_object([]) do |node, added| - shift_symbol!(node, sym, added) - end - keep_nodes!(new_leaves) - end - - # Commit to recognizing an already-shifted series of tokens as a certain - # nonterminal, thus trimming the space of possible location pointers - def reduce!(sym) - raise 'Can only reduce a nonterminal' unless sym.nonterminal? - if sym.nullable? - nodes = reachable.select do |n| - # get all leaf nodes, and any other nodes which have the nullable NT - # as their next symbol - !n.ptr.reduce? && (n.ptr.symbol == sym || n.out.empty?) - end - new_nodes = nodes.each_with_object([]) do |node, added| - shift_symbol!(node, sym, added) - end - else - new_nodes = leaves.each_with_object([]) do |node, added| - if node.ptr.reduce? && node.parent.ptr.symbol == sym - added << add_child(node.parent.parent, follow_reduction!(node, added)) - end - end - end - raise "Can't reduce to #{sym} from current state" if new_nodes.empty? - keep_nodes!(new_nodes) - end - - # Trim the space of possible parse locations to those consistent with - # `sym` being the next token in the input - def lookahead!(sym) - raise 'Lookahead must be a terminal' unless sym.terminal? - new_leaves = leaves.select { |node| lookahead_valid?(node, sym) } - keep_nodes!(new_leaves) - end - - # what (sample) sequence of terminals/NTs could lead to a successful parse - # from here? - def path_to_success - paths = shortest_paths do |_, node| - # this cost function helps find the path to a successful parse which - # can be described most succinctly - node.ptr.rule.symbols.size - node.ptr.index + 1 - end - path = paths.select { |node, _| node.out.empty? } - .map { |_, p| p }.min_by(&:size) - - throw :dead_end if path.nil? - return [path[0].ptr.symbol] if path.one? - - # don't show the synthesized rule which reduces to the 'dummy' symbol - # we need to reduce from the lowest level rule on up, so the order - # also has to be reversed - # all rules except for the first start with the NT which the previous - # rule had just reduced; don't show that (it's redundant) - path.drop(1).reverse.each_with_index.flat_map do |node, i| - ptr = node.ptr - ptr = ptr.next unless i == 0 - ptr.rule.symbols[ptr.index..-1] << "(reduce to #{ptr.rule.target})" - end - end - - def to_s - active_ptrs = reachable.map(&:ptr) - active_ptrs.uniq.sort_by(&:ident).map(&:to_s).join("\n") - end - - def inspect - return "parse context: nothing possible" if @start.nil? - result = "parse context:\n" - indent, stack, nodes = 0, [], @start.out.sort_by { |n| n.ptr.ident } - - until nodes.nil? - while node = nodes.shift - result << (' ' * indent) << node.ptr.to_s << "\n" - stack.push(nodes) - indent += 2 - nodes = node.out.sort_by { |n| n.ptr.ident } - end - nodes = stack.pop - indent -= 2 - end - - result.chomp - end - - private - - def keep_nodes!(nodes) - keep = can_reach(nodes) + reachable_from(nodes) + [@start] - @nodes.each { |node| remove_node(node) unless keep.include?(node) } - self - end - - # `added` is a collecting parameter for new nodes which were able to - # 'consume' the input symbol - def consume_symbol!(node, sym, added, dont_expand = []) - ptr = node.ptr - - while true - if ptr.reduce? - ptr = follow_reduction!(node, added) - node = node.parent - else - if ptr.symbol == sym - added << add_child(node.parent, ptr.next) - end - - # Lazily expand child (and grandchild, etc) nodes, only expanding - # those where we can actually shift the consumed symbol - if ptr.symbol.first_set.include?(sym) && !dont_expand.include?(ptr) - dont_expand.push(ptr) # avoid infinite recursion on L-recursive rules - ptr.symbol.heads.each do |p| - next if p.reduce? - consume_symbol!(add_child(node, p), sym, added, dont_expand) - end - dont_expand.pop - end - - ptr.symbol.nullable? ? ptr = ptr.next : return - end - end - end - - # Like consume_symbol!, but don't traverse past a reduction - def shift_symbol!(node, sym, added, dont_expand = []) - ptr = node.ptr - - while true - return if ptr.reduce? - - if ptr.symbol == sym - added << add_child(node.parent, ptr.next) - end - - if ptr.symbol.first_set.include?(sym) && !dont_expand.include?(ptr) - dont_expand.push(ptr) # avoid infinite recursion on L-recursive rules - ptr.symbol.heads.each do |p| - next if p.reduce? - shift_symbol!(add_child(node, p), sym, added, dont_expand) - end - dont_expand.pop - end - - ptr.symbol.nullable? ? ptr = ptr.next : return - end - end - - def follow_reduction!(node, added) - node = node.parent - ptr = node.ptr - - # If the reduced symbol is left-recursive, besides moving past it in - # the parent node, also move past it in each derivation rule which - # has it in head position - ptr.symbol.heads.each do |head| - if !head.reduce? && head.symbol.first_set.include?(ptr.symbol) - consume_symbol!(add_child(node, head), ptr.symbol, added) - end - end - - node.ptr.next - end - - def lookahead_valid?(node, sym) - ptr = node.ptr - - while true - if ptr.reduce? - node = node.parent # go up a level - ptr = node.ptr.next - elsif ptr.symbol.terminal? - return ptr.symbol == sym - elsif ptr.symbol.first_set.include?(sym) - return true - elsif ptr.symbol.nullable? - ptr = ptr.next - else - return false - end - end - end - end -end \ No newline at end of file diff --git a/lib/racc/state.rb b/lib/racc/state.rb index b6f6a9d8..5a3b38a7 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -9,7 +9,6 @@ require 'racc/exception' require 'racc/util' require 'racc/directed_graph' -require 'racc/simulated_parse_context' require 'set' @@ -672,5 +671,9 @@ def initialize(from, to, rule, symbol) end attr_reader :from, :to, :rule, :symbol + + def to_s + "(reduce to #{@symbol})" + end end end diff --git a/lib/racc/warning.rb b/lib/racc/warning.rb index 5f4a1a83..233f1946 100644 --- a/lib/racc/warning.rb +++ b/lib/racc/warning.rb @@ -1,5 +1,5 @@ require 'racc/color' -require 'racc/simulated_parse_context' +require 'racc/simulated_automaton' module Racc include Racc::Color @@ -216,21 +216,23 @@ def details @rrule.to_s if @verbose - scontext = SimulatedParseContext.from_path(@grammar, @path).shift!(@sym) + sauto = SimulatedAutomaton.from_path(@grammar, @path).consume!(@sym) result << "\n\nAfter shifting #{@sym}, one path to a successful " \ - "parse would be:\n" << scontext.path_to_success.map(&:to_s).join(' ') - - rcontext = SimulatedParseContext.from_path(@grammar, @path) - .reduce!(@rrule.target).consume!(@sym) - result << ((catch :dead_end do - "\n\nAfter reducing to #{@rrule.target}, one path to a " \ - "successful parse would be:\n" << - rcontext.path_to_success.unshift(@sym).map(&:to_s).join(' ') - end) || "\n\nI can't see any way that reducing to " \ - "#{@rrule.target} could possibly lead to a successful parse " \ - 'from this situation. But maybe if this parser state was ' \ - "reached through a different input sequence, it could. I'm " \ - 'just a LALR parser generator and I can be pretty daft sometimes.') + "parse would be:\n" << sauto.path_to_success.map(&:to_s).join(' ') + + rauto = SimulatedAutomaton.from_path(@grammar, @path) + .reduce_by!(@rrule).consume!(@sym) + path = rauto.path_to_success + if path + result << "\n\nAfter reducing to #{@rrule.target}, one path to a " \ + "successful parse would be:\n" << path.unshift(@sym).map(&:to_s).join(' ') + else + result << "\n\nI can't see any way that reducing to " \ + "#{@rrule.target} could possibly lead to a successful parse " \ + 'from this situation. But maybe if this parser state was ' \ + "reached through a different input sequence, it could. I'm " \ + 'just a LALR parser generator and I can be pretty daft sometimes.' + end end result @@ -269,20 +271,23 @@ def details @rules.map(&:to_s).join("\n") if @verbose - targets = @rules.map(&:target).uniq + targets = @rules.group_by(&:target) if targets.size > 1 - targets.each do |target| - rcontext = SimulatedParseContext.from_path(@grammar, @path) - .reduce!(target).consume!(@sym) - result << ((catch :dead_end do - "\n\nAfter reducing to #{target}, one path to a " \ - "successful parse would be:\n" << - rcontext.path_to_success.unshift(@sym).map(&:to_s).join(' ') - end) || "\n\nI can't see any way that reducing to " \ - "#{target} could possibly lead to a successful parse " \ - 'from this situation. But maybe if this parser state was ' \ - "reached through a different input sequence, it could. I'm " \ - 'just a LALR parser generator and I can be pretty daft sometimes.') + targets.each do |target, rules| + rauto = SimulatedAutomaton.from_path(@grammar, @path) + .reduce_by!(rules.first).consume!(@sym) + path = rauto.path_to_success + if path + result << "\n\nAfter reducing to #{target}, one path to a " \ + "successful parse would be:\n" << + path.unshift(@sym).map(&:to_s).join(' ') + else + result << "\n\nI can't see any way that reducing to " \ + "#{target} could possibly lead to a successful parse " \ + 'from this situation. But maybe if this parser state was ' \ + "reached through a different input sequence, it could. I'm " \ + 'just a LALR parser generator and I can be pretty daft sometimes.' + end end end end diff --git a/test/regress/csspool.out b/test/regress/csspool.out index 3573ff7d..030723e3 100644 --- a/test/regress/csspool.out +++ b/test/regress/csspool.out @@ -49,10 +49,10 @@ The following rule directs me to reduce: : SEMI After shifting SEMI, one path to a successful parse would be: -(reduce to one_or_more_semis) (reduce to one_or_more_semis) declarations (reduce to declarations) RBRACE (reduce to fontface_rule) body (reduce to body) (reduce to stylesheet) (reduce to document) +(reduce to one_or_more_semis) (reduce to one_or_more_semis) (reduce to declarations) RBRACE (reduce to fontface_rule) (reduce to body) (reduce to stylesheet) (reduce to document) After reducing to one_or_more_semis, one path to a successful parse would be: -SEMI (reduce to one_or_more_semis) declarations (reduce to declarations) (reduce to declarations) RBRACE (reduce to fontface_rule) body (reduce to body) (reduce to stylesheet) (reduce to document) +SEMI (reduce to one_or_more_semis) (reduce to declarations) (reduce to declarations) RBRACE (reduce to fontface_rule) (reduce to body) (reduce to stylesheet) (reduce to document) Warning: Shift/reduce conflict on S, after the following input: COLON MOZ_PSEUDO_ELEMENT @@ -66,10 +66,10 @@ The following rule directs me to reduce: csspool.y:96:  | { result = nil } After shifting S, one path to a successful parse would be: -(reduce to optional_space) any_number_of_idents optional_space RPAREN (reduce to pseudo) (reduce to hcap) (reduce to simple_selector) combinator selector (reduce to selector) COMMA selectors (reduce to selectors) LBRACE (reduce to start_selector) declarations RBRACE (reduce to ruleset) body (reduce to body) (reduce to stylesheet) (reduce to document) +(reduce to optional_space) (reduce to any_number_of_idents) (reduce to optional_space) RPAREN (reduce to pseudo) (reduce to hcap) (reduce to simple_selector) (reduce to selector) (reduce to selectors) LBRACE (reduce to start_selector) RBRACE (reduce to ruleset) (reduce to body) (reduce to stylesheet) (reduce to document) After reducing to optional_space, one path to a successful parse would be: -S (reduce to optional_space) optional_space RPAREN (reduce to pseudo) (reduce to hcap) (reduce to simple_selector) combinator selector (reduce to selector) COMMA selectors (reduce to selectors) LBRACE (reduce to start_selector) declarations RBRACE (reduce to ruleset) body (reduce to body) (reduce to stylesheet) (reduce to document) +S (reduce to optional_space) RPAREN (reduce to pseudo) (reduce to hcap) (reduce to simple_selector) (reduce to selector) (reduce to selectors) LBRACE (reduce to start_selector) RBRACE (reduce to ruleset) (reduce to body) (reduce to stylesheet) (reduce to document) Warning: Shift/reduce conflict on COMMA, after the following input: start_document_query_pos FUNCTION UNICODE_RANGE @@ -83,10 +83,10 @@ The following rule directs me to reduce: csspool.y:592:  | UNICODE_RANGE After shifting COMMA, one path to a successful parse would be: -uranges (reduce to uranges) (reduce to term) operator expr (reduce to expr) RPAREN (reduce to function) (reduce to url_match_fn) COMMA url_match_fns (reduce to url_match_fns) LBRACE (reduce to start_document_query) body RBRACE (reduce to document_query) (reduce to conditional_rule) body (reduce to body) (reduce to stylesheet) (reduce to document) +UNICODE_RANGE (reduce to uranges) (reduce to uranges) (reduce to term) (reduce to expr) RPAREN (reduce to function) (reduce to url_match_fn) (reduce to url_match_fns) LBRACE (reduce to start_document_query) RBRACE (reduce to document_query) (reduce to conditional_rule) (reduce to body) (reduce to stylesheet) (reduce to document) After reducing to uranges, one path to a successful parse would be: -COMMA (reduce to operator) operator expr (reduce to expr) RPAREN (reduce to function) (reduce to url_match_fn) COMMA url_match_fns (reduce to url_match_fns) LBRACE (reduce to start_document_query) body RBRACE (reduce to document_query) (reduce to conditional_rule) body (reduce to body) (reduce to stylesheet) (reduce to document) +COMMA (reduce to operator) IDENT (reduce to ident) (reduce to term) (reduce to expr) (reduce to expr) RPAREN (reduce to function) (reduce to url_match_fn) (reduce to url_match_fns) LBRACE (reduce to start_document_query) RBRACE (reduce to document_query) (reduce to conditional_rule) (reduce to body) (reduce to stylesheet) (reduce to document) Warning: Shift/reduce conflict on S, after the following input: COLON COLON MOZ_PSEUDO_ELEMENT @@ -100,10 +100,10 @@ The following rule directs me to reduce: csspool.y:96:  | { result = nil } After shifting S, one path to a successful parse would be: -(reduce to optional_space) any_number_of_idents optional_space RPAREN (reduce to pseudo) (reduce to hcap) (reduce to simple_selector) combinator selector (reduce to selector) COMMA selectors (reduce to selectors) LBRACE (reduce to start_selector) declarations RBRACE (reduce to ruleset) body (reduce to body) (reduce to stylesheet) (reduce to document) +(reduce to optional_space) (reduce to any_number_of_idents) (reduce to optional_space) RPAREN (reduce to pseudo) (reduce to hcap) (reduce to simple_selector) (reduce to selector) (reduce to selectors) LBRACE (reduce to start_selector) RBRACE (reduce to ruleset) (reduce to body) (reduce to stylesheet) (reduce to document) After reducing to optional_space, one path to a successful parse would be: -S (reduce to optional_space) optional_space RPAREN (reduce to pseudo) (reduce to hcap) (reduce to simple_selector) combinator selector (reduce to selector) COMMA selectors (reduce to selectors) LBRACE (reduce to start_selector) declarations RBRACE (reduce to ruleset) body (reduce to body) (reduce to stylesheet) (reduce to document) +S (reduce to optional_space) RPAREN (reduce to pseudo) (reduce to hcap) (reduce to simple_selector) (reduce to selector) (reduce to selectors) LBRACE (reduce to start_selector) RBRACE (reduce to ruleset) (reduce to body) (reduce to stylesheet) (reduce to document) Warning: Shift/reduce conflict on S, after the following input: start_document_query_pos FUNCTION CALC_SYM function @@ -117,9 +117,9 @@ The following rule directs me to reduce: csspool.y:612:  | function { result = val.join('') } # for var() variable references After shifting S, one path to a successful parse would be: -(reduce to function) (reduce to calc_value) (reduce to calc_product) (reduce to calc_sum) RPAREN optional_space (reduce to calc) (reduce to term) operator expr (reduce to expr) RPAREN (reduce to function) (reduce to url_match_fn) COMMA url_match_fns (reduce to url_match_fns) LBRACE (reduce to start_document_query) body RBRACE (reduce to document_query) (reduce to conditional_rule) body (reduce to body) (reduce to stylesheet) (reduce to document) +(reduce to function) (reduce to calc_value) (reduce to calc_product) (reduce to calc_sum) RPAREN (reduce to optional_space) (reduce to calc) (reduce to term) (reduce to expr) RPAREN (reduce to function) (reduce to url_match_fn) (reduce to url_match_fns) LBRACE (reduce to start_document_query) RBRACE (reduce to document_query) (reduce to conditional_rule) (reduce to body) (reduce to stylesheet) (reduce to document) After reducing to calc_value, one path to a successful parse would be: -S (reduce to optional_space) STAR calc_value (reduce to calc_product) (reduce to calc_sum) RPAREN optional_space (reduce to calc) (reduce to term) operator expr (reduce to expr) RPAREN (reduce to function) (reduce to url_match_fn) COMMA url_match_fns (reduce to url_match_fns) LBRACE (reduce to start_document_query) body RBRACE (reduce to document_query) (reduce to conditional_rule) body (reduce to body) (reduce to stylesheet) (reduce to document) +S (reduce to optional_space) STAR NUMBER (reduce to numeric) (reduce to calc_value) (reduce to calc_product) (reduce to calc_sum) RPAREN (reduce to optional_space) (reduce to calc) (reduce to term) (reduce to expr) RPAREN (reduce to function) (reduce to url_match_fn) (reduce to url_match_fns) LBRACE (reduce to start_document_query) RBRACE (reduce to document_query) (reduce to conditional_rule) (reduce to body) (reduce to stylesheet) (reduce to document) 5 shift/reduce conflicts, 3 reduce/reduce conflicts diff --git a/test/regress/mof.out b/test/regress/mof.out index ac89fa50..a3366abc 100644 --- a/test/regress/mof.out +++ b/test/regress/mof.out @@ -31,10 +31,10 @@ The following rule directs me to reduce: mof.y:42:  { result = Hash.new } After shifting QUALIFIER, one path to a successful parse would be: -qualifierName qualifierType scope defaultFlavor_opt ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +IDENTIFIER (reduce to qualifierName) ":" DT_UINT8 (reduce to dataType) (reduce to array_opt) (reduce to defaultValue_opt) (reduce to qualifierType) "," SCOPE "(" SCHEMA (reduce to metaElement) (reduce to metaElements) ")" (reduce to scope) (reduce to defaultFlavor_opt) ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) After reducing to mofSpecification, one path to a successful parse would be: -QUALIFIER qualifierName qualifierType scope defaultFlavor_opt ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +QUALIFIER IDENTIFIER (reduce to qualifierName) ":" DT_UINT8 (reduce to dataType) (reduce to array_opt) (reduce to defaultValue_opt) (reduce to qualifierType) "," SCOPE "(" SCHEMA (reduce to metaElement) (reduce to metaElements) ")" (reduce to scope) (reduce to defaultFlavor_opt) ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) Warning: Shift/reduce conflict on "#", at the beginning of the parse. @@ -60,10 +60,10 @@ The following rule directs me to reduce: mof.y:42:  { result = Hash.new } After shifting "#", one path to a successful parse would be: -PRAGMA INCLUDE pragmaParameters_opt (reduce to compilerDirective) (reduce to mofProduction) (reduce to mofSpecification) +INCLUDE (reduce to pragmaParameters_opt) (reduce to compilerDirective) (reduce to mofProduction) (reduce to mofSpecification) After reducing to mofSpecification, one path to a successful parse would be: -"#" PRAGMA INCLUDE pragmaParameters_opt (reduce to compilerDirective) (reduce to mofProduction) (reduce to mofSpecification) +"#" INCLUDE (reduce to pragmaParameters_opt) (reduce to compilerDirective) (reduce to mofProduction) (reduce to mofSpecification) Warning: Shift/reduce conflict on "[", at the beginning of the parse. @@ -78,10 +78,10 @@ The following rule directs me to reduce: mof.y:42:  { result = Hash.new } After shifting "[", one path to a successful parse would be: -qualifier qualifiers "]" (reduce to qualifierList) (reduce to qualifierList_opt) CLASS className alias_opt superClass_opt "{" classFeatures "}" ";" (reduce to classDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +IDENTIFIER (reduce to qualifierName) (reduce to qualifierParameter_opt) (reduce to flavor_opt) (reduce to qualifier) (reduce to qualifiers) "]" (reduce to qualifierList) (reduce to qualifierList_opt) CLASS IDENTIFIER (reduce to className) (reduce to alias_opt) (reduce to superClass_opt) "{" (reduce to classFeatures) "}" ";" (reduce to classDeclaration) (reduce to mofProduction) (reduce to mofSpecification) After reducing to mofSpecification, one path to a successful parse would be: -"[" qualifier qualifiers "]" (reduce to qualifierList) (reduce to qualifierList_opt) CLASS className alias_opt superClass_opt "{" classFeatures "}" ";" (reduce to classDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +"[" IDENTIFIER (reduce to qualifierName) (reduce to qualifierParameter_opt) (reduce to flavor_opt) (reduce to qualifier) (reduce to qualifiers) "]" (reduce to qualifierList) (reduce to qualifierList_opt) CLASS IDENTIFIER (reduce to className) (reduce to alias_opt) (reduce to superClass_opt) "{" (reduce to classFeatures) "}" ";" (reduce to classDeclaration) (reduce to mofProduction) (reduce to mofSpecification) Warning: Reduce/reduce conflict on CLASS, at the beginning of the parse. @@ -93,10 +93,10 @@ It is possible to reduce by either of these rules: : /* empty */ After reducing to mofSpecification, one path to a successful parse would be: -CLASS className alias_opt superClass_opt "{" classFeatures "}" ";" (reduce to classDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +CLASS IDENTIFIER (reduce to className) (reduce to alias_opt) (reduce to superClass_opt) "{" (reduce to classFeatures) "}" ";" (reduce to classDeclaration) (reduce to mofProduction) (reduce to mofSpecification) After reducing to qualifierList_opt, one path to a successful parse would be: -CLASS className alias_opt superClass_opt "{" classFeatures "}" ";" (reduce to classDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +CLASS IDENTIFIER (reduce to className) (reduce to alias_opt) (reduce to superClass_opt) "{" (reduce to classFeatures) "}" ";" (reduce to classDeclaration) (reduce to mofProduction) (reduce to mofSpecification) Warning: Reduce/reduce conflict on INSTANCE, at the beginning of the parse. @@ -108,10 +108,10 @@ It is possible to reduce by either of these rules: : /* empty */ After reducing to mofSpecification, one path to a successful parse would be: -INSTANCE OF className alias_opt "{" valueInitializers "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +INSTANCE OF IDENTIFIER (reduce to className) (reduce to alias_opt) "{" (reduce to qualifierList_opt) IDENTIFIER (reduce to propertyName) (reduce to keyname) ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) After reducing to qualifierList_opt, one path to a successful parse would be: -INSTANCE OF className alias_opt "{" valueInitializers "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +INSTANCE OF IDENTIFIER (reduce to className) (reduce to alias_opt) "{" (reduce to qualifierList_opt) IDENTIFIER (reduce to propertyName) (reduce to keyname) ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) Warning: Shift/reduce conflict on IDENTIFIER, after the following input: QUALIFIER qualifierName ":" dataType array_opt "=" @@ -124,10 +124,10 @@ The following rule directs me to reduce: : /* empty */ After shifting IDENTIFIER, one path to a successful parse would be: -(reduce to namespaceHandle) ":" (reduce to namespace_opt) modelPath (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) scope defaultFlavor_opt ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +(reduce to namespaceHandle) ":" (reduce to namespace_opt) IDENTIFIER (reduce to className) "." IDENTIFIER (reduce to propertyName) (reduce to keyname) "=" binaryValue (reduce to integerValue) (reduce to constantValue) (reduce to initializer) (reduce to keyValuePair) (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) "," SCOPE "(" SCHEMA (reduce to metaElement) (reduce to metaElements) ")" (reduce to scope) (reduce to defaultFlavor_opt) ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) After reducing to namespace_opt, one path to a successful parse would be: -IDENTIFIER (reduce to className) "." keyValuePairList (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) scope defaultFlavor_opt ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +IDENTIFIER (reduce to className) "." IDENTIFIER (reduce to propertyName) (reduce to keyname) "=" binaryValue (reduce to integerValue) (reduce to constantValue) (reduce to initializer) (reduce to keyValuePair) (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) "," SCOPE "(" SCHEMA (reduce to metaElement) (reduce to metaElements) ")" (reduce to scope) (reduce to defaultFlavor_opt) ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) Warning: Reduce/reduce conflict on ";", after the following input: qualifierList_opt INSTANCE OF className alias_opt "{" qualifierList_opt IDENTIFIER @@ -154,10 +154,10 @@ It is possible to reduce by either of these rules: : IDENTIFIER After reducing to propertyName, one path to a successful parse would be: -"=" initializer ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +"=" binaryValue (reduce to integerValue) (reduce to constantValue) (reduce to initializer) ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) After reducing to referenceName, one path to a successful parse would be: -"=" initializer ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +"=" binaryValue (reduce to integerValue) (reduce to constantValue) (reduce to initializer) ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) Warning: Shift/reduce conflict on IDENTIFIER, after the following input: qualifierList_opt INSTANCE OF className alias_opt "{" qualifierList_opt keyname "=" @@ -170,10 +170,10 @@ The following rule directs me to reduce: : /* empty */ After shifting IDENTIFIER, one path to a successful parse would be: -(reduce to namespaceHandle) ":" (reduce to namespace_opt) modelPath (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +(reduce to namespaceHandle) ":" (reduce to namespace_opt) IDENTIFIER (reduce to className) "." IDENTIFIER (reduce to propertyName) (reduce to keyname) "=" binaryValue (reduce to integerValue) (reduce to constantValue) (reduce to initializer) (reduce to keyValuePair) (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) After reducing to namespace_opt, one path to a successful parse would be: -IDENTIFIER (reduce to className) "." keyValuePairList (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +IDENTIFIER (reduce to className) "." IDENTIFIER (reduce to propertyName) (reduce to keyname) "=" binaryValue (reduce to integerValue) (reduce to constantValue) (reduce to initializer) (reduce to keyValuePair) (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) ";" (reduce to valueInitializer) (reduce to valueInitializers) "}" (reduce to instance) ";" (reduce to instanceDeclaration) (reduce to mofProduction) (reduce to mofSpecification) Warning: Shift/reduce conflict on ",", after the following input: QUALIFIER qualifierName ":" dataType array_opt "=" namespace_opt className "." keyValuePair keyValuePairs @@ -187,10 +187,10 @@ The following rule directs me to reduce: : keyValuePair keyValuePairs After shifting ",", one path to a successful parse would be: -keyValuePair (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) scope defaultFlavor_opt ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +IDENTIFIER (reduce to propertyName) (reduce to keyname) "=" binaryValue (reduce to integerValue) (reduce to constantValue) (reduce to initializer) (reduce to keyValuePair) (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) "," SCOPE "(" SCHEMA (reduce to metaElement) (reduce to metaElements) ")" (reduce to scope) (reduce to defaultFlavor_opt) ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) After reducing to keyValuePairList, one path to a successful parse would be: -"," SCOPE "(" metaElements ")" (reduce to scope) scope defaultFlavor_opt ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +"," SCOPE "(" SCHEMA (reduce to metaElement) (reduce to metaElements) ")" (reduce to scope) (reduce to defaultFlavor_opt) ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) Warning: Shift/reduce conflict on IDENTIFIER, after the following input: QUALIFIER qualifierName ":" dataType array_opt "=" namespace_opt className "." keyname "=" @@ -203,9 +203,9 @@ The following rule directs me to reduce: : /* empty */ After shifting IDENTIFIER, one path to a successful parse would be: -(reduce to namespaceHandle) ":" (reduce to namespace_opt) modelPath (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to keyValuePair) keyValuePairs (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) scope defaultFlavor_opt ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +(reduce to namespaceHandle) ":" (reduce to namespace_opt) IDENTIFIER (reduce to className) "." IDENTIFIER (reduce to propertyName) (reduce to keyname) "=" binaryValue (reduce to integerValue) (reduce to constantValue) (reduce to initializer) (reduce to keyValuePair) (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to keyValuePair) (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) "," SCOPE "(" SCHEMA (reduce to metaElement) (reduce to metaElements) ")" (reduce to scope) (reduce to defaultFlavor_opt) ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) After reducing to namespace_opt, one path to a successful parse would be: -IDENTIFIER (reduce to className) "." keyValuePairList (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to keyValuePair) keyValuePairs (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) scope defaultFlavor_opt ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) +IDENTIFIER (reduce to className) "." IDENTIFIER (reduce to propertyName) (reduce to keyname) "=" binaryValue (reduce to integerValue) (reduce to constantValue) (reduce to initializer) (reduce to keyValuePair) (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to keyValuePair) (reduce to keyValuePairs) (reduce to keyValuePairList) (reduce to modelPath) (reduce to objectHandle) (reduce to referenceInitializer) (reduce to initializer) (reduce to defaultValue) (reduce to defaultValue_opt) (reduce to qualifierType) "," SCOPE "(" SCHEMA (reduce to metaElement) (reduce to metaElements) ")" (reduce to scope) (reduce to defaultFlavor_opt) ";" (reduce to qualifierDeclaration) (reduce to mofProduction) (reduce to mofSpecification) 4 useless terminals, 1 useless rule, 7 shift/reduce conflicts, 4 reduce/reduce conflicts diff --git a/test/test_simulated_parse.rb b/test/test_simulated_parse.rb deleted file mode 100644 index f26728ba..00000000 --- a/test/test_simulated_parse.rb +++ /dev/null @@ -1,212 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), 'helper')) -require 'racc/simulated_parse_context' -require 'racc/dsl' - -TestGrammar = Racc::DSL.define_grammar do - g = self - - g.A = seq(:a, :B) | seq(:a, :C) | seq(:B, :C) - g.B = seq(:a, :b) | seq(:b, :b, :b) - g.C = seq(:c, :B) | seq(:c, :A) -end - -LRecursiveGrammar = Racc::DSL.define_grammar do - g = self - - g.A = seq(:a) | seq(:B, :a) | seq() - g.B = seq(:b) | seq(:A, :b) | seq(:C, :b) - g.C = seq(:c) | seq(:C, :c) -end - -module Racc - class TestSimulatedParseOnTestGrammar < TestCase - def setup - @context = Racc::SimulatedParseContext.new(TestGrammar) - end - - def intern(sym) - TestGrammar.intern(sym) - end - - def test_initial_state - active_ptrs = @context.reachable.map(&:ptr).sort_by(&:ident) - assert_equal 1, active_ptrs.size - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - END - end - - def test_shift_b - @context.shift!(intern(:b)) - @context.shift!(intern(:b)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : . B C - B : b b . b - END - end - - def test_shift_a - @context.shift!(intern(:a)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : a . B - A : a . C - A : . B C - B : a . b - END - end - - def test_reduce_B - @context.shift!(intern(:a)) - @context.shift!(intern(:b)) - @context.reduce!(intern(:B)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : B . C - END - end - - def test_reduce_B_without_shifting_first - assert_raises do - @context.reduce!(intern(:B)) - end - end - - def test_lookahead_c - @context.shift!(intern(:a)) - @context.lookahead!(intern(:c)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : a . C - END - end - - def test_lookahead_after_reduce - @context.shift!(intern(:a)) - @context.shift!(intern(:b)) - @context.lookahead!(intern(:b)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : a . B - B : b . b b - END - end - - def test_path_to_success_from_start - assert_equal [intern(:A)], @context.path_to_success - end - - def test_path_to_success_after_a - @context.shift!(intern(:a)) - assert_equal [intern(:B), '(reduce to A)'], @context.path_to_success - end - - def test_path_to_success_after_b - @context.shift!(intern(:b)) - assert_equal [intern(:b), intern(:b), '(reduce to B)', - intern(:C), '(reduce to A)'], - @context.path_to_success - end - end - - class TestSimulatedParseOnLRecursiveGrammar < TestCase - def setup - @context = Racc::SimulatedParseContext.new(LRecursiveGrammar) - end - - def intern(sym) - LRecursiveGrammar.intern(sym) - end - - def test_initial_state - active_ptrs = @context.reachable.map(&:ptr).sort_by(&:ident) - assert_equal 1, active_ptrs.size - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - END - end - - def test_shift_a - @context.shift!(intern(:a)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : a . - A : . B a - B : . A b - A : a . - END - end - - def test_shift_b - @context.shift!(intern(:b)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : . B a - B : b . - B : A b . - END - end - - def test_shift_c - @context.shift!(intern(:c)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : . B a - B : . C b - C : c . - C : . C c - C : c . - END - end - - def test_shift_a_consume_A - @context.shift!(intern(:a)) - @context.consume!(intern(:A)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : . B a - B : . A b - A : . B a - B : A . b - B : A . b - END - end - - def test_consume_C - @context.consume!(intern(:C)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : . B a - B : . C b - C : . C c - C : C . c - C : C . c - B : C . b - END - end - - def test_reduce_A - @context.reduce!(intern(:A)) - assert_equal <<-END.chomp, @context.inspect -parse context: -$start : . A $end $end - A : . B a - B : A . b -$start : A . $end $end - END - end - end -end \ No newline at end of file From 52f152c0423275f645b3ee19b238c9f0718b6ccd Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 16:06:19 +0200 Subject: [PATCH 528/619] Add LocationPointer#target (for brevity) --- lib/racc/grammar.rb | 10 +++++++--- lib/racc/simulated_automaton.rb | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 014891e4..3b90d780 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -251,7 +251,7 @@ def shortest_productions worklist = result.keys while sym = worklist.shift sym.locate.each do |ptr| - target = ptr.rule.target + target = ptr.target rules = target.heads.map(&:rule) rules.reject! { |r| r.symbols.any? { |rs| !result.key?(rs) }} next if rules.empty? @@ -557,6 +557,10 @@ def symbol @rule.symbols[@index] end + def target + @rule.target + end + def to_s result = "#{@rule.target} : " if @index > 0 @@ -718,8 +722,8 @@ def shortest_production # a rule where the symbol appears, to the target of the rule, then to the # RHS of its rules, and so on? def reachable - @reachable ||= Racc.set_closure(@locate.map { |ptr| ptr.rule.target }) do |sym| - sym.locate.map { |ptr| ptr.rule.target } + @reachable ||= Racc.set_closure(@locate.map(&:target)) do |sym| + sym.locate.map(&:target) end end diff --git a/lib/racc/simulated_automaton.rb b/lib/racc/simulated_automaton.rb index 47e2bafe..fec69330 100644 --- a/lib/racc/simulated_automaton.rb +++ b/lib/racc/simulated_automaton.rb @@ -99,7 +99,7 @@ def path_to_success(traversed = Set.new) # The state stack will guide us # How many symbols could we reduce the stack size by for each reduce # reachable from this state? - core = @state.core.group_by { |ptr| [ptr.rule.target, ptr.index] } + core = @state.core.group_by { |ptr| [ptr.target, ptr.index] } core.map do |(target, offset), ptrs| ptr = ptrs.min_by do |p| @@ -140,7 +140,7 @@ def follow_rule(ptr) end reduce_by!(ptr.rule) - actions << ReduceStep.new(initial_state, @state, ptr.rule, ptr.rule.target) + actions << ReduceStep.new(initial_state, @state, ptr.rule, ptr.target) end def dup From ead125632550859d6945fd775435b8c02744cdf9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 16:09:06 +0200 Subject: [PATCH 529/619] Add LocationPointer#preceding and #following (for brevity) --- lib/racc/grammar.rb | 12 ++++++++++-- lib/racc/simulated_automaton.rb | 5 ++--- lib/racc/state_summary_generator.rb | 16 ++++++---------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 3b90d780..f0a12265 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -561,15 +561,23 @@ def target @rule.target end + def preceding + @rule.symbols[0...@index] + end + + def following + @rule.symbols[@index..-1] + end + def to_s result = "#{@rule.target} : " if @index > 0 - result << "#{@rule.symbols[0...@index].reject(&:hidden?).map(&:to_s).join(' ')} ." + result << "#{preceding.reject(&:hidden?).map(&:to_s).join(' ')} ." else result << '.' end unless reduce? - result << " #{rule.symbols[@index..-1].reject(&:hidden?).map(&:to_s).join(' ')}" + result << " #{following.reject(&:hidden?).map(&:to_s).join(' ')}" end if sym = @rule.explicit_precedence result << ' ' << Color.explicit_prec('=' << sym.display_name) diff --git a/lib/racc/simulated_automaton.rb b/lib/racc/simulated_automaton.rb index fec69330..79ac397a 100644 --- a/lib/racc/simulated_automaton.rb +++ b/lib/racc/simulated_automaton.rb @@ -105,8 +105,7 @@ def path_to_success(traversed = Set.new) ptr = ptrs.min_by do |p| # how many terminals will it take to reach reduce, if we try to # follow this rule? - remaining_syms = p.rule.symbols[p.index..-1] - remaining_syms.flat_map(&:shortest_production).size + p.following.flat_map(&:shortest_production).size end automaton = self.dup @@ -130,7 +129,7 @@ def follow_rule(ptr) actions = [] initial_state = @state - ptr.rule.symbols[ptr.index..-1].each do |sym| + ptr.following.each do |sym| if sym.terminal? actions << sym consume!(sym) diff --git a/lib/racc/state_summary_generator.rb b/lib/racc/state_summary_generator.rb index f4e18c20..cc05d3bb 100644 --- a/lib/racc/state_summary_generator.rb +++ b/lib/racc/state_summary_generator.rb @@ -39,18 +39,14 @@ def print_loc_ptr_as_tr(ptr) @output << '' print_symbol(rule.target) @output << ':' - if ptr.index > 0 - rule.symbols[0...ptr.index].reject(&:hidden?).each do |sym| - print_symbol(sym) - @output << ' ' - end + ptr.preceding.reject(&:hidden?).each do |sym| + print_symbol(sym) + @output << ' ' end @output << '. ' - unless ptr.reduce? - rule.symbols[ptr.index..-1].reject(&:hidden?).each do |sym| - print_symbol(sym) - @output << ' ' - end + ptr.following.reject(&:hidden?).each do |sym| + print_symbol(sym) + @output << ' ' end if sym = rule.explicit_precedence print_explicit_prec(sym) From 7cb7d74915cfdf835a439ce7be2abd02c093262e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 16:14:40 +0200 Subject: [PATCH 530/619] Use #shortest_production in States#actions_to_reach_reduce --- lib/racc/state.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 5a3b38a7..126d31a8 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -444,7 +444,7 @@ def detailed_transition_graph # `state_idx`? def actions_to_reach_reduce(state_idx, target) rule = target.heads.map(&:rule).min_by do |r| - r.symbols.flat_map { |rs| @grammar.shortest_productions[rs] }.size + r.symbols.flat_map(&:shortest_production).size end actions, cur_state = [], state_idx From 4f8c84f0002191a4d695329e32890f1c6791e79e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 17:28:51 +0200 Subject: [PATCH 531/619] Freeze State#core (to avoid bugs) --- lib/racc/state.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 126d31a8..a1c840ec 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -501,6 +501,8 @@ def initialize(ident, core, states) @rr_conflicts = {} @sr_conflicts = {} @states = states + + @core.freeze end attr_reader :ident From fcb4914fdb8173f92661d82471481c23fa25eec9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 21:58:19 +0200 Subject: [PATCH 532/619] Tweak code formatting in Grammar#n_expected_srconflicts --- lib/racc/grammar.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index f0a12265..6e0f0cff 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -103,9 +103,7 @@ def locations end def n_expected_srconflicts=(value) - if @n_expected_srconflicts - raise CompileError, "'expect' seen twice" - end + raise CompileError, "'expect' seen twice" if @n_expected_srconflicts @n_expected_srconflicts = value end From 0a33253cf34d42b2f71c4dbaaa1856b2fca834b6 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 21:58:28 +0200 Subject: [PATCH 533/619] More accurate comment on Grammar#useless_symbols --- lib/racc/grammar.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 6e0f0cff..7d21e4a0 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -201,9 +201,8 @@ def finished! check_rules end - # A 'useless' Sym is one which can never be part of a valid parse - # tree, because there is no sequence of rules by which it - # could eventually reduce down to the 'start' node + # A useless symbol can never be a part of any valid parse tree, and is not + # used for a = precedence declaration either def useless_symbols raise 'Grammar not yet closed' unless @closed @useless_symbols ||= begin From e9a84ad26ca4a0b8ae3a9222e7a86a9fffe77226 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Mon, 7 Dec 2015 21:59:05 +0200 Subject: [PATCH 534/619] Tweak argument names in State#sr_conflict! --- lib/racc/state.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/racc/state.rb b/lib/racc/state.rb index a1c840ec..d263bb5d 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -576,8 +576,8 @@ def rr_conflict!(sym, rules) @rr_conflicts[sym] = RRConflict.new(self, sym, rules) end - def sr_conflict!(token, srule, rrule) - @sr_conflicts[token] = SRConflict.new(self, token, srule, rrule) + def sr_conflict!(token, srules, rrule) + @sr_conflicts[token] = SRConflict.new(self, token, srules, rrule) end def shortest_summarized_path From 3800d066aa95f0f60ec8c28aa1e7da983e484d1e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 8 Dec 2015 16:45:58 +0200 Subject: [PATCH 535/619] Freeze various computed Sets (to avoid bugs) --- lib/racc/grammar.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 7d21e4a0..e3caf388 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -211,7 +211,7 @@ def useless_symbols sym != @start && (!sym.reachable.include?(@start) || !productive_symbols.include?(sym)) && none? { |rule| rule.explicit_precedence == sym } - end + end.freeze end end @@ -225,7 +225,7 @@ def useless_symbols def productive_symbols raise 'Grammar not yet closed' unless @closed @productive_symbols ||= begin - Sym.set_closure(@terminals + nullable_symbols.to_a) + Sym.set_closure(@terminals + nullable_symbols.to_a).freeze end end @@ -233,12 +233,13 @@ def productive_symbols # (Can it be produced out of "nothing"?) def nullable_symbols raise 'Grammar not yet closed' unless @closed - @nullable_symbols ||= - Sym.set_closure(@symbols.select { |nt| nt.heads.any?(&:reduce?) }) + @nullable_symbols ||= Sym.set_closure( + @symbols.select { |nt| nt.heads.any?(&:reduce?) }).freeze end # What is the shortest series of terminals which can reduce to each NT? def shortest_productions + raise 'Grammar not yet closed' unless @closed @shortest_productions ||= begin # nullable symbols can expand to... nothing # terminals just map to themselves @@ -259,7 +260,7 @@ def shortest_productions end end end - result + result.freeze end end @@ -729,7 +730,7 @@ def shortest_production def reachable @reachable ||= Racc.set_closure(@locate.map(&:target)) do |sym| sym.locate.map(&:target) - end + end.freeze end # If an instance of this NT comes next, then what rules could we be @@ -739,7 +740,7 @@ def expand if (sym = ptr.symbol) && sym.nonterminal? sym.heads end - end + end.freeze end # What terminals/NT could appear first in a series of terminals/NTs which @@ -752,7 +753,7 @@ def first_set ptr.symbol.nullable? ? ptr = ptr.next : break end end - end + end.freeze end end end From fb5e7e159efd7e82e85b968d3fbfcff35c88b1f5 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Tue, 8 Dec 2015 16:49:06 +0200 Subject: [PATCH 536/619] Compiler catches duplicate rules with different embedded actions --- Manifest.txt | 2 ++ lib/racc/grammar.rb | 2 +- test/assets/badrule4.y | 5 +++++ test/regress/badrule4.out | 3 +++ test/test_racc_command.rb | 5 +++++ 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/assets/badrule4.y create mode 100644 test/regress/badrule4.out diff --git a/Manifest.txt b/Manifest.txt index 95ea7bb3..e4c6318e 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -54,6 +54,7 @@ test/assets/badprec2.y test/assets/badrule1.y test/assets/badrule2.y test/assets/badrule3.y +test/assets/badrule4.y test/assets/badsyntax.y test/assets/bench.y test/assets/bibtex.y @@ -123,6 +124,7 @@ test/regress/badprec2.out test/regress/badrule1.out test/regress/badrule2.out test/regress/badrule3.out +test/regress/badrule4.out test/regress/badsyntax.out test/regress/bibtex.rb test/regress/cadenza.rb diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index e3caf388..2bab1453 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -342,7 +342,7 @@ def check_terminals def check_rules @rules.group_by(&:target).each_value do |same_lhs| - same_lhs.group_by(&:symbols).each_value do |same_rhs| + same_lhs.group_by { |r| r.symbols.reject(&:hidden?) }.each_value do |same_rhs| next unless same_rhs.size > 1 raise CompileError, "The following rules are duplicates:\n" << Source::SparseLines.render(same_rhs.map(&:source)) diff --git a/test/assets/badrule4.y b/test/assets/badrule4.y new file mode 100644 index 00000000..41593ef0 --- /dev/null +++ b/test/assets/badrule4.y @@ -0,0 +1,5 @@ +class A +rule + A : a { puts 'hello' } b c + | a b { puts 'hello' } c +end diff --git a/test/regress/badrule4.out b/test/regress/badrule4.out new file mode 100644 index 00000000..88583731 --- /dev/null +++ b/test/regress/badrule4.out @@ -0,0 +1,3 @@ +Error: test/assets/badrule4.y: The following rules are duplicates: +badrule4.y:3: A : a { puts 'hello' } b c + | a b { puts 'hello' } c diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index ccca876e..07e0a1e7 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -106,6 +106,11 @@ def test_badrule3_y assert_output_unchanged 'badrule3.out', '--color', err end + def test_badrule4_y + err = assert_error 'badrule4.y', '--color' + assert_output_unchanged 'badrule4.out', '--color', err + end + def test_not_lalr # grammars which are LR(1), but not LALR(1) err = assert_compile 'lr_not_lalr.y', '--color -v' From 5fa0961ad75e88e632c4d27f78cb3a2f7f96c9d7 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 16 Dec 2015 21:03:07 +0200 Subject: [PATCH 537/619] Remove reference to (deleted) change log --- Rakefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Rakefile b/Rakefile index ee0ffda1..886bd7b6 100644 --- a/Rakefile +++ b/Rakefile @@ -21,7 +21,6 @@ HOE = Hoe.spec 'racc' do license "MIT" self.extra_rdoc_files = Dir['*.rdoc'] - self.history_file = 'ChangeLog' self.readme_file = 'README.rdoc' dependency 'rake', '~> 10.4', :developer From 8f4b8fa38acbcfc2a10d1587c7b3d3bd92bb1004 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 16 Dec 2015 21:03:18 +0200 Subject: [PATCH 538/619] Tweak some comments --- lib/racc/grammar.rb | 2 +- lib/racc/simulated_automaton.rb | 2 +- test/test_racc_command.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 2bab1453..b50da7e6 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -359,7 +359,7 @@ def check_rules class Rule def initialize(target, syms, act, source = nil, precedence = nil) @target = target # LHS of rule (may be `nil` if not yet known) - @symbols = syms # RHS of rule + @symbols = syms # RHS of rule @action = act # run this code when reducing @alternatives = [] @source = source diff --git a/lib/racc/simulated_automaton.rb b/lib/racc/simulated_automaton.rb index 79ac397a..a0e09e89 100644 --- a/lib/racc/simulated_automaton.rb +++ b/lib/racc/simulated_automaton.rb @@ -17,7 +17,7 @@ def self.from_path(grammar, path) def initialize(states) @states = states @state = states.first - @sstack = [] + @sstack = [] # state stack @error = false end diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 07e0a1e7..84d34330 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -150,7 +150,7 @@ def test_intp_y def test_expect_y err = assert_compile 'expect.y' - # expect has 1 S/R conflict, but it is expected + # expect.y has 1 S/R conflict, but it is expected assert_no_warnings err end From e217511465f893b1ca8a7c0ed80a0f8b3e66ff00 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 16 Dec 2015 21:19:40 +0200 Subject: [PATCH 539/619] Revise TODO --- TODO | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 8e68e6e4..9351dc2e 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,42 @@ -* check 'error' token handling. -* interactive transition table monitor. -* support backtracking. -* output Ruby extention library? -* LL(k)? (But it should not be called Racc) +DIAGNOSTICS: + +- On conflict, try to find a series of tokens which can be parsed BOTH by + an automaton which resolves the conflict in one way, and by an automaton + which resolves the conflict in the other way. + + This problem is not solvable in the general case. Just do a recursive search, + limiting the search space enough to terminate quickly. + + First though, we need to abstract the classes which represent LR states and + automatons a bit more, making them amenable to use for general-purpose + analysis and manipulation, not just solely doing what Racc needs to generate + a parser. + +- If we can do that, show alternative derivation trees for the same tokens. + +- Any other compiler checks or warnings which we should add? + +PARSER CORE: + +- Generate LR(1) rather than LALR(1) parsers. + +- Add a directive to manually resolve one specific conflict. + This will also be used internally for the next point: + +- Add *, ?, +, as well as parentheses for grouping, to the understood grammar + file format. + +RUNTIME: + +- Generate more efficient parsers! + +OTHER: + +- Documentation + +- Full code review and cleanup + +- Make the code RuboCop-compliant +- Then add RC to the build process + +- Any further tests which can be added to verify correctness? From 6389b614300f806b5e411fdbf1a49bafcd6cfa9b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 16 Dec 2015 21:34:13 +0200 Subject: [PATCH 540/619] Add a couple blank lines to make usage more readable --- bin/racc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/racc b/bin/racc index eb1570c1..396ddfa7 100755 --- a/bin/racc +++ b/bin/racc @@ -59,6 +59,7 @@ def main puts parser.help exit 1 } + parser.separator '' parser.separator 'Console output:' parser.on('-v', '--verbose', 'Display extra diagnostic information') { verbose = true @@ -66,6 +67,7 @@ def main parser.on('--[no-]color', 'Force colored output on or off') { |fl| Racc::Color.enabled = fl } + parser.separator '' parser.separator 'Ruby parser code output:' parser.on('-t', '--debug', 'Output debugging parser') { debug_parser = true From fd39ad07f620d9240390738d24906cf21e41c703 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 16 Dec 2015 21:34:18 +0200 Subject: [PATCH 541/619] Add item to TODO --- TODO | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TODO b/TODO index 9351dc2e..ca25bfad 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,7 @@ +TO CHECK: + +- Try grammars which contain non-ASCII chars. + DIAGNOSTICS: - On conflict, try to find a series of tokens which can be parsed BOTH by From c12c9444b315b01330808dc1ac7c56472d4d4008 Mon Sep 17 00:00:00 2001 From: "Keiji, Yoshimi" Date: Sat, 16 Jan 2016 16:43:01 +0900 Subject: [PATCH 542/619] remove unused variable warnings. lib/racc/simulated_automaton.rb:104: warning: assigned but unused variable - target lib/racc/simulated_automaton.rb:104: warning: assigned but unused variable - offset --- lib/racc/simulated_automaton.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/racc/simulated_automaton.rb b/lib/racc/simulated_automaton.rb index a0e09e89..2c29ab92 100644 --- a/lib/racc/simulated_automaton.rb +++ b/lib/racc/simulated_automaton.rb @@ -101,7 +101,7 @@ def path_to_success(traversed = Set.new) # reachable from this state? core = @state.core.group_by { |ptr| [ptr.target, ptr.index] } - core.map do |(target, offset), ptrs| + core.map do |_, ptrs| ptr = ptrs.min_by do |p| # how many terminals will it take to reach reduce, if we try to # follow this rule? @@ -148,4 +148,4 @@ def dup result end end -end \ No newline at end of file +end From d7d10d7df420d10e0d4cdf91da8f27ef21f9d15c Mon Sep 17 00:00:00 2001 From: "Keiji, Yoshimi" Date: Sat, 16 Jan 2016 16:45:47 +0900 Subject: [PATCH 543/619] update travis test ruby version. --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 495005bf..6852714b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,9 @@ language: ruby rvm: - 1.9.3 - 2.0.0 - - 2.1 - - 2.2 + - 2.1.8 + - 2.2.4 + - 2.3.0 - ruby-head matrix: allow_failures: From 0c498232641dd73741f1c0b62c143b4b00630393 Mon Sep 17 00:00:00 2001 From: windwiny Date: Thu, 18 Feb 2016 09:41:07 +0800 Subject: [PATCH 544/619] missing some file --- Manifest.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Manifest.txt b/Manifest.txt index e4c6318e..22efd05e 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -12,6 +12,7 @@ ext/racc/depend ext/racc/extconf.rb ext/racc/com/headius/racc/Cparse.java lib/racc.rb +lib/racc/color.rb lib/racc/directed_graph.rb lib/racc/dsl.rb lib/racc/exception.rb @@ -119,6 +120,8 @@ test/assets/unterm.y test/assets/useless.y test/assets/yyerr.y test/helper.rb +test/regress.rb +test/regress/README.txt test/regress/badprec1.out test/regress/badprec2.out test/regress/badrule1.out From bb362e2edd89d0295ee4e949795d506026d08cca Mon Sep 17 00:00:00 2001 From: windwiny Date: Mon, 22 Feb 2016 12:45:45 +0800 Subject: [PATCH 545/619] fix empty user code error --- lib/racc/grammar_file_parser.rb | 1 + test/assets/empty_user_code.y | 9 +++++++++ test/test_racc_command.rb | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 test/assets/empty_user_code.y diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index 9cb30110..5b50ad57 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -253,6 +253,7 @@ def embedded_action(act, target) def parse_user_code epilogue = @scanner.epilogue + return unless epilogue.text epilogue.text.scan(/^----([^\n\r]*)(?:\n|\r\n|\r)(.*?)(?=^----|\Z)/m) do label = canonical_label($~[1]) range = epilogue.slice($~.begin(2), $~.end(2)) diff --git a/test/assets/empty_user_code.y b/test/assets/empty_user_code.y new file mode 100644 index 00000000..983c5388 --- /dev/null +++ b/test/assets/empty_user_code.y @@ -0,0 +1,9 @@ +class Test1 +rule +main : A; +end + +# empty line at last + + + diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 84d34330..fee03873 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -2,6 +2,11 @@ module Racc class TestRaccCommand < TestCase + def test_empty_user_code_y + err = assert_compile 'empty_user_code.y' + assert_no_warnings err + end + def test_syntax_y err = assert_compile 'syntax.y', '-v' assert_no_warnings err From 6c6b058d1021b7ea9139c2b50dd18a87889270c2 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Wed, 27 Apr 2016 00:21:23 +0900 Subject: [PATCH 546/619] fix a typo (grammer -> grammar) --- lib/racc/parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 3ab3fc70..8cab97f6 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -45,7 +45,7 @@ # [-E, --embedded] # Output parser which doesn't need runtime files (racc/parser.rb). # [-C, --check-only] -# Check syntax of racc grammer file and quit. +# Check syntax of racc grammar file and quit. # [--version] # print Racc version and quit. # [--copyright] From 0a9bf8c977f414cd5f27b4dda880a796c0338244 Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Fri, 29 Apr 2016 20:24:07 +0900 Subject: [PATCH 547/619] Removed unused variables. It's applied at https://github.com/ruby/ruby/commit/448c87008e1bc66a93b8f21eedea060f281874a4 on ruby core. --- lib/racc/parser.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 3ab3fc70..57258e6b 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -340,7 +340,6 @@ def _racc_evalact(act, arg) _, _, _, _, _, _, _, shift_n, reduce_n, * = arg - nerr = 0 # tmp if act > 0 and act < shift_n # @@ -406,7 +405,6 @@ def _racc_evalact(act, arg) case @racc_error_status when 0 unless arg[21] # user_yyerror - nerr += 1 on_error(@racc_t, @racc_val, @racc_vstack) end when 3 From f215191fc872dff9d8324daa83e791d704f41931 Mon Sep 17 00:00:00 2001 From: soukouki Date: Tue, 19 Jul 2016 12:47:18 +0900 Subject: [PATCH 548/619] add encoding magic comment --- sample/calc-ja.y | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sample/calc-ja.y b/sample/calc-ja.y index 57399f43..3d09fa3a 100644 --- a/sample/calc-ja.y +++ b/sample/calc-ja.y @@ -1,3 +1,5 @@ +# encoding: EUC-JP + # A simple calculator, version 2. # This file contains Japanese characters (encoding=EUC-JP). @@ -22,7 +24,7 @@ rule end ---- inner - + def evaluate(str) @tokens = [] until str.empty? @@ -47,8 +49,8 @@ end ---- footer -puts 'Ķ 2 浡' -puts 'Q ǽλޤ' +puts 'Ķ�������� 2 �浡' +puts 'Q �ǽ�λ���ޤ�' calc = Calculator2.new while true print '>>> '; $stdout.flush From 229e0cefd2cfd66fd3b07c613b1c85fe634095a3 Mon Sep 17 00:00:00 2001 From: soukouki Date: Wed, 20 Jul 2016 10:37:32 +0900 Subject: [PATCH 549/619] restore change --- sample/calc-ja.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/calc-ja.y b/sample/calc-ja.y index 3d09fa3a..a1c11e93 100644 --- a/sample/calc-ja.y +++ b/sample/calc-ja.y @@ -49,8 +49,8 @@ end ---- footer -puts 'Ķ�������� 2 �浡' -puts 'Q �ǽ�λ���ޤ�' +puts 'Ķ 2 浡' +puts 'Q ǽλޤ' calc = Calculator2.new while true print '>>> '; $stdout.flush From d2d69ccb741e51c804aaae1ebfba611cb9fea71e Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 30 Nov 2016 18:19:20 +0200 Subject: [PATCH 550/619] Better error message if input file contains no rules Fixes GitHub issue #77. --- Manifest.txt | 2 ++ lib/racc/grammar_file_parser.rb | 4 ++-- test/assets/empty.y | 5 +++++ test/regress/empty.out | 1 + test/test_racc_command.rb | 5 +++++ 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 test/assets/empty.y create mode 100644 test/regress/empty.out diff --git a/Manifest.txt b/Manifest.txt index 22efd05e..2b479a6b 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -68,6 +68,7 @@ test/assets/digraph.y test/assets/duplicate.y test/assets/echk.y test/assets/edtf.y +test/assets/empty.y test/assets/err.y test/assets/error_recovery.y test/assets/expect.y @@ -138,6 +139,7 @@ test/regress/csspool.rb test/regress/duplicate.out test/regress/edtf.out test/regress/edtf.rb +test/regress/empty.out test/regress/eye-of-newt.rb test/regress/journey.rb test/regress/huia.rb diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index 5b50ad57..dc1412bd 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -17,7 +17,7 @@ module Racc grammar = DSL.define_grammar do g = self - g.class = seq(:CLASS, :cname, many(:param), :RULE, :rules, option(:END)) + g.class = seq(:CLASS, :cname, many(:param), option(:rules), option(:END)) g.cname = seq(:rubyconst) { |name| @result.params.classname = name @@ -86,7 +86,7 @@ module Racc g.options = many(:SYMBOL) { |syms| syms.map(&:first).map(&:to_s) } - g.rules = option(:rules_core) { |list| add_rule_block(list) } + g.rules = seq(:RULE, option(:rules_core) { |list| add_rule_block(list) }) # a set of grammar rules with the same LHS, like: # nonterminal: token1 token2 | token3 token4; diff --git a/test/assets/empty.y b/test/assets/empty.y new file mode 100644 index 00000000..16422a9e --- /dev/null +++ b/test/assets/empty.y @@ -0,0 +1,5 @@ +class Empty + +token A B C + +end \ No newline at end of file diff --git a/test/regress/empty.out b/test/regress/empty.out new file mode 100644 index 00000000..a76c7320 --- /dev/null +++ b/test/regress/empty.out @@ -0,0 +1 @@ +Error: test/assets/empty.y: no rules in input diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index fee03873..9cf6a4ea 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -116,6 +116,11 @@ def test_badrule4_y assert_output_unchanged 'badrule4.out', '--color', err end + def test_empty_y + err = assert_error 'empty.y' + assert_output_unchanged 'empty.out', err + end + def test_not_lalr # grammars which are LR(1), but not LALR(1) err = assert_compile 'lr_not_lalr.y', '--color -v' From 5f9e5179e618c219e95c6aad1f461d190e7fa4d8 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 30 Nov 2016 19:23:12 +0200 Subject: [PATCH 551/619] Correct version in C and Java extensions --- ext/racc/com/headius/racc/Cparse.java | 2 +- ext/racc/cparse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/racc/com/headius/racc/Cparse.java b/ext/racc/com/headius/racc/Cparse.java index 1d740656..f8731973 100644 --- a/ext/racc/com/headius/racc/Cparse.java +++ b/ext/racc/com/headius/racc/Cparse.java @@ -30,7 +30,7 @@ import org.jruby.runtime.load.Library; public class Cparse implements Library { - public static final String RACC_VERSION = "1.4.13"; // TODO: parse from Cparse.c + public static final String RACC_VERSION = "2.0.0-dev"; // TODO: parse from Cparse.c public enum TokenType { DEFAULT(-1), diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index 16eb5c3b..bc27234d 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -17,7 +17,7 @@ Important Constants ----------------------------------------------------------------------- */ -#define RACC_VERSION "1.4.13" +#define RACC_VERSION "2.0.0-dev" #define DEFAULT_TOKEN -1 #define ERROR_TOKEN 1 From 6820d181a715857dc9b2b73dc6075dafb9b30a70 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 30 Nov 2016 19:31:58 +0200 Subject: [PATCH 552/619] Automatically set correct RACC_VERSION for C extension --- ext/racc/cparse.c | 2 -- ext/racc/extconf.rb | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index bc27234d..6c9291b8 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -17,8 +17,6 @@ Important Constants ----------------------------------------------------------------------- */ -#define RACC_VERSION "2.0.0-dev" - #define DEFAULT_TOKEN -1 #define ERROR_TOKEN 1 #define FINAL_TOKEN 0 diff --git a/ext/racc/extconf.rb b/ext/racc/extconf.rb index 4ddf47b7..35bf7b17 100644 --- a/ext/racc/extconf.rb +++ b/ext/racc/extconf.rb @@ -1,5 +1,8 @@ require 'mkmf' +load File.join(File.dirname(__FILE__), '..', '..', 'lib', 'racc', 'info.rb') have_func('rb_ary_subseq') +$defs.push("-DRACC_VERSION=\"#{Racc::VERSION}\"") + create_makefile 'racc/cparse' From d3b2ff0665f98a4c1c9265b16596df4c2689e268 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 30 Nov 2016 20:00:28 +0200 Subject: [PATCH 553/619] Eliminate parser-text.rb The whole purpose of this file was just a really roundabout way of getting the text of racc/parser.rb as a string. Guess what... Ruby *does* have an easy way to read a file in as a string. --- .gitignore | 1 - Manifest.txt | 1 - Rakefile | 20 -------------------- lib/racc/parser_file_generator.rb | 4 ++-- 4 files changed, 2 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index b95a4f9f..fdbf6974 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ /pkg Makefile lib/racc/grammar_file_scanner.rb -lib/racc/parser-text.rb tags tmp target diff --git a/Manifest.txt b/Manifest.txt index 2b479a6b..9e329774 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -21,7 +21,6 @@ lib/racc/grammar_file_parser.rb lib/racc/grammar_file_scanner.rb lib/racc/grammar_file_scanner.rl lib/racc/info.rb -lib/racc/parser-text.rb lib/racc/parser.rb lib/racc/parser_file_generator.rb lib/racc/simulated_automaton.rb diff --git a/Rakefile b/Rakefile index 886bd7b6..dc4ace99 100644 --- a/Rakefile +++ b/Rakefile @@ -59,22 +59,6 @@ def gem_build_path File.join 'pkg', HOE.spec.full_name end -file 'lib/racc/parser-text.rb' => ['lib/racc/parser.rb'] do |t| - source = 'lib/racc/parser.rb' - - open(t.name, 'wb') { |io| - io.write(<<-eorb) -# Generated from parser.rb; do not edit -# This file is used for embedding the Racc runtime into a generated parser -module Racc - PARSER_TEXT = <<'__end_of_file__' -#{File.read(source)} -__end_of_file__ -end - eorb - } -end - unless jruby? # MRI require "rake/extensiontask" @@ -82,8 +66,6 @@ unless jruby? ext.lib_dir = File.join 'lib', 'racc' ext.ext_dir = File.join 'ext', 'racc' end - - task :compile => 'lib/racc/parser-text.rb' else # JRUBY require "rake/javaextensiontask" @@ -99,8 +81,6 @@ else ext.name = 'cparse-jruby' end - task :compile => ['lib/racc/parser-text.rb'] - task gem_build_path => [:compile] do add_file_to_gem 'lib/racc/cparse-jruby.jar' end diff --git a/lib/racc/parser_file_generator.rb b/lib/racc/parser_file_generator.rb index d9a794b8..e6f94307 100644 --- a/lib/racc/parser_file_generator.rb +++ b/lib/racc/parser_file_generator.rb @@ -6,7 +6,6 @@ # For details of the GNU LGPL, see the file "COPYING". require 'racc/source' -require 'racc/parser-text' require 'rbconfig' module Racc @@ -123,7 +122,8 @@ def notice end def runtime_source - Source::Buffer.new('racc/parser.rb', ::Racc::PARSER_TEXT) + path = File.join(File.dirname(__FILE__), 'parser.rb') + Source::Buffer.new('racc/parser.rb', File.read(path)) end def embed_library(src) From f50c39871b0dda5cf60883951050189001e8c09c Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 30 Nov 2016 20:08:33 +0200 Subject: [PATCH 554/619] Embed info.rb and exception.rb in generated parser when -E option used racc/parser.rb requires these 2 files. If someone generates a parser with 'embedded runtime', and the parser is run on a machine which doesn't have the racc gem installed, it will fail due to the absence of these files. -E should embed *everything* which is needed for a standalone parser. There is already a test case which uses -E: now, I have made sure that Racc is *not* added to the Ruby load path when running that case. --- lib/racc/parser_file_generator.rb | 10 ++++++---- test/helper.rb | 9 +++++---- test/test_racc_command.rb | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/racc/parser_file_generator.rb b/lib/racc/parser_file_generator.rb index e6f94307..01f12823 100644 --- a/lib/racc/parser_file_generator.rb +++ b/lib/racc/parser_file_generator.rb @@ -93,7 +93,9 @@ def parser_file notice line if @params.embed_runtime? - embed_library(runtime_source) + embed_library(read_source('info.rb')) + embed_library(read_source('exception.rb')) + embed_library(read_source('parser.rb')) else require 'racc/parser.rb' end @@ -121,9 +123,9 @@ def notice line %q[#] end - def runtime_source - path = File.join(File.dirname(__FILE__), 'parser.rb') - Source::Buffer.new('racc/parser.rb', File.read(path)) + def read_source(filename) + path = File.join(File.dirname(__FILE__), filename) + Source::Buffer.new("racc/#{filename}", File.read(path)) end def embed_library(src) diff --git a/test/helper.rb b/test/helper.rb index 51841517..fd9b3c79 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -60,10 +60,10 @@ def assert_no_warnings(dbg_output) assert_warnings(dbg_output, {}) end - def assert_exec(asset) + def assert_exec(asset, embedded_runtime = false) file = File.basename(asset, '.y') Dir.chdir(PROJECT_DIR) do - ruby("#{TAB_DIR}/#{file}") + ruby("#{TAB_DIR}/#{file}", true, !embedded_runtime) end end @@ -112,7 +112,7 @@ def racc(arg, expect_success = true) ruby "#{RACC} #{arg}", expect_success end - def ruby(arg, expect_success = true) + def ruby(arg, expect_success = true, load_racc = true) Dir.chdir(PROJECT_DIR) do Tempfile.open('test') do |io| executable = ENV['_'] || Gem.ruby @@ -120,7 +120,8 @@ def ruby(arg, expect_success = true) executable = executable.dup << ' exec ruby' end - result = system("#{executable} -I #{INC} #{arg} 2>#{io.path}") + arg = "-I #{INC} #{arg}" if load_racc + result = system("#{executable} #{arg} 2>#{io.path}") io.flush err = io.read assert(result, err) if expect_success diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 9cf6a4ea..6689a923 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -47,7 +47,7 @@ def test_chk_y def test_echk_y err = assert_compile 'echk.y', '-E' assert_no_warnings err - assert_exec 'echk.y' + assert_exec 'echk.y', true # embedded runtime end def test_err_y From aff90eff50d4801e20a38c150427b6cf6abe3966 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 30 Nov 2016 20:33:13 +0200 Subject: [PATCH 555/619] Compact troubleshooting commands suggested by failed assertion message --- test/helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index fd9b3c79..ff9e4254 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -76,7 +76,7 @@ def assert_parser_unchanged(asset) assert(result, "Output of test/assets/#{asset} differed from " \ "expectation. Try compiling it and diff with test/regress/#{file}.rb:" \ - "\nruby -I./lib ./bin/racc -o tmp/#{file} test/assets/#{asset}; " \ + "\nruby -Ilib bin/racc -o tmp/#{file} test/assets/#{asset}; " \ "colordiff tmp/#{file} test/regress/#{file}.rb") end @@ -89,7 +89,7 @@ def assert_output_unchanged(file, args, actual = nil) asset = File.basename(file, '.out') + '.y' assert(result, "Console output of test/assets/#{asset} differed from " \ 'expectation. Try compiling it and diff stderr with ' \ - "test/regress/#{file}:\nruby -I./lib ./bin/racc #{args} -o /dev/null " \ + "test/regress/#{file}:\nruby -Ilib bin/racc #{args} -o /dev/null " \ "test/assets/#{asset} 2>tmp/#{file}; colordiff tmp/#{file} " \ "test/regress/#{file}") end @@ -104,7 +104,7 @@ def assert_html_unchanged(asset) assert(result, "HTML state summary for test/assets/#{asset} differed from " \ "expectation. Try compiling it and diff with test/regress/#{file}.html:" \ - "\nruby -I./lib ./bin/racc -S -o tmp/#{file} test/assets/#{asset}; " \ + "\nruby -Ilib bin/racc -S -o tmp/#{file} test/assets/#{asset}; " \ "colordiff tmp/#{file} test/regress/#{file}.html") end From 90fa86d1b798509c0ac7dc796d8ed6c8ded5514b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Wed, 30 Nov 2016 21:29:20 +0200 Subject: [PATCH 556/619] --executable option works now Thanks to Peter Crozier for pointing out that it was broken! --- bin/racc | 4 ++-- test/helper.rb | 15 +++++++++------ test/test_racc_command.rb | 8 ++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/bin/racc b/bin/racc index 396ddfa7..4e2f404a 100755 --- a/bin/racc +++ b/bin/racc @@ -73,8 +73,8 @@ def main debug_parser = true } parser.on('-e', '--executable [RUBYPATH]', 'Output executable parser') { |path| - executable = true - rubypath = (path == 'ruby' ? nil : path) + make_executable = true + rubypath = path || 'ruby' } parser.on('-E', '--embedded', "Embed Racc runtime in output") { embed_runtime = true diff --git a/test/helper.rb b/test/helper.rb index ff9e4254..b449dd05 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -115,13 +115,8 @@ def racc(arg, expect_success = true) def ruby(arg, expect_success = true, load_racc = true) Dir.chdir(PROJECT_DIR) do Tempfile.open('test') do |io| - executable = ENV['_'] || Gem.ruby - if File.basename(executable) == 'bundle' - executable = executable.dup << ' exec ruby' - end - arg = "-I #{INC} #{arg}" if load_racc - result = system("#{executable} #{arg} 2>#{io.path}") + result = system("#{ruby_executable} #{arg} 2>#{io.path}") io.flush err = io.read assert(result, err) if expect_success @@ -130,6 +125,14 @@ def ruby(arg, expect_success = true, load_racc = true) end end + def ruby_executable + executable = ENV['_'] || Gem.ruby + if File.basename(executable) == 'bundle' + executable += ' exec ruby' + end + executable + end + def useless_nts(dbg_output) dbg_output.scan(/Useless nonterminal/).size end diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 6689a923..82bc096f 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -50,6 +50,14 @@ def test_echk_y assert_exec 'echk.y', true # embedded runtime end + def test_executable_parser + err = assert_compile 'echk.y', "-E -e \"#{ruby_executable}\"" + assert_no_warnings err + Dir.chdir(PROJECT_DIR) do + assert(system("#{TAB_DIR}/echk")) + end + end + def test_err_y err = assert_compile 'err.y' assert_no_warnings err From 1188016fefdf64b226ba85139afe30015315bfa6 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 1 Dec 2016 21:22:52 +0200 Subject: [PATCH 557/619] Pass through encoding comment from input to generated parser file Ruby source files with funny weird characters may require an encoding comment to run correctly. Since Racc grammar files contain embedded Ruby code, encoding comments are just as important to them as to ordinary Ruby source files. So: respect any encoding comment which appears at the beginning of a Racc grammar file. It must be the *first* line in the file. Fixes GitHub issue #20. --- Manifest.txt | 1 + lib/racc/grammar_file_parser.rb | 9 +++-- lib/racc/parser_file_generator.rb | 13 ++++--- test/assets/calc-ja.y | 64 +++++++++++++++++++++++++++++++ test/test_racc_command.rb | 12 ++++++ 5 files changed, 89 insertions(+), 10 deletions(-) create mode 100644 test/assets/calc-ja.y diff --git a/Manifest.txt b/Manifest.txt index 9e329774..f31f5dac 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -59,6 +59,7 @@ test/assets/badsyntax.y test/assets/bench.y test/assets/bibtex.y test/assets/cadenza.y +test/assets/calc-ja.y test/assets/cast.y test/assets/chk.y test/assets/conf.y diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index dc1412bd..3cfaf7d7 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -131,14 +131,14 @@ module Racc class GrammarFileParser # reopen class Result - def initialize(grammar, file) + def initialize(grammar, file, encoding = nil) @grammar = grammar @params = ParserFileGenerator::Params.new @params.file = file + @params.encoding = encoding end - attr_reader :grammar - attr_reader :params + attr_reader :grammar, :params end def GrammarFileParser.parse_file(filename) @@ -149,7 +149,8 @@ def parse(src, filename = '-') @file = Source::Buffer.new(filename, src) @scanner = GrammarFileScanner.new(@file) @grammar = Grammar.new - @result = Result.new(@grammar, @file) + encoding = src[/\A\s*#\s*encoding:\s*(\S+)/, 1] + @result = Result.new(@grammar, @file, encoding) @embedded_action_seq = 0 yyparse @scanner, :yylex diff --git a/lib/racc/parser_file_generator.rb b/lib/racc/parser_file_generator.rb index 01f12823..094426cb 100644 --- a/lib/racc/parser_file_generator.rb +++ b/lib/racc/parser_file_generator.rb @@ -23,13 +23,9 @@ def #{name}=(b) End end - attr_accessor :file - attr_accessor :classname - attr_accessor :superclass + attr_accessor :file, :encoding, :classname, :superclass bool_attr :result_var - attr_accessor :header - attr_accessor :inner - attr_accessor :footer + attr_accessor :header, :inner, :footer bool_attr :debug_parser bool_attr :embed_runtime @@ -90,6 +86,7 @@ def generate_parser_file(destpath) def parser_file Color.without_color do shebang(@params.interpreter) if @params.make_executable? + encoding_comment(@params.encoding) if @params.encoding notice line if @params.embed_runtime? @@ -115,6 +112,10 @@ def shebang(path) line '#!' + (path == 'ruby' ? RUBY_PATH : path) end + def encoding_comment(encoding) + line "# encoding: #{encoding}" + end + def notice line %q[#] line %q[# DO NOT MODIFY!!!!] diff --git a/test/assets/calc-ja.y b/test/assets/calc-ja.y new file mode 100644 index 00000000..a1c11e93 --- /dev/null +++ b/test/assets/calc-ja.y @@ -0,0 +1,64 @@ +# encoding: EUC-JP + +# A simple calculator, version 2. +# This file contains Japanese characters (encoding=EUC-JP). + +class Calculator2 + prechigh + nonassoc UMINUS + left '*' '/' + left '+' '-' + preclow + options no_result_var +rule + target : exp + | /* none */ { 0 } + + exp : exp '+' exp { val[0] + val[2] } + | exp '-' exp { val[0] - val[2] } + | exp '*' exp { val[0] * val[2] } + | exp '/' exp { val[0] / val[2] } + | '(' exp ')' { val[1] } + | '-' NUMBER =UMINUS { -(val[1]) } + | NUMBER +end + +---- inner + + def evaluate(str) + @tokens = [] + until str.empty? + case str + when /\A\s+/ + ; + when /\A\d+/ + @tokens.push [:NUMBER, $&.to_i] + when /\A.|\n/ + s = $& + @tokens.push [s, s] + end + str = $' + end + @tokens.push [false, '$'] + do_parse + end + + def next_token + @tokens.shift + end + +---- footer + +puts 'Ķ 2 浡' +puts 'Q ǽλޤ' +calc = Calculator2.new +while true + print '>>> '; $stdout.flush + str = $stdin.gets.strip + break if /q/i =~ str + begin + p calc.evaluate(str) + rescue ParseError + puts 'parse error' + end +end diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 82bc096f..ef6428b9 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -58,6 +58,18 @@ def test_executable_parser end end + def test_encoding_comment + err = assert_compile 'calc-ja.y' + assert_warnings err, useless_prec: 1 + Dir.chdir(PROJECT_DIR) do + lines = File.readlines("#{TAB_DIR}/calc-ja") + + assert(lines.first == "# encoding: EUC-JP\n", + 'Encoding comment was not passed through from test/assets/calc-ja.y' \ + ' to resulting parser file.') + end + end + def test_err_y err = assert_compile 'err.y' assert_no_warnings err From c2cf2f079908d5cd840b19a3f5edafdd6620f6c3 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Wed, 10 May 2017 14:22:17 -0500 Subject: [PATCH 558/619] Add appropriate license header to Cparse.java Cparse.java, as a port of cparse.c, is also licensed under the terms of Ruby itself. See jruby/jruby#4603. --- ext/racc/com/headius/racc/Cparse.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ext/racc/com/headius/racc/Cparse.java b/ext/racc/com/headius/racc/Cparse.java index f8731973..9d0e6d0b 100644 --- a/ext/racc/com/headius/racc/Cparse.java +++ b/ext/racc/com/headius/racc/Cparse.java @@ -1,3 +1,17 @@ +/* + Cparse.java -- Racc Runtime Core for JRuby + + Copyright (c) 2016 Charles Oliver Nutter + + Ported from and distributed under the same licence as cparse.c + + cparse.c -- Racc Runtime Core + + Copyright (c) 1999-2006 Minero Aoki + + This library is free software. + You can distribute/modify this program under the same terms of ruby. +*/ package com.headius.racc; import org.jruby.Ruby; From 7bdd36ed974cfce6c267996af150b7c17c9c162d Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Wed, 10 May 2017 13:31:05 -0700 Subject: [PATCH 559/619] Fix VERSION string to be compliant to rubygems spec. Removes hoe warning. --- lib/racc/info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/info.rb b/lib/racc/info.rb index 11bdc048..8d1a991c 100644 --- a/lib/racc/info.rb +++ b/lib/racc/info.rb @@ -6,7 +6,7 @@ # For details of the GNU LGPL, see the file "COPYING". module Racc - VERSION = '2.0.0-dev' + VERSION = "2.0.0.dev" CODENAME = 'Mecha Oishii' COPYRIGHT = 'Copyright (c) 1999-2006 Minero Aoki' end From d3cbf2bda4b13c4c9b8dc5b7fa8481929744b611 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Wed, 10 May 2017 14:05:53 -0700 Subject: [PATCH 560/619] Oops. Fixed the tests I broke with a 1 char change. Tests like this are brittle and prone to churn. Should consider at least doing a sanitizing step. --- test/regress/bibtex.rb | 2 +- test/regress/cadenza.rb | 2 +- test/regress/cast.rb | 2 +- test/regress/csspool.rb | 2 +- test/regress/edtf.rb | 2 +- test/regress/eye-of-newt.rb | 2 +- test/regress/huia.rb | 2 +- test/regress/journey.rb | 2 +- test/regress/liquor.rb | 2 +- test/regress/machete.rb | 2 +- test/regress/mediacloth.rb | 2 +- test/regress/mof.rb | 2 +- test/regress/namae.rb | 2 +- test/regress/nasl.rb | 2 +- test/regress/nokogiri-css.rb | 2 +- test/regress/opal.rb | 2 +- test/regress/php_serialization.rb | 2 +- test/regress/rdblockparser.rb | 2 +- test/regress/rdinlineparser.rb | 2 +- test/regress/riml.rb | 2 +- test/regress/ruby18.rb | 2 +- test/regress/ruby22.rb | 2 +- test/regress/tp_plus.rb | 2 +- test/regress/twowaysql.rb | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/test/regress/bibtex.rb b/test/regress/bibtex.rb index 3920e1df..792a16bb 100644 --- a/test/regress/bibtex.rb +++ b/test/regress/bibtex.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "bibtex.y". # diff --git a/test/regress/cadenza.rb b/test/regress/cadenza.rb index 898981e0..10e6a017 100644 --- a/test/regress/cadenza.rb +++ b/test/regress/cadenza.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "cadenza.y". # diff --git a/test/regress/cast.rb b/test/regress/cast.rb index 12d2d53e..727937e0 100644 --- a/test/regress/cast.rb +++ b/test/regress/cast.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "cast.y". # diff --git a/test/regress/csspool.rb b/test/regress/csspool.rb index c5951108..1ca09e0d 100644 --- a/test/regress/csspool.rb +++ b/test/regress/csspool.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "csspool.y". # diff --git a/test/regress/edtf.rb b/test/regress/edtf.rb index ad241b3f..22f29d3c 100644 --- a/test/regress/edtf.rb +++ b/test/regress/edtf.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "edtf.y". # diff --git a/test/regress/eye-of-newt.rb b/test/regress/eye-of-newt.rb index 808e9e0c..01547515 100644 --- a/test/regress/eye-of-newt.rb +++ b/test/regress/eye-of-newt.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "eye-of-newt.y". # diff --git a/test/regress/huia.rb b/test/regress/huia.rb index 7ea9ac74..0590cbca 100644 --- a/test/regress/huia.rb +++ b/test/regress/huia.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "huia.y". # diff --git a/test/regress/journey.rb b/test/regress/journey.rb index 43bcb58e..455d812a 100644 --- a/test/regress/journey.rb +++ b/test/regress/journey.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "journey.y". # diff --git a/test/regress/liquor.rb b/test/regress/liquor.rb index 47efe53a..97bde874 100644 --- a/test/regress/liquor.rb +++ b/test/regress/liquor.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "liquor.y". # diff --git a/test/regress/machete.rb b/test/regress/machete.rb index 0d4047d6..60540dea 100644 --- a/test/regress/machete.rb +++ b/test/regress/machete.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "machete.y". # diff --git a/test/regress/mediacloth.rb b/test/regress/mediacloth.rb index 3a453a15..70882f23 100644 --- a/test/regress/mediacloth.rb +++ b/test/regress/mediacloth.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "mediacloth.y". # diff --git a/test/regress/mof.rb b/test/regress/mof.rb index a540188a..e8f7bdab 100644 --- a/test/regress/mof.rb +++ b/test/regress/mof.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "mof.y". # diff --git a/test/regress/namae.rb b/test/regress/namae.rb index ff87b7b0..5ec20a67 100644 --- a/test/regress/namae.rb +++ b/test/regress/namae.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "namae.y". # diff --git a/test/regress/nasl.rb b/test/regress/nasl.rb index 74f46f53..c525dcfc 100644 --- a/test/regress/nasl.rb +++ b/test/regress/nasl.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "nasl.y". # diff --git a/test/regress/nokogiri-css.rb b/test/regress/nokogiri-css.rb index 5b6fed4d..dbe9f5c1 100644 --- a/test/regress/nokogiri-css.rb +++ b/test/regress/nokogiri-css.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "nokogiri-css.y". # diff --git a/test/regress/opal.rb b/test/regress/opal.rb index 65e3537f..3b1f53d4 100644 --- a/test/regress/opal.rb +++ b/test/regress/opal.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "opal.y". # diff --git a/test/regress/php_serialization.rb b/test/regress/php_serialization.rb index 1cb5bcdb..8c5babf8 100644 --- a/test/regress/php_serialization.rb +++ b/test/regress/php_serialization.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "php_serialization.y". # diff --git a/test/regress/rdblockparser.rb b/test/regress/rdblockparser.rb index 30821be0..6c889641 100644 --- a/test/regress/rdblockparser.rb +++ b/test/regress/rdblockparser.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "rdblockparser.y". # diff --git a/test/regress/rdinlineparser.rb b/test/regress/rdinlineparser.rb index 5370b630..b2d9450f 100644 --- a/test/regress/rdinlineparser.rb +++ b/test/regress/rdinlineparser.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "rdinlineparser.y". # diff --git a/test/regress/riml.rb b/test/regress/riml.rb index a456546f..053d2922 100644 --- a/test/regress/riml.rb +++ b/test/regress/riml.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "riml.y". # diff --git a/test/regress/ruby18.rb b/test/regress/ruby18.rb index 8fbf0d03..bd8c4ce5 100644 --- a/test/regress/ruby18.rb +++ b/test/regress/ruby18.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "ruby18.y". # diff --git a/test/regress/ruby22.rb b/test/regress/ruby22.rb index 5aeca736..c9f7d15e 100644 --- a/test/regress/ruby22.rb +++ b/test/regress/ruby22.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "ruby22.y". # diff --git a/test/regress/tp_plus.rb b/test/regress/tp_plus.rb index 6e6ab3c0..86b30eb6 100644 --- a/test/regress/tp_plus.rb +++ b/test/regress/tp_plus.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "tp_plus.y". # diff --git a/test/regress/twowaysql.rb b/test/regress/twowaysql.rb index 822b9ec6..bb52708d 100644 --- a/test/regress/twowaysql.rb +++ b/test/regress/twowaysql.rb @@ -1,6 +1,6 @@ # # DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0-dev +# This file was automatically generated by Racc 2.0.0.dev # (codename: Mecha Oishii) from Racc grammar file "twowaysql.y". # From 5d09f94cc5d8fa10612dca315608d173b66f5f2a Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Wed, 10 May 2017 14:08:04 -0700 Subject: [PATCH 561/619] Fix assertions to provide diffs directly. --- test/helper.rb | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index b449dd05..a1c61633 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -70,42 +70,25 @@ def assert_exec(asset, embedded_runtime = false) def assert_parser_unchanged(asset) file = File.basename(asset, '.y') - result = Dir.chdir(PROJECT_DIR) do - File.read("#{REGRESS_DIR}/#{file}.rb") == File.read("#{TAB_DIR}/#{file}") + Dir.chdir(PROJECT_DIR) do + assert_equal File.read("#{REGRESS_DIR}/#{file}.rb"), File.read("#{TAB_DIR}/#{file}") end - - assert(result, "Output of test/assets/#{asset} differed from " \ - "expectation. Try compiling it and diff with test/regress/#{file}.rb:" \ - "\nruby -Ilib bin/racc -o tmp/#{file} test/assets/#{asset}; " \ - "colordiff tmp/#{file} test/regress/#{file}.rb") end def assert_output_unchanged(file, args, actual = nil) actual, args = args, nil if actual == nil - result = Dir.chdir(PROJECT_DIR) do - File.read("#{REGRESS_DIR}/#{file}") == actual + Dir.chdir(PROJECT_DIR) do + assert_equal File.read("#{REGRESS_DIR}/#{file}"), actual end - - asset = File.basename(file, '.out') + '.y' - assert(result, "Console output of test/assets/#{asset} differed from " \ - 'expectation. Try compiling it and diff stderr with ' \ - "test/regress/#{file}:\nruby -Ilib bin/racc #{args} -o /dev/null " \ - "test/assets/#{asset} 2>tmp/#{file}; colordiff tmp/#{file} " \ - "test/regress/#{file}") end def assert_html_unchanged(asset) assert_compile asset, '-S' file = File.basename(asset, '.y') - result = Dir.chdir(PROJECT_DIR) do - File.read("#{REGRESS_DIR}/#{file}.html") == File.read("#{TAB_DIR}/#{file}") + Dir.chdir(PROJECT_DIR) do + assert_equal File.read("#{REGRESS_DIR}/#{file}.html"), File.read("#{TAB_DIR}/#{file}") end - - assert(result, "HTML state summary for test/assets/#{asset} differed from " \ - "expectation. Try compiling it and diff with test/regress/#{file}.html:" \ - "\nruby -Ilib bin/racc -S -o tmp/#{file} test/assets/#{asset}; " \ - "colordiff tmp/#{file} test/regress/#{file}.html") end def racc(arg, expect_success = true) From b3a4733991985a4aceff41b2e7bfc401d07c421b Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 2 Nov 2017 21:23:00 +0200 Subject: [PATCH 562/619] Test Racc on recent versions of Ruby (in Travis CI) --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6852714b..98b9fe5b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,9 @@ rvm: - 1.9.3 - 2.0.0 - 2.1.8 - - 2.2.4 - - 2.3.0 + - 2.2.8 + - 2.3.5 + - 2.4.2 - ruby-head matrix: allow_failures: From 5df2e901bdc6e20d768b3253cbd4fb18e2bb5bcb Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 3 Nov 2017 18:20:48 +0200 Subject: [PATCH 563/619] Update dependencies --- Gemfile | 18 +++++++++--------- Rakefile | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Gemfile b/Gemfile index 8e16233c..b78ecc1b 100644 --- a/Gemfile +++ b/Gemfile @@ -5,17 +5,17 @@ source "https://rubygems.org/" -gem "rdoc", "~>4.0", :group => [:development, :test] -gem "rake", "~>10.4", :group => [:development, :test] -gem "rake-compiler", ">=0.4.1", :group => [:development, :test] -gem "minitest", "~>5.8", :group => [:development, :test] -gem "hoe", "~>3.14", :group => [:development, :test] -gem "hoe-debugging", "~>1.2", :group => [:development, :test] +gem "rake", "~>12.2", :group => [:development, :test] +gem "rake-compiler", "~>1.0", :group => [:development, :test] +gem "minitest", "~>5.10", :group => [:development, :test] +gem "hoe", "~>3.16", :group => [:development, :test] +gem "hoe-debugging", "~>1.4", :group => [:development, :test] gem "hoe-doofus", "~>1.0", :group => [:development, :test] gem "hoe-git", "~>1.6", :group => [:development, :test] gem "hoe-gemspec", "~>1.0", :group => [:development, :test] -gem "hoe-bundler", "~>1.2", :group => [:development, :test] -gem "rubocop", "~>0.34", :group => [:development, :test] -gem "pry", "~>0.10", :group => [:development, :test] +gem "hoe-bundler", "~>1.3", :group => [:development, :test] +gem "rubocop", "~>0.51", :group => [:development, :test] +gem "pry", "~>0.11", :group => [:development, :test] +gem "rdoc", "~>4.0", :group => [:development, :test] # vim: syntax=ruby diff --git a/Rakefile b/Rakefile index dc4ace99..d946c865 100644 --- a/Rakefile +++ b/Rakefile @@ -3,7 +3,7 @@ require 'rubygems' require 'hoe' -gem 'rake-compiler', '>= 0.4.1' +gem 'rake-compiler' Hoe.plugin :debugging, :doofus, :git, :gemspec, :bundler @@ -23,19 +23,19 @@ HOE = Hoe.spec 'racc' do self.extra_rdoc_files = Dir['*.rdoc'] self.readme_file = 'README.rdoc' - dependency 'rake', '~> 10.4', :developer - dependency 'rake-compiler', '>= 0.4.1', :developer - dependency 'minitest', '~> 5.8', :developer + dependency 'rake', '~> 12.2', :developer + dependency 'rake-compiler', '~> 1.0', :developer + dependency 'minitest', '~> 5.10', :developer - dependency 'hoe', '~> 3.14', :developer - dependency 'hoe-debugging', '~> 1.2', :developer + dependency 'hoe', '~> 3.16', :developer + dependency 'hoe-debugging', '~> 1.4', :developer dependency 'hoe-doofus', '~> 1.0', :developer dependency 'hoe-git', '~> 1.6', :developer dependency 'hoe-gemspec', '~> 1.0', :developer - dependency 'hoe-bundler', '~> 1.2', :developer + dependency 'hoe-bundler', '~> 1.3', :developer - dependency 'rubocop', '~> 0.34', :developer - dependency 'pry', '~> 0.10', :developer + dependency 'rubocop', '~> 0.51', :developer + dependency 'pry', '~> 0.11', :developer if java? self.spec_extras[:platform] = 'java' From fca52fcfcd2ddfd2f6fc80fcfea8b035cbe79c05 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 3 Nov 2017 18:20:59 +0200 Subject: [PATCH 564/619] Lowest supported Ruby version is 2.2.8 This is the oldest Ruby version which is still supported by the Ruby core team (as of right now). --- .travis.yml | 3 --- Rakefile | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 98b9fe5b..fcb949b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,6 @@ sudo: false cache: bundler language: ruby rvm: - - 1.9.3 - - 2.0.0 - - 2.1.8 - 2.2.8 - 2.3.5 - 2.4.2 diff --git a/Rakefile b/Rakefile index d946c865..b2fb529d 100644 --- a/Rakefile +++ b/Rakefile @@ -44,6 +44,8 @@ HOE = Hoe.spec 'racc' do end self.clean_globs << "lib/#{self.name}/*.{so,bundle,dll,jar}" # from hoe/compiler + + require_ruby_version '2.2.8' end def add_file_to_gem relative_path From 22ea4c9f4c4897666cef6564449912598518b280 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 3 Nov 2017 19:10:36 +0200 Subject: [PATCH 565/619] Fix test for --executable when tests are run using 'bundle exec' According to the Bundler documentation, "Any Ruby code that opens a subshell (like system, backticks, or %x{}) will automatically use the current Bundler environment." Since that is so, it's not necessary to generate executable parser files with "bundle exec ruby" in the shebang when running tests using 'bundle exec'. Good thing too, because Linux handles the shebang in a bad way. In Linux, this: #!bundle exec ruby Is the same as running your script as: bundle "exec ruby" script.rb ...Which obviously doesn't work. In other words, Linux only allows a single argument to be included in a shebang line (it doesn't split the arguments on whitespace). --- test/test_racc_command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index ef6428b9..a205be5b 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -51,7 +51,7 @@ def test_echk_y end def test_executable_parser - err = assert_compile 'echk.y', "-E -e \"#{ruby_executable}\"" + err = assert_compile 'echk.y', "-E -e ruby" assert_no_warnings err Dir.chdir(PROJECT_DIR) do assert(system("#{TAB_DIR}/echk")) From db6a0643d3add86dbd93f420632dc5278bd7bb8f Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 3 Nov 2017 20:38:28 +0200 Subject: [PATCH 566/619] More detailed message when lexer for action blocks stops in wrong place ...Or if it overruns the end of the action block. The whole point of RubyLexer is to skip over the Ruby code in an action block, so that the grammar file scanner can continue lexing from whatever follows it. --- lib/racc/grammar_file_scanner.rl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/racc/grammar_file_scanner.rl b/lib/racc/grammar_file_scanner.rl index 20c179f9..607b125f 100644 --- a/lib/racc/grammar_file_scanner.rl +++ b/lib/racc/grammar_file_scanner.rl @@ -191,8 +191,7 @@ class Racc::GrammarFileScanner end if @source[@position] != '}' - # TODO: more detailed diagnostics - raise Racc::ScanError, "scan error in action block" + raise Racc::ScanError, "scan error in action block (expected closing brace, found #{@source[@position].inspect})" end end From 2b1c031af2084f45fd973707c5489abe8770cfa9 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Fri, 3 Nov 2017 22:03:25 +0200 Subject: [PATCH 567/619] Fix 'escapednl' scanner test with bad Ruby syntax It turns out that the Ruby syntax used in this test file was always bad, but the test happened to pass on the version of Ruby which was current at that time. Ruby contains a library called Ripper, which is based on Ruby's built-in parser and lexer and enables them to be invoked programmatically. The trouble with Ripper is that as the Ruby core team changes the parser code, the output from Ripper (even when run on the same input) may also change. Even seemingly innocuous changes to Ruby's parser may change Ripper in a way which breaks code which relies on it. This test file is a good example. On Ruby 2.2.8 and 2.4.2, Racc is able to process it without error. But on Ruby 2.3.5, the output from Ripper is different and the test fails. In any case, the Ruby syntax is incorrect. The intention was to ensure that Racc works when action blocks contain correct Ruby code, not incorrect. So the bad part can just be removed. --- test/scandata/escapednl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/scandata/escapednl b/test/scandata/escapednl index c740fcee..5506ea92 100644 --- a/test/scandata/escapednl +++ b/test/scandata/escapednl @@ -1,11 +1,6 @@ puts 1 + \ 2 -< Date: Tue, 21 Nov 2017 21:50:38 -0500 Subject: [PATCH 568/619] extract test script run by travis this is a prefactor which will allow us to add tests for ruby 2.4's frozen string literals --- .travis.yml | 4 +--- test/run_tests.sh | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100755 test/run_tests.sh diff --git a/.travis.yml b/.travis.yml index fcb949b0..ecc322de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,4 @@ matrix: before_install: gem update --remote bundler install: - bundle install --retry 3 -script: - - bundle exec rake test - - bundle exec rake test_pure +script: ./test/run_tests.sh diff --git a/test/run_tests.sh b/test/run_tests.sh new file mode 100755 index 00000000..5fb354cd --- /dev/null +++ b/test/run_tests.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +bundle exec rake test +bundle exec rake test_pure From 1ab411cfef531712a36e1bb349939a090e6f4c76 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 16 Feb 2017 15:03:30 -0500 Subject: [PATCH 569/619] support Ruby 2.4's frozen string literals Note this change is made relative to master. --- bin/racc | 5 +++-- lib/racc/color.rb | 18 +++++++++--------- lib/racc/grammar.rb | 16 ++++++++-------- lib/racc/source.rb | 2 +- lib/racc/state_transition_table.rb | 2 +- lib/racc/warning.rb | 16 ++++++++-------- test/test_scanner.rb | 4 ++-- 7 files changed, 32 insertions(+), 31 deletions(-) diff --git a/bin/racc b/bin/racc index 4e2f404a..af8cf568 100755 --- a/bin/racc +++ b/bin/racc @@ -165,9 +165,10 @@ def main profiler.report rescue Racc::CompileError, Errno::ENOENT, Errno::EPERM => err raise if $DEBUG - lineno = err.message.slice!(/\A\d+:/).to_s + message = err.message.dup # string may be frozen literal + lineno = message.slice!(/\A\d+:/).to_s location = lineno.empty? ? bright("#{input}:") : bright("#{input}:#{lineno}") - $stderr.puts "#{red('Error: ')}#{location} #{err.message.strip}" + $stderr.puts "#{red('Error: ')}#{location} #{message.strip}" exit 1 end end diff --git a/lib/racc/color.rb b/lib/racc/color.rb index 04e818ba..27194f73 100644 --- a/lib/racc/color.rb +++ b/lib/racc/color.rb @@ -23,43 +23,43 @@ def self.without_color def bright(text) return text unless Color.enabled? text = text.gsub(/\e\[.*?m[^\e]*\e\[0m/, "\e[0m\\0\e[1m") - "\e[1m#{text}\e[0m" + String.new "\e[1m#{text}\e[0m" end def red(text) return text unless Color.enabled? - "\e[31m#{text}\e[0m" + String.new "\e[31m#{text}\e[0m" end def green(text) return text unless Color.enabled? - "\e[32m#{text}\e[0m" + String.new "\e[32m#{text}\e[0m" end def violet(text) return text unless Color.enabled? - "\e[1;35m#{text}\e[0m" + String.new "\e[1;35m#{text}\e[0m" end # Syntax highlighting for various types of symbols... def nonterminal(text) return text unless Color.enabled? - "\e[1;34m#{text}\e[0m" # blue + String.new "\e[1;34m#{text}\e[0m" # blue end def terminal(text) return text unless Color.enabled? - "\e[1;36m\e[4m#{text}\e[0m" # cyan, with underline + String.new "\e[1;36m\e[4m#{text}\e[0m" # cyan, with underline end def string(text) return text unless Color.enabled? - "\e[1;33m#{text}\e[0m" # bright yellow + String.new "\e[1;33m#{text}\e[0m" # bright yellow end def explicit_prec(text) return text unless Color.enabled? - "\e[1;31m#{text}\e[0m" # bright reddish orange + String.new "\e[1;31m#{text}\e[0m" # bright reddish orange end end -end \ No newline at end of file +end diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index b50da7e6..0ee50fb8 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -298,7 +298,7 @@ def check_terminals locations = undeclared.flat_map(&:locate).map(&:rule).uniq raise CompileError, "terminal#{'s' unless undeclared.one?} " \ "#{Racc.to_sentence(undeclared)} #{undeclared.one? ? 'was' : 'were'} " \ - "not declared in a 'token' block:\n" << + "not declared in a 'token' block:\n" + Source::SparseLines.render(locations.map(&:source)) end @@ -308,7 +308,7 @@ def check_terminals raise CompileError, "token#{'s' unless wrongly_declared.one?} " \ "#{Racc.to_sentence(wrongly_declared)} were declared in a 'token'" \ " block, but #{wrongly_declared.one? ? 'it also has' : 'they also have'}" \ - " derivation rules:\n" << Source::SparseLines.render(bad_rules.map(&:source)) + " derivation rules:\n" + Source::SparseLines.render(bad_rules.map(&:source)) end end @@ -316,7 +316,7 @@ def check_terminals unless bad_strings.empty? bad_rules = bad_strings.flat_map(&:heads).map(&:rule) raise CompileError, 'you may not create derivation rules for a ' \ - "string literal:\n" << Source::SparseLines.render(bad_rules.map(&:source)) + "string literal:\n" + Source::SparseLines.render(bad_rules.map(&:source)) end bad_prec = @symbols.select { |s| s.assoc && s.nonterminal? } @@ -325,7 +325,7 @@ def check_terminals raise CompileError, "token#{'s' unless bad_prec.one?} " \ "#{Racc.to_sentence(bad_prec)} appeared in a prechigh/preclow " \ "block, but #{bad_prec.one? ? 'it is not a' : 'they are not'} " \ - "terminal#{'s' unless bad_prec.one?}:\n" << + "terminal#{'s' unless bad_prec.one?}:\n" + Source::SparseLines.render(bad_rules.map(&:source)) end @@ -335,7 +335,7 @@ def check_terminals unless bad_prec.empty? raise CompileError, "The following rule#{'s' unless bad_prec.one?} " \ "use#{'s' if bad_prec.one?} nonterminals for explicit precedence, " \ - "which is not allowed:\n" << + "which is not allowed:\n" + Source::SparseLines.render(bad_prec.map(&:source)) end end @@ -344,13 +344,13 @@ def check_rules @rules.group_by(&:target).each_value do |same_lhs| same_lhs.group_by { |r| r.symbols.reject(&:hidden?) }.each_value do |same_rhs| next unless same_rhs.size > 1 - raise CompileError, "The following rules are duplicates:\n" << + raise CompileError, "The following rules are duplicates:\n" + Source::SparseLines.render(same_rhs.map(&:source)) end end unless @error.heads.empty? - raise CompileError, "You cannot create rules for the error symbol:\n" << + raise CompileError, "You cannot create rules for the error symbol:\n" + Source::SparseLines.render(@error.heads.map { |ptr| ptr.rule.source} ) end end @@ -568,7 +568,7 @@ def following end def to_s - result = "#{@rule.target} : " + result = String.new "#{@rule.target} : " if @index > 0 result << "#{preceding.reject(&:hidden?).map(&:to_s).join(' ')} ." else diff --git a/lib/racc/source.rb b/lib/racc/source.rb index 1e4663d4..8d4decc8 100644 --- a/lib/racc/source.rb +++ b/lib/racc/source.rb @@ -31,7 +31,7 @@ def spiffy highlights.sort_by!(&:from) raw = text - cooked = '' + cooked = String.new offset = 0 highlights.each do |hilite| diff --git a/lib/racc/state_transition_table.rb b/lib/racc/state_transition_table.rb index 1c01c321..da2de1be 100644 --- a/lib/racc/state_transition_table.rb +++ b/lib/racc/state_transition_table.rb @@ -202,7 +202,7 @@ def add_entry(all, array, chkval, ptr_array) end def mkmapexp(arr) - map = '' + map = String.new maxdup = RE_DUP_MAX arr.chunk(&:nil?).each do |is_nil, items| diff --git a/lib/racc/warning.rb b/lib/racc/warning.rb index 233f1946..b9e6486e 100644 --- a/lib/racc/warning.rb +++ b/lib/racc/warning.rb @@ -53,7 +53,7 @@ def initialize(type, title, details = nil) end def to_s - msg = violet('Warning: ') << bright(title) + msg = violet('Warning: ') + bright(title) msg << "\n" << details if details msg end @@ -104,7 +104,7 @@ def title def details "Its derivation rule#{'s all' unless @sym.heads.one?} contain" \ "#{'s' if @sym.heads.one?} #{'an ' if @sym.heads.one?}infinite loop" \ - "#{'s' unless @sym.heads.one?}:\n" << + "#{'s' unless @sym.heads.one?}:\n" + @sym.heads.map { |ptr| ptr.rule.to_s }.join("\n") end @@ -175,7 +175,7 @@ def details "When the next token is #{connective}#{Racc.to_sentence(tokens, 'or')}" \ ", it is overridden by #{rules.one? ? 'this' : 'these'} " \ - "higher-precedence rule#{'s' unless rules.one?}:\n" << + "higher-precedence rule#{'s' unless rules.one?}:\n" + Source::SparseLines.render(rules.map(&:source)) end.join("\n\n") end @@ -196,7 +196,7 @@ def initialize(conflict, grammar, verbose) end def title - "Shift/reduce conflict on #{@sym}," << + "Shift/reduce conflict on #{@sym}," + (@path.reject(&:hidden?).empty? ? ' at the beginning of the parse.' : ' after the following input:') @@ -204,7 +204,7 @@ def title def details if @path.reject(&:hidden?).empty? - result = '' + result = String.new else result = @path.reject(&:hidden?).map(&:to_s).join(' ') << "\n" end @@ -253,7 +253,7 @@ def initialize(conflict, grammar, verbose) end def title - "Reduce/reduce conflict on #{@sym}," << + "Reduce/reduce conflict on #{@sym}," + (@path.reject(&:hidden?).empty? ? ' at the beginning of the parse.' : ' after the following input:') @@ -261,7 +261,7 @@ def title def details if @path.reject(&:hidden?).empty? - result = '' + result = String.new else result = @path.reject(&:hidden?).map(&:to_s).join(' ') << "\n" end @@ -300,4 +300,4 @@ def type end end end -end \ No newline at end of file +end diff --git a/test/test_scanner.rb b/test/test_scanner.rb index 3232e8b2..b7b35004 100644 --- a/test/test_scanner.rb +++ b/test/test_scanner.rb @@ -9,11 +9,11 @@ class TestScanner < TestCase define_method("test_scan_#{File.basename(testfile)}".to_sym) do original = File.read(testfile) # wrap the Ruby source code in an action block - wrapped = "class Test\nrule\na : '*' {" << original << "\n}" + wrapped = "class Test\nrule\na : '*' {" + original + "\n}" file = Source::Buffer.new(testfile, wrapped) scanner = Racc::GrammarFileScanner.new(file) - rebuilt = '' + rebuilt = String.new scanner.yylex do |token| break if token.nil? rebuilt << token[1][0].text if token[0] == :ACTION From 3f8e7f3960a3501ed0dea2dcdd7d14de2f140ccb Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Tue, 21 Nov 2017 23:03:13 -0500 Subject: [PATCH 570/619] ensure test suite enables frozen string literals for ruby 2.4 and higher, to prevent regressing on frozen literal support. --- test/run_tests.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/run_tests.sh b/test/run_tests.sh index 5fb354cd..b071f446 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -1,4 +1,14 @@ #!/usr/bin/env bash +set -eux + +test_frozen_strings=$(ruby -e 'puts (RUBY_ENGINE == "ruby" && RUBY_VERSION > "2.4")') + +if [[ $test_frozen_strings == "true" ]] ; then + echo "NOTE: enabling frozen string literals" + rvm install rubygems 2.6.12 --force # because of an issue in rubygems 2.7 with ruby 2.5 and frozen string literals + export RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" +fi + bundle exec rake test bundle exec rake test_pure From 7aec2255a52d6974d803a4922067beec7d5e7c5a Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Sun, 18 Nov 2018 21:33:10 -0600 Subject: [PATCH 571/619] Never use identity comparison for Ruby objects. Numeric objects in JRuby do not have guarantees of idempotence. In this code, many places used object equality to compare two Fixnum objects, a situation which is never guaranteed to work, and which is much more likely to fail when JRuby's cache of low-valued Fixnum objects is turned off as in jruby/jruby#5401. This patch removes all such object identity comparisons and replaces them with .equals calls. --- ext/racc/com/headius/racc/Cparse.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/racc/com/headius/racc/Cparse.java b/ext/racc/com/headius/racc/Cparse.java index 9d0e6d0b..4f66e033 100644 --- a/ext/racc/com/headius/racc/Cparse.java +++ b/ext/racc/com/headius/racc/Cparse.java @@ -281,7 +281,7 @@ public void parse_main(ThreadContext context, IRubyObject tok, IRubyObject val, i = assert_integer(tmp); D_printf("read_next=%d\n", read_next); - if (read_next && (this.t != vFINAL_TOKEN)) { + if (read_next && (!this.t.equals(vFINAL_TOKEN))) { if (this.lex_is_iterator) { D_puts("resuming..."); if (this.fin != 0) throw runtime.newArgumentError("token given after EOF"); @@ -405,7 +405,7 @@ else if (act == this.shift_n) { case USER_YYERROR: if (this.errstatus == 3) { - if (this.t == vFINAL_TOKEN) { + if (this.t.equals(vFINAL_TOKEN)) { this.retval = runtime.getFalse(); this.fin = CP_FIN_EOT; return; @@ -541,13 +541,13 @@ private IRubyObject reduce0(ThreadContext context) { /* call action */ if (len == 0) { tmp = context.nil; - if (mid != sym_noreduce) + if (!mid.equals(sym_noreduce)) tmp_v = runtime.newArray(); if (this.debug) tmp_t = runtime.newArray(); } else { - if (mid != sym_noreduce) { + if (!mid.equals(sym_noreduce)) { tmp_v = GET_TAIL(context, this.vstack, len); tmp = ((RubyArray)tmp_v).entry(0); } @@ -561,7 +561,7 @@ private IRubyObject reduce0(ThreadContext context) { } CUT_TAIL(context, this.state, len); } - if (mid != sym_noreduce) { + if (!mid.equals(sym_noreduce)) { if (this.use_result_var) { tmp = Helpers.invoke(context, this.parser, mid.toString(), tmp_v, this.vstack, tmp); } @@ -604,7 +604,7 @@ private IRubyObject reduce0(ThreadContext context) { D_puts("(goto) check[i] == nil"); branch = NOTFOUND; continue BRANCH; } - if (tmp != runtime.newFixnum(k1)) { + if (!tmp.equals(runtime.newFixnum(k1))) { D_puts("(goto) check[i] != table[i]"); branch = NOTFOUND; continue BRANCH; } @@ -773,7 +773,7 @@ public IRubyObject call(ThreadContext context, IRubyObject[] args, Block block) } }, context)); } catch (LexerUnroll maybeOurs) { - if (maybeOurs == lexerUnroll) { + if (maybeOurs.equals(lexerUnroll)) { return; } } From 822e4db17c5c80d4412f10770d347b6b2c26d6cf Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Sun, 18 Nov 2018 23:09:37 -0600 Subject: [PATCH 572/619] Fix catch logic for reduce. --- ext/racc/com/headius/racc/Cparse.java | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ext/racc/com/headius/racc/Cparse.java b/ext/racc/com/headius/racc/Cparse.java index 9d0e6d0b..a973d492 100644 --- a/ext/racc/com/headius/racc/Cparse.java +++ b/ext/racc/com/headius/racc/Cparse.java @@ -21,6 +21,7 @@ import org.jruby.RubyContinuation; import org.jruby.RubyFixnum; import org.jruby.RubyHash; +import org.jruby.RubyKernel; import org.jruby.RubyModule; import org.jruby.RubyNumeric; import org.jruby.RubyObject; @@ -38,6 +39,7 @@ import org.jruby.runtime.Helpers; import org.jruby.runtime.MethodIndex; import org.jruby.runtime.ObjectAllocator; +import org.jruby.runtime.Signature; import org.jruby.runtime.ThreadContext; import org.jruby.runtime.Visibility; import org.jruby.runtime.builtin.IRubyObject; @@ -503,17 +505,18 @@ private void shift(ThreadContext context, int act, IRubyObject tok, IRubyObject } private int reduce(ThreadContext context, int act) { - IRubyObject code; ruleno = -act * 3; IRubyObject tag = context.runtime.newSymbol("racc_jump"); - RubyContinuation rbContinuation = new RubyContinuation(context.runtime, context.runtime.newSymbol("racc_jump")); - try { - context.pushCatch(rbContinuation.getContinuation()); - code = reduce0(context); - errstatus = assert_integer(parser.getInstanceVariable(ID_ERRSTATUS)); - } finally { - context.popCatch(); - } + IRubyObject code = RubyKernel.rbCatch19(context, this, + tag, + CallBlock19.newCallClosure(this, getMetaClass(), Signature.NO_ARGUMENTS, + new BlockCallback() { + @Override + public IRubyObject call(ThreadContext context, IRubyObject[] args, Block block) { + return reduce0(context); + } + }, context)); + errstatus = assert_integer(parser.getInstanceVariable(ID_ERRSTATUS)); return assert_integer(code); } From 97b8af5dfb4e609e7fd3d12afbb6b83b8ba2933c Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Sun, 18 Nov 2018 23:09:57 -0600 Subject: [PATCH 573/619] Fix REDUCE macro and make some fallthroughs explicit. --- ext/racc/com/headius/racc/Cparse.java | 38 ++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/ext/racc/com/headius/racc/Cparse.java b/ext/racc/com/headius/racc/Cparse.java index a973d492..d8f9dcc1 100644 --- a/ext/racc/com/headius/racc/Cparse.java +++ b/ext/racc/com/headius/racc/Cparse.java @@ -249,10 +249,6 @@ private void SHIFT(ThreadContext context, int act, IRubyObject tok, IRubyObject shift(context, act, tok, val); } - private int REDUCE(ThreadContext context, int act) { - return reduce(context, act); - } - public void parse_main(ThreadContext context, IRubyObject tok, IRubyObject val, boolean resume) { Ruby runtime = context.runtime; @@ -370,7 +366,21 @@ public void parse_main(ThreadContext context, IRubyObject tok, IRubyObject val, } else if (act < 0 && act > -(this.reduce_n)) { D_puts("reduce"); - REDUCE(context, act); + { // macro REDUCE + switch (reduce(context, act)) { + case 0: /* normal */ + break; + case 1: /* yyerror */ + branch = USER_YYERROR; + continue BRANCH; + case 2: /* yyaccept */ + D_puts("u accept"); + branch = ACCEPT; + continue BRANCH; + default: + break; + } + } } else if (act == -(this.reduce_n)) { branch = ERROR; continue BRANCH; @@ -383,6 +393,7 @@ else if (act == this.shift_n) { throw runtime.newRaiseException(RaccBug, "[Cparse Bug] unknown act value " + act); } + // fall through case ERROR_RECOVERED: if (this.debug) { @@ -405,6 +416,7 @@ else if (act == this.shift_n) { call_onerror.call(context, this.parser, this.parser, this.t, val, this.vstack); } + // fall through case USER_YYERROR: if (this.errstatus == 3) { if (this.t == vFINAL_TOKEN) { @@ -480,7 +492,21 @@ else if (act == this.shift_n) { } else if (act < 0 && act > -(this.reduce_n)) { D_puts("e reduce"); - REDUCE(context, act); + { // macro REDUCE + switch (reduce(context, act)) { + case 0: /* normal */ + break; + case 1: /* yyerror */ + branch = USER_YYERROR; + continue BRANCH; + case 2: /* yyaccept */ + D_puts("u accept"); + branch = ACCEPT; + continue BRANCH; + default: + break; + } + } } else if (act == this.shift_n) { D_puts("e accept"); From b1edcd817f81bfef5d8c287d5ba74638eee1dd35 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Sun, 18 Nov 2018 23:31:51 -0600 Subject: [PATCH 574/619] Add JRuby as allowed failure while working on fixes. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ecc322de..f68bdc2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,12 @@ rvm: - 2.2.8 - 2.3.5 - 2.4.2 + - jruby - ruby-head matrix: allow_failures: - rvm: ruby-head + - rvm: jruby before_install: gem update --remote bundler install: - bundle install --retry 3 From 72c6345715a0cf734030b56783e19fd39353711f Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Sun, 18 Nov 2018 23:54:29 -0600 Subject: [PATCH 575/619] Run frozen string tests on JRuby. --- test/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run_tests.sh b/test/run_tests.sh index b071f446..1b10aacf 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -2,7 +2,7 @@ set -eux -test_frozen_strings=$(ruby -e 'puts (RUBY_ENGINE == "ruby" && RUBY_VERSION > "2.4")') +test_frozen_strings=$(ruby -e 'puts ((RUBY_ENGINE == "ruby" || RUBY_ENGINE == "jruby") && RUBY_VERSION > "2.4")') if [[ $test_frozen_strings == "true" ]] ; then echo "NOTE: enabling frozen string literals" From dfe2b3d179042f2b425eb0bd8e32e2dff9408e5c Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 19 Nov 2018 00:14:44 -0600 Subject: [PATCH 576/619] Force grammar_file_scanner.rb to generate. Workaround for #96. --- test/run_tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/run_tests.sh b/test/run_tests.sh index 1b10aacf..3d8802f4 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -10,5 +10,8 @@ if [[ $test_frozen_strings == "true" ]] ; then export RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" fi +# Workaround for JRuby builds seeming to not generate this ragel machine +bundle exec rake lib/racc/grammar_file_scanner.rb + bundle exec rake test bundle exec rake test_pure From f239d79f1baf6f596620cef05516525b9b3b90f7 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 19 Nov 2018 00:42:33 -0600 Subject: [PATCH 577/619] Attempt to clear _JAVA_OPTIONS for JRuby. --- test/run_tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/run_tests.sh b/test/run_tests.sh index 3d8802f4..efbb16ac 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -13,5 +13,8 @@ fi # Workaround for JRuby builds seeming to not generate this ragel machine bundle exec rake lib/racc/grammar_file_scanner.rb +# Unset this variable because it adds a warning to JVM startup +unset _JAVA_OPTIONS + bundle exec rake test bundle exec rake test_pure From 429381a6c562ca8a3602ba0b480eb3e250ba5d5f Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 19 Nov 2018 01:07:06 -0600 Subject: [PATCH 578/619] Speed up subprocess tests on JRuby. --- test/run_tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/run_tests.sh b/test/run_tests.sh index efbb16ac..db744e70 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -16,5 +16,8 @@ bundle exec rake lib/racc/grammar_file_scanner.rb # Unset this variable because it adds a warning to JVM startup unset _JAVA_OPTIONS +# Speed up JRuby startup for subprocess tests +export JRUBY_OPTS=--dev + bundle exec rake test bundle exec rake test_pure From abdec558f2128435ab46f14e6b0d1e39601d5b21 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 19 Nov 2018 01:42:17 -0600 Subject: [PATCH 579/619] Disable RubyGems when running tests on JRuby. --- test/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run_tests.sh b/test/run_tests.sh index db744e70..aa67e4a1 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -17,7 +17,7 @@ bundle exec rake lib/racc/grammar_file_scanner.rb unset _JAVA_OPTIONS # Speed up JRuby startup for subprocess tests -export JRUBY_OPTS=--dev +export JRUBY_OPTS='--disable-gems --dev' bundle exec rake test bundle exec rake test_pure From 25ac3fead67fd6ce4a580a7e2cd55e19d463139d Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Mon, 19 Nov 2018 01:50:02 -0600 Subject: [PATCH 580/619] Cache JRuby and freeze to specific version. --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f68bdc2f..1c9af7fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,20 @@ --- sudo: false -cache: bundler +cache: + - bundler + - directories: + - /home/travis/.rvm/ language: ruby rvm: - 2.2.8 - 2.3.5 - 2.4.2 - - jruby + - jruby-9.2.4.0 - ruby-head matrix: allow_failures: - rvm: ruby-head - - rvm: jruby + - rvm: jruby-9.2.4.0 before_install: gem update --remote bundler install: - bundle install --retry 3 From 39a7bba273fae427e281d78aa9adad91b353c4f3 Mon Sep 17 00:00:00 2001 From: Masataka Pocke Kuwabara Date: Mon, 18 Feb 2019 10:55:12 +0900 Subject: [PATCH 581/619] Fix compiling native extension on trunk Fix #100 Compiling racc has been failing since ruby/ruby@3d1c86a. --- ext/racc/depend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/racc/depend b/ext/racc/depend index 7b06a880..720b414c 100644 --- a/ext/racc/depend +++ b/ext/racc/depend @@ -1 +1 @@ -cparse.o: cparse.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h +cparse.o: cparse.c $(hdrdir)/ruby/ruby.h $(topdir)/config.h $(hdrdir)/ruby/defines.h From 1270387d476bfca19118e221696a89ee295e44b8 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Sun, 14 Apr 2019 19:49:48 -0700 Subject: [PATCH 582/619] Reformat the rdoc so it renders correctly both locally and on github. The current formatting (esp code blocks) looks bad on github and just stops before the first code block locally. --- rdoc/en/grammar.en.rdoc | 245 ++++++++++++++++++---------------------- 1 file changed, 113 insertions(+), 132 deletions(-) diff --git a/rdoc/en/grammar.en.rdoc b/rdoc/en/grammar.en.rdoc index 54fec761..34377493 100644 --- a/rdoc/en/grammar.en.rdoc +++ b/rdoc/en/grammar.en.rdoc @@ -19,17 +19,17 @@ There are two possible comment styles, == Class Block The class block is formed like this: --- -class CLASS_NAME - [precedence table] - [token declarations] - [expected number of S/R conflict] - [options] - [semantic value conversion] - [start rule] -rule - GRAMMARS --- + + class CLASS_NAME + [precedence table] + [token declarations] + [expected number of S/R conflict] + [options] + [semantic value conversion] + [start rule] + rule + GRAMMARS + CLASS_NAME is the name of the parser class to be defined. This is used as the name of the parser class in the generated file which is written in Ruby. @@ -37,14 +37,13 @@ which is written in Ruby. If CLASS_NAME includes '::', Racc outputs a module clause. For example, when CLASS_NAME is "M::C", the parser class is defined as follows in the generated file: --- -module M - class C - : - : + + module M + class C + : + : + end end -end --- == Grammar Block @@ -52,20 +51,18 @@ The grammar block is where you write the grammar rules understood by the generated parser. It is written between the reserved words 'rule' and 'end' and its syntax is as follows: --- -(token): (token) (token) (token).... (action) -(token): (token) (token) (token).... (action) - | (token) (token) (token).... (action) - | (token) (token) (token).... (action) --- + (token): (token) (token) (token).... (action) + + (token): (token) (token) (token).... (action) + | (token) (token) (token).... (action) + | (token) (token) (token).... (action) (action) is executed when its (token)s are found. (action) is basically a Ruby code block which is surrounded by braces: --- -{ print val[0] - puts val[1] } --- + + { print val[0] + puts val[1] } The return value of an action is the left-hand side (lhs) value of the rule. This is $$ in yacc. @@ -85,20 +82,19 @@ In any case, you can omit actions. When an action is omitted, the left-hand side value is always val[0]. Here is an example of whole grammar block. --- -rule - goal: definition ruls source { result = val } - definition: /* none */ { result = [] } - | definition startdesig { result[0] = val[1] } - | definition - precrule # this line continue from upper line - { - result[1] = val[1] - } + rule + goal: definition ruls source { result = val } - startdesig: START TOKEN --- + definition: /* none */ { result = [] } + | definition startdesig { result[0] = val[1] } + | definition + precrule # this line continue from upper line + { + result[1] = val[1] + } + + startdesig: START TOKEN You can use the following special local variables inside actions. The symbols shown in parentheses are how they are represented when using @@ -122,28 +118,25 @@ There is also a special form of action which is called an embedded action. An embedded action can be written wherever you like in the middle of the token sequence. Here is an example of the embedded action: ---- -target: A B { puts 'test test' } C D { normal action } ---- + + target: A B { puts 'test test' } C D { normal action } When a rule is written like this, the action written between B and C is executed immediately after both A and B are found. An embedded action itself has a value, as you can see in the following example: --- -target: A { result = 1 } B { p val[1] } --- + + target: A { result = 1 } B { p val[1] } + When the last action block { p val[1] } is executed, it shows 1 that is the value of the embedded action and not the value of B. In effect, writing an embedded action is the same as adding a nonterminal symbol whose rule is empty. The above example and the following code are equivalent. --- -target : A nonterm B { p val[1] } -nonterm : /* empty rule */ { result = 1 } --- + target : A nonterm B { p val[1] } + nonterm : /* empty rule */ { result = 1 } == Operator Precedence @@ -161,23 +154,22 @@ When shift/reduce conflicts occur, Racc first investigates whether or not the precedence is set on the rule. The precedence of a rule is equal to the precedence of the last terminal symbol of the rule. For instance, --- -target: TERM_A nonterm_a TERM_B nonterm_b --- + + target: TERM_A nonterm_a TERM_B nonterm_b + the precedence of this rule is the precedence of TERM_B. If no precedence is set on TERM_B, Racc would be unable to solve the conflict by precedence and report "Shift/Reduce conflict". Here we can see how to designate operator precedence: --- -prechigh - nonassoc '++' - left '*' '/' - left '+' '-' - right '=' -preclow --- + + prechigh + nonassoc '++' + left '*' '/' + left '+' '-' + right '=' + preclow The token written in the line closer to prechigh has the higher precedence. You can also write this in reverse order, such as defining preclow before @@ -188,21 +180,19 @@ When a conflict occurs between operators whose precedence is equal, their associativity is used to decide whether to shift or reduce. For instance, think of the following case: --- -a - b - c --- + + a - b - c When the "-" operator is left-associative this is interpreted as follows: --- -(a - b) - c --- + + (a - b) - c + For instance, arithmetic operators are usually left-associative. On the other hand, if the "-" operator is right-associative it is interpreted as follows: --- -a - (b - c) --- + + a - (b - c) When an operator is not allowed to be written in succession like this in the first place, it is nonassoc. For instance, the "++" operator in the C language @@ -218,35 +208,32 @@ be higher than the precedence of minus for subtraction. In such case, you can use %prec in yacc and you can do the same thing by using '=' + (symbol) with racc. --- -prechigh - nonassoc UMINUS - left '*' '/' - left '+' '-' -preclow - -rule - exp: exp '*' exp - | exp '-' exp - | '-' exp =UMINUS # changing the precedence of - only here - : - : --- + + prechigh + nonassoc UMINUS + left '*' '/' + left '+' '-' + preclow + + rule + exp: exp '*' exp + | exp '-' exp + | '-' exp =UMINUS # changing the precedence of - only here + : + : In the above example, the precedence of the '-' exp rule is equal to the precedence of UMINUS and higher than the precedence of '*', as we intended. - == Declaring Tokens By explicitly declaring tokens, you can avoid many meaningless bugs, especially typos. If a declared token does not exist or an existing token is not declared, Racc outputs warnings. Such as: --- -token TOKEN_NAME AND_IS_THIS - ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST --- + + token TOKEN_NAME AND_IS_THIS + ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST This feature is similar to %token in yacc but slightly different. With racc, this is not required and even if the tokens are declared, it does not @@ -259,14 +246,12 @@ words when they are written at the beginning of the line. Therefore, for instance, prechigh can also be used as a symbol. However, for an abyssal reason, no matter what we do, we cannot use 'end' as a symbol. - == Options There are some options you can write in your racc grammar file. The syntax is: --- -options OPTION OPTION ... --- + + options OPTION OPTION ... The currently available options are: @@ -277,7 +262,6 @@ available in each action block. As also described in the Grammar Block section, when this is `no_result_var`, the value of the last statement in each action block is used as the lhs value. - == expect Racc has bison's "expect" directive. @@ -286,18 +270,17 @@ A practical parser usually contains non-harmful shift/reduce conflicts. It's acceptable for the author of the grammar because they already know about it. However, if Racc reports "conflicts" after a user processed the grammar file, they might be anxious. + In that case, you can declare the expected number of the conflicts to suppress the warning message. --- -# Example + # Example -class MyParser -rule - expect 3 - : - : --- + class MyParser + rule + expect 3 + : + : When you declared the expected number of shift/reduce conflicts as 3 like the above code, the number of conflicts should exactly be 3. @@ -305,26 +288,24 @@ If it was not 3 (even it was zero), racc would print the warning message. Besides, you cannot suppress warning messages for reduce/reduce conflicts. - == Converting Token Symbols Token symbols abide by the following rules: * naked token string in racc file (TOK, XFILE, this_is_token, ...) - --> symbol (:TOK, :XFILE, :this_is_token, ...) + --> symbol (:TOK, :XFILE, :this_is_token, ...) * quoted string (':', '.', '(', ...) - --> same string (':', '.', '(', ...) + --> same string (':', '.', '(', ...) This can be inconvenient when you already have a scanner returning values in a different form. In that case, you can change this using a "convert" block. Here is an example: --- -convert - PLUS 'PlusClass' # We use PlusClass for symbol of `PLUS' - MIN 'MinusClass' # We use MinusClass for symbol of `MIN' -end --- + + convert + PLUS 'PlusClass' # We use PlusClass for symbol of `PLUS' + MIN 'MinusClass' # We use MinusClass for symbol of `MIN' + end By default, the value of the token symbol PLUS is :PLUS. However, when interpreting the above definition it becomes PlusClass. @@ -334,22 +315,20 @@ except 'false' and 'nil'. If you want to use a String as a token symbol, special care is required. For example: --- -convert - class '"cls"' # in code, "cls" - PLUS '"plus\n"' # in code, "plus\n" - MIN "\"minus#{val}\"" # in code, \"minus#{val}\" -end --- + + convert + class '"cls"' # in code, "cls" + PLUS '"plus\n"' # in code, "plus\n" + MIN "\"minus#{val}\"" # in code, \"minus#{val}\" + end == Start Rule In order to create a parser, you need to tell Racc the first rule to start. The start rule is a way to write it explicitly. --- -start real_target --- + start real_target + This is usually omitted and in that case, the start rule is the first rule in the file. @@ -359,6 +338,7 @@ In yacc, this is '%start'. A "User Code Block" is a block of Ruby source code which is copied to the output file. + There can be up to three user code blocks: "header", "inner" and "footer". The code written in the "header" block is copied to just before the parser class @@ -366,17 +346,18 @@ definition. "inner" is for inside (and the beginning of) the class definition, and "footer" is after the definition. Format of user code is like this: --- ----- header - ruby statement - ruby statement - ruby statement - ----- inner - ruby statement - : - : --- + + ---- header + ruby statement + ruby statement + ruby statement + + ---- inner + ruby statement + : + : + If there are four '-' at line head, Racc treats this case as the beginning of a user code block. + The name of a user code block must be one word. From a10c03d28e6020d328bf2a1dde3f260412860073 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 8 May 2019 20:44:42 +0900 Subject: [PATCH 583/619] Switch to Ruby license from LGPL2. --- COPYING | 537 ++--------------------------- README.ja.rdoc | 7 +- README.rdoc | 8 +- bin/racc | 5 +- lib/racc/exception.rb | 5 +- lib/racc/grammar.rb | 5 +- lib/racc/grammar_file_parser.rb | 5 +- lib/racc/info.rb | 5 +- lib/racc/parser.rb | 2 +- lib/racc/parser_file_generator.rb | 5 +- lib/racc/source.rb | 5 +- lib/racc/state.rb | 5 +- lib/racc/state_transition_table.rb | 5 +- 13 files changed, 48 insertions(+), 551 deletions(-) diff --git a/COPYING b/COPYING index c4792dd2..00e3e0db 100644 --- a/COPYING +++ b/COPYING @@ -1,515 +1,22 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. -^L - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. -^L - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. -^L - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. -^L - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. -^L - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. -^L - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. -^L - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS -^L - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should -have at least the "copyright" line and a pointer to where the full -notice is found. - - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper -mail. - -You should also get your employer (if you work as a programmer) or -your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James -Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - +Copyright (C) 2019 Yukihiro Matsumoto. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff --git a/README.ja.rdoc b/README.ja.rdoc index ba1c1bf8..33aebb40 100644 --- a/README.ja.rdoc +++ b/README.ja.rdoc @@ -76,10 +76,9 @@ == ライセンス このパッケージに付属するファイルの著作権は青木峰郎が保持します。 - ライセンスは GNU Lesser General Public License (LGPL) version 2 - です。ただしユーザが書いた規則ファイルや、Racc がそこから生成し - た Ruby スクリプトはその対象外です。好きなライセンスで配布して - ください。 + ライセンスは Ruby ライセンスです。ただしユーザが書いた規則 + ファイルや、Racc がそこから生成した Ruby スクリプトはその対象 + 外です。好きなライセンスで配布してください。 == バグなど diff --git a/README.rdoc b/README.rdoc index bf348f47..aeaf579c 100644 --- a/README.rdoc +++ b/README.rdoc @@ -43,10 +43,10 @@ == License - Racc is distributed under the terms of the GNU Lesser General - Public License version 2. Note that you do NOT need to follow - LGPL for your own parser (racc outputs). You can distribute those - files under any licenses you want. + Racc is distributed under the same terms of ruby. + (see the file COPYING). Note that you do NOT need to follow + ruby license for your own parser (racc outputs). + You can distribute those files under any licenses you want. == Bug Reports diff --git a/bin/racc b/bin/racc index af8cf568..beefa394 100755 --- a/bin/racc +++ b/bin/racc @@ -3,9 +3,8 @@ # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of LGPL, see the file "COPYING". +# You can distribute/modify this program under the same terms of ruby. +# see the file "COPYING". require 'racc' require 'racc/parser' diff --git a/lib/racc/exception.rb b/lib/racc/exception.rb index e87c9145..d6ef6fd5 100644 --- a/lib/racc/exception.rb +++ b/lib/racc/exception.rb @@ -1,9 +1,8 @@ # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of the GNU LGPL, see the file "COPYING". +# You can distribute/modify this program under the same terms of ruby. +# see the file "COPYING". module Racc class CompileError < StandardError; end diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index 0ee50fb8..f1f16287 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -1,9 +1,8 @@ # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of the GNU LGPL, see the file "COPYING". +# You can distribute/modify this program under the same terms of ruby. +# see the file "COPYING". require 'racc/source' require 'racc/exception' diff --git a/lib/racc/grammar_file_parser.rb b/lib/racc/grammar_file_parser.rb index 3cfaf7d7..b0075d69 100644 --- a/lib/racc/grammar_file_parser.rb +++ b/lib/racc/grammar_file_parser.rb @@ -1,9 +1,8 @@ # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of the GNU LGPL, see the file "COPYING". +# You can distribute/modify this program under the same terms of ruby. +# see the file "COPYING". require 'racc' require 'racc/grammar' diff --git a/lib/racc/info.rb b/lib/racc/info.rb index 8d1a991c..8fe4d32f 100644 --- a/lib/racc/info.rb +++ b/lib/racc/info.rb @@ -1,9 +1,8 @@ # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of the GNU LGPL, see the file "COPYING". +# You can distribute/modify this program under the same terms of ruby. +# see the file "COPYING". module Racc VERSION = "2.0.0.dev" diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index f4146a3c..a5c3ba00 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -147,7 +147,7 @@ # This command creates a parser with the Racc runtime embedded right in the # parser source file, so it can run even if racc/parser.rb is not present. # -# Note: parser.rb is LGPL, but your parser is not. +# Note: parser.rb is ruby license, but your parser is not. # Your own parser is completely yours. module Racc Racc_No_Extensions = ENV['PURERUBY'] # :nodoc: diff --git a/lib/racc/parser_file_generator.rb b/lib/racc/parser_file_generator.rb index 094426cb..1d7d7dd6 100644 --- a/lib/racc/parser_file_generator.rb +++ b/lib/racc/parser_file_generator.rb @@ -1,9 +1,8 @@ # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of the GNU LGPL, see the file "COPYING". +# You can distribute/modify this program under the same terms of ruby. +# see the file "COPYING". require 'racc/source' require 'rbconfig' diff --git a/lib/racc/source.rb b/lib/racc/source.rb index 8d4decc8..09163845 100644 --- a/lib/racc/source.rb +++ b/lib/racc/source.rb @@ -1,9 +1,8 @@ # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of LGPL, see the file "COPYING". +# You can distribute/modify this program under the same terms of ruby. +# see the file "COPYING". module Racc module Source diff --git a/lib/racc/state.rb b/lib/racc/state.rb index d263bb5d..599f6fd7 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -1,9 +1,8 @@ # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of the GNU LGPL, see the file "COPYING". +# You can distribute/modify this program under the same terms of ruby. +# see the file "COPYING". require 'racc/state_transition_table' require 'racc/exception' diff --git a/lib/racc/state_transition_table.rb b/lib/racc/state_transition_table.rb index da2de1be..143c4102 100644 --- a/lib/racc/state_transition_table.rb +++ b/lib/racc/state_transition_table.rb @@ -1,9 +1,8 @@ # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# For details of LGPL, see the file "COPYING". +# You can distribute/modify this program under the same terms of ruby. +# see the file "COPYING". require 'racc/parser' From 2b47c3907c70353c6023ad3e145fa36bb04d95e5 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 8 May 2019 22:07:36 +0900 Subject: [PATCH 584/619] Removed the files that are GPL license. --- Manifest.txt | 6 - test/assets/bibtex.y | 141 ---- test/assets/rdblockparser.y | 576 ---------------- test/assets/rdinlineparser.y | 561 --------------- test/regress/bibtex.rb | 462 ------------- test/regress/rdblockparser.rb | 1035 ---------------------------- test/regress/rdinlineparser.rb | 1165 -------------------------------- test/test_racc_command.rb | 19 - 8 files changed, 3965 deletions(-) delete mode 100644 test/assets/bibtex.y delete mode 100644 test/assets/rdblockparser.y delete mode 100644 test/assets/rdinlineparser.y delete mode 100644 test/regress/bibtex.rb delete mode 100644 test/regress/rdblockparser.rb delete mode 100644 test/regress/rdinlineparser.rb diff --git a/Manifest.txt b/Manifest.txt index f31f5dac..9a55836b 100644 --- a/Manifest.txt +++ b/Manifest.txt @@ -57,7 +57,6 @@ test/assets/badrule3.y test/assets/badrule4.y test/assets/badsyntax.y test/assets/bench.y -test/assets/bibtex.y test/assets/cadenza.y test/assets/calc-ja.y test/assets/cast.y @@ -101,8 +100,6 @@ test/assets/opal.y test/assets/opt.y test/assets/percent.y test/assets/php_serialization.y -test/assets/rdblockparser.y -test/assets/rdinlineparser.y test/assets/recv.y test/assets/riml.y test/assets/rrconf.y @@ -130,7 +127,6 @@ test/regress/badrule2.out test/regress/badrule3.out test/regress/badrule4.out test/regress/badsyntax.out -test/regress/bibtex.rb test/regress/cadenza.rb test/regress/cast.rb test/regress/csspool.html @@ -157,8 +153,6 @@ test/regress/normal.out test/regress/opal.out test/regress/opal.rb test/regress/php_serialization.rb -test/regress/rdblockparser.rb -test/regress/rdinlineparser.rb test/regress/riml.rb test/regress/ruby18.rb test/regress/ruby22.rb diff --git a/test/assets/bibtex.y b/test/assets/bibtex.y deleted file mode 100644 index e4bab0a2..00000000 --- a/test/assets/bibtex.y +++ /dev/null @@ -1,141 +0,0 @@ -#-- -# BibTeX-Ruby -# Copyright (C) 2010-2011 Sylvester Keil -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -#++ -# -# A BibTeX grammar for the parser generator +racc+ -# - -# -*- racc -*- - -class BibTeX::Parser - -token AT COMMA COMMENT CONTENT ERROR EQ LBRACE META_CONTENT KEY - NAME NUMBER PREAMBLE RBRACE SHARP STRING STRING_LITERAL - -expect 0 - -rule - - bibliography : /* empty */ { result = BibTeX::Bibliography.new(@options) } - | objects { result = val[0] } - - objects : object { result = BibTeX::Bibliography.new(@options) << val[0] } - | objects object { result << val[1] } - - object : AT at_object { result = val[1] } - | META_CONTENT { result = BibTeX::MetaContent.new(val[0]) } - | ERROR { result = BibTeX::Error.new(val[0]) } - - at_object : comment { result = val[0] } - | string { result = val[0] } - | preamble { result = val[0] } - | entry { result = val[0] } - - comment : COMMENT LBRACE content RBRACE { result = BibTeX::Comment.new(val[2]) } - - content : /* empty */ { result = '' } - | CONTENT { result = val[0] } - - preamble : PREAMBLE LBRACE string_value RBRACE { result = BibTeX::Preamble.new(val[2]) } - - string : STRING LBRACE string_assignment RBRACE { result = BibTeX::String.new(val[2][0],val[2][1]); } - - string_assignment : NAME EQ string_value { result = [val[0].downcase.to_sym, val[2]] } - - string_value : string_literal { result = [val[0]] } - | string_value SHARP string_literal { result << val[2] } - - string_literal : NAME { result = val[0].downcase.to_sym } - | LBRACE content RBRACE { result = val[1] } - | STRING_LITERAL { result = val[0] } - - entry : entry_head assignments RBRACE { result = val[0] << val[1] } - | entry_head assignments COMMA RBRACE { result = val[0] << val[1] } - | entry_head RBRACE { result = val[0] } - - entry_head : NAME LBRACE opt_key { result = BibTeX::Entry.new(:bibtex_type => val[0].downcase.to_sym, :bibtex_key => val[2]) } - - opt_key : { missing_key } - | KEY - - assignments : assignment { result = val[0] } - | assignments COMMA assignment { result.merge!(val[2]) } - - assignment : NAME EQ value { result = { val[0].downcase.to_sym => val[2] } } - - value : string_value { result = val[0] } - | NUMBER { result = val[0] } - -end - ----- header -require 'bibtex/lexer' - ----- inner - - attr_reader :lexer, :options - - @defaults = { - :include => [:errors], - :allow_missing_keys => false, - :debug => false - }.freeze - - class << self - attr_reader :defaults - end - - def initialize(options = {}) - @options = Parser.defaults.merge(options) - @lexer = Lexer.new(@options) - end - - def parse(input) - @yydebug = debug? - - lexer.analyse(input) - do_parse - #yyparse(@lexer,:each) - end - - def next_token - lexer.next_token - end - - def debug? - options[:debug] || ENV['DEBUG'] - end - - def allow_missing_keys? - options[:allow_missing_keys] - end - - def missing_key - unless allow_missing_keys? - raise ParseError, "Failed to parse BibTeX entry: cite-key missing" - end - end - - def on_error(tid, val, vstack) - message = - "Failed to parse BibTeX on value #{val.inspect} (#{token_to_str(tid) || '?'}) #{ vstack.inspect}" - - BibTeX.log.error message - raise ParseError, message - end - -# -*- racc -*- diff --git a/test/assets/rdblockparser.y b/test/assets/rdblockparser.y deleted file mode 100644 index 61992198..00000000 --- a/test/assets/rdblockparser.y +++ /dev/null @@ -1,576 +0,0 @@ -# Ruby is copyrighted free software by Yukihiro Matsumoto . -# You can redistribute it and/or modify it under either the terms of the GPL -# version 2 (see https://github.com/uwabami/rdtool/blob/master/COPYING.txt), -# or the conditions below: -# -# 1. You may make and give away verbatim copies of the source form of the -# software without restriction, provided that you duplicate all of the -# original copyright notices and associated disclaimers. -# -# 2. You may modify your copy of the software in any way, provided that -# you do at least ONE of the following: -# -# a) place your modifications in the Public Domain or otherwise -# make them Freely Available, such as by posting said -# modifications to Usenet or an equivalent medium, or by allowing -# the author to include your modifications in the software. -# -# b) use the modified software only within your corporation or -# organization. -# -# c) rename any non-standard executables so the names do not conflict -# with standard executables, which must also be provided. -# -# d) make other distribution arrangements with the author. -# -# 3. You may distribute the software in object code or executable -# form, provided that you do at least ONE of the following: -# -# a) distribute the executables and library files of the software, -# together with instructions (in the manual page or equivalent) -# on where to get the original distribution. -# -# b) accompany the distribution with the machine-readable source of -# the software. -# -# c) give non-standard executables non-standard names, with -# instructions on where to get the original software distribution. -# -# d) make other distribution arrangements with the author. -# -# 4. You may modify and include the part of the software into any other -# software (possibly commercial). But some files in the distribution -# are not written by the author, so that they are not under this terms. -# -# They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some -# files under the ./missing directory. See each file for the copying -# condition. -# -# 5. The scripts and library files supplied as input to or produced as -# output from the software do not automatically fall under the -# copyright of the software, but belong to whomever generated them, -# and may be sold commercially, and may be aggregated with this -# software. -# -# 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -class RDParser - - preclow - nonassoc DUMMY - left ITEMLISTLINE ENUMLISTLINE DESCLISTLINE METHODLISTLINE STRINGLINE - prechigh - - token STRINGLINE ITEMLISTLINE ENUMLISTLINE DESCLISTLINE METHODLISTLINE - WHITELINE SUBTREE HEADLINE INCLUDE INDENT DEDENT DUMMY - - rule - document : blocks { result = DocumentElement.new - add_children_to_element(result, *val[0]) - } - | { - raise ParseError, - "Error: file empty." - } - ; - blocks : blocks block { result.concat(val[1]) } - | block - ; - block : textblock { result = val } - | verbatim { result = val } - | lists - | headline { result = val } - | include { result = val } - | WHITELINE { result = [] } - | SUBTREE { result = val[0].blocks } - ; - - headline : HEADLINE { # val[0] is like [level, title] - title = @inline_parser.parse(val[0][1]) - result = Headline.new(val[0][0]) - add_children_to_element(result, *title) - } - ; - include : INCLUDE { result = Include.new(val[0]) } - ; - - textblock : textblockcontent = DUMMY - { # val[0] is Array of String - content = cut_off(val[0]).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - } - ; - textblockcontent : textblockcontent STRINGLINE - { result.push(val[1]) } - | STRINGLINE { result = val } - ; - - verbatim : INDENT verbatimcontent DEDENT - { # val[1] is Array of String - content = cut_off(val[1]) - result = Verbatim.new(content) - # imform to lexer. - @in_verbatim = false } - ; - verbatim_after_lists : verbatimcontent - { # val[0] is Array of String - content = cut_off(val[0]) - result = Verbatim.new(content) - # imform to lexer. - @in_verbatim = false } - ; - verbatimcontent : verbatimcontent STRINGLINE - { result.push(val[1]) } - | verbatimcontent INDENT verbatimcontent DEDENT - { result.concat(val[2]) } - | verbatimcontent WHITELINE - { result.push("\n") } - | STRINGLINE { result = val - # imform to lexer. - @in_verbatim = true } - ; - - list : itemlist - | enumlist - | desclist - | methodlist - ; - lists : lists2 = DUMMY - | INDENT lists2 DEDENT { result = val[1] } - | INDENT lists2 verbatim_after_lists DEDENT - { result = val[1].push(val[2]) } - ; - - lists2 : lists2 list { result.push(val[1]) } - | list { result = val } - ; - - itemlist : itemlistitems = DUMMY { - result = ItemList.new - add_children_to_element(result, *val[0]) - } - ; - itemlistitems : itemlistitems itemlistitem - { result.push(val[1]) } - | itemlistitem { result = val } - ; - itemlistitem : first_textblock_in_itemlist other_blocks_in_list DEDENT - { - result = ItemListItem.new - add_children_to_element(result, val[0], *val[1]) - } - ; - - enumlist : enumlistitems = DUMMY { - result = EnumList.new - add_children_to_element(result, *val[0]) - } - ; - enumlistitems : enumlistitems enumlistitem - { result.push(val[1]) } - | enumlistitem { result = val } - ; - enumlistitem : first_textblock_in_enumlist other_blocks_in_list DEDENT - { - result = EnumListItem.new - add_children_to_element(result, val[0], *val[1]) - } - ; - - desclist : desclistitems = DUMMY { - result = DescList.new - add_children_to_element(result, *val[0]) - } - ; - desclistitems : desclistitems desclistitem { - result.push(val[1]) } - | desclistitem { result = val } - ; - desclistitem : DESCLISTLINE description_part DEDENT - { - term = DescListItem::Term.new - term_contents = @inline_parser.parse(val[0].strip) - add_children_to_element(term, *term_contents) - - result = DescListItem.new - set_term_to_element(result, term) - add_children_to_element(result, *val[1]) - } - ; - - methodlist : methodlistitems = DUMMY { - result = MethodList.new - add_children_to_element(result, *val[0]) - } - ; - methodlistitems : methodlistitems methodlistitem - { result.push(val[1]) } - | methodlistitem { result = val } - ; - methodlistitem : METHODLISTLINE description_part DEDENT - { - term = MethodListItem::Term.new(val[0].strip) - result = MethodListItem.new - set_term_to_element(result, term) - add_children_to_element(result, *val[1]) - } - ; - - description_part : whitelines textblock blocks_in_list - { result = [val[1]].concat(val[2]) } - | whitelines textblock { result = [val[1]] } - | whitelines INDENT blocks_in_list DEDENT - { result = val[2] } - | whitelines { result = [] } - ; - - blocks_in_list : blocks_in_list block_in_list { result.concat(val[1]) } - | block_in_list - ; - block_in_list : textblock { result = val } - | verbatim { result = val } - | lists - | WHITELINE { result = [] } - ; - whitelines : whitelines2 - | - ; - whitelines2 : WHITELINE whitelines2 - | WHITELINE - ; - - first_textblock_in_itemlist : ITEMLISTLINE textblockcontent - - { content = cut_off([val[0]].concat(val[1])).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - } - | ITEMLISTLINE - - { content = cut_off([val[0]]).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - } - ; - first_textblock_in_enumlist : ENUMLISTLINE textblockcontent - - { content = cut_off([val[0]].concat(val[1])).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - } - | ENUMLISTLINE - - { content = cut_off([val[0]]).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - } - ; - other_blocks_in_list : verbatim blocks_in_list - { result = [val[0]].concat(val[1]) } - | lists blocks_in_list { result.concat(val[1]) } - | WHITELINE blocks_in_list { result = val[1] } - | verbatim { result = val } - | lists - | WHITELINE { result = [] } - | { result = [] } - ; -end - ----- inner -include ParserUtility - -TMPFILE = ["rdtmp", $$, 0] - -attr_reader :tree - -def initialize - @inline_parser = RDInlineParser.new(self) -end - -def parse(src, tree) - @src = src - @src.push(false) - # RDtree - @tree = tree - - # @i: index(line no.) of src - @i = 0 - # stack for current indentation - @indent_stack = [] - # how indented. - @current_indent = @indent_stack.join("") - # RDParser for tmp src - @subparser = nil - # which part is in now - @in_part = nil - @part_content = [] - - @in_verbatim = false - - @yydebug = true - do_parse -end - -def next_token - # preprocessing - # if it is not in RD part - # => method - while @in_part != "rd" - line = @src[@i] - @i += 1 # next line - - case line - # src end - when false - return [false, false] - # RD part begin - when /^=begin\s*(?:\bRD\b.*)?\s*$/ - if @in_part # if in non-RD part - @part_content.push(line) - else - @in_part = "rd" - return [:WHITELINE, "=begin\n"] # <= for textblockand - end - # non-RD part begin - when /^=begin\s+(\w+)/ - part = $1 - if @in_part # if in non-RD part - @part_content.push(line) - else - @in_part = part if @tree.filter[part] # if filter exists -# p "BEGIN_PART: #{@in_part}" # DEBUG - end - # non-RD part end - when /^=end/ - if @in_part # if in non-RD part -# p "END_PART: #{@in_part}" # DEBUG - # make Part-in object - part = RD::Part.new(@part_content.join(""), @tree, "r") - @part_content.clear - # call filter, part_out is output(Part object) - part_out = @tree.filter[@in_part].call(part) - - if @tree.filter[@in_part].mode == :rd # if output is RD formated - subtree = parse_subtree( (RUBY_VERSION >= '1.9.0' ? part_out.lines.to_a : part_out.to_a ) ) - else # if output is target formated - basename = TMPFILE.join('.') - TMPFILE[-1] += 1 - tmpfile = open(@tree.tmp_dir + "/" + basename + ".#{@in_part}", "w") - tmpfile.print(part_out) - tmpfile.close - subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"]) - end - @in_part = nil - return [:SUBTREE, subtree] - end - else - if @in_part # if in non-RD part - @part_content.push(line) - end - end - end - - @current_indent = @indent_stack.join("") - line = @src[@i] - case line - when false - if_current_indent_equal("") do - [false, false] - end - when /^=end/ - if_current_indent_equal("") do - @in_part = nil - [:WHITELINE, "=end"] # MUST CHANGE?? - end - when /^\s*$/ - @i += 1 # next line - return [:WHITELINE, ':WHITELINE'] - when /^\#/ # comment line - @i += 1 # next line - self.next_token() - when /^(={1,4})(?!=)\s*(?=\S)/, /^(\+{1,2})(?!\+)\s*(?=\S)/ - rest = $' # ' - rest.strip! - mark = $1 - if_current_indent_equal("") do - return [:HEADLINE, [Headline.mark_to_level(mark), rest]] - end - when /^<<<\s*(\S+)/ - file = $1 - if_current_indent_equal("") do - suffix = file[-3 .. -1] - if suffix == ".rd" or suffix == ".rb" - subtree = parse_subtree(get_included(file)) - [:SUBTREE, subtree] - else - [:INCLUDE, file] - end - end - when /^(\s*)\*(\s*)/ - rest = $' # ' - newIndent = $2 - if_current_indent_equal($1) do - if @in_verbatim - [:STRINGLINE, line] - else - @indent_stack.push("\s" << newIndent) - [:ITEMLISTLINE, rest] - end - end - when /^(\s*)(\(\d+\))(\s*)/ - rest = $' # ' - mark = $2 - newIndent = $3 - if_current_indent_equal($1) do - if @in_verbatim - [:STRINGLINE, line] - else - @indent_stack.push("\s" * mark.size << newIndent) - [:ENUMLISTLINE, rest] - end - end - when /^(\s*):(\s*)/ - rest = $' # ' - newIndent = $2 - if_current_indent_equal($1) do - if @in_verbatim - [:STRINGLINE, line] - else - @indent_stack.push("\s" << $2) - [:DESCLISTLINE, rest] - end - end - when /^(\s*)---(?!-|\s*$)/ - indent = $1 - rest = $' - /\s*/ === rest - term = $' - new_indent = $& - if_current_indent_equal(indent) do - if @in_verbatim - [:STRINGLINE, line] - else - @indent_stack.push("\s\s\s" + new_indent) - [:METHODLISTLINE, term] - end - end - when /^(\s*)/ - if_current_indent_equal($1) do - [:STRINGLINE, line] - end - else - raise "[BUG] parsing error may occured." - end -end - -=begin private - --- RDParser#if_current_indent_equal(indent) - if (({@current_indent == ((|indent|))})) then yield block, otherwise - process indentation. -=end -# always @current_indent = @indent_stack.join("") -def if_current_indent_equal(indent) - indent = indent.sub(/\t/, "\s" * 8) - if @current_indent == indent - @i += 1 # next line - yield - elsif indent.index(@current_indent) == 0 - @indent_stack.push(indent[@current_indent.size .. -1]) - [:INDENT, ":INDENT"] - else - @indent_stack.pop - [:DEDENT, ":DEDENT"] - end -end -private :if_current_indent_equal - -def cut_off(src) - ret = [] - whiteline_buf = [] - line = src.shift - /^\s*/ =~ line - indent = Regexp.quote($&) - ret.push($') # ' - while line = src.shift - if /^(\s*)$/ =~ line - whiteline_buf.push(line) - elsif /^#{indent}/ =~ line - unless whiteline_buf.empty? - ret.concat(whiteline_buf) - whiteline_buf.clear - end - ret.push($') # ' - else - raise "[BUG]: probably Parser Error while cutting off.\n" - end - end - ret -end -private :cut_off - -def set_term_to_element(parent, term) -# parent.set_term_under_document_struct(term, @tree.document_struct) - parent.set_term_without_document_struct(term) -end -private :set_term_to_element - -def on_error( et, ev, _values ) - line = @src[@i] - prv, cur, nxt = format_line_num(@i, @i+1, @i+2) - - raise ParseError, <|#{@src[@i].chomp} - #{nxt} |#{@src[@i+1].chomp} - -Msg -end - -def line_index - @i -end - -def parse_subtree(src) - @subparser = RD::RDParser.new() unless @subparser - - @subparser.parse(src, @tree) -end -private :parse_subtree - -def get_included(file) - included = "" - @tree.include_path.each do |dir| - file_name = dir + "/" + file - if test(?e, file_name) - included = IO.readlines(file_name) - break - end - end - included -end -private :get_included - -def format_line_num(*args) - width = args.collect{|i| i.to_s.length }.max - args.collect{|i| sprintf("%#{width}d", i) } -end -private :format_line_num - ----- header -require "rd/rdinlineparser.tab.rb" -require "rd/parser-util" - -module RD ----- footer -end # end of module RD diff --git a/test/assets/rdinlineparser.y b/test/assets/rdinlineparser.y deleted file mode 100644 index 336834a1..00000000 --- a/test/assets/rdinlineparser.y +++ /dev/null @@ -1,561 +0,0 @@ -# Ruby is copyrighted free software by Yukihiro Matsumoto . -# You can redistribute it and/or modify it under either the terms of the GPL -# version 2 (see https://github.com/uwabami/rdtool/blob/master/COPYING.txt), -# or the conditions below: -# -# 1. You may make and give away verbatim copies of the source form of the -# software without restriction, provided that you duplicate all of the -# original copyright notices and associated disclaimers. -# -# 2. You may modify your copy of the software in any way, provided that -# you do at least ONE of the following: -# -# a) place your modifications in the Public Domain or otherwise -# make them Freely Available, such as by posting said -# modifications to Usenet or an equivalent medium, or by allowing -# the author to include your modifications in the software. -# -# b) use the modified software only within your corporation or -# organization. -# -# c) rename any non-standard executables so the names do not conflict -# with standard executables, which must also be provided. -# -# d) make other distribution arrangements with the author. -# -# 3. You may distribute the software in object code or executable -# form, provided that you do at least ONE of the following: -# -# a) distribute the executables and library files of the software, -# together with instructions (in the manual page or equivalent) -# on where to get the original distribution. -# -# b) accompany the distribution with the machine-readable source of -# the software. -# -# c) give non-standard executables non-standard names, with -# instructions on where to get the original software distribution. -# -# d) make other distribution arrangements with the author. -# -# 4. You may modify and include the part of the software into any other -# software (possibly commercial). But some files in the distribution -# are not written by the author, so that they are not under this terms. -# -# They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some -# files under the ./missing directory. See each file for the copying -# condition. -# -# 5. The scripts and library files supplied as input to or produced as -# output from the software do not automatically fall under the -# copyright of the software, but belong to whomever generated them, -# and may be sold commercially, and may be aggregated with this -# software. -# -# 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE. - -class RDInlineParser - - preclow - nonassoc EX_LOW - left QUOTE BAR SLASH BACK_SLASH URL OTHER - REF_OPEN FOOTNOTE_OPEN FOOTNOTE_CLOSE - nonassoc EX_HIGH - prechigh - - token EM_OPEN EM_CLOSE - CODE_OPEN CODE_CLOSE - VAR_OPEN VAR_CLOSE - KBD_OPEN KBD_CLOSE - INDEX_OPEN INDEX_CLOSE - REF_OPEN REF_CLOSE - FOOTNOTE_OPEN FOOTNOTE_CLOSE - VERB_OPEN VERB_CLOSE - BAR QUOTE SLASH BACK_SLASH URL OTHER EX_LOW EX_HIGH - - rule - content : elements - ; - elements : elements element { result.push(val[1]) } - | element { result = val } - ; - element : emphasis - | code - | var - | keyboard - | index - | reference - | footnote - | verb - | normal_str_ele - ; - - emphasis : EM_OPEN content EM_CLOSE { - result = Emphasis.new - add_children_to_element(result, *val[1]) - } - ; - code : CODE_OPEN content CODE_CLOSE { - result = Code.new - add_children_to_element(result, *val[1]) - } - ; - var : VAR_OPEN content VAR_CLOSE { - result = Var.new - add_children_to_element(result, *val[1]) - } - ; - keyboard : KBD_OPEN content KBD_CLOSE { - result = Keyboard.new - add_children_to_element(result, *val[1]) - } - ; - index : INDEX_OPEN content INDEX_CLOSE { - result = Index.new - add_children_to_element(result, *val[1]) - } - ; - -# Refernce -# (()) - - reference : REF_OPEN substitute ref_label REF_CLOSE - { result = Reference.new(val[2]) - add_children_to_element(result, *val[1]) - } - | REF_OPEN ref_label2 REF_CLOSE - { - result = make_reference_from_label(val[1]) - } - ; - - ref_label : URL ref_url_strings { result = Reference::URL.new(val[1]) } - | filename element_label - { result = Reference::TemporaryLabel.new(val[1], - val[0]) } - | element_label - { result = Reference::TemporaryLabel.new(val[0]) } - | filename { result = Reference::TemporaryLabel.new([], val[0]) } - ; - ref_label2 : URL ref_url_strings { result = Reference::URL.new(val[1]) } - | filename element_label2 - { result = Reference::TemporaryLabel.new(val[1], - val[0]) } - | element_label2 - { result = Reference::TemporaryLabel.new(val[0]) } - | filename { result = Reference::TemporaryLabel.new([], - val[0]) } - ; - substitute : ref_subst_content BAR - | QUOTE ref_subst_content_q QUOTE BAR - { result = val[1] } - | QUOTE ref_subst_strings_q QUOTE BAR - { result = [StringElement.new(val[1])] } - ; - - filename : ref_subst_strings_first SLASH - | QUOTE ref_subst_strings_q QUOTE SLASH - { result = val[1] } - ; - - # when substitute part exists - element_label : ref_subst_strings_first - { result = [StringElement.new(val[0])] } - | QUOTE ref_subst_strings_q QUOTE - { result = [StringElement.new(val[1])] } - ; - # when substitute part doesn't exist - # in this case, element label can contain Inlines - element_label2 : ref_subst_content - | QUOTE ref_subst_content_q QUOTE - { result = val[1] } - | QUOTE ref_subst_strings_q QUOTE - { result = [StringElement.new(val[1])] } - ; - - ref_subst_content : ref_subst_ele2 ref_subst_eles - { result = val[1].unshift(val[0]) } - | ref_subst_str_ele_first ref_subst_eles - { result = val[1].unshift(val[0]) } - | ref_subst_str_ele_first - { result = val } - | ref_subst_ele2 { result = val } - ; - ref_subst_content_q : ref_subst_eles_q - ; - ref_subst_eles : ref_subst_eles ref_subst_ele - { result.push(val[1]) } - | ref_subst_ele { result = val } - ; - ref_subst_eles_q : ref_subst_eles_q ref_subst_ele_q - { result.push(val[1]) } - | ref_subst_ele_q { result = val } - ; - ref_subst_ele2 : emphasis - | code - | var - | keyboard - | index - | verb - ; - ref_subst_ele : ref_subst_ele2 - | ref_subst_str_ele - ; - ref_subst_ele_q : ref_subst_ele2 - | ref_subst_str_ele_q - ; - - ref_subst_str_ele : ref_subst_strings = EX_LOW - { result = StringElement.new(val[0]) } - ; - ref_subst_str_ele_first : ref_subst_strings_first - { result = StringElement.new(val[0]) } - ; - ref_subst_str_ele_q : ref_subst_strings_q = EX_LOW - { result = StringElement.new(val[0]) } - ; - - ref_subst_strings : ref_subst_strings ref_subst_string3 - { result << val[1] } - | ref_subst_string3 - ; - # if it is first element of substitute, it can't contain - # URL on head. - ref_subst_strings_first : ref_subst_string ref_subst_strings = EX_HIGH - { result << val[1] } - | ref_subst_string = EX_LOW - ; - ref_subst_strings_q : ref_subst_strings_q ref_subst_string_q - { result << val[1] } - | ref_subst_string_q - ; - - ref_subst_string : OTHER - | BACK_SLASH - | REF_OPEN - | FOOTNOTE_OPEN - | FOOTNOTE_CLOSE - ; - ref_subst_string2 : ref_subst_string - | URL - ; - ref_subst_string3 : ref_subst_string2 - | QUOTE - ; - ref_subst_string_q : ref_subst_string2 - | BAR - | SLASH - ; -# end subst - -# string in url - ref_url_strings : ref_url_strings ref_url_string { result << val[1] } - | ref_url_string - ; - - ref_url_string : OTHER - | BACK_SLASH BACK_SLASH - | URL - | SLASH - | BAR - | QUOTE - | EM_OPEN - | EM_CLOSE - | CODE_OPEN - | CODE_CLOSE - | VAR_OPEN - | VAR_CLOSE - | KBD_OPEN - | KBD_CLOSE - | INDEX_OPEN - | INDEX_CLOSE - | REF_OPEN - | FOOTNOTE_OPEN - | FOOTNOTE_CLOSE - | VERB_OPEN - | VERB_CLOSE - ; - -# end url -# end Reference - - footnote : FOOTNOTE_OPEN content FOOTNOTE_CLOSE { - result = Footnote.new - add_children_to_element(result, *val[1]) - } - ; - verb : VERB_OPEN verb_strings VERB_CLOSE { - result = Verb.new(val[1]) } - ; - - - # normal string - # OTHER, QUOTE, BAR, SLASH, BACK_SLASH, URL - normal_string : OTHER - | QUOTE - | BAR - | SLASH - | BACK_SLASH - | URL - ; - normal_strings : normal_strings normal_string - { result << val[1] } - - | normal_string - ; - normal_str_ele : normal_strings = EX_LOW - { result = StringElement.new(val[0]) } - ; - - # in verb - verb_string : verb_normal_string - | BACK_SLASH verb_normal_string { result = val[1] } - | BACK_SLASH VERB_CLOSE { result = val[1] } - | BACK_SLASH BACK_SLASH { result = val[1] } - ; - - verb_normal_string : OTHER - | QUOTE - | BAR - | SLASH - | EM_OPEN - | EM_CLOSE - | CODE_OPEN - | CODE_CLOSE - | VAR_OPEN - | VAR_CLOSE - | KBD_OPEN - | KBD_CLOSE - | INDEX_OPEN - | INDEX_CLOSE - | REF_OPEN - | REF_CLOSE - | FOOTNOTE_OPEN - | FOOTNOTE_CLOSE - | VERB_OPEN - | URL - ; - - verb_strings : verb_strings verb_string { result << val[1] } - | verb_string - ; -/* verb_str_ele : verb_strings - ; */ -end - ----- inner -include ParserUtility -extend Forwardable - -EM_OPEN = '((*' -EM_OPEN_RE = /\A#{Regexp.quote(EM_OPEN)}/ -EM_CLOSE = '*))' -EM_CLOSE_RE = /\A#{Regexp.quote(EM_CLOSE)}/ -CODE_OPEN = '(({' -CODE_OPEN_RE = /\A#{Regexp.quote(CODE_OPEN)}/ -CODE_CLOSE = '}))' -CODE_CLOSE_RE = /\A#{Regexp.quote(CODE_CLOSE)}/ -VAR_OPEN = '((|' -VAR_OPEN_RE = /\A#{Regexp.quote(VAR_OPEN)}/ -VAR_CLOSE = '|))' -VAR_CLOSE_RE = /\A#{Regexp.quote(VAR_CLOSE)}/ -KBD_OPEN = '((%' -KBD_OPEN_RE = /\A#{Regexp.quote(KBD_OPEN)}/ -KBD_CLOSE = '%))' -KBD_CLOSE_RE = /\A#{Regexp.quote(KBD_CLOSE)}/ -INDEX_OPEN = '((:' -INDEX_OPEN_RE = /\A#{Regexp.quote(INDEX_OPEN)}/ -INDEX_CLOSE = ':))' -INDEX_CLOSE_RE = /\A#{Regexp.quote(INDEX_CLOSE)}/ -REF_OPEN = '((<' -REF_OPEN_RE = /\A#{Regexp.quote(REF_OPEN)}/ -REF_CLOSE = '>))' -REF_CLOSE_RE = /\A#{Regexp.quote(REF_CLOSE)}/ -FOOTNOTE_OPEN = '((-' -FOOTNOTE_OPEN_RE = /\A#{Regexp.quote(FOOTNOTE_OPEN)}/ -FOOTNOTE_CLOSE = '-))' -FOOTNOTE_CLOSE_RE = /\A#{Regexp.quote(FOOTNOTE_CLOSE)}/ -VERB_OPEN = "(('" -VERB_OPEN_RE = /\A#{Regexp.quote(VERB_OPEN)}/ -VERB_CLOSE = "'))" -VERB_CLOSE_RE = /\A#{Regexp.quote(VERB_CLOSE)}/ - -BAR = "|" -BAR_RE = /\A#{Regexp.quote(BAR)}/ -QUOTE = '"' -QUOTE_RE = /\A#{Regexp.quote(QUOTE)}/ -SLASH = "/" -SLASH_RE = /\A#{Regexp.quote(SLASH)}/ -BACK_SLASH = "\\" -BACK_SLASH_RE = /\A#{Regexp.quote(BACK_SLASH)}/ -URL = "URL:" -URL_RE = /\A#{Regexp.quote(URL)}/ - -# Workaround for Regexp option change of Ruby 1.5.x -other_re_mode = Regexp::EXTENDED -if RUBY_VERSION > "1.5" - other_re_mode |= Regexp::MULTILINE -else - other_re_mode |= Regexp::POSIXLINE -end - -OTHER_RE = Regexp.new( - "\\A.+?(?=#{Regexp.quote(EM_OPEN)}|#{Regexp.quote(EM_CLOSE)}| - #{Regexp.quote(CODE_OPEN)}|#{Regexp.quote(CODE_CLOSE)}| - #{Regexp.quote(VAR_OPEN)}|#{Regexp.quote(VAR_CLOSE)}| - #{Regexp.quote(KBD_OPEN)}|#{Regexp.quote(KBD_CLOSE)}| - #{Regexp.quote(INDEX_OPEN)}|#{Regexp.quote(INDEX_CLOSE)}| - #{Regexp.quote(REF_OPEN)}|#{Regexp.quote(REF_CLOSE)}| - #{Regexp.quote(FOOTNOTE_OPEN)}|#{Regexp.quote(FOOTNOTE_CLOSE)}| - #{Regexp.quote(VERB_OPEN)}|#{Regexp.quote(VERB_CLOSE)}| - #{Regexp.quote(BAR)}| - #{Regexp.quote(QUOTE)}| - #{Regexp.quote(SLASH)}| - #{Regexp.quote(BACK_SLASH)}| - #{Regexp.quote(URL)})", other_re_mode) - -def initialize(bp) - @blockp = bp -end - -def_delegator(:@blockp, :tree) - -def parse(src) - @src = StringScanner.new(src) - @pre = "" - @yydebug = true - do_parse -end - -def next_token - return [false, false] if @src.eos? -# p @src.rest if @yydebug - if ret = @src.scan(EM_OPEN_RE) - @pre << ret - [:EM_OPEN, ret] - elsif ret = @src.scan(EM_CLOSE_RE) - @pre << ret - [:EM_CLOSE, ret] - elsif ret = @src.scan(CODE_OPEN_RE) - @pre << ret - [:CODE_OPEN, ret] - elsif ret = @src.scan(CODE_CLOSE_RE) - @pre << ret - [:CODE_CLOSE, ret] - elsif ret = @src.scan(VAR_OPEN_RE) - @pre << ret - [:VAR_OPEN, ret] - elsif ret = @src.scan(VAR_CLOSE_RE) - @pre << ret - [:VAR_CLOSE, ret] - elsif ret = @src.scan(KBD_OPEN_RE) - @pre << ret - [:KBD_OPEN, ret] - elsif ret = @src.scan(KBD_CLOSE_RE) - @pre << ret - [:KBD_CLOSE, ret] - elsif ret = @src.scan(INDEX_OPEN_RE) - @pre << ret - [:INDEX_OPEN, ret] - elsif ret = @src.scan(INDEX_CLOSE_RE) - @pre << ret - [:INDEX_CLOSE, ret] - elsif ret = @src.scan(REF_OPEN_RE) - @pre << ret - [:REF_OPEN, ret] - elsif ret = @src.scan(REF_CLOSE_RE) - @pre << ret - [:REF_CLOSE, ret] - elsif ret = @src.scan(FOOTNOTE_OPEN_RE) - @pre << ret - [:FOOTNOTE_OPEN, ret] - elsif ret = @src.scan(FOOTNOTE_CLOSE_RE) - @pre << ret - [:FOOTNOTE_CLOSE, ret] - elsif ret = @src.scan(VERB_OPEN_RE) - @pre << ret - [:VERB_OPEN, ret] - elsif ret = @src.scan(VERB_CLOSE_RE) - @pre << ret - [:VERB_CLOSE, ret] - elsif ret = @src.scan(BAR_RE) - @pre << ret - [:BAR, ret] - elsif ret = @src.scan(QUOTE_RE) - @pre << ret - [:QUOTE, ret] - elsif ret = @src.scan(SLASH_RE) - @pre << ret - [:SLASH, ret] - elsif ret = @src.scan(BACK_SLASH_RE) - @pre << ret - [:BACK_SLASH, ret] - elsif ret = @src.scan(URL_RE) - @pre << ret - [:URL, ret] - elsif ret = @src.scan(OTHER_RE) - @pre << ret - [:OTHER, ret] - else - ret = @src.rest - @pre << ret - @src.terminate - [:OTHER, ret] - end -end - -def make_reference_from_label(label) -# Reference.new_from_label_under_document_struct(label, tree.document_struct) - Reference.new_from_label_without_document_struct(label) -end - -def on_error(et, ev, values) - lines_of_rest = (RUBY_VERSION >= '1.9.0' ? @src.rest.lines.to_a.length : @src.rest.to_a.length ) - prev_words = prev_words_on_error(ev) - at = 4 + prev_words.length - message = <<-MSG -RD syntax error: line #{@blockp.line_index - lines_of_rest}: -...#{prev_words} #{(ev||'')} #{next_words_on_error()} ... - MSG - message << " " * at + "^" * (ev ? ev.length : 0) + "\n" - raise ParseError, message -end - -def prev_words_on_error(ev) - pre = @pre - if ev and /#{Regexp.quote(ev)}$/ =~ pre - pre = $` - end - last_line(pre) -end - -def last_line(src) - if n = src.rindex("\n") - src[(n+1) .. -1] - else - src - end -end -private :last_line - -def next_words_on_error - if n = @src.rest.index("\n") - @src.rest[0 .. (n-1)] - else - @src.rest - end -end - ----- header - -require "rd/parser-util" -require "forwardable" -require "strscan" - -module RD ----- footer -end # end of module RD - diff --git a/test/regress/bibtex.rb b/test/regress/bibtex.rb deleted file mode 100644 index 792a16bb..00000000 --- a/test/regress/bibtex.rb +++ /dev/null @@ -1,462 +0,0 @@ -# -# DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0.dev -# (codename: Mecha Oishii) from Racc grammar file "bibtex.y". -# - -require 'racc/parser.rb' - -Object.module_eval(<<'...end bibtex.y/module_eval...', 'bibtex.y', 86) -require 'bibtex/lexer' - -...end bibtex.y/module_eval... -module BibTeX - class Parser < Racc::Parser - -module_eval(<<'...end bibtex.y/module_eval...2', 'bibtex.y', 89) - - attr_reader :lexer, :options - - @defaults = { - :include => [:errors], - :allow_missing_keys => false, - :debug => false - }.freeze - - class << self - attr_reader :defaults - end - - def initialize(options = {}) - @options = Parser.defaults.merge(options) - @lexer = Lexer.new(@options) - end - - def parse(input) - @yydebug = debug? - - lexer.analyse(input) - do_parse - #yyparse(@lexer,:each) - end - - def next_token - lexer.next_token - end - - def debug? - options[:debug] || ENV['DEBUG'] - end - - def allow_missing_keys? - options[:allow_missing_keys] - end - - def missing_key - unless allow_missing_keys? - raise ParseError, "Failed to parse BibTeX entry: cite-key missing" - end - end - - def on_error(tid, val, vstack) - message = - "Failed to parse BibTeX on value #{val.inspect} (#{token_to_str(tid) || '?'}) #{ vstack.inspect}" - - BibTeX.log.error message - raise ParseError, message - end - -# -*- racc -*- -...end bibtex.y/module_eval...2 -##### State transition tables begin ### - -racc_action_table = [ -14, 33, 38, 26, 32, 26, 24, 18, 48, 15, 34, 33, 16, 37, 32, -52, 33, 7, 33, 32, 34, 32, 4, 19, 4, 34, 6, 34, 6, 5, -20, 5, 43, 44, 21, 22, 27, 29, 36, 39, 41, 42, 29, 46, 47, -54, 44, 44] - -racc_action_check = [ -4, 21, 23, 17, 21, 38, 17, 4, 38, 4, 21, 39, 4, 23, 39, -39, 44, 1, 47, 44, 39, 47, 0, 7, 2, 44, 0, 47, 2, 0, -14, 2, 30, 30, 15, 16, 18, 20, 22, 26, 27, 28, 33, 35, 36, -45, 50, 55] - -racc_action_pointer = [20, 17, 22, nil, -4, nil, nil, 23, nil, nil, nil, nil, nil, nil, 22, 26, 27, -8, 28, nil, 32, -7, 27, - -1, nil, nil, 32, 30, 27, nil, 18, nil, nil, 37, nil, 29, 37, nil, -- -6, 3, nil, nil, nil, nil, 8, 31, nil, 10, nil, nil, 31, nil, nil, -nil, nil, 32] - -racc_action_default = [-1, -34, -2, -3, -34, -6, -7, -34, -4, -5, -8, -9, -10, -11, -34, -34, -34, -34, -34, 56, -13, -34, -34, -34, -25, -29, -34, -27, -34, -14, -34, -18, -20, -13, -22, -34, -34, -23, -34, -34, -26, -28, -12, -15, -34, -34, -16, -34, -24, -30, -32, -31, -33, -19, -21, -17] - -racc_goto_table = [ -30, 25, 28, 3, 1, 8, 2, 9, 10, 11, 12, 13, 35, 53, 17, -45, 23, 40, 50, 51, nil, nil, 49, nil, nil, nil, 55] - -racc_goto_check = [ -10, 16, 9, 3, 1, 3, 2, 4, 5, 6, 7, 8, 11, 12, 13, -9, 14, 15, 10, 17, nil, nil, 16, nil, nil, nil, 10] - -racc_goto_pointer = [nil, 4, 6, 3, 3, 4, 5, 6, 7, -18, -21, -10, -31, 10, -1, -10, -16, -20] - -racc_goto_default = [ -nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 31, nil, nil, -nil, nil, nil] - -racc_reduce_table = [ - 0, 0, :racc_error, - 0, 19, :_reduce_1, - 1, 19, :_reduce_2, - 1, 20, :_reduce_3, - 2, 20, :_reduce_4, - 2, 21, :_reduce_5, - 1, 21, :_reduce_6, - 1, 21, :_reduce_7, - 1, 22, :_reduce_8, - 1, 22, :_reduce_9, - 1, 22, :_reduce_10, - 1, 22, :_reduce_11, - 4, 23, :_reduce_12, - 0, 27, :_reduce_13, - 1, 27, :_reduce_14, - 4, 25, :_reduce_15, - 4, 24, :_reduce_16, - 3, 29, :_reduce_17, - 1, 28, :_reduce_18, - 3, 28, :_reduce_19, - 1, 30, :_reduce_20, - 3, 30, :_reduce_21, - 1, 30, :_reduce_22, - 3, 26, :_reduce_23, - 4, 26, :_reduce_24, - 2, 26, :_reduce_25, - 3, 31, :_reduce_26, - 0, 33, :_reduce_27, - 1, 33, :_reduce_none, - 1, 32, :_reduce_29, - 3, 32, :_reduce_30, - 3, 34, :_reduce_31, - 1, 35, :_reduce_32, - 1, 35, :_reduce_33 ] - -racc_reduce_n = 34 - -racc_shift_n = 56 - -racc_token_table = { - false => 0, - :error => 1, - :AT => 2, - :COMMA => 3, - :COMMENT => 4, - :CONTENT => 5, - :ERROR => 6, - :EQ => 7, - :LBRACE => 8, - :META_CONTENT => 9, - :KEY => 10, - :NAME => 11, - :NUMBER => 12, - :PREAMBLE => 13, - :RBRACE => 14, - :SHARP => 15, - :STRING => 16, - :STRING_LITERAL => 17 } - -racc_nt_base = 18 - -racc_use_result_var = true - -Racc_arg = [ - racc_action_table, - racc_action_check, - racc_action_default, - racc_action_pointer, - racc_goto_table, - racc_goto_check, - racc_goto_default, - racc_goto_pointer, - racc_nt_base, - racc_reduce_table, - racc_token_table, - racc_shift_n, - racc_reduce_n, - racc_use_result_var ] - -Racc_token_to_s_table = [ - "$end", - "error", - "AT", - "COMMA", - "COMMENT", - "CONTENT", - "ERROR", - "EQ", - "LBRACE", - "META_CONTENT", - "KEY", - "NAME", - "NUMBER", - "PREAMBLE", - "RBRACE", - "SHARP", - "STRING", - "STRING_LITERAL", - "$start", - "bibliography", - "objects", - "object", - "at_object", - "comment", - "string", - "preamble", - "entry", - "content", - "string_value", - "string_assignment", - "string_literal", - "entry_head", - "assignments", - "opt_key", - "assignment", - "value" ] - -Racc_debug_parser = false - -##### State transition tables end ##### - -# reduce 0 omitted - -module_eval(<<'.,.,', 'bibtex.y', 32) - def _reduce_1(val, _values, result) - result = BibTeX::Bibliography.new(@options) - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 33) - def _reduce_2(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 35) - def _reduce_3(val, _values, result) - result = BibTeX::Bibliography.new(@options) << val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 36) - def _reduce_4(val, _values, result) - result << val[1] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 38) - def _reduce_5(val, _values, result) - result = val[1] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 39) - def _reduce_6(val, _values, result) - result = BibTeX::MetaContent.new(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 40) - def _reduce_7(val, _values, result) - result = BibTeX::Error.new(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 42) - def _reduce_8(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 43) - def _reduce_9(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 44) - def _reduce_10(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 45) - def _reduce_11(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 47) - def _reduce_12(val, _values, result) - result = BibTeX::Comment.new(val[2]) - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 49) - def _reduce_13(val, _values, result) - result = '' - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 50) - def _reduce_14(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 52) - def _reduce_15(val, _values, result) - result = BibTeX::Preamble.new(val[2]) - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 54) - def _reduce_16(val, _values, result) - result = BibTeX::String.new(val[2][0],val[2][1]); - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 56) - def _reduce_17(val, _values, result) - result = [val[0].downcase.to_sym, val[2]] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 58) - def _reduce_18(val, _values, result) - result = [val[0]] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 59) - def _reduce_19(val, _values, result) - result << val[2] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 61) - def _reduce_20(val, _values, result) - result = val[0].downcase.to_sym - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 62) - def _reduce_21(val, _values, result) - result = val[1] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 63) - def _reduce_22(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 65) - def _reduce_23(val, _values, result) - result = val[0] << val[1] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 66) - def _reduce_24(val, _values, result) - result = val[0] << val[1] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 67) - def _reduce_25(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 69) - def _reduce_26(val, _values, result) - result = BibTeX::Entry.new(:bibtex_type => val[0].downcase.to_sym, :bibtex_key => val[2]) - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 71) - def _reduce_27(val, _values, result) - missing_key - result - end -.,., - -# reduce 28 omitted - -module_eval(<<'.,.,', 'bibtex.y', 74) - def _reduce_29(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 75) - def _reduce_30(val, _values, result) - result.merge!(val[2]) - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 77) - def _reduce_31(val, _values, result) - result = { val[0].downcase.to_sym => val[2] } - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 79) - def _reduce_32(val, _values, result) - result = val[0] - result - end -.,., - -module_eval(<<'.,.,', 'bibtex.y', 80) - def _reduce_33(val, _values, result) - result = val[0] - result - end -.,., - -def _reduce_none(val, _values, result) - val[0] -end - - end # class Parser - end # module BibTeX diff --git a/test/regress/rdblockparser.rb b/test/regress/rdblockparser.rb deleted file mode 100644 index 6c889641..00000000 --- a/test/regress/rdblockparser.rb +++ /dev/null @@ -1,1035 +0,0 @@ -# -# DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0.dev -# (codename: Mecha Oishii) from Racc grammar file "rdblockparser.y". -# - -require 'racc/parser.rb' - -Object.module_eval(<<'...end rdblockparser.y/module_eval...', 'rdblockparser.y', 571) -require "rd/rdinlineparser.tab.rb" -require "rd/parser-util" - -module RD -...end rdblockparser.y/module_eval... -class RDParser < Racc::Parser - -module_eval(<<'...end rdblockparser.y/module_eval...2', 'rdblockparser.y', 289) -include ParserUtility - -TMPFILE = ["rdtmp", $$, 0] - -attr_reader :tree - -def initialize - @inline_parser = RDInlineParser.new(self) -end - -def parse(src, tree) - @src = src - @src.push(false) - # RDtree - @tree = tree - - # @i: index(line no.) of src - @i = 0 - # stack for current indentation - @indent_stack = [] - # how indented. - @current_indent = @indent_stack.join("") - # RDParser for tmp src - @subparser = nil - # which part is in now - @in_part = nil - @part_content = [] - - @in_verbatim = false - - @yydebug = true - do_parse -end - -def next_token - # preprocessing - # if it is not in RD part - # => method - while @in_part != "rd" - line = @src[@i] - @i += 1 # next line - - case line - # src end - when false - return [false, false] - # RD part begin - when /^=begin\s*(?:\bRD\b.*)?\s*$/ - if @in_part # if in non-RD part - @part_content.push(line) - else - @in_part = "rd" - return [:WHITELINE, "=begin\n"] # <= for textblockand - end - # non-RD part begin - when /^=begin\s+(\w+)/ - part = $1 - if @in_part # if in non-RD part - @part_content.push(line) - else - @in_part = part if @tree.filter[part] # if filter exists -# p "BEGIN_PART: #{@in_part}" # DEBUG - end - # non-RD part end - when /^=end/ - if @in_part # if in non-RD part -# p "END_PART: #{@in_part}" # DEBUG - # make Part-in object - part = RD::Part.new(@part_content.join(""), @tree, "r") - @part_content.clear - # call filter, part_out is output(Part object) - part_out = @tree.filter[@in_part].call(part) - - if @tree.filter[@in_part].mode == :rd # if output is RD formated - subtree = parse_subtree( (RUBY_VERSION >= '1.9.0' ? part_out.lines.to_a : part_out.to_a ) ) - else # if output is target formated - basename = TMPFILE.join('.') - TMPFILE[-1] += 1 - tmpfile = open(@tree.tmp_dir + "/" + basename + ".#{@in_part}", "w") - tmpfile.print(part_out) - tmpfile.close - subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"]) - end - @in_part = nil - return [:SUBTREE, subtree] - end - else - if @in_part # if in non-RD part - @part_content.push(line) - end - end - end - - @current_indent = @indent_stack.join("") - line = @src[@i] - case line - when false - if_current_indent_equal("") do - [false, false] - end - when /^=end/ - if_current_indent_equal("") do - @in_part = nil - [:WHITELINE, "=end"] # MUST CHANGE?? - end - when /^\s*$/ - @i += 1 # next line - return [:WHITELINE, ':WHITELINE'] - when /^\#/ # comment line - @i += 1 # next line - self.next_token() - when /^(={1,4})(?!=)\s*(?=\S)/, /^(\+{1,2})(?!\+)\s*(?=\S)/ - rest = $' # ' - rest.strip! - mark = $1 - if_current_indent_equal("") do - return [:HEADLINE, [Headline.mark_to_level(mark), rest]] - end - when /^<<<\s*(\S+)/ - file = $1 - if_current_indent_equal("") do - suffix = file[-3 .. -1] - if suffix == ".rd" or suffix == ".rb" - subtree = parse_subtree(get_included(file)) - [:SUBTREE, subtree] - else - [:INCLUDE, file] - end - end - when /^(\s*)\*(\s*)/ - rest = $' # ' - newIndent = $2 - if_current_indent_equal($1) do - if @in_verbatim - [:STRINGLINE, line] - else - @indent_stack.push("\s" << newIndent) - [:ITEMLISTLINE, rest] - end - end - when /^(\s*)(\(\d+\))(\s*)/ - rest = $' # ' - mark = $2 - newIndent = $3 - if_current_indent_equal($1) do - if @in_verbatim - [:STRINGLINE, line] - else - @indent_stack.push("\s" * mark.size << newIndent) - [:ENUMLISTLINE, rest] - end - end - when /^(\s*):(\s*)/ - rest = $' # ' - newIndent = $2 - if_current_indent_equal($1) do - if @in_verbatim - [:STRINGLINE, line] - else - @indent_stack.push("\s" << $2) - [:DESCLISTLINE, rest] - end - end - when /^(\s*)---(?!-|\s*$)/ - indent = $1 - rest = $' - /\s*/ === rest - term = $' - new_indent = $& - if_current_indent_equal(indent) do - if @in_verbatim - [:STRINGLINE, line] - else - @indent_stack.push("\s\s\s" + new_indent) - [:METHODLISTLINE, term] - end - end - when /^(\s*)/ - if_current_indent_equal($1) do - [:STRINGLINE, line] - end - else - raise "[BUG] parsing error may occured." - end -end - -=begin private - --- RDParser#if_current_indent_equal(indent) - if (({@current_indent == ((|indent|))})) then yield block, otherwise - process indentation. -=end -# always @current_indent = @indent_stack.join("") -def if_current_indent_equal(indent) - indent = indent.sub(/\t/, "\s" * 8) - if @current_indent == indent - @i += 1 # next line - yield - elsif indent.index(@current_indent) == 0 - @indent_stack.push(indent[@current_indent.size .. -1]) - [:INDENT, ":INDENT"] - else - @indent_stack.pop - [:DEDENT, ":DEDENT"] - end -end -private :if_current_indent_equal - -def cut_off(src) - ret = [] - whiteline_buf = [] - line = src.shift - /^\s*/ =~ line - indent = Regexp.quote($&) - ret.push($') # ' - while line = src.shift - if /^(\s*)$/ =~ line - whiteline_buf.push(line) - elsif /^#{indent}/ =~ line - unless whiteline_buf.empty? - ret.concat(whiteline_buf) - whiteline_buf.clear - end - ret.push($') # ' - else - raise "[BUG]: probably Parser Error while cutting off.\n" - end - end - ret -end -private :cut_off - -def set_term_to_element(parent, term) -# parent.set_term_under_document_struct(term, @tree.document_struct) - parent.set_term_without_document_struct(term) -end -private :set_term_to_element - -def on_error( et, ev, _values ) - line = @src[@i] - prv, cur, nxt = format_line_num(@i, @i+1, @i+2) - - raise ParseError, <|#{@src[@i].chomp} - #{nxt} |#{@src[@i+1].chomp} - -Msg -end - -def line_index - @i -end - -def parse_subtree(src) - @subparser = RD::RDParser.new() unless @subparser - - @subparser.parse(src, @tree) -end -private :parse_subtree - -def get_included(file) - included = "" - @tree.include_path.each do |dir| - file_name = dir + "/" + file - if test(?e, file_name) - included = IO.readlines(file_name) - break - end - end - included -end -private :get_included - -def format_line_num(*args) - width = args.collect{|i| i.to_s.length }.max - args.collect{|i| sprintf("%#{width}d", i) } -end -private :format_line_num - -...end rdblockparser.y/module_eval...2 -##### State transition tables begin ### - -racc_action_table = [ -34, 35, 30, 33, 40, 34, 35, 30, 33, 40, 65, 34, 35, 30, 33, -14, 73, 36, 38, 34, 15, 88, 34, 35, 30, 33, 14, 9, 10, 11, -12, 15, 34, 35, 30, 33, 14, 9, 10, 11, 12, 15, 34, 35, 30, -33, 35, 47, 30, 54, 33, 15, 34, 35, 30, 33, 54, 47, 14, 14, -59, 15, 34, 35, 30, 33, 14, 73, 67, 76, 77, 15, 34, 35, 30, -33, 14, 73, 54, 81, 38, 15, 34, 35, 30, 33, 14, 73, 38, 40, -83, 15, 34, 35, 30, 33, 14, 73, nil, nil, nil, 15, 34, 35, 30, -33, 14, 73, nil, nil, nil, 15, 34, 35, 30, 33, 14, 73, nil, nil, -nil, 15, 34, 35, 30, 33, 14, 73, nil, nil, nil, 15, 34, 35, 30, -33, 14, 73, nil, nil, nil, 15, 34, 35, 30, 33, 14, 73, 61, 63, -nil, 15, 14, 62, 60, 61, 63, 79, 61, 63, 62, 87, nil, 62, 34, -35, 30, 33] - -racc_action_check = [ -41, 41, 41, 41, 41, 15, 15, 15, 15, 15, 41, 86, 86, 86, 86, -86, 86, 1, 13, 22, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 24, 24, 24, -24, 25, 24, 28, 30, 31, 24, 27, 27, 27, 27, 33, 27, 34, 35, -36, 27, 45, 45, 45, 45, 45, 45, 44, 49, 51, 45, 46, 46, 46, -46, 46, 46, 54, 56, 57, 46, 47, 47, 47, 47, 47, 47, 58, 62, -66, 47, 68, 68, 68, 68, 68, 68, nil, nil, nil, 68, 74, 74, 74, -74, 74, 74, nil, nil, nil, 74, 75, 75, 75, 75, 75, 75, nil, nil, -nil, 75, 78, 78, 78, 78, 78, 78, nil, nil, nil, 78, 79, 79, 79, -79, 79, 79, nil, nil, nil, 79, 85, 85, 85, 85, 85, 85, 39, 39, -nil, 85, 52, 39, 39, 82, 82, 52, 64, 64, 82, 82, nil, 64, 20, -20, 20, 20] - -racc_action_pointer = [ -19, 17, 29, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 11, nil, -2, nil, nil, nil, nil, 161, nil, 16, nil, 39, 42, nil, 49, 43, nil, -41, 44, nil, 48, 51, 52, 60, nil, nil, 141, nil, - -3, nil, nil, 55, 59, 69, 79, nil, 56, nil, 57, 145, nil, 70, nil, -66, 73, 81, nil, nil, nil, 82, nil, 151, nil, 77, nil, 89, nil, nil, -nil, nil, nil, 99, 109, nil, nil, 119, 129, nil, nil, 148, nil, nil, 139, -8, nil, nil] - -racc_action_default = [-2, -73, -1, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -16, -73, -23, -24, -25, -26, -27, -31, -32, -34, -72, -36, -38, -72, -40, -42, -59, -44, -46, -59, -63, -65, -73, -3, -15, -73, -22, -73, -30, -33, -73, -69, -70, -71, -37, -73, -41, -73, -51, -58, -61, -45, -73, -62, -64, 89, -17, -19, -73, -21, -18, -28, -73, -35, -66, -53, -54, -55, -56, -57, -67, -68, -39, -43, -49, -73, -60, -47, -73, -29, -52, -48, -73, -20, -50] - -racc_goto_table = [ -4, 39, 4, 68, 74, 75, 5, 6, 5, 6, 44, 42, 51, 49, 3, -56, 37, 57, 58, 1, 2, 66, 84, 41, 43, 48, 50, 64, 84, 84, -45, 46, 42, 45, 46, 55, 85, 86, 80, 84, 84, nil, nil, nil, nil, -nil, nil, nil, 82, nil, nil, nil, 78] - -racc_goto_check = [ -4, 10, 4, 31, 31, 31, 5, 6, 5, 6, 21, 12, 27, 21, 3, -27, 3, 9, 9, 1, 2, 11, 32, 17, 19, 23, 26, 10, 32, 32, -5, 6, 12, 5, 6, 29, 31, 31, 33, 32, 32, nil, nil, nil, nil, -nil, nil, nil, 10, nil, nil, nil, 4] - -racc_goto_pointer = [nil, 19, 20, 14, 0, 6, 7, nil, nil, -17, -14, -20, -9, nil, nil, nil, nil, 8, nil, 2, nil, -14, nil, 0, nil, nil, -2, -18, nil, 4, nil, -42, -46, -16] - -racc_goto_default = [ -nil, nil, nil, nil, 70, 71, 72, 7, 8, 13, nil, nil, 21, 16, 17, -18, 19, 20, 22, 23, 24, nil, 25, 26, 27, 28, 29, nil, 31, 32, -52, nil, 69, 53] - -racc_reduce_table = [ - 0, 0, :racc_error, - 1, 15, :_reduce_1, - 0, 15, :_reduce_2, - 2, 16, :_reduce_3, - 1, 16, :_reduce_none, - 1, 17, :_reduce_5, - 1, 17, :_reduce_6, - 1, 17, :_reduce_none, - 1, 17, :_reduce_8, - 1, 17, :_reduce_9, - 1, 17, :_reduce_10, - 1, 17, :_reduce_11, - 1, 21, :_reduce_12, - 1, 22, :_reduce_13, - 1, 18, :_reduce_14, - 2, 23, :_reduce_15, - 1, 23, :_reduce_16, - 3, 19, :_reduce_17, - 1, 25, :_reduce_18, - 2, 24, :_reduce_19, - 4, 24, :_reduce_20, - 2, 24, :_reduce_21, - 1, 24, :_reduce_22, - 1, 26, :_reduce_none, - 1, 26, :_reduce_none, - 1, 26, :_reduce_none, - 1, 26, :_reduce_none, - 1, 20, :_reduce_none, - 3, 20, :_reduce_28, - 4, 20, :_reduce_29, - 2, 31, :_reduce_30, - 1, 31, :_reduce_31, - 1, 27, :_reduce_32, - 2, 32, :_reduce_33, - 1, 32, :_reduce_34, - 3, 33, :_reduce_35, - 1, 28, :_reduce_36, - 2, 36, :_reduce_37, - 1, 36, :_reduce_38, - 3, 37, :_reduce_39, - 1, 29, :_reduce_40, - 2, 39, :_reduce_41, - 1, 39, :_reduce_42, - 3, 40, :_reduce_43, - 1, 30, :_reduce_44, - 2, 42, :_reduce_45, - 1, 42, :_reduce_46, - 3, 43, :_reduce_47, - 3, 41, :_reduce_48, - 2, 41, :_reduce_49, - 4, 41, :_reduce_50, - 1, 41, :_reduce_51, - 2, 45, :_reduce_52, - 1, 45, :_reduce_none, - 1, 46, :_reduce_54, - 1, 46, :_reduce_55, - 1, 46, :_reduce_none, - 1, 46, :_reduce_57, - 1, 44, :_reduce_none, - 0, 44, :_reduce_none, - 2, 47, :_reduce_none, - 1, 47, :_reduce_none, - 2, 34, :_reduce_62, - 1, 34, :_reduce_63, - 2, 38, :_reduce_64, - 1, 38, :_reduce_65, - 2, 35, :_reduce_66, - 2, 35, :_reduce_67, - 2, 35, :_reduce_68, - 1, 35, :_reduce_69, - 1, 35, :_reduce_none, - 1, 35, :_reduce_71, - 0, 35, :_reduce_72 ] - -racc_reduce_n = 73 - -racc_shift_n = 89 - -racc_token_table = { - false => 0, - :error => 1, - :DUMMY => 2, - :ITEMLISTLINE => 3, - :ENUMLISTLINE => 4, - :DESCLISTLINE => 5, - :METHODLISTLINE => 6, - :STRINGLINE => 7, - :WHITELINE => 8, - :SUBTREE => 9, - :HEADLINE => 10, - :INCLUDE => 11, - :INDENT => 12, - :DEDENT => 13 } - -racc_nt_base = 14 - -racc_use_result_var = true - -Racc_arg = [ - racc_action_table, - racc_action_check, - racc_action_default, - racc_action_pointer, - racc_goto_table, - racc_goto_check, - racc_goto_default, - racc_goto_pointer, - racc_nt_base, - racc_reduce_table, - racc_token_table, - racc_shift_n, - racc_reduce_n, - racc_use_result_var ] - -Racc_token_to_s_table = [ - "$end", - "error", - "DUMMY", - "ITEMLISTLINE", - "ENUMLISTLINE", - "DESCLISTLINE", - "METHODLISTLINE", - "STRINGLINE", - "WHITELINE", - "SUBTREE", - "HEADLINE", - "INCLUDE", - "INDENT", - "DEDENT", - "$start", - "document", - "blocks", - "block", - "textblock", - "verbatim", - "lists", - "headline", - "include", - "textblockcontent", - "verbatimcontent", - "verbatim_after_lists", - "list", - "itemlist", - "enumlist", - "desclist", - "methodlist", - "lists2", - "itemlistitems", - "itemlistitem", - "first_textblock_in_itemlist", - "other_blocks_in_list", - "enumlistitems", - "enumlistitem", - "first_textblock_in_enumlist", - "desclistitems", - "desclistitem", - "description_part", - "methodlistitems", - "methodlistitem", - "whitelines", - "blocks_in_list", - "block_in_list", - "whitelines2" ] - -Racc_debug_parser = false - -##### State transition tables end ##### - -# reduce 0 omitted - -module_eval(<<'.,.,', 'rdblockparser.y', 70) - def _reduce_1(val, _values, result) - result = DocumentElement.new - add_children_to_element(result, *val[0]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 74) - def _reduce_2(val, _values, result) - raise ParseError, - "Error: file empty." - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 78) - def _reduce_3(val, _values, result) - result.concat(val[1]) - result - end -.,., - -# reduce 4 omitted - -module_eval(<<'.,.,', 'rdblockparser.y', 81) - def _reduce_5(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 82) - def _reduce_6(val, _values, result) - result = val - result - end -.,., - -# reduce 7 omitted - -module_eval(<<'.,.,', 'rdblockparser.y', 84) - def _reduce_8(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 85) - def _reduce_9(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 86) - def _reduce_10(val, _values, result) - result = [] - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 87) - def _reduce_11(val, _values, result) - result = val[0].blocks - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 90) - def _reduce_12(val, _values, result) - # val[0] is like [level, title] - title = @inline_parser.parse(val[0][1]) - result = Headline.new(val[0][0]) - add_children_to_element(result, *title) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 96) - def _reduce_13(val, _values, result) - result = Include.new(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 100) - def _reduce_14(val, _values, result) - # val[0] is Array of String - content = cut_off(val[0]).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 108) - def _reduce_15(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 109) - def _reduce_16(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 113) - def _reduce_17(val, _values, result) - # val[1] is Array of String - content = cut_off(val[1]) - result = Verbatim.new(content) - # imform to lexer. - @in_verbatim = false - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 120) - def _reduce_18(val, _values, result) - # val[0] is Array of String - content = cut_off(val[0]) - result = Verbatim.new(content) - # imform to lexer. - @in_verbatim = false - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 127) - def _reduce_19(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 129) - def _reduce_20(val, _values, result) - result.concat(val[2]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 131) - def _reduce_21(val, _values, result) - result.push("\n") - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 132) - def _reduce_22(val, _values, result) - result = val - # imform to lexer. - @in_verbatim = true - result - end -.,., - -# reduce 23 omitted - -# reduce 24 omitted - -# reduce 25 omitted - -# reduce 26 omitted - -# reduce 27 omitted - -module_eval(<<'.,.,', 'rdblockparser.y', 143) - def _reduce_28(val, _values, result) - result = val[1] - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 145) - def _reduce_29(val, _values, result) - result = val[1].push(val[2]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 148) - def _reduce_30(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 149) - def _reduce_31(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 153) - def _reduce_32(val, _values, result) - result = ItemList.new - add_children_to_element(result, *val[0]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 158) - def _reduce_33(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 159) - def _reduce_34(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 163) - def _reduce_35(val, _values, result) - result = ItemListItem.new - add_children_to_element(result, val[0], *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 169) - def _reduce_36(val, _values, result) - result = EnumList.new - add_children_to_element(result, *val[0]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 174) - def _reduce_37(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 175) - def _reduce_38(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 179) - def _reduce_39(val, _values, result) - result = EnumListItem.new - add_children_to_element(result, val[0], *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 185) - def _reduce_40(val, _values, result) - result = DescList.new - add_children_to_element(result, *val[0]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 190) - def _reduce_41(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 191) - def _reduce_42(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 195) - def _reduce_43(val, _values, result) - term = DescListItem::Term.new - term_contents = @inline_parser.parse(val[0].strip) - add_children_to_element(term, *term_contents) - - result = DescListItem.new - set_term_to_element(result, term) - add_children_to_element(result, *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 206) - def _reduce_44(val, _values, result) - result = MethodList.new - add_children_to_element(result, *val[0]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 211) - def _reduce_45(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 212) - def _reduce_46(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 216) - def _reduce_47(val, _values, result) - term = MethodListItem::Term.new(val[0].strip) - result = MethodListItem.new - set_term_to_element(result, term) - add_children_to_element(result, *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 224) - def _reduce_48(val, _values, result) - result = [val[1]].concat(val[2]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 225) - def _reduce_49(val, _values, result) - result = [val[1]] - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 227) - def _reduce_50(val, _values, result) - result = val[2] - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 228) - def _reduce_51(val, _values, result) - result = [] - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 231) - def _reduce_52(val, _values, result) - result.concat(val[1]) - result - end -.,., - -# reduce 53 omitted - -module_eval(<<'.,.,', 'rdblockparser.y', 234) - def _reduce_54(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 235) - def _reduce_55(val, _values, result) - result = val - result - end -.,., - -# reduce 56 omitted - -module_eval(<<'.,.,', 'rdblockparser.y', 237) - def _reduce_57(val, _values, result) - result = [] - result - end -.,., - -# reduce 58 omitted - -# reduce 59 omitted - -# reduce 60 omitted - -# reduce 61 omitted - -module_eval(<<'.,.,', 'rdblockparser.y', 248) - def _reduce_62(val, _values, result) - content = cut_off([val[0]].concat(val[1])).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 255) - def _reduce_63(val, _values, result) - content = cut_off([val[0]]).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 263) - def _reduce_64(val, _values, result) - content = cut_off([val[0]].concat(val[1])).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 270) - def _reduce_65(val, _values, result) - content = cut_off([val[0]]).join("") - contents = @inline_parser.parse(content) - result = TextBlock.new() - add_children_to_element(result, *contents) - - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 277) - def _reduce_66(val, _values, result) - result = [val[0]].concat(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 278) - def _reduce_67(val, _values, result) - result.concat(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 279) - def _reduce_68(val, _values, result) - result = val[1] - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 280) - def _reduce_69(val, _values, result) - result = val - result - end -.,., - -# reduce 70 omitted - -module_eval(<<'.,.,', 'rdblockparser.y', 282) - def _reduce_71(val, _values, result) - result = [] - result - end -.,., - -module_eval(<<'.,.,', 'rdblockparser.y', 283) - def _reduce_72(val, _values, result) - result = [] - result - end -.,., - -def _reduce_none(val, _values, result) - val[0] -end - -end # class RDParser - -Object.module_eval(<<'...end rdblockparser.y/module_eval...3', 'rdblockparser.y', 576) -end # end of module RD -...end rdblockparser.y/module_eval...3 diff --git a/test/regress/rdinlineparser.rb b/test/regress/rdinlineparser.rb deleted file mode 100644 index b2d9450f..00000000 --- a/test/regress/rdinlineparser.rb +++ /dev/null @@ -1,1165 +0,0 @@ -# -# DO NOT MODIFY!!!! -# This file was automatically generated by Racc 2.0.0.dev -# (codename: Mecha Oishii) from Racc grammar file "rdinlineparser.y". -# - -require 'racc/parser.rb' - -Object.module_eval(<<'...end rdinlineparser.y/module_eval...', 'rdinlineparser.y', 553) - -require "rd/parser-util" -require "forwardable" -require "strscan" - -module RD -...end rdinlineparser.y/module_eval... -class RDInlineParser < Racc::Parser - -module_eval(<<'...end rdinlineparser.y/module_eval...2', 'rdinlineparser.y', 350) -include ParserUtility -extend Forwardable - -EM_OPEN = '((*' -EM_OPEN_RE = /\A#{Regexp.quote(EM_OPEN)}/ -EM_CLOSE = '*))' -EM_CLOSE_RE = /\A#{Regexp.quote(EM_CLOSE)}/ -CODE_OPEN = '(({' -CODE_OPEN_RE = /\A#{Regexp.quote(CODE_OPEN)}/ -CODE_CLOSE = '}))' -CODE_CLOSE_RE = /\A#{Regexp.quote(CODE_CLOSE)}/ -VAR_OPEN = '((|' -VAR_OPEN_RE = /\A#{Regexp.quote(VAR_OPEN)}/ -VAR_CLOSE = '|))' -VAR_CLOSE_RE = /\A#{Regexp.quote(VAR_CLOSE)}/ -KBD_OPEN = '((%' -KBD_OPEN_RE = /\A#{Regexp.quote(KBD_OPEN)}/ -KBD_CLOSE = '%))' -KBD_CLOSE_RE = /\A#{Regexp.quote(KBD_CLOSE)}/ -INDEX_OPEN = '((:' -INDEX_OPEN_RE = /\A#{Regexp.quote(INDEX_OPEN)}/ -INDEX_CLOSE = ':))' -INDEX_CLOSE_RE = /\A#{Regexp.quote(INDEX_CLOSE)}/ -REF_OPEN = '((<' -REF_OPEN_RE = /\A#{Regexp.quote(REF_OPEN)}/ -REF_CLOSE = '>))' -REF_CLOSE_RE = /\A#{Regexp.quote(REF_CLOSE)}/ -FOOTNOTE_OPEN = '((-' -FOOTNOTE_OPEN_RE = /\A#{Regexp.quote(FOOTNOTE_OPEN)}/ -FOOTNOTE_CLOSE = '-))' -FOOTNOTE_CLOSE_RE = /\A#{Regexp.quote(FOOTNOTE_CLOSE)}/ -VERB_OPEN = "(('" -VERB_OPEN_RE = /\A#{Regexp.quote(VERB_OPEN)}/ -VERB_CLOSE = "'))" -VERB_CLOSE_RE = /\A#{Regexp.quote(VERB_CLOSE)}/ - -BAR = "|" -BAR_RE = /\A#{Regexp.quote(BAR)}/ -QUOTE = '"' -QUOTE_RE = /\A#{Regexp.quote(QUOTE)}/ -SLASH = "/" -SLASH_RE = /\A#{Regexp.quote(SLASH)}/ -BACK_SLASH = "\\" -BACK_SLASH_RE = /\A#{Regexp.quote(BACK_SLASH)}/ -URL = "URL:" -URL_RE = /\A#{Regexp.quote(URL)}/ - -# Workaround for Regexp option change of Ruby 1.5.x -other_re_mode = Regexp::EXTENDED -if RUBY_VERSION > "1.5" - other_re_mode |= Regexp::MULTILINE -else - other_re_mode |= Regexp::POSIXLINE -end - -OTHER_RE = Regexp.new( - "\\A.+?(?=#{Regexp.quote(EM_OPEN)}|#{Regexp.quote(EM_CLOSE)}| - #{Regexp.quote(CODE_OPEN)}|#{Regexp.quote(CODE_CLOSE)}| - #{Regexp.quote(VAR_OPEN)}|#{Regexp.quote(VAR_CLOSE)}| - #{Regexp.quote(KBD_OPEN)}|#{Regexp.quote(KBD_CLOSE)}| - #{Regexp.quote(INDEX_OPEN)}|#{Regexp.quote(INDEX_CLOSE)}| - #{Regexp.quote(REF_OPEN)}|#{Regexp.quote(REF_CLOSE)}| - #{Regexp.quote(FOOTNOTE_OPEN)}|#{Regexp.quote(FOOTNOTE_CLOSE)}| - #{Regexp.quote(VERB_OPEN)}|#{Regexp.quote(VERB_CLOSE)}| - #{Regexp.quote(BAR)}| - #{Regexp.quote(QUOTE)}| - #{Regexp.quote(SLASH)}| - #{Regexp.quote(BACK_SLASH)}| - #{Regexp.quote(URL)})", other_re_mode) - -def initialize(bp) - @blockp = bp -end - -def_delegator(:@blockp, :tree) - -def parse(src) - @src = StringScanner.new(src) - @pre = "" - @yydebug = true - do_parse -end - -def next_token - return [false, false] if @src.eos? -# p @src.rest if @yydebug - if ret = @src.scan(EM_OPEN_RE) - @pre << ret - [:EM_OPEN, ret] - elsif ret = @src.scan(EM_CLOSE_RE) - @pre << ret - [:EM_CLOSE, ret] - elsif ret = @src.scan(CODE_OPEN_RE) - @pre << ret - [:CODE_OPEN, ret] - elsif ret = @src.scan(CODE_CLOSE_RE) - @pre << ret - [:CODE_CLOSE, ret] - elsif ret = @src.scan(VAR_OPEN_RE) - @pre << ret - [:VAR_OPEN, ret] - elsif ret = @src.scan(VAR_CLOSE_RE) - @pre << ret - [:VAR_CLOSE, ret] - elsif ret = @src.scan(KBD_OPEN_RE) - @pre << ret - [:KBD_OPEN, ret] - elsif ret = @src.scan(KBD_CLOSE_RE) - @pre << ret - [:KBD_CLOSE, ret] - elsif ret = @src.scan(INDEX_OPEN_RE) - @pre << ret - [:INDEX_OPEN, ret] - elsif ret = @src.scan(INDEX_CLOSE_RE) - @pre << ret - [:INDEX_CLOSE, ret] - elsif ret = @src.scan(REF_OPEN_RE) - @pre << ret - [:REF_OPEN, ret] - elsif ret = @src.scan(REF_CLOSE_RE) - @pre << ret - [:REF_CLOSE, ret] - elsif ret = @src.scan(FOOTNOTE_OPEN_RE) - @pre << ret - [:FOOTNOTE_OPEN, ret] - elsif ret = @src.scan(FOOTNOTE_CLOSE_RE) - @pre << ret - [:FOOTNOTE_CLOSE, ret] - elsif ret = @src.scan(VERB_OPEN_RE) - @pre << ret - [:VERB_OPEN, ret] - elsif ret = @src.scan(VERB_CLOSE_RE) - @pre << ret - [:VERB_CLOSE, ret] - elsif ret = @src.scan(BAR_RE) - @pre << ret - [:BAR, ret] - elsif ret = @src.scan(QUOTE_RE) - @pre << ret - [:QUOTE, ret] - elsif ret = @src.scan(SLASH_RE) - @pre << ret - [:SLASH, ret] - elsif ret = @src.scan(BACK_SLASH_RE) - @pre << ret - [:BACK_SLASH, ret] - elsif ret = @src.scan(URL_RE) - @pre << ret - [:URL, ret] - elsif ret = @src.scan(OTHER_RE) - @pre << ret - [:OTHER, ret] - else - ret = @src.rest - @pre << ret - @src.terminate - [:OTHER, ret] - end -end - -def make_reference_from_label(label) -# Reference.new_from_label_under_document_struct(label, tree.document_struct) - Reference.new_from_label_without_document_struct(label) -end - -def on_error(et, ev, values) - lines_of_rest = (RUBY_VERSION >= '1.9.0' ? @src.rest.lines.to_a.length : @src.rest.to_a.length ) - prev_words = prev_words_on_error(ev) - at = 4 + prev_words.length - message = <<-MSG -RD syntax error: line #{@blockp.line_index - lines_of_rest}: -...#{prev_words} #{(ev||'')} #{next_words_on_error()} ... - MSG - message << " " * at + "^" * (ev ? ev.length : 0) + "\n" - raise ParseError, message -end - -def prev_words_on_error(ev) - pre = @pre - if ev and /#{Regexp.quote(ev)}$/ =~ pre - pre = $` - end - last_line(pre) -end - -def last_line(src) - if n = src.rindex("\n") - src[(n+1) .. -1] - else - src - end -end -private :last_line - -def next_words_on_error - if n = @src.rest.index("\n") - @src.rest[0 .. (n-1)] - else - @src.rest - end -end - -...end rdinlineparser.y/module_eval...2 -##### State transition tables begin ### - -racc_action_table = [ -104, 103, 102, 100, 101, 99, 115, 116, 117, 29, 105, 106, 107, 108, 109, -110, 111, 112, 113, 114, 84, 118, 119, 63, 64, 65, 61, 81, 62, 76, -78, 79, 85, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 80, -149, 63, 64, 65, 153, 81, 62, 76, 78, 79, 86, 66, 67, 68, 69, -70, 71, 72, 73, 74, 75, 77, 80, 152, 104, 103, 102, 100, 101, 99, -115, 116, 117, 87, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 88, -118, 119, 104, 103, 102, 100, 101, 99, 115, 116, 117, 89, 105, 106, 107, -108, 109, 110, 111, 112, 113, 114, 96, 118, 119, 104, 103, 102, 100, 101, -99, 115, 116, 117, 124, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, -137, 118, 119, 22, 23, 24, 25, 26, 21, 18, 19, 176, 177, 13, 148, -14, 154, 15, 137, 16, 161, 17, 164, 173, 20, 22, 23, 24, 25, 26, -21, 18, 19, 175, 177, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, -nil, 20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, -nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, -18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, -20, 22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, -15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, 26, 21, 18, -19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, -22, 23, 24, 25, 26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, -nil, 16, nil, 17, 42, nil, 20, 54, 38, 53, 55, 56, 57, nil, 13, -nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, 22, 23, 24, 25, -26, 21, 18, 19, nil, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, -nil, nil, 20, 63, 64, 65, 61, 81, 62, 76, 78, 79, nil, 66, 67, -68, 69, 70, 71, 72, 73, 74, 75, 77, 80, 122, nil, nil, 54, nil, -53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, 145, -nil, 20, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, -16, nil, 17, 145, nil, 20, 54, 133, 53, 55, 56, 57, nil, 13, nil, -14, nil, 15, nil, 16, nil, 17, 145, nil, 20, 54, 133, 53, 55, 56, -57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, 145, nil, 20, 54, -133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, -nil, nil, 20, 135, 136, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, -nil, 15, nil, 16, nil, 17, nil, nil, 20, 135, 136, 54, 133, 53, 55, -56, 57, nil, 13, nil, 14, nil, 15, nil, 16, nil, 17, nil, nil, 20, -135, 136, 54, 133, 53, 55, 56, 57, nil, 13, nil, 14, nil, 15, nil, -16, nil, 17, 95, nil, 20, 54, 91, 53, 55, 56, 57, 145, nil, nil, -54, 133, 53, 55, 56, 57, 158, nil, nil, 54, nil, 53, 55, 56, 57, -165, 135, 136, 54, 133, 53, 55, 56, 57, 145, nil, nil, 54, 133, 53, -55, 56, 57, 172, 135, 136, 54, 133, 53, 55, 56, 57, 174, 135, 136, -54, 133, 53, 55, 56, 57, 178, 135, 136, 54, 133, 53, 55, 56, 57, -135, 136, 54, 133, 53, 55, 56, 57, 135, 136, 54, 133, 53, 55, 56, -57, 135, 136, 54, 133, 53, 55, 56, 57, 22, 23, 24, 25, 26, 21] - -racc_action_check = [ -38, 38, 38, 38, 38, 38, 38, 38, 38, 1, 38, 38, 38, 38, 38, -38, 38, 38, 38, 38, 29, 38, 38, 59, 59, 59, 59, 59, 59, 59, -59, 59, 31, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, -59, 61, 61, 61, 61, 61, 61, 61, 61, 61, 32, 61, 61, 61, 61, -61, 61, 61, 61, 61, 61, 61, 61, 61, 91, 91, 91, 91, 91, 91, -91, 91, 91, 33, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 34, -91, 91, 97, 97, 97, 97, 97, 97, 97, 97, 97, 35, 97, 97, 97, -97, 97, 97, 97, 97, 97, 97, 37, 97, 97, 155, 155, 155, 155, 155, -155, 155, 155, 155, 41, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, -43, 155, 155, 0, 0, 0, 0, 0, 0, 0, 0, 165, 165, 0, 58, -0, 90, 0, 94, 0, 100, 0, 125, 162, 0, 2, 2, 2, 2, 2, -2, 2, 2, 164, 172, 2, nil, 2, nil, 2, nil, 2, nil, 2, nil, -nil, 2, 13, 13, 13, 13, 13, 13, 13, 13, nil, nil, 13, nil, 13, -nil, 13, nil, 13, nil, 13, nil, nil, 13, 14, 14, 14, 14, 14, 14, -14, 14, nil, nil, 14, nil, 14, nil, 14, nil, 14, nil, 14, nil, nil, -14, 15, 15, 15, 15, 15, 15, 15, 15, nil, nil, 15, nil, 15, nil, -15, nil, 15, nil, 15, nil, nil, 15, 16, 16, 16, 16, 16, 16, 16, -16, nil, nil, 16, nil, 16, nil, 16, nil, 16, nil, 16, nil, nil, 16, -17, 17, 17, 17, 17, 17, 17, 17, nil, nil, 17, nil, 17, nil, 17, -nil, 17, nil, 17, 18, nil, 17, 18, 18, 18, 18, 18, 18, nil, 18, -nil, 18, nil, 18, nil, 18, nil, 18, nil, nil, 18, 19, 19, 19, 19, -19, 19, 19, 19, nil, nil, 19, nil, 19, nil, 19, nil, 19, nil, 19, -nil, nil, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, nil, 20, 20, -20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 39, nil, nil, 39, nil, -39, 39, 39, 39, nil, 39, nil, 39, nil, 39, nil, 39, nil, 39, 44, -nil, 39, 44, 44, 44, 44, 44, 44, nil, 44, nil, 44, nil, 44, nil, -44, nil, 44, 45, nil, 44, 45, 45, 45, 45, 45, 45, nil, 45, nil, -45, nil, 45, nil, 45, nil, 45, 138, nil, 45, 138, 138, 138, 138, 138, -138, nil, 138, nil, 138, nil, 138, nil, 138, nil, 138, 146, nil, 138, 146, -146, 146, 146, 146, 146, nil, 146, nil, 146, nil, 146, nil, 146, nil, 146, -nil, nil, 146, 42, 42, 42, 42, 42, 42, 42, 42, nil, 42, nil, 42, -nil, 42, nil, 42, nil, 42, nil, nil, 42, 122, 122, 122, 122, 122, 122, -122, 122, nil, 122, nil, 122, nil, 122, nil, 122, nil, 122, nil, nil, 122, -127, 127, 127, 127, 127, 127, 127, 127, nil, 127, nil, 127, nil, 127, nil, -127, nil, 127, 36, nil, 127, 36, 36, 36, 36, 36, 36, 52, nil, nil, -52, 52, 52, 52, 52, 52, 92, nil, nil, 92, nil, 92, 92, 92, 92, -126, 126, 126, 126, 126, 126, 126, 126, 126, 142, nil, nil, 142, 142, 142, -142, 142, 142, 159, 159, 159, 159, 159, 159, 159, 159, 159, 163, 163, 163, -163, 163, 163, 163, 163, 163, 171, 171, 171, 171, 171, 171, 171, 171, 171, -95, 95, 95, 95, 95, 95, 95, 95, 158, 158, 158, 158, 158, 158, 158, -158, 168, 168, 168, 168, 168, 168, 168, 168, 27, 27, 27, 27, 27, 27] - -racc_action_pointer = [ -135, 9, 157, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 179, 201, -223, 245, 267, 286, 308, 330, nil, nil, nil, nil, nil, nil, 606, nil, 20, -nil, 18, 39, 60, 69, 79, 510, 89, - -3, 352, nil, 120, 449, 130, 371, 390, nil, nil, nil, nil, nil, nil, 519, -nil, nil, nil, nil, nil, 138, 20, nil, 43, nil, nil, nil, nil, nil, nil, -nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -nil, nil, nil, nil, nil, nil, nil, 128, 66, 528, nil, 148, 581, nil, 89, -nil, nil, 149, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, -nil, nil, nil, nil, nil, nil, nil, nil, nil, 470, nil, nil, 154, 537, 491, -nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 409, nil, nil, nil, 546, -nil, nil, nil, 428, nil, nil, nil, nil, nil, nil, nil, nil, 112, nil, nil, -589, 555, nil, nil, 155, 564, 164, 142, nil, nil, 597, nil, nil, 573, 164, -nil, nil, nil, nil, nil, nil] - -racc_action_default = [-138, -138, -1, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -138, -138, -138, -138, -138, -138, -138, -138, -103, -104, -105, -106, -107, -108, -111, -110, -138, -2, -138, -138, -138, -138, -138, -138, -138, -138, -27, -26, -35, -138, -58, -41, -40, -47, -48, -49, -50, -51, -52, -63, -66, -67, -68, -69, -70, -138, -138, -112, -138, -116, -117, -118, -119, -120, -121, -122, -123, -124, -125, -126, -127, -128, -129, -130, -131, -132, -133, -134, -135, -137, -109, 179, -13, -14, -15, -16, -17, -138, -138, -23, -22, -33, -138, -19, -24, -79, -80, -138, -82, -83, -84, -85, -86, -87, -88, -89, -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, -100, -25, -35, -138, -58, -28, -138, -59, -42, -46, -55, -56, -65, -71, -72, -75, -76, -77, -31, -38, -44, -53, -54, -57, -61, -73, -74, -39, -62, -101, -102, -136, -113, -114, -115, -18, -20, -21, -33, -138, -138, -78, -81, -138, -59, -36, -37, -64, -45, -59, -43, -60, -138, -34, -36, -37, -29, -30, -32, -34] - -racc_goto_table = [ -126, 44, 125, 43, 144, 144, 160, 93, 97, 52, 166, 82, 144, 40, 41, -39, 138, 146, 169, 30, 36, 94, 44, 1, 123, 129, 169, 52, 90, 37, -52, 167, 147, 92, 120, 121, 31, 32, 33, 34, 35, 170, 58, 166, 59, -83, 170, 166, 151, nil, 150, nil, 166, 159, 4, 166, 4, nil, nil, nil, -nil, 155, nil, 156, 160, nil, nil, 4, 4, 4, 4, 4, nil, 4, 5, -nil, 5, 157, nil, nil, 163, nil, 162, 52, nil, 168, nil, 5, 5, 5, -5, 5, nil, 5, nil, nil, nil, nil, 144, nil, nil, nil, 144, nil, nil, -129, 144, 144, nil, 6, 129, 6, nil, nil, nil, nil, 171, 7, nil, 7, -nil, nil, 6, 6, 6, 6, 6, 8, 6, 8, 7, 7, 7, 7, 7, -11, 7, 11, nil, nil, 8, 8, 8, 8, 8, nil, 8, nil, 11, 11, -11, 11, 11, nil, 11] - -racc_goto_check = [ -22, 24, 21, 23, 36, 36, 37, 18, 16, 34, 35, 41, 36, 19, 20, -17, 25, 25, 28, 3, 13, 23, 24, 1, 23, 24, 28, 34, 14, 15, -34, 29, 32, 17, 19, 20, 1, 1, 1, 1, 1, 33, 1, 35, 38, -39, 33, 35, 42, nil, 41, nil, 35, 22, 4, 35, 4, nil, nil, nil, -nil, 16, nil, 18, 37, nil, nil, 4, 4, 4, 4, 4, nil, 4, 5, -nil, 5, 23, nil, nil, 22, nil, 21, 34, nil, 22, nil, 5, 5, 5, -5, 5, nil, 5, nil, nil, nil, nil, 36, nil, nil, nil, 36, nil, nil, -24, 36, 36, nil, 6, 24, 6, nil, nil, nil, nil, 22, 7, nil, 7, -nil, nil, 6, 6, 6, 6, 6, 8, 6, 8, 7, 7, 7, 7, 7, -11, 7, 11, nil, nil, 8, 8, 8, 8, 8, nil, 8, nil, 11, 11, -11, 11, 11, nil, 11] - -racc_goto_pointer = [nil, 23, nil, 17, 54, 74, 109, 117, 127, nil, nil, 135, nil, 2, -8, 11, -30, -3, -29, -5, -4, -40, -42, -15, -17, -28, nil, nil, -120, -96, nil, nil, -20, -101, -9, -116, -40, -91, 24, 18, nil, -9, -13] - -racc_goto_default = [ -nil, nil, 2, 3, 46, 47, 48, 49, 50, 9, 10, 51, 12, nil, nil, -nil, nil, nil, nil, nil, nil, nil, nil, nil, 140, nil, 45, 127, 139, 128, -141, 130, 142, 143, 132, 131, 134, 98, nil, 28, 27, nil, 60] - -racc_reduce_table = [ - 0, 0, :racc_error, - 1, 27, :_reduce_none, - 2, 28, :_reduce_2, - 1, 28, :_reduce_3, - 1, 29, :_reduce_none, - 1, 29, :_reduce_none, - 1, 29, :_reduce_none, - 1, 29, :_reduce_none, - 1, 29, :_reduce_none, - 1, 29, :_reduce_none, - 1, 29, :_reduce_none, - 1, 29, :_reduce_none, - 1, 29, :_reduce_none, - 3, 30, :_reduce_13, - 3, 31, :_reduce_14, - 3, 32, :_reduce_15, - 3, 33, :_reduce_16, - 3, 34, :_reduce_17, - 4, 35, :_reduce_18, - 3, 35, :_reduce_19, - 2, 40, :_reduce_20, - 2, 40, :_reduce_21, - 1, 40, :_reduce_22, - 1, 40, :_reduce_23, - 2, 41, :_reduce_24, - 2, 41, :_reduce_25, - 1, 41, :_reduce_26, - 1, 41, :_reduce_27, - 2, 39, :_reduce_none, - 4, 39, :_reduce_29, - 4, 39, :_reduce_30, - 2, 43, :_reduce_none, - 4, 43, :_reduce_32, - 1, 44, :_reduce_33, - 3, 44, :_reduce_34, - 1, 45, :_reduce_none, - 3, 45, :_reduce_36, - 3, 45, :_reduce_37, - 2, 46, :_reduce_38, - 2, 46, :_reduce_39, - 1, 46, :_reduce_40, - 1, 46, :_reduce_41, - 1, 47, :_reduce_none, - 2, 51, :_reduce_43, - 1, 51, :_reduce_44, - 2, 53, :_reduce_45, - 1, 53, :_reduce_46, - 1, 50, :_reduce_none, - 1, 50, :_reduce_none, - 1, 50, :_reduce_none, - 1, 50, :_reduce_none, - 1, 50, :_reduce_none, - 1, 50, :_reduce_none, - 1, 54, :_reduce_none, - 1, 54, :_reduce_none, - 1, 55, :_reduce_none, - 1, 55, :_reduce_none, - 1, 56, :_reduce_57, - 1, 52, :_reduce_58, - 1, 57, :_reduce_59, - 2, 58, :_reduce_60, - 1, 58, :_reduce_none, - 2, 49, :_reduce_62, - 1, 49, :_reduce_none, - 2, 48, :_reduce_64, - 1, 48, :_reduce_none, - 1, 60, :_reduce_none, - 1, 60, :_reduce_none, - 1, 60, :_reduce_none, - 1, 60, :_reduce_none, - 1, 60, :_reduce_none, - 1, 62, :_reduce_none, - 1, 62, :_reduce_none, - 1, 59, :_reduce_none, - 1, 59, :_reduce_none, - 1, 61, :_reduce_none, - 1, 61, :_reduce_none, - 1, 61, :_reduce_none, - 2, 42, :_reduce_78, - 1, 42, :_reduce_none, - 1, 63, :_reduce_none, - 2, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 1, 63, :_reduce_none, - 3, 36, :_reduce_101, - 3, 37, :_reduce_102, - 1, 65, :_reduce_none, - 1, 65, :_reduce_none, - 1, 65, :_reduce_none, - 1, 65, :_reduce_none, - 1, 65, :_reduce_none, - 1, 65, :_reduce_none, - 2, 66, :_reduce_109, - 1, 66, :_reduce_none, - 1, 38, :_reduce_111, - 1, 67, :_reduce_none, - 2, 67, :_reduce_113, - 2, 67, :_reduce_114, - 2, 67, :_reduce_115, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 2, 64, :_reduce_136, - 1, 64, :_reduce_none ] - -racc_reduce_n = 138 - -racc_shift_n = 179 - -racc_token_table = { - false => 0, - :error => 1, - :EX_LOW => 2, - :QUOTE => 3, - :BAR => 4, - :SLASH => 5, - :BACK_SLASH => 6, - :URL => 7, - :OTHER => 8, - :REF_OPEN => 9, - :FOOTNOTE_OPEN => 10, - :FOOTNOTE_CLOSE => 11, - :EX_HIGH => 12, - :EM_OPEN => 13, - :EM_CLOSE => 14, - :CODE_OPEN => 15, - :CODE_CLOSE => 16, - :VAR_OPEN => 17, - :VAR_CLOSE => 18, - :KBD_OPEN => 19, - :KBD_CLOSE => 20, - :INDEX_OPEN => 21, - :INDEX_CLOSE => 22, - :REF_CLOSE => 23, - :VERB_OPEN => 24, - :VERB_CLOSE => 25 } - -racc_nt_base = 26 - -racc_use_result_var = true - -Racc_arg = [ - racc_action_table, - racc_action_check, - racc_action_default, - racc_action_pointer, - racc_goto_table, - racc_goto_check, - racc_goto_default, - racc_goto_pointer, - racc_nt_base, - racc_reduce_table, - racc_token_table, - racc_shift_n, - racc_reduce_n, - racc_use_result_var ] - -Racc_token_to_s_table = [ - "$end", - "error", - "EX_LOW", - "QUOTE", - "BAR", - "SLASH", - "BACK_SLASH", - "URL", - "OTHER", - "REF_OPEN", - "FOOTNOTE_OPEN", - "FOOTNOTE_CLOSE", - "EX_HIGH", - "EM_OPEN", - "EM_CLOSE", - "CODE_OPEN", - "CODE_CLOSE", - "VAR_OPEN", - "VAR_CLOSE", - "KBD_OPEN", - "KBD_CLOSE", - "INDEX_OPEN", - "INDEX_CLOSE", - "REF_CLOSE", - "VERB_OPEN", - "VERB_CLOSE", - "$start", - "content", - "elements", - "element", - "emphasis", - "code", - "var", - "keyboard", - "index", - "reference", - "footnote", - "verb", - "normal_str_ele", - "substitute", - "ref_label", - "ref_label2", - "ref_url_strings", - "filename", - "element_label", - "element_label2", - "ref_subst_content", - "ref_subst_content_q", - "ref_subst_strings_q", - "ref_subst_strings_first", - "ref_subst_ele2", - "ref_subst_eles", - "ref_subst_str_ele_first", - "ref_subst_eles_q", - "ref_subst_ele", - "ref_subst_ele_q", - "ref_subst_str_ele", - "ref_subst_str_ele_q", - "ref_subst_strings", - "ref_subst_string3", - "ref_subst_string", - "ref_subst_string_q", - "ref_subst_string2", - "ref_url_string", - "verb_strings", - "normal_string", - "normal_strings", - "verb_string", - "verb_normal_string" ] - -Racc_debug_parser = false - -##### State transition tables end ##### - -# reduce 0 omitted - -# reduce 1 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 81) - def _reduce_2(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 82) - def _reduce_3(val, _values, result) - result = val - result - end -.,., - -# reduce 4 omitted - -# reduce 5 omitted - -# reduce 6 omitted - -# reduce 7 omitted - -# reduce 8 omitted - -# reduce 9 omitted - -# reduce 10 omitted - -# reduce 11 omitted - -# reduce 12 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 96) - def _reduce_13(val, _values, result) - result = Emphasis.new - add_children_to_element(result, *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 101) - def _reduce_14(val, _values, result) - result = Code.new - add_children_to_element(result, *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 106) - def _reduce_15(val, _values, result) - result = Var.new - add_children_to_element(result, *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 111) - def _reduce_16(val, _values, result) - result = Keyboard.new - add_children_to_element(result, *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 116) - def _reduce_17(val, _values, result) - result = Index.new - add_children_to_element(result, *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 125) - def _reduce_18(val, _values, result) - result = Reference.new(val[2]) - add_children_to_element(result, *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 130) - def _reduce_19(val, _values, result) - result = make_reference_from_label(val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 134) - def _reduce_20(val, _values, result) - result = Reference::URL.new(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 136) - def _reduce_21(val, _values, result) - result = Reference::TemporaryLabel.new(val[1], - val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 139) - def _reduce_22(val, _values, result) - result = Reference::TemporaryLabel.new(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 140) - def _reduce_23(val, _values, result) - result = Reference::TemporaryLabel.new([], val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 142) - def _reduce_24(val, _values, result) - result = Reference::URL.new(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 144) - def _reduce_25(val, _values, result) - result = Reference::TemporaryLabel.new(val[1], - val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 147) - def _reduce_26(val, _values, result) - result = Reference::TemporaryLabel.new(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 148) - def _reduce_27(val, _values, result) - result = Reference::TemporaryLabel.new([], - val[0]) - result - end -.,., - -# reduce 28 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 153) - def _reduce_29(val, _values, result) - result = val[1] - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 155) - def _reduce_30(val, _values, result) - result = [StringElement.new(val[1])] - result - end -.,., - -# reduce 31 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 160) - def _reduce_32(val, _values, result) - result = val[1] - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 165) - def _reduce_33(val, _values, result) - result = [StringElement.new(val[0])] - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 167) - def _reduce_34(val, _values, result) - result = [StringElement.new(val[1])] - result - end -.,., - -# reduce 35 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 173) - def _reduce_36(val, _values, result) - result = val[1] - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 175) - def _reduce_37(val, _values, result) - result = [StringElement.new(val[1])] - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 179) - def _reduce_38(val, _values, result) - result = val[1].unshift(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 181) - def _reduce_39(val, _values, result) - result = val[1].unshift(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 183) - def _reduce_40(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 184) - def _reduce_41(val, _values, result) - result = val - result - end -.,., - -# reduce 42 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 189) - def _reduce_43(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 190) - def _reduce_44(val, _values, result) - result = val - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 193) - def _reduce_45(val, _values, result) - result.push(val[1]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 194) - def _reduce_46(val, _values, result) - result = val - result - end -.,., - -# reduce 47 omitted - -# reduce 48 omitted - -# reduce 49 omitted - -# reduce 50 omitted - -# reduce 51 omitted - -# reduce 52 omitted - -# reduce 53 omitted - -# reduce 54 omitted - -# reduce 55 omitted - -# reduce 56 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 211) - def _reduce_57(val, _values, result) - result = StringElement.new(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 214) - def _reduce_58(val, _values, result) - result = StringElement.new(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 217) - def _reduce_59(val, _values, result) - result = StringElement.new(val[0]) - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 221) - def _reduce_60(val, _values, result) - result << val[1] - result - end -.,., - -# reduce 61 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 227) - def _reduce_62(val, _values, result) - result << val[1] - result - end -.,., - -# reduce 63 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 231) - def _reduce_64(val, _values, result) - result << val[1] - result - end -.,., - -# reduce 65 omitted - -# reduce 66 omitted - -# reduce 67 omitted - -# reduce 68 omitted - -# reduce 69 omitted - -# reduce 70 omitted - -# reduce 71 omitted - -# reduce 72 omitted - -# reduce 73 omitted - -# reduce 74 omitted - -# reduce 75 omitted - -# reduce 76 omitted - -# reduce 77 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 254) - def _reduce_78(val, _values, result) - result << val[1] - result - end -.,., - -# reduce 79 omitted - -# reduce 80 omitted - -# reduce 81 omitted - -# reduce 82 omitted - -# reduce 83 omitted - -# reduce 84 omitted - -# reduce 85 omitted - -# reduce 86 omitted - -# reduce 87 omitted - -# reduce 88 omitted - -# reduce 89 omitted - -# reduce 90 omitted - -# reduce 91 omitted - -# reduce 92 omitted - -# reduce 93 omitted - -# reduce 94 omitted - -# reduce 95 omitted - -# reduce 96 omitted - -# reduce 97 omitted - -# reduce 98 omitted - -# reduce 99 omitted - -# reduce 100 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 285) - def _reduce_101(val, _values, result) - result = Footnote.new - add_children_to_element(result, *val[1]) - - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 290) - def _reduce_102(val, _values, result) - result = Verb.new(val[1]) - result - end -.,., - -# reduce 103 omitted - -# reduce 104 omitted - -# reduce 105 omitted - -# reduce 106 omitted - -# reduce 107 omitted - -# reduce 108 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 304) - def _reduce_109(val, _values, result) - result << val[1] - result - end -.,., - -# reduce 110 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 309) - def _reduce_111(val, _values, result) - result = StringElement.new(val[0]) - result - end -.,., - -# reduce 112 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 314) - def _reduce_113(val, _values, result) - result = val[1] - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 315) - def _reduce_114(val, _values, result) - result = val[1] - result - end -.,., - -module_eval(<<'.,.,', 'rdinlineparser.y', 316) - def _reduce_115(val, _values, result) - result = val[1] - result - end -.,., - -# reduce 116 omitted - -# reduce 117 omitted - -# reduce 118 omitted - -# reduce 119 omitted - -# reduce 120 omitted - -# reduce 121 omitted - -# reduce 122 omitted - -# reduce 123 omitted - -# reduce 124 omitted - -# reduce 125 omitted - -# reduce 126 omitted - -# reduce 127 omitted - -# reduce 128 omitted - -# reduce 129 omitted - -# reduce 130 omitted - -# reduce 131 omitted - -# reduce 132 omitted - -# reduce 133 omitted - -# reduce 134 omitted - -# reduce 135 omitted - -module_eval(<<'.,.,', 'rdinlineparser.y', 341) - def _reduce_136(val, _values, result) - result << val[1] - result - end -.,., - -# reduce 137 omitted - -def _reduce_none(val, _values, result) - val[0] -end - -end # class RDInlineParser - -Object.module_eval(<<'...end rdinlineparser.y/module_eval...3', 'rdinlineparser.y', 560) -end # end of module RD -...end rdinlineparser.y/module_eval...3 diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index a205be5b..4c05f1eb 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -290,14 +290,6 @@ def test_nokogiri_css assert_parser_unchanged 'nokogiri-css.y' end - # .y file from bibtex-ruby gem - - def test_bibtex - err = assert_compile 'bibtex.y' - assert_no_warnings err - assert_parser_unchanged 'bibtex.y' - end - # .y file from edtf-ruby gem def test_edtf @@ -357,17 +349,6 @@ def test_huia assert_parser_unchanged 'huia.y' end - # .y files from rdtool gem - - def test_rdtool - err1 = assert_compile 'rdblockparser.y' - err2 = assert_compile 'rdinlineparser.y' - assert_no_warnings err1 - assert_no_warnings err2 - assert_parser_unchanged 'rdblockparser.y' - assert_parser_unchanged 'rdinlineparser.y' - end - # .y file from cast gem def test_cast From e33163374bf45ad0a09b04f1680f0fb6ac536b27 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 11 Mar 2010 22:17:20 +0000 Subject: [PATCH 585/619] * ext/racc/cparse/cparse.c: suppressed warnings for shortening on platforms where pointer is bigger than int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/racc/cparse.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index 6c9291b8..c585f64a 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -13,6 +13,13 @@ #include +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif + /* ----------------------------------------------------------------------- Important Constants ----------------------------------------------------------------------- */ @@ -223,7 +230,7 @@ racc_cparse(VALUE parser, VALUE arg, VALUE sysdebug) D_puts("starting cparse"); v->sys_debug = RTEST(sysdebug); vparams = initialize_params(vparams, parser, arg, Qnil, Qnil); - v->lex_is_iterator = Qfalse; + v->lex_is_iterator = FALSE; parse_main(v, Qnil, Qnil, 0); return v->retval; @@ -240,7 +247,7 @@ racc_yyparse(VALUE parser, VALUE lexer, VALUE lexmid, VALUE arg, VALUE sysdebug) v->sys_debug = RTEST(sysdebug); D_puts("start C yyparse"); vparams = initialize_params(vparams, parser, arg, lexer, lexmid); - v->lex_is_iterator = Qtrue; + v->lex_is_iterator = TRUE; D_puts("params initialized"); parse_main(v, Qnil, Qnil, 0); call_lexer(v); @@ -346,7 +353,7 @@ initialize_params(VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lex v->use_result_var = RTEST(rb_ary_entry(arg, 13)); } else { - v->use_result_var = Qtrue; + v->use_result_var = TRUE; } v->tstack = v->debug ? NEW_STACK() : Qnil; @@ -362,7 +369,7 @@ initialize_params(VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lex v->retval = Qnil; v->fin = 0; - v->lex_is_iterator = Qfalse; + v->lex_is_iterator = FALSE; rb_iv_set(parser, "@vstack", v->vstack); if (v->debug) { From 6e482d910aef2c03e24494f0285b35a42482838a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 22 Apr 2010 08:04:13 +0000 Subject: [PATCH 586/619] * ext/**/*.[ch]: removed trailing spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/racc/cparse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index c585f64a..e1b2db82 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -1,9 +1,9 @@ /* cparse.c -- Racc Runtime Core - + Copyright (c) 1999-2006 Minero Aoki - + This library is free software. You can distribute/modify this program under the same terms of ruby. @@ -295,7 +295,7 @@ lexer_i(VALUE block_args, VALUE data, VALUE self) extract_user_token(v, block_args, &tok, &val); parse_main(v, tok, val, 1); if (v->fin && v->fin != CP_FIN_ACCEPT) - rb_iter_break(); + rb_iter_break(); return Qnil; } @@ -462,7 +462,7 @@ parse_main(struct cparse_params *v, VALUE tok, VALUE val, int resume) if (resume) goto resume; - + while (1) { D_puts(""); D_puts("---- enter new loop ----"); @@ -521,7 +521,7 @@ parse_main(struct cparse_params *v, VALUE tok, VALUE val, int resume) act_fixed: D_printf("act=%ld\n", act); goto handle_act; - + notfound: D_puts("(act) not found: use default"); act_value = AREF(v->action_default, v->curstate); @@ -622,7 +622,7 @@ parse_main(struct cparse_params *v, VALUE tok, VALUE val, int resume) D_puts("(err) found: can handle error token"); break; - + error_pop: D_puts("(err) act not found: can't handle error token; pop"); From 4e437327efcf06190ac60e67317899d3195c2afb Mon Sep 17 00:00:00 2001 From: tenderlove Date: Mon, 15 Nov 2010 02:47:05 +0000 Subject: [PATCH 587/619] * lib/racc/parser.rb (do_parse, yyparse): using class eval to define method and avoid __send__. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/parser.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index a5c3ba00..ca64a14e 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -222,9 +222,11 @@ def _racc_init_sysvars # def next_token # @q.shift # end + class_eval %{ def do_parse - __send__(Racc_Main_Parsing_Routine, _racc_setup(), false) + #{Racc_Main_Parsing_Routine}(_racc_setup(), false) end + } # The method to fetch next token. # If you use #do_parse method, you must implement #next_token. @@ -281,9 +283,11 @@ def _racc_do_parse_rb(arg, in_debug) # # RECEIVER#METHOD_ID is a method to get next token. # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE]. + class_eval %{ def yyparse(recv, mid) - __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), false) + #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), true) end + } def _racc_yyparse_rb(recv, mid, arg, c_debug) action_table, action_check, action_default, action_pointer, From 62857a171ac7244a614a385ad54ec1be39c30f87 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 23 May 2012 07:13:21 +0000 Subject: [PATCH 588/619] use RB_TYPE_P() instead of comparison of TYPE() git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/racc/cparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index e1b2db82..6909c81a 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -418,7 +418,7 @@ extract_user_token(struct cparse_params *v, VALUE block_args, return; } - if (TYPE(block_args) != T_ARRAY) { + if (!RB_TYPE_P(block_args, T_ARRAY)) { rb_raise(rb_eTypeError, "%s() %s %s (must be Array[2])", v->lex_is_iterator ? rb_id2name(v->lexmid) : "next_token", From a4511897fecea4ecb8d55ce913d3178edde53f6a Mon Sep 17 00:00:00 2001 From: zzak Date: Tue, 5 Feb 2013 20:58:01 +0000 Subject: [PATCH 589/619] * lib/racc/parser.rb: Hide copyright notice from Racc doc git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/parser.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index ca64a14e..bdcac2d5 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -1,3 +1,4 @@ +#-- # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. @@ -6,6 +7,7 @@ # As a special exception, when this code is copied by Racc # into a Racc output file, you may use that output file # without restriction. +#++ require 'racc/info' require 'racc/exception' From f3ecce84a44ac47d09464bc23802a8b397ba8556 Mon Sep 17 00:00:00 2001 From: ktsj Date: Sun, 19 May 2013 03:10:21 +0000 Subject: [PATCH 590/619] fix typos. Patch by k_takata. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index bdcac2d5..511d5715 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -31,7 +31,7 @@ # [--version] [--copyright] [--help] grammarfile # # [+filename+] -# Racc grammar file. Any extention is permitted. +# Racc grammar file. Any extension is permitted. # [-o+outfile+, --output-file=+outfile+] # A filename for output. default is <+filename+>.tab.rb # [-O+filename+, --log-file=+filename+] From f18bef22c78dfef5ecc0c17acdedeed7bd253736 Mon Sep 17 00:00:00 2001 From: zzak Date: Tue, 5 Feb 2013 00:56:11 +0000 Subject: [PATCH 591/619] * lib/racc: Merge Racc documentation downstream, add grammar ref file git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/rdoc/grammar.en.rdoc | 226 ++++++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 lib/racc/rdoc/grammar.en.rdoc diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc new file mode 100644 index 00000000..d7b9df01 --- /dev/null +++ b/lib/racc/rdoc/grammar.en.rdoc @@ -0,0 +1,226 @@ += Racc Grammar File Reference + +== Global Structure + +== Class Block and User Code Block + +There's two block on toplevel. +one is 'class' block, another is 'user code' block. 'user code' block MUST +places after 'class' block. + +== Comment + +You can insert comment about all places. Two style comment can be used, +Ruby style (#.....) and C style (/*......*/) . + +== Class Block + +The class block is formed like this: + + class CLASS_NAME + [precedance table] + [token declearations] + [expected number of S/R conflict] + [options] + [semantic value convertion] + [start rule] + rule + GRAMMARS + +CLASS_NAME is a name of parser class. +This is the name of generating parser class. + +If CLASS_NAME includes '::', Racc outputs module clause. +For example, writing "class M::C" causes creating the code bellow: + + module M + class C + : + : + end + end + +== Grammar Block + +The grammar block discripts grammar which is able +to be understood by parser. Syntax is: + + (token): (token) (token) (token).... (action) + + (token): (token) (token) (token).... (action) + | (token) (token) (token).... (action) + | (token) (token) (token).... (action) + +(action) is an action which is executed when its (token)s are found. +(action) is a ruby code block, which is surrounded by braces: + + { print val[0] + puts val[1] } + +Note that you cannot use '%' string, here document, '%r' regexp in action. + +Actions can be omitted. +When it is omitted, '' (empty string) is used. + +A return value of action is a value of left side value ($$). +It is value of result, or returned value by "return" statement. + +Here is an example of whole grammar block. + + rule + goal: definition ruls source { result = val } + + definition: /* none */ { result = [] } + | definition startdesig { result[0] = val[1] } + | definition + precrule # this line continue from upper line + { + result[1] = val[1] + } + + startdesig: START TOKEN + +You can use following special local variables in action. + +* result ($$) + +The value of left-hand side (lhs). A default value is val[0]. + +* val ($1,$2,$3...) + +An array of value of right-hand side (rhs). + +* _values (...$-2,$-1,$0) + +A stack of values. +DO NOT MODIFY this stack unless you know what you are doing. + +== Operator Precedance + +This function is equal to '%prec' in yacc. +To designate this block: + + prechigh + nonassoc '++' + left '*' '/' + left '+' '-' + right '=' + preclow + +`right' is yacc's %right, `left' is yacc's %left. + +`=' + (symbol) means yacc's %prec: + + prechigh + nonassoc UMINUS + left '*' '/' + left '+' '-' + preclow + + rule + exp: exp '*' exp + | exp '-' exp + | '-' exp =UMINUS # equals to "%prec UMINUS" + : + : + +== expect + +Racc has bison's "expect" directive. + + # Example + + class MyParser + rule + expect 3 + : + : + +This directive declears "expected" number of shift/reduce conflict. +If "expected" number is equal to real number of conflicts, +racc does not print confliction warning message. + +== Declaring Tokens + +By declaring tokens, you can avoid many meanless bugs. +If decleared token does not exist/existing token does not decleared, +Racc output warnings. Declearation syntax is: + + token TOKEN_NAME AND_IS_THIS + ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST + +== Options + +You can write options for racc command in your racc file. + + options OPTION OPTION ... + +Options are: + +* omit_action_call + +omit empty action call or not. + +* result_var + +use/does not use local variable "result" + +You can use 'no_' prefix to invert its meanings. + +== Converting Token Symbol + +Token symbols are, as default, + + * naked token string in racc file (TOK, XFILE, this_is_token, ...) + --> symbol (:TOK, :XFILE, :this_is_token, ...) + * quoted string (':', '.', '(', ...) + --> same string (':', '.', '(', ...) + +You can change this default by "convert" block. +Here is an example: + + convert + PLUS 'PlusClass' # We use PlusClass for symbol of `PLUS' + MIN 'MinusClass' # We use MinusClass for symbol of `MIN' + end + +We can use almost all ruby value can be used by token symbol, +except 'false' and 'nil'. These are causes unexpected parse error. + +If you want to use String as token symbol, special care is required. +For example: + + convert + class '"cls"' # in code, "cls" + PLUS '"plus\n"' # in code, "plus\n" + MIN "\"minus#{val}\"" # in code, \"minus#{val}\" + end + +== Start Rule + +'%start' in yacc. This changes start rule. + + start real_target + +This statement will not be used forever, I think. + +== User Code Block + +"User Code Block" is a Ruby source code which is copied to output. +There are three user code block, "header" "inner" and "footer". + +Format of user code is like this: + + ---- header + ruby statement + ruby statement + ruby statement + + ---- inner + ruby statement + : + : + +If four '-' exist on line head, +racc treat it as beginning of user code block. +A name of user code must be one word. From 9f4b2606a874da7f93b0f9fb66fbe5c4384fe9b7 Mon Sep 17 00:00:00 2001 From: zzak Date: Sat, 9 Nov 2013 15:34:25 +0000 Subject: [PATCH 592/619] * lib/racc/rdoc/grammar.en.rdoc: [DOC] fix typo by Tsuyoshi Sawada [Bug #9077] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/rdoc/grammar.en.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc index d7b9df01..b667a7cb 100644 --- a/lib/racc/rdoc/grammar.en.rdoc +++ b/lib/racc/rdoc/grammar.en.rdoc @@ -95,7 +95,7 @@ An array of value of right-hand side (rhs). A stack of values. DO NOT MODIFY this stack unless you know what you are doing. -== Operator Precedance +== Operator Precedence This function is equal to '%prec' in yacc. To designate this block: From 643999bde7d1a5f7ea04bb40445fb9ed6d3d0500 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 29 Nov 2013 07:59:14 +0000 Subject: [PATCH 593/619] ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLIST * include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration argument list of rb_block_call_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/racc/cparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index 6909c81a..5f907d7f 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -194,7 +194,7 @@ static VALUE racc_yyparse _((VALUE parser, VALUE lexer, VALUE lexmid, VALUE arg, VALUE sysdebug)); static void call_lexer _((struct cparse_params *v)); -static VALUE lexer_i _((VALUE block_args, VALUE data, VALUE self)); +static VALUE lexer_i _((RB_BLOCK_CALL_FUNC_ARGLIST(block_args, data))); static VALUE assert_array _((VALUE a)); static long assert_integer _((VALUE n)); @@ -284,7 +284,7 @@ call_lexer(struct cparse_params *v) #endif static VALUE -lexer_i(VALUE block_args, VALUE data, VALUE self) +lexer_i(RB_BLOCK_CALL_FUNC_ARGLIST(block_args, data)) { struct cparse_params *v; VALUE tok, val; From 3dfb80438ccbf5b3c73bdc82b1754de891d24d68 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 13 Jan 2014 00:57:38 +0000 Subject: [PATCH 594/619] ext: use PRIsVALUE for rb_raise and rb_warn * ext/bigdecimal/bigdecimal.c (BigDecimal_new): use PRIsVALUE for rb_raise() and rb_warn(). * ext/openssl/ossl_cipher.c (ossl_cipher_init): ditto. * ext/racc/cparse/cparse.c (extract_user_token): ditto. * ext/syslog/syslog.c (mSyslog_log): ditto. * ext/openssl/ossl.h (OSSL_Check_Kind, OSSL_Check_Instance): now ossl_raise() also accepts PRIsVALUE. * ext/openssl/ossl_asn1.c (ossl_asn1_default_tag): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/racc/cparse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index 5f907d7f..4fd00429 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -420,10 +420,10 @@ extract_user_token(struct cparse_params *v, VALUE block_args, if (!RB_TYPE_P(block_args, T_ARRAY)) { rb_raise(rb_eTypeError, - "%s() %s %s (must be Array[2])", + "%s() %s %"PRIsVALUE" (must be Array[2])", v->lex_is_iterator ? rb_id2name(v->lexmid) : "next_token", v->lex_is_iterator ? "yielded" : "returned", - rb_class2name(CLASS_OF(block_args))); + rb_obj_class(block_args)); } if (RARRAY_LEN(block_args) != 2) { rb_raise(rb_eArgError, From 925c22405108d38968f3ac3c48ab2ad2e8510977 Mon Sep 17 00:00:00 2001 From: zzak Date: Fri, 24 Jan 2014 06:15:15 +0000 Subject: [PATCH 595/619] * lib/racc/rdoc/grammar.en.rdoc: [DOC] Correct grammar and typos Patch by Giorgos Tsiftsis [Bug #9429] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/rdoc/grammar.en.rdoc | 81 ++++++++++++++++------------------- 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc index b667a7cb..a154246e 100644 --- a/lib/racc/rdoc/grammar.en.rdoc +++ b/lib/racc/rdoc/grammar.en.rdoc @@ -4,14 +4,12 @@ == Class Block and User Code Block -There's two block on toplevel. -one is 'class' block, another is 'user code' block. 'user code' block MUST -places after 'class' block. +There are two blocks on toplevel. One is 'class' block, another is 'user code' +block. 'user code' block MUST be placed after 'class' block. -== Comment +== Comments -You can insert comment about all places. Two style comment can be used, -Ruby style (#.....) and C style (/*......*/) . +You can insert comments about all places. Two style comments can be used, Ruby style '#.....' and C style '/\*......*\/'. == Class Block @@ -19,19 +17,19 @@ The class block is formed like this: class CLASS_NAME [precedance table] - [token declearations] - [expected number of S/R conflict] + [token declarations] + [expected number of S/R conflicts] [options] [semantic value convertion] [start rule] rule GRAMMARS -CLASS_NAME is a name of parser class. -This is the name of generating parser class. +CLASS_NAME is a name of parser class. This is the name of generating parser +class. -If CLASS_NAME includes '::', Racc outputs module clause. -For example, writing "class M::C" causes creating the code bellow: +If CLASS_NAME includes '::', Racc outputs module clause. For example, writing +"class M::C" causes creating the code bellow: module M class C @@ -42,8 +40,8 @@ For example, writing "class M::C" causes creating the code bellow: == Grammar Block -The grammar block discripts grammar which is able -to be understood by parser. Syntax is: +The grammar block describes grammar which is able to be understood by parser. +Syntax is: (token): (token) (token) (token).... (action) @@ -59,28 +57,27 @@ to be understood by parser. Syntax is: Note that you cannot use '%' string, here document, '%r' regexp in action. -Actions can be omitted. -When it is omitted, '' (empty string) is used. +Actions can be omitted. When it is omitted, '' (empty string) is used. -A return value of action is a value of left side value ($$). -It is value of result, or returned value by "return" statement. +A return value of action is a value of left side value ($$). It is value of +result, or returned value by `return` statement. Here is an example of whole grammar block. rule - goal: definition ruls source { result = val } + goal: definition rules source { result = val } definition: /* none */ { result = [] } | definition startdesig { result[0] = val[1] } | definition - precrule # this line continue from upper line + precrule # this line continues from upper line { result[1] = val[1] } startdesig: START TOKEN -You can use following special local variables in action. +You can use the following special local variables in action: * result ($$) @@ -92,8 +89,7 @@ An array of value of right-hand side (rhs). * _values (...$-2,$-1,$0) -A stack of values. -DO NOT MODIFY this stack unless you know what you are doing. +A stack of values. DO NOT MODIFY this stack unless you know what you are doing. == Operator Precedence @@ -107,9 +103,9 @@ To designate this block: right '=' preclow -`right' is yacc's %right, `left' is yacc's %left. +`right` is yacc's %right, `left` is yacc's %left. -`=' + (symbol) means yacc's %prec: +`=` + (symbol) means yacc's %prec: prechigh nonassoc UMINUS @@ -136,22 +132,22 @@ Racc has bison's "expect" directive. : : -This directive declears "expected" number of shift/reduce conflict. -If "expected" number is equal to real number of conflicts, -racc does not print confliction warning message. +This directive declares "expected" number of shift/reduce conflicts. If +"expected" number is equal to real number of conflicts, Racc does not print +conflict warning message. == Declaring Tokens -By declaring tokens, you can avoid many meanless bugs. -If decleared token does not exist/existing token does not decleared, -Racc output warnings. Declearation syntax is: +By declaring tokens, you can avoid many meaningless bugs. If declared token +does not exist or existing token does not decleared, Racc output warnings. +Declaration syntax is: token TOKEN_NAME AND_IS_THIS ALSO_THIS_IS AGAIN_AND_AGAIN THIS_IS_LAST == Options -You can write options for racc command in your racc file. +You can write options for Racc command in your Racc file. options OPTION OPTION ... @@ -159,19 +155,19 @@ Options are: * omit_action_call -omit empty action call or not. +omits empty action call or not. * result_var -use/does not use local variable "result" +uses local variable "result" or not. -You can use 'no_' prefix to invert its meanings. +You can use 'no_' prefix to invert their meanings. == Converting Token Symbol Token symbols are, as default, - * naked token string in racc file (TOK, XFILE, this_is_token, ...) + * naked token string in Racc file (TOK, XFILE, this_is_token, ...) --> symbol (:TOK, :XFILE, :this_is_token, ...) * quoted string (':', '.', '(', ...) --> same string (':', '.', '(', ...) @@ -185,7 +181,7 @@ Here is an example: end We can use almost all ruby value can be used by token symbol, -except 'false' and 'nil'. These are causes unexpected parse error. +except 'false' and 'nil'. These cause unexpected parse error. If you want to use String as token symbol, special care is required. For example: @@ -202,12 +198,10 @@ For example: start real_target -This statement will not be used forever, I think. - == User Code Block -"User Code Block" is a Ruby source code which is copied to output. -There are three user code block, "header" "inner" and "footer". +"User Code Block" is a Ruby source code which is copied to output. There are +three user code blocks, "header" "inner" and "footer". Format of user code is like this: @@ -221,6 +215,5 @@ Format of user code is like this: : : -If four '-' exist on line head, -racc treat it as beginning of user code block. -A name of user code must be one word. +If four '-' exist on line head, Racc treat it as beginning of user code block. +The name of user code block must be one word. From 55fa7fc06c9ce152b25400563a3a0974d766674e Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 29 Sep 2014 14:13:50 +0000 Subject: [PATCH 596/619] racc/cparse: private class * ext/racc/cparse/cparse.c (Init_cparse): Racc::CparseParams is a private class, undefine allocate and initialize methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/racc/cparse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index 4fd00429..99d51595 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -219,6 +219,9 @@ static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self)); # define D_printf(fmt,arg) #endif +#undef RUBY_UNTYPED_DATA_WARNING +#define RUBY_UNTYPED_DATA_WARNING 0 + static VALUE racc_cparse(VALUE parser, VALUE arg, VALUE sysdebug) { @@ -811,6 +814,9 @@ Init_cparse(void) rb_define_private_method(Parser, "_racc_yyparse_c", racc_yyparse, 4); CparseParams = rb_define_class_under(Racc, "CparseParams", rb_cObject); + rb_undef_alloc_func(CparseParams); + rb_undef_method(CparseParams, "initialize"); + rb_undef_method(CparseParams, "initialize_copy"); RaccBug = rb_eRuntimeError; From d102520398c0b054762e88ac7401a3a74f374a1d Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 3 Dec 2014 00:48:59 +0000 Subject: [PATCH 597/619] cparse.c: typed data * ext/racc/cparse/cparse.c (cparse_params_type): use typed data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/racc/cparse.c | 50 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/ext/racc/cparse.c b/ext/racc/cparse.c index 99d51595..d5e367c0 100644 --- a/ext/racc/cparse.c +++ b/ext/racc/cparse.c @@ -202,6 +202,7 @@ static VALUE assert_hash _((VALUE h)); static VALUE initialize_params _((VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lexmid)); static void cparse_params_mark _((void *ptr)); +static size_t cparse_params_memsize _((const void *ptr)); static void parse_main _((struct cparse_params *v, VALUE tok, VALUE val, int resume)); @@ -220,33 +221,47 @@ static VALUE reduce0 _((VALUE block_args, VALUE data, VALUE self)); #endif #undef RUBY_UNTYPED_DATA_WARNING -#define RUBY_UNTYPED_DATA_WARNING 0 +#define RUBY_UNTYPED_DATA_WARNING 1 + +static const rb_data_type_t cparse_params_type = { + "racc/cparse", + { + cparse_params_mark, + RUBY_TYPED_DEFAULT_FREE, + cparse_params_memsize, + }, +#ifdef RUBY_TYPED_FREE_IMMEDIATELY + 0, 0, + RUBY_TYPED_FREE_IMMEDIATELY, +#endif +}; static VALUE racc_cparse(VALUE parser, VALUE arg, VALUE sysdebug) { - volatile VALUE vparams; + VALUE vparams; struct cparse_params *v; - vparams = Data_Make_Struct(CparseParams, struct cparse_params, - cparse_params_mark, -1, v); + vparams = TypedData_Make_Struct(CparseParams, struct cparse_params, + &cparse_params_type, v); D_puts("starting cparse"); v->sys_debug = RTEST(sysdebug); vparams = initialize_params(vparams, parser, arg, Qnil, Qnil); v->lex_is_iterator = FALSE; parse_main(v, Qnil, Qnil, 0); + RB_GC_GUARD(vparams); return v->retval; } static VALUE racc_yyparse(VALUE parser, VALUE lexer, VALUE lexmid, VALUE arg, VALUE sysdebug) { - volatile VALUE vparams; + VALUE vparams; struct cparse_params *v; - vparams = Data_Make_Struct(CparseParams, struct cparse_params, - cparse_params_mark, -1, v); + vparams = TypedData_Make_Struct(CparseParams, struct cparse_params, + &cparse_params_type, v); v->sys_debug = RTEST(sysdebug); D_puts("start C yyparse"); vparams = initialize_params(vparams, parser, arg, lexer, lexmid); @@ -259,6 +274,7 @@ racc_yyparse(VALUE parser, VALUE lexer, VALUE lexmid, VALUE arg, VALUE sysdebug) rb_id2name(v->lexmid)); } + RB_GC_GUARD(vparams); return v->retval; } @@ -272,9 +288,8 @@ call_lexer(struct cparse_params *v) static VALUE lexer_iter(VALUE data) { - struct cparse_params *v; + struct cparse_params *v = rb_check_typeddata(data, &cparse_params_type); - Data_Get_Struct(data, struct cparse_params, v); rb_funcall(v->lexer, v->lexmid, 0); return Qnil; } @@ -289,10 +304,9 @@ call_lexer(struct cparse_params *v) static VALUE lexer_i(RB_BLOCK_CALL_FUNC_ARGLIST(block_args, data)) { - struct cparse_params *v; + struct cparse_params *v = rb_check_typeddata(data, &cparse_params_type); VALUE tok, val; - Data_Get_Struct(data, struct cparse_params, v); if (v->fin) rb_raise(rb_eArgError, "extra token after EndOfToken"); extract_user_token(v, block_args, &tok, &val); @@ -325,9 +339,8 @@ assert_integer(VALUE n) static VALUE initialize_params(VALUE vparams, VALUE parser, VALUE arg, VALUE lexer, VALUE lexmid) { - struct cparse_params *v; + struct cparse_params *v = rb_check_typeddata(vparams, &cparse_params_type); - Data_Get_Struct(vparams, struct cparse_params, v); v->value_v = vparams; v->parser = parser; v->lexer = lexer; @@ -410,6 +423,12 @@ cparse_params_mark(void *ptr) rb_gc_mark(v->retval); } +static size_t +cparse_params_memsize(const void *ptr) +{ + return sizeof(struct cparse_params); +} + static void extract_user_token(struct cparse_params *v, VALUE block_args, VALUE *tok, VALUE *val) @@ -689,7 +708,7 @@ reduce(struct cparse_params *v, long act) static VALUE reduce0(VALUE val, VALUE data, VALUE self) { - struct cparse_params *v; + struct cparse_params *v = rb_check_typeddata(data, &cparse_params_type); VALUE reduce_to, reduce_len, method_id; long len; ID mid; @@ -697,7 +716,6 @@ reduce0(VALUE val, VALUE data, VALUE self) long i, k1, k2; VALUE goto_state; - Data_Get_Struct(data, struct cparse_params, v); reduce_len = rb_ary_entry(v->reduce_table, v->ruleno); reduce_to = rb_ary_entry(v->reduce_table, v->ruleno+1); method_id = rb_ary_entry(v->reduce_table, v->ruleno+2); @@ -799,6 +817,8 @@ reduce0(VALUE val, VALUE data, VALUE self) void Init_cparse(void) { +#undef rb_intern +#define rb_intern(str) rb_intern_const(str) VALUE Racc, Parser; ID id_racc = rb_intern("Racc"); From 3d389eca538aaedb032f1c7d2b43d1065db6f12d Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 14 Sep 2015 02:12:12 +0000 Subject: [PATCH 598/619] Fix typo in racc english documentation [ci skip] * lib/racc/rdoc/grammar.en.rdoc: [DOC] fix typo, "convertion" to "conversion". [Fix GH-1016] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/rdoc/grammar.en.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc index a154246e..28d51290 100644 --- a/lib/racc/rdoc/grammar.en.rdoc +++ b/lib/racc/rdoc/grammar.en.rdoc @@ -20,7 +20,7 @@ The class block is formed like this: [token declarations] [expected number of S/R conflicts] [options] - [semantic value convertion] + [semantic value conversion] [start rule] rule GRAMMARS From 7a862467dbef7d8bd917689e8f5566bfa939af00 Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 14 Oct 2015 04:37:31 +0000 Subject: [PATCH 599/619] * lib/racc/rdoc/grammar.en.rdoc: fix spell error. [fix GH-1053][ci skip] Patch by @Matrixbirds git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/rdoc/grammar.en.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc index 28d51290..02a3891b 100644 --- a/lib/racc/rdoc/grammar.en.rdoc +++ b/lib/racc/rdoc/grammar.en.rdoc @@ -29,7 +29,7 @@ CLASS_NAME is a name of parser class. This is the name of generating parser class. If CLASS_NAME includes '::', Racc outputs module clause. For example, writing -"class M::C" causes creating the code bellow: +"class M::C" causes creating the code below: module M class C From 47bdce2b529cba1877cfad17738590a98c89d33f Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 26 Oct 2015 13:23:32 +0000 Subject: [PATCH 600/619] Grammatical fixes [ci skip] * lib/racc/rdoc/grammar.en.rdoc: Grammatical errors fixed. [Fix GH-1070] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/rdoc/grammar.en.rdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc index 02a3891b..824d0ee1 100644 --- a/lib/racc/rdoc/grammar.en.rdoc +++ b/lib/racc/rdoc/grammar.en.rdoc @@ -215,5 +215,5 @@ Format of user code is like this: : : -If four '-' exist on line head, Racc treat it as beginning of user code block. -The name of user code block must be one word. +If four '-' exist on the line head, Racc treats it as the beginning of the +user code block. The name of the user code block must be one word. From 2125bbf88f7bc12ddc5e413b5650154f73b31c30 Mon Sep 17 00:00:00 2001 From: naruse Date: Wed, 16 Dec 2015 05:07:31 +0000 Subject: [PATCH 601/619] Add frozen_string_literal: false for all files When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/parser.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 511d5715..26bac877 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: false #-- # Copyright (c) 1999-2006 Minero Aoki # From 2a99e419f0fc7c8a31ce3c563e6c13e356ed7055 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 6 Jul 2016 05:48:13 +0000 Subject: [PATCH 602/619] Update dependencies * common.mk (compile.o, loadpath.o): update dependencies. * common.mk (vm_call.o): remove stale object dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/racc/depend | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ext/racc/depend b/ext/racc/depend index 720b414c..441d4df0 100644 --- a/ext/racc/depend +++ b/ext/racc/depend @@ -1 +1,12 @@ -cparse.o: cparse.c $(hdrdir)/ruby/ruby.h $(topdir)/config.h $(hdrdir)/ruby/defines.h +# AUTOGENERATED DEPENDENCIES START +cparse.o: $(RUBY_EXTCONF_H) +cparse.o: $(arch_hdrdir)/ruby/config.h +cparse.o: $(hdrdir)/ruby/backward.h +cparse.o: $(hdrdir)/ruby/defines.h +cparse.o: $(hdrdir)/ruby/intern.h +cparse.o: $(hdrdir)/ruby/missing.h +cparse.o: $(hdrdir)/ruby/ruby.h +cparse.o: $(hdrdir)/ruby/st.h +cparse.o: $(hdrdir)/ruby/subst.h +cparse.o: cparse.c +# AUTOGENERATED DEPENDENCIES END From 79f98e806f34e4852043ccade842d9577dbbbf95 Mon Sep 17 00:00:00 2001 From: a_matsuda Date: Tue, 8 Nov 2016 19:55:59 +0000 Subject: [PATCH 603/619] Fix grammar errors Patch by: Chris Tweedie (@cltweedie) Signed-off-by: Akira Matsuda closes #1074 [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/rdoc/grammar.en.rdoc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc index 824d0ee1..c00e19da 100644 --- a/lib/racc/rdoc/grammar.en.rdoc +++ b/lib/racc/rdoc/grammar.en.rdoc @@ -4,12 +4,12 @@ == Class Block and User Code Block -There are two blocks on toplevel. One is 'class' block, another is 'user code' -block. 'user code' block MUST be placed after 'class' block. +There are two blocks on the toplevel. One is the 'class' block, the other is the 'user code' +block. The 'user code' block MUST be placed after the 'class' block. == Comments -You can insert comments about all places. Two style comments can be used, Ruby style '#.....' and C style '/\*......*\/'. +You can insert comments about all places. Two styles of comments can be used, Ruby style '#.....' and C style '/\*......*\/'. == Class Block @@ -25,11 +25,11 @@ The class block is formed like this: rule GRAMMARS -CLASS_NAME is a name of parser class. This is the name of generating parser +CLASS_NAME is a name of the parser class. This is the name of the generating parser class. -If CLASS_NAME includes '::', Racc outputs module clause. For example, writing -"class M::C" causes creating the code below: +If CLASS_NAME includes '::', Racc outputs the module clause. For example, writing +"class M::C" causes the code below to be created: module M class C @@ -40,7 +40,7 @@ If CLASS_NAME includes '::', Racc outputs module clause. For example, writing == Grammar Block -The grammar block describes grammar which is able to be understood by parser. +The grammar block describes grammar which is able to be understood by the parser. Syntax is: (token): (token) (token) (token).... (action) @@ -59,10 +59,10 @@ Note that you cannot use '%' string, here document, '%r' regexp in action. Actions can be omitted. When it is omitted, '' (empty string) is used. -A return value of action is a value of left side value ($$). It is value of -result, or returned value by `return` statement. +A return value of action is a value of the left side value ($$). It is the value of the +result, or the returned value by `return` statement. -Here is an example of whole grammar block. +Here is an example of the whole grammar block. rule goal: definition rules source { result = val } @@ -81,11 +81,11 @@ You can use the following special local variables in action: * result ($$) -The value of left-hand side (lhs). A default value is val[0]. +The value of the left-hand side (lhs). A default value is val[0]. * val ($1,$2,$3...) -An array of value of right-hand side (rhs). +An array of value of the right-hand side (rhs). * _values (...$-2,$-1,$0) From 974067902bbfbaa49cd54ffaaa6c1ab7cf373423 Mon Sep 17 00:00:00 2001 From: hsbt Date: Sun, 22 Oct 2017 11:27:06 +0000 Subject: [PATCH 604/619] Fixed misspelling words. These are detected by https://github.com/client9/misspell git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/rdoc/grammar.en.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/rdoc/grammar.en.rdoc b/lib/racc/rdoc/grammar.en.rdoc index c00e19da..af10803f 100644 --- a/lib/racc/rdoc/grammar.en.rdoc +++ b/lib/racc/rdoc/grammar.en.rdoc @@ -16,7 +16,7 @@ You can insert comments about all places. Two styles of comments can be used, Ru The class block is formed like this: class CLASS_NAME - [precedance table] + [precedence table] [token declarations] [expected number of S/R conflicts] [options] From 72f0489d9f36eda648b612e7d7437f3331bbc7e7 Mon Sep 17 00:00:00 2001 From: marcandre Date: Fri, 2 Nov 2018 17:52:33 +0000 Subject: [PATCH 605/619] lib/*: Prefer require_relative over require. [#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 26bac877..2282d1c4 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -161,7 +161,7 @@ class Parser require 'racc/cparse-jruby.jar' com.headius.racc.Cparse.new.load(JRuby.runtime, false) else - require 'racc/cparse' + require_relative 'cparse' end unless new.respond_to?(:_racc_do_parse_c, true) From 1577b61e500319d465f6af921f7bc6af72e1ff99 Mon Sep 17 00:00:00 2001 From: stomar Date: Sat, 3 Nov 2018 08:43:19 +0000 Subject: [PATCH 606/619] lib/racc/parser.rb: use require for racc/cparse * lib/racc/parser.rb: reverted r65505. require_relative does not work for racc/cparse.so, as extension libraries are placed in other directories than Ruby libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/racc/parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 2282d1c4..26bac877 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -161,7 +161,7 @@ class Parser require 'racc/cparse-jruby.jar' com.headius.racc.Cparse.new.load(JRuby.runtime, false) else - require_relative 'cparse' + require 'racc/cparse' end unless new.respond_to?(:_racc_do_parse_c, true) From ae64a74f3dd7ce94d6d5ec322052a0ecff8da524 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 11 May 2019 09:03:43 +0900 Subject: [PATCH 607/619] Use the latest stable versions. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1c9af7fa..2094ec1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,10 @@ cache: - /home/travis/.rvm/ language: ruby rvm: - - 2.2.8 - - 2.3.5 - 2.4.2 - - jruby-9.2.4.0 + - 2.5.5 + - 2.6.3 + - jruby-9.2.7.0 - ruby-head matrix: allow_failures: From c88b0a01be02c59c3163cdcd02ac51b39e5e5414 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 11 May 2019 12:41:43 +0900 Subject: [PATCH 608/619] Allow failure with jruby-9.2.7.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2094ec1b..e84bf191 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ rvm: matrix: allow_failures: - rvm: ruby-head - - rvm: jruby-9.2.4.0 + - rvm: jruby-9.2.7.0 before_install: gem update --remote bundler install: - bundle install --retry 3 From 5783b638b11459c526a891f18e1992bb8194d93f Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Wed, 15 May 2019 19:07:14 -0500 Subject: [PATCH 609/619] update travis.yml & run_tests.sh --- .travis.yml | 10 +++++++--- test/run_tests.sh | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e84bf191..100b0b3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,25 @@ --- -sudo: false +dist: xenial + cache: - bundler - directories: - /home/travis/.rvm/ language: ruby + rvm: - - 2.4.2 + - 2.4.6 - 2.5.5 - 2.6.3 - jruby-9.2.7.0 - ruby-head + matrix: + fast_finish: true allow_failures: - rvm: ruby-head - rvm: jruby-9.2.7.0 -before_install: gem update --remote bundler + install: - bundle install --retry 3 script: ./test/run_tests.sh diff --git a/test/run_tests.sh b/test/run_tests.sh index aa67e4a1..b308aefb 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -1,12 +1,13 @@ #!/usr/bin/env bash +# as of 2019-05, Travis Rubies 2.4 and later have RubyGems 3.0.3 or later installed + set -eux test_frozen_strings=$(ruby -e 'puts ((RUBY_ENGINE == "ruby" || RUBY_ENGINE == "jruby") && RUBY_VERSION > "2.4")') if [[ $test_frozen_strings == "true" ]] ; then echo "NOTE: enabling frozen string literals" - rvm install rubygems 2.6.12 --force # because of an issue in rubygems 2.7 with ruby 2.5 and frozen string literals export RUBYOPT="--enable-frozen-string-literal --debug=frozen-string-literal" fi From 9154bc1fc81af951fa413415e475b526eae8fc73 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 15 May 2019 10:18:17 +0900 Subject: [PATCH 610/619] Added appveyor.yml --- appveyor.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..9b434872 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,23 @@ +--- +clone_depth: 10 +install: + - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% + - gem install minitest +build: off +test_script: + - rake test +deploy: off +environment: + matrix: + - ruby_version: "200" + - ruby_version: "200-x64" + - ruby_version: "21" + - ruby_version: "21-x64" + - ruby_version: "22" + - ruby_version: "22-x64" + - ruby_version: "23" + - ruby_version: "23-x64" + - ruby_version: "24" + - ruby_version: "24-x64" + - ruby_version: "25" + - ruby_version: "25-x64" From c650ffddc021668ec12005648a788dc6abf4490b Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 15 May 2019 13:00:28 +0900 Subject: [PATCH 611/619] Added hoe --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 9b434872..091585a2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - gem install minitest + - gem install minitest hoe build: off test_script: - rake test From 219fb561228e3b54917ee4806aa70e23b4ebef27 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 15 May 2019 15:22:59 +0900 Subject: [PATCH 612/619] Added rake-compiler --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 091585a2..170b8091 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - gem install minitest hoe + - gem install minitest hoe rake-compiler build: off test_script: - rake test From ea8e93d1dc822561af0022f8c650a43666788e45 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 15 May 2019 15:45:05 +0900 Subject: [PATCH 613/619] Added rubocop --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 170b8091..79d777b8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ clone_depth: 10 install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - gem install minitest hoe rake-compiler + - gem install minitest hoe rake-compiler rubocop build: off test_script: - rake test From 00fe804ac011ad06a0fc9b9f0c0cf4f37f31e697 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Wed, 15 May 2019 09:01:49 -0500 Subject: [PATCH 614/619] Update appveyor.yml, remove old Rubies for now --- appveyor.yml | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 79d777b8..827bbf8c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,23 +1,40 @@ --- +image: Visual Studio 2017 + clone_depth: 10 + +build: off +deploy: off + install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - gem install minitest hoe rake-compiler rubocop -build: off + - gem install minitest hoe rake-compiler rubocop --no-document --conservative + - ps: | + $rv = $env:ruby_version + if ( $rv.EndsWith('-x64') ) { + C:/msys64/usr/bin/pacman -S --noconfirm --needed --noprogressbar mingw-w64-x86_64-ragel + $env:PATH = "C:/Ruby$rv/bin;$env:PATH;C:/msys64/mingw64/bin" + } else { + C:/msys64/usr/bin/pacman -S --noconfirm --needed --noprogressbar mingw-w64-i686-ragel + $env:PATH = "C:/Ruby$rv/bin;$env:PATH;C:/msys64/mingw32/bin" + } + test_script: - - rake test -deploy: off + - rake -rdevkit test + environment: matrix: - - ruby_version: "200" - - ruby_version: "200-x64" - - ruby_version: "21" - - ruby_version: "21-x64" - - ruby_version: "22" - - ruby_version: "22-x64" - - ruby_version: "23" - - ruby_version: "23-x64" +# - ruby_version: "200" +# - ruby_version: "200-x64" +# - ruby_version: "21" +# - ruby_version: "21-x64" +# - ruby_version: "22" +# - ruby_version: "22-x64" +# - ruby_version: "23" +# - ruby_version: "23-x64" - ruby_version: "24" - ruby_version: "24-x64" - ruby_version: "25" - ruby_version: "25-x64" + - ruby_version: "26" + - ruby_version: "26-x64" From 3c17cb7ae73c04749ab3319925ef45aa4ab2b907 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Wed, 15 May 2019 11:55:14 -0500 Subject: [PATCH 615/619] Update tests --- test/helper.rb | 28 +++++++++++++++------------- test/test_racc_command.rb | 6 +++++- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/test/helper.rb b/test/helper.rb index a1c61633..3e8fd2cc 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -10,6 +10,7 @@ require 'fileutils' require 'tempfile' require 'timeout' +require 'open3' module Racc class TestCase < Minitest::Test @@ -40,7 +41,7 @@ def assert_compile(asset, args = '', expect_success = true) "#{ASSET_DIR}/#{file}.y", "-o#{TAB_DIR}/#{file}", ] - racc "#{args.join(' ')}", expect_success + racc "#{args.join(' ')}", file, expect_success end def assert_error(asset, args = '') @@ -63,7 +64,7 @@ def assert_no_warnings(dbg_output) def assert_exec(asset, embedded_runtime = false) file = File.basename(asset, '.y') Dir.chdir(PROJECT_DIR) do - ruby("#{TAB_DIR}/#{file}", true, !embedded_runtime) + ruby("#{TAB_DIR}/#{file}", file, true, !embedded_runtime) end end @@ -91,21 +92,22 @@ def assert_html_unchanged(asset) end end - def racc(arg, expect_success = true) - ruby "#{RACC} #{arg}", expect_success + def racc(arg, file, expect_success = true) + ruby "#{RACC} #{arg}", file, expect_success end - def ruby(arg, expect_success = true, load_racc = true) + def ruby(arg, file, expect_success = true, load_racc = true) + err = '' + result = nil Dir.chdir(PROJECT_DIR) do - Tempfile.open('test') do |io| - arg = "-I #{INC} #{arg}" if load_racc - result = system("#{ruby_executable} #{arg} 2>#{io.path}") - io.flush - err = io.read - assert(result, err) if expect_success - return err - end + o, err, s = Open3.capture3 "#{ruby_executable} -Ilib #{arg}" + result = s.success? end + if expect_success + assert(result, err) + assert(File.exist?("./#{TAB_DIR}/#{file}"), "No file created!") + end + return err end def ruby_executable diff --git a/test/test_racc_command.rb b/test/test_racc_command.rb index 4c05f1eb..2740a060 100644 --- a/test/test_racc_command.rb +++ b/test/test_racc_command.rb @@ -54,7 +54,11 @@ def test_executable_parser err = assert_compile 'echk.y', "-E -e ruby" assert_no_warnings err Dir.chdir(PROJECT_DIR) do - assert(system("#{TAB_DIR}/echk")) + if windows? + assert(system "#{ruby_executable} ./#{TAB_DIR}/echk") + else + assert(system "#{TAB_DIR}/echk") + end end end From 908d4044a0b82559170649f97108433c0829b278 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Wed, 15 May 2019 16:37:00 -0500 Subject: [PATCH 616/619] appveyor.yml - fix for Ruby < 2.4 --- appveyor.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 827bbf8c..4cc8096b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,9 +8,13 @@ deploy: off install: - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - gem install minitest hoe rake-compiler rubocop --no-document --conservative - ps: | $rv = $env:ruby_version + if ( $rv -lt '24' ) { + gem install minitest hoe rake-compiler rubocop:0.68.1 --no-document --conservative + } else { + gem install minitest hoe rake-compiler rubocop --no-document --conservative + } if ( $rv.EndsWith('-x64') ) { C:/msys64/usr/bin/pacman -S --noconfirm --needed --noprogressbar mingw-w64-x86_64-ragel $env:PATH = "C:/Ruby$rv/bin;$env:PATH;C:/msys64/mingw64/bin" @@ -28,10 +32,10 @@ environment: # - ruby_version: "200-x64" # - ruby_version: "21" # - ruby_version: "21-x64" -# - ruby_version: "22" -# - ruby_version: "22-x64" -# - ruby_version: "23" -# - ruby_version: "23-x64" + - ruby_version: "22" + - ruby_version: "22-x64" + - ruby_version: "23" + - ruby_version: "23-x64" - ruby_version: "24" - ruby_version: "24-x64" - ruby_version: "25" From eda794bcca59cca817d9546e3bea5d0478177ac0 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 16 May 2019 09:57:19 +0900 Subject: [PATCH 617/619] Removed old ruby versions. --- appveyor.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4cc8096b..11adeee9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,14 +28,6 @@ test_script: environment: matrix: -# - ruby_version: "200" -# - ruby_version: "200-x64" -# - ruby_version: "21" -# - ruby_version: "21-x64" - - ruby_version: "22" - - ruby_version: "22-x64" - - ruby_version: "23" - - ruby_version: "23-x64" - ruby_version: "24" - ruby_version: "24-x64" - ruby_version: "25" From 9d5800f3e524b71d415ab968552fe0e5df28123f Mon Sep 17 00:00:00 2001 From: Karol Bucek Date: Sun, 7 Jul 2019 09:04:47 +0200 Subject: [PATCH 618/619] use blessed ext loading on JRuby ... with backwards compatibility for < 9.2 --- lib/racc/parser.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 26bac877..7e9d2987 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -159,7 +159,11 @@ class Parser begin if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby' require 'racc/cparse-jruby.jar' - com.headius.racc.Cparse.new.load(JRuby.runtime, false) + if JRuby::Util.respond_to?(:load_ext) # JRuby 9.2 + JRuby::Util.load_ext('com.headius.racc.Cparse') + else; require 'jruby' + com.headius.racc.Cparse.new.load(JRuby.runtime, false) + end else require 'racc/cparse' end From 54d1680e702561d5d4d7cf49d221ca2b9c129648 Mon Sep 17 00:00:00 2001 From: Michael Camilleri Date: Wed, 16 Oct 2019 12:44:52 +0900 Subject: [PATCH 619/619] Note in README that Ragel is required --- README.ja.rdoc | 1 + README.rdoc | 1 + 2 files changed, 2 insertions(+) diff --git a/README.ja.rdoc b/README.ja.rdoc index 33aebb40..50ccc7b3 100644 --- a/README.ja.rdoc +++ b/README.ja.rdoc @@ -17,6 +17,7 @@ == 必要環境 * Ruby 1.8 以降 + * Ragel (*) C コンパイラと make diff --git a/README.rdoc b/README.rdoc index aeaf579c..32ed4ccd 100644 --- a/README.rdoc +++ b/README.rdoc @@ -15,6 +15,7 @@ == Requirements * Ruby 1.8+ + * Ragel (*) make and C compiler.