Class: Lrama::Grammar::Reference

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

Overview

type: :dollar or :at name: String (e.g. $$, $foo, $expr.right) number: Integer (e.g. $1) index: Integer ex_tag: "$1" (Optional)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ex_tagObject

Returns the value of attribute ex_tag

Returns:

  • (Object)

    the current value of ex_tag



11
12
13
# File 'lib/lrama/grammar/reference.rb', line 11

def ex_tag
  @ex_tag
end

#first_columnObject

Returns the value of attribute first_column

Returns:

  • (Object)

    the current value of first_column



11
12
13
# File 'lib/lrama/grammar/reference.rb', line 11

def first_column
  @first_column
end

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



11
12
13
# File 'lib/lrama/grammar/reference.rb', line 11

def index
  @index
end

#last_columnObject

Returns the value of attribute last_column

Returns:

  • (Object)

    the current value of last_column



11
12
13
# File 'lib/lrama/grammar/reference.rb', line 11

def last_column
  @last_column
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



11
12
13
# File 'lib/lrama/grammar/reference.rb', line 11

def name
  @name
end

#numberObject

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



11
12
13
# File 'lib/lrama/grammar/reference.rb', line 11

def number
  @number
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



11
12
13
# File 'lib/lrama/grammar/reference.rb', line 11

def type
  @type
end

Instance Method Details

#valueObject



24
25
26
# File 'lib/lrama/grammar/reference.rb', line 24

def value
  name || number
end