Lines Matching +full:test +full:- +full:suite
19 funcdef: 'def' NAME parameters ['->' test] ':' suite
25 # argument = tfpdef ['=' test]
36 typedargslist: tfpdef ['=' test] (',' tfpdef ['=' test])* ',' '/' [
37 ',' [((tfpdef ['=' test] ',')* ('*' [tname] (',' tname ['=' test])*
39 | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])]
40 ] | ((tfpdef ['=' test] ',')* ('*' [tname] (',' tname ['=' test])*
42 | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])
44 tname: NAME [':' test]
51 # argument = vfpdef ['=' test]
62 varargslist: vfpdef ['=' test ](',' vfpdef ['=' test])* ',' '/' [',' [
63 ((vfpdef ['=' test] ',')* ('*' [vname] (',' vname ['=' test])*
65 | vfpdef ['=' test] (',' vfpdef ['=' test])* [','])
66 ]] | ((vfpdef ['=' test] ',')*
67 … ('*' [vname] (',' vname ['=' test])* [',' ['**' vname [',']]]| '**' vname [','])
68 | vfpdef ['=' test] (',' vfpdef ['=' test])* [','])
80 annassign: ':' test ['=' test]
81 testlist_star_expr: (test|star_expr) (',' (test|star_expr))* [',']
82 augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' |
85 print_stmt: 'print' ( [ test (',' test)* [','] ] |
86 '>>' test [ (',' test)+ [','] ] )
94 raise_stmt: 'raise' [test ['from' test | ',' test [',' test]]]
105 exec_stmt: 'exec' expr ['in' test [',' test]]
106 assert_stmt: 'assert' test [',' test]
110 if_stmt: 'if' namedexpr_test ':' suite ('elif' namedexpr_test ':' suite)* ['else' ':' suite]
111 while_stmt: 'while' namedexpr_test ':' suite ['else' ':' suite]
112 for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
113 try_stmt: ('try' ':' suite
114 ((except_clause ':' suite)+
115 ['else' ':' suite]
116 ['finally' ':' suite] |
117 'finally' ':' suite))
118 with_stmt: 'with' with_item (',' with_item)* ':' suite
119 with_item: test ['as' expr]
122 except_clause: 'except' [test [(',' | 'as') test]]
123 suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
134 namedexpr_test: test [':=' test]
135 test: or_test ['if' or_test 'else' test] | lambdef
146 arith_expr: term (('+'|'-') term)*
148 factor: ('+'|'-'|'~') factor | power
157 lambdef: 'lambda' [varargslist] ':' test
160 subscript: test | [test] ':' [test] [sliceop]
161 sliceop: ':' [test]
163 testlist: test (',' test)* [',']
164 dictsetmaker: ( ((test ':' test | '**' expr)
165 (comp_for | (',' (test ':' test | '**' expr))* [','])) |
166 ((test | star_expr)
167 (comp_for | (',' (test | star_expr))* [','])) )
169 classdef: 'class' NAME ['(' [arglist] ')'] ':' suite
173 # "test '=' test" is really "keyword '=' test", but we have no such token.
175 # to our LL(1) parser. Even though 'test' includes '*expr' in star_expr,
178 # multiple (test comp_for) arguments are blocked; keyword unpackings
180 argument: ( test [comp_for] |
181 test ':=' test |
182 test '=' test |
183 '**' test |
184 '*' test )
190 testlist1: test (',' test)*
196 yield_arg: 'from' test | testlist_star_expr