Module: Rley

Defined in:
lib/rley/engine.rb,
lib/rley/gfg/edge.rb,
lib/rley/constants.rb,
lib/rley/interface.rb,
lib/rley/gfg/vertex.rb,
lib/rley/rley_error.rb,
lib/rley/gfg/call_edge.rb,
lib/rley/gfg/scan_edge.rb,
lib/rley/lexical/token.rb,
lib/rley/formatter/json.rb,
lib/rley/gfg/end_vertex.rb,
lib/rley/sppf/leaf_node.rb,
lib/rley/sppf/sppf_node.rb,
lib/rley/syntax/grammar.rb,
lib/rley/formatter/debug.rb,
lib/rley/gfg/item_vertex.rb,
lib/rley/gfg/return_edge.rb,
lib/rley/lexical/literal.rb,
lib/rley/notation/parser.rb,
lib/rley/sppf/token_node.rb,
lib/rley/syntax/terminal.rb,
lib/rley/base/base_parser.rb,
lib/rley/base/dotted_item.rb,
lib/rley/gfg/epsilon_edge.rb,
lib/rley/gfg/start_vertex.rb,
lib/rley/notation/grammar.rb,
lib/rley/parser/gfg_chart.rb,
lib/rley/ptree/parse_tree.rb,
lib/rley/gfg/shortcut_edge.rb,
lib/rley/notation/ast_node.rb,
lib/rley/sppf/epsilon_node.rb,
lib/rley/sppf/parse_forest.rb,
lib/rley/syntax/grm_symbol.rb,
lib/rley/syntax/production.rb,
lib/rley/syntax/symbol_seq.rb,
lib/rley/gfg/grm_flow_graph.rb,
lib/rley/notation/tokenizer.rb,
lib/rley/parse_tree_visitor.rb,
lib/rley/parser/gfg_parsing.rb,
lib/rley/parser/parse_entry.rb,
lib/rley/formatter/asciitree.rb,
lib/rley/lexical/token_range.rb,
lib/rley/parser/error_reason.rb,
lib/rley/ptree/terminal_node.rb,
lib/rley/sppf/composite_node.rb,
lib/rley/syntax/non_terminal.rb,
lib/rley/notation/ast_builder.rb,
lib/rley/notation/ast_visitor.rb,
lib/rley/notation/symbol_node.rb,
lib/rley/parse_forest_visitor.rb,
lib/rley/syntax/match_closest.rb,
lib/rley/parse_rep/cst_builder.rb,
lib/rley/ptree/parse_tree_node.rb,
lib/rley/sppf/alternative_node.rb,
lib/rley/base/grm_items_builder.rb,
lib/rley/notation/grouping_node.rb,
lib/rley/notation/sequence_node.rb,
lib/rley/parser/parse_entry_set.rb,
lib/rley/sppf/non_terminal_node.rb,
lib/rley/gfg/non_terminal_vertex.rb,
lib/rley/ptree/non_terminal_node.rb,
lib/rley/formatter/base_formatter.rb,
lib/rley/notation/grammar_builder.rb,
lib/rley/parser/gfg_earley_parser.rb,
lib/rley/formatter/bracket_notation.rb,
lib/rley/parse_rep/ast_base_builder.rb,
lib/rley/parser/parse_entry_tracker.rb,
lib/rley/parse_rep/parse_rep_creator.rb,
lib/rley/parser/parse_walker_factory.rb,
lib/rley/syntax/base_grammar_builder.rb,
lib/rley/parse_rep/parse_tree_builder.rb,
lib/rley/parse_rep/parse_tree_factory.rb,
lib/rley/parse_rep/parse_forest_builder.rb,
lib/rley/parse_rep/parse_forest_factory.rb

Overview

This module is used as a namespace

Defined Under Namespace

Modules: Base, Formatter, GFG, Lexical, Notation, PTree, ParseRep, Parser, SPPF, Syntax Classes: Engine, EngineConfig, ParseForestVisitor, ParseTreeVisitor, RleyError

Constant Summary collapse

Version =

The version number of the gem.

'0.8.06'
Description =

Brief description of the gem.

"Ruby implementation of the Earley's parsing algorithm"
RootDir =

The start folder of Rley.

begin
  require 'pathname' # Load Pathname class from standard library
  startdir = Pathname(__FILE__).dirname.parent.parent.expand_path
  "#{startdir}/" # Append trailing slash character to it
end

Class Method Summary collapse

Class Method Details

.grammar_builder(&aBlock) ⇒ Rley::Notation::GrammarBuilder

Factory method. A grammar builder constructs a Rley grammar piece by piece from DSL instructions in a provided code block.

Parameters:

  • aBlock (Proc)

    a code block

Returns:



11
12
13
# File 'lib/rley/interface.rb', line 11

def self.grammar_builder(&aBlock)
  Rley::Notation::GrammarBuilder.new(&aBlock)
end