CONSTRUCTOR TABLES of the Grammar G2.grm
Parameters
File G2.prm
struct parm{
int nr //tähestiku V pikkus
int tnr //tähestiku VT pikkus
int BRC //0: G on pööratav
int Pnr //Produktsioonide arv
int dep //1: sõltuv kontekst
int itl //identifikaatorite arv (Parser)
int ktl //konstantide arv (Parser)
}
nr=8 tnr=4 BRC=0 Pnr=7 dep=0 itl=0 ktl=0
Alphabet V
File G2.t
# a b c T S U V
Scanner Table
File G2.tt
# a b c
Tree of the Alphabet V
File G2.v
struct R{
int P; /* produktsiooni jrk-nr */
int sem; /* semantikakood */
int n; /* NT definitsiooni pikkus */
int *d; /* NT definitsioon */
struct R *alt; /* NT alternatiivne definitsioon */
}
struct D{
int tunnus; /* 0: NT, 1: T */
int code; /* vahekeelne kood */
int L; /* NT või id/const nime pikkus */
int loc; /* ident | const : nr */
int icx; /* itl või ktl - IT või KT index */
struct D *left; /* kahendpuu viidad (võti on T[code]) */
struct D *right;
struct R *def;
}
D 00490040: tunnus=1 code=1 L=1 loc=0 icx=0 left=00000000 right=00491CA0 def=00000000 (#)
D 00491A20: tunnus=0 code=6 L=1 loc=0 icx=0 left=00000000 right=00000000 def=00491820 (S)
R 00491820: P=2 sem=0 n=2 d=004917E0 alt=00000000
d 004917E0: 7 8
D 00491AC0: tunnus=0 code=5 L=1 loc=0 icx=0 left=00491A20 right=004918B0 def=00491990 (T)
R 00491990: P=1 sem=0 n=3 d=00491950 alt=00000000
d 00491950: 1 6 1
D 004918B0: tunnus=0 code=7 L=1 loc=0 icx=0 left=00000000 right=00491860 def=004914F0 (U)
R 004914F0: P=4 sem=0 n=2 d=004914B0 alt=00491660
d 004914B0: 2 3
R 00491660: P=3 sem=0 n=3 d=00491620 alt=00000000
d 00491620: 2 7 3
D 00491860: tunnus=0 code=8 L=1 loc=0 icx=0 left=00000000 right=00000000 def=00491260 (V)
R 00491260: P=6 sem=0 n=1 d=00491230 alt=00491380
d 00491230: 4
R 00491380: P=5 sem=0 n=2 d=00491340 alt=00000000
d 00491340: 4 8
D 00491CA0: tunnus=1 code=2 L=1 loc=0 icx=0 left=00491AC0 right=00491C50 def=00000000 (a)
D 00491C50: tunnus=1 code=3 L=1 loc=0 icx=0 left=00000000 right=00491B60 def=00000000 (b)
D 00491B60: tunnus=1 code=4 L=1 loc=0 icx=0 left=00000000 right=00000000 def=00000000 (c)
Reduce Table
File G2.ht
struct h{
int P; /* produktsiooni jrk-nr */
int n; /* definitsiooni pikkus */
int NT; /* defineeritav nonterminal */
int *d; /* definitsioon */
int nc; /* 1 - sõltuv kontekst */
char *c; /* reservis */
struct h *same; /* sama parem pool */
struct h *col; /* põrkeviit */
}
h 004910C0: P=4 n=2 NT=7 d=00491080 nc=0 same=00000000 col=00000000 (U)
d 00491080: 2 3
h 00492F90: P=6 n=1 NT=8 d=00492F60 nc=0 same=00000000 col=00000000 (V)
d 00492F60: 4
h 00491030: P=3 n=3 NT=7 d=00492FE0 nc=0 same=00000000 col=004911E0 (U)
d 00492FE0: 2 7 3
h 004911E0: P=1 n=3 NT=5 d=004911A0 nc=0 same=00000000 col=00000000 (T)
d 004911A0: 1 6 1
h 00492F10: P=5 n=2 NT=8 d=00492ED0 nc=0 same=00000000 col=00000000 (V)
d 00492ED0: 4 8
h 00491150: P=2 n=2 NT=6 d=00491110 nc=0 same=00000000 col=00000000 (S)
d 00491110: 7 8
Precedence Matrix
File G2.pm
Nr | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
1 | 0 | 2 | 0 | 0 | 0 | 1 | 2 | 0 |
2 | 0 | 2 | 1 | 0 | 0 | 0 | 1 | 0 |
3 | 0 | 0 | 4 | 4 | 0 | 0 | 0 | 4 |
4 | 4 | 0 | 0 | 2 | 0 | 0 | 0 | 1 |
5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 1 |
8 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Semantics
File G2.sm
1 2 3 4 5 6 7 8 9 10 0