tomlrb-1.2.9/0000755000004100000410000000000013567551030013057 5ustar www-datawww-datatomlrb-1.2.9/lib/0000755000004100000410000000000013567551027013633 5ustar www-datawww-datatomlrb-1.2.9/lib/tomlrb/0000755000004100000410000000000013567551027015132 5ustar www-datawww-datatomlrb-1.2.9/lib/tomlrb/version.rb0000644000004100000410000000004613567551027017144 0ustar www-datawww-datamodule Tomlrb VERSION = "1.2.9" end tomlrb-1.2.9/lib/tomlrb/string_utils.rb0000644000004100000410000000132513567551027020206 0ustar www-datawww-datamodule Tomlrb class StringUtils SPECIAL_CHARS = { '\\t' => "\t", '\\b' => "\b", '\\f' => "\f", '\\n' => "\n", '\\r' => "\r", '\\"' => '"', '\\\\' => '\\' }.freeze def self.multiline_replacements(str) strip_spaces(str).gsub(/\\\n\s+/, '') end def self.replace_escaped_chars(str) str.gsub(/\\(u[\da-fA-F]{4}|U[\da-fA-F]{8}|.)/) do |m| if m.size == 2 SPECIAL_CHARS[m] || (raise Tomlrb::ParseError.new "Escape sequence #{m} is reserved") else m[2..-1].to_i(16).chr(Encoding::UTF_8) end end end def self.strip_spaces(str) str[0] = '' if str[0] == "\n" str end end end tomlrb-1.2.9/lib/tomlrb/generated_parser.rb0000644000004100000410000003207213567551027020775 0ustar www-datawww-data# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.16.pre.1 # from Racc grammer file "". # require 'racc/parser.rb' module Tomlrb class GeneratedParser < Racc::Parser ##### State transition tables begin ### racc_action_table = [ 2, 32, 11, 31, 12, 31, 13, 33, 14, 77, 15, 16, 8, 78, 34, 10, 35, 29, 36, 29, 57, 58, 59, 60, 56, 53, 52, 54, 55, 46, 73, 37, 10, 57, 58, 59, 60, 56, 53, 52, 54, 55, 46, 69, 70, 10, 57, 58, 59, 60, 56, 53, 52, 54, 55, 46, 40, 41, 10, 57, 58, 59, 60, 56, 53, 52, 54, 55, 46, 38, 43, 10, 57, 58, 59, 60, 56, 53, 52, 54, 55, 46, 66, 17, 10, 57, 58, 59, 60, 56, 53, 52, 54, 55, 46, 27, nil, 10, 57, 58, 59, 60, 56, 53, 52, 54, 55, 46, nil, nil, 10, 57, 58, 59, 60, 56, 53, 52, 54, 55, 46, nil, nil, 10, 57, 58, 59, 60, 56, 53, 52, 54, 55, 46, 73, 21, 10, 22, nil, 23, nil, 24, nil, 25, 26, 21, 19, 22, nil, 23, nil, 24, nil, 25, 26, nil, 19 ] racc_action_check = [ 1, 11, 1, 9, 1, 70, 1, 12, 1, 74, 1, 1, 1, 74, 13, 1, 14, 9, 15, 70, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 16, 78, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 42, 42, 32, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 20, 20, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 19, 30, 34, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 40, 2, 35, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 8, nil, 36, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, nil, nil, 37, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, nil, nil, 43, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 7, 45, 7, nil, 7, nil, 7, nil, 7, 7, 41, 7, 41, nil, 41, nil, 41, nil, 41, 41, nil, 41 ] racc_action_pointer = [ nil, 0, 83, nil, nil, nil, nil, 133, 83, 1, nil, -17, -11, -4, -2, 0, 13, nil, nil, 56, 43, nil, nil, nil, nil, nil, nil, nil, nil, nil, 52, nil, 30, 43, 56, 69, 82, 95, nil, nil, 69, 143, 27, 108, nil, 121, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 3, nil, nil, nil, -4, nil, nil, nil, 17, nil ] racc_action_default = [ -1, -56, -56, -2, -3, -4, -5, -56, -8, -56, -22, -56, -56, -56, -56, -56, -56, 80, -6, -10, -56, -15, -16, -17, -18, -19, -20, -7, -21, -23, -56, -27, -46, -46, -46, -46, -46, -46, -9, -11, -13, -56, -56, -46, -29, -46, -40, -41, -42, -43, -44, -45, -47, -48, -49, -50, -51, -52, -53, -54, -55, -30, -31, -32, -33, -34, -12, -14, -24, -25, -56, -28, -35, -36, -56, -26, -37, -38, -46, -39 ] racc_goto_table = [ 28, 18, 6, 72, 44, 61, 62, 63, 64, 65, 7, 39, 42, 68, 1, 71, 76, 3, 4, 5, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 67, 79, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 75 ] racc_goto_check = [ 11, 7, 5, 18, 15, 15, 15, 15, 15, 15, 6, 9, 13, 14, 1, 15, 19, 2, 3, 4, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 7, 18, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 11 ] racc_goto_pointer = [ nil, 14, 16, 17, 18, 1, 9, -6, nil, -9, nil, -9, nil, -18, -29, -28, nil, nil, -42, -58, nil, nil, nil ] racc_goto_default = [ nil, nil, nil, nil, nil, 49, nil, nil, 20, nil, 9, nil, 30, nil, nil, 74, 48, 45, nil, nil, 47, 50, 51 ] racc_reduce_table = [ 0, 0, :racc_error, 0, 20, :_reduce_none, 2, 20, :_reduce_none, 1, 21, :_reduce_none, 1, 21, :_reduce_none, 1, 21, :_reduce_none, 2, 22, :_reduce_none, 2, 25, :_reduce_7, 1, 25, :_reduce_8, 2, 26, :_reduce_9, 1, 26, :_reduce_10, 2, 26, :_reduce_none, 2, 28, :_reduce_12, 1, 28, :_reduce_13, 2, 28, :_reduce_none, 1, 27, :_reduce_15, 1, 27, :_reduce_16, 1, 27, :_reduce_17, 1, 27, :_reduce_18, 1, 27, :_reduce_19, 1, 27, :_reduce_20, 2, 24, :_reduce_none, 1, 29, :_reduce_22, 1, 30, :_reduce_23, 3, 30, :_reduce_none, 1, 33, :_reduce_25, 2, 33, :_reduce_none, 1, 31, :_reduce_27, 2, 32, :_reduce_none, 3, 23, :_reduce_29, 3, 23, :_reduce_30, 3, 23, :_reduce_31, 3, 23, :_reduce_32, 3, 23, :_reduce_33, 3, 23, :_reduce_34, 2, 35, :_reduce_none, 1, 37, :_reduce_36, 2, 37, :_reduce_none, 1, 38, :_reduce_38, 2, 38, :_reduce_none, 1, 36, :_reduce_40, 1, 34, :_reduce_41, 1, 34, :_reduce_none, 1, 34, :_reduce_none, 1, 39, :_reduce_none, 1, 39, :_reduce_none, 0, 41, :_reduce_none, 1, 41, :_reduce_47, 1, 41, :_reduce_48, 1, 41, :_reduce_49, 1, 41, :_reduce_50, 1, 41, :_reduce_51, 1, 40, :_reduce_52, 1, 40, :_reduce_53, 1, 40, :_reduce_54, 1, 40, :_reduce_55 ] racc_reduce_n = 56 racc_shift_n = 80 racc_token_table = { false => 0, :error => 1, :IDENTIFIER => 2, :STRING_MULTI => 3, :STRING_BASIC => 4, :STRING_LITERAL_MULTI => 5, :STRING_LITERAL => 6, :DATETIME => 7, :INTEGER => 8, :FLOAT => 9, :TRUE => 10, :FALSE => 11, "[" => 12, "]" => 13, "." => 14, "{" => 15, "}" => 16, "," => 17, "=" => 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", "IDENTIFIER", "STRING_MULTI", "STRING_BASIC", "STRING_LITERAL_MULTI", "STRING_LITERAL", "DATETIME", "INTEGER", "FLOAT", "TRUE", "FALSE", "\"[\"", "\"]\"", "\".\"", "\"{\"", "\"}\"", "\",\"", "\"=\"", "$start", "expressions", "expression", "table", "assignment", "inline_table", "table_start", "table_continued", "table_identifier", "table_next", "inline_table_start", "inline_continued", "inline_assignment_key", "inline_assignment_value", "inline_next", "value", "array", "start_array", "array_continued", "array_next", "scalar", "string", "literal" ] 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 module_eval(<<'.,.,', 'parser.y', 15) def _reduce_7(val, _values, result) @handler.start_(:array_of_tables) result end .,., module_eval(<<'.,.,', 'parser.y', 16) def _reduce_8(val, _values, result) @handler.start_(:table) result end .,., module_eval(<<'.,.,', 'parser.y', 19) def _reduce_9(val, _values, result) array = @handler.end_(:array_of_tables); @handler.set_context(array, is_array_of_tables: true) result end .,., module_eval(<<'.,.,', 'parser.y', 20) def _reduce_10(val, _values, result) array = @handler.end_(:table); @handler.set_context(array) result end .,., # reduce 11 omitted module_eval(<<'.,.,', 'parser.y', 24) def _reduce_12(val, _values, result) array = @handler.end_(:array_of_tables); @handler.set_context(array, is_array_of_tables: true) result end .,., module_eval(<<'.,.,', 'parser.y', 25) def _reduce_13(val, _values, result) array = @handler.end_(:table); @handler.set_context(array) result end .,., # reduce 14 omitted module_eval(<<'.,.,', 'parser.y', 29) def _reduce_15(val, _values, result) @handler.push(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 30) def _reduce_16(val, _values, result) @handler.push(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 31) def _reduce_17(val, _values, result) @handler.push(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 32) def _reduce_18(val, _values, result) @handler.push(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 33) def _reduce_19(val, _values, result) @handler.push(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 34) def _reduce_20(val, _values, result) @handler.push(val[0]) result end .,., # reduce 21 omitted module_eval(<<'.,.,', 'parser.y', 40) def _reduce_22(val, _values, result) @handler.start_(:inline) result end .,., module_eval(<<'.,.,', 'parser.y', 43) def _reduce_23(val, _values, result) array = @handler.end_(:inline); @handler.push(Hash[*array]) result end .,., # reduce 24 omitted module_eval(<<'.,.,', 'parser.y', 48) def _reduce_25(val, _values, result) array = @handler.end_(:inline) array.map!.with_index{ |n,i| i.even? ? n.to_sym : n } if @handler.symbolize_keys @handler.push(Hash[*array]) result end .,., # reduce 26 omitted module_eval(<<'.,.,', 'parser.y', 55) def _reduce_27(val, _values, result) @handler.push(val[0]) result end .,., # reduce 28 omitted module_eval(<<'.,.,', 'parser.y', 61) def _reduce_29(val, _values, result) @handler.assign(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 62) def _reduce_30(val, _values, result) @handler.assign(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 63) def _reduce_31(val, _values, result) @handler.assign(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 64) def _reduce_32(val, _values, result) @handler.assign(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 65) def _reduce_33(val, _values, result) @handler.assign(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 66) def _reduce_34(val, _values, result) @handler.assign(val[0]) result end .,., # reduce 35 omitted module_eval(<<'.,.,', 'parser.y', 72) def _reduce_36(val, _values, result) array = @handler.end_(:array); @handler.push(array) result end .,., # reduce 37 omitted module_eval(<<'.,.,', 'parser.y', 76) def _reduce_38(val, _values, result) array = @handler.end_(:array); @handler.push(array) result end .,., # reduce 39 omitted module_eval(<<'.,.,', 'parser.y', 80) def _reduce_40(val, _values, result) @handler.start_(:array) result end .,., module_eval(<<'.,.,', 'parser.y', 83) def _reduce_41(val, _values, result) @handler.push(val[0]) result end .,., # reduce 42 omitted # reduce 43 omitted # reduce 44 omitted # reduce 45 omitted # reduce 46 omitted module_eval(<<'.,.,', 'parser.y', 92) def _reduce_47(val, _values, result) result = val[0].to_f result end .,., module_eval(<<'.,.,', 'parser.y', 93) def _reduce_48(val, _values, result) result = val[0].to_i result end .,., module_eval(<<'.,.,', 'parser.y', 94) def _reduce_49(val, _values, result) result = true result end .,., module_eval(<<'.,.,', 'parser.y', 95) def _reduce_50(val, _values, result) result = false result end .,., module_eval(<<'.,.,', 'parser.y', 96) def _reduce_51(val, _values, result) result = Time.new(*val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 99) def _reduce_52(val, _values, result) result = StringUtils.replace_escaped_chars(StringUtils.multiline_replacements(val[0])) result end .,., module_eval(<<'.,.,', 'parser.y', 100) def _reduce_53(val, _values, result) result = StringUtils.replace_escaped_chars(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 101) def _reduce_54(val, _values, result) result = StringUtils.strip_spaces(val[0]) result end .,., module_eval(<<'.,.,', 'parser.y', 102) def _reduce_55(val, _values, result) result = val[0] result end .,., def _reduce_none(val, _values, result) val[0] end end # class GeneratedParser end # module Tomlrb tomlrb-1.2.9/lib/tomlrb/scanner.rb0000644000004100000410000000336713567551027017121 0ustar www-datawww-datarequire 'strscan' module Tomlrb class Scanner COMMENT = /#.*/ IDENTIFIER = /[A-Za-z0-9_-]+/ SPACE = /[ \t\r\n]/ STRING_BASIC = /(["])(?:\\?.)*?\1/ STRING_MULTI = /"{3}([\s\S]*?"{3,4})/m STRING_LITERAL = /(['])(?:\\?.)*?\1/ STRING_LITERAL_MULTI = /'{3}([\s\S]*?'{3})/m DATETIME = /(-?\d{4})-(\d{2})-(\d{2})(?:(?:t|\s)(\d{2}):(\d{2}):(\d{2}(?:\.\d+)?))?(z|[-+]\d{2}:\d{2})?/i FLOAT = /[+-]?(?:[0-9_]+\.[0-9_]*|\d+(?=[eE]))(?:[eE][+-]?[0-9_]+)?/ INTEGER = /[+-]?([1-9](_?\d)*|0)(?![A-Za-z0-9_-]+)/ TRUE = /true/ FALSE = /false/ def initialize(io) @ss = StringScanner.new(io.read) end def next_token return if @ss.eos? case when @ss.scan(SPACE) then next_token when @ss.scan(COMMENT) then next_token when @ss.scan(DATETIME) then process_datetime when text = @ss.scan(STRING_MULTI) then [:STRING_MULTI, text[3..-4]] when text = @ss.scan(STRING_BASIC) then [:STRING_BASIC, text[1..-2]] when text = @ss.scan(STRING_LITERAL_MULTI) then [:STRING_LITERAL_MULTI, text[3..-4]] when text = @ss.scan(STRING_LITERAL) then [:STRING_LITERAL, text[1..-2]] when text = @ss.scan(FLOAT) then [:FLOAT, text] when text = @ss.scan(INTEGER) then [:INTEGER, text] when text = @ss.scan(TRUE) then [:TRUE, text] when text = @ss.scan(FALSE) then [:FALSE, text] when text = @ss.scan(IDENTIFIER) then [:IDENTIFIER, text] else x = @ss.getch [x, x] end end def process_datetime if @ss[7].nil? offset = '+00:00' else offset = @ss[7].gsub('Z', '+00:00') end args = [@ss[1], @ss[2], @ss[3], @ss[4] || 0, @ss[5] || 0, @ss[6].to_f, offset] [:DATETIME, args] end end end tomlrb-1.2.9/lib/tomlrb/handler.rb0000644000004100000410000000351413567551027017077 0ustar www-datawww-datamodule Tomlrb class Handler attr_reader :output, :symbolize_keys def initialize(**options) @output = {} @current = @output @stack = [] @array_names = [] @symbolize_keys = options[:symbolize_keys] end def set_context(identifiers, is_array_of_tables: false) @current = @output deal_with_array_of_tables(identifiers, is_array_of_tables) do |identifierz| identifierz.each do |k| k = k.to_sym if @symbolize_keys if @current[k].is_a?(Array) @current[k] << {} if @current[k].empty? @current = @current[k].last else @current[k] ||= {} @current = @current[k] end end end end def deal_with_array_of_tables(identifiers, is_array_of_tables) identifiers.map!{|n| n.gsub("\"", '')} stringified_identifier = identifiers.join('.') if is_array_of_tables @array_names << stringified_identifier last_identifier = identifiers.pop elsif @array_names.include?(stringified_identifier) raise ParseError, 'Cannot define a normal table with the same name as an already established array' end yield(identifiers) if is_array_of_tables last_identifier = last_identifier.to_sym if @symbolize_keys @current[last_identifier] ||= [] @current[last_identifier] << {} @current = @current[last_identifier].last end end def assign(k) k = k.to_sym if @symbolize_keys @current[k] = @stack.pop end def push(o) @stack << o end def start_(type) push([type]) end def end_(type) array = [] while (value = @stack.pop) != [type] raise ParseError, 'Unclosed table' unless value array.unshift(value) end array end end end tomlrb-1.2.9/lib/tomlrb/parser.rb0000644000004100000410000000047213567551027016756 0ustar www-datawww-datarequire "tomlrb/generated_parser" class Tomlrb::Parser < Tomlrb::GeneratedParser def initialize(tokenizer, **options) @tokenizer = tokenizer @handler = Tomlrb::Handler.new(**options) super() end def next_token @tokenizer.next_token end def parse do_parse @handler end end tomlrb-1.2.9/lib/tomlrb/parser.y0000644000004100000410000000605613567551027016627 0ustar www-datawww-dataclass Tomlrb::GeneratedParser token IDENTIFIER STRING_MULTI STRING_BASIC STRING_LITERAL_MULTI STRING_LITERAL DATETIME INTEGER FLOAT TRUE FALSE rule expressions | expressions expression ; expression : table | assignment | inline_table ; table : table_start table_continued ; table_start : '[' '[' { @handler.start_(:array_of_tables) } | '[' { @handler.start_(:table) } ; table_continued : ']' ']' { array = @handler.end_(:array_of_tables); @handler.set_context(array, is_array_of_tables: true) } | ']' { array = @handler.end_(:table); @handler.set_context(array) } | table_identifier table_next ; table_next : ']' ']' { array = @handler.end_(:array_of_tables); @handler.set_context(array, is_array_of_tables: true) } | ']' { array = @handler.end_(:table); @handler.set_context(array) } | '.' table_continued ; table_identifier : IDENTIFIER { @handler.push(val[0]) } | STRING_BASIC { @handler.push(val[0]) } | STRING_LITERAL { @handler.push(val[0]) } | INTEGER { @handler.push(val[0]) } | TRUE { @handler.push(val[0]) } | FALSE { @handler.push(val[0]) } ; inline_table : inline_table_start inline_continued ; inline_table_start : '{' { @handler.start_(:inline) } ; inline_continued : '}' { array = @handler.end_(:inline); @handler.push(Hash[*array]) } | inline_assignment_key inline_assignment_value inline_next ; inline_next : '}' { array = @handler.end_(:inline) array.map!.with_index{ |n,i| i.even? ? n.to_sym : n } if @handler.symbolize_keys @handler.push(Hash[*array]) } | ',' inline_continued ; inline_assignment_key : IDENTIFIER { @handler.push(val[0]) } ; inline_assignment_value : '=' value ; assignment : IDENTIFIER '=' value { @handler.assign(val[0]) } | STRING_BASIC '=' value { @handler.assign(val[0]) } | STRING_LITERAL '=' value { @handler.assign(val[0]) } | INTEGER '=' value { @handler.assign(val[0]) } | TRUE '=' value { @handler.assign(val[0]) } | FALSE '=' value { @handler.assign(val[0]) } ; array : start_array array_continued ; array_continued : ']' { array = @handler.end_(:array); @handler.push(array) } | value array_next ; array_next : ']' { array = @handler.end_(:array); @handler.push(array) } | ',' array_continued ; start_array : '[' { @handler.start_(:array) } ; value : scalar { @handler.push(val[0]) } | array | inline_table ; scalar : string | literal ; literal | FLOAT { result = val[0].to_f } | INTEGER { result = val[0].to_i } | TRUE { result = true } | FALSE { result = false } | DATETIME { result = Time.new(*val[0])} ; string : STRING_MULTI { result = StringUtils.replace_escaped_chars(StringUtils.multiline_replacements(val[0])) } | STRING_BASIC { result = StringUtils.replace_escaped_chars(val[0]) } | STRING_LITERAL_MULTI { result = StringUtils.strip_spaces(val[0]) } | STRING_LITERAL { result = val[0] } ; tomlrb-1.2.9/lib/tomlrb.rb0000644000004100000410000000301113567551027015452 0ustar www-datawww-datarequire 'time' require 'stringio' require "tomlrb/version" require 'tomlrb/string_utils' require "tomlrb/scanner" require "tomlrb/parser" require "tomlrb/handler" module Tomlrb class ParseError < StandardError; end # Parses a valid TOML string into its Ruby data structure # # @param string_or_io [String, StringIO] the content # @param options [Hash] the options hash # @option options [Boolean] :symbolize_keys (false) whether to return the keys as symbols or strings # @return [Hash] the Ruby data structure represented by the input def self.parse(string_or_io, **options) io = string_or_io.is_a?(String) ? StringIO.new(string_or_io) : string_or_io scanner = Scanner.new(io) parser = Parser.new(scanner, **options) begin handler = parser.parse rescue Racc::ParseError => e raise ParseError, e.message end handler.output end # Reads a file content and parses it into its Ruby data structure # # @param path [String] the path to the file # @param options [Hash] the options hash # @option options [Boolean] :symbolize_keys (false) whether to return the keys as symbols or strings # @return [Hash] the Ruby data structure represented by the input def self.load_file(path, **options) # By default Ruby sets the external encoding of an IO object to the # default external encoding. The default external encoding is set by # locale encoding or the interpreter -E option. tmp = File.read(path, :encoding=>'utf-8') Tomlrb.parse(tmp, **options) end end tomlrb-1.2.9/LICENSE.txt0000644000004100000410000000207313567551027014712 0ustar www-datawww-dataThe MIT License (MIT) Copyright (c) 2015 Francois Bernier 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. tomlrb-1.2.9/tomlrb.gemspec0000644000004100000410000000221413567551030015722 0ustar www-datawww-data######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: tomlrb 1.2.9 ruby lib Gem::Specification.new do |s| s.name = "tomlrb".freeze s.version = "1.2.9" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Francois Bernier".freeze] s.date = "2019-11-22" s.description = "A racc based toml parser".freeze s.email = ["frankbernier@gmail.com".freeze] s.files = ["LICENSE.txt".freeze, "lib/tomlrb.rb".freeze, "lib/tomlrb/generated_parser.rb".freeze, "lib/tomlrb/handler.rb".freeze, "lib/tomlrb/parser.rb".freeze, "lib/tomlrb/parser.y".freeze, "lib/tomlrb/scanner.rb".freeze, "lib/tomlrb/string_utils.rb".freeze, "lib/tomlrb/version.rb".freeze] s.homepage = "https://github.com/fbernier/tomlrb".freeze s.licenses = ["MIT".freeze] s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze) s.rubygems_version = "2.5.2.1".freeze s.summary = "A racc based toml parser".freeze end