
Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Курсовая работа. Вариант 16 / kurs / VOC
.H#ifndef _VOC_H
#define _VOC_H
/*
*** Љ®¤Ёа®ў ЁҐ вҐа¬Ё «мле бЁ¬ў®«®ў
SYMB(0, table, index)
table: 0
index: symbol:
0 void
1 main
2 print
3 scan
4 if
5 else
6 for
7 goto
8 const
9 int
10 float
11 fmatr
12 det
table: 1
index: symbol:
0 (
1 )
2 [
3 ]
4 {
5 }
6 *
7 /
8 +
9 -
10 ;
11 ,
12 =
13 !
14 >
15 <
16 :
table: 2
index: symbol:
0 >=
1 <=
2 ==
3 !=
id -> SYMB(0, 3, 0)
num -> SYMB(0, 4, 0)
fnum -> SYMB(0, 5, 0)
*** Љ®¤Ёа®ў ЁҐ ҐвҐа¬Ё «мле бЁ¬ў®«®ў
SYMB(1, id1, id2), Ј¤Ґ id1, id2 - гЁЄ «м®Ґ ®Ў®§ 票Ґ ¤ ®Ј® ҐвҐа¬Ё «
*** Љ®¤Ёа®ў ЁҐ ®ЇҐа жЁ®ле бЁ¬ў®«®ў
SYMB(2, nfun, 0)
^ - ®¬Ґа д-ЁЁ ў ¬ ббЁўҐ arr_fun_ops, ᮮ⢥вбвўго饩 ¤ ®¬г
®ЇҐа жЁ®®¬г бЁ¬ў®«г
*** Љ®¤Ёа®ў ЁҐ бЁ¬ў®«®ў, ®Ў®§ з ойЁе Ї®¤Ја ¬¬ вЁЄЁ
SYMB(5, id, n_grm)
^ ^ - ®¬Ґа Ја ¬¬ вЁЄЁ, ў Є®в®а®© 室Ёвбп ¤ л© бЁ¬ў®«
^
^ - гЁЄ «м®Ґ ®Ў®§ 票Ґ
*/
// CЇҐжЁ «млҐ бЁ¬ў®«л
#define _bs_ SYMB(3, 0 , 0) // Б
#define _eps_ SYMB(4, 0 , 0) // eps
// ЌҐвҐа¬Ё «л
#define _PRG_ SYMB(1, 0, 0)
#define _GD_ SYMB(1, 0, 1)
#define _SOP_ SYMB(1, 1, 0)
#define _SET_ SYMB(1, 1, 1)
#define _OP_ SYMB(1, 2, 0)
#define _LOP_ SYMB(1, 2, 1)
#define _OPS_ SYMB(1, 2, 2)
#define _GOT_ SYMB(1, 2, 3)
#define _IN_ SYMB(1, 2, 4)
#define _LIN_ SYMB(1, 2, 5)
#define _MAT_ SYMB(1, 2, 6)
#define _OUT_ SYMB(1, 3, 0)
#define _LO_ SYMB(1, 3, 1)
#define _OPN_ SYMB(1, 4, 0)
#define _FOR_ SYMB(1, 4, 1)
#define _HD_ SYMB(1, 4, 2)
#define _HD0_ SYMB(1, 4, 3)
#define _HD1_ SYMB(1, 4, 4)
#define _IF_ SYMB(1, 4, 5)
#define _IF1_ SYMB(1, 4, 6)
#define _CON_ SYMB(1, 4, 7)
#define _GIV_ SYMB(1, 4, 8)
#define _OGV_ SYMB(1, 4, 9)
#define _LEX_ SYMB(1, 4, 10)
#define _LE1_ SYMB(1, 4, 11)
#define _DES_ SYMB(1, 5, 0)
#define _DVA_ SYMB(1, 5, 1)
#define _DMT_ SYMB(1, 5, 2)
#define _TYP_ SYMB(1, 5, 3)
#define _LI_ SYMB(1, 5, 4)
#define _LA_ SYMB(1, 5, 5)
#define _IA_ SYMB(1, 5, 6)
#define _LMT_ SYMB(1, 5, 7)
#define _DC_ SYMB(1, 6, 0)
#define _LC_ SYMB(1, 6, 1)
#define _LC1_ SYMB(1, 6, 2)
#define _AEX_ SYMB(1, 7, 0)
#define _T_ SYMB(1, 7, 1)
#define _P_ SYMB(1, 7, 2)
#define _VAR_ SYMB(1, 8, 0)
#define _IM_ SYMB(1, 8, 1)
// ’Ґа¬Ё «л
#define _void_ SYMB(0, 0, 0)
#define _main_ SYMB(0, 0, 1)
#define _print_ SYMB(0, 0, 2)
#define _scan_ SYMB(0, 0, 3)
#define _if_ SYMB(0, 0, 4)
#define _else_ SYMB(0, 0, 5)
#define _for_ SYMB(0, 0, 6)
#define _goto_ SYMB(0, 0, 7)
#define _const_ SYMB(0, 0, 8)
#define _int_ SYMB(0, 0, 9)
#define _float_ SYMB(0, 0, 10)
#define _fmatr_ SYMB(0, 0, 11)
#define _det_ SYMB(0, 0, 12)
#define _transp_ SYMB(0, 0, 13)
#define _rbo_ SYMB(0, 1, 0) // (
#define _rbc_ SYMB(0, 1, 1) // )
#define _sbo_ SYMB(0, 1, 2) // [
#define _sbc_ SYMB(0, 1, 3) // ]
#define _bo_ SYMB(0, 1, 4) // {
#define _bc_ SYMB(0, 1, 5) // }
#define _mul_ SYMB(0, 1, 6) // *
#define _div_ SYMB(0, 1, 7) // /
#define _add_ SYMB(0, 1, 8) // +
#define _sub_ SYMB(0, 1, 9) // -
#define _semcol_ SYMB(0, 1, 10) // ;
#define _comma_ SYMB(0, 1, 11) // ,
#define _e_ SYMB(0, 1, 12) // =
#define _exm_ SYMB(0, 1, 13) // !
#define _b_ SYMB(0, 1, 14) // >
#define _l_ SYMB(0, 1, 15) // <
#define _col_ SYMB(0, 1, 16) // :
#define _be_ SYMB(0, 2, 0) // >=
#define _le_ SYMB(0, 2, 1) // <=
#define _ee_ SYMB(0, 2, 2) // ==
#define _ne_ SYMB(0, 2, 3) // !=
#define _id_ SYMB(0, 3, 0) // id
#define _num_ SYMB(0, 4, 0) // num
#define _fnum_ SYMB(0, 5, 0) // fnum
// Џ®¤Ј ¬¬ вЁЄЁ
#define __DES0__ SYMB(5, 0 ,0)
#define __SOP0__ SYMB(5, 1, 0)
#define __SOP2__ SYMB(5, 2, 2)
#define __OP1__ SYMB(5, 3, 1)
#define __OUT2__ SYMB(5, 4, 2)
#define __AEX3__ SYMB(5, 5, 3)
#define __DC5__ SYMB(5, 6, 5)
#define __VAR2__ SYMB(5, 8, 2)
#define __VAR7__ SYMB(5, 9, 7)
#define __AEX8__ SYMB(5, 10, 8)
#define __OPN2__ SYMB(5, 11, 2)
#define __OP4__ SYMB(5, 12, 4)
#define __VAR4__ SYMB(5, 13, 4)
#define __AEX4__ SYMB(5, 14, 4)
// ЋЇҐа жЁ®лҐ бЁ¬ў®«л
#define _op_vars_ SYMB(2, 7, 0)
#define _op_arr_ SYMB(2, 6, 0)
#define _op_lst_id_ SYMB(2, 5, 0)
#define _op_lst_arr_ SYMB(2, 4, 0)
#define _op_matr_ SYMB(2, 8, 0)
#define _op_const_ SYMB(2, 9, 0)
#define _op_im_ SYMB(2, 10, 0)
#define _op_avm_ SYMB(2, 11, 0)
#define _op_am_ SYMB(2, 12, 0)
#define _op_jmpf_ SYMB(2, 13, 0)
#define _op_mark_ SYMB(2, 0, 0)
#define _op_goto_ SYMB(2, 1, 0)
#define _op_in_ SYMB(2, 2, 0)
#define _op_out_ SYMB(2, 3, 0)
#define _op_add_ SYMB(2, 14, 0)
#define _op_sub_ SYMB(2, 15, 0)
#define _op_mul_ SYMB(2, 16, 0)
#define _op_div_ SYMB(2, 17, 0)
#define _op_det_ SYMB(2, 19, 0)
#define _op_transp_ SYMB(2, 18, 0)
#define _op_set_ SYMB(2, 20, 0)
#define _op_ne_ SYMB(2, 21, 0)
#define _op_ee_ SYMB(2, 22, 0)
#define _op_l_ SYMB(2, 23, 0)
#define _op_le_ SYMB(2, 24, 0)
#define _op_lst_attr_ SYMB(2, 25, 0)
#define _op_elm_arr_ SYMB(2, 26, 0)
#define _op_elm_matr_ SYMB(2, 27, 0)
#endif