SPRAAK
Public Member Functions
spr_pylib.capi.lex.Lexer Class Reference

Public Member Functions

def __init__ (self)
 
def clone (self, object=None)
 
def writetab (self, tabfile)
 
def readtab (self, tabfile, fdict)
 
def input (self, s)
 
def begin (self, state)
 
def push_state (self, state)
 
def pop_state (self)
 
def current_state (self)
 
def skip (self, n)
 
def token (self)
 

Constructor & Destructor Documentation

§ __init__()

def spr_pylib.capi.lex.Lexer.__init__ (   self)

Member Function Documentation

§ clone()

def spr_pylib.capi.lex.Lexer.clone (   self,
  object = None 
)

§ writetab()

def spr_pylib.capi.lex.Lexer.writetab (   self,
  tabfile 
)

writetab() - Write lexer information to a table file

§ readtab()

def spr_pylib.capi.lex.Lexer.readtab (   self,
  tabfile,
  fdict 
)

readtab() - Read lexer information from a tab file

§ input()

def spr_pylib.capi.lex.Lexer.input (   self,
  s 
)

input() - Push a new string into the lexer

§ begin()

def spr_pylib.capi.lex.Lexer.begin (   self,
  state 
)

begin() - Changes the lexing state

§ push_state()

def spr_pylib.capi.lex.Lexer.push_state (   self,
  state 
)

push_state() - Changes the lexing state and saves old on stack

§ pop_state()

def spr_pylib.capi.lex.Lexer.pop_state (   self)

pop_state() - Restores the previous state

§ current_state()

def spr_pylib.capi.lex.Lexer.current_state (   self)

current_state() - Returns the current lexing state

§ skip()

def spr_pylib.capi.lex.Lexer.skip (   self,
  n 
)

skip() - Skip ahead n characters

§ token()

def spr_pylib.capi.lex.Lexer.token (   self)

token() - Return the next token from the Lexer

Note: This function has been carefully implemented to be as fast as possible. Don't make changes unless you really know what

you are doing