Class: Antlr4ruby::DFAState
- Inherits:
-
Object
- Object
- Antlr4ruby::DFAState
- Defined in:
- lib/antlr4ruby/dfa/dfa_state.rb
Defined Under Namespace
Classes: PredPrediction
Constant Summary collapse
- INITIAL_NUM_TRANSITIONS =
4- INVALID_TYPE =
0- BASIC =
1- RULE_START =
2- BLOCK_START =
3- PLUS_BLOCK_START =
4- STAR_BLOCK_START =
5- TOKEN_START =
6- RULE_STOP =
7- BLOCK_END =
8- STAR_LOOP_BACK =
9- STAR_LOOP_ENTRY =
10- PLUS_LOOP_BACK =
11- LOOP_END =
12
Instance Attribute Summary collapse
-
#configs ⇒ Object
Returns the value of attribute configs.
-
#edges ⇒ Object
Returns the value of attribute edges.
-
#is_accept_state ⇒ Object
Returns the value of attribute is_accept_state.
-
#lexer_action_executor ⇒ Object
Returns the value of attribute lexer_action_executor.
-
#predicates ⇒ Object
Returns the value of attribute predicates.
-
#prediction ⇒ Object
Returns the value of attribute prediction.
-
#requires_full_context ⇒ Object
Returns the value of attribute requires_full_context.
-
#state_number ⇒ Object
Returns the value of attribute state_number.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #get_alt_set ⇒ Object
- #hash ⇒ Object
-
#initialize(configs) ⇒ DFAState
constructor
A new instance of DFAState.
- #to_s ⇒ Object
Constructor Details
#initialize(configs) ⇒ DFAState
Returns a new instance of DFAState.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 40 def initialize(configs) @configs = ATNConfigSet.new @state_number = -1 @edges = [] @is_accept_state = false @prediction = 0 @predicates = [] if configs if configs.instance_of?(Integer) @state_number = configs elsif configs.instance_of?(ATNConfigSet) @configs = configs end end end |
Instance Attribute Details
#configs ⇒ Object
Returns the value of attribute configs.
20 21 22 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 20 def configs @configs end |
#edges ⇒ Object
Returns the value of attribute edges.
20 21 22 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 20 def edges @edges end |
#is_accept_state ⇒ Object
Returns the value of attribute is_accept_state.
20 21 22 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 20 def is_accept_state @is_accept_state end |
#lexer_action_executor ⇒ Object
Returns the value of attribute lexer_action_executor.
20 21 22 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 20 def lexer_action_executor @lexer_action_executor end |
#predicates ⇒ Object
Returns the value of attribute predicates.
20 21 22 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 20 def predicates @predicates end |
#prediction ⇒ Object
Returns the value of attribute prediction.
20 21 22 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 20 def prediction @prediction end |
#requires_full_context ⇒ Object
Returns the value of attribute requires_full_context.
20 21 22 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 20 def requires_full_context @requires_full_context end |
#state_number ⇒ Object
Returns the value of attribute state_number.
20 21 22 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 20 def state_number @state_number end |
Instance Method Details
#eql?(other) ⇒ Boolean
72 73 74 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 72 def eql?(other) # todo end |
#get_alt_set ⇒ Object
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 57 def get_alt_set alts = Set.new if @configs # todo end if alts.empty? return nil end alts end |
#hash ⇒ Object
68 69 70 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 68 def hash # todo end |
#to_s ⇒ Object
76 77 78 |
# File 'lib/antlr4ruby/dfa/dfa_state.rb', line 76 def to_s # todo end |