Advertisement
Guest User

Untitled

a guest
Jan 9th, 2018
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. /* Variable ID-Entry */
  3. typedef struct {
  4.     unsigned id;    // Identifier index in string table.
  5.     unsigned pt;    // Primitive type.
  6.     unsigned rf;    // Flag: Set if variable is referenced.
  7. } VarEntry;
  8.  
  9. /* Routine ID-Entry (Function, Procedure) */
  10. typedef struct {
  11.     VarEntry var;   // Variable-Entry details.
  12.     unsigned argc;  // Argument count.
  13.     void **argv;    // Vector of IdEntry table pointers.
  14. } RoutineEntry;
  15.  
  16. /* Union of possible entry structures. */
  17. typedef union {
  18.     VarEntry var;
  19.     RoutineEntry routine;
  20. } Entry;
  21.  
  22. /* IdEntry: Symbol Table Entry */
  23. typedef struct {
  24.     unsigned tc;     // Type-class: Routine / Vector / Scalar
  25.     Entry entry;     // Type data.
  26. } IdEntry;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement