Sha256: bc4d1631227ef3df32c9cd66d33b3a18bceeee322d4874b5671f516b880b3765

Contents?: true

Size: 947 Bytes

Versions: 1

Compression:

Stored size: 947 Bytes

Contents

grammar TOML::Document
  include TOML::Primitive
  include TOML::Arrays

  rule document
    (comment | table_array | keygroup | keyvalue | line_break)*
  end

  rule table_array
    (space? '[[' (space? key space? "."?)+ ']]' space? comment?) <TOML::TableArrayParser>
  end

  rule keygroup
    (space? '[' (space? key space? "."?)+ ']' space? comment?) <TOML::KeygroupParser>
  end

  rule keyvalue
    (space? key space? '=' space? v:(toml_values) comment?) <TOML::KeyvalueParser>
  end

  rule inline_table
    (space? '{' (keyvalue (',' keyvalue)*)? space? '}' ) <TOML::InlineTableParser>
  end

  rule inline_table_array
    ("[" array_comments inline_table_array_elements space ","? array_comments "]" indent?) <TOML::InlineTableArrayParser>
  end

  rule inline_table_array_elements
    (inline_table (space "," array_comments inline_table)*)
  end

  rule toml_values
    primitive | inline_table | array | inline_table_array
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
toml-rb-0.3.6 lib/toml/grammars/document.citrus