Class: Mapper::Token

Inherits:
Struct
  • Object
show all
Defined in:
../lib/grammar.rb

Overview

The atomic part of the rule. If :type is :symbol, then :data means the string representing a nonterminal symbol. If :type is :literal, then :data means the string representing terminal symbol(s). The depth attribute is reserved for purposes of the mapper. The :track is used only when Mapper#track_support_on == true

Instance Attribute Summary (collapse)

Instance Attribute Details

- (Object) data

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



9
10
11
# File '../lib/grammar.rb', line 9

def data
  @data
end

- (Object) depth

Returns the value of attribute depth

Returns:

  • (Object)

    the current value of depth



9
10
11
# File '../lib/grammar.rb', line 9

def depth
  @depth
end

- (Object) track

Returns the value of attribute track

Returns:

  • (Object)

    the current value of track



9
10
11
# File '../lib/grammar.rb', line 9

def track
  @track
end

- (Object) type

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



9
10
11
# File '../lib/grammar.rb', line 9

def type
  @type
end