Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d5a62d

Browse files
committed
murder tabs
1 parent 0fa35ea commit 8d5a62d

1 file changed

Lines changed: 98 additions & 98 deletions

File tree

Parser/Python.asdl

Lines changed: 98 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -2,119 +2,119 @@
22

33
module Python
44
{
5-
mod = Module(stmt* body)
6-
| Interactive(stmt* body)
7-
| Expression(expr body)
5+
mod = Module(stmt* body)
6+
| Interactive(stmt* body)
7+
| Expression(expr body)
88

9-
-- not really an actual node but useful in Jython's typesystem.
10-
| Suite(stmt* body)
9+
-- not really an actual node but useful in Jython's typesystem.
10+
| Suite(stmt* body)
1111

12-
stmt = FunctionDef(identifier name, arguments args,
12+
stmt = FunctionDef(identifier name, arguments args,
1313
stmt* body, expr* decorator_list, expr? returns)
14-
| ClassDef(identifier name,
15-
expr* bases,
16-
keyword* keywords,
17-
expr? starargs,
18-
expr? kwargs,
19-
stmt* body,
20-
expr* decorator_list)
21-
| Return(expr? value)
22-
23-
| Delete(expr* targets)
24-
| Assign(expr* targets, expr value)
25-
| AugAssign(expr target, operator op, expr value)
26-
27-
-- use 'orelse' because else is a keyword in target languages
28-
| For(expr target, expr iter, stmt* body, stmt* orelse)
29-
| While(expr test, stmt* body, stmt* orelse)
30-
| If(expr test, stmt* body, stmt* orelse)
31-
| With(withitem* items, stmt* body)
32-
33-
| Raise(expr? exc, expr? cause)
34-
| Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)
35-
| Assert(expr test, expr? msg)
36-
37-
| Import(alias* names)
38-
| ImportFrom(identifier? module, alias* names, int? level)
39-
40-
| Global(identifier* names)
41-
| Nonlocal(identifier* names)
42-
| Expr(expr value)
43-
| Pass | Break | Continue
44-
45-
-- XXX Jython will be different
46-
-- col_offset is the byte offset in the utf8 string the parser uses
47-
attributes (int lineno, int col_offset)
48-
49-
-- BoolOp() can use left & right?
50-
expr = BoolOp(boolop op, expr* values)
51-
| BinOp(expr left, operator op, expr right)
52-
| UnaryOp(unaryop op, expr operand)
53-
| Lambda(arguments args, expr body)
54-
| IfExp(expr test, expr body, expr orelse)
55-
| Dict(expr* keys, expr* values)
56-
| Set(expr* elts)
57-
| ListComp(expr elt, comprehension* generators)
58-
| SetComp(expr elt, comprehension* generators)
59-
| DictComp(expr key, expr value, comprehension* generators)
60-
| GeneratorExp(expr elt, comprehension* generators)
61-
-- the grammar constrains where yield expressions can occur
62-
| Yield(expr? value)
14+
| ClassDef(identifier name,
15+
expr* bases,
16+
keyword* keywords,
17+
expr? starargs,
18+
expr? kwargs,
19+
stmt* body,
20+
expr* decorator_list)
21+
| Return(expr? value)
22+
23+
| Delete(expr* targets)
24+
| Assign(expr* targets, expr value)
25+
| AugAssign(expr target, operator op, expr value)
26+
27+
-- use 'orelse' because else is a keyword in target languages
28+
| For(expr target, expr iter, stmt* body, stmt* orelse)
29+
| While(expr test, stmt* body, stmt* orelse)
30+
| If(expr test, stmt* body, stmt* orelse)
31+
| With(withitem* items, stmt* body)
32+
33+
| Raise(expr? exc, expr? cause)
34+
| Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)
35+
| Assert(expr test, expr? msg)
36+
37+
| Import(alias* names)
38+
| ImportFrom(identifier? module, alias* names, int? level)
39+
40+
| Global(identifier* names)
41+
| Nonlocal(identifier* names)
42+
| Expr(expr value)
43+
| Pass | Break | Continue
44+
45+
-- XXX Jython will be different
46+
-- col_offset is the byte offset in the utf8 string the parser uses
47+
attributes (int lineno, int col_offset)
48+
49+
-- BoolOp() can use left & right?
50+
expr = BoolOp(boolop op, expr* values)
51+
| BinOp(expr left, operator op, expr right)
52+
| UnaryOp(unaryop op, expr operand)
53+
| Lambda(arguments args, expr body)
54+
| IfExp(expr test, expr body, expr orelse)
55+
| Dict(expr* keys, expr* values)
56+
| Set(expr* elts)
57+
| ListComp(expr elt, comprehension* generators)
58+
| SetComp(expr elt, comprehension* generators)
59+
| DictComp(expr key, expr value, comprehension* generators)
60+
| GeneratorExp(expr elt, comprehension* generators)
61+
-- the grammar constrains where yield expressions can occur
62+
| Yield(expr? value)
6363
| YieldFrom(expr? value)
64-
-- need sequences for compare to distinguish between
65-
-- x < 4 < 3 and (x < 4) < 3
66-
| Compare(expr left, cmpop* ops, expr* comparators)
67-
| Call(expr func, expr* args, keyword* keywords,
68-
expr? starargs, expr? kwargs)
69-
| Num(object n) -- a number as a PyObject.
70-
| Str(string s) -- need to specify raw, unicode, etc?
71-
| Bytes(bytes s)
72-
| Ellipsis
73-
-- other literals? bools?
74-
75-
-- the following expression can appear in assignment context
76-
| Attribute(expr value, identifier attr, expr_context ctx)
77-
| Subscript(expr value, slice slice, expr_context ctx)
78-
| Starred(expr value, expr_context ctx)
79-
| Name(identifier id, expr_context ctx)
80-
| List(expr* elts, expr_context ctx)
81-
| Tuple(expr* elts, expr_context ctx)
82-
83-
-- col_offset is the byte offset in the utf8 string the parser uses
84-
attributes (int lineno, int col_offset)
85-
86-
expr_context = Load | Store | Del | AugLoad | AugStore | Param
87-
88-
slice = Slice(expr? lower, expr? upper, expr? step)
89-
| ExtSlice(slice* dims)
90-
| Index(expr value)
91-
92-
boolop = And | Or
93-
94-
operator = Add | Sub | Mult | Div | Mod | Pow | LShift
64+
-- need sequences for compare to distinguish between
65+
-- x < 4 < 3 and (x < 4) < 3
66+
| Compare(expr left, cmpop* ops, expr* comparators)
67+
| Call(expr func, expr* args, keyword* keywords,
68+
expr? starargs, expr? kwargs)
69+
| Num(object n) -- a number as a PyObject.
70+
| Str(string s) -- need to specify raw, unicode, etc?
71+
| Bytes(bytes s)
72+
| Ellipsis
73+
-- other literals? bools?
74+
75+
-- the following expression can appear in assignment context
76+
| Attribute(expr value, identifier attr, expr_context ctx)
77+
| Subscript(expr value, slice slice, expr_context ctx)
78+
| Starred(expr value, expr_context ctx)
79+
| Name(identifier id, expr_context ctx)
80+
| List(expr* elts, expr_context ctx)
81+
| Tuple(expr* elts, expr_context ctx)
82+
83+
-- col_offset is the byte offset in the utf8 string the parser uses
84+
attributes (int lineno, int col_offset)
85+
86+
expr_context = Load | Store | Del | AugLoad | AugStore | Param
87+
88+
slice = Slice(expr? lower, expr? upper, expr? step)
89+
| ExtSlice(slice* dims)
90+
| Index(expr value)
91+
92+
boolop = And | Or
93+
94+
operator = Add | Sub | Mult | Div | Mod | Pow | LShift
9595
| RShift | BitOr | BitXor | BitAnd | FloorDiv
9696

