module RubyLexer::SSWrapper

def beginning_of_line?

def beginning_of_line?
  ss.bol?
end

def check re

def check re
  maybe_pop_stack
  ss.check re
end

def end_of_stream?

def end_of_stream?
  ss.eos?
end

def getch

def getch
  c = ss.getch
  c = ss.getch if c == "\r" && ss.peek(1) == "\n"
  c
end

def in_heredoc?

def in_heredoc?
  !!self.old_ss
end

def match

def match
  ss
end

def matched

def matched
  ss.matched
end

def maybe_pop_stack

def maybe_pop_stack
  if ss.eos? && in_heredoc? then
    self.ss_pop
    self.lineno_pop
  end
end

def pos

def pos
  ss.pos
end

def pos= n

def pos= n
  ss.pos = n
end

def rest

def rest
  ss.rest
end

def scan re

def scan re
  maybe_pop_stack
  ss.scan re
end

def scanner_class # TODO: design this out of oedipus_lex. or something.

TODO: design this out of oedipus_lex. or something.
def scanner_class # TODO: design this out of oedipus_lex. or something.
  RPStringScanner
end

def ss_string

def ss_string
  ss.string
end

def ss_string= s

def ss_string= s
  raise "Probably not"
  ss.string = s
end

def string= s

def string= s
  ss.string= s
end

def unscan

def unscan
  ss.unscan
end