Class: Antlr4::Runtime::LexerATNConfig

Inherits:
ATNConfig
  • Object
show all
Defined in:
lib/antlr4/runtime/lexer_atn_config.rb

Constant Summary

Constants inherited from ATNConfig

ATNConfig::SUPPRESS_PRECEDENCE_FILTER

Instance Attribute Summary collapse

Attributes inherited from ATNConfig

#alt, #context, #reaches_into_outer_context, #semantic_context, #state, #target

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ATNConfig

#atn_config1, #atn_config2, #atn_config3, #atn_config4, #atn_config5, #atn_config6, #atn_config7, #atn_config_copy, #bucket_hash, #eql?, #hash, #outer_context_depth, #precedence_filter_suppressed, #precedence_filter_suppressed?, #to_s, #to_s2

Constructor Details

#initializeLexerATNConfig

Returns a new instance of LexerATNConfig


17
18
19
20
21
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 17

def initialize
  super
  @passed_through_non_greedy_decision = false
  @lexer_action_executor = nil
end

Instance Attribute Details

#lexer_action_executorObject

Returns the value of attribute lexer_action_executor


15
16
17
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 15

def lexer_action_executor
  @lexer_action_executor
end

#passed_through_non_greedy_decisionObject

Returns the value of attribute passed_through_non_greedy_decision


14
15
16
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 14

def passed_through_non_greedy_decision
  @passed_through_non_greedy_decision
end

Class Method Details

.create_from_config(*args) ⇒ Object


5
6
7
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 5

def create_from_config(*args)
  new.tap { |atn| atn.lexer_atn_config3(*args) }
end

.create_from_config2(*args) ⇒ Object


9
10
11
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 9

def create_from_config2(*args)
  new.tap { |atn| atn.lexer_atn_config5(*args) }
end

Instance Method Details

#check_non_greedy_decision(source, target) ⇒ Object


53
54
55
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 53

def check_non_greedy_decision(source, target)
  source.passed_through_non_greedy_decision || target.is_a?(DecisionState) && target.non_greedy
end

#lexer_atn_config1(state, alt, context) ⇒ Object


23
24
25
26
27
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 23

def lexer_atn_config1(state, alt, context)
  atn_config2(state, alt, context, SemanticContext::NONE)
  @passed_through_non_greedy_decision = false
  @lexer_action_executor = nil
end

#lexer_atn_config2(state, alt, context, lexer_action_executor) ⇒ Object


29
30
31
32
33
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 29

def lexer_atn_config2(state, alt, context, lexer_action_executor)
  atn_config7(state, alt, context, SemanticContext::NONE)
  @lexer_action_executor = lexer_action_executor
  @passed_through_non_greedy_decision = false
end

#lexer_atn_config3(c, state) ⇒ Object


35
36
37
38
39
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 35

def lexer_atn_config3(c, state)
  atn_config7(c, state, c.context, c.semantic_context)
  @lexer_action_executor = c.lexer_action_executor
  @passed_through_non_greedy_decision = check_non_greedy_decision(c, state)
end

#lexer_atn_config4(c, state, lexer_action_executor) ⇒ Object


41
42
43
44
45
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 41

def lexer_atn_config4(c, state, lexer_action_executor)
  atn_config7(c, state, c.context, c.semantic_context)
  @lexer_action_executor = lexer_action_executor
  @passed_through_non_greedy_decision = check_non_greedy_decision(c, state)
end

#lexer_atn_config5(c, state, context) ⇒ Object


47
48
49
50
51
# File 'lib/antlr4/runtime/lexer_atn_config.rb', line 47

def lexer_atn_config5(c, state, context)
  atn_config7(c, state, context, c.semantic_context)
  @lexer_action_executor = c.lexer_action_executor
  @passed_through_non_greedy_decision = check_non_greedy_decision(c, state)
end