Module: EBNF

Defined in:
lib/ebnf/abnf.rb,
lib/ebnf.rb,
lib/ebnf/bnf.rb,
lib/ebnf/ll1.rb,
lib/ebnf/peg.rb,
lib/ebnf/base.rb,
lib/ebnf/rule.rb,
lib/ebnf/native.rb,
lib/ebnf/parser.rb,
lib/ebnf/writer.rb,
lib/ebnf/isoebnf.rb,
lib/ebnf/version.rb

Overview

ISO EBNF parser Parses ISO EBNF into an array of Rule.

Defined Under Namespace

Modules: BNF, LL1, Native, PEG, Terminals, Unescape, VERSION Classes: ABNF, Base, ISOEBNF, Parser, Rule, Writer

Class Method Summary collapse

Class Method Details

.parse(input, **options) ⇒ EBNF::Base

Parse the given EBNF ‘query` input.

Examples:

ebnf = EBNF.parse(input)

Parameters:

  • input (#read, String, #to_s)
  • options (Hash{Symbol => Object})

Returns:

Raises:

  • (Exception)

    on invalid input



26
27
28
# File 'lib/ebnf.rb', line 26

def self.parse(input, **options)
  ::EBNF::Base.new(input, **options)
end