Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Variable ID-Entry */
- typedef struct {
- unsigned id; // Identifier index in string table.
- unsigned pt; // Primitive type.
- unsigned rf; // Flag: Set if variable is referenced.
- } VarEntry;
- /* Routine ID-Entry (Function, Procedure) */
- typedef struct {
- VarEntry var; // Variable-Entry details.
- unsigned argc; // Argument count.
- void **argv; // Vector of IdEntry table pointers.
- } RoutineEntry;
- /* Union of possible entry structures. */
- typedef union {
- VarEntry var;
- RoutineEntry routine;
- } Entry;
- /* IdEntry: Symbol Table Entry */
- typedef struct {
- unsigned tc; // Type-class: Routine / Vector / Scalar
- Entry entry; // Type data.
- } IdEntry;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement