input file:in.txt output file:out.txt
time limit: 1000ms
language:ASM、C、C++、C#、Java、VB
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