Array expressions.
More...
#include <act_array.h>
Array expressions.
This is used to hold the array expression syntax for ACT.
◆ type
An array expression is either a basic expression, a concatenation, or a comma
Enumerator |
---|
CONCAT | |
COMMA | |
EXPR | |
◆ AExpr() [1/3]
AExpr::AExpr |
( |
ActId * |
e | ) |
|
return an array expression corresponding to the ID
◆ AExpr() [2/3]
return an array expression corresponding to an Expr
◆ AExpr() [3/3]
combine two array expressions into a new one based on the specified type
◆ ~AExpr()
◆ Clone()
deep copy of array expression
◆ Expand()
expand out all parameters
◆ getInstType()
InstType * AExpr::getInstType |
( |
Scope * |
s, |
|
|
int * |
islocal, |
|
|
int |
expanded = 0 |
|
) |
| |
Return an InstType corresponding to this array expression
- Parameters
-
s | is the scope |
islocal | if non-NULL, used to return 1 if this array expression only has local ID references, 0 otherwise |
expanded | is used if the instance type should expect expanded types. In this case the correct array dimensions are computed. |
- Returns
- the newly allocated InstType corresponding to the type of the array expression.
◆ GetLeft()
AExpr * AExpr::GetLeft |
( |
| ) |
|
|
inline |
◆ GetRight()
AExpr * AExpr::GetRight |
( |
| ) |
|
|
inline |
◆ isArrayExpr()
int AExpr::isArrayExpr |
( |
| ) |
|
return 1 if this is an ID that evaluated to an array expression (E_ARRAY), 0 otherwise
◆ isBase()
- Returns
- 1 if this is the "base case" for an array expression (i.e. a simple expression), 0 otherwise
◆ isEqual()
int AExpr::isEqual |
( |
AExpr * |
a | ) |
|
Check if two array expressions are equal
◆ isType()
return NULL if this is not a type (E_TYPE), the actual type otherwise.
◆ Print()
void AExpr::Print |
( |
FILE * |
fp | ) |
|
◆ SetRight()
void AExpr::SetRight |
( |
AExpr * |
a | ) |
|
|
inline |
assign right component to a
◆ sPrint()
void AExpr::sPrint |
( |
char * |
buf, |
|
|
int |
sz |
|
) |
| |
print array expression to string
◆ stepper()
Array expressions can be quite complex. This returns an array expression stepper (similar to Arraystep) that walks through the components of the array expression element by element.
- Returns
- the array expression stepper that can walk through this array expression.
◆ toid()
For this to work, the array expression must correspond to a single ActId only.
- Returns
- the ActId corresponding to this array expression
◆ AExprstep
an element of the expression for compound array expressions. l is also used as an Expr * for the base case
an elements of the expression for compound array expressions
simple/compound expression type
The documentation for this class was generated from the following file: