[V0.2.2]A simple compiler - grammar analysis

input file:in.txt    output file:out.txt
time limit: 1000ms
language:ASM、C、C++、C#、Java、VB

Difficulty:★★★

Describe:
    In the last version 0.2.1,you have get all the separated words from a specific expression. Before you can finally make the expression work,try to analyse its grammar from the separated words.As you solve the first five-star problem,you may need to use the technology you have learned in Fundamentals of Compiling.Then,here we go.
Input:
    The available output from version 0.2.1 as shown in the Sample Input. 
OutPut:
    The grammar analysis result in the format shown in the Sample Output.
Sample Input:
变量一
&
(
变量二
|
flag
)

!
(
条件A
|
flag
&
条件B
)
&
flag_
|
!
变量一
Sample Output:
Temp1 = 变量二 | flag
Final = 变量一&Temp1

Temp1 = flag&条件B
Temp2 = 条件A|Temp1
Temp3 = !Temp2
Temp4 = Temp3&flag_
Temp5 = !变量一
Final = Temp4|Temp5

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值