11.1.9.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

class PySpice.Spice.Expression.Ast.And(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.Assignation(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryExpression

value
variable
class PySpice.Spice.Expression.Ast.BinaryExpression(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.Expression

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.Constant(value)[source]

Bases: object

class PySpice.Spice.Expression.Ast.Division(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.Equal(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.Expression(*args, **kwargs)[source]

Bases: object

iter_on_operands()[source]
operand
operand1
operand2
operand3
class PySpice.Spice.Expression.Ast.FloatConstant(value)[source]

Bases: PySpice.Spice.Expression.Ast.Constant

class PySpice.Spice.Expression.Ast.Function(name, *args)[source]

Bases: PySpice.Spice.Expression.Ast.Expression

name
class PySpice.Spice.Expression.Ast.Greater(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.GreaterEqual(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.If(condition, then_expression, else_expression)[source]

Bases: object

condition
else_expression
then_expression
class PySpice.Spice.Expression.Ast.IntConstant(value)[source]

Bases: PySpice.Spice.Expression.Ast.Constant

class PySpice.Spice.Expression.Ast.IntegerDivision(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.Less(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.LessEqual(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.Modulo(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.Multiplication(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.Negation(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.UnaryOperator

class PySpice.Spice.Expression.Ast.Not(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.UnaryOperator

class PySpice.Spice.Expression.Ast.NotEqual(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.OperatorMetaclass[source]

Bases: type

Metaclass to register operators

classmethod get_binary(operator)[source]
classmethod get_unary(operator)[source]
classmethod operator_iter()[source]
classmethod register_prefix(cls)[source]
class PySpice.Spice.Expression.Ast.OperatorMixin[source]

Bases: object

class PySpice.Spice.Expression.Ast.Or(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.Program(*statements)[source]

Bases: PySpice.Spice.Expression.Ast.StatementList

class PySpice.Spice.Expression.Ast.StatementList(*statements)[source]

Bases: object

add(statement)[source]
class PySpice.Spice.Expression.Ast.Subtraction(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator

class PySpice.Spice.Expression.Ast.TernaryExpression(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.Expression

class PySpice.Spice.Expression.Ast.UnaryExpression(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.Expression

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.Variable(name)[source]

Bases: object

name
class PySpice.Spice.Expression.Ast.power(*args, **kwargs)[source]

Bases: PySpice.Spice.Expression.Ast.BinaryOperator