Reference Guide  2.5.0
psyclone.expression.BinaryOperator Class Reference
Inheritance diagram for psyclone.expression.BinaryOperator:
Collaboration diagram for psyclone.expression.BinaryOperator:

Public Member Functions

def __init__ (self, toks)
 
def __repr__ (self)
 
def __str__ (self)
 

Public Attributes

 operands
 
 symbols
 
- Public Attributes inherited from psyclone.expression.ExpressionNode
 names
 
 toks
 

Detailed Description

Expression node for one or more binary operators with the same
precedence.

For some reason, operator tokens come in a list of lists.

Definition at line 50 of file expression.py.

Constructor & Destructor Documentation

◆ __init__()

def psyclone.expression.BinaryOperator.__init__ (   self,
  toks 
)
 The recursive collection of names enables the dependencies of
expressions to be analysed. 

Reimplemented from psyclone.expression.ExpressionNode.

Definition at line 55 of file expression.py.

55  def __init__(self, toks):
56  ExpressionNode.__init__(self, toks[0])
57 
58  self.operands = [toks[0][0]]
59  self.symbols = []
60  i = iter(toks[0][1:])
61  try:
62  while True:
63  tok = next(i)
64  self.symbols.append(tok)
65  tok = next(i)
66  self.operands.append(tok)
67  except StopIteration:
68  pass
69 

References psyclone.expression.BinaryOperator.operands, psyclone.expression.BinaryOperator.symbols, and psyclone.psyir.symbols.symbol_table.SymbolTable.symbols().

Here is the call graph for this function:

The documentation for this class was generated from the following file: