-
Notifications
You must be signed in to change notification settings - Fork 0
/
grammar.json
197 lines (197 loc) · 5.29 KB
/
grammar.json
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
{
"ID": {
"lexeme": "ID",
"master_id": "A",
"function": "Assignment & Equations",
"syntax": {
"syntax_A01": {
"spec_id": "A01",
"serial": 1,
"syntax": "ID ASSIGN VARIABLE EOL"
},
"syntax_A02": {
"spec_id": "A02",
"serial": 2,
"syntax": "ID COLON VARIABLE ASSIGN VARIABLE EOL"
}
}
},
"FUNC": {
"lexeme": "FUNC",
"master_id": "B",
"function": "Function Declaration",
"syntax": {
"syntax_B01": {
"spec_id": "B01",
"serial": 1,
"syntax": "FUNC FUNCTION ASSIGN EXPRESSION EOL"
},
"syntax_B02": {
"spec_id": "B02",
"serial": 2,
"syntax": "FUNC FUNCTION ASSIGN ID EOL"
},
"syntax_B03": {
"spec_id": "B03",
"serial": 3,
"syntax": "FUNC FUNCTION ASSIGN FUNCTION EOL"
},
"syntax_B04": {
"spec_id": "B04",
"serial": 4,
"syntax": "FUNC FUNCTION LBRACE EOL"
}
}
},
"FUNCTION": {
"lexeme": "FUNCTION",
"master_id": "C",
"function": "Function Declaration",
"syntax": {
"syntax_C01": {
"spec_id": "C01",
"serial": 1,
"syntax": "FUNCTION ASSIGN EXPRESSION EOL"
},
"syntax_C02": {
"spec_id": "C02",
"serial": 2,
"syntax": "FUNCTION ASSIGN ID EOL"
},
"syntax_C03": {
"spec_id": "C03",
"serial": 3,
"syntax": "FUNCTION ASSIGN FUNCTION EOL"
}
}
},
"PRINT": {
"lexeme": "PRINT",
"master_id": "D",
"function": "Print",
"syntax": {
"syntax_D01": {
"spec_id": "D01",
"serial": 1,
"syntax": "PRINT EXPRESSION EOL"
},
"syntax_D02": {
"spec_id": "D02",
"serial": 2,
"syntax": "PRINT ID EOL"
},
"syntax_D03": {
"spec_id": "D03",
"serial": 3,
"syntax": "PRINT FUNCTION EOL"
}
}
},
"RETURN": {
"lexeme": "RETURN",
"master_id": "E",
"function": "Return value",
"syntax": {
"syntax_E01": {
"spec_id": "E01",
"serial": 1,
"syntax": "RETURN EXPRESSION EOL"
},
"syntax_E02": {
"spec_id": "E02",
"serial": 2,
"syntax": "RETURN ID EOL"
},
"syntax_E03": {
"spec_id": "E03",
"serial": 3,
"syntax": "RETURN FUNCTION EOL"
}
}
},
"RBRACE": {
"lexeme": "RBRACE",
"master_id": "F",
"function": "End of function",
"syntax": {
"syntax_F01": {
"spec_id": "F01",
"serial": 1,
"syntax": "RBRACE EOL"
}
}
},
"SHWTBL": {
"lexeme": "SHWTBL",
"master_id": "G",
"function": "Show Table",
"syntax": {
"syntax_G01": {
"spec_id": "G01",
"serial": 1,
"syntax": "SHWTBL FUNCTION EOL"
},
"syntax_G02": {
"spec_id": "G02",
"serial": 2,
"syntax": "SHWTBL NUM FUNCTION EOL"
}
}
},
"PLT": {
"lexeme": "PLT",
"master_id": "H",
"function": "Plot",
"syntax": {
"syntax_H01": {
"spec_id": "H01",
"serial": 1,
"syntax": "PLT FUNCTION EOL"
}
}
},
"SOLVE": {
"lexeme": "SOLVE",
"master_id": "I",
"function": "Solve",
"syntax": {
"syntax_I01": {
"spec_id": "I01",
"serial": 1,
"syntax": "SOLVE FUNCTION EOL"
},
"syntax_I02": {
"spec_id": "I02",
"serial": 2,
"syntax": "SOLVE TUPLE FOR TUPLE EOL"
}
}
},
"INTG": {
"lexeme": "INTG",
"master_id": "J",
"function": "Integrate",
"syntax": {
"syntax_J01": {
"spec_id": "J01",
"serial": 1,
"syntax": "INTG FUNCTION WRT VARIABLE EOL"
},
"syntax_J02": {
"spec_id": "J02",
"serial": 2,
"syntax": "INTG FUNCTION WRT VARIABLE PLT EOL"
},
"syntax_J03": {
"spec_id": "J03",
"serial": 3,
"syntax": "INTG FUNCTION WRT ID FROM VARIABLE TO VARIABLE EOL"
},
"syntax_J04": {
"spec_id": "J04",
"serial": 4,
"syntax": "INTG FUNCTION WRT ID FROM VARIABLE TO VARIABLE PLT EOL"
}
}
}
}