Class: Brandish::Parser

Inherits:
Object
  • Object
show all
Includes:
Main, Yoga::Parser
Defined in:
lib/brandish/parser.rb,
lib/brandish/parser/main.rb,
lib/brandish/parser/node.rb,
lib/brandish/parser/node/pair.rb,
lib/brandish/parser/node/root.rb,
lib/brandish/parser/node/text.rb,
lib/brandish/parser/node/block.rb,
lib/brandish/parser/node/string.rb,
lib/brandish/parser/node/command.rb

Overview

Parses the document into a tree of nodes. This is strictly an LL(0) recursive descent parser - even though the term peek is used, this is technically a shifted token that is acted upon.

This constructs a tree that can then be walked or modified to construct an end product.

Defined Under Namespace

Modules: Main Classes: Node

Constant Summary

Constants included from Main

Main::EOF_SYMBOL, Main::EQUAL_SYMBOL, Main::GREATER_THAN_SYMBOL, Main::LESS_THAN_SYMBOL, Main::QUOTE_SYMBOL, Main::SLASH_OR_GREATER_THAN_SYMBOL, Main::SLASH_SYMBOL, Main::SPACE_SYMBOLS, Main::TEXT_SYMBOL

Instance Method Summary collapse

Methods included from Main

#parse_document, #parse_document_block, #parse_document_block_body, #parse_document_command, #parse_document_command_argument, #parse_document_command_argument_key, #parse_document_command_argument_value, #parse_document_element, #parse_document_meta, #parse_document_string, #parse_document_text, #parse_skip_space

Constructor Details

#initializeParser

Returns a new instance of Parser.



19
20
21
# File 'lib/brandish/parser.rb', line 19

def initialize(*)
  super
end