Class: Antlr4ruby::LexerCustomAction
- Inherits:
-
Object
- Object
- Antlr4ruby::LexerCustomAction
- Defined in:
- lib/antlr4ruby/atn/action/lexer_custom_action.rb
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #execute(lexer) ⇒ Object
- #get_action_index ⇒ Object
- #get_action_type ⇒ Object
- #get_rule_index ⇒ Object
- #hash ⇒ Object
-
#initialize(rule_index, action_index) ⇒ LexerCustomAction
constructor
A new instance of LexerCustomAction.
- #is_position_dependent ⇒ Object
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
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_index ⇒ Object
14 15 16 |
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 14 def get_action_index @action_index end |
#get_action_type ⇒ Object
18 19 20 |
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 18 def get_action_type :CUSTOM end |
#get_rule_index ⇒ Object
10 11 12 |
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 10 def get_rule_index @rule_index end |
#hash ⇒ Object
30 31 32 |
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 30 def hash # todo end |
#is_position_dependent ⇒ Object
22 23 24 |
# File 'lib/antlr4ruby/atn/action/lexer_custom_action.rb', line 22 def is_position_dependent true end |