ExprTable Class ReferenceDescription of a class for holding an Expression Table, the intermediate form of expressions when they are converted from SETL to C++.
More...
#include <ExprTable.h>
List of all members.
|
Public Member Functions |
| | ExprTable (BinRep &bs, Symtab &symtab) |
| | ~ExprTable () |
| | Bounds checks if n is within the proper bounds.
|
| int | size () const |
| | return truth of whether table[n] is in final form (is a complete nested expression which no longer contains sub-expressions which are indexes in the expression table
|
| int | final (int n) const |
| | GetTable takes a BinRep which should be a tuple of Expression sets as well as the symbol table.
|
| void | get_table (const BinRep &bs, Symtab &symtab) |
| | return expression number sub in its final form (with no sub-expressions containing tableEntry nodes)
|
| Expression * | operator[] (int sub) |
Detailed Description
Description of a class for holding an Expression Table, the intermediate form of expressions when they are converted from SETL to C++.
Currently, it only contains methods for converting from BINSTRs to C++ Expression tables and from there to complete C++ expressions, but the methods to convert back to SETL ought to be here as well.
Note that the Expression table is stored in a dynamically allocated array. Notice that a table of size [_size+1] is allocated for a expression table of size _size so that the SETL expression #n can be mapped into the nth element of the array for greater simplicity.
Currently when expressions are extracted from the expression table it is assumed that all fields are filled in. If a field was never filled in after the conversion to C++ it may cause a NULL pointer to be dereferenced. This should only happen if an expression is incomplete but the possibility is not checked for yet. This will be remedied when time permits.
Definition at line 41 of file ExprTable.h.
Constructor & Destructor Documentation
| ExprTable::ExprTable |
( |
BinRep & |
bs, |
|
|
Symtab & |
symtab |
|
) |
[inline] |
|
|
|
Bounds checks if n is within the proper bounds.
boolean all_deleted = true;
Definition at line 24 of file ExprTable.cc. |
Member Function Documentation
| int ExprTable::size |
( |
|
) |
const [inline] |
|
|
|
return truth of whether table[n] is in final form (is a complete nested expression which no longer contains sub-expressions which are indexes in the expression table
i.e., it has been gotten by GetExpr.)
Definition at line 97 of file ExprTable.h. |
| int ExprTable::final |
( |
int |
n |
) |
const [inline] |
|
|
|
GetTable takes a BinRep which should be a tuple of Expression sets as well as the symbol table.
GetTable fills in exprtable with the intermediate form of the table.
Definition at line 103 of file ExprTable.h. |
| void ExprTable::get_table |
( |
const BinRep & |
bs, |
|
|
Symtab & |
symtab |
|
) |
|
|
| Expression * ExprTable::operator[] |
( |
int |
sub |
) |
[inline] |
|
The documentation for this class was generated from the following files:
|