- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
char tab1[22][8]={"program","var","begin","end","int","float","bool","if","then","else","for","to","do","while","readln","writeln","as","||","!","&&","true","false"};
char tab2[18][3]={"==","<",">","+","-","*","/","(",")",".",",",";"," ","!=","<=",">=",10};
//Много кода
if(!strcmp("program",st.top())&&!strcmp("program",&mas[j][0]))
{
st.pop();
j++;
}
else
if(!strcmp("var",st.top())&&!strcmp("var",&mas[j][0]))
{
st.pop();
j++;
}
else
if(!strcmp("begin",st.top())&&!strcmp("begin",&mas[j][0]))
{
st.pop();
j++;
}
else
if(!strcmp("end",st.top())&&!strcmp("end",&mas[j][0]))
{
st.pop();
j++;
}
else
if(!strcmp("int",st.top())&&!strcmp("int",&mas[j][0]))
{
st.pop();
j++;
}
else
if(!strcmp("float",st.top())&&!strcmp("float",&mas[j][0]))
{
st.pop();
j++;
}
//Еще строк 200 такого