No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

57 líneas
1.9KB

  1. ; parser.inc - parser tables and limits (E03-S01, E03-S02).
  2. .ifndef PARSER_INC
  3. PARSER_INC = 1
  4. ; Top-level type kinds (type table column C_TYPE_KIND)
  5. TYPE_NONE = 0
  6. TYPE_INTERFACE = 1
  7. TYPE_CLASS = 2
  8. TYPE_PROGRAM = 3
  9. PARSE_MAX_DEPTH = 16 ; nested method/program/if/while/for blocks
  10. SCAN_MAX_DEPTH = 16 ; nested ( and [ tracked by the pass-2 scan
  11. ; Declared-type descriptor (provisional until E03-S04): base, name, length.
  12. ; base TY_*; TY_NONE for a method without a result
  13. ; name class/interface name ID when base = TY_REF, else 0
  14. ; length array length (2 bytes); 0 = not an array
  15. TY_NONE = 0
  16. TY_BOOLEAN = 1
  17. TY_BYTE = 2
  18. TY_CHAR = 3
  19. TY_INTEGER = 4
  20. TY_WORD = 5
  21. TY_REF = 6
  22. ; Member flags
  23. MF_METHOD = $01 ; clear = field
  24. MF_PRIVATE = $02 ; clear = public
  25. MEMBERS_MAX = 255 ; rows 0..254, all classes and interfaces
  26. PARAMS_MAX = 255 ; rows 0..254, all method signatures
  27. ; Bank-1 parser tables: 256-byte columns, consecutive from type_kind.
  28. ; tb_get/tb_set take A = column and Y = row (a name ID for type columns).
  29. C_TYPE_KIND = 0 ; TYPE_*
  30. C_TYPE_LINE_LO = 1 ; declaration line
  31. C_TYPE_LINE_HI = 2
  32. C_TYPE_MFIRST = 3 ; first member row
  33. C_TYPE_MCOUNT = 4 ; member rows (contiguous, declaration order)
  34. C_MEM_OWNER = 5 ; owning class/interface name ID
  35. C_MEM_NAME = 6 ; member name ID
  36. C_MEM_FLAGS = 7 ; MF_*
  37. C_MEM_TBASE = 8 ; field type / method result type
  38. C_MEM_TNAME = 9
  39. C_MEM_TLEN_LO = 10
  40. C_MEM_TLEN_HI = 11
  41. C_MEM_PFIRST = 12 ; first parameter row
  42. C_MEM_PCOUNT = 13 ; parameter rows (declaration order)
  43. C_PAR_TBASE = 14 ; parameter type
  44. C_PAR_TNAME = 15
  45. C_PAR_TLEN_LO = 16
  46. C_PAR_TLEN_HI = 17
  47. TABLE_COLUMNS = 18
  48. .endif

Powered by TurnKey Linux.