Branch data Line data Source code
1 : : /* do not edit automatically generated by mc from P0SyntaxCheck. */
2 : : /* output from m2.bnf, automatically generated do not edit if these
3 : : are the top two lines in the file.
4 : :
5 : : Copyright (C) 2001-2024 Free Software Foundation, Inc.
6 : : Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
7 : :
8 : : This file is part of GNU Modula-2.
9 : :
10 : : GNU Modula-2 is free software; you can redistribute it and/or modify
11 : : it under the terms of the GNU General Public License as published by
12 : : the Free Software Foundation; either version 3, or (at your option)
13 : : any later version.
14 : :
15 : : GNU Modula-2 is distributed in the hope that it will be useful, but
16 : : WITHOUT ANY WARRANTY; without even the implied warranty of
17 : : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 : : General Public License for more details.
19 : :
20 : : You should have received a copy of the GNU General Public License
21 : : along with GNU Modula-2; see the file COPYING. If not,
22 : : see <https://www.gnu.org/licenses/>. */
23 : :
24 : : #include "config.h"
25 : : #include "system.h"
26 : : #include "gcc-consolidation.h"
27 : :
28 : : #include <stdbool.h>
29 : : # if !defined (PROC_D)
30 : : # define PROC_D
31 : : typedef void (*PROC_t) (void);
32 : : typedef struct { PROC_t proc; } PROC;
33 : : # endif
34 : :
35 : : # if !defined (TRUE)
36 : : # define TRUE (1==1)
37 : : # endif
38 : :
39 : : # if !defined (FALSE)
40 : : # define FALSE (1==0)
41 : : # endif
42 : :
43 : : #define _P0SyntaxCheck_C
44 : :
45 : : #include "GP0SyntaxCheck.h"
46 : : # include "GM2LexBuf.h"
47 : : # include "GM2Quads.h"
48 : : # include "GM2Reserved.h"
49 : : # include "GM2MetaError.h"
50 : : # include "GP2SymBuild.h"
51 : : # include "GNameKey.h"
52 : : # include "GStrLib.h"
53 : : # include "GM2Batch.h"
54 : : # include "GDynamicStrings.h"
55 : : # include "GM2Debug.h"
56 : : # include "GM2Printf.h"
57 : : # include "GP0SymBuild.h"
58 : : # include "GSymbolTable.h"
59 : : # include "GM2Error.h"
60 : :
61 : : # define Debugging false
62 : : # define DebugRecover false
63 : : # define Pass0 true
64 : : # define Pass1 false
65 : : # define Pass2 false
66 : : # define Pass3 false
67 : : # define MaxInsert 10
68 : : typedef unsigned int P0SyntaxCheck_stop0;
69 : :
70 : : typedef unsigned int P0SyntaxCheck_SetOfStop0;
71 : :
72 : : typedef unsigned int P0SyntaxCheck_stop1;
73 : :
74 : : typedef unsigned int P0SyntaxCheck_SetOfStop1;
75 : :
76 : : typedef unsigned int P0SyntaxCheck_stop2;
77 : :
78 : : typedef unsigned int P0SyntaxCheck_SetOfStop2;
79 : :
80 : : static bool EnableImportCheck;
81 : : static bool seenError;
82 : : static NameKey_Name LastIdent;
83 : : static unsigned int InsertCount;
84 : :
85 : : /*
86 : : CompilationUnit - returns TRUE if the input was correct enough to parse
87 : : in future passes.
88 : : */
89 : :
90 : : extern "C" bool P0SyntaxCheck_CompilationUnit (void);
91 : :
92 : : /*
93 : : BlockAssert - wrap an Assert specifically for blocks.
94 : : */
95 : :
96 : : static void BlockAssert (bool value);
97 : :
98 : : /*
99 : : BlockAssert - wrap an Assert specifically for blocks.
100 : : */
101 : :
102 : : static void ErrorString (DynamicStrings_String s);
103 : :
104 : : /*
105 : : BlockAssert - wrap an Assert specifically for blocks.
106 : : */
107 : :
108 : : static void ErrorArray (const char *a_, unsigned int _a_high);
109 : :
110 : : /*
111 : : DescribeStop - issues a message explaining what tokens were expected
112 : : */
113 : :
114 : : static DynamicStrings_String DescribeStop (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
115 : :
116 : : /*
117 : : DescribeError - issues a message explaining what tokens were expected
118 : : */
119 : :
120 : : static void DescribeError (void);
121 : :
122 : : /*
123 : : SyntaxError - after a syntax error we skip all tokens up until we reach
124 : : a stop symbol.
125 : : */
126 : :
127 : : static void SyntaxError (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
128 : :
129 : : /*
130 : : SyntaxCheck -
131 : : */
132 : :
133 : : static void SyntaxCheck (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
134 : :
135 : : /*
136 : : GetMissingTokenMessage - generates and returns a string about a missing token, t.
137 : : */
138 : :
139 : : static DynamicStrings_String GetMissingTokenMessage (M2Reserved_toktype t);
140 : :
141 : : /*
142 : : ErrorMissingToken - generates an error message about a missing token, t.
143 : : */
144 : :
145 : : static void ErrorMissingToken (M2Reserved_toktype t);
146 : :
147 : : /*
148 : : WarnMissingToken - generates a warning message about a missing token, t.
149 : : */
150 : :
151 : : static void WarnMissingToken (M2Reserved_toktype t);
152 : :
153 : : /*
154 : : MissingToken - generates a warning message about a missing token, t.
155 : : */
156 : :
157 : : static void MissingToken (M2Reserved_toktype t);
158 : :
159 : : /*
160 : : CheckInsertCandidate -
161 : : */
162 : :
163 : : static bool CheckInsertCandidate (M2Reserved_toktype t, P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
164 : :
165 : : /*
166 : : InStopSet
167 : : */
168 : :
169 : : static bool InStopSet (M2Reserved_toktype t, P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
170 : :
171 : : /*
172 : : PeepToken - peep token checks to see whether the stopset is satisfied by currenttoken
173 : : If it is not then it will insert a token providing the token
174 : : is one of ; ] ) } . OF END ,
175 : :
176 : : if the stopset contains <identtok> then we do not insert a token
177 : : */
178 : :
179 : : static void PeepToken (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
180 : :
181 : : /*
182 : : DetectImport - checks whether the next token is an import or from and if so
183 : : generates an error message. This is called after an export
184 : : statement to notify the user that the ordering is incorrect.
185 : : */
186 : :
187 : : static void DetectImport (void);
188 : :
189 : : /*
190 : : Expect -
191 : : */
192 : :
193 : : static void Expect (M2Reserved_toktype t, P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
194 : :
195 : : /*
196 : : Ident - error checking varient of Ident
197 : : */
198 : :
199 : : static void Ident (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
200 : :
201 : : /*
202 : : string -
203 : : */
204 : :
205 : : static void string (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
206 : :
207 : : /*
208 : : Integer -
209 : : */
210 : :
211 : : static void Integer (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
212 : :
213 : : /*
214 : : Real -
215 : : */
216 : :
217 : : static void Real (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
218 : :
219 : : /*
220 : : FileUnit :=
221 : : % PushAutoOff %
222 : : ( DefinitionModule |
223 : : ImplementationOrProgramModule )
224 : : % PopAuto %
225 : :
226 : :
227 : : first symbols:implementationtok, moduletok, definitiontok
228 : :
229 : : cannot reachend
230 : : */
231 : :
232 : : static void FileUnit (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
233 : :
234 : : /*
235 : : ProgramModule := 'MODULE'
236 : : % PushAutoOn ; %
237 : :
238 : : % M2Error.DefaultProgramModule %
239 : : Ident
240 : : % RegisterProgramModule ; %
241 : :
242 : : % PushAutoOff ; %
243 : : [ Priority ] ';'
244 : : % PushAutoOn ; %
245 : : { Import
246 : : % RegisterImports %
247 : : }
248 : : % PopAuto %
249 : : Block
250 : : % PopAuto %
251 : : Ident '.'
252 : : % EndModule %
253 : :
254 : : % PopAuto %
255 : :
256 : :
257 : : first symbols:moduletok
258 : :
259 : : cannot reachend
260 : : */
261 : :
262 : : static void ProgramModule (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
263 : :
264 : : /*
265 : : ImplementationModule := 'IMPLEMENTATION'
266 : : % M2Error.DefaultImplementationModule %
267 : : 'MODULE'
268 : : % PushAutoOn ; %
269 : : Ident
270 : : % RegisterImplementationModule ; %
271 : :
272 : : % PushAutoOff ; %
273 : : [ Priority ] ';'
274 : : % PushAutoOn ; %
275 : : { Import
276 : : % RegisterImports %
277 : : }
278 : : % PopAuto %
279 : : Block
280 : : % PopAuto %
281 : : Ident
282 : : % EndModule %
283 : :
284 : : % PopAuto %
285 : : '.'
286 : :
287 : : first symbols:implementationtok
288 : :
289 : : cannot reachend
290 : : */
291 : :
292 : : static void ImplementationModule (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
293 : :
294 : : /*
295 : : ImplementationOrProgramModule := ImplementationModule |
296 : : ProgramModule
297 : :
298 : : first symbols:moduletok, implementationtok
299 : :
300 : : cannot reachend
301 : : */
302 : :
303 : : static void ImplementationOrProgramModule (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
304 : :
305 : : /*
306 : : Number := Integer | Real
307 : :
308 : : first symbols:realtok, integertok
309 : :
310 : : cannot reachend
311 : : */
312 : :
313 : : static void Number (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
314 : :
315 : : /*
316 : : Qualident := Ident { '.' Ident }
317 : :
318 : : first symbols:identtok
319 : :
320 : : cannot reachend
321 : : */
322 : :
323 : : static void Qualident (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
324 : :
325 : : /*
326 : : ConstantDeclaration := Ident '=' ConstExpression
327 : :
328 : : first symbols:identtok
329 : :
330 : : cannot reachend
331 : : */
332 : :
333 : : static void ConstantDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
334 : :
335 : : /*
336 : : ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
337 : :
338 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
339 : :
340 : : cannot reachend
341 : : */
342 : :
343 : : static void ConstExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
344 : :
345 : : /*
346 : : Relation := '=' | '#' | '<>' | '<' | '<=' |
347 : : '>' | '>=' | 'IN'
348 : :
349 : : first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
350 : :
351 : : cannot reachend
352 : : */
353 : :
354 : : static void Relation (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
355 : :
356 : : /*
357 : : SimpleConstExpr := UnaryOrConstTerm { AddOperator
358 : : ConstTerm }
359 : :
360 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
361 : :
362 : : cannot reachend
363 : : */
364 : :
365 : : static void SimpleConstExpr (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
366 : :
367 : : /*
368 : : UnaryOrConstTerm := '+' ConstTerm |
369 : : '-' ConstTerm |
370 : : ConstTerm
371 : :
372 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
373 : :
374 : : cannot reachend
375 : : */
376 : :
377 : : static void UnaryOrConstTerm (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
378 : :
379 : : /*
380 : : AddOperator := '+' | '-' | 'OR'
381 : :
382 : : first symbols:ortok, minustok, plustok
383 : :
384 : : cannot reachend
385 : : */
386 : :
387 : : static void AddOperator (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
388 : :
389 : : /*
390 : : ConstTerm := ConstFactor { MulOperator ConstFactor }
391 : :
392 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok
393 : :
394 : : cannot reachend
395 : : */
396 : :
397 : : static void ConstTerm (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
398 : :
399 : : /*
400 : : MulOperator := '*' | '/' | 'DIV' | 'MOD' |
401 : : 'REM' | 'AND' | '&'
402 : :
403 : : first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
404 : :
405 : : cannot reachend
406 : : */
407 : :
408 : : static void MulOperator (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
409 : :
410 : : /*
411 : : ConstFactor := Number | ConstString |
412 : : ConstSetOrQualidentOrFunction |
413 : : '(' ConstExpression ')' |
414 : : 'NOT' ConstFactor |
415 : : ConstAttribute
416 : :
417 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok
418 : :
419 : : cannot reachend
420 : : */
421 : :
422 : : static void ConstFactor (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
423 : :
424 : : /*
425 : : ConstString := string
426 : :
427 : : first symbols:stringtok
428 : :
429 : : cannot reachend
430 : : */
431 : :
432 : : static void ConstString (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
433 : :
434 : : /*
435 : : ComponentElement := ConstExpression [ '..' ConstExpression ]
436 : :
437 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
438 : :
439 : : cannot reachend
440 : : */
441 : :
442 : : static void ComponentElement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
443 : :
444 : : /*
445 : : ComponentValue := ComponentElement [ 'BY' ConstExpression ]
446 : :
447 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
448 : :
449 : : cannot reachend
450 : : */
451 : :
452 : : static void ComponentValue (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
453 : :
454 : : /*
455 : : ArraySetRecordValue := ComponentValue { ',' ComponentValue }
456 : :
457 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
458 : :
459 : : cannot reachend
460 : : */
461 : :
462 : : static void ArraySetRecordValue (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
463 : :
464 : : /*
465 : : Constructor := '{' [ ArraySetRecordValue ] '}'
466 : :
467 : : first symbols:lcbratok
468 : :
469 : : cannot reachend
470 : : */
471 : :
472 : : static void Constructor (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
473 : :
474 : : /*
475 : : ConstSetOrQualidentOrFunction := Constructor |
476 : : Qualident [ Constructor |
477 : : ConstActualParameters ]
478 : :
479 : : first symbols:identtok, lcbratok
480 : :
481 : : cannot reachend
482 : : */
483 : :
484 : : static void ConstSetOrQualidentOrFunction (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
485 : :
486 : : /*
487 : : ConstActualParameters := '(' [ ExpList ] ')'
488 : :
489 : : first symbols:lparatok
490 : :
491 : : cannot reachend
492 : : */
493 : :
494 : : static void ConstActualParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
495 : :
496 : : /*
497 : : ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
498 : : '(' '(' ConstAttributeExpression
499 : : ')' ')'
500 : :
501 : : first symbols:attributetok
502 : :
503 : : cannot reachend
504 : : */
505 : :
506 : : static void ConstAttribute (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
507 : :
508 : : /*
509 : : ConstAttributeExpression := Ident | '<' Qualident
510 : : ',' Ident '>'
511 : :
512 : : first symbols:lesstok, identtok
513 : :
514 : : cannot reachend
515 : : */
516 : :
517 : : static void ConstAttributeExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
518 : :
519 : : /*
520 : : ByteAlignment := ''
521 : :
522 : : first symbols:ldirectivetok
523 : :
524 : : cannot reachend
525 : : */
526 : :
527 : : static void ByteAlignment (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
528 : :
529 : : /*
530 : : Alignment := [ ByteAlignment ]
531 : :
532 : : first symbols:ldirectivetok
533 : :
534 : : reachend
535 : : */
536 : :
537 : : static void Alignment (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
538 : :
539 : : /*
540 : : TypeDeclaration := Ident '=' Type Alignment
541 : :
542 : : first symbols:identtok
543 : :
544 : : cannot reachend
545 : : */
546 : :
547 : : static void TypeDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
548 : :
549 : : /*
550 : : Type := SimpleType | ArrayType | RecordType |
551 : : SetType | PointerType | ProcedureType
552 : :
553 : : first symbols:lparatok, lsbratok, proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok
554 : :
555 : : cannot reachend
556 : : */
557 : :
558 : : static void Type (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
559 : :
560 : : /*
561 : : SimpleType := Qualident [ SubrangeType ] |
562 : : Enumeration | SubrangeType
563 : :
564 : : first symbols:lsbratok, lparatok, identtok
565 : :
566 : : cannot reachend
567 : : */
568 : :
569 : : static void SimpleType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
570 : :
571 : : /*
572 : : Enumeration := '(' IdentList ')'
573 : :
574 : : first symbols:lparatok
575 : :
576 : : cannot reachend
577 : : */
578 : :
579 : : static void Enumeration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
580 : :
581 : : /*
582 : : IdentList := Ident
583 : : % VAR
584 : : on: BOOLEAN ;
585 : : n : CARDINAL ; %
586 : :
587 : : % on := IsAutoPushOn() ;
588 : : IF on
589 : : THEN
590 : : n := 1
591 : : END %
592 : : { ',' Ident
593 : : % IF on
594 : : THEN
595 : : INC(n)
596 : : END %
597 : : }
598 : : % IF on
599 : : THEN
600 : : PushT(n)
601 : : END %
602 : :
603 : :
604 : : first symbols:identtok
605 : :
606 : : cannot reachend
607 : : */
608 : :
609 : : static void IdentList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
610 : :
611 : : /*
612 : : SubrangeType := '[' ConstExpression '..' ConstExpression
613 : : ']'
614 : :
615 : : first symbols:lsbratok
616 : :
617 : : cannot reachend
618 : : */
619 : :
620 : : static void SubrangeType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
621 : :
622 : : /*
623 : : ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
624 : : 'OF' Type
625 : :
626 : : first symbols:arraytok
627 : :
628 : : cannot reachend
629 : : */
630 : :
631 : : static void ArrayType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
632 : :
633 : : /*
634 : : RecordType := 'RECORD' [ DefaultRecordAttributes ]
635 : : FieldListSequence 'END'
636 : :
637 : : first symbols:recordtok
638 : :
639 : : cannot reachend
640 : : */
641 : :
642 : : static void RecordType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
643 : :
644 : : /*
645 : : DefaultRecordAttributes := ''
646 : :
647 : : first symbols:ldirectivetok
648 : :
649 : : cannot reachend
650 : : */
651 : :
652 : : static void DefaultRecordAttributes (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
653 : :
654 : : /*
655 : : RecordFieldPragma := [ '' ]
656 : :
657 : : first symbols:ldirectivetok
658 : :
659 : : reachend
660 : : */
661 : :
662 : : static void RecordFieldPragma (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
663 : :
664 : : /*
665 : : FieldPragmaExpression := Ident [ '(' ConstExpression
666 : : ')' ]
667 : :
668 : : first symbols:identtok
669 : :
670 : : cannot reachend
671 : : */
672 : :
673 : : static void FieldPragmaExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
674 : :
675 : : /*
676 : : AttributeExpression := Ident '(' ConstExpression
677 : : ')'
678 : :
679 : : first symbols:identtok
680 : :
681 : : cannot reachend
682 : : */
683 : :
684 : : static void AttributeExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
685 : :
686 : : /*
687 : : FieldListSequence := FieldListStatement { ';' FieldListStatement }
688 : :
689 : : first symbols:casetok, identtok, semicolontok
690 : :
691 : : reachend
692 : : */
693 : :
694 : : static void FieldListSequence (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
695 : :
696 : : /*
697 : : FieldListStatement := [ FieldList ]
698 : :
699 : : first symbols:identtok, casetok
700 : :
701 : : reachend
702 : : */
703 : :
704 : : static void FieldListStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
705 : :
706 : : /*
707 : : FieldList := IdentList ':' Type RecordFieldPragma |
708 : : 'CASE' CaseTag 'OF' Varient { '|' Varient }
709 : : [ 'ELSE' FieldListSequence ] 'END'
710 : :
711 : : first symbols:casetok, identtok
712 : :
713 : : cannot reachend
714 : : */
715 : :
716 : : static void FieldList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
717 : :
718 : : /*
719 : : TagIdent := [ Ident ]
720 : :
721 : : first symbols:identtok
722 : :
723 : : reachend
724 : : */
725 : :
726 : : static void TagIdent (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
727 : :
728 : : /*
729 : : CaseTag := TagIdent [ ':' Qualident ]
730 : :
731 : : first symbols:colontok, identtok
732 : :
733 : : reachend
734 : : */
735 : :
736 : : static void CaseTag (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
737 : :
738 : : /*
739 : : Varient := [ VarientCaseLabelList ':' FieldListSequence ]
740 : :
741 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
742 : :
743 : : reachend
744 : : */
745 : :
746 : : static void Varient (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
747 : :
748 : : /*
749 : : VarientCaseLabelList := VarientCaseLabels { ','
750 : : VarientCaseLabels }
751 : :
752 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
753 : :
754 : : cannot reachend
755 : : */
756 : :
757 : : static void VarientCaseLabelList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
758 : :
759 : : /*
760 : : VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
761 : :
762 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
763 : :
764 : : cannot reachend
765 : : */
766 : :
767 : : static void VarientCaseLabels (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
768 : :
769 : : /*
770 : : CaseLabelList := CaseLabels { ',' CaseLabels }
771 : :
772 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
773 : :
774 : : cannot reachend
775 : : */
776 : :
777 : : static void CaseLabelList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
778 : :
779 : : /*
780 : : CaseLabels := ConstExpression [ '..' ConstExpression ]
781 : :
782 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
783 : :
784 : : cannot reachend
785 : : */
786 : :
787 : : static void CaseLabels (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
788 : :
789 : : /*
790 : : SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
791 : :
792 : : first symbols:oftok, packedsettok, settok
793 : :
794 : : cannot reachend
795 : : */
796 : :
797 : : static void SetType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
798 : :
799 : : /*
800 : : PointerType := 'POINTER' 'TO' Type
801 : :
802 : : first symbols:pointertok
803 : :
804 : : cannot reachend
805 : : */
806 : :
807 : : static void PointerType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
808 : :
809 : : /*
810 : : ProcedureType := 'PROCEDURE' [ FormalTypeList ]
811 : :
812 : : first symbols:proceduretok
813 : :
814 : : cannot reachend
815 : : */
816 : :
817 : : static void ProcedureType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
818 : :
819 : : /*
820 : : FormalTypeList := '(' ( ')' FormalReturn |
821 : : ProcedureParameters ')'
822 : : FormalReturn )
823 : :
824 : : first symbols:lparatok
825 : :
826 : : cannot reachend
827 : : */
828 : :
829 : : static void FormalTypeList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
830 : :
831 : : /*
832 : : FormalReturn := [ ':' OptReturnType ]
833 : :
834 : : first symbols:colontok
835 : :
836 : : reachend
837 : : */
838 : :
839 : : static void FormalReturn (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
840 : :
841 : : /*
842 : : OptReturnType := '[' Qualident ']' |
843 : : Qualident
844 : :
845 : : first symbols:identtok, lsbratok
846 : :
847 : : cannot reachend
848 : : */
849 : :
850 : : static void OptReturnType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
851 : :
852 : : /*
853 : : ProcedureParameters := ProcedureParameter { ','
854 : : ProcedureParameter }
855 : :
856 : : first symbols:identtok, arraytok, periodperiodperiodtok, vartok
857 : :
858 : : cannot reachend
859 : : */
860 : :
861 : : static void ProcedureParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
862 : :
863 : : /*
864 : : ProcedureParameter := '...' | 'VAR' FormalType |
865 : : FormalType
866 : :
867 : : first symbols:arraytok, identtok, vartok, periodperiodperiodtok
868 : :
869 : : cannot reachend
870 : : */
871 : :
872 : : static void ProcedureParameter (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
873 : :
874 : : /*
875 : : VarIdent := Ident [ '[' ConstExpression ']' ]
876 : :
877 : : first symbols:identtok
878 : :
879 : : cannot reachend
880 : : */
881 : :
882 : : static void VarIdent (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
883 : :
884 : : /*
885 : : VariableDeclaration := VarIdentList ':' Type Alignment
886 : :
887 : : first symbols:identtok
888 : :
889 : : cannot reachend
890 : : */
891 : :
892 : : static void VariableDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
893 : :
894 : : /*
895 : : VarIdentList := VarIdent
896 : : % VAR
897 : : on: BOOLEAN ;
898 : : n : CARDINAL ; %
899 : :
900 : : % on := IsAutoPushOn() ;
901 : : IF on
902 : : THEN
903 : : n := 1
904 : : END %
905 : : { ',' VarIdent
906 : : % IF on
907 : : THEN
908 : : INC(n)
909 : : END %
910 : : }
911 : : % IF on
912 : : THEN
913 : : PushT(n)
914 : : END %
915 : :
916 : :
917 : : first symbols:identtok
918 : :
919 : : cannot reachend
920 : : */
921 : :
922 : : static void VarIdentList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
923 : :
924 : : /*
925 : : Designator := Qualident { SubDesignator }
926 : :
927 : : first symbols:identtok
928 : :
929 : : cannot reachend
930 : : */
931 : :
932 : : static void Designator (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
933 : :
934 : : /*
935 : : SubDesignator := '.' Ident | '[' ExpList ']' |
936 : : '^'
937 : :
938 : : first symbols:uparrowtok, lsbratok, periodtok
939 : :
940 : : cannot reachend
941 : : */
942 : :
943 : : static void SubDesignator (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
944 : :
945 : : /*
946 : : ExpList := Expression { ',' Expression }
947 : :
948 : : first symbols:identtok, lcbratok, attributetok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
949 : :
950 : : cannot reachend
951 : : */
952 : :
953 : : static void ExpList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
954 : :
955 : : /*
956 : : Expression := SimpleExpression [ Relation SimpleExpression ]
957 : :
958 : : first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, attributetok, plustok, minustok
959 : :
960 : : cannot reachend
961 : : */
962 : :
963 : : static void Expression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
964 : :
965 : : /*
966 : : SimpleExpression := [ '+' | '-' ] Term { AddOperator
967 : : Term }
968 : :
969 : : first symbols:identtok, lcbratok, attributetok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
970 : :
971 : : cannot reachend
972 : : */
973 : :
974 : : static void SimpleExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
975 : :
976 : : /*
977 : : Term := Factor { MulOperator Factor }
978 : :
979 : : first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, attributetok
980 : :
981 : : cannot reachend
982 : : */
983 : :
984 : : static void Term (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
985 : :
986 : : /*
987 : : Factor := Number | string | SetOrDesignatorOrFunction |
988 : : '(' Expression ')' |
989 : : 'NOT' Factor | ConstAttribute
990 : :
991 : : first symbols:identtok, lcbratok, attributetok, nottok, lparatok, stringtok, integertok, realtok
992 : :
993 : : cannot reachend
994 : : */
995 : :
996 : : static void Factor (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
997 : :
998 : : /*
999 : : SetOrDesignatorOrFunction := ( Qualident [ Constructor |
1000 : : SimpleDes
1001 : : [ ActualParameters ] ] |
1002 : : Constructor )
1003 : :
1004 : : first symbols:lcbratok, identtok
1005 : :
1006 : : cannot reachend
1007 : : */
1008 : :
1009 : : static void SetOrDesignatorOrFunction (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1010 : :
1011 : : /*
1012 : : SimpleDes := { '.' Ident | '[' ExpList ']' |
1013 : : '^' }
1014 : :
1015 : : first symbols:uparrowtok, lsbratok, periodtok
1016 : :
1017 : : reachend
1018 : : */
1019 : :
1020 : : static void SimpleDes (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1021 : :
1022 : : /*
1023 : : ActualParameters := '(' [ ExpList ] ')'
1024 : :
1025 : : first symbols:lparatok
1026 : :
1027 : : cannot reachend
1028 : : */
1029 : :
1030 : : static void ActualParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1031 : :
1032 : : /*
1033 : : Statement := [ AssignmentOrProcedureCall |
1034 : : IfStatement | CaseStatement |
1035 : : WhileStatement |
1036 : : RepeatStatement |
1037 : : LoopStatement | ForStatement |
1038 : : WithStatement | AsmStatement |
1039 : : 'EXIT' | 'RETURN' [ Expression ] |
1040 : : RetryStatement ]
1041 : :
1042 : : first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
1043 : :
1044 : : reachend
1045 : : */
1046 : :
1047 : : static void Statement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1048 : :
1049 : : /*
1050 : : RetryStatement := 'RETRY'
1051 : :
1052 : : first symbols:retrytok
1053 : :
1054 : : cannot reachend
1055 : : */
1056 : :
1057 : : static void RetryStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1058 : :
1059 : : /*
1060 : : AssignmentOrProcedureCall := Designator ( ':=' Expression |
1061 : : ActualParameters |
1062 : :
1063 : : % epsilon %
1064 : : )
1065 : :
1066 : : first symbols:identtok
1067 : :
1068 : : cannot reachend
1069 : : */
1070 : :
1071 : : static void AssignmentOrProcedureCall (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1072 : :
1073 : : /*
1074 : : StatementSequence := Statement { ';' Statement }
1075 : :
1076 : : first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
1077 : :
1078 : : reachend
1079 : : */
1080 : :
1081 : : static void StatementSequence (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1082 : :
1083 : : /*
1084 : : IfStatement := 'IF' Expression 'THEN' StatementSequence
1085 : : { 'ELSIF' Expression 'THEN' StatementSequence }
1086 : : [ 'ELSE' StatementSequence ] 'END'
1087 : :
1088 : : first symbols:iftok
1089 : :
1090 : : cannot reachend
1091 : : */
1092 : :
1093 : : static void IfStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1094 : :
1095 : : /*
1096 : : CaseStatement := 'CASE' Expression 'OF' Case { '|'
1097 : : Case }
1098 : : [ 'ELSE' StatementSequence ] 'END'
1099 : :
1100 : : first symbols:casetok
1101 : :
1102 : : cannot reachend
1103 : : */
1104 : :
1105 : : static void CaseStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1106 : :
1107 : : /*
1108 : : Case := [ CaseLabelList ':' StatementSequence ]
1109 : :
1110 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
1111 : :
1112 : : reachend
1113 : : */
1114 : :
1115 : : static void Case (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1116 : :
1117 : : /*
1118 : : WhileStatement := 'WHILE' Expression 'DO' StatementSequence
1119 : : 'END'
1120 : :
1121 : : first symbols:whiletok
1122 : :
1123 : : cannot reachend
1124 : : */
1125 : :
1126 : : static void WhileStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1127 : :
1128 : : /*
1129 : : RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
1130 : : Expression
1131 : :
1132 : : first symbols:repeattok
1133 : :
1134 : : cannot reachend
1135 : : */
1136 : :
1137 : : static void RepeatStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1138 : :
1139 : : /*
1140 : : ForStatement := 'FOR' Ident ':=' Expression 'TO'
1141 : : Expression [ 'BY' ConstExpression ]
1142 : : 'DO' StatementSequence 'END'
1143 : :
1144 : : first symbols:fortok
1145 : :
1146 : : cannot reachend
1147 : : */
1148 : :
1149 : : static void ForStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1150 : :
1151 : : /*
1152 : : LoopStatement := 'LOOP' StatementSequence 'END'
1153 : :
1154 : : first symbols:looptok
1155 : :
1156 : : cannot reachend
1157 : : */
1158 : :
1159 : : static void LoopStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1160 : :
1161 : : /*
1162 : : WithStatement := 'WITH' Designator 'DO' StatementSequence
1163 : : 'END'
1164 : :
1165 : : first symbols:withtok
1166 : :
1167 : : cannot reachend
1168 : : */
1169 : :
1170 : : static void WithStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1171 : :
1172 : : /*
1173 : : ProcedureDeclaration :=
1174 : : % VAR top: CARDINAL ; %
1175 : :
1176 : : % top := Top () %
1177 : : ProcedureHeading ';' PostProcedureHeading
1178 : :
1179 : : % BlockAssert (top = Top ()) %
1180 : :
1181 : :
1182 : : first symbols:proceduretok
1183 : :
1184 : : cannot reachend
1185 : : */
1186 : :
1187 : : static void ProcedureDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1188 : :
1189 : : /*
1190 : : PostProcedureHeading := ProperProcedure |
1191 : : ForwardDeclaration
1192 : :
1193 : : first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok, forwardtok
1194 : :
1195 : : cannot reachend
1196 : : */
1197 : :
1198 : : static void PostProcedureHeading (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1199 : :
1200 : : /*
1201 : : ForwardDeclaration := 'FORWARD'
1202 : : % EndForward %
1203 : :
1204 : :
1205 : : first symbols:forwardtok
1206 : :
1207 : : cannot reachend
1208 : : */
1209 : :
1210 : : static void ForwardDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1211 : :
1212 : : /*
1213 : : ProperProcedure := ProcedureBlock
1214 : : % PushAutoOn %
1215 : : Ident
1216 : : % EndProcedure %
1217 : :
1218 : : % PopAuto %
1219 : :
1220 : :
1221 : : first symbols:moduletok, proceduretok, vartok, typetok, consttok, begintok, endtok
1222 : :
1223 : : cannot reachend
1224 : : */
1225 : :
1226 : : static void ProperProcedure (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1227 : :
1228 : : /*
1229 : : DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
1230 : : '(' '(' Ident ')' ')' |
1231 : : '__INLINE__' ]
1232 : :
1233 : : first symbols:inlinetok, attributetok
1234 : :
1235 : : reachend
1236 : : */
1237 : :
1238 : : static void DefineBuiltinProcedure (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1239 : :
1240 : : /*
1241 : : ProcedureHeading := 'PROCEDURE'
1242 : : % M2Error.DefaultProcedure %
1243 : : DefineBuiltinProcedure (
1244 : : % PushAutoOn %
1245 : : Ident
1246 : :
1247 : : % RegisterProcedure %
1248 : :
1249 : : % PopAuto %
1250 : : [ FormalParameters ]
1251 : : AttributeNoReturn )
1252 : :
1253 : : first symbols:proceduretok
1254 : :
1255 : : cannot reachend
1256 : : */
1257 : :
1258 : : static void ProcedureHeading (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1259 : :
1260 : : /*
1261 : : AttributeNoReturn := [ '' ]
1262 : :
1263 : : first symbols:ldirectivetok
1264 : :
1265 : : reachend
1266 : : */
1267 : :
1268 : : static void AttributeNoReturn (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1269 : :
1270 : : /*
1271 : : AttributeUnused := [ '' ]
1272 : :
1273 : : first symbols:ldirectivetok
1274 : :
1275 : : reachend
1276 : : */
1277 : :
1278 : : static void AttributeUnused (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1279 : :
1280 : : /*
1281 : : Builtin := [ '__BUILTIN__'
1282 : : % PutModuleContainsBuiltin %
1283 : : | '__INLINE__' ]
1284 : :
1285 : : first symbols:inlinetok, builtintok
1286 : :
1287 : : reachend
1288 : : */
1289 : :
1290 : : static void Builtin (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1291 : :
1292 : : /*
1293 : : DefProcedureHeading := 'PROCEDURE'
1294 : : % M2Error.DefaultProcedure %
1295 : : Builtin ( Ident [ DefFormalParameters ]
1296 : : AttributeNoReturn )
1297 : :
1298 : : % M2Error.LeaveErrorScope %
1299 : :
1300 : :
1301 : : first symbols:proceduretok
1302 : :
1303 : : cannot reachend
1304 : : */
1305 : :
1306 : : static void DefProcedureHeading (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1307 : :
1308 : : /*
1309 : : ProcedureBlock := { Declaration } [ 'BEGIN' BlockBody ]
1310 : : 'END'
1311 : :
1312 : : first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
1313 : :
1314 : : cannot reachend
1315 : : */
1316 : :
1317 : : static void ProcedureBlock (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1318 : :
1319 : : /*
1320 : : Block := { Declaration } InitialBlock FinalBlock
1321 : : 'END'
1322 : :
1323 : : first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
1324 : :
1325 : : cannot reachend
1326 : : */
1327 : :
1328 : : static void Block (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1329 : :
1330 : : /*
1331 : : InitialBlock := [ 'BEGIN' BlockBody ]
1332 : :
1333 : : first symbols:begintok
1334 : :
1335 : : reachend
1336 : : */
1337 : :
1338 : : static void InitialBlock (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1339 : :
1340 : : /*
1341 : : FinalBlock := [ 'FINALLY' BlockBody ]
1342 : :
1343 : : first symbols:finallytok
1344 : :
1345 : : reachend
1346 : : */
1347 : :
1348 : : static void FinalBlock (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1349 : :
1350 : : /*
1351 : : BlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
1352 : :
1353 : : first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
1354 : :
1355 : : reachend
1356 : : */
1357 : :
1358 : : static void BlockBody (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1359 : :
1360 : : /*
1361 : : NormalPart := StatementSequence
1362 : :
1363 : : first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
1364 : :
1365 : : reachend
1366 : : */
1367 : :
1368 : : static void NormalPart (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1369 : :
1370 : : /*
1371 : : ExceptionalPart := StatementSequence
1372 : :
1373 : : first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
1374 : :
1375 : : reachend
1376 : : */
1377 : :
1378 : : static void ExceptionalPart (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1379 : :
1380 : : /*
1381 : : Declaration := 'CONST' { ConstantDeclaration ';' } |
1382 : : 'TYPE' { TypeDeclaration ';' } |
1383 : : 'VAR' { VariableDeclaration ';' } |
1384 : : ProcedureDeclaration ';' |
1385 : : ModuleDeclaration ';'
1386 : :
1387 : : first symbols:moduletok, proceduretok, vartok, typetok, consttok
1388 : :
1389 : : cannot reachend
1390 : : */
1391 : :
1392 : : static void Declaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1393 : :
1394 : : /*
1395 : : DefFormalParameters := '(' [ DefMultiFPSection ]
1396 : : ')' FormalReturn
1397 : :
1398 : : first symbols:lparatok
1399 : :
1400 : : cannot reachend
1401 : : */
1402 : :
1403 : : static void DefFormalParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1404 : :
1405 : : /*
1406 : : DefMultiFPSection := DefExtendedFP |
1407 : : FPSection [ ';' DefMultiFPSection ]
1408 : :
1409 : : first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
1410 : :
1411 : : cannot reachend
1412 : : */
1413 : :
1414 : : static void DefMultiFPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1415 : :
1416 : : /*
1417 : : FormalParameters := '(' [ MultiFPSection ] ')'
1418 : : FormalReturn
1419 : :
1420 : : first symbols:lparatok
1421 : :
1422 : : cannot reachend
1423 : : */
1424 : :
1425 : : static void FormalParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1426 : :
1427 : : /*
1428 : : MultiFPSection := ExtendedFP | FPSection [ ';'
1429 : : MultiFPSection ]
1430 : :
1431 : : first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
1432 : :
1433 : : cannot reachend
1434 : : */
1435 : :
1436 : : static void MultiFPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1437 : :
1438 : : /*
1439 : : FPSection := NonVarFPSection |
1440 : : VarFPSection
1441 : :
1442 : : first symbols:vartok, identtok
1443 : :
1444 : : cannot reachend
1445 : : */
1446 : :
1447 : : static void FPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1448 : :
1449 : : /*
1450 : : DefExtendedFP := DefOptArg | '...'
1451 : :
1452 : : first symbols:lsbratok, periodperiodperiodtok
1453 : :
1454 : : cannot reachend
1455 : : */
1456 : :
1457 : : static void DefExtendedFP (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1458 : :
1459 : : /*
1460 : : ExtendedFP := OptArg | '...'
1461 : :
1462 : : first symbols:lsbratok, periodperiodperiodtok
1463 : :
1464 : : cannot reachend
1465 : : */
1466 : :
1467 : : static void ExtendedFP (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1468 : :
1469 : : /*
1470 : : VarFPSection := 'VAR' IdentList ':' FormalType [
1471 : : AttributeUnused ]
1472 : :
1473 : : first symbols:vartok
1474 : :
1475 : : cannot reachend
1476 : : */
1477 : :
1478 : : static void VarFPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1479 : :
1480 : : /*
1481 : : NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
1482 : :
1483 : : first symbols:identtok
1484 : :
1485 : : cannot reachend
1486 : : */
1487 : :
1488 : : static void NonVarFPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1489 : :
1490 : : /*
1491 : : OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
1492 : : ']'
1493 : :
1494 : : first symbols:lsbratok
1495 : :
1496 : : cannot reachend
1497 : : */
1498 : :
1499 : : static void OptArg (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1500 : :
1501 : : /*
1502 : : DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
1503 : : ']'
1504 : :
1505 : : first symbols:lsbratok
1506 : :
1507 : : cannot reachend
1508 : : */
1509 : :
1510 : : static void DefOptArg (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1511 : :
1512 : : /*
1513 : : FormalType := { 'ARRAY' 'OF' } Qualident
1514 : :
1515 : : first symbols:identtok, arraytok
1516 : :
1517 : : cannot reachend
1518 : : */
1519 : :
1520 : : static void FormalType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1521 : :
1522 : : /*
1523 : : ModuleDeclaration := 'MODULE'
1524 : : % PushAutoOn %
1525 : :
1526 : : % M2Error.DefaultInnerModule %
1527 : : Ident
1528 : : % RegisterInnerModule %
1529 : :
1530 : : % PushAutoOff %
1531 : : [ Priority ] ';'
1532 : : % PushAutoOn %
1533 : : { Import
1534 : : % RegisterInnerImports %
1535 : : }
1536 : : % PopAuto %
1537 : : [ Export ] Block
1538 : : % PopAuto %
1539 : : Ident
1540 : : % EndModule %
1541 : :
1542 : : % PopAuto %
1543 : :
1544 : :
1545 : : first symbols:moduletok
1546 : :
1547 : : cannot reachend
1548 : : */
1549 : :
1550 : : static void ModuleDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1551 : :
1552 : : /*
1553 : : Priority := '[' ConstExpression ']'
1554 : :
1555 : : first symbols:lsbratok
1556 : :
1557 : : cannot reachend
1558 : : */
1559 : :
1560 : : static void Priority (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1561 : :
1562 : : /*
1563 : : Export := 'EXPORT' ( 'QUALIFIED' IdentList |
1564 : : 'UNQUALIFIED' IdentList |
1565 : : IdentList )
1566 : : % EnableImportCheck := TRUE %
1567 : : ';'
1568 : : % EnableImportCheck := FALSE %
1569 : :
1570 : :
1571 : : first symbols:exporttok
1572 : :
1573 : : cannot reachend
1574 : : */
1575 : :
1576 : : static void Export (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1577 : :
1578 : : /*
1579 : : Import := 'FROM' Ident 'IMPORT' IdentList ';' |
1580 : : 'IMPORT'
1581 : : % PushTtok (ImportTok, GetTokenNo () -1)
1582 : : determines whether Ident or Module %
1583 : : IdentList ';'
1584 : :
1585 : : first symbols:importtok, fromtok
1586 : :
1587 : : cannot reachend
1588 : : */
1589 : :
1590 : : static void Import (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1591 : :
1592 : : /*
1593 : : DefinitionModule :=
1594 : : % VAR forC: BOOLEAN ; %
1595 : :
1596 : : % forC := FALSE %
1597 : : 'DEFINITION'
1598 : : % M2Error.DefaultDefinitionModule %
1599 : : 'MODULE' [ 'FOR' string
1600 : : % forC := TRUE %
1601 : : ]
1602 : : % PushAutoOn %
1603 : : Ident
1604 : : % RegisterDefinitionModule (forC) %
1605 : : ';' { Import
1606 : : % RegisterImports %
1607 : : }
1608 : : % PushAutoOff %
1609 : : [ Export ] { Definition }
1610 : :
1611 : : % PopAuto %
1612 : : 'END' Ident
1613 : : % EndModule %
1614 : : '.'
1615 : : % PopAuto %
1616 : :
1617 : :
1618 : : first symbols:definitiontok
1619 : :
1620 : : cannot reachend
1621 : : */
1622 : :
1623 : : static void DefinitionModule (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1624 : :
1625 : : /*
1626 : : Definition := 'CONST' { ConstantDeclaration ';' } |
1627 : : 'TYPE' { Ident ( ';'
1628 : : % PutHiddenTypeDeclared %
1629 : : | '=' Type Alignment
1630 : : ';' ) } |
1631 : : 'VAR' { VariableDeclaration ';' } |
1632 : : DefProcedureHeading ';'
1633 : :
1634 : : first symbols:proceduretok, vartok, typetok, consttok
1635 : :
1636 : : cannot reachend
1637 : : */
1638 : :
1639 : : static void Definition (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1640 : :
1641 : : /*
1642 : : AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
1643 : : ')'
1644 : :
1645 : : first symbols:asmtok
1646 : :
1647 : : cannot reachend
1648 : : */
1649 : :
1650 : : static void AsmStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1651 : :
1652 : : /*
1653 : : NamedOperand := '[' Ident ']'
1654 : :
1655 : : first symbols:lsbratok
1656 : :
1657 : : cannot reachend
1658 : : */
1659 : :
1660 : : static void NamedOperand (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1661 : :
1662 : : /*
1663 : : AsmOperandName := [ NamedOperand ]
1664 : :
1665 : : first symbols:lsbratok
1666 : :
1667 : : reachend
1668 : : */
1669 : :
1670 : : static void AsmOperandName (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1671 : :
1672 : : /*
1673 : : AsmOperands := ConstExpression [ ':' AsmList [ ':'
1674 : : AsmList
1675 : : [
1676 : : ':' TrashList ] ] ]
1677 : :
1678 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
1679 : :
1680 : : cannot reachend
1681 : : */
1682 : :
1683 : : static void AsmOperands (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1684 : :
1685 : : /*
1686 : : AsmList := [ AsmElement ] { ',' AsmElement }
1687 : :
1688 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok, lsbratok, commatok
1689 : :
1690 : : reachend
1691 : : */
1692 : :
1693 : : static void AsmList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1694 : :
1695 : : /*
1696 : : AsmElement := AsmOperandName ConstExpression '('
1697 : : Expression ')'
1698 : :
1699 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok, lsbratok
1700 : :
1701 : : cannot reachend
1702 : : */
1703 : :
1704 : : static void AsmElement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1705 : :
1706 : : /*
1707 : : TrashList := [ ConstExpression ] { ',' ConstExpression }
1708 : :
1709 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok, commatok
1710 : :
1711 : : reachend
1712 : : */
1713 : :
1714 : : static void TrashList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2);
1715 : :
1716 : :
1717 : : /*
1718 : : BlockAssert - wrap an Assert specifically for blocks.
1719 : : */
1720 : :
1721 : 945279 : static void BlockAssert (bool value)
1722 : : {
1723 : 0 : M2Debug_Assert (value);
1724 : 0 : }
1725 : :
1726 : :
1727 : : /*
1728 : : BlockAssert - wrap an Assert specifically for blocks.
1729 : : */
1730 : :
1731 : 114 : static void ErrorString (DynamicStrings_String s)
1732 : : {
1733 : 114 : M2MetaError_MetaErrorStringT0 (M2LexBuf_GetTokenNo (), s);
1734 : 108 : seenError = true;
1735 : 108 : }
1736 : :
1737 : :
1738 : : /*
1739 : : BlockAssert - wrap an Assert specifically for blocks.
1740 : : */
1741 : :
1742 : 42 : static void ErrorArray (const char *a_, unsigned int _a_high)
1743 : : {
1744 : 42 : char a[_a_high+1];
1745 : :
1746 : : /* make a local copy of each unbounded array. */
1747 : 42 : memcpy (a, a_, _a_high+1);
1748 : :
1749 : 42 : ErrorString (DynamicStrings_InitString ((const char *) a, _a_high));
1750 : 42 : }
1751 : :
1752 : :
1753 : : /*
1754 : : DescribeStop - issues a message explaining what tokens were expected
1755 : : */
1756 : :
1757 : 186 : static DynamicStrings_String DescribeStop (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
1758 : : {
1759 : 186 : unsigned int n;
1760 : 186 : DynamicStrings_String str;
1761 : 186 : DynamicStrings_String message;
1762 : :
1763 : 186 : n = 0;
1764 : 186 : message = DynamicStrings_InitString ((const char *) "", 0);
1765 : 186 : if ((((1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1766 : : {
1767 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%Kstring}", 10)));
1768 : 0 : n += 1;
1769 : : }
1770 : 186 : if ((((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1771 : : {
1772 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%Kreal number}", 15)));
1773 : 0 : n += 1;
1774 : : }
1775 : 186 : if ((((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1776 : : {
1777 : 42 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%Kidentifier}", 14)));
1778 : 42 : n += 1;
1779 : : }
1780 : 186 : if ((((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1781 : : {
1782 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%Kinteger number}", 18)));
1783 : 0 : n += 1;
1784 : : }
1785 : 186 : if ((((1 << (M2Reserved_inlinetok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1786 : : {
1787 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K__INLINE__}", 14)));
1788 : 0 : n += 1;
1789 : : }
1790 : 186 : if ((((1 << (M2Reserved_builtintok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1791 : : {
1792 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K__BUILTIN__}", 15)));
1793 : 0 : n += 1;
1794 : : }
1795 : 186 : if ((((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1796 : : {
1797 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K__ATTRIBUTE__}", 17)));
1798 : 0 : n += 1;
1799 : : }
1800 : 186 : if ((((1 << (M2Reserved_filetok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1801 : : {
1802 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K__FILE__}", 12)));
1803 : 0 : n += 1;
1804 : : }
1805 : 186 : if ((((1 << (M2Reserved_linetok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1806 : : {
1807 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K__LINE__}", 12)));
1808 : 0 : n += 1;
1809 : : }
1810 : 186 : if ((((1 << (M2Reserved_datetok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1811 : : {
1812 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K__DATE__}", 12)));
1813 : 0 : n += 1;
1814 : : }
1815 : 186 : if ((((1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1816 : : {
1817 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K...}", 7)));
1818 : 0 : n += 1;
1819 : : }
1820 : 186 : if ((((1 << (M2Reserved_volatiletok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1821 : : {
1822 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KVOLATILE}", 12)));
1823 : 0 : n += 1;
1824 : : }
1825 : 186 : if ((((1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1826 : : {
1827 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KASM}", 7)));
1828 : 0 : n += 1;
1829 : : }
1830 : 186 : if ((((1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1831 : : {
1832 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KWITH}", 8)));
1833 : 0 : n += 1;
1834 : : }
1835 : 186 : if ((((1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1836 : : {
1837 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KWHILE}", 9)));
1838 : 0 : n += 1;
1839 : : }
1840 : 186 : if ((((1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1841 : : {
1842 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KVAR}", 7)));
1843 : 0 : n += 1;
1844 : : }
1845 : 186 : if ((((1 << (M2Reserved_untiltok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1846 : : {
1847 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KUNTIL}", 9)));
1848 : 0 : n += 1;
1849 : : }
1850 : 186 : if ((((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1851 : : {
1852 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KTYPE}", 8)));
1853 : 0 : n += 1;
1854 : : }
1855 : 186 : if ((((1 << (M2Reserved_totok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1856 : : {
1857 : 6 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KTO}", 6)));
1858 : 6 : n += 1;
1859 : : }
1860 : 186 : if ((((1 << (M2Reserved_thentok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1861 : : {
1862 : 6 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KTHEN}", 8)));
1863 : 6 : n += 1;
1864 : : }
1865 : 186 : if ((((1 << (M2Reserved_settok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1866 : : {
1867 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KSET}", 7)));
1868 : 0 : n += 1;
1869 : : }
1870 : 186 : if ((((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1871 : : {
1872 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KRETURN}", 10)));
1873 : 0 : n += 1;
1874 : : }
1875 : 186 : if ((((1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1876 : : {
1877 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KRETRY}", 9)));
1878 : 0 : n += 1;
1879 : : }
1880 : 186 : if ((((1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1881 : : {
1882 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KREPEAT}", 10)));
1883 : 0 : n += 1;
1884 : : }
1885 : 186 : if ((((1 << (M2Reserved_remtok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1886 : : {
1887 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KREM}", 7)));
1888 : 0 : n += 1;
1889 : : }
1890 : 186 : if ((((1 << (M2Reserved_recordtok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1891 : : {
1892 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KRECORD}", 10)));
1893 : 0 : n += 1;
1894 : : }
1895 : 186 : if ((((1 << (M2Reserved_unqualifiedtok-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))
1896 : : {
1897 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KUNQUALIFIED}", 15)));
1898 : 0 : n += 1;
1899 : : }
1900 : 186 : if ((((1 << (M2Reserved_qualifiedtok-M2Reserved_arraytok)) & (stopset1)) != 0))
1901 : : {
1902 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KQUALIFIED}", 13)));
1903 : 0 : n += 1;
1904 : : }
1905 : 186 : if ((((1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) & (stopset1)) != 0))
1906 : : {
1907 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KPROCEDURE}", 13)));
1908 : 0 : n += 1;
1909 : : }
1910 : 186 : if ((((1 << (M2Reserved_pointertok-M2Reserved_arraytok)) & (stopset1)) != 0))
1911 : : {
1912 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KPOINTER}", 11)));
1913 : 0 : n += 1;
1914 : : }
1915 : 186 : if ((((1 << (M2Reserved_packedsettok-M2Reserved_arraytok)) & (stopset1)) != 0))
1916 : : {
1917 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KPACKEDSET}", 13)));
1918 : 0 : n += 1;
1919 : : }
1920 : 186 : if ((((1 << (M2Reserved_ortok-M2Reserved_arraytok)) & (stopset1)) != 0))
1921 : : {
1922 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KOR}", 6)));
1923 : 0 : n += 1;
1924 : : }
1925 : 186 : if ((((1 << (M2Reserved_oftok-M2Reserved_arraytok)) & (stopset1)) != 0))
1926 : : {
1927 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KOF}", 6)));
1928 : 0 : n += 1;
1929 : : }
1930 : 186 : if ((((1 << (M2Reserved_nottok-M2Reserved_arraytok)) & (stopset1)) != 0))
1931 : : {
1932 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KNOT}", 7)));
1933 : 0 : n += 1;
1934 : : }
1935 : 186 : if ((((1 << (M2Reserved_moduletok-M2Reserved_arraytok)) & (stopset1)) != 0))
1936 : : {
1937 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KMODULE}", 10)));
1938 : 0 : n += 1;
1939 : : }
1940 : 186 : if ((((1 << (M2Reserved_modtok-M2Reserved_arraytok)) & (stopset1)) != 0))
1941 : : {
1942 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KMOD}", 7)));
1943 : 0 : n += 1;
1944 : : }
1945 : 186 : if ((((1 << (M2Reserved_looptok-M2Reserved_arraytok)) & (stopset1)) != 0))
1946 : : {
1947 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KLOOP}", 8)));
1948 : 0 : n += 1;
1949 : : }
1950 : 186 : if ((((1 << (M2Reserved_intok-M2Reserved_arraytok)) & (stopset1)) != 0))
1951 : : {
1952 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KIN}", 6)));
1953 : 0 : n += 1;
1954 : : }
1955 : 186 : if ((((1 << (M2Reserved_importtok-M2Reserved_arraytok)) & (stopset1)) != 0))
1956 : : {
1957 : 6 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KIMPORT}", 10)));
1958 : 6 : n += 1;
1959 : : }
1960 : 186 : if ((((1 << (M2Reserved_implementationtok-M2Reserved_arraytok)) & (stopset1)) != 0))
1961 : : {
1962 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KIMPLEMENTATION}", 18)));
1963 : 0 : n += 1;
1964 : : }
1965 : 186 : if ((((1 << (M2Reserved_iftok-M2Reserved_arraytok)) & (stopset1)) != 0))
1966 : : {
1967 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KIF}", 6)));
1968 : 0 : n += 1;
1969 : : }
1970 : 186 : if ((((1 << (M2Reserved_fromtok-M2Reserved_arraytok)) & (stopset1)) != 0))
1971 : : {
1972 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KFROM}", 8)));
1973 : 0 : n += 1;
1974 : : }
1975 : 186 : if ((((1 << (M2Reserved_forwardtok-M2Reserved_arraytok)) & (stopset1)) != 0))
1976 : : {
1977 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KFORWARD}", 11)));
1978 : 0 : n += 1;
1979 : : }
1980 : 186 : if ((((1 << (M2Reserved_fortok-M2Reserved_arraytok)) & (stopset1)) != 0))
1981 : : {
1982 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KFOR}", 7)));
1983 : 0 : n += 1;
1984 : : }
1985 : 186 : if ((((1 << (M2Reserved_finallytok-M2Reserved_arraytok)) & (stopset1)) != 0))
1986 : : {
1987 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KFINALLY}", 11)));
1988 : 0 : n += 1;
1989 : : }
1990 : 186 : if ((((1 << (M2Reserved_exporttok-M2Reserved_arraytok)) & (stopset1)) != 0))
1991 : : {
1992 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KEXPORT}", 10)));
1993 : 0 : n += 1;
1994 : : }
1995 : 186 : if ((((1 << (M2Reserved_exittok-M2Reserved_arraytok)) & (stopset1)) != 0))
1996 : : {
1997 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KEXIT}", 8)));
1998 : 0 : n += 1;
1999 : : }
2000 : 186 : if ((((1 << (M2Reserved_excepttok-M2Reserved_arraytok)) & (stopset1)) != 0))
2001 : : {
2002 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KEXCEPT}", 10)));
2003 : 0 : n += 1;
2004 : : }
2005 : 186 : if ((((1 << (M2Reserved_endtok-M2Reserved_arraytok)) & (stopset1)) != 0))
2006 : : {
2007 : 30 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KEND}", 7)));
2008 : 30 : n += 1;
2009 : : }
2010 : 186 : if ((((1 << (M2Reserved_elsiftok-M2Reserved_arraytok)) & (stopset1)) != 0))
2011 : : {
2012 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KELSIF}", 9)));
2013 : 0 : n += 1;
2014 : : }
2015 : 186 : if ((((1 << (M2Reserved_elsetok-M2Reserved_arraytok)) & (stopset1)) != 0))
2016 : : {
2017 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KELSE}", 8)));
2018 : 0 : n += 1;
2019 : : }
2020 : 186 : if ((((1 << (M2Reserved_dotok-M2Reserved_arraytok)) & (stopset1)) != 0))
2021 : : {
2022 : 6 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KDO}", 6)));
2023 : 6 : n += 1;
2024 : : }
2025 : 186 : if ((((1 << (M2Reserved_divtok-M2Reserved_arraytok)) & (stopset1)) != 0))
2026 : : {
2027 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KDIV}", 7)));
2028 : 0 : n += 1;
2029 : : }
2030 : 186 : if ((((1 << (M2Reserved_definitiontok-M2Reserved_arraytok)) & (stopset1)) != 0))
2031 : : {
2032 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KDEFINITION}", 14)));
2033 : 0 : n += 1;
2034 : : }
2035 : 186 : if ((((1 << (M2Reserved_consttok-M2Reserved_arraytok)) & (stopset1)) != 0))
2036 : : {
2037 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KCONST}", 9)));
2038 : 0 : n += 1;
2039 : : }
2040 : 186 : if ((((1 << (M2Reserved_casetok-M2Reserved_arraytok)) & (stopset1)) != 0))
2041 : : {
2042 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KCASE}", 8)));
2043 : 0 : n += 1;
2044 : : }
2045 : 186 : if ((((1 << (M2Reserved_bytok-M2Reserved_arraytok)) & (stopset1)) != 0))
2046 : : {
2047 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KBY}", 6)));
2048 : 0 : n += 1;
2049 : : }
2050 : 186 : if ((((1 << (M2Reserved_begintok-M2Reserved_arraytok)) & (stopset1)) != 0))
2051 : : {
2052 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KBEGIN}", 9)));
2053 : 0 : n += 1;
2054 : : }
2055 : 186 : if ((((1 << (M2Reserved_arraytok-M2Reserved_arraytok)) & (stopset1)) != 0))
2056 : : {
2057 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KARRAY}", 9)));
2058 : 0 : n += 1;
2059 : : }
2060 : 186 : if ((((1 << (M2Reserved_andtok-M2Reserved_eoftok)) & (stopset0)) != 0))
2061 : : {
2062 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%KAND}", 7)));
2063 : 0 : n += 1;
2064 : : }
2065 : 186 : if ((((1 << (M2Reserved_colontok-M2Reserved_eoftok)) & (stopset0)) != 0))
2066 : : {
2067 : 12 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K:}", 5)));
2068 : 12 : n += 1;
2069 : : }
2070 : 186 : if ((((1 << (M2Reserved_periodperiodtok-M2Reserved_eoftok)) & (stopset0)) != 0))
2071 : : {
2072 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K..}", 6)));
2073 : 0 : n += 1;
2074 : : }
2075 : 186 : if ((((1 << (M2Reserved_rdirectivetok-M2Reserved_eoftok)) & (stopset0)) != 0))
2076 : : {
2077 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K*>}", 6)));
2078 : 0 : n += 1;
2079 : : }
2080 : 186 : if ((((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok)) & (stopset0)) != 0))
2081 : : {
2082 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K<*}", 6)));
2083 : 0 : n += 1;
2084 : : }
2085 : 186 : if ((((1 << (M2Reserved_greaterequaltok-M2Reserved_eoftok)) & (stopset0)) != 0))
2086 : : {
2087 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K>=}", 6)));
2088 : 0 : n += 1;
2089 : : }
2090 : 186 : if ((((1 << (M2Reserved_lessequaltok-M2Reserved_eoftok)) & (stopset0)) != 0))
2091 : : {
2092 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K<=}", 6)));
2093 : 0 : n += 1;
2094 : : }
2095 : 186 : if ((((1 << (M2Reserved_lessgreatertok-M2Reserved_eoftok)) & (stopset0)) != 0))
2096 : : {
2097 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K<>}", 6)));
2098 : 0 : n += 1;
2099 : : }
2100 : 186 : if ((((1 << (M2Reserved_hashtok-M2Reserved_eoftok)) & (stopset0)) != 0))
2101 : : {
2102 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K#}", 5)));
2103 : 0 : n += 1;
2104 : : }
2105 : 186 : if ((((1 << (M2Reserved_equaltok-M2Reserved_eoftok)) & (stopset0)) != 0))
2106 : : {
2107 : 12 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K=}", 5)));
2108 : 12 : n += 1;
2109 : : }
2110 : 186 : if ((((1 << (M2Reserved_uparrowtok-M2Reserved_eoftok)) & (stopset0)) != 0))
2111 : : {
2112 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K^}", 5)));
2113 : 0 : n += 1;
2114 : : }
2115 : 186 : if ((((1 << (M2Reserved_semicolontok-M2Reserved_eoftok)) & (stopset0)) != 0))
2116 : : {
2117 : 36 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K;}", 5)));
2118 : 36 : n += 1;
2119 : : }
2120 : 186 : if ((((1 << (M2Reserved_commatok-M2Reserved_eoftok)) & (stopset0)) != 0))
2121 : : {
2122 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K,}", 5)));
2123 : 0 : n += 1;
2124 : : }
2125 : 186 : if ((((1 << (M2Reserved_periodtok-M2Reserved_eoftok)) & (stopset0)) != 0))
2126 : : {
2127 : 24 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K.}", 5)));
2128 : 24 : n += 1;
2129 : : }
2130 : 186 : if ((((1 << (M2Reserved_ambersandtok-M2Reserved_eoftok)) & (stopset0)) != 0))
2131 : : {
2132 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K&}", 5)));
2133 : 0 : n += 1;
2134 : : }
2135 : 186 : if ((((1 << (M2Reserved_dividetok-M2Reserved_eoftok)) & (stopset0)) != 0))
2136 : : {
2137 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K/}", 5)));
2138 : 0 : n += 1;
2139 : : }
2140 : 186 : if ((((1 << (M2Reserved_timestok-M2Reserved_eoftok)) & (stopset0)) != 0))
2141 : : {
2142 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K*}", 5)));
2143 : 0 : n += 1;
2144 : : }
2145 : 186 : if ((((1 << (M2Reserved_minustok-M2Reserved_eoftok)) & (stopset0)) != 0))
2146 : : {
2147 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K-}", 5)));
2148 : 0 : n += 1;
2149 : : }
2150 : 186 : if ((((1 << (M2Reserved_plustok-M2Reserved_eoftok)) & (stopset0)) != 0))
2151 : : {
2152 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K+}", 5)));
2153 : 0 : n += 1;
2154 : : }
2155 : 186 : if ((((1 << (M2Reserved_doublequotestok-M2Reserved_eoftok)) & (stopset0)) != 0))
2156 : : {
2157 : 0 : message = DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (message, ' '), '`'), '"'), '\''), ',');
2158 : 0 : n += 1;
2159 : : }
2160 : 186 : if ((((1 << (M2Reserved_singlequotetok-M2Reserved_eoftok)) & (stopset0)) != 0))
2161 : : {
2162 : 0 : message = DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (message, ' '), '"'), '\''), '"'), ',');
2163 : 0 : n += 1;
2164 : : }
2165 : 186 : if ((((1 << (M2Reserved_greatertok-M2Reserved_eoftok)) & (stopset0)) != 0))
2166 : : {
2167 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K>}", 5)));
2168 : 0 : n += 1;
2169 : : }
2170 : 186 : if ((((1 << (M2Reserved_lesstok-M2Reserved_eoftok)) & (stopset0)) != 0))
2171 : : {
2172 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K<}", 5)));
2173 : 0 : n += 1;
2174 : : }
2175 : 186 : if ((((1 << (M2Reserved_rparatok-M2Reserved_eoftok)) & (stopset0)) != 0))
2176 : : {
2177 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K)}", 5)));
2178 : 0 : n += 1;
2179 : : }
2180 : 186 : if ((((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) & (stopset0)) != 0))
2181 : : {
2182 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K(}", 5)));
2183 : 0 : n += 1;
2184 : : }
2185 : 186 : if ((((1 << (M2Reserved_rcbratok-M2Reserved_eoftok)) & (stopset0)) != 0))
2186 : : {
2187 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K%}}", 6)));
2188 : 0 : n += 1;
2189 : : }
2190 : 186 : if ((((1 << (M2Reserved_lcbratok-M2Reserved_eoftok)) & (stopset0)) != 0))
2191 : : {
2192 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K%{}", 6)));
2193 : 0 : n += 1;
2194 : : }
2195 : 186 : if ((((1 << (M2Reserved_rsbratok-M2Reserved_eoftok)) & (stopset0)) != 0))
2196 : : {
2197 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K]}", 5)));
2198 : 0 : n += 1;
2199 : : }
2200 : 186 : if ((((1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) & (stopset0)) != 0))
2201 : : {
2202 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K[}", 5)));
2203 : 0 : n += 1;
2204 : : }
2205 : 186 : if ((((1 << (M2Reserved_bartok-M2Reserved_eoftok)) & (stopset0)) != 0))
2206 : : {
2207 : 0 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K|}", 5)));
2208 : 0 : n += 1;
2209 : : }
2210 : 186 : if ((((1 << (M2Reserved_becomestok-M2Reserved_eoftok)) & (stopset0)) != 0))
2211 : : {
2212 : 6 : message = DynamicStrings_ConCat (DynamicStrings_ConCatChar (message, ' '), DynamicStrings_Mark (DynamicStrings_InitString ((const char *) "{%K:=}", 6)));
2213 : 6 : n += 1;
2214 : : }
2215 : 186 : if ((((1 << (M2Reserved_eoftok-M2Reserved_eoftok)) & (stopset0)) != 0))
2216 : : {} /* empty. */
2217 : : /* eoftok has no token name (needed to generate error messages) */
2218 : 186 : if (n == 0)
2219 : : {
2220 : 0 : str = DynamicStrings_InitString ((const char *) " syntax error", 13);
2221 : 0 : message = DynamicStrings_KillString (message);
2222 : : }
2223 : 186 : else if (n == 1)
2224 : : {
2225 : : /* avoid dangling else. */
2226 : 186 : str = DynamicStrings_ConCat (message, DynamicStrings_Mark (DynamicStrings_InitString ((const char *) " missing ", 9)));
2227 : : }
2228 : : else
2229 : : {
2230 : : /* avoid dangling else. */
2231 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) " expecting one of", 17), message);
2232 : 0 : message = DynamicStrings_KillString (message);
2233 : : }
2234 : 186 : return str;
2235 : : /* static analysis guarentees a RETURN statement will be used before here. */
2236 : : __builtin_unreachable ();
2237 : : }
2238 : :
2239 : :
2240 : : /*
2241 : : DescribeError - issues a message explaining what tokens were expected
2242 : : */
2243 : :
2244 : 72 : static void DescribeError (void)
2245 : : {
2246 : 72 : DynamicStrings_String str;
2247 : :
2248 : 72 : str = DynamicStrings_InitString ((const char *) "", 0);
2249 : 72 : switch (M2LexBuf_currenttoken)
2250 : : {
2251 : 12 : case M2Reserved_stringtok:
2252 : 12 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%Kstring}", 30), DynamicStrings_Mark (str));
2253 : 12 : break;
2254 : :
2255 : 0 : case M2Reserved_realtok:
2256 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%Kreal number}", 35), DynamicStrings_Mark (str));
2257 : 0 : break;
2258 : :
2259 : 0 : case M2Reserved_identtok:
2260 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%Kidentifier}", 34), DynamicStrings_Mark (str));
2261 : 0 : break;
2262 : :
2263 : 0 : case M2Reserved_integertok:
2264 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%Kinteger number}", 38), DynamicStrings_Mark (str));
2265 : 0 : break;
2266 : :
2267 : 0 : case M2Reserved_inlinetok:
2268 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K__INLINE__}", 34), DynamicStrings_Mark (str));
2269 : 0 : break;
2270 : :
2271 : 0 : case M2Reserved_builtintok:
2272 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K__BUILTIN__}", 35), DynamicStrings_Mark (str));
2273 : 0 : break;
2274 : :
2275 : 0 : case M2Reserved_attributetok:
2276 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K__ATTRIBUTE__}", 37), DynamicStrings_Mark (str));
2277 : 0 : break;
2278 : :
2279 : 0 : case M2Reserved_filetok:
2280 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K__FILE__}", 32), DynamicStrings_Mark (str));
2281 : 0 : break;
2282 : :
2283 : 0 : case M2Reserved_linetok:
2284 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K__LINE__}", 32), DynamicStrings_Mark (str));
2285 : 0 : break;
2286 : :
2287 : 0 : case M2Reserved_datetok:
2288 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K__DATE__}", 32), DynamicStrings_Mark (str));
2289 : 0 : break;
2290 : :
2291 : 0 : case M2Reserved_periodperiodperiodtok:
2292 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K...}", 27), DynamicStrings_Mark (str));
2293 : 0 : break;
2294 : :
2295 : 0 : case M2Reserved_volatiletok:
2296 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KVOLATILE}", 32), DynamicStrings_Mark (str));
2297 : 0 : break;
2298 : :
2299 : 0 : case M2Reserved_asmtok:
2300 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KASM}", 27), DynamicStrings_Mark (str));
2301 : 0 : break;
2302 : :
2303 : 0 : case M2Reserved_withtok:
2304 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KWITH}", 28), DynamicStrings_Mark (str));
2305 : 0 : break;
2306 : :
2307 : 0 : case M2Reserved_whiletok:
2308 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KWHILE}", 29), DynamicStrings_Mark (str));
2309 : 0 : break;
2310 : :
2311 : 0 : case M2Reserved_vartok:
2312 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KVAR}", 27), DynamicStrings_Mark (str));
2313 : 0 : break;
2314 : :
2315 : 0 : case M2Reserved_untiltok:
2316 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KUNTIL}", 29), DynamicStrings_Mark (str));
2317 : 0 : break;
2318 : :
2319 : 0 : case M2Reserved_typetok:
2320 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KTYPE}", 28), DynamicStrings_Mark (str));
2321 : 0 : break;
2322 : :
2323 : 0 : case M2Reserved_totok:
2324 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KTO}", 26), DynamicStrings_Mark (str));
2325 : 0 : break;
2326 : :
2327 : 6 : case M2Reserved_thentok:
2328 : 6 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KTHEN}", 28), DynamicStrings_Mark (str));
2329 : 6 : break;
2330 : :
2331 : 0 : case M2Reserved_settok:
2332 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KSET}", 27), DynamicStrings_Mark (str));
2333 : 0 : break;
2334 : :
2335 : 0 : case M2Reserved_returntok:
2336 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KRETURN}", 30), DynamicStrings_Mark (str));
2337 : 0 : break;
2338 : :
2339 : 0 : case M2Reserved_retrytok:
2340 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KRETRY}", 29), DynamicStrings_Mark (str));
2341 : 0 : break;
2342 : :
2343 : 0 : case M2Reserved_repeattok:
2344 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KREPEAT}", 30), DynamicStrings_Mark (str));
2345 : 0 : break;
2346 : :
2347 : 0 : case M2Reserved_remtok:
2348 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KREM}", 27), DynamicStrings_Mark (str));
2349 : 0 : break;
2350 : :
2351 : 0 : case M2Reserved_recordtok:
2352 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KRECORD}", 30), DynamicStrings_Mark (str));
2353 : 0 : break;
2354 : :
2355 : 0 : case M2Reserved_unqualifiedtok:
2356 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KUNQUALIFIED}", 35), DynamicStrings_Mark (str));
2357 : 0 : break;
2358 : :
2359 : 0 : case M2Reserved_qualifiedtok:
2360 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KQUALIFIED}", 33), DynamicStrings_Mark (str));
2361 : 0 : break;
2362 : :
2363 : 0 : case M2Reserved_proceduretok:
2364 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KPROCEDURE}", 33), DynamicStrings_Mark (str));
2365 : 0 : break;
2366 : :
2367 : 0 : case M2Reserved_pointertok:
2368 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KPOINTER}", 31), DynamicStrings_Mark (str));
2369 : 0 : break;
2370 : :
2371 : 0 : case M2Reserved_packedsettok:
2372 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KPACKEDSET}", 33), DynamicStrings_Mark (str));
2373 : 0 : break;
2374 : :
2375 : 0 : case M2Reserved_ortok:
2376 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KOR}", 26), DynamicStrings_Mark (str));
2377 : 0 : break;
2378 : :
2379 : 6 : case M2Reserved_oftok:
2380 : 6 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KOF}", 26), DynamicStrings_Mark (str));
2381 : 6 : break;
2382 : :
2383 : 0 : case M2Reserved_nottok:
2384 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KNOT}", 27), DynamicStrings_Mark (str));
2385 : 0 : break;
2386 : :
2387 : 0 : case M2Reserved_moduletok:
2388 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KMODULE}", 30), DynamicStrings_Mark (str));
2389 : 0 : break;
2390 : :
2391 : 0 : case M2Reserved_modtok:
2392 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KMOD}", 27), DynamicStrings_Mark (str));
2393 : 0 : break;
2394 : :
2395 : 0 : case M2Reserved_looptok:
2396 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KLOOP}", 28), DynamicStrings_Mark (str));
2397 : 0 : break;
2398 : :
2399 : 0 : case M2Reserved_intok:
2400 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KIN}", 26), DynamicStrings_Mark (str));
2401 : 0 : break;
2402 : :
2403 : 0 : case M2Reserved_importtok:
2404 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KIMPORT}", 30), DynamicStrings_Mark (str));
2405 : 0 : break;
2406 : :
2407 : 0 : case M2Reserved_implementationtok:
2408 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KIMPLEMENTATION}", 38), DynamicStrings_Mark (str));
2409 : 0 : break;
2410 : :
2411 : 0 : case M2Reserved_iftok:
2412 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KIF}", 26), DynamicStrings_Mark (str));
2413 : 0 : break;
2414 : :
2415 : 0 : case M2Reserved_fromtok:
2416 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KFROM}", 28), DynamicStrings_Mark (str));
2417 : 0 : break;
2418 : :
2419 : 0 : case M2Reserved_forwardtok:
2420 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KFORWARD}", 31), DynamicStrings_Mark (str));
2421 : 0 : break;
2422 : :
2423 : 0 : case M2Reserved_fortok:
2424 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KFOR}", 27), DynamicStrings_Mark (str));
2425 : 0 : break;
2426 : :
2427 : 0 : case M2Reserved_finallytok:
2428 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KFINALLY}", 31), DynamicStrings_Mark (str));
2429 : 0 : break;
2430 : :
2431 : 6 : case M2Reserved_exporttok:
2432 : 6 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KEXPORT}", 30), DynamicStrings_Mark (str));
2433 : 6 : break;
2434 : :
2435 : 0 : case M2Reserved_exittok:
2436 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KEXIT}", 28), DynamicStrings_Mark (str));
2437 : 0 : break;
2438 : :
2439 : 6 : case M2Reserved_excepttok:
2440 : 6 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KEXCEPT}", 30), DynamicStrings_Mark (str));
2441 : 6 : break;
2442 : :
2443 : 0 : case M2Reserved_endtok:
2444 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KEND}", 27), DynamicStrings_Mark (str));
2445 : 0 : break;
2446 : :
2447 : 0 : case M2Reserved_elsiftok:
2448 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KELSIF}", 29), DynamicStrings_Mark (str));
2449 : 0 : break;
2450 : :
2451 : 0 : case M2Reserved_elsetok:
2452 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KELSE}", 28), DynamicStrings_Mark (str));
2453 : 0 : break;
2454 : :
2455 : 6 : case M2Reserved_dotok:
2456 : 6 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KDO}", 26), DynamicStrings_Mark (str));
2457 : 6 : break;
2458 : :
2459 : 0 : case M2Reserved_divtok:
2460 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KDIV}", 27), DynamicStrings_Mark (str));
2461 : 0 : break;
2462 : :
2463 : 0 : case M2Reserved_definitiontok:
2464 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KDEFINITION}", 34), DynamicStrings_Mark (str));
2465 : 0 : break;
2466 : :
2467 : 0 : case M2Reserved_consttok:
2468 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KCONST}", 29), DynamicStrings_Mark (str));
2469 : 0 : break;
2470 : :
2471 : 0 : case M2Reserved_casetok:
2472 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KCASE}", 28), DynamicStrings_Mark (str));
2473 : 0 : break;
2474 : :
2475 : 0 : case M2Reserved_bytok:
2476 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KBY}", 26), DynamicStrings_Mark (str));
2477 : 0 : break;
2478 : :
2479 : 0 : case M2Reserved_begintok:
2480 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KBEGIN}", 29), DynamicStrings_Mark (str));
2481 : 0 : break;
2482 : :
2483 : 0 : case M2Reserved_arraytok:
2484 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KARRAY}", 29), DynamicStrings_Mark (str));
2485 : 0 : break;
2486 : :
2487 : 0 : case M2Reserved_andtok:
2488 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%KAND}", 27), DynamicStrings_Mark (str));
2489 : 0 : break;
2490 : :
2491 : 6 : case M2Reserved_colontok:
2492 : 6 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K:}", 25), DynamicStrings_Mark (str));
2493 : 6 : break;
2494 : :
2495 : 0 : case M2Reserved_periodperiodtok:
2496 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K..}", 26), DynamicStrings_Mark (str));
2497 : 0 : break;
2498 : :
2499 : 0 : case M2Reserved_rdirectivetok:
2500 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K*>}", 26), DynamicStrings_Mark (str));
2501 : 0 : break;
2502 : :
2503 : 0 : case M2Reserved_ldirectivetok:
2504 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K<*}", 26), DynamicStrings_Mark (str));
2505 : 0 : break;
2506 : :
2507 : 0 : case M2Reserved_greaterequaltok:
2508 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K>=}", 26), DynamicStrings_Mark (str));
2509 : 0 : break;
2510 : :
2511 : 0 : case M2Reserved_lessequaltok:
2512 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K<=}", 26), DynamicStrings_Mark (str));
2513 : 0 : break;
2514 : :
2515 : 0 : case M2Reserved_lessgreatertok:
2516 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K<>}", 26), DynamicStrings_Mark (str));
2517 : 0 : break;
2518 : :
2519 : 0 : case M2Reserved_hashtok:
2520 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K#}", 25), DynamicStrings_Mark (str));
2521 : 0 : break;
2522 : :
2523 : 12 : case M2Reserved_equaltok:
2524 : 12 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K=}", 25), DynamicStrings_Mark (str));
2525 : 12 : break;
2526 : :
2527 : 0 : case M2Reserved_uparrowtok:
2528 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K^}", 25), DynamicStrings_Mark (str));
2529 : 0 : break;
2530 : :
2531 : 6 : case M2Reserved_semicolontok:
2532 : 6 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K;}", 25), DynamicStrings_Mark (str));
2533 : 6 : break;
2534 : :
2535 : 0 : case M2Reserved_commatok:
2536 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K,}", 25), DynamicStrings_Mark (str));
2537 : 0 : break;
2538 : :
2539 : 0 : case M2Reserved_periodtok:
2540 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K.}", 25), DynamicStrings_Mark (str));
2541 : 0 : break;
2542 : :
2543 : 0 : case M2Reserved_ambersandtok:
2544 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K&}", 25), DynamicStrings_Mark (str));
2545 : 0 : break;
2546 : :
2547 : 0 : case M2Reserved_dividetok:
2548 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K/}", 25), DynamicStrings_Mark (str));
2549 : 0 : break;
2550 : :
2551 : 6 : case M2Reserved_timestok:
2552 : 6 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K*}", 25), DynamicStrings_Mark (str));
2553 : 6 : break;
2554 : :
2555 : 0 : case M2Reserved_minustok:
2556 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K-}", 25), DynamicStrings_Mark (str));
2557 : 0 : break;
2558 : :
2559 : 0 : case M2Reserved_plustok:
2560 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K+}", 25), DynamicStrings_Mark (str));
2561 : 0 : break;
2562 : :
2563 : 0 : case M2Reserved_doublequotestok:
2564 : 0 : str = DynamicStrings_ConCat (DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (DynamicStrings_InitString ((const char *) "syntax error, found '", 21), '"'), '\''), DynamicStrings_Mark (str));
2565 : 0 : break;
2566 : :
2567 : 0 : case M2Reserved_singlequotetok:
2568 : 0 : str = DynamicStrings_ConCat (DynamicStrings_ConCatChar (DynamicStrings_ConCatChar (DynamicStrings_InitString ((const char *) "syntax error, found \"", 21), '\''), '"'), DynamicStrings_Mark (str));
2569 : 0 : break;
2570 : :
2571 : 0 : case M2Reserved_greatertok:
2572 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K>}", 25), DynamicStrings_Mark (str));
2573 : 0 : break;
2574 : :
2575 : 0 : case M2Reserved_lesstok:
2576 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K<}", 25), DynamicStrings_Mark (str));
2577 : 0 : break;
2578 : :
2579 : 0 : case M2Reserved_rparatok:
2580 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K)}", 25), DynamicStrings_Mark (str));
2581 : 0 : break;
2582 : :
2583 : 0 : case M2Reserved_lparatok:
2584 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K(}", 25), DynamicStrings_Mark (str));
2585 : 0 : break;
2586 : :
2587 : 0 : case M2Reserved_rcbratok:
2588 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K%}}", 26), DynamicStrings_Mark (str));
2589 : 0 : break;
2590 : :
2591 : 0 : case M2Reserved_lcbratok:
2592 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K%{}", 26), DynamicStrings_Mark (str));
2593 : 0 : break;
2594 : :
2595 : 0 : case M2Reserved_rsbratok:
2596 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K]}", 25), DynamicStrings_Mark (str));
2597 : 0 : break;
2598 : :
2599 : 0 : case M2Reserved_lsbratok:
2600 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K[}", 25), DynamicStrings_Mark (str));
2601 : 0 : break;
2602 : :
2603 : 0 : case M2Reserved_bartok:
2604 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K|}", 25), DynamicStrings_Mark (str));
2605 : 0 : break;
2606 : :
2607 : 0 : case M2Reserved_becomestok:
2608 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K:=}", 26), DynamicStrings_Mark (str));
2609 : 0 : break;
2610 : :
2611 : 0 : case M2Reserved_eoftok:
2612 : 0 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error, found {%K}", 24), DynamicStrings_Mark (str));
2613 : 0 : break;
2614 : :
2615 : :
2616 : : default:
2617 : : break;
2618 : : }
2619 : 72 : ErrorString (str);
2620 : 72 : }
2621 : :
2622 : :
2623 : : /*
2624 : : SyntaxError - after a syntax error we skip all tokens up until we reach
2625 : : a stop symbol.
2626 : : */
2627 : :
2628 : 72 : static void SyntaxError (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2629 : : {
2630 : 72 : DescribeError ();
2631 : 72 : if (Debugging)
2632 : : {
2633 : : M2Printf_printf0 ((const char *) "\\nskipping token *** ", 21);
2634 : : }
2635 : : /* --fixme-- this assumes a 32 bit word size. */
2636 : 258 : while (! (((( ((unsigned int) (M2LexBuf_currenttoken)) < 32) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & (stopset0)) != 0))) || ((( ((unsigned int) (M2LexBuf_currenttoken)) >= 32) && ( ((unsigned int) (M2LexBuf_currenttoken)) < 64)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & (stopset1)) != 0)))) || (( ((unsigned int) (M2LexBuf_currenttoken)) >= 64) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & (stopset2)) != 0)))))
2637 : : {
2638 : 114 : M2LexBuf_GetToken ();
2639 : : }
2640 : 72 : if (Debugging)
2641 : : {
2642 : : M2Printf_printf0 ((const char *) " ***\\n", 6);
2643 : : }
2644 : 72 : }
2645 : :
2646 : :
2647 : : /*
2648 : : SyntaxCheck -
2649 : : */
2650 : :
2651 : 106598927 : static void SyntaxCheck (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2652 : : {
2653 : : /* --fixme-- this assumes a 32 bit word size. */
2654 : 106598927 : if (! (((( ((unsigned int) (M2LexBuf_currenttoken)) < 32) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & (stopset0)) != 0))) || ((( ((unsigned int) (M2LexBuf_currenttoken)) >= 32) && ( ((unsigned int) (M2LexBuf_currenttoken)) < 64)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & (stopset1)) != 0)))) || (( ((unsigned int) (M2LexBuf_currenttoken)) >= 64) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & (stopset2)) != 0)))))
2655 : : {
2656 : 72 : SyntaxError (stopset0, stopset1, stopset2);
2657 : : }
2658 : 106598927 : }
2659 : :
2660 : :
2661 : : /*
2662 : : GetMissingTokenMessage - generates and returns a string about a missing token, t.
2663 : : */
2664 : :
2665 : 186 : static DynamicStrings_String GetMissingTokenMessage (M2Reserved_toktype t)
2666 : : {
2667 : 186 : P0SyntaxCheck_SetOfStop0 s0;
2668 : 186 : P0SyntaxCheck_SetOfStop1 s1;
2669 : 186 : P0SyntaxCheck_SetOfStop2 s2;
2670 : 186 : DynamicStrings_String str;
2671 : :
2672 : 186 : s0 = (P0SyntaxCheck_SetOfStop0) 0;
2673 : 186 : s1 = (P0SyntaxCheck_SetOfStop1) 0;
2674 : 186 : s2 = (P0SyntaxCheck_SetOfStop2) 0;
2675 : 186 : if ( ((unsigned int) (t)) < 32)
2676 : : {
2677 : 90 : s0 = (P0SyntaxCheck_SetOfStop0) ((1 << (t-M2Reserved_eoftok)));
2678 : : }
2679 : 96 : else if ( ((unsigned int) (t)) < 64)
2680 : : {
2681 : : /* avoid dangling else. */
2682 : 42 : s1 = (P0SyntaxCheck_SetOfStop1) ((1 << (t-M2Reserved_arraytok)));
2683 : : }
2684 : : else
2685 : : {
2686 : : /* avoid dangling else. */
2687 : 54 : s2 = (P0SyntaxCheck_SetOfStop2) ((1 << (t-M2Reserved_unqualifiedtok)));
2688 : : }
2689 : 186 : str = DescribeStop (s0, s1, s2);
2690 : 186 : return str;
2691 : : /* static analysis guarentees a RETURN statement will be used before here. */
2692 : : __builtin_unreachable ();
2693 : : }
2694 : :
2695 : :
2696 : : /*
2697 : : ErrorMissingToken - generates an error message about a missing token, t.
2698 : : */
2699 : :
2700 : 42 : static void ErrorMissingToken (M2Reserved_toktype t)
2701 : : {
2702 : 42 : DynamicStrings_String str;
2703 : :
2704 : 42 : str = GetMissingTokenMessage (t);
2705 : 42 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "syntax error,", 13), DynamicStrings_Mark (str));
2706 : 42 : M2MetaError_MetaErrorStringT0 (M2LexBuf_GetTokenNo (), str);
2707 : 42 : }
2708 : :
2709 : :
2710 : : /*
2711 : : WarnMissingToken - generates a warning message about a missing token, t.
2712 : : */
2713 : :
2714 : 144 : static void WarnMissingToken (M2Reserved_toktype t)
2715 : : {
2716 : 144 : DynamicStrings_String str;
2717 : :
2718 : 144 : str = GetMissingTokenMessage (t);
2719 : 144 : str = DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "{%W}syntax warning,", 19), DynamicStrings_Mark (str));
2720 : 144 : M2MetaError_MetaErrorStringT0 (M2LexBuf_GetTokenNo (), str);
2721 : 144 : if (DebugRecover)
2722 : : {
2723 : : M2Printf_printf0 ((const char *) "warning note created\\n", 22);
2724 : : }
2725 : 144 : }
2726 : :
2727 : :
2728 : : /*
2729 : : MissingToken - generates a warning message about a missing token, t.
2730 : : */
2731 : :
2732 : 162 : static void MissingToken (M2Reserved_toktype t)
2733 : : {
2734 : 162 : if ((InsertCount < MaxInsert) && ((((t != M2Reserved_identtok) && (t != M2Reserved_integertok)) && (t != M2Reserved_realtok)) && (t != M2Reserved_stringtok)))
2735 : : {
2736 : 120 : if (DebugRecover)
2737 : : {
2738 : : M2Printf_printf0 ((const char *) "missing token detected and going to be inserted: ", 49);
2739 : : M2LexBuf_DisplayToken (t);
2740 : : }
2741 : 120 : WarnMissingToken (t);
2742 : 120 : InsertCount += 1;
2743 : 120 : if (DebugRecover)
2744 : : {
2745 : : M2Printf_printf0 ((const char *) "inserting token\\n", 17);
2746 : : }
2747 : 120 : M2LexBuf_InsertToken (t);
2748 : : }
2749 : : else
2750 : : {
2751 : 42 : if (DebugRecover)
2752 : : {
2753 : : M2Printf_printf0 ((const char *) "missing token detected but cannot be inserted: ", 47);
2754 : : M2LexBuf_DisplayToken (t);
2755 : : }
2756 : 42 : ErrorMissingToken (t);
2757 : : }
2758 : 162 : }
2759 : :
2760 : :
2761 : : /*
2762 : : CheckInsertCandidate -
2763 : : */
2764 : :
2765 : 168 : static bool CheckInsertCandidate (M2Reserved_toktype t, P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2766 : : {
2767 : 168 : if (((( ((unsigned int) (t)) < 32) && ((((1 << (t-M2Reserved_eoftok)) & (stopset0)) != 0))) || ((( ((unsigned int) (t)) >= 32) && ( ((unsigned int) (t)) < 64)) && ((((1 << (t-M2Reserved_arraytok)) & (stopset1)) != 0)))) || (( ((unsigned int) (t)) >= 64) && ((((1 << (t-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))))
2768 : : {
2769 : 24 : InsertCount += 1;
2770 : 24 : if (InsertCount < MaxInsert)
2771 : : {
2772 : 24 : WarnMissingToken (t);
2773 : 24 : if (DebugRecover)
2774 : : {
2775 : : M2Printf_printf0 ((const char *) "buffer before\\n", 15);
2776 : : M2LexBuf_DumpTokens ();
2777 : : }
2778 : 24 : M2LexBuf_InsertTokenAndRewind (t);
2779 : 24 : if (DebugRecover)
2780 : : {
2781 : : M2Printf_printf0 ((const char *) "inserting token: buffer after insertion\\n", 41);
2782 : : M2LexBuf_DumpTokens ();
2783 : : }
2784 : 24 : return true;
2785 : : }
2786 : : }
2787 : : return false;
2788 : : /* static analysis guarentees a RETURN statement will be used before here. */
2789 : : __builtin_unreachable ();
2790 : : }
2791 : :
2792 : :
2793 : : /*
2794 : : InStopSet
2795 : : */
2796 : :
2797 : 96 : static bool InStopSet (M2Reserved_toktype t, P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2798 : : {
2799 : 96 : if (((( ((unsigned int) (t)) < 32) && ((((1 << (t-M2Reserved_eoftok)) & (stopset0)) != 0))) || ((( ((unsigned int) (t)) >= 32) && ( ((unsigned int) (t)) < 64)) && ((((1 << (t-M2Reserved_arraytok)) & (stopset1)) != 0)))) || (( ((unsigned int) (t)) >= 64) && ((((1 << (t-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))))
2800 : : {
2801 : : return true;
2802 : : }
2803 : : else
2804 : : {
2805 : 0 : return false;
2806 : : }
2807 : : /* static analysis guarentees a RETURN statement will be used before here. */
2808 : : __builtin_unreachable ();
2809 : : }
2810 : :
2811 : :
2812 : : /*
2813 : : PeepToken - peep token checks to see whether the stopset is satisfied by currenttoken
2814 : : If it is not then it will insert a token providing the token
2815 : : is one of ; ] ) } . OF END ,
2816 : :
2817 : : if the stopset contains <identtok> then we do not insert a token
2818 : : */
2819 : :
2820 : 106598765 : static void PeepToken (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2821 : : {
2822 : : /* and again (see above re: ORD)
2823 : : */
2824 : 106598765 : if ((! (((( ((unsigned int) (M2LexBuf_currenttoken)) < 32) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & (stopset0)) != 0))) || ((( ((unsigned int) (M2LexBuf_currenttoken)) >= 32) && ( ((unsigned int) (M2LexBuf_currenttoken)) < 64)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & (stopset1)) != 0)))) || (( ((unsigned int) (M2LexBuf_currenttoken)) >= 64) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & (stopset2)) != 0))))) && (! (InStopSet (M2Reserved_identtok, stopset0, stopset1, stopset2))))
2825 : : {
2826 : : /* SyntaxCheck will fail since currentoken is not part of the stopset
2827 : : we check to see whether one of the following is in the stopset and
2828 : : if not emit a warning and also the token. */
2829 : 30 : if ((((((((CheckInsertCandidate (M2Reserved_semicolontok, stopset0, stopset1, stopset2)) || (CheckInsertCandidate (M2Reserved_rsbratok, stopset0, stopset1, stopset2))) || (CheckInsertCandidate (M2Reserved_rparatok, stopset0, stopset1, stopset2))) || (CheckInsertCandidate (M2Reserved_rcbratok, stopset0, stopset1, stopset2))) || (CheckInsertCandidate (M2Reserved_periodtok, stopset0, stopset1, stopset2))) || (CheckInsertCandidate (M2Reserved_oftok, stopset0, stopset1, stopset2))) || (CheckInsertCandidate (M2Reserved_endtok, stopset0, stopset1, stopset2))) || (CheckInsertCandidate (M2Reserved_commatok, stopset0, stopset1, stopset2)))
2830 : : {} /* empty. */
2831 : : }
2832 : 106598765 : }
2833 : :
2834 : :
2835 : : /*
2836 : : DetectImport - checks whether the next token is an import or from and if so
2837 : : generates an error message. This is called after an export
2838 : : statement to notify the user that the ordering is incorrect.
2839 : : */
2840 : :
2841 : 67896 : static void DetectImport (void)
2842 : : {
2843 : 67896 : if ((M2LexBuf_currenttoken == M2Reserved_importtok) || (M2LexBuf_currenttoken == M2Reserved_fromtok))
2844 : : {
2845 : 6 : ErrorArray ((const char *) "an {%AkIMPORT} statement must preceed an {%kEXPORT} statement", 61);
2846 : : }
2847 : 67890 : }
2848 : :
2849 : :
2850 : : /*
2851 : : Expect -
2852 : : */
2853 : :
2854 : 106598933 : static void Expect (M2Reserved_toktype t, P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2855 : : {
2856 : 106598933 : if (M2LexBuf_currenttoken == t)
2857 : : {
2858 : : /* avoid dangling else. */
2859 : 106598771 : M2LexBuf_GetToken ();
2860 : 106598771 : if (EnableImportCheck)
2861 : : {
2862 : 67896 : DetectImport ();
2863 : : }
2864 : 106598765 : if (Pass0)
2865 : : {
2866 : 106598765 : PeepToken (stopset0, stopset1, stopset2);
2867 : : }
2868 : : }
2869 : : else
2870 : : {
2871 : 162 : MissingToken (t);
2872 : : }
2873 : 106598927 : SyntaxCheck (stopset0, stopset1, stopset2);
2874 : 106598927 : }
2875 : :
2876 : :
2877 : : /*
2878 : : Ident - error checking varient of Ident
2879 : : */
2880 : :
2881 : 39843463 : static void Ident (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2882 : : {
2883 : 39843463 : LastIdent = NameKey_makekey (M2LexBuf_currentstring);
2884 : 39843463 : if (M2Quads_IsAutoPushOn ())
2885 : : {
2886 : 3130898 : M2Quads_PushTFtok (LastIdent, static_cast<unsigned int> (M2Reserved_identtok), M2LexBuf_GetTokenNo ());
2887 : : }
2888 : 39843463 : Expect (M2Reserved_identtok, stopset0, stopset1, stopset2);
2889 : 39843463 : }
2890 : :
2891 : :
2892 : : /*
2893 : : string -
2894 : : */
2895 : :
2896 : 898598 : static void string (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2897 : : {
2898 : 898598 : if (M2Quads_IsAutoPushOn ())
2899 : : {
2900 : 0 : M2Quads_PushTF (NameKey_makekey (M2LexBuf_currentstring), static_cast<unsigned int> (M2Reserved_stringtok));
2901 : 0 : P2SymBuild_BuildString ();
2902 : : }
2903 : 898598 : Expect (M2Reserved_stringtok, stopset0, stopset1, stopset2);
2904 : 898598 : }
2905 : :
2906 : :
2907 : : /*
2908 : : Integer -
2909 : : */
2910 : :
2911 : 1405820 : static void Integer (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2912 : : {
2913 : 1405820 : if (M2Quads_IsAutoPushOn ())
2914 : : {
2915 : 0 : M2Quads_PushTFtok (NameKey_makekey (M2LexBuf_currentstring), static_cast<unsigned int> (M2Reserved_integertok), M2LexBuf_GetTokenNo ());
2916 : 0 : P2SymBuild_BuildNumber ();
2917 : : }
2918 : 1405820 : Expect (M2Reserved_integertok, stopset0, stopset1, stopset2);
2919 : 1405820 : }
2920 : :
2921 : :
2922 : : /*
2923 : : Real -
2924 : : */
2925 : :
2926 : 9154 : static void Real (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2927 : : {
2928 : 9154 : if (M2Quads_IsAutoPushOn ())
2929 : : {
2930 : 0 : M2Quads_PushTFtok (NameKey_makekey (M2LexBuf_currentstring), static_cast<unsigned int> (M2Reserved_realtok), M2LexBuf_GetTokenNo ());
2931 : 0 : P2SymBuild_BuildNumber ();
2932 : : }
2933 : 9154 : Expect (M2Reserved_realtok, stopset0, stopset1, stopset2);
2934 : 9154 : }
2935 : :
2936 : :
2937 : : /*
2938 : : FileUnit :=
2939 : : % PushAutoOff %
2940 : : ( DefinitionModule |
2941 : : ImplementationOrProgramModule )
2942 : : % PopAuto %
2943 : :
2944 : :
2945 : : first symbols:implementationtok, moduletok, definitiontok
2946 : :
2947 : : cannot reachend
2948 : : */
2949 : :
2950 : 179091 : static void FileUnit (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
2951 : : {
2952 : 179091 : M2Quads_PushAutoOff ();
2953 : 179091 : if (M2LexBuf_currenttoken == M2Reserved_definitiontok)
2954 : : {
2955 : 115552 : DefinitionModule (stopset0, stopset1, stopset2);
2956 : : }
2957 : 63539 : else if (((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_implementationtok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))))) != 0)))
2958 : : {
2959 : : /* avoid dangling else. */
2960 : 63539 : ImplementationOrProgramModule (stopset0, stopset1, stopset2);
2961 : : }
2962 : : else
2963 : : {
2964 : : /* avoid dangling else. */
2965 : 0 : ErrorArray ((const char *) "expecting one of: {%KIMPLEMENTATION} {%KMODULE} {%KDEFINITION}", 62);
2966 : : }
2967 : 179079 : M2Quads_PopAuto ();
2968 : 179079 : }
2969 : :
2970 : :
2971 : : /*
2972 : : ProgramModule := 'MODULE'
2973 : : % PushAutoOn ; %
2974 : :
2975 : : % M2Error.DefaultProgramModule %
2976 : : Ident
2977 : : % RegisterProgramModule ; %
2978 : :
2979 : : % PushAutoOff ; %
2980 : : [ Priority ] ';'
2981 : : % PushAutoOn ; %
2982 : : { Import
2983 : : % RegisterImports %
2984 : : }
2985 : : % PopAuto %
2986 : : Block
2987 : : % PopAuto %
2988 : : Ident '.'
2989 : : % EndModule %
2990 : :
2991 : : % PopAuto %
2992 : :
2993 : :
2994 : : first symbols:moduletok
2995 : :
2996 : : cannot reachend
2997 : : */
2998 : :
2999 : 11248 : static void ProgramModule (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3000 : : {
3001 : 11248 : Expect (M2Reserved_moduletok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3002 : 11248 : M2Quads_PushAutoOn ();
3003 : 11248 : M2Error_DefaultProgramModule ();
3004 : 11248 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2);
3005 : 11248 : P0SymBuild_RegisterProgramModule ();
3006 : 11248 : M2Quads_PushAutoOff ();
3007 : 11248 : if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
3008 : : {
3009 : 12 : Priority (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
3010 : : }
3011 : 11248 : Expect (M2Reserved_semicolontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_importtok-M2Reserved_arraytok)) | (1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_finallytok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
3012 : 11248 : M2Quads_PushAutoOn ();
3013 : 36006 : while (((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_importtok-M2Reserved_arraytok))))) != 0)))
3014 : : {
3015 : 13510 : Import (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_importtok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_finallytok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok))));
3016 : 13510 : P0SymBuild_RegisterImports ();
3017 : : }
3018 : : /* while */
3019 : 11248 : M2Quads_PopAuto ();
3020 : 11248 : Block (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3021 : 11236 : M2Quads_PopAuto ();
3022 : 11236 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodtok-M2Reserved_eoftok))), stopset1, stopset2);
3023 : 11236 : Expect (M2Reserved_periodtok, stopset0, stopset1, stopset2);
3024 : 11236 : P0SymBuild_EndModule ();
3025 : 11236 : M2Quads_PopAuto ();
3026 : 11236 : }
3027 : :
3028 : :
3029 : : /*
3030 : : ImplementationModule := 'IMPLEMENTATION'
3031 : : % M2Error.DefaultImplementationModule %
3032 : : 'MODULE'
3033 : : % PushAutoOn ; %
3034 : : Ident
3035 : : % RegisterImplementationModule ; %
3036 : :
3037 : : % PushAutoOff ; %
3038 : : [ Priority ] ';'
3039 : : % PushAutoOn ; %
3040 : : { Import
3041 : : % RegisterImports %
3042 : : }
3043 : : % PopAuto %
3044 : : Block
3045 : : % PopAuto %
3046 : : Ident
3047 : : % EndModule %
3048 : :
3049 : : % PopAuto %
3050 : : '.'
3051 : :
3052 : : first symbols:implementationtok
3053 : :
3054 : : cannot reachend
3055 : : */
3056 : :
3057 : 52291 : static void ImplementationModule (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3058 : : {
3059 : 52291 : Expect (M2Reserved_implementationtok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_moduletok-M2Reserved_arraytok))), stopset2);
3060 : 52291 : M2Error_DefaultImplementationModule ();
3061 : 52291 : Expect (M2Reserved_moduletok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3062 : 52291 : M2Quads_PushAutoOn ();
3063 : 52291 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2);
3064 : 52291 : P0SymBuild_RegisterImplementationModule ();
3065 : 52291 : M2Quads_PushAutoOff ();
3066 : 52291 : if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
3067 : : {
3068 : 26 : Priority (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
3069 : : }
3070 : 52291 : Expect (M2Reserved_semicolontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_importtok-M2Reserved_arraytok)) | (1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_finallytok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
3071 : 52291 : M2Quads_PushAutoOn ();
3072 : 300752 : while (((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_importtok-M2Reserved_arraytok))))) != 0)))
3073 : : {
3074 : 196170 : Import (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_importtok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_finallytok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok))));
3075 : 196170 : P0SymBuild_RegisterImports ();
3076 : : }
3077 : : /* while */
3078 : 52291 : M2Quads_PopAuto ();
3079 : 52291 : Block (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3080 : 52291 : M2Quads_PopAuto ();
3081 : 52291 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodtok-M2Reserved_eoftok))), stopset1, stopset2);
3082 : 52291 : P0SymBuild_EndModule ();
3083 : 52291 : M2Quads_PopAuto ();
3084 : 52291 : Expect (M2Reserved_periodtok, stopset0, stopset1, stopset2);
3085 : 52291 : }
3086 : :
3087 : :
3088 : : /*
3089 : : ImplementationOrProgramModule := ImplementationModule |
3090 : : ProgramModule
3091 : :
3092 : : first symbols:moduletok, implementationtok
3093 : :
3094 : : cannot reachend
3095 : : */
3096 : :
3097 : 63539 : static void ImplementationOrProgramModule (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3098 : : {
3099 : 63539 : if (M2LexBuf_currenttoken == M2Reserved_implementationtok)
3100 : : {
3101 : 52291 : ImplementationModule (stopset0, stopset1, stopset2);
3102 : : }
3103 : 11248 : else if (M2LexBuf_currenttoken == M2Reserved_moduletok)
3104 : : {
3105 : : /* avoid dangling else. */
3106 : 11248 : ProgramModule (stopset0, stopset1, stopset2);
3107 : : }
3108 : : else
3109 : : {
3110 : : /* avoid dangling else. */
3111 : 0 : ErrorArray ((const char *) "expecting one of: {%KMODULE} {%KIMPLEMENTATION}", 47);
3112 : : }
3113 : 63527 : }
3114 : :
3115 : :
3116 : : /*
3117 : : Number := Integer | Real
3118 : :
3119 : : first symbols:realtok, integertok
3120 : :
3121 : : cannot reachend
3122 : : */
3123 : :
3124 : 1414974 : static void Number (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3125 : : {
3126 : 1414974 : if (M2LexBuf_currenttoken == M2Reserved_integertok)
3127 : : {
3128 : 1405820 : Integer (stopset0, stopset1, stopset2);
3129 : : }
3130 : 9154 : else if (M2LexBuf_currenttoken == M2Reserved_realtok)
3131 : : {
3132 : : /* avoid dangling else. */
3133 : 9154 : Real (stopset0, stopset1, stopset2);
3134 : : }
3135 : : else
3136 : : {
3137 : : /* avoid dangling else. */
3138 : 0 : ErrorArray ((const char *) "expecting one of: {%Kreal number} {%Kinteger number}", 52);
3139 : : }
3140 : 1414974 : }
3141 : :
3142 : :
3143 : : /*
3144 : : Qualident := Ident { '.' Ident }
3145 : :
3146 : : first symbols:identtok
3147 : :
3148 : : cannot reachend
3149 : : */
3150 : :
3151 : 22981659 : static void Qualident (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3152 : : {
3153 : 22981659 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodtok-M2Reserved_eoftok))), stopset1, stopset2);
3154 : 46497180 : while (M2LexBuf_currenttoken == M2Reserved_periodtok)
3155 : : {
3156 : 533862 : Expect (M2Reserved_periodtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3157 : 533862 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodtok-M2Reserved_eoftok))), stopset1, stopset2);
3158 : : }
3159 : : /* while */
3160 : 22981659 : }
3161 : :
3162 : :
3163 : : /*
3164 : : ConstantDeclaration := Ident '=' ConstExpression
3165 : :
3166 : : first symbols:identtok
3167 : :
3168 : : cannot reachend
3169 : : */
3170 : :
3171 : 237887 : static void ConstantDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3172 : : {
3173 : 237887 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_equaltok-M2Reserved_eoftok))), stopset1, stopset2);
3174 : 237887 : Expect (M2Reserved_equaltok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
3175 : 237887 : ConstExpression (stopset0, stopset1, stopset2);
3176 : 237887 : }
3177 : :
3178 : :
3179 : : /*
3180 : : ConstExpression := SimpleConstExpr [ Relation SimpleConstExpr ]
3181 : :
3182 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
3183 : :
3184 : : cannot reachend
3185 : : */
3186 : :
3187 : 461642 : static void ConstExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3188 : : {
3189 : 461642 : SimpleConstExpr (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_greaterequaltok-M2Reserved_eoftok)) | (1 << (M2Reserved_greatertok-M2Reserved_eoftok)) | (1 << (M2Reserved_lessequaltok-M2Reserved_eoftok)) | (1 << (M2Reserved_lesstok-M2Reserved_eoftok)) | (1 << (M2Reserved_lessgreatertok-M2Reserved_eoftok)) | (1 << (M2Reserved_hashtok-M2Reserved_eoftok)) | (1 << (M2Reserved_equaltok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_intok-M2Reserved_arraytok))), stopset2);
3190 : 461642 : if (((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_equaltok-M2Reserved_eoftok)) | (1 << (M2Reserved_hashtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lessgreatertok-M2Reserved_eoftok)) | (1 << (M2Reserved_lesstok-M2Reserved_eoftok)) | (1 << (M2Reserved_lessequaltok-M2Reserved_eoftok)) | (1 << (M2Reserved_greatertok-M2Reserved_eoftok)) | (1 << (M2Reserved_greaterequaltok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_intok))
3191 : : {
3192 : 42 : Relation (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
3193 : 42 : SimpleConstExpr (stopset0, stopset1, stopset2);
3194 : : }
3195 : 461642 : }
3196 : :
3197 : :
3198 : : /*
3199 : : Relation := '=' | '#' | '<>' | '<' | '<=' |
3200 : : '>' | '>=' | 'IN'
3201 : :
3202 : : first symbols:intok, greaterequaltok, greatertok, lessequaltok, lesstok, lessgreatertok, hashtok, equaltok
3203 : :
3204 : : cannot reachend
3205 : : */
3206 : :
3207 : 1413111 : static void Relation (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3208 : : {
3209 : 1413111 : if (M2LexBuf_currenttoken == M2Reserved_equaltok)
3210 : : {
3211 : 494345 : Expect (M2Reserved_equaltok, stopset0, stopset1, stopset2);
3212 : : }
3213 : : else if (M2LexBuf_currenttoken == M2Reserved_hashtok)
3214 : : {
3215 : : /* avoid dangling else. */
3216 : 356204 : Expect (M2Reserved_hashtok, stopset0, stopset1, stopset2);
3217 : : }
3218 : : else if (M2LexBuf_currenttoken == M2Reserved_lessgreatertok)
3219 : : {
3220 : : /* avoid dangling else. */
3221 : 84 : Expect (M2Reserved_lessgreatertok, stopset0, stopset1, stopset2);
3222 : : }
3223 : : else if (M2LexBuf_currenttoken == M2Reserved_lesstok)
3224 : : {
3225 : : /* avoid dangling else. */
3226 : 201138 : Expect (M2Reserved_lesstok, stopset0, stopset1, stopset2);
3227 : : }
3228 : : else if (M2LexBuf_currenttoken == M2Reserved_lessequaltok)
3229 : : {
3230 : : /* avoid dangling else. */
3231 : 147058 : Expect (M2Reserved_lessequaltok, stopset0, stopset1, stopset2);
3232 : : }
3233 : : else if (M2LexBuf_currenttoken == M2Reserved_greatertok)
3234 : : {
3235 : : /* avoid dangling else. */
3236 : 149130 : Expect (M2Reserved_greatertok, stopset0, stopset1, stopset2);
3237 : : }
3238 : : else if (M2LexBuf_currenttoken == M2Reserved_greaterequaltok)
3239 : : {
3240 : : /* avoid dangling else. */
3241 : 53782 : Expect (M2Reserved_greaterequaltok, stopset0, stopset1, stopset2);
3242 : : }
3243 : : else if (M2LexBuf_currenttoken == M2Reserved_intok)
3244 : : {
3245 : : /* avoid dangling else. */
3246 : 11370 : Expect (M2Reserved_intok, stopset0, stopset1, stopset2);
3247 : : }
3248 : : else
3249 : : {
3250 : : /* avoid dangling else. */
3251 : 0 : ErrorArray ((const char *) "expecting one of: {%KIN} {%K>=} {%K>} {%K<=} {%K<} {%K<>} {%K#} {%K=}", 69);
3252 : : }
3253 : 1413111 : }
3254 : :
3255 : :
3256 : : /*
3257 : : SimpleConstExpr := UnaryOrConstTerm { AddOperator
3258 : : ConstTerm }
3259 : :
3260 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
3261 : :
3262 : : cannot reachend
3263 : : */
3264 : :
3265 : 461684 : static void SimpleConstExpr (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3266 : : {
3267 : 461684 : UnaryOrConstTerm (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_ortok-M2Reserved_arraytok))), stopset2);
3268 : 928058 : while (((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_ortok))
3269 : : {
3270 : 4690 : AddOperator (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
3271 : 4690 : ConstTerm (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_ortok-M2Reserved_arraytok))), stopset2);
3272 : : }
3273 : : /* while */
3274 : 461684 : }
3275 : :
3276 : :
3277 : : /*
3278 : : UnaryOrConstTerm := '+' ConstTerm |
3279 : : '-' ConstTerm |
3280 : : ConstTerm
3281 : :
3282 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
3283 : :
3284 : : cannot reachend
3285 : : */
3286 : :
3287 : 461684 : static void UnaryOrConstTerm (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3288 : : {
3289 : 461684 : if (M2LexBuf_currenttoken == M2Reserved_plustok)
3290 : : {
3291 : 0 : Expect (M2Reserved_plustok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
3292 : 0 : ConstTerm (stopset0, stopset1, stopset2);
3293 : : }
3294 : 461684 : else if (M2LexBuf_currenttoken == M2Reserved_minustok)
3295 : : {
3296 : : /* avoid dangling else. */
3297 : 17765 : Expect (M2Reserved_minustok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
3298 : 17765 : ConstTerm (stopset0, stopset1, stopset2);
3299 : : }
3300 : 443919 : else if ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_nottok)) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))))) != 0))))
3301 : : {
3302 : : /* avoid dangling else. */
3303 : 443919 : ConstTerm (stopset0, stopset1, stopset2);
3304 : : }
3305 : : else
3306 : : {
3307 : : /* avoid dangling else. */
3308 : 0 : ErrorArray ((const char *) "expecting one of: {%KNOT} {%K(} {%Kinteger number} {%Kreal number} {%K__ATTRIBUTE__} {%K%{} {%Kidentifier} {%Kstring} {%K-} {%K+}", 129);
3309 : : }
3310 : 461684 : }
3311 : :
3312 : :
3313 : : /*
3314 : : AddOperator := '+' | '-' | 'OR'
3315 : :
3316 : : first symbols:ortok, minustok, plustok
3317 : :
3318 : : cannot reachend
3319 : : */
3320 : :
3321 : 384976 : static void AddOperator (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3322 : : {
3323 : 384976 : if (M2LexBuf_currenttoken == M2Reserved_plustok)
3324 : : {
3325 : 179526 : Expect (M2Reserved_plustok, stopset0, stopset1, stopset2);
3326 : : }
3327 : 205450 : else if (M2LexBuf_currenttoken == M2Reserved_minustok)
3328 : : {
3329 : : /* avoid dangling else. */
3330 : 103590 : Expect (M2Reserved_minustok, stopset0, stopset1, stopset2);
3331 : : }
3332 : 101860 : else if (M2LexBuf_currenttoken == M2Reserved_ortok)
3333 : : {
3334 : : /* avoid dangling else. */
3335 : 101860 : Expect (M2Reserved_ortok, stopset0, stopset1, stopset2);
3336 : : }
3337 : : else
3338 : : {
3339 : : /* avoid dangling else. */
3340 : 0 : ErrorArray ((const char *) "expecting one of: {%KOR} {%K-} {%K+}", 36);
3341 : : }
3342 : 384976 : }
3343 : :
3344 : :
3345 : : /*
3346 : : ConstTerm := ConstFactor { MulOperator ConstFactor }
3347 : :
3348 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok
3349 : :
3350 : : cannot reachend
3351 : : */
3352 : :
3353 : 466374 : static void ConstTerm (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3354 : : {
3355 : 466374 : ConstFactor (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ambersandtok-M2Reserved_eoftok)) | (1 << (M2Reserved_andtok-M2Reserved_eoftok)) | (1 << (M2Reserved_dividetok-M2Reserved_eoftok)) | (1 << (M2Reserved_timestok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_modtok-M2Reserved_arraytok)) | (1 << (M2Reserved_divtok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_remtok-M2Reserved_unqualifiedtok))));
3356 : 943265 : while ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_timestok-M2Reserved_eoftok)) | (1 << (M2Reserved_dividetok-M2Reserved_eoftok)) | (1 << (M2Reserved_andtok-M2Reserved_eoftok)) | (1 << (M2Reserved_ambersandtok-M2Reserved_eoftok))))) != 0))) || (((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_divtok-M2Reserved_arraytok)) | (1 << (M2Reserved_modtok-M2Reserved_arraytok))))) != 0)))) || (M2LexBuf_currenttoken == M2Reserved_remtok))
3357 : : {
3358 : 10517 : MulOperator (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
3359 : 10517 : ConstFactor (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_timestok-M2Reserved_eoftok)) | (1 << (M2Reserved_dividetok-M2Reserved_eoftok)) | (1 << (M2Reserved_andtok-M2Reserved_eoftok)) | (1 << (M2Reserved_ambersandtok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_divtok-M2Reserved_arraytok)) | (1 << (M2Reserved_modtok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_remtok-M2Reserved_unqualifiedtok))));
3360 : : }
3361 : : /* while */
3362 : 466374 : }
3363 : :
3364 : :
3365 : : /*
3366 : : MulOperator := '*' | '/' | 'DIV' | 'MOD' |
3367 : : 'REM' | 'AND' | '&'
3368 : :
3369 : : first symbols:ambersandtok, andtok, remtok, modtok, divtok, dividetok, timestok
3370 : :
3371 : : cannot reachend
3372 : : */
3373 : :
3374 : 425231 : static void MulOperator (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3375 : : {
3376 : 425231 : if (M2LexBuf_currenttoken == M2Reserved_timestok)
3377 : : {
3378 : 68882 : Expect (M2Reserved_timestok, stopset0, stopset1, stopset2);
3379 : : }
3380 : : else if (M2LexBuf_currenttoken == M2Reserved_dividetok)
3381 : : {
3382 : : /* avoid dangling else. */
3383 : 950 : Expect (M2Reserved_dividetok, stopset0, stopset1, stopset2);
3384 : : }
3385 : : else if (M2LexBuf_currenttoken == M2Reserved_divtok)
3386 : : {
3387 : : /* avoid dangling else. */
3388 : 41045 : Expect (M2Reserved_divtok, stopset0, stopset1, stopset2);
3389 : : }
3390 : : else if (M2LexBuf_currenttoken == M2Reserved_modtok)
3391 : : {
3392 : : /* avoid dangling else. */
3393 : 64700 : Expect (M2Reserved_modtok, stopset0, stopset1, stopset2);
3394 : : }
3395 : : else if (M2LexBuf_currenttoken == M2Reserved_remtok)
3396 : : {
3397 : : /* avoid dangling else. */
3398 : 96 : Expect (M2Reserved_remtok, stopset0, stopset1, stopset2);
3399 : : }
3400 : : else if (M2LexBuf_currenttoken == M2Reserved_andtok)
3401 : : {
3402 : : /* avoid dangling else. */
3403 : 249558 : Expect (M2Reserved_andtok, stopset0, stopset1, stopset2);
3404 : : }
3405 : : else if (M2LexBuf_currenttoken == M2Reserved_ambersandtok)
3406 : : {
3407 : : /* avoid dangling else. */
3408 : 0 : Expect (M2Reserved_ambersandtok, stopset0, stopset1, stopset2);
3409 : : }
3410 : : else
3411 : : {
3412 : : /* avoid dangling else. */
3413 : 0 : ErrorArray ((const char *) "expecting one of: {%K&} {%KAND} {%KREM} {%KMOD} {%KDIV} {%K/} {%K*}", 67);
3414 : : }
3415 : 425231 : }
3416 : :
3417 : :
3418 : : /*
3419 : : ConstFactor := Number | ConstString |
3420 : : ConstSetOrQualidentOrFunction |
3421 : : '(' ConstExpression ')' |
3422 : : 'NOT' ConstFactor |
3423 : : ConstAttribute
3424 : :
3425 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok
3426 : :
3427 : : cannot reachend
3428 : : */
3429 : :
3430 : 476891 : static void ConstFactor (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3431 : : {
3432 : 476891 : if ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok))))) != 0)))
3433 : : {
3434 : 308850 : Number (stopset0, stopset1, stopset2);
3435 : : }
3436 : 168041 : else if (M2LexBuf_currenttoken == M2Reserved_stringtok)
3437 : : {
3438 : : /* avoid dangling else. */
3439 : 12094 : ConstString (stopset0, stopset1, stopset2);
3440 : : }
3441 : : else if ((M2LexBuf_currenttoken == M2Reserved_lcbratok) || (M2LexBuf_currenttoken == M2Reserved_identtok))
3442 : : {
3443 : : /* avoid dangling else. */
3444 : 127419 : ConstSetOrQualidentOrFunction (stopset0, stopset1, stopset2);
3445 : : }
3446 : : else if (M2LexBuf_currenttoken == M2Reserved_lparatok)
3447 : : {
3448 : : /* avoid dangling else. */
3449 : 78 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
3450 : 78 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
3451 : 78 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
3452 : : }
3453 : : else if (M2LexBuf_currenttoken == M2Reserved_nottok)
3454 : : {
3455 : : /* avoid dangling else. */
3456 : 0 : Expect (M2Reserved_nottok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
3457 : 0 : ConstFactor (stopset0, stopset1, stopset2);
3458 : : }
3459 : : else if (M2LexBuf_currenttoken == M2Reserved_attributetok)
3460 : : {
3461 : : /* avoid dangling else. */
3462 : 28450 : ConstAttribute (stopset0, stopset1, stopset2);
3463 : : }
3464 : : else
3465 : : {
3466 : : /* avoid dangling else. */
3467 : 0 : ErrorArray ((const char *) "expecting one of: {%K__ATTRIBUTE__} {%KNOT} {%K(} {%K%{} {%Kidentifier} {%Kstring} {%Kinteger number} {%Kreal number}", 117);
3468 : : }
3469 : 476891 : }
3470 : :
3471 : :
3472 : : /*
3473 : : ConstString := string
3474 : :
3475 : : first symbols:stringtok
3476 : :
3477 : : cannot reachend
3478 : : */
3479 : :
3480 : 12094 : static void ConstString (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3481 : : {
3482 : 12094 : string (stopset0, stopset1, stopset2);
3483 : 12094 : }
3484 : :
3485 : :
3486 : : /*
3487 : : ComponentElement := ConstExpression [ '..' ConstExpression ]
3488 : :
3489 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
3490 : :
3491 : : cannot reachend
3492 : : */
3493 : :
3494 : 27392 : static void ComponentElement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3495 : : {
3496 : 27392 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodperiodtok-M2Reserved_eoftok))), stopset1, stopset2);
3497 : 27392 : if (M2LexBuf_currenttoken == M2Reserved_periodperiodtok)
3498 : : {
3499 : 350 : Expect (M2Reserved_periodperiodtok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
3500 : 350 : ConstExpression (stopset0, stopset1, stopset2);
3501 : : }
3502 : 27392 : }
3503 : :
3504 : :
3505 : : /*
3506 : : ComponentValue := ComponentElement [ 'BY' ConstExpression ]
3507 : :
3508 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
3509 : :
3510 : : cannot reachend
3511 : : */
3512 : :
3513 : 27392 : static void ComponentValue (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3514 : : {
3515 : 27392 : ComponentElement (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_bytok-M2Reserved_arraytok))), stopset2);
3516 : 27392 : if (M2LexBuf_currenttoken == M2Reserved_bytok)
3517 : : {
3518 : 30 : Expect (M2Reserved_bytok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
3519 : 30 : ConstExpression (stopset0, stopset1, stopset2);
3520 : : }
3521 : 27392 : }
3522 : :
3523 : :
3524 : : /*
3525 : : ArraySetRecordValue := ComponentValue { ',' ComponentValue }
3526 : :
3527 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
3528 : :
3529 : : cannot reachend
3530 : : */
3531 : :
3532 : 9446 : static void ArraySetRecordValue (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3533 : : {
3534 : 9446 : ComponentValue (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
3535 : 36838 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
3536 : : {
3537 : 17946 : Expect (M2Reserved_commatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
3538 : 17946 : ComponentValue (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
3539 : : }
3540 : : /* while */
3541 : 9446 : }
3542 : :
3543 : :
3544 : : /*
3545 : : Constructor := '{' [ ArraySetRecordValue ] '}'
3546 : :
3547 : : first symbols:lcbratok
3548 : :
3549 : : cannot reachend
3550 : : */
3551 : :
3552 : 21320 : static void Constructor (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3553 : : {
3554 : 21320 : Expect (M2Reserved_lcbratok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rcbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
3555 : 21320 : if ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_nottok)) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))))) != 0))))
3556 : : {
3557 : 9446 : ArraySetRecordValue (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rcbratok-M2Reserved_eoftok))), stopset1, stopset2);
3558 : : }
3559 : 21320 : Expect (M2Reserved_rcbratok, stopset0, stopset1, stopset2);
3560 : 21320 : }
3561 : :
3562 : :
3563 : : /*
3564 : : ConstSetOrQualidentOrFunction := Constructor |
3565 : : Qualident [ Constructor |
3566 : : ConstActualParameters ]
3567 : :
3568 : : first symbols:identtok, lcbratok
3569 : :
3570 : : cannot reachend
3571 : : */
3572 : :
3573 : 127419 : static void ConstSetOrQualidentOrFunction (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3574 : : {
3575 : 127419 : if (M2LexBuf_currenttoken == M2Reserved_lcbratok)
3576 : : {
3577 : 552 : Constructor (stopset0, stopset1, stopset2);
3578 : : }
3579 : 126867 : else if (M2LexBuf_currenttoken == M2Reserved_identtok)
3580 : : {
3581 : : /* avoid dangling else. */
3582 : 126867 : Qualident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lcbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
3583 : 126867 : if ((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0)))
3584 : : {
3585 : : /* avoid gcc warning by using compound statement even if not strictly necessary. */
3586 : : /* seen optional [ | ] expression */
3587 : 9824 : if (M2LexBuf_currenttoken == M2Reserved_lcbratok)
3588 : : {
3589 : 5518 : Constructor (stopset0, stopset1, stopset2);
3590 : : }
3591 : 4306 : else if (M2LexBuf_currenttoken == M2Reserved_lparatok)
3592 : : {
3593 : : /* avoid dangling else. */
3594 : 4306 : ConstActualParameters (stopset0, stopset1, stopset2);
3595 : : }
3596 : : else
3597 : : {
3598 : : /* avoid dangling else. */
3599 : 0 : ErrorArray ((const char *) "expecting one of: {%K(} {%K%{}", 30);
3600 : : }
3601 : : }
3602 : : /* end of optional [ | ] expression */
3603 : : }
3604 : : else
3605 : : {
3606 : : /* avoid dangling else. */
3607 : 0 : ErrorArray ((const char *) "expecting one of: {%Kidentifier} {%K%{}", 39);
3608 : : }
3609 : 127419 : }
3610 : :
3611 : :
3612 : : /*
3613 : : ConstActualParameters := '(' [ ExpList ] ')'
3614 : :
3615 : : first symbols:lparatok
3616 : :
3617 : : cannot reachend
3618 : : */
3619 : :
3620 : 4306 : static void ConstActualParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3621 : : {
3622 : 4306 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3623 : 4306 : if ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_nottok)) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))))) != 0))))
3624 : : {
3625 : 4306 : ExpList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
3626 : : }
3627 : 4306 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
3628 : 4306 : }
3629 : :
3630 : :
3631 : : /*
3632 : : ConstAttribute := '__ATTRIBUTE__' '__BUILTIN__'
3633 : : '(' '(' ConstAttributeExpression
3634 : : ')' ')'
3635 : :
3636 : : first symbols:attributetok
3637 : :
3638 : : cannot reachend
3639 : : */
3640 : :
3641 : 28450 : static void ConstAttribute (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3642 : : {
3643 : 28450 : Expect (M2Reserved_attributetok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_builtintok-M2Reserved_unqualifiedtok))));
3644 : 28450 : Expect (M2Reserved_builtintok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
3645 : 28450 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
3646 : 28450 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lesstok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3647 : 28450 : ConstAttributeExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
3648 : 28450 : Expect (M2Reserved_rparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
3649 : 28450 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
3650 : 28450 : }
3651 : :
3652 : :
3653 : : /*
3654 : : ConstAttributeExpression := Ident | '<' Qualident
3655 : : ',' Ident '>'
3656 : :
3657 : : first symbols:lesstok, identtok
3658 : :
3659 : : cannot reachend
3660 : : */
3661 : :
3662 : 28450 : static void ConstAttributeExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3663 : : {
3664 : 28450 : if (M2LexBuf_currenttoken == M2Reserved_identtok)
3665 : : {
3666 : 28090 : Ident (stopset0, stopset1, stopset2);
3667 : : }
3668 : 360 : else if (M2LexBuf_currenttoken == M2Reserved_lesstok)
3669 : : {
3670 : : /* avoid dangling else. */
3671 : 360 : Expect (M2Reserved_lesstok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3672 : 360 : Qualident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
3673 : 360 : Expect (M2Reserved_commatok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3674 : 360 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_greatertok-M2Reserved_eoftok))), stopset1, stopset2);
3675 : 360 : Expect (M2Reserved_greatertok, stopset0, stopset1, stopset2);
3676 : : }
3677 : : else
3678 : : {
3679 : : /* avoid dangling else. */
3680 : 0 : ErrorArray ((const char *) "expecting one of: {%K<} {%Kidentifier}", 38);
3681 : : }
3682 : 28450 : }
3683 : :
3684 : :
3685 : : /*
3686 : : ByteAlignment := ''
3687 : :
3688 : : first symbols:ldirectivetok
3689 : :
3690 : : cannot reachend
3691 : : */
3692 : :
3693 : 72 : static void ByteAlignment (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3694 : : {
3695 : 72 : Expect (M2Reserved_ldirectivetok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3696 : 72 : AttributeExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rdirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
3697 : 72 : Expect (M2Reserved_rdirectivetok, stopset0, stopset1, stopset2);
3698 : 72 : }
3699 : :
3700 : :
3701 : : /*
3702 : : Alignment := [ ByteAlignment ]
3703 : :
3704 : : first symbols:ldirectivetok
3705 : :
3706 : : reachend
3707 : : */
3708 : :
3709 : 876092 : static void Alignment (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3710 : : {
3711 : 0 : if (M2LexBuf_currenttoken == M2Reserved_ldirectivetok)
3712 : : {
3713 : 72 : ByteAlignment (stopset0, stopset1, stopset2);
3714 : : }
3715 : 0 : }
3716 : :
3717 : :
3718 : : /*
3719 : : TypeDeclaration := Ident '=' Type Alignment
3720 : :
3721 : : first symbols:identtok
3722 : :
3723 : : cannot reachend
3724 : : */
3725 : :
3726 : 72480 : static void TypeDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3727 : : {
3728 : 72480 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_equaltok-M2Reserved_eoftok))), stopset1, stopset2);
3729 : 72480 : Expect (M2Reserved_equaltok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_pointertok-M2Reserved_arraytok)) | (1 << (M2Reserved_packedsettok-M2Reserved_arraytok)) | (1 << (M2Reserved_oftok-M2Reserved_arraytok)) | (1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_settok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_recordtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3730 : 72480 : Type (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
3731 : 72480 : Alignment (stopset0, stopset1, stopset2);
3732 : 72480 : }
3733 : :
3734 : :
3735 : : /*
3736 : : Type := SimpleType | ArrayType | RecordType |
3737 : : SetType | PointerType | ProcedureType
3738 : :
3739 : : first symbols:lparatok, lsbratok, proceduretok, pointertok, settok, packedsettok, oftok, recordtok, arraytok, identtok
3740 : :
3741 : : cannot reachend
3742 : : */
3743 : :
3744 : 1256904 : static void Type (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3745 : : {
3746 : 1256904 : if (((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_identtok))
3747 : : {
3748 : 993506 : SimpleType (stopset0, stopset1, stopset2);
3749 : : }
3750 : 263398 : else if (M2LexBuf_currenttoken == M2Reserved_arraytok)
3751 : : {
3752 : : /* avoid dangling else. */
3753 : 82868 : ArrayType (stopset0, stopset1, stopset2);
3754 : : }
3755 : 180530 : else if (M2LexBuf_currenttoken == M2Reserved_recordtok)
3756 : : {
3757 : : /* avoid dangling else. */
3758 : 48638 : RecordType (stopset0, stopset1, stopset2);
3759 : : }
3760 : 131892 : else if ((((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_packedsettok-M2Reserved_arraytok)) | (1 << (M2Reserved_oftok-M2Reserved_arraytok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_settok))
3761 : : {
3762 : : /* avoid dangling else. */
3763 : 1802 : SetType (stopset0, stopset1, stopset2);
3764 : : }
3765 : 130090 : else if (M2LexBuf_currenttoken == M2Reserved_pointertok)
3766 : : {
3767 : : /* avoid dangling else. */
3768 : 76316 : PointerType (stopset0, stopset1, stopset2);
3769 : : }
3770 : 53774 : else if (M2LexBuf_currenttoken == M2Reserved_proceduretok)
3771 : : {
3772 : : /* avoid dangling else. */
3773 : 53762 : ProcedureType (stopset0, stopset1, stopset2);
3774 : : }
3775 : : else
3776 : : {
3777 : : /* avoid dangling else. */
3778 : 12 : ErrorArray ((const char *) "expecting one of: {%KPROCEDURE} {%KPOINTER} {%KSET} {%KPACKEDSET} {%KOF} {%KRECORD} {%KARRAY} {%Kidentifier} {%K(} {%K[}", 120);
3779 : : }
3780 : 1256904 : }
3781 : :
3782 : :
3783 : : /*
3784 : : SimpleType := Qualident [ SubrangeType ] |
3785 : : Enumeration | SubrangeType
3786 : :
3787 : : first symbols:lsbratok, lparatok, identtok
3788 : :
3789 : : cannot reachend
3790 : : */
3791 : :
3792 : 1078314 : static void SimpleType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3793 : : {
3794 : 1078314 : if (M2LexBuf_currenttoken == M2Reserved_identtok)
3795 : : {
3796 : : /* avoid dangling else. */
3797 : 973468 : Qualident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2);
3798 : 973468 : if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
3799 : : {
3800 : 18 : SubrangeType (stopset0, stopset1, stopset2);
3801 : : }
3802 : : }
3803 : 104846 : else if (M2LexBuf_currenttoken == M2Reserved_lparatok)
3804 : : {
3805 : : /* avoid dangling else. */
3806 : 22752 : Enumeration (stopset0, stopset1, stopset2);
3807 : : }
3808 : 82094 : else if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
3809 : : {
3810 : : /* avoid dangling else. */
3811 : 82094 : SubrangeType (stopset0, stopset1, stopset2);
3812 : : }
3813 : : else
3814 : : {
3815 : : /* avoid dangling else. */
3816 : 0 : ErrorArray ((const char *) "expecting one of: {%K[} {%K(} {%Kidentifier}", 44);
3817 : : }
3818 : 1078314 : }
3819 : :
3820 : :
3821 : : /*
3822 : : Enumeration := '(' IdentList ')'
3823 : :
3824 : : first symbols:lparatok
3825 : :
3826 : : cannot reachend
3827 : : */
3828 : :
3829 : 22752 : static void Enumeration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3830 : : {
3831 : 22752 : Expect (M2Reserved_lparatok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3832 : 22752 : IdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
3833 : 22752 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
3834 : 22752 : }
3835 : :
3836 : :
3837 : : /*
3838 : : IdentList := Ident
3839 : : % VAR
3840 : : on: BOOLEAN ;
3841 : : n : CARDINAL ; %
3842 : :
3843 : : % on := IsAutoPushOn() ;
3844 : : IF on
3845 : : THEN
3846 : : n := 1
3847 : : END %
3848 : : { ',' Ident
3849 : : % IF on
3850 : : THEN
3851 : : INC(n)
3852 : : END %
3853 : : }
3854 : : % IF on
3855 : : THEN
3856 : : PushT(n)
3857 : : END %
3858 : :
3859 : :
3860 : : first symbols:identtok
3861 : :
3862 : : cannot reachend
3863 : : */
3864 : :
3865 : 5453404 : static void IdentList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3866 : : {
3867 : 5453404 : bool on;
3868 : 5453404 : unsigned int n;
3869 : :
3870 : 5453404 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
3871 : 5453404 : on = M2Quads_IsAutoPushOn ();
3872 : 5453404 : if (on)
3873 : : {
3874 : 5453404 : n = 1;
3875 : : }
3876 : 9381173 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
3877 : : {
3878 : 3927769 : Expect (M2Reserved_commatok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3879 : 3927769 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
3880 : 3927769 : if (on)
3881 : : {
3882 : 354744 : n += 1;
3883 : : }
3884 : : }
3885 : : /* while */
3886 : 5453404 : if (on)
3887 : : {
3888 : 280218 : M2Quads_PushT (n);
3889 : : }
3890 : 5453404 : }
3891 : :
3892 : :
3893 : : /*
3894 : : SubrangeType := '[' ConstExpression '..' ConstExpression
3895 : : ']'
3896 : :
3897 : : first symbols:lsbratok
3898 : :
3899 : : cannot reachend
3900 : : */
3901 : :
3902 : 82112 : static void SubrangeType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3903 : : {
3904 : 82112 : Expect (M2Reserved_lsbratok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
3905 : 82112 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodperiodtok-M2Reserved_eoftok))), stopset1, stopset2);
3906 : 82112 : Expect (M2Reserved_periodperiodtok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
3907 : 82112 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
3908 : 82112 : Expect (M2Reserved_rsbratok, stopset0, stopset1, stopset2);
3909 : 82112 : }
3910 : :
3911 : :
3912 : : /*
3913 : : ArrayType := 'ARRAY' SimpleType { ',' SimpleType }
3914 : : 'OF' Type
3915 : :
3916 : : first symbols:arraytok
3917 : :
3918 : : cannot reachend
3919 : : */
3920 : :
3921 : 82868 : static void ArrayType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3922 : : {
3923 : 82868 : Expect (M2Reserved_arraytok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3924 : 82868 : SimpleType (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_oftok-M2Reserved_arraytok))), stopset2);
3925 : 165874 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
3926 : : {
3927 : 138 : Expect (M2Reserved_commatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3928 : 138 : SimpleType (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_oftok-M2Reserved_arraytok))), stopset2);
3929 : : }
3930 : : /* while */
3931 : 82868 : Expect (M2Reserved_oftok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_pointertok-M2Reserved_arraytok)) | (1 << (M2Reserved_packedsettok-M2Reserved_arraytok)) | (1 << (M2Reserved_oftok-M2Reserved_arraytok)) | (1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_settok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_recordtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3932 : 82868 : Type (stopset0, stopset1, stopset2);
3933 : 82868 : }
3934 : :
3935 : :
3936 : : /*
3937 : : RecordType := 'RECORD' [ DefaultRecordAttributes ]
3938 : : FieldListSequence 'END'
3939 : :
3940 : : first symbols:recordtok
3941 : :
3942 : : cannot reachend
3943 : : */
3944 : :
3945 : 48638 : static void RecordType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3946 : : {
3947 : 48638 : Expect (M2Reserved_recordtok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok)) | (1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3948 : 48638 : if (M2LexBuf_currenttoken == M2Reserved_ldirectivetok)
3949 : : {
3950 : 36 : DefaultRecordAttributes (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3951 : : }
3952 : 48638 : FieldListSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
3953 : 48638 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
3954 : 48638 : }
3955 : :
3956 : :
3957 : : /*
3958 : : DefaultRecordAttributes := ''
3959 : :
3960 : : first symbols:ldirectivetok
3961 : :
3962 : : cannot reachend
3963 : : */
3964 : :
3965 : 36 : static void DefaultRecordAttributes (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3966 : : {
3967 : 36 : Expect (M2Reserved_ldirectivetok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3968 : 36 : AttributeExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rdirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
3969 : 36 : Expect (M2Reserved_rdirectivetok, stopset0, stopset1, stopset2);
3970 : 36 : }
3971 : :
3972 : :
3973 : : /*
3974 : : RecordFieldPragma := [ '' ]
3975 : :
3976 : : first symbols:ldirectivetok
3977 : :
3978 : : reachend
3979 : : */
3980 : :
3981 : 221628 : static void RecordFieldPragma (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
3982 : : {
3983 : 221628 : if (M2LexBuf_currenttoken == M2Reserved_ldirectivetok)
3984 : : {
3985 : 12 : Expect (M2Reserved_ldirectivetok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3986 : 12 : FieldPragmaExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok)) | (1 << (M2Reserved_rdirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
3987 : 24 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
3988 : : {
3989 : 0 : Expect (M2Reserved_commatok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
3990 : 0 : FieldPragmaExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rdirectivetok-M2Reserved_eoftok)) | (1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
3991 : : }
3992 : : /* while */
3993 : 12 : Expect (M2Reserved_rdirectivetok, stopset0, stopset1, stopset2);
3994 : : }
3995 : 221628 : }
3996 : :
3997 : :
3998 : : /*
3999 : : FieldPragmaExpression := Ident [ '(' ConstExpression
4000 : : ')' ]
4001 : :
4002 : : first symbols:identtok
4003 : :
4004 : : cannot reachend
4005 : : */
4006 : :
4007 : 12 : static void FieldPragmaExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4008 : : {
4009 : 12 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
4010 : 12 : if (M2LexBuf_currenttoken == M2Reserved_lparatok)
4011 : : {
4012 : 12 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
4013 : 12 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
4014 : 12 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
4015 : : }
4016 : 12 : }
4017 : :
4018 : :
4019 : : /*
4020 : : AttributeExpression := Ident '(' ConstExpression
4021 : : ')'
4022 : :
4023 : : first symbols:identtok
4024 : :
4025 : : cannot reachend
4026 : : */
4027 : :
4028 : 108 : static void AttributeExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4029 : : {
4030 : 108 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
4031 : 108 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
4032 : 108 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
4033 : 108 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
4034 : 108 : }
4035 : :
4036 : :
4037 : : /*
4038 : : FieldListSequence := FieldListStatement { ';' FieldListStatement }
4039 : :
4040 : : first symbols:casetok, identtok, semicolontok
4041 : :
4042 : : reachend
4043 : : */
4044 : :
4045 : 49304 : static void FieldListSequence (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4046 : : {
4047 : 49304 : FieldListStatement (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
4048 : 317100 : while (M2LexBuf_currenttoken == M2Reserved_semicolontok)
4049 : : {
4050 : 218492 : Expect (M2Reserved_semicolontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_casetok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4051 : 218492 : FieldListStatement (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
4052 : : }
4053 : : /* while */
4054 : 49304 : }
4055 : :
4056 : :
4057 : : /*
4058 : : FieldListStatement := [ FieldList ]
4059 : :
4060 : : first symbols:identtok, casetok
4061 : :
4062 : : reachend
4063 : : */
4064 : :
4065 : 267796 : static void FieldListStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4066 : : {
4067 : 267796 : if ((M2LexBuf_currenttoken == M2Reserved_casetok) || (M2LexBuf_currenttoken == M2Reserved_identtok))
4068 : : {
4069 : 221904 : FieldList (stopset0, stopset1, stopset2);
4070 : : }
4071 : 267796 : }
4072 : :
4073 : :
4074 : : /*
4075 : : FieldList := IdentList ':' Type RecordFieldPragma |
4076 : : 'CASE' CaseTag 'OF' Varient { '|' Varient }
4077 : : [ 'ELSE' FieldListSequence ] 'END'
4078 : :
4079 : : first symbols:casetok, identtok
4080 : :
4081 : : cannot reachend
4082 : : */
4083 : :
4084 : 221904 : static void FieldList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4085 : : {
4086 : 221904 : if (M2LexBuf_currenttoken == M2Reserved_identtok)
4087 : : {
4088 : 221628 : IdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
4089 : 221628 : Expect (M2Reserved_colontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_pointertok-M2Reserved_arraytok)) | (1 << (M2Reserved_packedsettok-M2Reserved_arraytok)) | (1 << (M2Reserved_oftok-M2Reserved_arraytok)) | (1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_settok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_recordtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4090 : 221628 : Type (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
4091 : 221628 : RecordFieldPragma (stopset0, stopset1, stopset2);
4092 : : }
4093 : 276 : else if (M2LexBuf_currenttoken == M2Reserved_casetok)
4094 : : {
4095 : : /* avoid dangling else. */
4096 : 276 : Expect (M2Reserved_casetok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_oftok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4097 : 276 : CaseTag (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_oftok-M2Reserved_arraytok))), stopset2);
4098 : 276 : Expect (M2Reserved_oftok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_bartok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
4099 : 276 : Varient (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_bartok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
4100 : 1188 : while (M2LexBuf_currenttoken == M2Reserved_bartok)
4101 : : {
4102 : 636 : Expect (M2Reserved_bartok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_bartok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
4103 : 636 : Varient (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_bartok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsetok-M2Reserved_arraytok))), stopset2);
4104 : : }
4105 : : /* while */
4106 : 276 : if (M2LexBuf_currenttoken == M2Reserved_elsetok)
4107 : : {
4108 : 114 : Expect (M2Reserved_elsetok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4109 : 114 : FieldListSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
4110 : : }
4111 : 276 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
4112 : : }
4113 : : else
4114 : : {
4115 : : /* avoid dangling else. */
4116 : 0 : ErrorArray ((const char *) "expecting one of: {%KCASE} {%Kidentifier}", 41);
4117 : : }
4118 : 221904 : }
4119 : :
4120 : :
4121 : : /*
4122 : : TagIdent := [ Ident ]
4123 : :
4124 : : first symbols:identtok
4125 : :
4126 : : reachend
4127 : : */
4128 : :
4129 : 276 : static void TagIdent (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4130 : : {
4131 : 0 : if (M2LexBuf_currenttoken == M2Reserved_identtok)
4132 : : {
4133 : 234 : Ident (stopset0, stopset1, stopset2);
4134 : : }
4135 : 0 : }
4136 : :
4137 : :
4138 : : /*
4139 : : CaseTag := TagIdent [ ':' Qualident ]
4140 : :
4141 : : first symbols:colontok, identtok
4142 : :
4143 : : reachend
4144 : : */
4145 : :
4146 : 276 : static void CaseTag (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4147 : : {
4148 : 276 : TagIdent (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
4149 : 276 : if (M2LexBuf_currenttoken == M2Reserved_colontok)
4150 : : {
4151 : 264 : Expect (M2Reserved_colontok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4152 : 264 : Qualident (stopset0, stopset1, stopset2);
4153 : : }
4154 : 276 : }
4155 : :
4156 : :
4157 : : /*
4158 : : Varient := [ VarientCaseLabelList ':' FieldListSequence ]
4159 : :
4160 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
4161 : :
4162 : : reachend
4163 : : */
4164 : :
4165 : 912 : static void Varient (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4166 : : {
4167 : 912 : if ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_nottok)) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))))) != 0))))
4168 : : {
4169 : 552 : VarientCaseLabelList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
4170 : 552 : Expect (M2Reserved_colontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_casetok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4171 : 552 : FieldListSequence (stopset0, stopset1, stopset2);
4172 : : }
4173 : 912 : }
4174 : :
4175 : :
4176 : : /*
4177 : : VarientCaseLabelList := VarientCaseLabels { ','
4178 : : VarientCaseLabels }
4179 : :
4180 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
4181 : :
4182 : : cannot reachend
4183 : : */
4184 : :
4185 : 552 : static void VarientCaseLabelList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4186 : : {
4187 : 552 : VarientCaseLabels (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4188 : 1146 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
4189 : : {
4190 : 42 : Expect (M2Reserved_commatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
4191 : 42 : VarientCaseLabels (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4192 : : }
4193 : : /* while */
4194 : 552 : }
4195 : :
4196 : :
4197 : : /*
4198 : : VarientCaseLabels := ConstExpression [ '..' ConstExpression ]
4199 : :
4200 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
4201 : :
4202 : : cannot reachend
4203 : : */
4204 : :
4205 : 594 : static void VarientCaseLabels (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4206 : : {
4207 : 594 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodperiodtok-M2Reserved_eoftok))), stopset1, stopset2);
4208 : 594 : if (M2LexBuf_currenttoken == M2Reserved_periodperiodtok)
4209 : : {
4210 : 0 : Expect (M2Reserved_periodperiodtok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
4211 : 0 : ConstExpression (stopset0, stopset1, stopset2);
4212 : : }
4213 : 594 : }
4214 : :
4215 : :
4216 : : /*
4217 : : CaseLabelList := CaseLabels { ',' CaseLabels }
4218 : :
4219 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok
4220 : :
4221 : : cannot reachend
4222 : : */
4223 : :
4224 : 13242 : static void CaseLabelList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4225 : : {
4226 : 13242 : CaseLabels (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4227 : 26696 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
4228 : : {
4229 : 212 : Expect (M2Reserved_commatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
4230 : 212 : CaseLabels (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4231 : : }
4232 : : /* while */
4233 : 13242 : }
4234 : :
4235 : :
4236 : : /*
4237 : : CaseLabels := ConstExpression [ '..' ConstExpression ]
4238 : :
4239 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
4240 : :
4241 : : cannot reachend
4242 : : */
4243 : :
4244 : 13454 : static void CaseLabels (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4245 : : {
4246 : 13454 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodperiodtok-M2Reserved_eoftok))), stopset1, stopset2);
4247 : 13454 : if (M2LexBuf_currenttoken == M2Reserved_periodperiodtok)
4248 : : {
4249 : 168 : Expect (M2Reserved_periodperiodtok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
4250 : 168 : ConstExpression (stopset0, stopset1, stopset2);
4251 : : }
4252 : 13454 : }
4253 : :
4254 : :
4255 : : /*
4256 : : SetType := ( 'SET' | 'PACKEDSET' ) 'OF' SimpleType
4257 : :
4258 : : first symbols:oftok, packedsettok, settok
4259 : :
4260 : : cannot reachend
4261 : : */
4262 : :
4263 : 1802 : static void SetType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4264 : : {
4265 : 1802 : if (M2LexBuf_currenttoken == M2Reserved_settok)
4266 : : {
4267 : 1706 : Expect (M2Reserved_settok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_oftok-M2Reserved_arraytok))), stopset2);
4268 : : }
4269 : 96 : else if (M2LexBuf_currenttoken == M2Reserved_packedsettok)
4270 : : {
4271 : : /* avoid dangling else. */
4272 : 96 : Expect (M2Reserved_packedsettok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_oftok-M2Reserved_arraytok))), stopset2);
4273 : : }
4274 : : else
4275 : : {
4276 : : /* avoid dangling else. */
4277 : 0 : ErrorArray ((const char *) "expecting one of: {%KPACKEDSET} {%KSET}", 39);
4278 : : }
4279 : 1802 : Expect (M2Reserved_oftok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4280 : 1802 : SimpleType (stopset0, stopset1, stopset2);
4281 : 1802 : }
4282 : :
4283 : :
4284 : : /*
4285 : : PointerType := 'POINTER' 'TO' Type
4286 : :
4287 : : first symbols:pointertok
4288 : :
4289 : : cannot reachend
4290 : : */
4291 : :
4292 : 76316 : static void PointerType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4293 : : {
4294 : 76316 : Expect (M2Reserved_pointertok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_totok-M2Reserved_unqualifiedtok))));
4295 : 76316 : Expect (M2Reserved_totok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_pointertok-M2Reserved_arraytok)) | (1 << (M2Reserved_packedsettok-M2Reserved_arraytok)) | (1 << (M2Reserved_oftok-M2Reserved_arraytok)) | (1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_settok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_recordtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4296 : 76316 : Type (stopset0, stopset1, stopset2);
4297 : 76316 : }
4298 : :
4299 : :
4300 : : /*
4301 : : ProcedureType := 'PROCEDURE' [ FormalTypeList ]
4302 : :
4303 : : first symbols:proceduretok
4304 : :
4305 : : cannot reachend
4306 : : */
4307 : :
4308 : 53762 : static void ProcedureType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4309 : : {
4310 : 53762 : Expect (M2Reserved_proceduretok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
4311 : 53762 : if (M2LexBuf_currenttoken == M2Reserved_lparatok)
4312 : : {
4313 : 39543 : FormalTypeList (stopset0, stopset1, stopset2);
4314 : : }
4315 : 53762 : }
4316 : :
4317 : :
4318 : : /*
4319 : : FormalTypeList := '(' ( ')' FormalReturn |
4320 : : ProcedureParameters ')'
4321 : : FormalReturn )
4322 : :
4323 : : first symbols:lparatok
4324 : :
4325 : : cannot reachend
4326 : : */
4327 : :
4328 : 39543 : static void FormalTypeList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4329 : : {
4330 : 39543 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4331 : 39543 : if (M2LexBuf_currenttoken == M2Reserved_rparatok)
4332 : : {
4333 : 5374 : Expect (M2Reserved_rparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
4334 : 5374 : FormalReturn (stopset0, stopset1, stopset2);
4335 : : }
4336 : 34169 : else if ((M2LexBuf_currenttoken == M2Reserved_arraytok) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))))) != 0))))
4337 : : {
4338 : : /* avoid dangling else. */
4339 : 34169 : ProcedureParameters (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
4340 : 34169 : Expect (M2Reserved_rparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
4341 : 34169 : FormalReturn (stopset0, stopset1, stopset2);
4342 : : }
4343 : : else
4344 : : {
4345 : : /* avoid dangling else. */
4346 : 0 : ErrorArray ((const char *) "expecting one of: {%KVAR} {%K...} {%KARRAY} {%Kidentifier} {%K)}", 64);
4347 : : }
4348 : 39543 : }
4349 : :
4350 : :
4351 : : /*
4352 : : FormalReturn := [ ':' OptReturnType ]
4353 : :
4354 : : first symbols:colontok
4355 : :
4356 : : reachend
4357 : : */
4358 : :
4359 : 2746238 : static void FormalReturn (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4360 : : {
4361 : 2746238 : if (M2LexBuf_currenttoken == M2Reserved_colontok)
4362 : : {
4363 : 1271478 : Expect (M2Reserved_colontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4364 : 1271478 : OptReturnType (stopset0, stopset1, stopset2);
4365 : : }
4366 : 2746238 : }
4367 : :
4368 : :
4369 : : /*
4370 : : OptReturnType := '[' Qualident ']' |
4371 : : Qualident
4372 : :
4373 : : first symbols:identtok, lsbratok
4374 : :
4375 : : cannot reachend
4376 : : */
4377 : :
4378 : 1271478 : static void OptReturnType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4379 : : {
4380 : 1271478 : if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
4381 : : {
4382 : 121284 : Expect (M2Reserved_lsbratok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4383 : 121284 : Qualident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
4384 : 121284 : Expect (M2Reserved_rsbratok, stopset0, stopset1, stopset2);
4385 : : }
4386 : 1150194 : else if (M2LexBuf_currenttoken == M2Reserved_identtok)
4387 : : {
4388 : : /* avoid dangling else. */
4389 : 1150194 : Qualident (stopset0, stopset1, stopset2);
4390 : : }
4391 : : else
4392 : : {
4393 : : /* avoid dangling else. */
4394 : 0 : ErrorArray ((const char *) "expecting one of: {%Kidentifier} {%K[}", 38);
4395 : : }
4396 : 1271478 : }
4397 : :
4398 : :
4399 : : /*
4400 : : ProcedureParameters := ProcedureParameter { ','
4401 : : ProcedureParameter }
4402 : :
4403 : : first symbols:identtok, arraytok, periodperiodperiodtok, vartok
4404 : :
4405 : : cannot reachend
4406 : : */
4407 : :
4408 : 34169 : static void ProcedureParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4409 : : {
4410 : 34169 : ProcedureParameter (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4411 : 110830 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
4412 : : {
4413 : 42492 : Expect (M2Reserved_commatok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4414 : 42492 : ProcedureParameter (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4415 : : }
4416 : : /* while */
4417 : 34169 : }
4418 : :
4419 : :
4420 : : /*
4421 : : ProcedureParameter := '...' | 'VAR' FormalType |
4422 : : FormalType
4423 : :
4424 : : first symbols:arraytok, identtok, vartok, periodperiodperiodtok
4425 : :
4426 : : cannot reachend
4427 : : */
4428 : :
4429 : 76661 : static void ProcedureParameter (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4430 : : {
4431 : 76661 : if (M2LexBuf_currenttoken == M2Reserved_periodperiodperiodtok)
4432 : : {
4433 : 0 : Expect (M2Reserved_periodperiodperiodtok, stopset0, stopset1, stopset2);
4434 : : }
4435 : 76661 : else if (M2LexBuf_currenttoken == M2Reserved_vartok)
4436 : : {
4437 : : /* avoid dangling else. */
4438 : 6014 : Expect (M2Reserved_vartok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4439 : 6014 : FormalType (stopset0, stopset1, stopset2);
4440 : : }
4441 : 70647 : else if ((M2LexBuf_currenttoken == M2Reserved_arraytok) || (M2LexBuf_currenttoken == M2Reserved_identtok))
4442 : : {
4443 : : /* avoid dangling else. */
4444 : 70647 : FormalType (stopset0, stopset1, stopset2);
4445 : : }
4446 : : else
4447 : : {
4448 : : /* avoid dangling else. */
4449 : 0 : ErrorArray ((const char *) "expecting one of: {%KARRAY} {%Kidentifier} {%KVAR} {%K...}", 58);
4450 : : }
4451 : 76661 : }
4452 : :
4453 : :
4454 : : /*
4455 : : VarIdent := Ident [ '[' ConstExpression ']' ]
4456 : :
4457 : : first symbols:identtok
4458 : :
4459 : : cannot reachend
4460 : : */
4461 : :
4462 : 936802 : static void VarIdent (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4463 : : {
4464 : 936802 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2);
4465 : 936802 : if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
4466 : : {
4467 : 54 : Expect (M2Reserved_lsbratok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
4468 : 54 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
4469 : 54 : Expect (M2Reserved_rsbratok, stopset0, stopset1, stopset2);
4470 : : }
4471 : 936802 : }
4472 : :
4473 : :
4474 : : /*
4475 : : VariableDeclaration := VarIdentList ':' Type Alignment
4476 : :
4477 : : first symbols:identtok
4478 : :
4479 : : cannot reachend
4480 : : */
4481 : :
4482 : 703204 : static void VariableDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4483 : : {
4484 : 703204 : VarIdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
4485 : 703204 : Expect (M2Reserved_colontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_pointertok-M2Reserved_arraytok)) | (1 << (M2Reserved_packedsettok-M2Reserved_arraytok)) | (1 << (M2Reserved_oftok-M2Reserved_arraytok)) | (1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_settok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_recordtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4486 : 703204 : Type (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
4487 : 703204 : Alignment (stopset0, stopset1, stopset2);
4488 : 703204 : }
4489 : :
4490 : :
4491 : : /*
4492 : : VarIdentList := VarIdent
4493 : : % VAR
4494 : : on: BOOLEAN ;
4495 : : n : CARDINAL ; %
4496 : :
4497 : : % on := IsAutoPushOn() ;
4498 : : IF on
4499 : : THEN
4500 : : n := 1
4501 : : END %
4502 : : { ',' VarIdent
4503 : : % IF on
4504 : : THEN
4505 : : INC(n)
4506 : : END %
4507 : : }
4508 : : % IF on
4509 : : THEN
4510 : : PushT(n)
4511 : : END %
4512 : :
4513 : :
4514 : : first symbols:identtok
4515 : :
4516 : : cannot reachend
4517 : : */
4518 : :
4519 : 703204 : static void VarIdentList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4520 : : {
4521 : 703204 : bool on;
4522 : 703204 : unsigned int n;
4523 : :
4524 : 703204 : VarIdent (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4525 : 703204 : on = M2Quads_IsAutoPushOn ();
4526 : 703204 : if (on)
4527 : : {
4528 : 703204 : n = 1;
4529 : : }
4530 : 936802 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
4531 : : {
4532 : 233598 : Expect (M2Reserved_commatok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4533 : 233598 : VarIdent (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4534 : 233598 : if (on)
4535 : : {
4536 : 0 : n += 1;
4537 : : }
4538 : : }
4539 : : /* while */
4540 : 703204 : if (on)
4541 : : {
4542 : 0 : M2Quads_PushT (n);
4543 : : }
4544 : 703204 : }
4545 : :
4546 : :
4547 : : /*
4548 : : Designator := Qualident { SubDesignator }
4549 : :
4550 : : first symbols:identtok
4551 : :
4552 : : cannot reachend
4553 : : */
4554 : :
4555 : 4212270 : static void Designator (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4556 : : {
4557 : 4212270 : Qualident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_uparrowtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_periodtok-M2Reserved_eoftok))), stopset1, stopset2);
4558 : 9169754 : while ((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_uparrowtok-M2Reserved_eoftok))))) != 0)))
4559 : : {
4560 : 745214 : SubDesignator (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_uparrowtok-M2Reserved_eoftok))), stopset1, stopset2);
4561 : : }
4562 : : /* while */
4563 : 4212270 : }
4564 : :
4565 : :
4566 : : /*
4567 : : SubDesignator := '.' Ident | '[' ExpList ']' |
4568 : : '^'
4569 : :
4570 : : first symbols:uparrowtok, lsbratok, periodtok
4571 : :
4572 : : cannot reachend
4573 : : */
4574 : :
4575 : 745214 : static void SubDesignator (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4576 : : {
4577 : 745214 : if (M2LexBuf_currenttoken == M2Reserved_periodtok)
4578 : : {
4579 : 199544 : Expect (M2Reserved_periodtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4580 : 199544 : Ident (stopset0, stopset1, stopset2);
4581 : : }
4582 : 545670 : else if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
4583 : : {
4584 : : /* avoid dangling else. */
4585 : 229716 : Expect (M2Reserved_lsbratok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4586 : 229716 : ExpList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
4587 : 229716 : Expect (M2Reserved_rsbratok, stopset0, stopset1, stopset2);
4588 : : }
4589 : 315954 : else if (M2LexBuf_currenttoken == M2Reserved_uparrowtok)
4590 : : {
4591 : : /* avoid dangling else. */
4592 : 315954 : Expect (M2Reserved_uparrowtok, stopset0, stopset1, stopset2);
4593 : : }
4594 : : else
4595 : : {
4596 : : /* avoid dangling else. */
4597 : 0 : ErrorArray ((const char *) "expecting one of: {%K^} {%K[} {%K.}", 35);
4598 : : }
4599 : 745214 : }
4600 : :
4601 : :
4602 : : /*
4603 : : ExpList := Expression { ',' Expression }
4604 : :
4605 : : first symbols:identtok, lcbratok, attributetok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
4606 : :
4607 : : cannot reachend
4608 : : */
4609 : :
4610 : 4144520 : static void ExpList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4611 : : {
4612 : 4144520 : Expression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4613 : 11431428 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
4614 : : {
4615 : 3142388 : Expect (M2Reserved_commatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4616 : 3142388 : Expression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
4617 : : }
4618 : : /* while */
4619 : 4144520 : }
4620 : :
4621 : :
4622 : : /*
4623 : : Expression := SimpleExpression [ Relation SimpleExpression ]
4624 : :
4625 : : first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, attributetok, plustok, minustok
4626 : :
4627 : : cannot reachend
4628 : : */
4629 : :
4630 : 12151053 : static void Expression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4631 : : {
4632 : 12151053 : SimpleExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_greaterequaltok-M2Reserved_eoftok)) | (1 << (M2Reserved_greatertok-M2Reserved_eoftok)) | (1 << (M2Reserved_lessequaltok-M2Reserved_eoftok)) | (1 << (M2Reserved_lesstok-M2Reserved_eoftok)) | (1 << (M2Reserved_lessgreatertok-M2Reserved_eoftok)) | (1 << (M2Reserved_hashtok-M2Reserved_eoftok)) | (1 << (M2Reserved_equaltok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_intok-M2Reserved_arraytok))), stopset2);
4633 : 12151053 : if (((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_equaltok-M2Reserved_eoftok)) | (1 << (M2Reserved_hashtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lessgreatertok-M2Reserved_eoftok)) | (1 << (M2Reserved_lesstok-M2Reserved_eoftok)) | (1 << (M2Reserved_lessequaltok-M2Reserved_eoftok)) | (1 << (M2Reserved_greatertok-M2Reserved_eoftok)) | (1 << (M2Reserved_greaterequaltok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_intok))
4634 : : {
4635 : 1413069 : Relation (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4636 : 1413069 : SimpleExpression (stopset0, stopset1, stopset2);
4637 : : }
4638 : 12151053 : }
4639 : :
4640 : :
4641 : : /*
4642 : : SimpleExpression := [ '+' | '-' ] Term { AddOperator
4643 : : Term }
4644 : :
4645 : : first symbols:identtok, lcbratok, attributetok, nottok, lparatok, stringtok, integertok, realtok, minustok, plustok
4646 : :
4647 : : cannot reachend
4648 : : */
4649 : :
4650 : 13564122 : static void SimpleExpression (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4651 : : {
4652 : 13564122 : if ((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok))))) != 0)))
4653 : : {
4654 : : /* avoid gcc warning by using compound statement even if not strictly necessary. */
4655 : : /* seen optional [ | ] expression */
4656 : 57444 : if (M2LexBuf_currenttoken == M2Reserved_plustok)
4657 : : {
4658 : 144 : Expect (M2Reserved_plustok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4659 : : }
4660 : 57300 : else if (M2LexBuf_currenttoken == M2Reserved_minustok)
4661 : : {
4662 : : /* avoid dangling else. */
4663 : 57300 : Expect (M2Reserved_minustok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4664 : : }
4665 : : else
4666 : : {
4667 : : /* avoid dangling else. */
4668 : 0 : ErrorArray ((const char *) "expecting one of: {%K-} {%K+}", 29);
4669 : : }
4670 : : }
4671 : : /* end of optional [ | ] expression */
4672 : 13564122 : Term (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_ortok-M2Reserved_arraytok))), stopset2);
4673 : 27508530 : while (((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_ortok))
4674 : : {
4675 : 380286 : AddOperator (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4676 : 380286 : Term (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_ortok-M2Reserved_arraytok))), stopset2);
4677 : : }
4678 : : /* while */
4679 : 13564122 : }
4680 : :
4681 : :
4682 : : /*
4683 : : Term := Factor { MulOperator Factor }
4684 : :
4685 : : first symbols:lcbratok, identtok, realtok, integertok, stringtok, lparatok, nottok, attributetok
4686 : :
4687 : : cannot reachend
4688 : : */
4689 : :
4690 : 13944408 : static void Term (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4691 : : {
4692 : 13944408 : Factor (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ambersandtok-M2Reserved_eoftok)) | (1 << (M2Reserved_andtok-M2Reserved_eoftok)) | (1 << (M2Reserved_dividetok-M2Reserved_eoftok)) | (1 << (M2Reserved_timestok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_modtok-M2Reserved_arraytok)) | (1 << (M2Reserved_divtok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_remtok-M2Reserved_unqualifiedtok))));
4693 : 28303530 : while ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_timestok-M2Reserved_eoftok)) | (1 << (M2Reserved_dividetok-M2Reserved_eoftok)) | (1 << (M2Reserved_andtok-M2Reserved_eoftok)) | (1 << (M2Reserved_ambersandtok-M2Reserved_eoftok))))) != 0))) || (((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_divtok-M2Reserved_arraytok)) | (1 << (M2Reserved_modtok-M2Reserved_arraytok))))) != 0)))) || (M2LexBuf_currenttoken == M2Reserved_remtok))
4694 : : {
4695 : 414714 : MulOperator (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4696 : 414714 : Factor (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_timestok-M2Reserved_eoftok)) | (1 << (M2Reserved_dividetok-M2Reserved_eoftok)) | (1 << (M2Reserved_andtok-M2Reserved_eoftok)) | (1 << (M2Reserved_ambersandtok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_divtok-M2Reserved_arraytok)) | (1 << (M2Reserved_modtok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_remtok-M2Reserved_unqualifiedtok))));
4697 : : }
4698 : : /* while */
4699 : 13944408 : }
4700 : :
4701 : :
4702 : : /*
4703 : : Factor := Number | string | SetOrDesignatorOrFunction |
4704 : : '(' Expression ')' |
4705 : : 'NOT' Factor | ConstAttribute
4706 : :
4707 : : first symbols:identtok, lcbratok, attributetok, nottok, lparatok, stringtok, integertok, realtok
4708 : :
4709 : : cannot reachend
4710 : : */
4711 : :
4712 : 14359122 : static void Factor (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4713 : : {
4714 : 14430836 : if ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok))))) != 0)))
4715 : : {
4716 : 1106124 : Number (stopset0, stopset1, stopset2);
4717 : : }
4718 : 13324712 : else if (M2LexBuf_currenttoken == M2Reserved_stringtok)
4719 : : {
4720 : : /* avoid dangling else. */
4721 : 878740 : string (stopset0, stopset1, stopset2);
4722 : : }
4723 : : else if ((M2LexBuf_currenttoken == M2Reserved_lcbratok) || (M2LexBuf_currenttoken == M2Reserved_identtok))
4724 : : {
4725 : : /* avoid dangling else. */
4726 : 11442782 : SetOrDesignatorOrFunction (stopset0, stopset1, stopset2);
4727 : : }
4728 : : else if (M2LexBuf_currenttoken == M2Reserved_lparatok)
4729 : : {
4730 : : /* avoid dangling else. */
4731 : 931464 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4732 : 931464 : Expression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
4733 : 931464 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
4734 : : }
4735 : : else if (M2LexBuf_currenttoken == M2Reserved_nottok)
4736 : : {
4737 : : /* avoid dangling else. */
4738 : 71714 : Expect (M2Reserved_nottok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4739 : 71714 : Factor (stopset0, stopset1, stopset2);
4740 : : }
4741 : : else if (M2LexBuf_currenttoken == M2Reserved_attributetok)
4742 : : {
4743 : : /* avoid dangling else. */
4744 : 0 : ConstAttribute (stopset0, stopset1, stopset2);
4745 : : }
4746 : : else
4747 : : {
4748 : : /* avoid dangling else. */
4749 : 12 : ErrorArray ((const char *) "expecting one of: {%K__ATTRIBUTE__} {%KNOT} {%K(} {%Kidentifier} {%K%{} {%Kstring} {%Kinteger number} {%Kreal number}", 117);
4750 : : }
4751 : 14359122 : }
4752 : :
4753 : :
4754 : : /*
4755 : : SetOrDesignatorOrFunction := ( Qualident [ Constructor |
4756 : : SimpleDes
4757 : : [ ActualParameters ] ] |
4758 : : Constructor )
4759 : :
4760 : : first symbols:lcbratok, identtok
4761 : :
4762 : : cannot reachend
4763 : : */
4764 : :
4765 : 11442782 : static void SetOrDesignatorOrFunction (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4766 : : {
4767 : 11442782 : if (M2LexBuf_currenttoken == M2Reserved_identtok)
4768 : : {
4769 : : /* avoid dangling else. */
4770 : 11442484 : Qualident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lcbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_uparrowtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_periodtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
4771 : 11442484 : if ((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_periodtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_uparrowtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0)))
4772 : : {
4773 : : /* avoid gcc warning by using compound statement even if not strictly necessary. */
4774 : : /* seen optional [ | ] expression */
4775 : 2575830 : if (M2LexBuf_currenttoken == M2Reserved_lcbratok)
4776 : : {
4777 : 14952 : Constructor (stopset0, stopset1, stopset2);
4778 : : }
4779 : 2560878 : else if ((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_periodtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_uparrowtok-M2Reserved_eoftok))))) != 0)))
4780 : : {
4781 : : /* avoid dangling else. */
4782 : 2560878 : SimpleDes (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
4783 : 2560878 : if (M2LexBuf_currenttoken == M2Reserved_lparatok)
4784 : : {
4785 : 1818216 : ActualParameters (stopset0, stopset1, stopset2);
4786 : : }
4787 : : }
4788 : : else
4789 : : {
4790 : : /* avoid dangling else. */
4791 : 0 : ErrorArray ((const char *) "expecting one of: {%K(} {%K.} {%K[} {%K^} {%K%{}", 48);
4792 : : }
4793 : : }
4794 : : /* end of optional [ | ] expression */
4795 : : }
4796 : 298 : else if (M2LexBuf_currenttoken == M2Reserved_lcbratok)
4797 : : {
4798 : : /* avoid dangling else. */
4799 : 298 : Constructor (stopset0, stopset1, stopset2);
4800 : : }
4801 : : else
4802 : : {
4803 : : /* avoid dangling else. */
4804 : 0 : ErrorArray ((const char *) "expecting one of: {%K%{} {%Kidentifier}", 39);
4805 : : }
4806 : 11442782 : }
4807 : :
4808 : :
4809 : : /*
4810 : : SimpleDes := { '.' Ident | '[' ExpList ']' |
4811 : : '^' }
4812 : :
4813 : : first symbols:uparrowtok, lsbratok, periodtok
4814 : :
4815 : : reachend
4816 : : */
4817 : :
4818 : 2560878 : static void SimpleDes (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4819 : : {
4820 : 2560878 : if ((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_uparrowtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_periodtok-M2Reserved_eoftok))))) != 0)))
4821 : : {
4822 : : /* seen optional { | } expression */
4823 : 1907096 : while ((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_uparrowtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_periodtok-M2Reserved_eoftok))))) != 0)))
4824 : : {
4825 : 1162456 : if (M2LexBuf_currenttoken == M2Reserved_periodtok)
4826 : : {
4827 : 383128 : Expect (M2Reserved_periodtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4828 : 383128 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_uparrowtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_periodtok-M2Reserved_eoftok))), stopset1, stopset2);
4829 : : }
4830 : 779328 : else if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
4831 : : {
4832 : : /* avoid dangling else. */
4833 : 363118 : Expect (M2Reserved_lsbratok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4834 : 363118 : ExpList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
4835 : 363118 : Expect (M2Reserved_rsbratok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_uparrowtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_periodtok-M2Reserved_eoftok))), stopset1, stopset2);
4836 : : }
4837 : 416210 : else if (M2LexBuf_currenttoken == M2Reserved_uparrowtok)
4838 : : {
4839 : : /* avoid dangling else. */
4840 : 416210 : Expect (M2Reserved_uparrowtok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_uparrowtok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_periodtok-M2Reserved_eoftok))), stopset1, stopset2);
4841 : : }
4842 : : }
4843 : : /* end of optional { | } expression */
4844 : : }
4845 : 2560878 : }
4846 : :
4847 : :
4848 : : /*
4849 : : ActualParameters := '(' [ ExpList ] ')'
4850 : :
4851 : : first symbols:lparatok
4852 : :
4853 : : cannot reachend
4854 : : */
4855 : :
4856 : 3660774 : static void ActualParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4857 : : {
4858 : 3660774 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4859 : 3660774 : if ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_nottok)) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))))) != 0))))
4860 : : {
4861 : 3547380 : ExpList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
4862 : : }
4863 : 3660774 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
4864 : 3660774 : }
4865 : :
4866 : :
4867 : : /*
4868 : : Statement := [ AssignmentOrProcedureCall |
4869 : : IfStatement | CaseStatement |
4870 : : WhileStatement |
4871 : : RepeatStatement |
4872 : : LoopStatement | ForStatement |
4873 : : WithStatement | AsmStatement |
4874 : : 'EXIT' | 'RETURN' [ Expression ] |
4875 : : RetryStatement ]
4876 : :
4877 : : first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok
4878 : :
4879 : : reachend
4880 : : */
4881 : :
4882 : 6143708 : static void Statement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4883 : : {
4884 : 6143708 : if ((((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok))))) != 0))) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))))) != 0))))
4885 : : {
4886 : : /* avoid gcc warning by using compound statement even if not strictly necessary. */
4887 : : /* seen optional [ | ] expression */
4888 : 6032692 : if (M2LexBuf_currenttoken == M2Reserved_identtok)
4889 : : {
4890 : 4080760 : AssignmentOrProcedureCall (stopset0, stopset1, stopset2);
4891 : : }
4892 : : else if (M2LexBuf_currenttoken == M2Reserved_iftok)
4893 : : {
4894 : : /* avoid dangling else. */
4895 : 1030876 : IfStatement (stopset0, stopset1, stopset2);
4896 : : }
4897 : : else if (M2LexBuf_currenttoken == M2Reserved_casetok)
4898 : : {
4899 : : /* avoid dangling else. */
4900 : 4426 : CaseStatement (stopset0, stopset1, stopset2);
4901 : : }
4902 : : else if (M2LexBuf_currenttoken == M2Reserved_whiletok)
4903 : : {
4904 : : /* avoid dangling else. */
4905 : 183980 : WhileStatement (stopset0, stopset1, stopset2);
4906 : : }
4907 : : else if (M2LexBuf_currenttoken == M2Reserved_repeattok)
4908 : : {
4909 : : /* avoid dangling else. */
4910 : 53596 : RepeatStatement (stopset0, stopset1, stopset2);
4911 : : }
4912 : : else if (M2LexBuf_currenttoken == M2Reserved_looptok)
4913 : : {
4914 : : /* avoid dangling else. */
4915 : 8212 : LoopStatement (stopset0, stopset1, stopset2);
4916 : : }
4917 : : else if (M2LexBuf_currenttoken == M2Reserved_fortok)
4918 : : {
4919 : : /* avoid dangling else. */
4920 : 12700 : ForStatement (stopset0, stopset1, stopset2);
4921 : : }
4922 : : else if (M2LexBuf_currenttoken == M2Reserved_withtok)
4923 : : {
4924 : : /* avoid dangling else. */
4925 : 131510 : WithStatement (stopset0, stopset1, stopset2);
4926 : : }
4927 : : else if (M2LexBuf_currenttoken == M2Reserved_asmtok)
4928 : : {
4929 : : /* avoid dangling else. */
4930 : 24 : AsmStatement (stopset0, stopset1, stopset2);
4931 : : }
4932 : : else if (M2LexBuf_currenttoken == M2Reserved_exittok)
4933 : : {
4934 : : /* avoid dangling else. */
4935 : 106 : Expect (M2Reserved_exittok, stopset0, stopset1, stopset2);
4936 : : }
4937 : : else if (M2LexBuf_currenttoken == M2Reserved_returntok)
4938 : : {
4939 : : /* avoid dangling else. */
4940 : 526376 : Expect (M2Reserved_returntok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4941 : 526376 : if ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_nottok)) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))))) != 0))))
4942 : : {
4943 : 513092 : Expression (stopset0, stopset1, stopset2);
4944 : : }
4945 : : }
4946 : : else if (M2LexBuf_currenttoken == M2Reserved_retrytok)
4947 : : {
4948 : : /* avoid dangling else. */
4949 : 126 : RetryStatement (stopset0, stopset1, stopset2);
4950 : : }
4951 : : else
4952 : : {
4953 : : /* avoid dangling else. */
4954 : 0 : ErrorArray ((const char *) "expecting one of: {%KRETRY} {%KRETURN} {%KEXIT} {%KASM} {%KWITH} {%KFOR} {%KLOOP} {%KREPEAT} {%KWHILE} {%KCASE} {%KIF} {%Kidentifier}", 133);
4955 : : }
4956 : : }
4957 : : /* end of optional [ | ] expression */
4958 : 6143708 : }
4959 : :
4960 : :
4961 : : /*
4962 : : RetryStatement := 'RETRY'
4963 : :
4964 : : first symbols:retrytok
4965 : :
4966 : : cannot reachend
4967 : : */
4968 : :
4969 : 126 : static void RetryStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4970 : : {
4971 : 126 : Expect (M2Reserved_retrytok, stopset0, stopset1, stopset2);
4972 : 126 : }
4973 : :
4974 : :
4975 : : /*
4976 : : AssignmentOrProcedureCall := Designator ( ':=' Expression |
4977 : : ActualParameters |
4978 : :
4979 : : % epsilon %
4980 : : )
4981 : :
4982 : : first symbols:identtok
4983 : :
4984 : : cannot reachend
4985 : : */
4986 : :
4987 : 4080760 : static void AssignmentOrProcedureCall (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
4988 : : {
4989 : 4080760 : Designator (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_becomestok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
4990 : 4080760 : if (M2LexBuf_currenttoken == M2Reserved_becomestok)
4991 : : {
4992 : 2030093 : Expect (M2Reserved_becomestok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
4993 : 2030093 : Expression (stopset0, stopset1, stopset2);
4994 : : }
4995 : 2050667 : else if (M2LexBuf_currenttoken == M2Reserved_lparatok)
4996 : : {
4997 : : /* avoid dangling else. */
4998 : 1842558 : ActualParameters (stopset0, stopset1, stopset2);
4999 : : }
5000 : : /* epsilon */
5001 : 4080760 : }
5002 : :
5003 : :
5004 : : /*
5005 : : StatementSequence := Statement { ';' Statement }
5006 : :
5007 : : first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok
5008 : :
5009 : : reachend
5010 : : */
5011 : :
5012 : 2934631 : static void StatementSequence (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5013 : : {
5014 : 2934631 : Statement (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5015 : 9078339 : while (M2LexBuf_currenttoken == M2Reserved_semicolontok)
5016 : : {
5017 : 3209077 : Expect (M2Reserved_semicolontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5018 : 3209077 : Statement (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5019 : : }
5020 : : /* while */
5021 : 2934631 : }
5022 : :
5023 : :
5024 : : /*
5025 : : IfStatement := 'IF' Expression 'THEN' StatementSequence
5026 : : { 'ELSIF' Expression 'THEN' StatementSequence }
5027 : : [ 'ELSE' StatementSequence ] 'END'
5028 : :
5029 : : first symbols:iftok
5030 : :
5031 : : cannot reachend
5032 : : */
5033 : :
5034 : 1030876 : static void IfStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5035 : : {
5036 : 1030876 : Expect (M2Reserved_iftok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5037 : 1030876 : Expression (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_thentok-M2Reserved_unqualifiedtok))));
5038 : 1030876 : Expect (M2Reserved_thentok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsiftok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5039 : 1030876 : StatementSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_elsiftok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5040 : 2152946 : while (M2LexBuf_currenttoken == M2Reserved_elsiftok)
5041 : : {
5042 : 91194 : Expect (M2Reserved_elsiftok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5043 : 91194 : Expression (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_thentok-M2Reserved_unqualifiedtok))));
5044 : 91194 : Expect (M2Reserved_thentok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsiftok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5045 : 91194 : StatementSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsiftok-M2Reserved_arraytok))), stopset2);
5046 : : }
5047 : : /* while */
5048 : 1030876 : if (M2LexBuf_currenttoken == M2Reserved_elsetok)
5049 : : {
5050 : 421689 : Expect (M2Reserved_elsetok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5051 : 421689 : StatementSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5052 : : }
5053 : 1030876 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
5054 : 1030876 : }
5055 : :
5056 : :
5057 : : /*
5058 : : CaseStatement := 'CASE' Expression 'OF' Case { '|'
5059 : : Case }
5060 : : [ 'ELSE' StatementSequence ] 'END'
5061 : :
5062 : : first symbols:casetok
5063 : :
5064 : : cannot reachend
5065 : : */
5066 : :
5067 : 4426 : static void CaseStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5068 : : {
5069 : 4426 : Expect (M2Reserved_casetok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5070 : 4426 : Expression (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_oftok-M2Reserved_arraytok))), stopset2);
5071 : 4426 : Expect (M2Reserved_oftok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_bartok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
5072 : 4426 : Case (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_bartok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5073 : 17774 : while (M2LexBuf_currenttoken == M2Reserved_bartok)
5074 : : {
5075 : 8922 : Expect (M2Reserved_bartok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_bartok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsetok-M2Reserved_arraytok)) | (1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
5076 : 8922 : Case (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_bartok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_elsetok-M2Reserved_arraytok))), stopset2);
5077 : : }
5078 : : /* while */
5079 : 4426 : if (M2LexBuf_currenttoken == M2Reserved_elsetok)
5080 : : {
5081 : 3646 : Expect (M2Reserved_elsetok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5082 : 3646 : StatementSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5083 : : }
5084 : 4426 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
5085 : 4426 : }
5086 : :
5087 : :
5088 : : /*
5089 : : Case := [ CaseLabelList ':' StatementSequence ]
5090 : :
5091 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
5092 : :
5093 : : reachend
5094 : : */
5095 : :
5096 : 13348 : static void Case (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5097 : : {
5098 : 13348 : if ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_nottok)) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))))) != 0))))
5099 : : {
5100 : 13242 : CaseLabelList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
5101 : 13242 : Expect (M2Reserved_colontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5102 : 13242 : StatementSequence (stopset0, stopset1, stopset2);
5103 : : }
5104 : 13348 : }
5105 : :
5106 : :
5107 : : /*
5108 : : WhileStatement := 'WHILE' Expression 'DO' StatementSequence
5109 : : 'END'
5110 : :
5111 : : first symbols:whiletok
5112 : :
5113 : : cannot reachend
5114 : : */
5115 : :
5116 : 183980 : static void WhileStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5117 : : {
5118 : 183980 : Expect (M2Reserved_whiletok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5119 : 183980 : Expression (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_dotok-M2Reserved_arraytok))), stopset2);
5120 : 183980 : Expect (M2Reserved_dotok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5121 : 183980 : StatementSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5122 : 183980 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
5123 : 183980 : }
5124 : :
5125 : :
5126 : : /*
5127 : : RepeatStatement := 'REPEAT' StatementSequence 'UNTIL'
5128 : : Expression
5129 : :
5130 : : first symbols:repeattok
5131 : :
5132 : : cannot reachend
5133 : : */
5134 : :
5135 : 53596 : static void RepeatStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5136 : : {
5137 : 53596 : Expect (M2Reserved_repeattok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_untiltok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5138 : 53596 : StatementSequence (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_untiltok-M2Reserved_unqualifiedtok))));
5139 : 53596 : Expect (M2Reserved_untiltok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5140 : 53596 : Expression (stopset0, stopset1, stopset2);
5141 : 53596 : }
5142 : :
5143 : :
5144 : : /*
5145 : : ForStatement := 'FOR' Ident ':=' Expression 'TO'
5146 : : Expression [ 'BY' ConstExpression ]
5147 : : 'DO' StatementSequence 'END'
5148 : :
5149 : : first symbols:fortok
5150 : :
5151 : : cannot reachend
5152 : : */
5153 : :
5154 : 12700 : static void ForStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5155 : : {
5156 : 12700 : Expect (M2Reserved_fortok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5157 : 12700 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_becomestok-M2Reserved_eoftok))), stopset1, stopset2);
5158 : 12700 : Expect (M2Reserved_becomestok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5159 : 12700 : Expression (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_totok-M2Reserved_unqualifiedtok))));
5160 : 12700 : Expect (M2Reserved_totok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5161 : 12700 : Expression (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_bytok-M2Reserved_arraytok)) | (1 << (M2Reserved_dotok-M2Reserved_arraytok))), stopset2);
5162 : 12700 : if (M2LexBuf_currenttoken == M2Reserved_bytok)
5163 : : {
5164 : 342 : Expect (M2Reserved_bytok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
5165 : 342 : ConstExpression (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_dotok-M2Reserved_arraytok))), stopset2);
5166 : : }
5167 : 12700 : Expect (M2Reserved_dotok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5168 : 12700 : StatementSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5169 : 12700 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
5170 : 12700 : }
5171 : :
5172 : :
5173 : : /*
5174 : : LoopStatement := 'LOOP' StatementSequence 'END'
5175 : :
5176 : : first symbols:looptok
5177 : :
5178 : : cannot reachend
5179 : : */
5180 : :
5181 : 8212 : static void LoopStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5182 : : {
5183 : 8212 : Expect (M2Reserved_looptok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5184 : 8212 : StatementSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5185 : 8212 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
5186 : 8212 : }
5187 : :
5188 : :
5189 : : /*
5190 : : WithStatement := 'WITH' Designator 'DO' StatementSequence
5191 : : 'END'
5192 : :
5193 : : first symbols:withtok
5194 : :
5195 : : cannot reachend
5196 : : */
5197 : :
5198 : 131510 : static void WithStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5199 : : {
5200 : 131510 : Expect (M2Reserved_withtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5201 : 131510 : Designator (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_dotok-M2Reserved_arraytok))), stopset2);
5202 : 131510 : Expect (M2Reserved_dotok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5203 : 131510 : StatementSequence (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5204 : 131510 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
5205 : 131510 : }
5206 : :
5207 : :
5208 : : /*
5209 : : ProcedureDeclaration :=
5210 : : % VAR top: CARDINAL ; %
5211 : :
5212 : : % top := Top () %
5213 : : ProcedureHeading ';' PostProcedureHeading
5214 : :
5215 : : % BlockAssert (top = Top ()) %
5216 : :
5217 : :
5218 : : first symbols:proceduretok
5219 : :
5220 : : cannot reachend
5221 : : */
5222 : :
5223 : 945279 : static void ProcedureDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5224 : : {
5225 : 945279 : unsigned int top;
5226 : :
5227 : 945279 : top = M2Quads_Top ();
5228 : 945279 : ProcedureHeading (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5229 : 945279 : Expect (M2Reserved_semicolontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_forwardtok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
5230 : 945279 : PostProcedureHeading (stopset0, stopset1, stopset2);
5231 : 945279 : BlockAssert (top == (M2Quads_Top ()));
5232 : 945273 : }
5233 : :
5234 : :
5235 : : /*
5236 : : PostProcedureHeading := ProperProcedure |
5237 : : ForwardDeclaration
5238 : :
5239 : : first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok, forwardtok
5240 : :
5241 : : cannot reachend
5242 : : */
5243 : :
5244 : 945279 : static void PostProcedureHeading (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5245 : : {
5246 : 945279 : if ((((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))))) != 0))) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))))) != 0))))
5247 : : {
5248 : 945213 : ProperProcedure (stopset0, stopset1, stopset2);
5249 : : }
5250 : 66 : else if (M2LexBuf_currenttoken == M2Reserved_forwardtok)
5251 : : {
5252 : : /* avoid dangling else. */
5253 : 120 : ForwardDeclaration (stopset0, stopset1, stopset2);
5254 : : }
5255 : : else
5256 : : {
5257 : : /* avoid dangling else. */
5258 : 6 : ErrorArray ((const char *) "expecting one of: {%KFORWARD} {%KEND} {%KBEGIN} {%KCONST} {%KTYPE} {%KVAR} {%KPROCEDURE} {%KMODULE}", 99);
5259 : : }
5260 : 945279 : }
5261 : :
5262 : :
5263 : : /*
5264 : : ForwardDeclaration := 'FORWARD'
5265 : : % EndForward %
5266 : :
5267 : :
5268 : : first symbols:forwardtok
5269 : :
5270 : : cannot reachend
5271 : : */
5272 : :
5273 : 60 : static void ForwardDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5274 : : {
5275 : 60 : Expect (M2Reserved_forwardtok, stopset0, stopset1, stopset2);
5276 : 60 : P0SymBuild_EndForward ();
5277 : 60 : }
5278 : :
5279 : :
5280 : : /*
5281 : : ProperProcedure := ProcedureBlock
5282 : : % PushAutoOn %
5283 : : Ident
5284 : : % EndProcedure %
5285 : :
5286 : : % PopAuto %
5287 : :
5288 : :
5289 : : first symbols:moduletok, proceduretok, vartok, typetok, consttok, begintok, endtok
5290 : :
5291 : : cannot reachend
5292 : : */
5293 : :
5294 : 945213 : static void ProperProcedure (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5295 : : {
5296 : 945213 : ProcedureBlock (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5297 : 945213 : M2Quads_PushAutoOn ();
5298 : 945213 : Ident (stopset0, stopset1, stopset2);
5299 : 945213 : P0SymBuild_EndProcedure ();
5300 : 945213 : M2Quads_PopAuto ();
5301 : 945213 : }
5302 : :
5303 : :
5304 : : /*
5305 : : DefineBuiltinProcedure := [ '__ATTRIBUTE__' '__BUILTIN__'
5306 : : '(' '(' Ident ')' ')' |
5307 : : '__INLINE__' ]
5308 : :
5309 : : first symbols:inlinetok, attributetok
5310 : :
5311 : : reachend
5312 : : */
5313 : :
5314 : 945279 : static void DefineBuiltinProcedure (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5315 : : {
5316 : 945279 : if ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_inlinetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))))) != 0)))
5317 : : {
5318 : : /* avoid gcc warning by using compound statement even if not strictly necessary. */
5319 : : /* seen optional [ | ] expression */
5320 : 50952 : if (M2LexBuf_currenttoken == M2Reserved_attributetok)
5321 : : {
5322 : 50952 : Expect (M2Reserved_attributetok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_builtintok-M2Reserved_unqualifiedtok))));
5323 : 50952 : Expect (M2Reserved_builtintok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
5324 : 50952 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
5325 : 50952 : Expect (M2Reserved_lparatok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5326 : 50952 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
5327 : 50952 : Expect (M2Reserved_rparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
5328 : 50952 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
5329 : : }
5330 : 0 : else if (M2LexBuf_currenttoken == M2Reserved_inlinetok)
5331 : : {
5332 : : /* avoid dangling else. */
5333 : 0 : Expect (M2Reserved_inlinetok, stopset0, stopset1, stopset2);
5334 : : }
5335 : : else
5336 : : {
5337 : : /* avoid dangling else. */
5338 : 0 : ErrorArray ((const char *) "expecting one of: {%K__INLINE__} {%K__ATTRIBUTE__}", 50);
5339 : : }
5340 : : }
5341 : : /* end of optional [ | ] expression */
5342 : 945279 : }
5343 : :
5344 : :
5345 : : /*
5346 : : ProcedureHeading := 'PROCEDURE'
5347 : : % M2Error.DefaultProcedure %
5348 : : DefineBuiltinProcedure (
5349 : : % PushAutoOn %
5350 : : Ident
5351 : :
5352 : : % RegisterProcedure %
5353 : :
5354 : : % PopAuto %
5355 : : [ FormalParameters ]
5356 : : AttributeNoReturn )
5357 : :
5358 : : first symbols:proceduretok
5359 : :
5360 : : cannot reachend
5361 : : */
5362 : :
5363 : 945279 : static void ProcedureHeading (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5364 : : {
5365 : 945279 : Expect (M2Reserved_proceduretok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_inlinetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5366 : 945279 : M2Error_DefaultProcedure ();
5367 : 945279 : DefineBuiltinProcedure (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5368 : 945279 : M2Quads_PushAutoOn ();
5369 : 945279 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
5370 : 945279 : P0SymBuild_RegisterProcedure ();
5371 : 945279 : M2Quads_PopAuto ();
5372 : 945279 : if (M2LexBuf_currenttoken == M2Reserved_lparatok)
5373 : : {
5374 : 865808 : FormalParameters (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
5375 : : }
5376 : 945279 : AttributeNoReturn (stopset0, stopset1, stopset2);
5377 : 945279 : }
5378 : :
5379 : :
5380 : : /*
5381 : : AttributeNoReturn := [ '' ]
5382 : :
5383 : : first symbols:ldirectivetok
5384 : :
5385 : : reachend
5386 : : */
5387 : :
5388 : 2883778 : static void AttributeNoReturn (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5389 : : {
5390 : 2883778 : if (M2LexBuf_currenttoken == M2Reserved_ldirectivetok)
5391 : : {
5392 : 450547 : Expect (M2Reserved_ldirectivetok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5393 : 450547 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rdirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
5394 : 450547 : Expect (M2Reserved_rdirectivetok, stopset0, stopset1, stopset2);
5395 : : }
5396 : 2883778 : }
5397 : :
5398 : :
5399 : : /*
5400 : : AttributeUnused := [ '' ]
5401 : :
5402 : : first symbols:ldirectivetok
5403 : :
5404 : : reachend
5405 : : */
5406 : :
5407 : 0 : static void AttributeUnused (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5408 : : {
5409 : 0 : if (M2LexBuf_currenttoken == M2Reserved_ldirectivetok)
5410 : : {
5411 : 0 : Expect (M2Reserved_ldirectivetok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5412 : 0 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rdirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
5413 : 0 : Expect (M2Reserved_rdirectivetok, stopset0, stopset1, stopset2);
5414 : : }
5415 : 0 : }
5416 : :
5417 : :
5418 : : /*
5419 : : Builtin := [ '__BUILTIN__'
5420 : : % PutModuleContainsBuiltin %
5421 : : | '__INLINE__' ]
5422 : :
5423 : : first symbols:inlinetok, builtintok
5424 : :
5425 : : reachend
5426 : : */
5427 : :
5428 : 1938499 : static void Builtin (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5429 : : {
5430 : 1938499 : if ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_inlinetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_builtintok-M2Reserved_unqualifiedtok))))) != 0)))
5431 : : {
5432 : : /* avoid gcc warning by using compound statement even if not strictly necessary. */
5433 : : /* seen optional [ | ] expression */
5434 : 50500 : if (M2LexBuf_currenttoken == M2Reserved_builtintok)
5435 : : {
5436 : 50500 : Expect (M2Reserved_builtintok, stopset0, stopset1, stopset2);
5437 : 50500 : SymbolTable_PutModuleContainsBuiltin ();
5438 : : }
5439 : 0 : else if (M2LexBuf_currenttoken == M2Reserved_inlinetok)
5440 : : {
5441 : : /* avoid dangling else. */
5442 : 0 : Expect (M2Reserved_inlinetok, stopset0, stopset1, stopset2);
5443 : : }
5444 : : else
5445 : : {
5446 : : /* avoid dangling else. */
5447 : 0 : ErrorArray ((const char *) "expecting one of: {%K__INLINE__} {%K__BUILTIN__}", 48);
5448 : : }
5449 : : }
5450 : : /* end of optional [ | ] expression */
5451 : 1938499 : }
5452 : :
5453 : :
5454 : : /*
5455 : : DefProcedureHeading := 'PROCEDURE'
5456 : : % M2Error.DefaultProcedure %
5457 : : Builtin ( Ident [ DefFormalParameters ]
5458 : : AttributeNoReturn )
5459 : :
5460 : : % M2Error.LeaveErrorScope %
5461 : :
5462 : :
5463 : : first symbols:proceduretok
5464 : :
5465 : : cannot reachend
5466 : : */
5467 : :
5468 : 1938499 : static void DefProcedureHeading (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5469 : : {
5470 : 1938499 : Expect (M2Reserved_proceduretok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_inlinetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_builtintok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5471 : 1938499 : M2Error_DefaultProcedure ();
5472 : 1938499 : Builtin (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5473 : 1938499 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
5474 : 1938499 : if (M2LexBuf_currenttoken == M2Reserved_lparatok)
5475 : : {
5476 : 1840887 : DefFormalParameters (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
5477 : : }
5478 : 1938499 : AttributeNoReturn (stopset0, stopset1, stopset2);
5479 : 1938499 : M2Error_LeaveErrorScope ();
5480 : 1938499 : }
5481 : :
5482 : :
5483 : : /*
5484 : : ProcedureBlock := { Declaration } [ 'BEGIN' BlockBody ]
5485 : : 'END'
5486 : :
5487 : : first symbols:proceduretok, moduletok, consttok, typetok, vartok, endtok, begintok
5488 : :
5489 : : cannot reachend
5490 : : */
5491 : :
5492 : 945213 : static void ProcedureBlock (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5493 : : {
5494 : 1367146 : while ((((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))))) != 0))) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))))) != 0))))
5495 : : {
5496 : 421933 : Declaration (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
5497 : : }
5498 : : /* while */
5499 : 945213 : if (M2LexBuf_currenttoken == M2Reserved_begintok)
5500 : : {
5501 : 942207 : Expect (M2Reserved_begintok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_excepttok-M2Reserved_arraytok)) | (1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5502 : 942207 : BlockBody (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5503 : : }
5504 : 945213 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
5505 : 945213 : }
5506 : :
5507 : :
5508 : : /*
5509 : : Block := { Declaration } InitialBlock FinalBlock
5510 : : 'END'
5511 : :
5512 : : first symbols:proceduretok, moduletok, finallytok, begintok, consttok, typetok, vartok, endtok
5513 : :
5514 : : cannot reachend
5515 : : */
5516 : :
5517 : 63959 : static void Block (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5518 : : {
5519 : 1094814 : while ((((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))))) != 0))) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))))) != 0))))
5520 : : {
5521 : 1030867 : Declaration (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_finallytok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
5522 : : }
5523 : : /* while */
5524 : 63947 : InitialBlock (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_finallytok-M2Reserved_arraytok))), stopset2);
5525 : 63947 : FinalBlock (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok))), stopset2);
5526 : 63947 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2);
5527 : 63947 : }
5528 : :
5529 : :
5530 : : /*
5531 : : InitialBlock := [ 'BEGIN' BlockBody ]
5532 : :
5533 : : first symbols:begintok
5534 : :
5535 : : reachend
5536 : : */
5537 : :
5538 : 63947 : static void InitialBlock (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5539 : : {
5540 : 63947 : if (M2LexBuf_currenttoken == M2Reserved_begintok)
5541 : : {
5542 : 35979 : Expect (M2Reserved_begintok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_excepttok-M2Reserved_arraytok)) | (1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5543 : 35979 : BlockBody (stopset0, stopset1, stopset2);
5544 : : }
5545 : 63947 : }
5546 : :
5547 : :
5548 : : /*
5549 : : FinalBlock := [ 'FINALLY' BlockBody ]
5550 : :
5551 : : first symbols:finallytok
5552 : :
5553 : : reachend
5554 : : */
5555 : :
5556 : 63947 : static void FinalBlock (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5557 : : {
5558 : 63947 : if (M2LexBuf_currenttoken == M2Reserved_finallytok)
5559 : : {
5560 : 5614 : Expect (M2Reserved_finallytok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_excepttok-M2Reserved_arraytok)) | (1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok))));
5561 : 5614 : BlockBody (stopset0, stopset1, stopset2);
5562 : : }
5563 : 63947 : }
5564 : :
5565 : :
5566 : : /*
5567 : : BlockBody := NormalPart [ 'EXCEPT' ExceptionalPart ]
5568 : :
5569 : : first symbols:identtok, iftok, casetok, whiletok, repeattok, looptok, fortok, withtok, asmtok, retrytok, semicolontok, exittok, returntok, excepttok
5570 : :
5571 : : reachend
5572 : : */
5573 : :
5574 : 983800 : static void BlockBody (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5575 : : {
5576 : 1967600 : NormalPart (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_excepttok-M2Reserved_arraytok))), stopset2);
5577 : 983800 : if (M2LexBuf_currenttoken == M2Reserved_excepttok)
5578 : : {
5579 : 186 : Expect (M2Reserved_excepttok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_exittok-M2Reserved_arraytok)) | (1 << (M2Reserved_fortok-M2Reserved_arraytok)) | (1 << (M2Reserved_looptok-M2Reserved_arraytok)) | (1 << (M2Reserved_casetok-M2Reserved_arraytok)) | (1 << (M2Reserved_iftok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_returntok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_retrytok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_asmtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_withtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_repeattok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_whiletok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5580 : 186 : ExceptionalPart (stopset0, stopset1, stopset2);
5581 : : }
5582 : 983800 : }
5583 : :
5584 : :
5585 : : /*
5586 : : NormalPart := StatementSequence
5587 : :
5588 : : first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
5589 : :
5590 : : reachend
5591 : : */
5592 : :
5593 : 983800 : static void NormalPart (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5594 : : {
5595 : 983800 : StatementSequence (stopset0, stopset1, stopset2);
5596 : 0 : }
5597 : :
5598 : :
5599 : : /*
5600 : : ExceptionalPart := StatementSequence
5601 : :
5602 : : first symbols:retrytok, asmtok, withtok, fortok, looptok, repeattok, whiletok, casetok, iftok, identtok, returntok, exittok, semicolontok
5603 : :
5604 : : reachend
5605 : : */
5606 : :
5607 : 186 : static void ExceptionalPart (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5608 : : {
5609 : 186 : StatementSequence (stopset0, stopset1, stopset2);
5610 : 186 : }
5611 : :
5612 : :
5613 : : /*
5614 : : Declaration := 'CONST' { ConstantDeclaration ';' } |
5615 : : 'TYPE' { TypeDeclaration ';' } |
5616 : : 'VAR' { VariableDeclaration ';' } |
5617 : : ProcedureDeclaration ';' |
5618 : : ModuleDeclaration ';'
5619 : :
5620 : : first symbols:moduletok, proceduretok, vartok, typetok, consttok
5621 : :
5622 : : cannot reachend
5623 : : */
5624 : :
5625 : 1452800 : static void Declaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5626 : : {
5627 : 1452800 : if (M2LexBuf_currenttoken == M2Reserved_consttok)
5628 : : {
5629 : 30304 : Expect (M2Reserved_consttok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5630 : 118872 : while (M2LexBuf_currenttoken == M2Reserved_identtok)
5631 : : {
5632 : 58264 : ConstantDeclaration (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5633 : 58264 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5634 : : }
5635 : : /* while */
5636 : : }
5637 : : else if (M2LexBuf_currenttoken == M2Reserved_typetok)
5638 : : {
5639 : : /* avoid dangling else. */
5640 : 24304 : Expect (M2Reserved_typetok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5641 : 121088 : while (M2LexBuf_currenttoken == M2Reserved_identtok)
5642 : : {
5643 : 72480 : TypeDeclaration (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5644 : 72480 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5645 : : }
5646 : : /* while */
5647 : : }
5648 : : else if (M2LexBuf_currenttoken == M2Reserved_vartok)
5649 : : {
5650 : : /* avoid dangling else. */
5651 : 452487 : Expect (M2Reserved_vartok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5652 : 1604104 : while (M2LexBuf_currenttoken == M2Reserved_identtok)
5653 : : {
5654 : 699130 : VariableDeclaration (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5655 : 699130 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5656 : : }
5657 : : /* while */
5658 : : }
5659 : : else if (M2LexBuf_currenttoken == M2Reserved_proceduretok)
5660 : : {
5661 : : /* avoid dangling else. */
5662 : 945279 : ProcedureDeclaration (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5663 : 945273 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2);
5664 : : }
5665 : : else if (M2LexBuf_currenttoken == M2Reserved_moduletok)
5666 : : {
5667 : : /* avoid dangling else. */
5668 : 426 : ModuleDeclaration (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5669 : 420 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2);
5670 : : }
5671 : : else
5672 : : {
5673 : : /* avoid dangling else. */
5674 : 0 : ErrorArray ((const char *) "expecting one of: {%KMODULE} {%KPROCEDURE} {%KVAR} {%KTYPE} {%KCONST}", 69);
5675 : : }
5676 : 1452788 : }
5677 : :
5678 : :
5679 : : /*
5680 : : DefFormalParameters := '(' [ DefMultiFPSection ]
5681 : : ')' FormalReturn
5682 : :
5683 : : first symbols:lparatok
5684 : :
5685 : : cannot reachend
5686 : : */
5687 : :
5688 : 1840887 : static void DefFormalParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5689 : : {
5690 : 1840887 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
5691 : 1840887 : if ((M2LexBuf_currenttoken == M2Reserved_lsbratok) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))))) != 0))))
5692 : : {
5693 : 1692806 : DefMultiFPSection (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
5694 : : }
5695 : 1840887 : Expect (M2Reserved_rparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
5696 : 1840887 : FormalReturn (stopset0, stopset1, stopset2);
5697 : 1840887 : }
5698 : :
5699 : :
5700 : : /*
5701 : : DefMultiFPSection := DefExtendedFP |
5702 : : FPSection [ ';' DefMultiFPSection ]
5703 : :
5704 : : first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
5705 : :
5706 : : cannot reachend
5707 : : */
5708 : :
5709 : 1692806 : static void DefMultiFPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5710 : : {
5711 : 3377193 : if ((M2LexBuf_currenttoken == M2Reserved_lsbratok) || (M2LexBuf_currenttoken == M2Reserved_periodperiodperiodtok))
5712 : : {
5713 : 25031 : DefExtendedFP (stopset0, stopset1, stopset2);
5714 : : }
5715 : 3352162 : else if ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))))) != 0)))
5716 : : {
5717 : : /* avoid dangling else. */
5718 : 3352162 : FPSection (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5719 : 3352162 : if (M2LexBuf_currenttoken == M2Reserved_semicolontok)
5720 : : {
5721 : 1684387 : Expect (M2Reserved_semicolontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
5722 : 1684387 : DefMultiFPSection (stopset0, stopset1, stopset2);
5723 : : }
5724 : : }
5725 : : else
5726 : : {
5727 : : /* avoid dangling else. */
5728 : 0 : ErrorArray ((const char *) "expecting one of: {%Kidentifier} {%KVAR} {%K...} {%K[}", 54);
5729 : : }
5730 : 1692806 : }
5731 : :
5732 : :
5733 : : /*
5734 : : FormalParameters := '(' [ MultiFPSection ] ')'
5735 : : FormalReturn
5736 : :
5737 : : first symbols:lparatok
5738 : :
5739 : : cannot reachend
5740 : : */
5741 : :
5742 : 865808 : static void FormalParameters (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5743 : : {
5744 : 865808 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
5745 : 865808 : if ((M2LexBuf_currenttoken == M2Reserved_lsbratok) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))))) != 0))))
5746 : : {
5747 : 819628 : MultiFPSection (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
5748 : : }
5749 : 865808 : Expect (M2Reserved_rparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
5750 : 865808 : FormalReturn (stopset0, stopset1, stopset2);
5751 : 865808 : }
5752 : :
5753 : :
5754 : : /*
5755 : : MultiFPSection := ExtendedFP | FPSection [ ';'
5756 : : MultiFPSection ]
5757 : :
5758 : : first symbols:identtok, vartok, lsbratok, periodperiodperiodtok
5759 : :
5760 : : cannot reachend
5761 : : */
5762 : :
5763 : 819628 : static void MultiFPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5764 : : {
5765 : 1511372 : if ((M2LexBuf_currenttoken == M2Reserved_lsbratok) || (M2LexBuf_currenttoken == M2Reserved_periodperiodperiodtok))
5766 : : {
5767 : 2618 : ExtendedFP (stopset0, stopset1, stopset2);
5768 : : }
5769 : 1508754 : else if ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))))) != 0)))
5770 : : {
5771 : : /* avoid dangling else. */
5772 : 1508748 : FPSection (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
5773 : 1508748 : if (M2LexBuf_currenttoken == M2Reserved_semicolontok)
5774 : : {
5775 : 691744 : Expect (M2Reserved_semicolontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_periodperiodperiodtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
5776 : 691744 : MultiFPSection (stopset0, stopset1, stopset2);
5777 : : }
5778 : : }
5779 : : else
5780 : : {
5781 : : /* avoid dangling else. */
5782 : 6 : ErrorArray ((const char *) "expecting one of: {%Kidentifier} {%KVAR} {%K...} {%K[}", 54);
5783 : : }
5784 : 819628 : }
5785 : :
5786 : :
5787 : : /*
5788 : : FPSection := NonVarFPSection |
5789 : : VarFPSection
5790 : :
5791 : : first symbols:vartok, identtok
5792 : :
5793 : : cannot reachend
5794 : : */
5795 : :
5796 : 4860910 : static void FPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5797 : : {
5798 : 4860910 : if (M2LexBuf_currenttoken == M2Reserved_identtok)
5799 : : {
5800 : 4427792 : NonVarFPSection (stopset0, stopset1, stopset2);
5801 : : }
5802 : 433118 : else if (M2LexBuf_currenttoken == M2Reserved_vartok)
5803 : : {
5804 : : /* avoid dangling else. */
5805 : 433118 : VarFPSection (stopset0, stopset1, stopset2);
5806 : : }
5807 : : else
5808 : : {
5809 : : /* avoid dangling else. */
5810 : 0 : ErrorArray ((const char *) "expecting one of: {%KVAR} {%Kidentifier}", 40);
5811 : : }
5812 : 4860910 : }
5813 : :
5814 : :
5815 : : /*
5816 : : DefExtendedFP := DefOptArg | '...'
5817 : :
5818 : : first symbols:lsbratok, periodperiodperiodtok
5819 : :
5820 : : cannot reachend
5821 : : */
5822 : :
5823 : 25031 : static void DefExtendedFP (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5824 : : {
5825 : 25031 : if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
5826 : : {
5827 : 14279 : DefOptArg (stopset0, stopset1, stopset2);
5828 : : }
5829 : 10752 : else if (M2LexBuf_currenttoken == M2Reserved_periodperiodperiodtok)
5830 : : {
5831 : : /* avoid dangling else. */
5832 : 10752 : Expect (M2Reserved_periodperiodperiodtok, stopset0, stopset1, stopset2);
5833 : : }
5834 : : else
5835 : : {
5836 : : /* avoid dangling else. */
5837 : 0 : ErrorArray ((const char *) "expecting one of: {%K...} {%K[}", 31);
5838 : : }
5839 : 25031 : }
5840 : :
5841 : :
5842 : : /*
5843 : : ExtendedFP := OptArg | '...'
5844 : :
5845 : : first symbols:lsbratok, periodperiodperiodtok
5846 : :
5847 : : cannot reachend
5848 : : */
5849 : :
5850 : 2618 : static void ExtendedFP (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5851 : : {
5852 : 2618 : if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
5853 : : {
5854 : 2618 : OptArg (stopset0, stopset1, stopset2);
5855 : : }
5856 : 0 : else if (M2LexBuf_currenttoken == M2Reserved_periodperiodperiodtok)
5857 : : {
5858 : : /* avoid dangling else. */
5859 : 0 : Expect (M2Reserved_periodperiodperiodtok, stopset0, stopset1, stopset2);
5860 : : }
5861 : : else
5862 : : {
5863 : : /* avoid dangling else. */
5864 : 0 : ErrorArray ((const char *) "expecting one of: {%K...} {%K[}", 31);
5865 : : }
5866 : 2618 : }
5867 : :
5868 : :
5869 : : /*
5870 : : VarFPSection := 'VAR' IdentList ':' FormalType [
5871 : : AttributeUnused ]
5872 : :
5873 : : first symbols:vartok
5874 : :
5875 : : cannot reachend
5876 : : */
5877 : :
5878 : 433118 : static void VarFPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5879 : : {
5880 : 433118 : Expect (M2Reserved_vartok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5881 : 433118 : IdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
5882 : 433118 : Expect (M2Reserved_colontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5883 : 433118 : FormalType (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
5884 : 433118 : if (M2LexBuf_currenttoken == M2Reserved_ldirectivetok)
5885 : : {
5886 : 0 : AttributeUnused (stopset0, stopset1, stopset2);
5887 : : }
5888 : 433118 : }
5889 : :
5890 : :
5891 : : /*
5892 : : NonVarFPSection := IdentList ':' FormalType [ AttributeUnused ]
5893 : :
5894 : : first symbols:identtok
5895 : :
5896 : : cannot reachend
5897 : : */
5898 : :
5899 : 4427792 : static void NonVarFPSection (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5900 : : {
5901 : 4427792 : IdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
5902 : 4427792 : Expect (M2Reserved_colontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5903 : 4427792 : FormalType (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok))), stopset1, stopset2);
5904 : 4427792 : if (M2LexBuf_currenttoken == M2Reserved_ldirectivetok)
5905 : : {
5906 : 0 : AttributeUnused (stopset0, stopset1, stopset2);
5907 : : }
5908 : 4427792 : }
5909 : :
5910 : :
5911 : : /*
5912 : : OptArg := '[' Ident ':' FormalType [ '=' ConstExpression ]
5913 : : ']'
5914 : :
5915 : : first symbols:lsbratok
5916 : :
5917 : : cannot reachend
5918 : : */
5919 : :
5920 : 2618 : static void OptArg (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5921 : : {
5922 : 2618 : Expect (M2Reserved_lsbratok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5923 : 2618 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
5924 : 2618 : Expect (M2Reserved_colontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5925 : 2618 : FormalType (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_equaltok-M2Reserved_eoftok)) | (1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
5926 : 2618 : if (M2LexBuf_currenttoken == M2Reserved_equaltok)
5927 : : {
5928 : 2572 : Expect (M2Reserved_equaltok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
5929 : 2572 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
5930 : : }
5931 : 2618 : Expect (M2Reserved_rsbratok, stopset0, stopset1, stopset2);
5932 : 2618 : }
5933 : :
5934 : :
5935 : : /*
5936 : : DefOptArg := '[' Ident ':' FormalType '=' ConstExpression
5937 : : ']'
5938 : :
5939 : : first symbols:lsbratok
5940 : :
5941 : : cannot reachend
5942 : : */
5943 : :
5944 : 14279 : static void DefOptArg (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5945 : : {
5946 : 14279 : Expect (M2Reserved_lsbratok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5947 : 14279 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
5948 : 14279 : Expect (M2Reserved_colontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5949 : 14279 : FormalType (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_equaltok-M2Reserved_eoftok))), stopset1, stopset2);
5950 : 14279 : Expect (M2Reserved_equaltok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
5951 : 14279 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
5952 : 14279 : Expect (M2Reserved_rsbratok, stopset0, stopset1, stopset2);
5953 : 14279 : }
5954 : :
5955 : :
5956 : : /*
5957 : : FormalType := { 'ARRAY' 'OF' } Qualident
5958 : :
5959 : : first symbols:identtok, arraytok
5960 : :
5961 : : cannot reachend
5962 : : */
5963 : :
5964 : 4954468 : static void FormalType (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
5965 : : {
5966 : 5457617 : while (M2LexBuf_currenttoken == M2Reserved_arraytok)
5967 : : {
5968 : 503149 : Expect (M2Reserved_arraytok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_oftok-M2Reserved_arraytok))), stopset2);
5969 : 503149 : Expect (M2Reserved_oftok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
5970 : : }
5971 : : /* while */
5972 : 4954468 : Qualident (stopset0, stopset1, stopset2);
5973 : 4954468 : }
5974 : :
5975 : :
5976 : : /*
5977 : : ModuleDeclaration := 'MODULE'
5978 : : % PushAutoOn %
5979 : :
5980 : : % M2Error.DefaultInnerModule %
5981 : : Ident
5982 : : % RegisterInnerModule %
5983 : :
5984 : : % PushAutoOff %
5985 : : [ Priority ] ';'
5986 : : % PushAutoOn %
5987 : : { Import
5988 : : % RegisterInnerImports %
5989 : : }
5990 : : % PopAuto %
5991 : : [ Export ] Block
5992 : : % PopAuto %
5993 : : Ident
5994 : : % EndModule %
5995 : :
5996 : : % PopAuto %
5997 : :
5998 : :
5999 : : first symbols:moduletok
6000 : :
6001 : : cannot reachend
6002 : : */
6003 : :
6004 : 426 : static void ModuleDeclaration (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6005 : : {
6006 : 426 : Expect (M2Reserved_moduletok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6007 : 426 : M2Quads_PushAutoOn ();
6008 : 426 : M2Error_DefaultInnerModule ();
6009 : 426 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1, stopset2);
6010 : 426 : P0SymBuild_RegisterInnerModule ();
6011 : 426 : M2Quads_PushAutoOff ();
6012 : 426 : if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
6013 : : {
6014 : 12 : Priority (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6015 : : }
6016 : 426 : Expect (M2Reserved_semicolontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_importtok-M2Reserved_arraytok)) | (1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_exporttok-M2Reserved_arraytok)) | (1 << (M2Reserved_finallytok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
6017 : 426 : M2Quads_PushAutoOn ();
6018 : 1074 : while (((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_importtok-M2Reserved_arraytok))))) != 0)))
6019 : : {
6020 : 222 : Import (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_finallytok-M2Reserved_arraytok)) | (1 << (M2Reserved_exporttok-M2Reserved_arraytok)) | (1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_importtok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok))));
6021 : 222 : P0SymBuild_RegisterInnerImports ();
6022 : : }
6023 : : /* while */
6024 : 426 : M2Quads_PopAuto ();
6025 : 426 : if (M2LexBuf_currenttoken == M2Reserved_exporttok)
6026 : : {
6027 : 288 : Export (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_begintok-M2Reserved_arraytok)) | (1 << (M2Reserved_finallytok-M2Reserved_arraytok)) | (1 << (M2Reserved_moduletok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok))));
6028 : : }
6029 : 420 : Block (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6030 : 420 : M2Quads_PopAuto ();
6031 : 420 : Ident (stopset0, stopset1, stopset2);
6032 : 420 : P0SymBuild_EndModule ();
6033 : 420 : M2Quads_PopAuto ();
6034 : 420 : }
6035 : :
6036 : :
6037 : : /*
6038 : : Priority := '[' ConstExpression ']'
6039 : :
6040 : : first symbols:lsbratok
6041 : :
6042 : : cannot reachend
6043 : : */
6044 : :
6045 : 50 : static void Priority (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6046 : : {
6047 : 50 : Expect (M2Reserved_lsbratok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
6048 : 50 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
6049 : 50 : Expect (M2Reserved_rsbratok, stopset0, stopset1, stopset2);
6050 : 50 : }
6051 : :
6052 : :
6053 : : /*
6054 : : Export := 'EXPORT' ( 'QUALIFIED' IdentList |
6055 : : 'UNQUALIFIED' IdentList |
6056 : : IdentList )
6057 : : % EnableImportCheck := TRUE %
6058 : : ';'
6059 : : % EnableImportCheck := FALSE %
6060 : :
6061 : :
6062 : : first symbols:exporttok
6063 : :
6064 : : cannot reachend
6065 : : */
6066 : :
6067 : 67896 : static void Export (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6068 : : {
6069 : 67896 : Expect (M2Reserved_exporttok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_qualifiedtok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_unqualifiedtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6070 : 67896 : if (M2LexBuf_currenttoken == M2Reserved_qualifiedtok)
6071 : : {
6072 : 61218 : Expect (M2Reserved_qualifiedtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6073 : 61218 : IdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6074 : : }
6075 : 6678 : else if (M2LexBuf_currenttoken == M2Reserved_unqualifiedtok)
6076 : : {
6077 : : /* avoid dangling else. */
6078 : 6390 : Expect (M2Reserved_unqualifiedtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6079 : 6390 : IdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6080 : : }
6081 : 288 : else if (M2LexBuf_currenttoken == M2Reserved_identtok)
6082 : : {
6083 : : /* avoid dangling else. */
6084 : 288 : IdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6085 : : }
6086 : : else
6087 : : {
6088 : : /* avoid dangling else. */
6089 : 0 : ErrorArray ((const char *) "expecting one of: {%Kidentifier} {%KUNQUALIFIED} {%KQUALIFIED}", 62);
6090 : : }
6091 : 67896 : EnableImportCheck = true;
6092 : 67896 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2);
6093 : 67890 : EnableImportCheck = false;
6094 : 67890 : }
6095 : :
6096 : :
6097 : : /*
6098 : : Import := 'FROM' Ident 'IMPORT' IdentList ';' |
6099 : : 'IMPORT'
6100 : : % PushTtok (ImportTok, GetTokenNo () -1)
6101 : : determines whether Ident or Module %
6102 : : IdentList ';'
6103 : :
6104 : : first symbols:importtok, fromtok
6105 : :
6106 : : cannot reachend
6107 : : */
6108 : :
6109 : 280218 : static void Import (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6110 : : {
6111 : 280218 : if (M2LexBuf_currenttoken == M2Reserved_fromtok)
6112 : : {
6113 : 246428 : Expect (M2Reserved_fromtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6114 : 246428 : Ident (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_importtok-M2Reserved_arraytok))), stopset2);
6115 : 246428 : Expect (M2Reserved_importtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6116 : 246428 : IdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6117 : 246428 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2);
6118 : : }
6119 : 33790 : else if (M2LexBuf_currenttoken == M2Reserved_importtok)
6120 : : {
6121 : : /* avoid dangling else. */
6122 : 33790 : Expect (M2Reserved_importtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6123 : : /* determines whether Ident or Module */
6124 : 33790 : M2Quads_PushTtok (M2Reserved_ImportTok, (M2LexBuf_GetTokenNo ())-1);
6125 : 33790 : IdentList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6126 : 33790 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2);
6127 : : }
6128 : : else
6129 : : {
6130 : : /* avoid dangling else. */
6131 : 0 : ErrorArray ((const char *) "expecting one of: {%KIMPORT} {%KFROM}", 37);
6132 : : }
6133 : 280218 : }
6134 : :
6135 : :
6136 : : /*
6137 : : DefinitionModule :=
6138 : : % VAR forC: BOOLEAN ; %
6139 : :
6140 : : % forC := FALSE %
6141 : : 'DEFINITION'
6142 : : % M2Error.DefaultDefinitionModule %
6143 : : 'MODULE' [ 'FOR' string
6144 : : % forC := TRUE %
6145 : : ]
6146 : : % PushAutoOn %
6147 : : Ident
6148 : : % RegisterDefinitionModule (forC) %
6149 : : ';' { Import
6150 : : % RegisterImports %
6151 : : }
6152 : : % PushAutoOff %
6153 : : [ Export ] { Definition }
6154 : :
6155 : : % PopAuto %
6156 : : 'END' Ident
6157 : : % EndModule %
6158 : : '.'
6159 : : % PopAuto %
6160 : :
6161 : :
6162 : : first symbols:definitiontok
6163 : :
6164 : : cannot reachend
6165 : : */
6166 : :
6167 : 115552 : static void DefinitionModule (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6168 : : {
6169 : 115552 : bool forC;
6170 : :
6171 : 115552 : forC = false;
6172 : 115552 : Expect (M2Reserved_definitiontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_moduletok-M2Reserved_arraytok))), stopset2);
6173 : 115552 : M2Error_DefaultDefinitionModule ();
6174 : 115552 : Expect (M2Reserved_moduletok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_fortok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6175 : 115552 : if (M2LexBuf_currenttoken == M2Reserved_fortok)
6176 : : {
6177 : 7764 : Expect (M2Reserved_fortok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
6178 : 7764 : string (stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6179 : 7764 : forC = true;
6180 : : }
6181 : 115552 : M2Quads_PushAutoOn ();
6182 : 115552 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6183 : 115552 : P0SymBuild_RegisterDefinitionModule (forC);
6184 : 115552 : Expect (M2Reserved_semicolontok, stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_importtok-M2Reserved_arraytok)) | (1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_exporttok-M2Reserved_arraytok)) | (1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok))));
6185 : 301420 : while (((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_importtok-M2Reserved_arraytok))))) != 0)))
6186 : : {
6187 : 70316 : Import (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_exporttok-M2Reserved_arraytok)) | (1 << (M2Reserved_fromtok-M2Reserved_arraytok)) | (1 << (M2Reserved_importtok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
6188 : 70316 : P0SymBuild_RegisterImports ();
6189 : : }
6190 : : /* while */
6191 : 115552 : M2Quads_PushAutoOff ();
6192 : 115552 : if (M2LexBuf_currenttoken == M2Reserved_exporttok)
6193 : : {
6194 : 67608 : Export (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
6195 : : }
6196 : 2147004 : while ((((M2LexBuf_currenttoken >= M2Reserved_arraytok) && (M2LexBuf_currenttoken < M2Reserved_unqualifiedtok)) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_arraytok)) & ((P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok))))) != 0))) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))))) != 0))))
6197 : : {
6198 : 2031452 : Definition (stopset0, stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_endtok-M2Reserved_arraytok)) | (1 << (M2Reserved_consttok-M2Reserved_arraytok)) | (1 << (M2Reserved_proceduretok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_typetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_vartok-M2Reserved_unqualifiedtok))));
6199 : : }
6200 : : /* while */
6201 : 115552 : M2Quads_PopAuto ();
6202 : 115552 : Expect (M2Reserved_endtok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6203 : 115552 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_periodtok-M2Reserved_eoftok))), stopset1, stopset2);
6204 : 115552 : P0SymBuild_EndModule ();
6205 : 115552 : Expect (M2Reserved_periodtok, stopset0, stopset1, stopset2);
6206 : 115552 : M2Quads_PopAuto ();
6207 : 115552 : }
6208 : :
6209 : :
6210 : : /*
6211 : : Definition := 'CONST' { ConstantDeclaration ';' } |
6212 : : 'TYPE' { Ident ( ';'
6213 : : % PutHiddenTypeDeclared %
6214 : : | '=' Type Alignment
6215 : : ';' ) } |
6216 : : 'VAR' { VariableDeclaration ';' } |
6217 : : DefProcedureHeading ';'
6218 : :
6219 : : first symbols:proceduretok, vartok, typetok, consttok
6220 : :
6221 : : cannot reachend
6222 : : */
6223 : :
6224 : 2031452 : static void Definition (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6225 : : {
6226 : 2031452 : if (M2LexBuf_currenttoken == M2Reserved_consttok)
6227 : : {
6228 : 22667 : Expect (M2Reserved_consttok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6229 : 224957 : while (M2LexBuf_currenttoken == M2Reserved_identtok)
6230 : : {
6231 : 179623 : ConstantDeclaration (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6232 : 179623 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6233 : : }
6234 : : /* while */
6235 : : }
6236 : 2008785 : else if (M2LexBuf_currenttoken == M2Reserved_typetok)
6237 : : {
6238 : : /* avoid dangling else. */
6239 : 66196 : Expect (M2Reserved_typetok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6240 : 254985 : while (M2LexBuf_currenttoken == M2Reserved_identtok)
6241 : : {
6242 : 122593 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok)) | (1 << (M2Reserved_equaltok-M2Reserved_eoftok))), stopset1, stopset2);
6243 : 122593 : if (M2LexBuf_currenttoken == M2Reserved_semicolontok)
6244 : : {
6245 : 22185 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6246 : 22185 : SymbolTable_PutHiddenTypeDeclared ();
6247 : : }
6248 : 100408 : else if (M2LexBuf_currenttoken == M2Reserved_equaltok)
6249 : : {
6250 : : /* avoid dangling else. */
6251 : 100408 : Expect (M2Reserved_equaltok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_proceduretok-M2Reserved_arraytok)) | (1 << (M2Reserved_pointertok-M2Reserved_arraytok)) | (1 << (M2Reserved_packedsettok-M2Reserved_arraytok)) | (1 << (M2Reserved_oftok-M2Reserved_arraytok)) | (1 << (M2Reserved_arraytok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_settok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_recordtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6252 : 100408 : Type (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_ldirectivetok-M2Reserved_eoftok)) | (1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6253 : 100408 : Alignment (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6254 : 100408 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6255 : : }
6256 : : else
6257 : : {
6258 : : /* avoid dangling else. */
6259 : 0 : ErrorArray ((const char *) "expecting one of: {%K=} {%K;}", 29);
6260 : : }
6261 : : }
6262 : : /* while */
6263 : : }
6264 : 1942589 : else if (M2LexBuf_currenttoken == M2Reserved_vartok)
6265 : : {
6266 : : /* avoid dangling else. */
6267 : 4090 : Expect (M2Reserved_vartok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6268 : 12254 : while (M2LexBuf_currenttoken == M2Reserved_identtok)
6269 : : {
6270 : 4074 : VariableDeclaration (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6271 : 4074 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6272 : : }
6273 : : /* while */
6274 : : }
6275 : 1938499 : else if (M2LexBuf_currenttoken == M2Reserved_proceduretok)
6276 : : {
6277 : : /* avoid dangling else. */
6278 : 1938499 : DefProcedureHeading (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_semicolontok-M2Reserved_eoftok))), stopset1, stopset2);
6279 : 1938499 : Expect (M2Reserved_semicolontok, stopset0, stopset1, stopset2);
6280 : : }
6281 : : else
6282 : : {
6283 : : /* avoid dangling else. */
6284 : 0 : ErrorArray ((const char *) "expecting one of: {%KPROCEDURE} {%KVAR} {%KTYPE} {%KCONST}", 58);
6285 : : }
6286 : 2031452 : }
6287 : :
6288 : :
6289 : : /*
6290 : : AsmStatement := 'ASM' [ 'VOLATILE' ] '(' AsmOperands
6291 : : ')'
6292 : :
6293 : : first symbols:asmtok
6294 : :
6295 : : cannot reachend
6296 : : */
6297 : :
6298 : 24 : static void AsmStatement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6299 : : {
6300 : 24 : Expect (M2Reserved_asmtok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_volatiletok-M2Reserved_unqualifiedtok))));
6301 : 24 : if (M2LexBuf_currenttoken == M2Reserved_volatiletok)
6302 : : {
6303 : 12 : Expect (M2Reserved_volatiletok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
6304 : : }
6305 : 24 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
6306 : 24 : AsmOperands (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
6307 : 24 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
6308 : 24 : }
6309 : :
6310 : :
6311 : : /*
6312 : : NamedOperand := '[' Ident ']'
6313 : :
6314 : : first symbols:lsbratok
6315 : :
6316 : : cannot reachend
6317 : : */
6318 : :
6319 : 0 : static void NamedOperand (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6320 : : {
6321 : 0 : Expect (M2Reserved_lsbratok, stopset0, stopset1, stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6322 : 0 : Ident (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rsbratok-M2Reserved_eoftok))), stopset1, stopset2);
6323 : 0 : Expect (M2Reserved_rsbratok, stopset0, stopset1, stopset2);
6324 : 0 : }
6325 : :
6326 : :
6327 : : /*
6328 : : AsmOperandName := [ NamedOperand ]
6329 : :
6330 : : first symbols:lsbratok
6331 : :
6332 : : reachend
6333 : : */
6334 : :
6335 : 24 : static void AsmOperandName (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6336 : : {
6337 : 0 : if (M2LexBuf_currenttoken == M2Reserved_lsbratok)
6338 : : {
6339 : 0 : NamedOperand (stopset0, stopset1, stopset2);
6340 : : }
6341 : 0 : }
6342 : :
6343 : :
6344 : : /*
6345 : : AsmOperands := ConstExpression [ ':' AsmList [ ':'
6346 : : AsmList
6347 : : [
6348 : : ':' TrashList ] ] ]
6349 : :
6350 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok
6351 : :
6352 : : cannot reachend
6353 : : */
6354 : :
6355 : 24 : static void AsmOperands (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6356 : : {
6357 : 24 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
6358 : 24 : if (M2LexBuf_currenttoken == M2Reserved_colontok)
6359 : : {
6360 : 18 : Expect (M2Reserved_colontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok)) | (1 << (M2Reserved_commatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
6361 : 18 : AsmList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
6362 : 18 : if (M2LexBuf_currenttoken == M2Reserved_colontok)
6363 : : {
6364 : 12 : Expect (M2Reserved_colontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok)) | (1 << (M2Reserved_commatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
6365 : 12 : AsmList (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_colontok-M2Reserved_eoftok))), stopset1, stopset2);
6366 : 12 : if (M2LexBuf_currenttoken == M2Reserved_colontok)
6367 : : {
6368 : 6 : Expect (M2Reserved_colontok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
6369 : 6 : TrashList (stopset0, stopset1, stopset2);
6370 : : }
6371 : : }
6372 : : }
6373 : 24 : }
6374 : :
6375 : :
6376 : : /*
6377 : : AsmList := [ AsmElement ] { ',' AsmElement }
6378 : :
6379 : : first symbols:attributetok, lcbratok, identtok, stringtok, nottok, lparatok, integertok, realtok, minustok, plustok, lsbratok, commatok
6380 : :
6381 : : reachend
6382 : : */
6383 : :
6384 : 30 : static void AsmList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6385 : : {
6386 : 30 : if ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_nottok)) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))))) != 0))))
6387 : : {
6388 : 24 : AsmElement (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
6389 : : }
6390 : 30 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
6391 : : {
6392 : 0 : Expect (M2Reserved_commatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lsbratok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))));
6393 : 0 : AsmElement (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
6394 : : }
6395 : : /* while */
6396 : 30 : }
6397 : :
6398 : :
6399 : : /*
6400 : : AsmElement := AsmOperandName ConstExpression '('
6401 : : Expression ')'
6402 : :
6403 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok, lsbratok
6404 : :
6405 : : cannot reachend
6406 : : */
6407 : :
6408 : 24 : static void AsmElement (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6409 : : {
6410 : 24 : AsmOperandName (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
6411 : 24 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_lparatok-M2Reserved_eoftok))), stopset1, stopset2);
6412 : 24 : Expect (M2Reserved_lparatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok))));
6413 : 24 : Expression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_rparatok-M2Reserved_eoftok))), stopset1, stopset2);
6414 : 24 : Expect (M2Reserved_rparatok, stopset0, stopset1, stopset2);
6415 : 24 : }
6416 : :
6417 : :
6418 : : /*
6419 : : TrashList := [ ConstExpression ] { ',' ConstExpression }
6420 : :
6421 : : first symbols:stringtok, identtok, lcbratok, attributetok, realtok, integertok, lparatok, nottok, plustok, minustok, commatok
6422 : :
6423 : : reachend
6424 : : */
6425 : :
6426 : 6 : static void TrashList (P0SyntaxCheck_SetOfStop0 stopset0, P0SyntaxCheck_SetOfStop1 stopset1, P0SyntaxCheck_SetOfStop2 stopset2)
6427 : : {
6428 : 6 : if ((((M2LexBuf_currenttoken < M2Reserved_arraytok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_eoftok)) & ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))))) != 0))) || (M2LexBuf_currenttoken == M2Reserved_nottok)) || ((M2LexBuf_currenttoken >= M2Reserved_unqualifiedtok) && ((((1 << (M2LexBuf_currenttoken-M2Reserved_unqualifiedtok)) & ((P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok))))) != 0))))
6429 : : {
6430 : 0 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
6431 : : }
6432 : 6 : while (M2LexBuf_currenttoken == M2Reserved_commatok)
6433 : : {
6434 : 0 : Expect (M2Reserved_commatok, stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_minustok-M2Reserved_eoftok)) | (1 << (M2Reserved_plustok-M2Reserved_eoftok)) | (1 << (M2Reserved_lparatok-M2Reserved_eoftok)) | (1 << (M2Reserved_lcbratok-M2Reserved_eoftok))), stopset1|(P0SyntaxCheck_SetOfStop1) ((1 << (M2Reserved_nottok-M2Reserved_arraytok))), stopset2|(P0SyntaxCheck_SetOfStop2) ((1 << (M2Reserved_integertok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_realtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_attributetok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_identtok-M2Reserved_unqualifiedtok)) | (1 << (M2Reserved_stringtok-M2Reserved_unqualifiedtok))));
6435 : 0 : ConstExpression (stopset0|(P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_commatok-M2Reserved_eoftok))), stopset1, stopset2);
6436 : : }
6437 : : /* while */
6438 : 6 : }
6439 : :
6440 : :
6441 : : /*
6442 : : CompilationUnit - returns TRUE if the input was correct enough to parse
6443 : : in future passes.
6444 : : */
6445 : :
6446 : 179091 : extern "C" bool P0SyntaxCheck_CompilationUnit (void)
6447 : : {
6448 : 179091 : seenError = false;
6449 : 179091 : EnableImportCheck = false;
6450 : 179091 : InsertCount = 0;
6451 : 179091 : FileUnit ((P0SyntaxCheck_SetOfStop0) ((1 << (M2Reserved_eoftok-M2Reserved_eoftok))), (P0SyntaxCheck_SetOfStop1) 0, (P0SyntaxCheck_SetOfStop2) 0);
6452 : 179079 : return ! seenError;
6453 : : /* static analysis guarentees a RETURN statement will be used before here. */
6454 : : __builtin_unreachable ();
6455 : : }
6456 : :
6457 : 0 : extern "C" void _M2_P0SyntaxCheck_init (__attribute__((unused)) int argc, __attribute__((unused)) char *argv[], __attribute__((unused)) char *envp[])
6458 : : {
6459 : 0 : }
6460 : :
6461 : 0 : extern "C" void _M2_P0SyntaxCheck_fini (__attribute__((unused)) int argc, __attribute__((unused)) char *argv[], __attribute__((unused)) char *envp[])
6462 : : {
6463 : 0 : }
|