blob: b075d35fe197795ba99c16533482be462842b68d [file] [log] [blame]
Barry Warsawdde5c701996-12-10 23:20:09 +00001test_grammar
21. Parser
31.1 Tokens
41.1.1 Backslashes
51.1.2 Numeric literals
61.1.2.1 Plain integers
71.1.2.2 Long integers
81.1.2.3 Floating point
91.1.3 String literals
101.2 Grammar
11single_input
12file_input
13expr_input
14eval_input
15funcdef
16simple_stmt
17expr_stmt
18print_stmt
191 2 3
201 2 3
211 1 1
22del_stmt
23pass_stmt
24flow_stmt
25break_stmt
26continue_stmt
27return_stmt
28raise_stmt
29import_stmt
30global_stmt
31exec_stmt
32if_stmt
33while_stmt
34for_stmt
35try_stmt
36suite
37test
38comparison
39binary mask ops
40shift ops
41additive ops
42multiplicative ops
43unary ops
44selectors
Jeremy Hyltonaed0d8d2000-03-28 23:51:17 +000045
Barry Warsawdde5c701996-12-10 23:20:09 +000046atoms
47classdef
Skip Montanaro803d6e52000-08-12 18:09:51 +000048['Apple', 'Banana', 'Coco nut']
49[3, 6, 9, 12, 15]
50[3, 4, 5]
51[(1, 'Apple'), (1, 'Banana'), (1, 'Coconut'), (2, 'Apple'), (2, 'Banana'), (2, 'Coconut'), (3, 'Apple'), (3, 'Banana'), (3, 'Coconut'), (4, 'Apple'), (4, 'Banana'), (4, 'Coconut'), (5, 'Apple'), (5, 'Banana'), (5, 'Coconut')]
52[(1, 'Banana'), (1, 'Coconut'), (2, 'Banana'), (2, 'Coconut'), (3, 'Banana'), (3, 'Coconut'), (4, 'Banana'), (4, 'Coconut'), (5, 'Banana'), (5, 'Coconut')]
53good: got a SyntaxError as expected
54[('Boeing', 'Airliner'), ('Boeing', 'Engine'), ('Ford', 'Engine'), ('Macdonalds', 'Cheeseburger')]