Exception: Calyx::Errors::InvalidDefinition

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/calyx/errors.rb

Overview

Raised when a rule defined in a grammar is invalid. This will prevent the grammar from compiling correctly.

Calyx::Grammar.new do
  start '40%' => 0.4, '30%' => 0.3
end

# => Calyx::Errors::InvalidDefinition: Weights must sum to 1