Class: Lrama::Reference

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

Overview

type: :dollar or :at ex_tag: “$<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



250
251
252
# File 'lib/lrama/grammar.rb', line 250

def ex_tag
  @ex_tag
end

#first_columnObject

Returns the value of attribute first_column

Returns:

  • (Object)

    the current value of first_column



250
251
252
# File 'lib/lrama/grammar.rb', line 250

def first_column
  @first_column
end

#last_columnObject

Returns the value of attribute last_column

Returns:

  • (Object)

    the current value of last_column



250
251
252
# File 'lib/lrama/grammar.rb', line 250

def last_column
  @last_column
end

#numberObject

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



250
251
252
# File 'lib/lrama/grammar.rb', line 250

def number
  @number
end

#position_in_rhsObject

Returns the value of attribute position_in_rhs

Returns:

  • (Object)

    the current value of position_in_rhs



250
251
252
# File 'lib/lrama/grammar.rb', line 250

def position_in_rhs
  @position_in_rhs
end

#referring_symbolObject

Returns the value of attribute referring_symbol

Returns:

  • (Object)

    the current value of referring_symbol



250
251
252
# File 'lib/lrama/grammar.rb', line 250

def referring_symbol
  @referring_symbol
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



250
251
252
# File 'lib/lrama/grammar.rb', line 250

def type
  @type
end

Instance Method Details

#tagObject



251
252
253
254
255
256
257
# File 'lib/lrama/grammar.rb', line 251

def tag
  if ex_tag
    ex_tag
  else
    referring_symbol.tag
  end
end