Class: PLang::Parser::SyntaxAnalyser

Inherits:
Object
  • Object
show all
Defined in:
lib/parser/syntax_analyser.rb

Instance Method Summary collapse

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

#parseObject



10
11
12
# File 'lib/parser/syntax_analyser.rb', line 10

def parse
  program
end