Lines Matching refs:clex
9 def token_list(clex): argument
10 return list(iter(clex.token, None))
13 def token_types(clex): argument
14 return [i.type for i in token_list(clex)]
38 self.clex = CLexer(self.error_func, lambda: None, lambda: None,
40 self.clex.build(optimize=False)
43 self.clex.input(str)
44 self.assertEqual(token_types(self.clex), types)
135 clex = CLexer(self.error_func, on_lbrace, on_rbrace,
137 clex.build(optimize=False)
138 clex.input('hello { there } } and again }}{')
139 token_list(clex)
290 self.clex.input(str)
291 self.clex.reset_lineno()
293 t1 = self.clex.token()
297 t2 = self.clex.token()
301 self.assertEqual(self.clex.filename, r'kwas\df.h')
304 t = self.clex.token()
309 self.assertEqual(self.clex.filename, r'kwas\df.h')
311 t4 = self.clex.token()
315 self.assertEqual(self.clex.filename, r'..\~..\test.h')
317 t5 = self.clex.token()
321 self.assertEqual(self.clex.filename, r'include/me.h')
328 self.clex.input(str)
329 self.clex.reset_lineno()
331 t1 = self.clex.token()
334 self.assertEqual(self.clex.filename, r'..\6\joe.h')
352 self.clex.input(str)
353 self.clex.reset_lineno()
355 t1 = self.clex.token()
358 t2 = self.clex.token()
361 t3 = self.clex.token()
364 t4 = self.clex.token()
369 t = self.clex.token()
371 t5 = self.clex.token()
376 ta = self.clex.token()
378 tb = self.clex.token()
381 t6 = self.clex.token()
419 self.clex = CLexer(self.error_func, self.on_lbrace_func,
421 self.clex.build(optimize=False)
426 self.clex.input(str)
432 token_types(self.clex)