# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.9 # from Racc grammer file "". # require 'racc/parser.rb' require_relative "./lexer" require_relative "../ast" module LucidTDL class Parser < Racc::Parser module_eval(<<'...end lucid-tdl.y/module_eval...', 'lucid-tdl.y', 104) def parse(input) scan_str(input) end ...end lucid-tdl.y/module_eval... ##### State transition tables begin ### racc_action_table = [ 4, 4, 9, 10, 11, 21, 33, 23, 24, 25, 21, 16, 17, 12, 41, 12, 26, 42, 21, 43, 12, 21, 55, 59, 60, 47, 48, 49, 50, 51, 52, 21, 21, 32, 23, 24, 25, 21, 47, 48, 49, 50, 51, 52, 47, 48, 49, 50, 51, 52, 21, 4, 4, 9, 10, 11, 21, 47, 48, 49, 50, 51, 52, 47, 48, 49, 50, 51, 52, 47, 48, 49, 50, 51, 52, 16, 17, 12, 16, 17, 12, 16, 17, 12, 29, 30, 4, 38, 4, 4, 26, 37, 4, 62, 21, 21, 4, 64, 26, 35, 67, 68, 34, 21, 4, 4, 4, 21, 13, 4 ] racc_action_check = [ 0, 18, 0, 0, 0, 5, 10, 5, 5, 5, 39, 14, 14, 14, 23, 0, 18, 24, 57, 25, 5, 31, 31, 39, 39, 57, 57, 57, 57, 57, 57, 61, 20, 9, 20, 20, 20, 58, 61, 61, 61, 61, 61, 61, 58, 58, 58, 58, 58, 58, 71, 3, 29, 3, 3, 3, 72, 71, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, 72, 28, 28, 28, 28, 28, 28, 2, 2, 2, 19, 19, 19, 40, 40, 40, 7, 7, 8, 17, 37, 38, 22, 16, 45, 46, 53, 54, 55, 56, 6, 13, 59, 60, 11, 63, 64, 67, 68, 70, 1, 30 ] racc_action_pointer = [ -2, 108, 60, 49, nil, 3, 81, 77, 84, 30, 3, 99, nil, 99, -4, nil, 88, 84, -1, 63, 30, nil, 73, 11, 14, 16, nil, nil, 60, 50, 107, 19, nil, nil, nil, nil, nil, 86, 87, 8, 66, nil, nil, nil, nil, 90, 90, nil, nil, nil, nil, nil, nil, 92, 93, 94, 94, 16, 35, 97, 98, 29, nil, 101, 102, nil, nil, 103, 104, nil, 105, 48, 54, nil, nil ] racc_action_default = [ -43, -43, -1, -43, -5, -43, -9, -11, -13, -43, -43, -43, -41, -43, -2, -35, -43, -43, -43, -3, -43, -6, -10, -43, -43, -43, -42, -12, -43, -43, -43, -14, -16, -17, -18, 75, -36, -43, -43, -43, -4, -19, -20, -21, -22, -25, -43, -29, -30, -31, -32, -33, -34, -23, -24, -43, -15, -43, -43, -43, -43, -26, -28, -7, -43, -37, -38, -43, -43, -27, -8, -43, -43, -39, -40 ] racc_goto_table = [ 5, 36, 14, 20, 6, 56, 44, 2, 31, 22, 19, 27, 28, 3, 1, nil, nil, nil, 39, 40, nil, nil, nil, nil, nil, nil, nil, 36, nil, 53, 54, nil, nil, nil, nil, 65, 66, 57, 58, 69, nil, nil, nil, nil, nil, 61, nil, nil, nil, 73, 74, nil, nil, nil, nil, 63, nil, nil, nil, nil, nil, nil, nil, nil, 70, nil, nil, 71, 72 ] racc_goto_check = [ 5, 15, 3, 5, 7, 6, 12, 2, 5, 7, 2, 9, 11, 4, 1, nil, nil, nil, 5, 3, nil, nil, nil, nil, nil, nil, nil, 15, nil, 5, 5, nil, nil, nil, nil, 12, 12, 5, 5, 12, nil, nil, nil, nil, nil, 5, nil, nil, nil, 12, 12, nil, nil, nil, nil, 5, nil, nil, nil, nil, nil, nil, nil, nil, 5, nil, nil, 5, 5 ] racc_goto_pointer = [ nil, 14, 7, 0, 13, 0, -26, 4, nil, 4, nil, 5, -22, nil, nil, -13 ] racc_goto_default = [ nil, nil, nil, nil, nil, nil, nil, 18, 7, nil, 8, nil, nil, 45, 46, 15 ] racc_reduce_table = [ 0, 0, :racc_error, 1, 19, :_reduce_1, 2, 19, :_reduce_2, 2, 19, :_reduce_3, 3, 19, :_reduce_4, 1, 23, :_reduce_none, 2, 23, :_reduce_none, 2, 24, :_reduce_7, 3, 24, :_reduce_8, 1, 22, :_reduce_9, 2, 22, :_reduce_10, 1, 20, :_reduce_11, 2, 20, :_reduce_12, 1, 26, :_reduce_13, 2, 26, :_reduce_14, 3, 26, :_reduce_15, 2, 28, :_reduce_16, 2, 28, :_reduce_17, 2, 28, :_reduce_18, 3, 28, :_reduce_19, 3, 28, :_reduce_20, 3, 28, :_reduce_21, 2, 27, :_reduce_22, 2, 29, :_reduce_23, 2, 29, :_reduce_24, 1, 30, :_reduce_25, 2, 30, :_reduce_26, 3, 30, :_reduce_27, 2, 31, :_reduce_28, 1, 32, :_reduce_none, 1, 32, :_reduce_none, 1, 32, :_reduce_none, 1, 32, :_reduce_none, 1, 32, :_reduce_none, 1, 32, :_reduce_none, 1, 21, :_reduce_35, 2, 21, :_reduce_36, 4, 33, :_reduce_37, 4, 33, :_reduce_38, 6, 33, :_reduce_39, 6, 33, :_reduce_40, 1, 25, :_reduce_41, 2, 25, :_reduce_42 ] racc_reduce_n = 43 racc_shift_n = 75 racc_token_table = { false => 0, :error => 1, :NEWLINE => 2, :TEXT => 3, :FEATURE => 4, :ABILITY => 5, :RESPONSIBILITY => 6, :BACKGROUND => 7, :CONTEXT => 8, :GIVEN => 9, :WHEN => 10, :THEN => 11, :AND => 12, :BUT => 13, :GENERIC => 14, :SCENARIO => 15, :TEST => 16, :TAG => 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", "NEWLINE", "TEXT", "FEATURE", "ABILITY", "RESPONSIBILITY", "BACKGROUND", "CONTEXT", "GIVEN", "WHEN", "THEN", "AND", "BUT", "GENERIC", "SCENARIO", "TEST", "TAG", "$start", "Root", "Feature", "Scenarios", "FeatureTags", "Newline", "Description", "Tags", "FeatureHeader", "Background", "FeatureName", "BackgroundHeader", "Steps", "Step", "Keyword", "Scenario" ] Racc_debug_parser = false ##### State transition tables end ##### # reduce 0 omitted module_eval(<<'.,.,', 'lucid-tdl.y', 4) def _reduce_1(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 6) def _reduce_2(val, _values, result) result = val[0]; result.scenarios = val[1] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 7) def _reduce_3(val, _values, result) result = val[1]; result.tags = val[0] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 9) def _reduce_4(val, _values, result) result = val[1]; result.scenarios = val[2]; result.tags = val[0] result end .,., # reduce 5 omitted # reduce 6 omitted module_eval(<<'.,.,', 'lucid-tdl.y', 18) def _reduce_7(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 19) def _reduce_8(val, _values, result) result = val[0...-1].flatten result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 23) def _reduce_9(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 24) def _reduce_10(val, _values, result) result = val[1] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 28) def _reduce_11(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 30) def _reduce_12(val, _values, result) result = val[0]; result.background = val[1] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 34) def _reduce_13(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 35) def _reduce_14(val, _values, result) result = val[0] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 37) def _reduce_15(val, _values, result) result = val[0]; result.description = val[2] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 41) def _reduce_16(val, _values, result) result = AST::Feature.new(val[1]); result.pos(filename, lineno) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 42) def _reduce_17(val, _values, result) result = AST::Feature.new(val[1]); result.pos(filename, lineno) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 43) def _reduce_18(val, _values, result) result = AST::Feature.new(val[1]); result.pos(filename, lineno) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 44) def _reduce_19(val, _values, result) result = AST::Feature.new(val[2]); result.pos(filename, lineno) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 45) def _reduce_20(val, _values, result) result = AST::Feature.new(val[2]); result.pos(filename, lineno) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 46) def _reduce_21(val, _values, result) result = AST::Feature.new(val[2]); result.pos(filename, lineno) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 51) def _reduce_22(val, _values, result) result = val[0]; result.steps = val[1] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 55) def _reduce_23(val, _values, result) result = AST::Background.new; result.pos(filename, lineno) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 56) def _reduce_24(val, _values, result) result = AST::Background.new; result.pos(filename, lineno) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 60) def _reduce_25(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 61) def _reduce_26(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 62) def _reduce_27(val, _values, result) val[2].unshift(val[0]); result = val[2] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 66) def _reduce_28(val, _values, result) result = AST::Step.new(val[1], val[0]); result.pos(filename, lineno) result end .,., # reduce 29 omitted # reduce 30 omitted # reduce 31 omitted # reduce 32 omitted # reduce 33 omitted # reduce 34 omitted module_eval(<<'.,.,', 'lucid-tdl.y', 74) def _reduce_35(val, _values, result) result = [val[0]] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 75) def _reduce_36(val, _values, result) result = val[0] << val[1] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 80) def _reduce_37(val, _values, result) result = AST::Scenario.new(val[1], val[3]); result.pos(filename, lineno - 1) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 82) def _reduce_38(val, _values, result) result = AST::Scenario.new(val[1], val[3]); result.pos(filename, lineno - 1) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 85) def _reduce_39(val, _values, result) result = AST::Scenario.new(val[3], val[5], val[0]); result.pos(filename, lineno - 2) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 88) def _reduce_40(val, _values, result) result = AST::Scenario.new(val[3], val[5], val[0]); result.pos(filename, lineno - 2) result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 92) def _reduce_41(val, _values, result) result = [AST::Tag.new(val[0])] result end .,., module_eval(<<'.,.,', 'lucid-tdl.y', 93) def _reduce_42(val, _values, result) result = val[0] << AST::Tag.new(val[1]) result end .,., def _reduce_none(val, _values, result) val[0] end end # class Parser end # module LucidTDL