Class: PLang::Parser::SyntaxAnalyser
- Inherits:
-
Object
- Object
- PLang::Parser::SyntaxAnalyser
- Defined in:
- lib/parser/syntax_analyser.rb
Instance Method Summary collapse
-
#initialize(src) ⇒ SyntaxAnalyser
constructor
A new instance of SyntaxAnalyser.
- #parse ⇒ Object
Constructor Details
#initialize(src) ⇒ SyntaxAnalyser
Returns a new instance of SyntaxAnalyser.
4 5 6 7 8 |
# File 'lib/parser/syntax_analyser.rb', line 4 def initialize(src) @eof = Token.new(:eof) @lexer = Lexer.new(src) consume end |
Instance Method Details
#parse ⇒ Object
10 11 12 |
# File 'lib/parser/syntax_analyser.rb', line 10 def parse program end |