macro.str 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* $Header$ */
  2. /* PREPROCESSOR: DEFINITION OF MACRO DESCRIPTOR */
  3. #include "nopp.h"
  4. #ifndef NOPP
  5. /* The flags of the mc_flag field of the macro structure. Note that
  6. these flags can be set simultaneously.
  7. */
  8. #define NOFLAG 0 /* no special flags */
  9. #define FUNC 01 /* function attached */
  10. #define NOREPLACE 02 /* don't replace */
  11. #define FORMALP 0200 /* mask for creating macro formal parameter */
  12. /* The macro descriptor is very simple, except the fact that the
  13. mc_text, which points to the replacement text, contains the
  14. non-ascii characters \201, \202, etc, indicating the position of a
  15. formal parameter in this text.
  16. */
  17. struct macro {
  18. struct macro *next;
  19. char * mc_text; /* the replacement text */
  20. int mc_nps; /* number of formal parameters */
  21. int mc_length; /* length of replacement text */
  22. int mc_count; /* # of "concurrent" invocations*/
  23. char mc_flag; /* marking this macro */
  24. };
  25. /* ALLOCDEF "macro" */
  26. /* `token' numbers of keywords of command-line processor
  27. */
  28. #define K_UNKNOWN 0
  29. #define K_DEFINE 1
  30. #define K_ELIF 2
  31. #define K_ELSE 3
  32. #define K_ENDIF 4
  33. #define K_IF 5
  34. #define K_IFDEF 6
  35. #define K_IFNDEF 7
  36. #define K_INCLUDE 8
  37. #define K_LINE 9
  38. #define K_UNDEF 10
  39. #endif NOPP