decl.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #include "em_parser.h"
  2. #define NOSEG 5
  3. #define UNKNOWN (-1)
  4. #define TRUE 1
  5. #define FALSE 0
  6. #define MAX_ARGS 4
  7. /* All the different types of C_INSTR's, based on types of the arguments. */
  8. #define NO_ARGS 0
  9. #define C_ARG 1
  10. #define D_ARG 2
  11. #define F_ARG 3
  12. #define L_ARG 4
  13. #define N_ARG 5
  14. #define O_ARG 6
  15. #define R_ARG 7
  16. #define S_ARG 8
  17. #define Z_ARG 9
  18. #define W_ARG 10
  19. #define EXTERNAL 11
  20. #define EXTERNAL_DNAM 12
  21. #define EXTERNAL_DLB 13
  22. #define P_ARG 14
  23. #define B_ARG 15
  24. #define STRING_ARITH 16
  25. #define BSS_EXT_DNAM 17
  26. #define BSS_EXT_DLB 18
  27. #define BSS_STR_AR 19
  28. #define BSS_W_ARG 20
  29. #define BSS_PNAM 21
  30. #define BSS_ILB 22
  31. #define ID_N_ARG 23
  32. #define ARITH_ARITH 24
  33. #define EXT_DNAM 25
  34. #define EXT_DLB 26
  35. #define ONE_INT 27
  36. #define _STRING 28
  37. typedef struct {
  38. char *header; /* The declaration of parameters for
  39. * each type of C_INSTR.
  40. */
  41. int arg_type[MAX_ARGS]; /* Type of the $i's after the
  42. * conversions ( extnd_name(), etc.).
  43. */
  44. char *arg_id[MAX_ARGS], /* Names of the parameters, to be used
  45. * left of the '==>' sign.
  46. */
  47. *arg_conv[MAX_ARGS];/* Names of the parameters, to be used
  48. * right of the '==>' sign.
  49. */
  50. } t_C_info;
  51. typedef struct {
  52. char *lexeme;
  53. int C_instr_type;
  54. } t_token;
  55. extern t_C_info C_info[], *C_instr_info;
  56. extern int storage_default[4][3], segment;