PL0源代码PL0PL0C版
#include #include #include #define NORW 13 /*保留字的个数*/ #define TXMAX 100 /*标识符表的长度(容量)*/ #define NMAX 14 /*数字允许的最长位数*/ #define AL 10 /*标识符最长长度*/ #define AMAX 2047 /*寻址空间*/ #define LEVMAX 3 /*最大允许的块嵌套层数*/ #define CXMAX 200 /*类PCODE目标代码数组长度(可容纳代码行数)*/ #define STACKSIZE 500 /*类型定义*/ cha r *symbol[32]={"nul","ident","number","plus","minus","times","slash","oddsym", "eql","neq","lss","leq","geq","lparen","rparen","comma", "semicolon","period","becomes","beginsym","endsym","ifsym", "thensym","whilesym","writesym","readsym","dosym","callsym", "constsym","varsym","procsym"}; /*symobl类型标识了不同类型的词汇*/ r *symbol[32]={"nul","ident","number","plus","minus","times","slash","oddsym", "eql","neq","lss","leq","geq","lparen","rparen","comma", "semicolon","period","becomes","beginsym","endsym","ifsym", "thensym","whilesym","writesym","readsym","dosym","callsym", "constsym","varsym","procsym"}; /*symobl类型标识了不同类型的词汇*/
用户评论