Module: Dhaka::ParserMethods
- Included in:
- CompiledParser, Parser
- Defined in:
- lib/dhaka/parser/parser_methods.rb
Overview
This module is included both in Parser and CompiledParser.
Instance Method Summary collapse
-
#parse(token_stream) ⇒ Object
token_streamis an Enumerable of Token-s.
Instance Method Details
#parse(token_stream) ⇒ Object
token_stream is an Enumerable of Token-s. Returns either a ParseSuccessResult or a ParseErrorResult.
6 7 8 9 |
# File 'lib/dhaka/parser/parser_methods.rb', line 6 def parse token_stream parser_run = ParserRun.new(grammar, start_state, token_stream) parser_run.run end |