-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrammer.txt
142 lines (106 loc) · 2.36 KB
/
grammer.txt
1
2
3
4
5
6
7
8
9
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Benevis("salam")^
agar { 1 &B 2 } [
Benevis("na!")^
]
Sahih v1 = 0^
Sahih v2 = 14^
ta { v1 &K 10 } [
Benevis("%d", v1)^
v1 YekiBala^
]
------------------------
Grammar:
S:
START
λ
START:
Benevis ( STRING SERIES_EXPRESSION ) ^ S
Begir ( STRING SERIES_id ) ^ S
agar { BOOLEANEXPRESSION } [ START ] S
ta { BOOLEANEXPRESSION } [ START ] S
TYPE id = EXPRESSION ^ S
Harf id = char ^ S
id ID_OP S
ID_OP:
= EXPRESSION ^
SINGULAROP ^
SERIES_EXPRESSION:
, EXPRESSION SERIES_EXPRESSION'
SERIES_EXPRESSION':
SERIES_EXPRESSION
λ
SERIES_id:
,id SERIES_id'
SERIES_id':
SERIES_id
λ
SINGULAROP:
YekiBala
YekiPain
TYPE:
Sahih
Ashari
BOOLEANEXPRESSION:
EXPRESSION OPB EXPRESSION
IDENTIFIER:
id
num
char
OPB:
&B
&BM
&K
&KM
&MM
EXPRESSION:
TERM E
TERM:
FACTOR T
E:
Jam TERM E
Kam TERM E
λ
T:
Zarb FACTOR T
Tagsim FACTOR T
Bagimonde FACTOR T
λ
FACTOR:
IDENTIFIER
( EXPRESSION )
------------------------
FIRST(S): {ε, Benevis, Begir, agar, ta, id, Sahih, Ashari, Harf}
FIRST (START): {Benveis, Begir, agar, ta, id, Sahih, Ashari, Harf}
FIRST (ID_OP): { = , YekiBala, YekiPain}
FIRST (SERIES_EXPRESSION): { , }
FRIST (SERIES_EXPRESSION'): { , , λ}
FIRST (SERIES_ID): {,}
FIRST (SERIES_ID'): {, , λ}
FIRST (SINGULAROP): {YeiBala, YekiPain}
FIRST (TYPE): {Sahih, Ashari, Harf}
FIRST (BOOLEANEXPRESSION): {id, num, (}
FIRST (IDENTIFIER): {id, num}
FIRST (OPB): {&B, &BM, &K, &KM, &MM}
FIRST (EXPRESSION): {id, num, (}
FIRST (TERM): {id, num, (}
FIRST (FACTOR): {id, num, (}
FIRST (E): {Jam, kam, λ}
FIRST (T): {Zarb, Tagsim, Bagimonde, λ}
-------------------------
FOLLOW (S): {$, ]}
FOLLOW (START): {$, ]}
FOLLOW (ID_OP): {Benevis, Begir, agar, ta, id, Sahih, Ashari, Harf, $, ]}
FOLLOW (SERIES_EXPRESSION): { ) }
FOLLOW (SERIES_EXPRESSION'): { ) }
FOLLOW (SERIES_id): { ) }
FOLLOW (SERIES_id'): { ) }
FOLLOW (BOOLEANEXPRESSION): { } }
FOLLOW (TYPE): { id }
FOLLOW (SINGULAROP): {^}
FOLLOW (IDENTIFIER): { Zarb, Tagsim, Bagimonde, Jam, Kam, ), &B, &BM, &K, &KM, &MM, , , ^, } }
FOLLOW (OPB): { &B, &BM, &K, &KM, &MM }
FOLLOW (EXPRESSION): { ), &B, &BM, &K, &KM, &MM, , , ^, } }
FOLLOW (TERM): {Jam, Kam, ), &B, &BM, &K, &KM, &MM, , , ^, } }
FOLLOW (E): { ), &B, &BM, &K, &KM, &MM, , , ^, } }
FOLLOW (T): { Jam, Kam, ), &B, &BM, &K, &KM, &MM, , , ^, } }
FOLLOW (FACTOR): { Zarb, Tagsim, Bagimonde, Jam, Kam, ), &B, &BM, &K, &KM, &MM, , , ^, } }