label.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. /* L A B E L D E F I N I T I O N */
  7. #ifndef LANG_CEM_CEMCOM_ANSI_LABEL_H
  8. #define LANG_CEM_CEMCOM_ANSI_LABEL_H
  9. #include <em_label.h> /* obtain definition of "label" */
  10. #define NO_LABEL (label) 0
  11. extern label lab_count;
  12. #define text_label() (lab_count++) /* returns a new text label */
  13. extern label datlab_count;
  14. #define data_label() (datlab_count++) /* returns a new data label */
  15. #define define_label(idf) enter_label(idf, 1);
  16. /* The identifier idf is defined as a label. If it is new,
  17. it is entered into the idf list with the largest possible
  18. scope, i.e., on the lowest possible level.
  19. */
  20. #define apply_label(idf) enter_label(idf, 0);
  21. /* The identifier idf is applied as a label. It may or may
  22. not be there, and if it is there, it may be from a
  23. declaration or another application.
  24. */
  25. struct idf;
  26. void enter_label(struct idf *idf, int defining);
  27. void unstack_label(struct idf *idf);
  28. #endif /* LANG_CEM_CEMCOM_ANSI_LABEL_H */