Class: Antlr4ruby::LexerCustomAction

Inherits:
Object
  • Object
show all
Defined in:
lib/antlr4ruby/atn/action/lexer_custom_action.rb

Instance Method Summary collapse

Constructor Details

#initialize(rule_index, action_index) ⇒ LexerCustomAction

Returns a new instance of LexerCustomAction.



6
7
8
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 6

def initialize(rule_index, action_index)
  @rule_index, @action_index = rule_index, action_index
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 34

def eql?(other)
  # todo

end

#execute(lexer) ⇒ Object



26
27
28
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 26

def execute(lexer)
  lexer.action(nil, rule_index, action_index)
end

#get_action_indexObject



14
15
16
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 14

def get_action_index
  @action_index
end

#get_action_typeObject



18
19
20
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 18

def get_action_type
  :CUSTOM
end

#get_rule_indexObject



10
11
12
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 10

def get_rule_index
  @rule_index
end

#hashObject



30
31
32
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 30

def hash
  # todo

end

#is_position_dependentObject



22
23
24
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 22

def is_position_dependent
  true
end