Class: Dhaka::LexerSupport::LookaheadAcceptAction

Inherits:
AcceptAction
  • Object
show all
Defined in:
lib/lexer/regex_grammar.rb

Instance Attribute Summary

Attributes inherited from AcceptAction

#pattern

Instance Method Summary collapse

Methods inherited from AcceptAction

#initialize

Constructor Details

This class inherits a constructor from Dhaka::LexerSupport::AcceptAction

Instance Method Details

#call(lexer_run) ⇒ Object



429
430
431
# File 'lib/lexer/regex_grammar.rb', line 429

def call(lexer_run)
    lexer_run.accept_last_saved_checkpoint(pattern)
end

#compile_to_ruby_sourceObject



433
434
435
# File 'lib/lexer/regex_grammar.rb', line 433

def compile_to_ruby_source
  "accept_with_lookahead(#{pattern.inspect})"
end

#to_dotObject



437
438
439
# File 'lib/lexer/regex_grammar.rb', line 437

def to_dot
  "Accept With Lookahead #{pattern.inspect}"
end