Changeset 113 for branches/generator/pascal.grm
- Timestamp:
- Aug 9, 2017, 10:14:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generator/pascal.grm
r111 r113 4 4 <Rule> 5 5 <Name>BeginEnd</Name> 6 <Type>0</Type> 6 7 <RuleItems> 7 8 <RuleItem> … … 11 12 <RuleItem> 12 13 <Type>1</Type> 13 <NonTerminal> Command</NonTerminal>14 <NonTerminal>Statement</NonTerminal> 14 15 </RuleItem> 15 16 <RuleItem> … … 21 22 <Rule> 22 23 <Name>IfThenElse</Name> 24 <Type>0</Type> 23 25 <RuleItems> 24 26 <RuleItem> … … 36 38 <RuleItem> 37 39 <Type>1</Type> 38 <NonTerminal> Command</NonTerminal>40 <NonTerminal>Statement</NonTerminal> 39 41 </RuleItem> 40 42 <RuleItem> … … 44 46 <RuleItem> 45 47 <Type>1</Type> 46 <NonTerminal> Command</NonTerminal>48 <NonTerminal>Statement</NonTerminal> 47 49 </RuleItem> 48 50 <RuleItem> … … 54 56 <Rule> 55 57 <Name>WhileDo</Name> 58 <Type>0</Type> 56 59 <RuleItems> 57 60 <RuleItem> … … 69 72 <RuleItem> 70 73 <Type>1</Type> 71 <NonTerminal> Command</NonTerminal>74 <NonTerminal>Statement</NonTerminal> 72 75 </RuleItem> 73 76 </RuleItems> … … 75 78 <Rule> 76 79 <Name>RepeatUntil</Name> 80 <Type>0</Type> 77 81 <RuleItems> 78 82 <RuleItem> … … 82 86 <RuleItem> 83 87 <Type>1</Type> 84 <NonTerminal> Command</NonTerminal>88 <NonTerminal>Statement</NonTerminal> 85 89 </RuleItem> 86 90 <RuleItem> … … 96 100 <Rule> 97 101 <Name>ForToDo</Name> 102 <Type>0</Type> 103 <RuleItems> 104 <RuleItem> 105 <Type>0</Type> 106 <Terminal>for</Terminal> 107 </RuleItem> 108 <RuleItem> 109 <Type>1</Type> 110 <NonTerminal>VariableRef</NonTerminal> 111 </RuleItem> 112 <RuleItem> 113 <Type>0</Type> 114 <Terminal>:=</Terminal> 115 </RuleItem> 116 <RuleItem> 117 <Type>1</Type> 118 <NonTerminal>Expression</NonTerminal> 119 </RuleItem> 120 <RuleItem> 121 <Type>0</Type> 122 <Terminal>to</Terminal> 123 </RuleItem> 124 <RuleItem> 125 <Type>1</Type> 126 <NonTerminal>Expression</NonTerminal> 127 </RuleItem> 128 <RuleItem> 129 <Type>0</Type> 130 <Terminal>do</Terminal> 131 </RuleItem> 132 <RuleItem> 133 <Type>1</Type> 134 <NonTerminal>Statement</NonTerminal> 135 </RuleItem> 136 </RuleItems> 137 </Rule> 138 <Rule> 139 <Name>WithDo</Name> 140 <Type>0</Type> 141 <RuleItems> 142 <RuleItem> 143 <Type>0</Type> 144 <Terminal>with</Terminal> 145 </RuleItem> 146 <RuleItem> 147 <Type>1</Type> 148 <NonTerminal>VariableRef</NonTerminal> 149 </RuleItem> 150 <RuleItem> 151 <Type>0</Type> 152 <Terminal>do</Terminal> 153 </RuleItem> 154 <RuleItem> 155 <Type>1</Type> 156 <NonTerminal>Statement</NonTerminal> 157 </RuleItem> 158 </RuleItems> 159 </Rule> 160 <Rule> 161 <Name>CaseOf</Name> 162 <Type>0</Type> 163 <RuleItems> 164 <RuleItem> 165 <Type>0</Type> 166 <Terminal>case</Terminal> 167 </RuleItem> 168 <RuleItem> 169 <Type>1</Type> 170 <NonTerminal>Expression</NonTerminal> 171 </RuleItem> 172 <RuleItem> 173 <Type>0</Type> 174 <Terminal>of</Terminal> 175 </RuleItem> 176 <RuleItem> 177 <Type>0</Type> 178 <Terminal>end</Terminal> 179 </RuleItem> 180 </RuleItems> 181 </Rule> 182 <Rule> 183 <Name>Assignment</Name> 184 <Type>0</Type> 185 <RuleItems> 186 <RuleItem> 187 <Type>1</Type> 188 <NonTerminal>VariableRef</NonTerminal> 189 </RuleItem> 190 <RuleItem> 191 <Type>0</Type> 192 <Terminal>:=</Terminal> 193 </RuleItem> 194 <RuleItem> 195 <Type>1</Type> 196 <NonTerminal>Expression</NonTerminal> 197 </RuleItem> 198 </RuleItems> 199 </Rule> 200 <Rule> 201 <Name>Statement</Name> 202 <Type>1</Type> 203 <RuleItems> 204 <RuleItem> 205 <Type>1</Type> 206 <NonTerminal>BeginEnd</NonTerminal> 207 </RuleItem> 208 <RuleItem> 209 <Type>1</Type> 210 <NonTerminal>IfThenElse</NonTerminal> 211 </RuleItem> 212 <RuleItem> 213 <Type>1</Type> 214 <NonTerminal>WhileDo</NonTerminal> 215 </RuleItem> 216 <RuleItem> 217 <Type>1</Type> 218 <NonTerminal>RepeatUntil</NonTerminal> 219 </RuleItem> 220 <RuleItem> 221 <Type>1</Type> 222 <NonTerminal>ForToDo</NonTerminal> 223 </RuleItem> 224 <RuleItem> 225 <Type>1</Type> 226 <NonTerminal>WithDo</NonTerminal> 227 </RuleItem> 228 <RuleItem> 229 <Type>1</Type> 230 <NonTerminal>CaseOf</NonTerminal> 231 </RuleItem> 232 <RuleItem> 233 <Type>1</Type> 234 <NonTerminal>Assignment</NonTerminal> 235 </RuleItem> 236 </RuleItems> 237 </Rule> 238 <Rule> 239 <Name>Expression</Name> 240 <Type>0</Type> 98 241 <RuleItems/> 99 242 </Rule> 100 243 <Rule> 101 <Name>WithDo</Name> 244 <Name>VariableRef</Name> 245 <Type>0</Type> 102 246 <RuleItems/> 103 247 </Rule> 104 248 <Rule> 105 <Name>CaseOf</Name> 249 <Name>Program</Name> 250 <Type>0</Type> 251 <RuleItems> 252 <RuleItem> 253 <Type>1</Type> 254 <NonTerminal>BeginEnd</NonTerminal> 255 </RuleItem> 256 <RuleItem> 257 <Type>0</Type> 258 <Terminal>.</Terminal> 259 </RuleItem> 260 </RuleItems> 261 </Rule> 262 <Rule> 263 <Name>Uses</Name> 264 <Type>0</Type> 265 <RuleItems> 266 <RuleItem> 267 <Type>0</Type> 268 <Terminal>uses</Terminal> 269 </RuleItem> 270 <RuleItem> 271 <Type>1</Type> 272 <NonTerminal>UnitName</NonTerminal> 273 </RuleItem> 274 <RuleItem> 275 <Type>0</Type> 276 <Terminal>,</Terminal> 277 </RuleItem> 278 </RuleItems> 279 </Rule> 280 <Rule> 281 <Name>UnitName</Name> 282 <Type>0</Type> 106 283 <RuleItems/> 107 284 </Rule> 108 285 <Rule> 109 <Name>Assignment</Name> 110 <RuleItems> 111 <RuleItem> 112 <Type>1</Type> 113 <NonTerminal>Variable</NonTerminal> 114 </RuleItem> 115 <RuleItem> 116 <Type>0</Type> 117 <Terminal>:=</Terminal> 118 </RuleItem> 119 <RuleItem> 120 <Type>1</Type> 121 <NonTerminal>Expression</NonTerminal> 122 </RuleItem> 123 </RuleItems> 124 </Rule> 125 <Rule> 126 <Name>Command</Name> 286 <Name>Function</Name> 287 <Type>0</Type> 288 <RuleItems> 289 <RuleItem> 290 <Type>0</Type> 291 <Terminal>function</Terminal> 292 </RuleItem> 293 <RuleItem> 294 <Type>1</Type> 295 <NonTerminal>Identifier</NonTerminal> 296 </RuleItem> 297 <RuleItem> 298 <Type>0</Type> 299 <Terminal>;</Terminal> 300 </RuleItem> 301 <RuleItem> 302 <Type>1</Type> 303 <NonTerminal>BeginEnd</NonTerminal> 304 </RuleItem> 305 <RuleItem> 306 <Type>0</Type> 307 <Terminal>;</Terminal> 308 </RuleItem> 309 </RuleItems> 310 </Rule> 311 <Rule> 312 <Name>Identifier</Name> 313 <Type>0</Type> 127 314 <RuleItems/> 128 315 </Rule> 129 316 <Rule> 130 <Name>Expression</Name> 131 <RuleItems/> 132 </Rule> 133 <Rule> 134 <Name>Variable</Name> 135 <RuleItems/> 317 <Name>VarSection</Name> 318 <Type>0</Type> 319 <RuleItems> 320 <RuleItem> 321 <Type>0</Type> 322 <Terminal>var</Terminal> 323 </RuleItem> 324 </RuleItems> 136 325 </Rule> 137 326 </Rules>
Note:
See TracChangeset
for help on using the changeset viewer.