tree.h 706 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. ** tree.h
  3. ** TecCGraf - PUC-Rio
  4. ** $Id: tree.h,v 1.5 1994/11/18 19:27:38 roberto Exp roberto $
  5. */
  6. #ifndef tree_h
  7. #define tree_h
  8. #define NOT_USED 0xFFFE
  9. typedef struct TaggedString
  10. {
  11. char marked; /* for garbage collection */
  12. char str[1]; /* \0 byte already reserved */
  13. } TaggedString;
  14. typedef struct TreeNode
  15. {
  16. struct TreeNode *right;
  17. struct TreeNode *left;
  18. unsigned short varindex; /* != NOT_USED if this is a symbol */
  19. unsigned short constindex; /* != NOT_USED if this is a constant */
  20. TaggedString ts;
  21. } TreeNode;
  22. TaggedString *lua_createstring (char *str);
  23. TreeNode *lua_constcreate (char *str);
  24. int lua_strcollector (void);
  25. TreeNode *lua_varnext (char *n);
  26. #endif