11.1.10.3.1. Ast¶
This module implements Abstract Syntactic Tree for Spice expressions.
-
class
PySpice.Spice.Expression.Ast.
Addition
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '+'¶
-
PRECEDENCE
= 4¶
-
-
class
PySpice.Spice.Expression.Ast.
And
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '&&'¶
-
PRECEDENCE
= 6¶
-
-
class
PySpice.Spice.Expression.Ast.
Assignation
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryExpression
-
property
value
¶
-
property
variable
¶
-
property
-
class
PySpice.Spice.Expression.Ast.
BinaryExpression
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.Expression
-
NUMBER_OF_OPERANDS
= 2¶
-
-
class
PySpice.Spice.Expression.Ast.
BinaryOperator
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryExpression
,PySpice.Spice.Expression.Ast.OperatorMixin
-
class
PySpice.Spice.Expression.Ast.
Division
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '/'¶
-
PRECEDENCE
= 3¶
-
-
class
PySpice.Spice.Expression.Ast.
Equal
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '=='¶
-
PRECEDENCE
= 5¶
-
-
class
PySpice.Spice.Expression.Ast.
Expression
(*args, **kwargs)[source]¶ Bases:
object
-
NUMBER_OF_OPERANDS
= None¶
-
property
operand
¶
-
property
operand1
¶
-
property
operand2
¶
-
property
operand3
¶
-
-
class
PySpice.Spice.Expression.Ast.
Function
(name, *args)[source]¶ Bases:
PySpice.Spice.Expression.Ast.Expression
-
property
name
¶
-
property
-
class
PySpice.Spice.Expression.Ast.
Greater
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '>'¶
-
PRECEDENCE
= 5¶
-
-
class
PySpice.Spice.Expression.Ast.
GreaterEqual
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '>='¶
-
PRECEDENCE
= 5¶
-
-
class
PySpice.Spice.Expression.Ast.
If
(condition, then_expression, else_expression)[source]¶ Bases:
object
-
PRECEDENCE
= 8¶
-
property
condition
¶
-
property
else_expression
¶
-
property
then_expression
¶
-
-
class
PySpice.Spice.Expression.Ast.
IntegerDivision
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '\\'¶
-
PRECEDENCE
= 3¶
-
-
class
PySpice.Spice.Expression.Ast.
Less
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '<'¶
-
PRECEDENCE
= 5¶
-
-
class
PySpice.Spice.Expression.Ast.
LessEqual
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '<='¶
-
-
class
PySpice.Spice.Expression.Ast.
Modulo
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '%'¶
-
PRECEDENCE
= 3¶
-
-
class
PySpice.Spice.Expression.Ast.
Multiplication
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '*'¶
-
PRECEDENCE
= 3¶
-
-
class
PySpice.Spice.Expression.Ast.
Negation
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.UnaryOperator
-
OPERATOR
= '-'¶
-
PRECEDENCE
= 1¶
-
-
class
PySpice.Spice.Expression.Ast.
Not
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.UnaryOperator
-
OPERATOR
= '!'¶
-
PRECEDENCE
= 1¶
-
-
class
PySpice.Spice.Expression.Ast.
NotEqual
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '!='¶
-
PRECEDENCE
= 5¶
-
-
class
PySpice.Spice.Expression.Ast.
OperatorMetaclass
(class_name, base_classes, attributes)[source]¶ Bases:
type
Metaclass to register operators
-
class
PySpice.Spice.Expression.Ast.
Or
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '||'¶
-
PRECEDENCE
= 7¶
-
-
class
PySpice.Spice.Expression.Ast.
Subtraction
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '-'¶
-
PRECEDENCE
= 4¶
-
-
class
PySpice.Spice.Expression.Ast.
TernaryExpression
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.Expression
-
NUMBER_OF_OPERANDS
= 3¶
-
-
class
PySpice.Spice.Expression.Ast.
UnaryExpression
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.Expression
-
NUMBER_OF_OPERANDS
= 1¶
-
-
class
PySpice.Spice.Expression.Ast.
UnaryOperator
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.UnaryExpression
,PySpice.Spice.Expression.Ast.OperatorMixin
-
class
PySpice.Spice.Expression.Ast.
power
(*args, **kwargs)[source]¶ Bases:
PySpice.Spice.Expression.Ast.BinaryOperator
-
OPERATOR
= '**'¶
-
PRECEDENCE
= 2¶
-