Lines Matching refs:self
29 def __init__ (self, buf): argument
30 self.buffer = buf
31 self.macro = None
32 self.debug = False
34 def parse (self): argument
39 if self.debug:
41 print("parsing '%s'"%self.buffer)
44 bufSize = len(self.buffer)
47 c = self.buffer[i]
52 content = self.buffer[i:]
53 self.setMacro(name, vars, content)
58 buf = self.buffer[i:]
59 vars, content = self.parseArgs(buf)
60 self.setMacro(name, vars, content)
66 def parseArgs (self, buffer): argument
106 def setMacro (self, name, vars, content): argument
107 if self.debug:
117 self.macro = Macro(name)
119 self.macro.vars[vars[i]] = i
126 self.macro.tokens = mclexer.getTokens()
127 if self.debug:
128 print(self.macro.tokens)
130 if not self.isValidMacro(self.macro):
131 self.macro = None
133 if self.debug:
134 if self.macro != None:
139 def isValidMacro (self, macro): argument
150 def getMacro (self): argument
151 return self.macro