CONSTRUCTOR TABLES of the Grammar G1.grm
Parameters
File G1.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=7 tnr=3 BRC=0 Pnr=6 dep=0 itl=0 ktl=0
Alphabet V
File G1.t
# a b S A B C
Scanner Table
File G1.tt
# a b
Tree of the Alphabet V
File G1.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=00491CB0 def=00000000 (#)
D 00491B20: tunnus=0 code=5 L=1 loc=0 icx=0 left=00000000 right=004919B0 def=00491920 (A)
R 00491920: P=2 sem=0 n=2 d=004918E0 alt=00000000
d 004918E0: 6 7
D 004919B0: tunnus=0 code=6 L=1 loc=0 icx=0 left=00000000 right=00491960 def=004916A0 (B)
R 004916A0: P=4 sem=0 n=2 d=00491660 alt=00491800
d 00491660: 6 2
R 00491800: P=3 sem=0 n=1 d=004917D0 alt=00000000
d 004917D0: 2
D 00491960: tunnus=0 code=7 L=1 loc=0 icx=0 left=00000000 right=00000000 def=00491580 (C)
R 00491580: P=5 sem=0 n=1 d=00491550 alt=00000000
d 00491550: 3
D 00491BC0: tunnus=0 code=4 L=1 loc=0 icx=0 left=00491B20 right=00000000 def=00491A90 (S)
R 00491A90: P=1 sem=0 n=3 d=00491A50 alt=00000000
d 00491A50: 1 5 1
D 00491CB0: tunnus=1 code=2 L=1 loc=0 icx=0 left=00491BC0 right=00491C10 def=00000000 (a)
D 00491C10: tunnus=1 code=3 L=1 loc=0 icx=0 left=00000000 right=00000000 def=00000000 (b)
Reduce Table
File G1.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 00491470: P=2 n=2 NT=5 d=00491430 nc=0 same=00000000 col=00000000 (A)
d 00491430: 6 7
h 00491350: P=3 n=1 NT=6 d=00491320 nc=0 same=00000000 col=00000000 (B)
d 00491320: 2
h 004912D0: P=5 n=1 NT=7 d=004912A0 nc=0 same=00000000 col=00000000 (C)
d 004912A0: 3
h 004913E0: P=4 n=2 NT=6 d=004913A0 nc=0 same=00000000 col=00000000 (B)
d 004913A0: 6 2
h 00491500: P=1 n=3 NT=4 d=004914C0 nc=0 same=00000000 col=00000000 (S)
d 004914C0: 1 5 1
Precedence Matrix
File G1.pm
Nr | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
1 | 0 | 2 | 0 | 0 | 1 | 2 | 0 |
2 | 0 | 4 | 4 | 0 | 0 | 0 | 4 |
3 | 4 | 0 | 0 | 0 | 0 | 0 | 0 |
4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
6 | 0 | 1 | 2 | 0 | 0 | 0 | 1 |
7 | 4 | 0 | 0 | 0 | 0 | 0 | 0 |
Semantics
File G1.sm
1 2 3 4 5 6 7 8 0