Exception: Dhaka::NoStartProductionsError

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

Overview

Raised when trying to create a Parser for a grammar that has no productions for the start symbol

Instance Method Summary collapse

Constructor Details

#initialize(grammar) ⇒ NoStartProductionsError

:nodoc:



144
145
146
# File 'lib/parser/parser.rb', line 144

def initialize(grammar) #:nodoc:
  @grammar = grammar
end

Instance Method Details

#to_sObject

:nodoc:



147
148
149
# File 'lib/parser/parser.rb', line 147

def to_s #:nodoc:
  "No start productions defined for #{@grammar.name}"
end