Module: EBNF

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

Overview

Serialize ruleset back to EBNF

Defined Under Namespace

Modules: BNF, LL1, Parser, VERSION Classes: Base, 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}) (defaults to: {})

Returns:

Raises:

  • (Exception)

    on invalid input


20
21
22
# File 'lib/ebnf.rb', line 20

def self.parse(input, options = {})
  query = ::EBNF::Base.new(input, options)
end