Home | History | Annotate | Download | only in sepolgen

Lines Matching defs:Lexer

59         self.lexer.skip(n)
62 # Lexer class
64 # This class encapsulates all of the methods and data associated with a lexer.
66 # input() - Store a new string in the lexer
70 class Lexer:
77 self.lexstatere = {} # Dictionary mapping lexer states to master regexs
78 self.lexstateretext = {} # Dictionary mapping lexer states to regex strings
79 self.lexstate = "INITIAL" # Current lexer state
80 self.lexstatestack = [] # Stack of lexer states
98 c = Lexer()
118 # lexer to a new object. In this case, we have to rebind all methods in
145 # writetab() - Write lexer information to a table file
175 # readtab() - Read lexer information from a tab file
200 # input() - Push a new string into the lexer
247 # token() - Return the next token from the Lexer
271 # Set last match in lexer so that rules can access it if they want
279 tok.lexer = self
317 tok.lexer = self
329 tok.lexer = self
488 global lexer
493 lexobj = Lexer()
531 lexer = lexobj
764 raise SyntaxError("lex: Unable to build lexer.")
766 # From this point forward, we're reasonably confident that we can build the lexer.
816 lexer = lexobj
827 # This runs the lexer as a main program
830 def runmain(lexer=None,data=None):
841 if lexer:
842 _input = lexer.input
846 if lexer:
847 _token = lexer.token