Class Dhaka::ProductionBuilder
In: ../trunk/lib/dhaka/grammar/grammar.rb
Parent: Object

Productions for specific grammar symbols are defined in the context of this class.


Public Class methods

symbol is the grammar symbol that productions are being defined for.

Public Instance methods

Creates a new production for symbol with an expansion of expansion. The options hash can include a directive :prec, the value of which is a grammar symbol name. The precedence of the production is then set to the precedence of the grammar symbol corresponding to that name.

See the arithmetic precedence grammar in the test suites for an example.