main module Tables use TEXTIO declare char_initially_space is char initially $<SP> Token is packed array [1..12] of char_initially_space reserve_symbol_type is [operator_table, operator_class] Symbol_kind is [reserved_symbol, pattern_symbol, action_symbol] STE is structure T: Token kind: Symbol_kind select kind from case reserved_symbol: symbol_type: reserve_symbol_type case pattern_symbol: JJ : array [1..2] of integer endselect endstructure STT is array [1..4] of STE // symbol table type ST: static STT initially table STT ( STE(T:"ccode_table ", kind: reserved_symbol, symbol_type: operator_table), STE(T:"ccode_class ", kind: reserved_symbol, symbol_type: operator_class) ) enddeclare out_line (TTY, "----") for I := 1 to 2 do out_string (TTY, ST [I].T) out_string (TTY, "kind=") select ST [I].kind from case reserved_symbol: out_string (TTY, "reserved_symbol") out_string (TTY, " symbol_type:") select ST [I].symbol_type from case operator_table: out_string (TTY, "operator_table") case operator_class: out_string (TTY, "operator_class") endselect endselect out_record (TTY) endfor out_line (TTY, "END OF SYMBOL DEFINITIONS") endmodule