• Home
  • Raw
  • Download

Lines Matching +full:test +full:- +full:suite

6 #        that module yourself, please co-ordinate the required changes
7 # with someone who can; ask around on python-dev for help. Fred
37 funcdef: 'def' NAME parameters ['->' test] ':' suite
39 typedargslist: ((tfpdef ['=' test] ',')*
40 ('*' [tname] (',' tname ['=' test])* [',' '**' tname] | '**' tname)
41 | tfpdef ['=' test] (',' tfpdef ['=' test])* [','])
42 tname: NAME [':' test]
45 varargslist: ((vfpdef ['=' test] ',')*
46 ('*' [vname] (',' vname ['=' test])* [',' '**' vname] | '**' vname)
47 | vfpdef ['=' test] (',' vfpdef ['=' test])* [','])
58 testlist_star_expr: (test|star_expr) (',' (test|star_expr))* [',']
59 augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' |
62 print_stmt: 'print' ( [ test (',' test)* [','] ] |
63 '>>' test [ (',' test)+ [','] ] )
71 raise_stmt: 'raise' [test ['from' test | ',' test [',' test]]]
82 exec_stmt: 'exec' expr ['in' test [',' test]]
83 assert_stmt: 'assert' test [',' test]
86 if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
87 while_stmt: 'while' test ':' suite ['else' ':' suite]
88 for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
89 try_stmt: ('try' ':' suite
90 ((except_clause ':' suite)+
91 ['else' ':' suite]
92 ['finally' ':' suite] |
93 'finally' ':' suite))
94 with_stmt: 'with' with_item (',' with_item)* ':' suite
95 with_item: test ['as' expr]
98 except_clause: 'except' [test [(',' | 'as') test]]
99 suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
110 test: or_test ['if' or_test 'else' test] | lambdef
121 arith_expr: term (('+'|'-') term)*
123 factor: ('+'|'-'|'~') factor | power
130 listmaker: (test|star_expr) ( comp_for | (',' (test|star_expr))* [','] )
131 testlist_gexp: (test|star_expr) ( comp_for | (',' (test|star_expr))* [','] )
132 lambdef: 'lambda' [varargslist] ':' test
135 subscript: test | [test] ':' [test] [sliceop]
136 sliceop: ':' [test]
138 testlist: test (',' test)* [',']
139 dictsetmaker: ( ((test ':' test | '**' expr)
140 (comp_for | (',' (test ':' test | '**' expr))* [','])) |
141 ((test | star_expr)
142 (comp_for | (',' (test | star_expr))* [','])) )
144 classdef: 'class' NAME ['(' [arglist] ')'] ':' suite
148 # "test '=' test" is really "keyword '=' test", but we have no such token.
150 # to our LL(1) parser. Even though 'test' includes '*expr' in star_expr,
153 # multiple (test comp_for) arguments are blocked; keyword unpackings
155 argument: ( test [comp_for] |
156 test '=' test |
164 testlist1: test (',' test)*
170 yield_arg: 'from' test | testlist