SPRAAK
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions
spr_pylib.capi.lex.Lexer Class Reference

Public Member Functions

def __init__
 
def clone
 
def writetab
 
def readtab
 
def input
 
def begin
 
def push_state
 
def pop_state
 
def current_state
 
def skip
 
def token
 

Constructor & Destructor Documentation

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

Member Function Documentation

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

writetab() - Write lexer information to a table file

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

readtab() - Read lexer information from a tab file

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

input() - Push a new string into the lexer

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

begin() - Changes the lexing state

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

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

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

pop_state() - Restores the previous state

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

current_state() - Returns the current lexing state

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

skip() - Skip ahead n characters

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