declar.str 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. /* A 'declarator' consists of an idf and a linked list of
  8. language-defined unary operations: *, [] and (), called
  9. decl_unary's.
  10. */
  11. struct declarator {
  12. /* struct declarator *next; */
  13. struct idf *dc_idf;
  14. struct decl_unary *dc_decl_unary;
  15. struct formal *dc_formal; /* params for function */
  16. };
  17. struct formal { /* list of formals */
  18. struct formal *next;
  19. struct idf *fm_idf;
  20. };
  21. /* ALLOCDEF "formal" 5 */
  22. #define NO_PARAMS ((struct formal *) 0)
  23. struct decl_unary {
  24. struct decl_unary *next;
  25. int du_fund; /* POINTER, ARRAY or FUNCTION */
  26. int du_typequal; /* CONST, VOLATILE, or 0 */
  27. arith du_count; /* for ARRAYs only */
  28. struct proto *du_proto; /* params for function or prototype */
  29. };
  30. /* ALLOCDEF "decl_unary" 10 */
  31. extern struct type *declare_type();
  32. extern struct declarator null_declarator;