declar.str 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. /* DEFINITION OF DECLARATOR DESCRIPTORS */
  7. #ifndef LANG_CEM_CEMCOM_ANSI_DECLARE_STR
  8. #define LANG_CEM_CEMCOM_ANSI_DECLARE_STR
  9. /* A 'declarator' consists of an idf and a linked list of
  10. language-defined unary operations: *, [] and (), called
  11. decl_unary's.
  12. */
  13. struct declarator {
  14. /* struct declarator *next; */
  15. struct idf *dc_idf;
  16. struct decl_unary *dc_decl_unary;
  17. struct formal *dc_formal; /* params for function */
  18. };
  19. struct formal { /* list of formals */
  20. struct formal *next;
  21. struct idf *fm_idf;
  22. };
  23. /* ALLOCDEF "formal" 5 */
  24. #define NO_PARAMS ((struct formal *) 0)
  25. struct decl_unary {
  26. struct decl_unary *next;
  27. int du_fund; /* POINTER, ARRAY or FUNCTION */
  28. int du_typequal; /* CONST, VOLATILE, or 0 */
  29. arith du_count; /* for ARRAYs only */
  30. struct proto *du_proto; /* params for function or prototype */
  31. };
  32. /* ALLOCDEF "decl_unary" 10 */
  33. extern struct type *declare_type();
  34. extern struct declarator null_declarator;
  35. #endif /* LANG_CEM_CEMCOM_ANSI_DECLARE_STR */