Class: BELParser::Script::Parser
- Inherits:
-
Object
- Object
- BELParser::Script::Parser
- Includes:
- Parsers::BELScript, Parsers::Common, Parsers::Expression
- Defined in:
- lib/bel_parser/script/parser.rb
Overview
Parser for BEL Script.
Constant Summary collapse
- TYPES =
[ :simple_statement, :observed_term, :nested_statement, :annotation_definition, :namespace_definition, :set, :document_property, :unset, :blank_line, :comment_line ]
Instance Method Summary collapse
Instance Method Details
#each(io) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/bel_parser/script/parser.rb', line 28 def each(io) if block_given? filter = BELParser::ASTFilter.new( BELParser::ASTGenerator.new(io), *TYPES) filter.each do |results| yield results end else enum_for(:each, io) end end |