文件名称:sizeyunsuan
介绍说明--下载内容均来自于网络,请自行研究使用
请完成以下描述算术表达式的LL(1)文法的递归下降分析程序G[E]:
E→TE′
E′→ATE′|ε
T→FT′
T′→MFT′|ε
F→ (E)| d | i
A→+|-
M→*|/
说明:终结符号d为正整数,终结符号i为变量。
其功能为:
从键盘上输入一串四则运算表达式,对照文法G[E]检查输入串的语法是否正确,如果不正确必须指出错误原因。
-Please complete the following descr iption of arithmetic expressions LL (1) recursive grammar decline analysis procedure of G [E]: E → the TE ' E' → the ATE ' | ε T-→ the FT' T ' → the MFT' | ε F → (E) | d | i A →+ |- M →* |/Descr iption: The end of the symbol d is a positive integer, the end of the symbol i for the variable. Its function: a string of four arithmetic expression input from the keyboard control grammar G [E] check the syntax of the input string is correct, if incorrect, must be pointed out that the cause of the error.
E→TE′
E′→ATE′|ε
T→FT′
T′→MFT′|ε
F→ (E)| d | i
A→+|-
M→*|/
说明:终结符号d为正整数,终结符号i为变量。
其功能为:
从键盘上输入一串四则运算表达式,对照文法G[E]检查输入串的语法是否正确,如果不正确必须指出错误原因。
-Please complete the following descr iption of arithmetic expressions LL (1) recursive grammar decline analysis procedure of G [E]: E → the TE ' E' → the ATE ' | ε T-→ the FT' T ' → the MFT' | ε F → (E) | d | i A →+ |- M →* |/Descr iption: The end of the symbol d is a positive integer, the end of the symbol i for the variable. Its function: a string of four arithmetic expression input from the keyboard control grammar G [E] check the syntax of the input string is correct, if incorrect, must be pointed out that the cause of the error.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
四则运算的语法分析程序.cpp