97-
unaryop = Invert | Not | UAdd | USub
97+
unaryop = Invert | Not | UAdd | USub
9898

99-
cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn
99+
cmpop = Eq | NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn
100100

101-
comprehension = (expr target, expr iter, expr* ifs)
101+
comprehension = (expr target, expr iter, expr* ifs)
102102

103-
excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)
104-
attributes (int lineno, int col_offset)
103+
excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)
104+
attributes (int lineno, int col_offset)
105105

106-
arguments = (arg* args, identifier? vararg, expr? varargannotation,
106+
arguments = (arg* args, identifier? vararg, expr? varargannotation,
107107
arg* kwonlyargs, identifier? kwarg,
108108
expr? kwargannotation, expr* defaults,
109109
expr* kw_defaults)
110-
arg = (identifier arg, expr? annotation)
110+
arg = (identifier arg, expr? annotation)
111111

112-
-- keyword arguments supplied to call
113-
keyword = (identifier arg, expr value)
112+
-- keyword arguments supplied to call
113+
keyword = (identifier arg, expr value)
114114

115-
-- import name with optional 'as' alias.
116-
alias = (identifier name, identifier? asname)
115+
-- import name with optional 'as' alias.
116+
alias = (identifier name, identifier? asname)
117117

118-
withitem = (expr context_expr, expr? optional_vars)
118+
withitem = (expr context_expr, expr? optional_vars)
119119
}
120120

0 commit comments

Comments
 (0)