亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? scpascal.cpp

?? pascal編譯器
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
#include <stdio.h>
#include "literal.h"
#include "table.h"
#include "LexAnalyser.h"
#include "translate.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <iostream.h>

//產生式和fisrt表的定義
#define LENOFPRODUCTIONS 60
#define	NUMOFTSYMBOLS 55
#define NUMOFNTSYMBOLS 27
#define NUMOFSYMBOLS 82
#define NT1 78
#define NT2 104
#define T1 0
#define T2 54
#define	ALL NT2

int IsNT(int x){         //判斷是否為非終結符;
	if ((x>77) && (x<105)){
		return 1;
	}
	return 0;
}


struct production{
	int length;
	int product[10];	
};	                         //生成式結構
#define NULL 0
struct production productions[LENOFPRODUCTIONS];
int firstTable[ALL][10];


 
//productions[0].length = 1;
void Init(){							//初始化推導式表及Frist表;
productions[0].length=1;
productions[0].product[0]=start;
productions[0].product[1]=program;


productions[1].length=3;//推導式的項目個數
productions[1].product[0]=program;//推導式的各個項
productions[1].product[1]=program_head;//(1)
productions[1].product[2]=program_body;
productions[1].product[3]=node;

productions[2].length=6;//(2)
productions[2].product[0]=program_head;
productions[2].product[1]=rw_program;
productions[2].product[2]=id;
productions[2].product[3]=lpare;
productions[2].product[4]=identifier_list;
productions[2].product[5]=rpare;
productions[2].product[6]=sem;

productions[3].length=3;//(3)
productions[3].product[0]=program_body;
productions[3].product[1]=declarations;
productions[3].product[2]=subproc_declarations;
productions[3].product[3]=compound_statement;

productions[4].length=3;//(4)
productions[4].product[0]=identifier_list;
productions[4].product[1]=identifier_list;
productions[4].product[2]=comma;
productions[4].product[3]=id;

productions[5].length=1;//(4)
productions[5].product[0]=identifier_list;
productions[5].product[1]=id;

productions[6].length=3;//(5)
productions[6].product[0]=declarations;
productions[6].product[1]=rw_var;
productions[6].product[2]=declaration;
productions[6].product[3]=sem;

productions[7].length=0;//(5)
productions[7].product[0]=declarations;
productions[7].product[1]=empty;

productions[8].length=5;//(6)
productions[8].product[0]=declaration;
productions[8].product[1]=declaration;
productions[8].product[2]=sem;
productions[8].product[3]=identifier_list;
productions[8].product[4]=colon;
productions[8].product[5]=type;

productions[9].length=3;//(6)
productions[9].product[0]=declaration;
productions[9].product[1]=identifier_list;
productions[9].product[2]=colon;
productions[9].product[3]=type;

productions[10].length=1;//(7)
productions[10].product[0]=type;
productions[10].product[1]=standard_type;

productions[11].length=9;//(7)
productions[11].product[0]=type;
productions[11].product[1]=rw_array;
productions[11].product[2]=lqpare;
productions[11].product[3]=rw_digits;
productions[11].product[4]=node;
productions[11].product[5]=node;
productions[11].product[6]=rw_digits;
productions[11].product[7]=rqpare;
productions[11].product[8]=rw_of;
productions[11].product[9]=standard_type;

productions[12].length=3;//(7)
productions[12].product[0]=type;
productions[12].product[1]=rw_record;
productions[12].product[2]=declaration;
productions[12].product[3]=rw_end;

productions[13].length=1;//(8)
productions[13].product[0]=standard_type;
productions[13].product[1]=rw_integer;

productions[14].length=1;//(8)
productions[14].product[0]=standard_type;
productions[14].product[1]=rw_real;

productions[15].length=1;//(8)
productions[15].product[0]=standard_type;
productions[15].product[1]=rw_boolean;

productions[16].length=4;//(8)
productions[16].product[0]=standard_type;
productions[16].product[1]=num;
productions[16].product[2]=node;
productions[16].product[3]=node;
productions[16].product[4]=num;

productions[17].length=3;//(9)
productions[17].product[0]=subproc_declarations;
productions[17].product[1]=subproc_declarations;
productions[17].product[2]=subproc_declaration;
productions[17].product[3]=sem;

productions[18].length=0;//(9)
productions[18].product[0]=subproc_declarations;
productions[18].product[1]=empty;

productions[19].length=3;//(10)
productions[19].product[0]=subproc_declaration;
productions[19].product[1]=subproc_head;
productions[19].product[2]=declarations;
productions[19].product[3]=compound_statement;

productions[20].length=6;//(11)
productions[20].product[0]=subproc_head;
productions[20].product[1]=rw_function;
productions[20].product[2]=id;
productions[20].product[3]=arguments;
productions[20].product[4]=colon;
productions[20].product[5]=standard_type;
productions[20].product[6]=sem;

productions[21].length=4;//(11)
productions[21].product[0]=subproc_head;
productions[21].product[1]=rw_procedure;
productions[21].product[2]=id;
productions[21].product[3]=arguments;
productions[21].product[4]=sem;

productions[22].length=3;//(12)
productions[22].product[0]=arguments;
productions[22].product[1]=lpare;
productions[22].product[2]=parameter_list;
productions[22].product[3]=rpare;

productions[23].length=0;//(12)
productions[23].product[0]=arguments;
productions[23].product[1]=empty;

productions[24].length=5;//(13)
productions[24].product[0]=parameter_list;
productions[24].product[1]=parameter_list;
productions[24].product[2]=sem;
productions[24].product[3]=identifier_list;
productions[24].product[4]=colon;
productions[24].product[5]=type;

productions[25].length=3;//(13)
productions[25].product[0]=parameter_list;
productions[25].product[1]=identifier_list;
productions[25].product[2]=colon;
productions[25].product[3]=type;

productions[26].length=3;//(14)
productions[26].product[0]=compound_statement;
productions[26].product[1]=rw_begin;
productions[26].product[2]=optional_statements;
productions[26].product[3]=rw_end;

productions[27].length=1;//(15)
productions[27].product[0]=optional_statements;
productions[27].product[1]=statement_list;

productions[28].length=0;//(15)
productions[28].product[0]=optional_statements;
productions[28].product[1]=empty;

productions[29].length=3;//(16)
productions[29].product[0]=statement_list;
productions[29].product[1]=statement_list;
productions[29].product[2]=sem;
productions[29].product[3]=statement;

productions[30].length=1;//(16)
productions[30].product[0]=statement_list;
productions[30].product[1]=statement;

productions[31].length=3;//(17)
productions[31].product[0]=statement;
productions[31].product[1]=variable;
productions[31].product[2]=assignop;
productions[31].product[3]=expression;

productions[32].length=1;//(17)
productions[32].product[0]=statement;
productions[32].product[1]=procedure_statement;

productions[33].length=1;//(17)
productions[33].product[0]=statement;
productions[33].product[1]=compound_statement;

productions[34].length=6;//(17)
productions[34].product[0]=statement;
productions[34].product[1]=rw_if;
productions[34].product[2]=expression;
productions[34].product[3]=rw_then;
productions[34].product[4]=statement;
productions[34].product[5]=rw_else;
productions[34].product[6]=statement;

productions[35].length=4;//(17)
productions[35].product[0]=statement;
productions[35].product[1]=rw_while;
productions[35].product[2]=expression;
productions[35].product[3]=rw_do;
productions[35].product[4]=statement;

productions[36].length=4;//(17)
productions[36].product[0]=statement;
productions[36].product[1]=rw_read;
productions[36].product[2]=lpare;
productions[36].product[3]=expression_list;
productions[36].product[4]=rpare;

productions[37].length=4;//(17)
productions[37].product[0]=statement;
productions[37].product[1]=rw_write;
productions[37].product[2]=lpare;
productions[37].product[3]=expression_list;
productions[37].product[4]=rpare;

productions[38].length=1;//(18)
productions[38].product[0]=variable;
productions[38].product[1]=id;

productions[39].length=4;//(18)
productions[39].product[0]=variable;
productions[39].product[1]=id;
productions[39].product[2]=lqpare;
productions[39].product[3]=expression;
productions[39].product[4]=rqpare;

productions[40].length=1;//(19)
productions[40].product[0]=procedure_statement;
productions[40].product[1]=id;

productions[41].length=4;//(19)
productions[41].product[0]=procedure_statement;
productions[41].product[1]=id;
productions[41].product[2]=lpare;
productions[41].product[3]=expression_list;
productions[41].product[4]=rpare;

productions[42].length=3;//(20)
productions[42].product[0]=expression_list;
productions[42].product[1]=expression_list;
productions[42].product[2]=comma;
productions[42].product[3]=expression;

productions[43].length=1;//(20)
productions[43].product[0]=expression_list;
productions[43].product[1]=expression;

productions[44].length=3;//(21)
productions[44].product[0]=expression;
productions[44].product[1]=simple_expression;
productions[44].product[2]=rw_relop;
productions[44].product[3]=simple_expression;

productions[45].length=1;//(21)
productions[45].product[0]=expression;
productions[45].product[1]=simple_expression;

productions[46].length=1;//(22)
productions[46].product[0]=simple_expression;
productions[46].product[1]=term;

productions[47].length=2;//(22)
productions[47].product[0]=simple_expression;
productions[47].product[1]=sign;
productions[47].product[2]=term;

productions[48].length=3;//(22)
productions[48].product[0]=simple_expression;
productions[48].product[1]=simple_expression;
productions[48].product[2]=rw_addop;
productions[48].product[3]=term;

productions[49].length=3;//(23)
productions[49].product[0]=term;
productions[49].product[1]=term;
productions[49].product[2]=rw_mulop;
productions[49].product[3]=factor;

productions[50].length=1;//(23)
productions[50].product[0]=term;
productions[50].product[1]=factor;

productions[51].length=1;//(24)
productions[51].product[0]=factor;
productions[51].product[1]=id;

productions[52].length=4;//(24)
productions[52].product[0]=factor;
productions[52].product[1]=id;
productions[52].product[2]=lpare;
productions[52].product[3]=expression_list;
productions[52].product[4]=rpare;

productions[53].length=1;//(24)
productions[53].product[0]=factor;
productions[53].product[1]=num;

productions[54].length=3;//(24)
productions[54].product[0]=factor;
productions[54].product[1]=lpare;
productions[54].product[2]=expression;
productions[54].product[3]=rpare;

productions[55].length=2;//(24)
productions[55].product[0]=factor;
productions[55].product[1]=rw_not;
productions[55].product[2]=factor;

productions[56].length=1;//(24)
productions[56].product[0]=factor;
productions[56].product[1]=rw_true;

productions[57].length=1;//(24)
productions[57].product[0]=factor;
productions[57].product[1]=rw_false;

productions[58].length=1;//(25)
productions[58].product[0]=sign;
productions[58].product[1]=op_add;

productions[59].length=1;//(25)
productions[59].product[0]=sign;
productions[59].product[1]=op_sub;

int i,j;
for (i = 0; i<ALL; i++){
	for (j = 0; j<10; j++){
		firstTable[i][j] = -1;
	
}
}
firstTable[program][0]=rw_program;	//program

firstTable[program_head][0]=rw_program;//program_head

firstTable[program_body][0]=rw_var;//program_body
firstTable[program_body][1]=rw_function;
firstTable[program_body][2]=rw_procedure;
firstTable[program_body][3]=rw_begin;

firstTable[identifier_list][0]=id;//identifier_list

firstTable[declarations][0]=rw_var;//declarations
firstTable[declarations][1]=empty;

firstTable[subproc_declarations][0]=rw_function;//type
firstTable[subproc_declarations][1]=rw_procedure;
firstTable[subproc_declarations][2]=empty;

firstTable[compound_statement][0]=rw_begin;//compound_statement

firstTable[declaration][0]=id;//declaration

firstTable[type][0]=rw_array;//type
firstTable[type][1]=rw_record;
firstTable[type][2]=rw_integer;
firstTable[type][3]=rw_real;
firstTable[type][4]=rw_boolean;
firstTable[type][5]=num;

firstTable[standard_type][0]=rw_integer;//standard_type
firstTable[standard_type][1]=rw_real;
firstTable[standard_type][2]=rw_boolean;
firstTable[standard_type][3]=num;

firstTable[subproc_declaration][0]=rw_function;//subproc_declaration
firstTable[subproc_declaration][1]=rw_procedure;

firstTable[subproc_head][0]=rw_function;//subproc_head
firstTable[subproc_head][1]=rw_procedure;

firstTable[arguments][0]=lpare;//arguments
firstTable[arguments][1]=empty;

firstTable[parameter_list][0]=id;//parameter_list

firstTable[optional_statements][0]=empty;//optional_statements
firstTable[optional_statements][1]=rw_if;
firstTable[optional_statements][2]=rw_while;
firstTable[optional_statements][3]=rw_real;
firstTable[optional_statements][4]=rw_write;
firstTable[optional_statements][5]=id;
firstTable[optional_statements][6]=rw_begin;

firstTable[statement_list][0]=id;//statement_list
firstTable[statement_list][1]=rw_begin;
firstTable[statement_list][2]=rw_if;
firstTable[statement_list][3]=rw_while;
firstTable[statement_list][4]=rw_read;
firstTable[statement_list][5]=rw_write;

firstTable[statement][0]=id;//statement
firstTable[statement][1]=rw_begin;
firstTable[statement][2]=rw_if;
firstTable[statement][3]=rw_while;
firstTable[statement][4]=rw_read;
firstTable[statement][5]=rw_write;

firstTable[variable][0]=id;//variable

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国av一区二区| 欧美影院一区二区三区| 成人高清视频免费观看| 91麻豆精品国产91久久久| 国产精品国模大尺度视频| 国产一区二区视频在线| 欧美日韩国产一区二区三区地区| 国产日产欧产精品推荐色| 美女视频第一区二区三区免费观看网站| 99久久99久久精品国产片果冻| 2020国产精品久久精品美国| 午夜激情综合网| 欧洲国内综合视频| 亚洲人成亚洲人成在线观看图片| 国产综合色产在线精品| 欧美一区二区福利在线| 石原莉奈一区二区三区在线观看| 在线亚洲人成电影网站色www| 中文字幕第一页久久| 国产成人亚洲综合色影视| 欧美大肚乱孕交hd孕妇| 蜜桃av噜噜一区| 欧美一级高清片| 另类小说一区二区三区| 欧美tickling挠脚心丨vk| 青青草91视频| 精品国产91洋老外米糕| 久久激情五月婷婷| 欧美精品一区男女天堂| 国产麻豆视频精品| 久久久久久一二三区| 国产又黄又大久久| 国产精品污网站| 99久久综合精品| 亚洲男女一区二区三区| 91年精品国产| 亚洲成人免费在线| 91精品国产综合久久精品| 日本欧美大码aⅴ在线播放| 日韩欧美专区在线| 国产在线看一区| 日本一区二区成人在线| 91最新地址在线播放| 亚洲综合区在线| 91精品国产综合久久久蜜臀粉嫩 | 久久电影国产免费久久电影| 日韩免费高清av| 国产成人精品免费| 中文字幕制服丝袜一区二区三区| 99久久综合国产精品| 亚洲精品国产品国语在线app| 欧美日韩一区二区不卡| 国产一区福利在线| ㊣最新国产の精品bt伙计久久| 日本乱人伦aⅴ精品| 视频一区二区中文字幕| 久久婷婷综合激情| 91官网在线观看| 毛片av中文字幕一区二区| 中文字幕高清一区| 91.xcao| 福利视频网站一区二区三区| 亚洲已满18点击进入久久| 欧美一区中文字幕| 国产99久久久国产精品潘金| 亚洲福利一区二区| 国产丝袜美腿一区二区三区| 色哟哟亚洲精品| 韩国av一区二区| 一区二区三区在线视频观看58 | 欧美日韩一二三区| 国内国产精品久久| 亚洲午夜免费电影| 国产午夜三级一区二区三| 欧美亚洲综合色| 风间由美一区二区三区在线观看| 亚洲在线视频一区| 日本一区二区成人在线| 日韩一区和二区| 欧洲一区二区av| 丰满放荡岳乱妇91ww| 日本少妇一区二区| 一区二区不卡在线视频 午夜欧美不卡在| 精品久久一区二区三区| 欧美老女人在线| 97久久超碰国产精品| 国产精品一区二区久久不卡| 视频一区免费在线观看| 亚洲欧美激情小说另类| 国产精品理论片在线观看| 2021中文字幕一区亚洲| 欧美一级一级性生活免费录像| 在线免费观看一区| 99久久国产综合精品麻豆| 国产中文字幕一区| 久热成人在线视频| 美美哒免费高清在线观看视频一区二区 | wwwwww.欧美系列| 91精品福利在线一区二区三区| 欧美性猛片aaaaaaa做受| 一本一本久久a久久精品综合麻豆| 国产伦精品一区二区三区视频青涩| 日韩主播视频在线| 婷婷成人激情在线网| 天涯成人国产亚洲精品一区av| 亚洲一区二区三区国产| 玉米视频成人免费看| 亚洲精品国产a久久久久久| 综合网在线视频| 亚洲免费观看在线观看| 亚洲欧美日韩电影| 亚洲一区二区视频在线| 亚洲宅男天堂在线观看无病毒| 一区二区三区在线高清| 亚洲午夜激情网页| 日韩精品一区第一页| 日韩精品久久理论片| 麻豆精品一区二区| 国产福利电影一区二区三区| 成人午夜私人影院| 91看片淫黄大片一级在线观看| 91免费观看国产| 欧美色中文字幕| 91精品综合久久久久久| 精品伦理精品一区| 国产精品欧美一级免费| 亚洲欧洲中文日韩久久av乱码| 一区二区三区在线观看国产| 亚洲成人黄色影院| 极品少妇xxxx精品少妇| 成人午夜精品一区二区三区| 91女厕偷拍女厕偷拍高清| 欧美欧美欧美欧美首页| 欧美电影免费提供在线观看| 国产欧美日韩激情| 一个色妞综合视频在线观看| 奇米888四色在线精品| 懂色av一区二区三区蜜臀| 91麻豆免费在线观看| 欧美丝袜自拍制服另类| 精品奇米国产一区二区三区| 国产精品素人一区二区| 亚洲狠狠爱一区二区三区| 久久99国产精品免费网站| 成人黄页毛片网站| 欧美日韩国产bt| 国产女人18毛片水真多成人如厕 | 亚洲伊人色欲综合网| 日本成人在线电影网| 国产成人综合精品三级| 欧美性xxxxx极品少妇| 久久综合色婷婷| 一区二区三区.www| 国产成人综合亚洲网站| 欧美精品 日韩| 亚洲欧洲成人自拍| 老司机精品视频线观看86| 91色porny在线视频| www国产亚洲精品久久麻豆| 亚洲高清免费视频| 高清国产午夜精品久久久久久| 欧美专区日韩专区| 国产精品视频免费看| 男人的j进女人的j一区| 色一情一乱一乱一91av| www国产精品av| 日本成人在线视频网站| 91国产丝袜在线播放| 国产欧美一区在线| 免费成人美女在线观看| 欧美性三三影院| 亚洲欧美日本韩国| 成人免费视频一区| 久久久久9999亚洲精品| 免费高清在线视频一区·| 欧美日韩一区高清| 一区二区三区成人| 一本一道久久a久久精品综合蜜臀| 国产视频一区在线观看| 美女性感视频久久| 在线成人av影院| 亚洲一区二区三区三| 色天使色偷偷av一区二区| 国产精品欧美一区喷水| 国产成人精品1024| 欧美激情一二三区| 丁香激情综合国产| 国产日韩影视精品| 国产成人精品一区二区三区四区| 欧美电影免费观看高清完整版在| 日本伊人午夜精品| 欧美日韩国产成人在线免费| 亚洲午夜久久久久久久久久久| 在线视频中文字幕一区二区| 依依成人综合视频| 欧美特级限制片免费在线观看| 亚洲成在线观看| 3d动漫精品啪啪一区二区竹菊 | 亚洲一级二级三级| 色视频成人在线观看免|