Home | History | Annotate | Download | only in test

Lines Matching refs:parser

1 import parser
11 # of the parser module.
20 st2 = parser.sequence2st(t)
21 except parser.ParserError, why:
28 self.roundtrip(parser.expr, s)
33 suite = parser.suite("from __future__ import unicode_literals; x = ''")
40 self.roundtrip(parser.suite, s)
264 st1 = parser.suite(code)
307 parser.sequence2st(tree)
308 except parser.ParserError:
550 st = parser.expr('2 + 3')
551 code = parser.compilest(st)
555 st = parser.suite('x = 2; y = x + 3')
556 code = parser.compilest(st)
562 st = parser.suite('1 = 3 + 4')
563 self.assertRaises(SyntaxError, parser.compilest, st)
566 st = parser.suite('a = u"\U12345678"')
567 self.assertRaises(SyntaxError, parser.compilest, st)
568 st = parser.suite('a = u"\u1"')
569 self.assertRaises(SyntaxError, parser.compilest, st)
575 st = parser.expr('-3')
576 code1 = parser.compilest(st)
578 code2 = parser.compilest(st)
583 """try to push the parser to/over its limits.
591 st = parser.expr(e)
599 self.assertIn(b's_push: parser stack overflow', err)
636 check_st_sizeof(parser.expr('2 + 3'))
637 check_st_sizeof(parser.expr('2 + 3 + 4'))
638 check_st_sizeof(parser.suite('x = 2 + 3'))
639 check_st_sizeof(parser.suite(''))
640 check_st_sizeof(parser.suite('# -*- coding: utf-8 -*-'))
641 check_st_sizeof(parser.expr('[' + '2,' * 1000 + ']'))