Class: Parser::CLexer::CmdargProxyStack
- Inherits:
-
Object
- Object
- Parser::CLexer::CmdargProxyStack
- Defined in:
- lib/c_lexer.rb
Instance Method Summary collapse
- #clear ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(lexer) ⇒ CmdargProxyStack
constructor
A new instance of CmdargProxyStack.
- #initialize_copy(original) ⇒ Object
- #lexpop ⇒ Object
- #pop ⇒ Object
- #push(value) ⇒ Object
- #to_s ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(lexer) ⇒ CmdargProxyStack
Returns a new instance of CmdargProxyStack.
15 16 17 18 |
# File 'lib/c_lexer.rb', line 15 def initialize(lexer) @lexer = lexer @value = nil end |
Instance Method Details
#clear ⇒ Object
23 |
# File 'lib/c_lexer.rb', line 23 def clear; @lexer.clear_cmdarg_state; end |
#empty? ⇒ Boolean
24 |
# File 'lib/c_lexer.rb', line 24 def empty?; @lexer.cmdarg_state_empty?; end |
#initialize_copy(original) ⇒ Object
26 27 28 |
# File 'lib/c_lexer.rb', line 26 def initialize_copy(original) @value = original.value end |
#lexpop ⇒ Object
22 |
# File 'lib/c_lexer.rb', line 22 def lexpop; @lexer.lexpop_cmdarg_state; end |
#pop ⇒ Object
21 |
# File 'lib/c_lexer.rb', line 21 def pop; @lexer.pop_cmdarg_state; end |
#push(value) ⇒ Object
20 |
# File 'lib/c_lexer.rb', line 20 def push(value); @lexer.push_cmdarg_state(value); end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/c_lexer.rb', line 30 def to_s "[#{value.to_s(2)} <= cmdarg]" end |
#value ⇒ Object
25 |
# File 'lib/c_lexer.rb', line 25 def value; @value || @lexer.cmdarg_state_value; end |