|
|
CST_Comparison(arg1,
op,
arg2)
Comparison: expr comp_op expr -> test |
|
|
|
|
CST_Assign(name,
value)
CST_Assign: expr (',' expr)* '=' expr (',' expr)* -> expr_stmt |
|
|
|
|
CST_AugAssign(var,
augass,
val)
CST_AugAssign: expr augassign expr -> expr_stmt |
|
|
|
|
CST_Power(a,
n)
Power: atom factor -> power |
|
|
|
|
CST_Add(fst,
snd,
*args)
Add: term ('+' term)+ -> arith_expr |
|
|
|
|
CST_Sub(fst,
snd,
*args)
Sub: term ('-' term)+ -> arith_expr |
|
|
|
|
CST_Mul(fst,
snd,
*args)
Mul: factor ('+' factor)+ -> term |
|
|
|
|
CST_Div(fst,
snd,
*args)
CST_Div: factor ('/' factor)+ -> term |
|
|
|
|
CST_FloorDiv(fst,
snd,
*args)
CST_FloorDiv: expr ( '//' expr)+ -> expr |
|
|
|
|
CST_BitAnd(fst,
snd,
*args)
CST_BitOr: expr ( '&' expr)+ -> expr |
|
|
|
|
CST_BitOr(fst,
snd,
*args)
CST_BitOr: expr ( '|' expr)+ -> expr |
|
|
|
|
CST_BitXor(fst,
snd,
*args)
CST_BitXor: expr ( '^' expr)+ -> expr |
|
|
|
|
|
|
|
CST_Not(expr)
CST_Not: 'not' expr -> not_test |
|
|
|
|
CST_And(fst,
snd,
*args)
CST_And: expr ( 'and' expr)+ -> and_test |
|
|
|
|
CST_Or(fst,
snd,
*args)
CST_And: expr ( 'or' expr)+ -> or_test |
|
|
|
|
|
|
|
|
|
|
| CST_CallFuncWithArglist(name_or_atom,
arglist) |
|
|
|
|
CST_CallFunc(name_or_atom,
args=[],
star_args=None,
dstar_args=None)
Instead of a name an atom is allowed as well. |
|
|
|
|
CST_GetAttr(expr,
*args)
(A(EXPR), B, C(EXPR), ...) -> CST (A(EXPR1).B.C(EXPR). |
|
|
|
|
CST_List(*args)
CST_List: '[' ']' | '[' expr (',' expr)* ']' -> atom |
|
|
|
|
CST_Tuple(*args)
CST_Tuple: '(' ')' | '(' expr (',' expr)* ')' -> atom |
|
|
|
|
CST_Dict(pairs=None,
**dct)
CST_Dict: '{' '}' | '{' expr ':' expr (',' expr ':' expr )* '}'
-> atom |
|
|
|
|
| CST_ParametersFromSignature(sig) |
|
|
|
|
CST_Lambda(body,
argnames,
defaults={},
star_args=None,
dstar_args=None) |
|
|
|
|
CST_FuncParameters(argnames,
defaults={},
star_args=None,
dstar_args=None) |
|
|
|
|
CST_Function(name,
BLOCK,
argnames,
defaults={},
star_args=None,
dstar_args=None) |
|
|
|
|
CST_Subscript(expression,
sub,
*subs)
Maps to expr[sub1,sub2,...,subn] only |
|
|
|
|
|
|
|
|
|
|
| CST_Except(arg1,
arg2=None) |
|
|
|
|
| CST_TryExcept(try_suite,
else_suite=None,
*args) |
|
|
|
|
| CST_TryFinally(try_suite,
finally_suite) |
|
|
|
|
|
|
|
| CST_ImportFrom(from_module,
*names) |
|
|
|
|
|
|
|
|
|
|
|