Class: SrlRuby::ASTBuilder

Inherits:
Rley::ParseRep::ASTBaseBuilder
  • Object
show all
Defined in:
lib/srl_ruby/ast_builder.rb

Overview

The purpose of a ASTBuilder is to build piece by piece an AST (Abstract Syntax Tree) from a sequence of input tokens and visit events produced by walking over a GFGParsing object. Uses the Builder GoF pattern. The Builder pattern creates a complex object (say, a parse tree) from simpler objects (terminal and non-terminal nodes) and using a step by step approach.

Constant Summary collapse

Terminal2NodeClass =
{}.freeze

Instance Attribute Summary collapse

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



15
16
17
# File 'lib/srl_ruby/ast_builder.rb', line 15

def options
  @options
end