Class: TDParser::AnyParser

Inherits:
Parser
  • Object
show all
Defined in:
lib/tdp.rb

Instance Method Summary collapse

Methods inherited from Parser

#%, #*, #+, #-, #/, #>, #>>, #do, #optimize, #parse, #peek, #same?, #to_proc, #|, #~@

Methods included from TDParser

#any_rule, #backref, #chainl, #chainr, #condition_rule, define, #empty_rule, #fail_rule, #leftrec, #none_rule, #rightrec, #rule, #stackref, #state, #token

Methods included from BufferUtils

#prepare, #recover

Instance Method Details

#==(r) ⇒ Object



645
646
647
# File 'lib/tdp.rb', line 645

def ==(r)
  true
end

#call(tokens, buff) ⇒ Object



632
633
634
635
636
637
638
639
# File 'lib/tdp.rb', line 632

def call(tokens, buff)
  t = tokens.shift
  if (t.nil?)
    nil
  else
    Sequence[t]
  end
end

#to_sObject



641
642
643
# File 'lib/tdp.rb', line 641

def to_s()
  "<any>"
end