Parent

Methods

Dhaka::GrammarSymbol

Each grammar symbol is uniquely identified by a string name. The name of a symbol can be anything (except the two reserved names '_Start_' and '_End_') and need not correspond to its character representation. For example, an ampersand in the input string could be tokenized as a symbol with a name 'AND_OP'. You never have to directly instantiate a GrammarSymbol. It is done implicitly for you when you define a Grammar.

Attributes

associativity[RW]
name[R]
non_terminal[RW]
nullable[RW]
precedence[RW]

Public Class Methods

new(name) click to toggle source
# File lib/dhaka/grammar/grammar_symbol.rb, line 11
def initialize(name)
  @name = name
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/dhaka/grammar/grammar_symbol.rb, line 23
def <=> other
  name <=> other.name
end
terminal() click to toggle source
# File lib/dhaka/grammar/grammar_symbol.rb, line 15
def terminal
  !non_terminal
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.