Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Grammar/Grammar
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,15 @@ augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' |
# For normal and annotated assignments, additional restrictions enforced by the interpreter
del_stmt: 'del' exprlist
pass_stmt: 'pass'
flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt | yield_stmt
flow_stmt: break_stmt | continue_stmt | return_stmt | raise_stmt | yield_stmt | almog_stmt
break_stmt: 'break'
continue_stmt: 'continue'
return_stmt: 'return' [testlist_star_expr]
yield_stmt: yield_expr
raise_stmt: 'raise' [test ['from' test]]
import_stmt: import_name | import_from
import_name: 'import' dotted_as_names
almog_stmt: 'almog'
# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS
import_from: ('from' (('.' | '...')* dotted_name | ('.' | '...')+)
'import' ('*' | '(' import_as_names ')' | import_as_names))
Expand Down
5 changes: 4 additions & 1 deletion Include/Python-ast.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

125 changes: 63 additions & 62 deletions Include/graminit.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Lib/keyword.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'False',
'None',
'True',
'almog',
'and',
'as',
'assert',
Expand Down
125 changes: 63 additions & 62 deletions Lib/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,68 +42,69 @@
raise_stmt = 283
import_stmt = 284
import_name = 285
import_from = 286
import_as_name = 287
dotted_as_name = 288
import_as_names = 289
dotted_as_names = 290
dotted_name = 291
global_stmt = 292
nonlocal_stmt = 293
assert_stmt = 294
compound_stmt = 295
async_stmt = 296
if_stmt = 297
while_stmt = 298
for_stmt = 299
try_stmt = 300
with_stmt = 301
with_item = 302
except_clause = 303
suite = 304
namedexpr_test = 305
test = 306
test_nocond = 307
lambdef = 308
lambdef_nocond = 309
or_test = 310
and_test = 311
not_test = 312
comparison = 313
comp_op = 314
star_expr = 315
expr = 316
xor_expr = 317
and_expr = 318
shift_expr = 319
arith_expr = 320
term = 321
factor = 322
power = 323
atom_expr = 324
atom = 325
testlist_comp = 326
trailer = 327
subscriptlist = 328
subscript = 329
sliceop = 330
exprlist = 331
testlist = 332
dictorsetmaker = 333
classdef = 334
arglist = 335
argument = 336
comp_iter = 337
sync_comp_for = 338
comp_for = 339
comp_if = 340
encoding_decl = 341
yield_expr = 342
yield_arg = 343
func_body_suite = 344
func_type_input = 345
func_type = 346
typelist = 347
almog_stmt = 286
import_from = 287
import_as_name = 288
dotted_as_name = 289
import_as_names = 290
dotted_as_names = 291
dotted_name = 292
global_stmt = 293
nonlocal_stmt = 294
assert_stmt = 295
compound_stmt = 296
async_stmt = 297
if_stmt = 298
while_stmt = 299
for_stmt = 300
try_stmt = 301
with_stmt = 302
with_item = 303
except_clause = 304
suite = 305
namedexpr_test = 306
test = 307
test_nocond = 308
lambdef = 309
lambdef_nocond = 310
or_test = 311
and_test = 312
not_test = 313
comparison = 314
comp_op = 315
star_expr = 316
expr = 317
xor_expr = 318
and_expr = 319
shift_expr = 320
arith_expr = 321
term = 322
factor = 323
power = 324
atom_expr = 325
atom = 326
testlist_comp = 327
trailer = 328
subscriptlist = 329
subscript = 330
sliceop = 331
exprlist = 332
testlist = 333
dictorsetmaker = 334
classdef = 335
arglist = 336
argument = 337
comp_iter = 338
sync_comp_for = 339
comp_for = 340
comp_if = 341
encoding_decl = 342
yield_expr = 343
yield_arg = 344
func_body_suite = 345
func_type_input = 346
func_type = 347
typelist = 348
#--end constants--

sym_name = {}
Expand Down
2 changes: 1 addition & 1 deletion Parser/Python.asdl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module Python
| Global(identifier* names)
| Nonlocal(identifier* names)
| Expr(expr value)
| Pass | Break | Continue
| Pass | Break | Continue | Almog

-- XXX Jython will be different
-- col_offset is the byte offset in the utf8 string the parser uses
Expand Down
35 changes: 35 additions & 0 deletions Python/Python-ast.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading