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