Imported Upstream version 2.8.9
[platform/upstream/cmake.git] / Source / cmDependsJavaParser.y
1 %{
2 /*============================================================================
3   CMake - Cross Platform Makefile Generator
4   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5
6   Distributed under the OSI-approved BSD License (the "License");
7   see accompanying file Copyright.txt for details.
8
9   This software is distributed WITHOUT ANY WARRANTY; without even the
10   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11   See the License for more information.
12 ============================================================================*/
13 /*
14
15 This file must be translated to C and modified to build everywhere.
16
17 Run bison like this:
18
19   bison --yacc --name-prefix=cmDependsJava_yy --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx cmDependsJavaParser.y
20
21 Modify cmDependsJavaParser.cxx:
22   - remove TABs
23   - add __HP_aCC to the #if test for yyerrorlab warning suppression
24
25 */
26
27 /* Configure the parser to use a lexer object.  */
28 #define YYPARSE_PARAM yyscanner
29 #define YYLEX_PARAM yyscanner
30 #define YYERROR_VERBOSE 1
31 #define cmDependsJava_yyerror(x) \
32         cmDependsJavaError(yyscanner, x)
33 #define yyGetParser (cmDependsJava_yyget_extra(yyscanner))
34
35 /*-------------------------------------------------------------------------*/
36 #include "cmDependsJavaParserHelper.h" /* Interface to parser object.  */
37 #include "cmDependsJavaLexer.h"  /* Interface to lexer object.  */
38 #include "cmDependsJavaParserTokens.h" /* Need YYSTYPE for YY_DECL.  */
39
40 /* Forward declare the lexer entry point.  */
41 YY_DECL;
42
43 /* Internal utility functions.  */
44 static void cmDependsJavaError(yyscan_t yyscanner, const char* message);
45
46 #define YYDEBUG 1
47 #define YYMAXDEPTH 1000000
48
49
50 #define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp);
51 #define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval)
52 #define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str))
53 /* Disable some warnings in the generated code.  */
54 #ifdef __BORLANDC__
55 # pragma warn -8004 /* Variable assigned a value that is not used.  */
56 # pragma warn -8008 /* condition always returns true */
57 # pragma warn -8060 /* possibly incorrect assignment */
58 # pragma warn -8066 /* unreachable code */
59 #endif
60 #ifdef _MSC_VER
61 # pragma warning (disable: 4102) /* Unused goto label.  */
62 # pragma warning (disable: 4065) /* Switch statement contains default but no case. */
63 #endif
64 %}
65
66 /* Generate a reentrant parser object.  */
67 %pure_parser
68
69 /*
70 %union {
71   char* string;
72 }
73 */
74
75 /*-------------------------------------------------------------------------*/
76 /* Tokens */
77 %token jp_ABSTRACT
78 %token jp_ASSERT
79 %token jp_BOOLEAN_TYPE
80 %token jp_BREAK
81 %token jp_BYTE_TYPE
82 %token jp_CASE
83 %token jp_CATCH
84 %token jp_CHAR_TYPE
85 %token jp_CLASS
86 %token jp_CONTINUE
87 %token jp_DEFAULT
88 %token jp_DO
89 %token jp_DOUBLE_TYPE
90 %token jp_ELSE
91 %token jp_EXTENDS
92 %token jp_FINAL
93 %token jp_FINALLY
94 %token jp_FLOAT_TYPE
95 %token jp_FOR
96 %token jp_IF
97 %token jp_IMPLEMENTS
98 %token jp_IMPORT
99 %token jp_INSTANCEOF
100 %token jp_INT_TYPE
101 %token jp_INTERFACE
102 %token jp_LONG_TYPE
103 %token jp_NATIVE
104 %token jp_NEW
105 %token jp_PACKAGE
106 %token jp_PRIVATE
107 %token jp_PROTECTED
108 %token jp_PUBLIC
109 %token jp_RETURN
110 %token jp_SHORT_TYPE
111 %token jp_STATIC
112 %token jp_STRICTFP
113 %token jp_SUPER
114 %token jp_SWITCH
115 %token jp_SYNCHRONIZED
116 %token jp_THIS
117 %token jp_THROW
118 %token jp_THROWS
119 %token jp_TRANSIENT
120 %token jp_TRY
121 %token jp_VOID
122 %token jp_VOLATILE
123 %token jp_WHILE
124
125 %token jp_BOOLEANLITERAL
126 %token jp_CHARACTERLITERAL
127 %token jp_DECIMALINTEGERLITERAL
128 %token jp_FLOATINGPOINTLITERAL
129 %token jp_HEXINTEGERLITERAL
130 %token jp_NULLLITERAL
131 %token jp_STRINGLITERAL
132
133 %token jp_NAME
134
135 %token jp_AND
136 %token jp_ANDAND
137 %token jp_ANDEQUALS
138 %token jp_BRACKETEND
139 %token jp_BRACKETSTART
140 %token jp_CARROT
141 %token jp_CARROTEQUALS
142 %token jp_COLON
143 %token jp_COMMA
144 %token jp_CURLYEND
145 %token jp_CURLYSTART
146 %token jp_DIVIDE
147 %token jp_DIVIDEEQUALS
148 %token jp_DOLLAR
149 %token jp_DOT
150 %token jp_EQUALS
151 %token jp_EQUALSEQUALS
152 %token jp_EXCLAMATION
153 %token jp_EXCLAMATIONEQUALS
154 %token jp_GREATER
155 %token jp_GTEQUALS
156 %token jp_GTGT
157 %token jp_GTGTEQUALS
158 %token jp_GTGTGT
159 %token jp_GTGTGTEQUALS
160 %token jp_LESLESEQUALS
161 %token jp_LESSTHAN
162 %token jp_LTEQUALS
163 %token jp_LTLT
164 %token jp_MINUS
165 %token jp_MINUSEQUALS
166 %token jp_MINUSMINUS
167 %token jp_PAREEND
168 %token jp_PARESTART
169 %token jp_PERCENT
170 %token jp_PERCENTEQUALS
171 %token jp_PIPE
172 %token jp_PIPEEQUALS
173 %token jp_PIPEPIPE
174 %token jp_PLUS
175 %token jp_PLUSEQUALS
176 %token jp_PLUSPLUS
177 %token jp_QUESTION
178 %token jp_SEMICOL
179 %token jp_TILDE
180 %token jp_TIMES
181 %token jp_TIMESEQUALS
182
183 %token jp_ERROR
184
185 /*-------------------------------------------------------------------------*/
186 /* grammar */
187 %%
188
189 Goal:
190 CompilationUnit
191 {
192   jpElementStart(1);
193   jpCheckEmpty(1);
194   $<str>$ = 0;
195   yyGetParser->SetCurrentCombine("");
196 }
197
198 Literal:
199 IntegerLiteral
200 {
201   jpElementStart(1);
202   jpCheckEmpty(1);
203   $<str>$ = 0;
204   yyGetParser->SetCurrentCombine("");
205 }
206 |
207 jp_FLOATINGPOINTLITERAL
208 {
209   jpElementStart(1);
210   jpCheckEmpty(1);
211   $<str>$ = 0;
212   yyGetParser->SetCurrentCombine("");
213 }
214 |
215 jp_BOOLEANLITERAL
216 {
217   jpElementStart(1);
218   jpCheckEmpty(1);
219   $<str>$ = 0;
220   yyGetParser->SetCurrentCombine("");
221 }
222 |
223 jp_CHARACTERLITERAL
224 {
225   jpElementStart(1);
226   jpCheckEmpty(1);
227   $<str>$ = 0;
228   yyGetParser->SetCurrentCombine("");
229 }
230 |
231 jp_STRINGLITERAL
232 {
233   jpElementStart(1);
234   jpCheckEmpty(1);
235   $<str>$ = 0;
236   yyGetParser->SetCurrentCombine("");
237 }
238 |
239 jp_NULLLITERAL
240 {
241   jpElementStart(1);
242   jpCheckEmpty(1);
243   $<str>$ = 0;
244   yyGetParser->SetCurrentCombine("");
245 }
246
247 IntegerLiteral:
248 jp_DECIMALINTEGERLITERAL
249 {
250   jpElementStart(1);
251   jpCheckEmpty(1);
252   $<str>$ = 0;
253   yyGetParser->SetCurrentCombine("");
254 }
255 |
256 jp_HEXINTEGERLITERAL    
257 {
258   jpElementStart(1);
259   jpCheckEmpty(1);
260   $<str>$ = 0;
261   yyGetParser->SetCurrentCombine("");
262 }
263
264 Type:
265 PrimitiveType
266 {
267   jpElementStart(1);
268   jpCheckEmpty(1);
269   $<str>$ = 0;
270   yyGetParser->SetCurrentCombine("");
271 }
272 |
273 ReferenceType
274 {
275   jpElementStart(1);
276   jpCheckEmpty(1);
277   $<str>$ = 0;
278   yyGetParser->SetCurrentCombine("");
279 }
280
281 PrimitiveType:
282 jp_BYTE_TYPE
283 {
284   jpElementStart(0);
285 }
286 |
287 jp_SHORT_TYPE
288 {
289   jpElementStart(0);
290 }
291 |
292 jp_INT_TYPE
293 {
294   jpElementStart(0);
295 }
296 |
297 jp_LONG_TYPE
298 {
299   jpElementStart(0);
300 }
301 |
302 jp_CHAR_TYPE
303 {
304   jpElementStart(0);
305 }
306 |
307 jp_FLOAT_TYPE
308 {
309   jpElementStart(0);
310 }
311 |
312 jp_DOUBLE_TYPE
313 {
314   jpElementStart(0);
315 }
316 |
317 jp_BOOLEAN_TYPE
318 {
319   jpElementStart(0);
320 }
321
322 ReferenceType:
323 ClassOrInterfaceType
324 {
325   jpElementStart(1);
326   jpCheckEmpty(1);
327   $<str>$ = 0;
328   yyGetParser->SetCurrentCombine("");
329 }
330 |
331 ArrayType
332 {
333   jpElementStart(1);
334   jpCheckEmpty(1);
335   $<str>$ = 0;
336   yyGetParser->SetCurrentCombine("");
337 }
338
339 ClassOrInterfaceType:
340 Name
341 {
342   jpElementStart(1);
343   jpStoreClass($<str>1);
344   jpCheckEmpty(1);
345   $<str>$ = 0;
346   yyGetParser->SetCurrentCombine("");
347 }
348
349 ClassType:
350 ClassOrInterfaceType
351 {
352   jpElementStart(1);
353   jpCheckEmpty(1);
354   $<str>$ = 0;
355   yyGetParser->SetCurrentCombine("");
356 }
357
358 InterfaceType:
359 ClassOrInterfaceType
360 {
361   jpElementStart(1);
362   jpCheckEmpty(1);
363   $<str>$ = 0;
364   yyGetParser->SetCurrentCombine("");
365 }
366
367 ArrayType:
368 PrimitiveType Dims
369 {
370   jpElementStart(2);
371   jpCheckEmpty(2);
372   $<str>$ = 0;
373   yyGetParser->SetCurrentCombine("");
374 }
375 |
376 Name Dims
377 {
378   jpElementStart(2);
379   jpStoreClass($<str>1);
380   jpCheckEmpty(2);
381   $<str>$ = 0;
382   yyGetParser->SetCurrentCombine("");
383 }
384
385 Name:
386 SimpleName
387 {
388   jpElementStart(1);
389   $<str>$ = $<str>1;
390 }
391 |
392 QualifiedName
393 {
394   jpElementStart(1);
395   $<str>$ = $<str>1;
396 }
397
398 SimpleName:
399 Identifier
400 {
401   jpElementStart(1);
402   $<str>$ = $<str>1;
403 }
404
405 Identifier:
406 jp_NAME
407 {
408   jpElementStart(1);
409   $<str>$ = $<str>1;
410 }
411 |
412 jp_DOLLAR jp_NAME
413 {
414   jpElementStart(2);
415   $<str>$ = $<str>2;
416 }
417
418 QualifiedName:
419 Name jp_DOT Identifier
420 {
421   jpElementStart(3);
422   yyGetParser->AddClassFound($<str>1);
423   yyGetParser->UpdateCombine($<str>1, $<str>3);
424   yyGetParser->DeallocateParserType(&($<str>1));
425   $<str>$ = const_cast<char*>(yyGetParser->GetCurrentCombine());
426 }
427 |
428 Name jp_DOT jp_CLASS
429 {
430   jpElementStart(3);
431   jpStoreClass($<str>1);
432   jpCheckEmpty(3);
433   yyGetParser->SetCurrentCombine("");
434   $<str>$ = 0;
435   yyGetParser->SetCurrentCombine("");
436 }
437 |
438 Name jp_DOT jp_THIS
439 {
440   jpElementStart(3);
441   jpStoreClass($<str>1);
442   yyGetParser->SetCurrentCombine("");
443   jpCheckEmpty(3);
444   $<str>$ = 0;
445   yyGetParser->SetCurrentCombine("");
446 }
447 |
448 SimpleType jp_DOT jp_CLASS
449 {
450   jpElementStart(3);
451   jpCheckEmpty(3);
452   $<str>$ = 0;
453   yyGetParser->SetCurrentCombine("");
454 }
455
456 SimpleType:
457 PrimitiveType
458 {
459   jpElementStart(1);
460   jpCheckEmpty(1);
461   $<str>$ = 0;
462   yyGetParser->SetCurrentCombine("");
463 }
464 |
465 jp_VOID
466 {
467   jpElementStart(1);
468   jpCheckEmpty(1);
469   $<str>$ = 0;
470   yyGetParser->SetCurrentCombine("");
471 }
472
473 CompilationUnit:
474 PackageDeclarationopt ImportDeclarations TypeDeclarations
475 {
476   jpElementStart(3);
477   jpCheckEmpty(3);
478   $<str>$ = 0;
479   yyGetParser->SetCurrentCombine("");
480 }
481
482 PackageDeclarationopt:
483 {
484   jpElementStart(0);
485   $<str>$ = 0;
486   yyGetParser->SetCurrentCombine("");
487 }
488 |
489 PackageDeclaration
490 {
491   jpElementStart(1);
492   jpCheckEmpty(1);
493   $<str>$ = 0;
494   yyGetParser->SetCurrentCombine("");
495 }
496
497 ImportDeclarations:
498 {
499   jpElementStart(0);
500   $<str>$ = 0;
501   yyGetParser->SetCurrentCombine("");
502 }
503 |
504 ImportDeclarations ImportDeclaration
505 {
506   jpElementStart(2);
507   jpCheckEmpty(2);
508   $<str>$ = 0;
509   yyGetParser->SetCurrentCombine("");
510 }
511
512 TypeDeclarations:
513 {
514   jpElementStart(0);
515   $<str>$ = 0;
516   yyGetParser->SetCurrentCombine("");
517 }
518 |
519 TypeDeclarations TypeDeclaration
520 {
521   jpElementStart(2);
522   jpCheckEmpty(2);
523   $<str>$ = 0;
524   yyGetParser->SetCurrentCombine("");
525 }
526
527 PackageDeclaration:
528 jp_PACKAGE Name jp_SEMICOL
529 {
530   jpElementStart(3);
531   yyGetParser->SetCurrentPackage($<str>2);
532   yyGetParser->DeallocateParserType(&($<str>2));
533   yyGetParser->SetCurrentCombine("");
534   jpCheckEmpty(3);
535   $<str>$ = 0;
536   yyGetParser->SetCurrentCombine("");
537 }
538
539 ImportDeclaration:
540 SingleTypeImportDeclaration
541 {
542   jpElementStart(1);
543   jpCheckEmpty(1);
544   $<str>$ = 0;
545   yyGetParser->SetCurrentCombine("");
546 }
547 |
548 TypeImportOnDemandDeclaration
549 {
550   jpElementStart(1);
551   jpCheckEmpty(1);
552   $<str>$ = 0;
553   yyGetParser->SetCurrentCombine("");
554 }
555
556 SingleTypeImportDeclaration:
557 jp_IMPORT Name jp_SEMICOL
558 {
559   jpElementStart(3);
560   yyGetParser->AddPackagesImport($<str>2);
561   yyGetParser->DeallocateParserType(&($<str>2));
562   yyGetParser->SetCurrentCombine("");
563   jpCheckEmpty(3);
564   $<str>$ = 0;
565   yyGetParser->SetCurrentCombine("");
566 }
567
568 TypeImportOnDemandDeclaration:
569 jp_IMPORT Name jp_DOT jp_TIMES jp_SEMICOL
570 {
571   jpElementStart(5);
572   std::string str = $<str>2;
573   str += ".*";
574   yyGetParser->AddPackagesImport(str.c_str());
575   yyGetParser->DeallocateParserType(&($<str>2));
576   yyGetParser->SetCurrentCombine("");
577   $<str>$ = 0;
578   yyGetParser->SetCurrentCombine("");
579 }
580
581 TypeDeclaration:
582 ClassDeclaration
583 {
584   jpElementStart(1);
585   jpCheckEmpty(1);
586   $<str>$ = 0;
587   yyGetParser->SetCurrentCombine("");
588 }
589 |
590 InterfaceDeclaration
591 {
592   jpElementStart(1);
593   jpCheckEmpty(1);
594   $<str>$ = 0;
595   yyGetParser->SetCurrentCombine("");
596 }
597 |
598 jp_SEMICOL
599 {
600   jpElementStart(1);
601   jpCheckEmpty(1);
602   $<str>$ = 0;
603   yyGetParser->SetCurrentCombine("");
604 }
605
606 Modifiers:
607 Modifier
608 {
609   jpElementStart(1);
610   jpCheckEmpty(1);
611   $<str>$ = 0;
612   yyGetParser->SetCurrentCombine("");
613 }
614 |
615 Modifiers Modifier
616 {
617   jpElementStart(2);
618   jpCheckEmpty(2);
619   $<str>$ = 0;
620   yyGetParser->SetCurrentCombine("");
621 }
622
623 Modifier:
624 jp_PUBLIC | jp_PROTECTED | jp_PRIVATE |
625 jp_STATIC |
626 jp_ABSTRACT | jp_FINAL | jp_NATIVE | jp_SYNCHRONIZED | jp_TRANSIENT | jp_VOLATILE |
627 jp_STRICTFP
628
629 ClassHeader:
630 Modifiersopt jp_CLASS Identifier
631 {
632   yyGetParser->StartClass($<str>3);
633   jpElementStart(3);
634   yyGetParser->DeallocateParserType(&($<str>3));
635   jpCheckEmpty(3);
636 }
637
638
639 ClassDeclaration:
640 ClassHeader ClassBody
641 {
642   jpElementStart(2);
643   jpCheckEmpty(2);
644   $<str>$ = 0;
645   yyGetParser->SetCurrentCombine("");
646   yyGetParser->EndClass();
647 }
648 |
649 ClassHeader Interfaces ClassBody
650 {
651   jpElementStart(3);
652   jpCheckEmpty(2);
653   $<str>$ = 0;
654   yyGetParser->SetCurrentCombine("");
655   yyGetParser->EndClass();
656 }
657 |
658 ClassHeader Super ClassBody
659 {
660   jpElementStart(3);
661   jpCheckEmpty(3);
662   $<str>$ = 0;
663   yyGetParser->SetCurrentCombine("");
664   yyGetParser->EndClass();
665 }
666 |
667 ClassHeader Super Interfaces ClassBody
668 {
669   jpElementStart(4);
670   jpCheckEmpty(4);
671   $<str>$ = 0;
672   yyGetParser->SetCurrentCombine("");
673   yyGetParser->EndClass();
674 }
675
676 Modifiersopt:
677 {
678   jpElementStart(0);
679   $<str>$ = 0;
680   yyGetParser->SetCurrentCombine("");
681 }
682 |
683 Modifiers
684 {
685   jpElementStart(1);
686   jpCheckEmpty(1);
687   $<str>$ = 0;
688   yyGetParser->SetCurrentCombine("");
689 }
690
691 Super:
692 jp_EXTENDS ClassType
693 {
694   jpElementStart(2);
695   jpCheckEmpty(2);
696   $<str>$ = 0;
697   yyGetParser->SetCurrentCombine("");
698 }
699
700 Interfaces:
701 jp_IMPLEMENTS InterfaceTypeList
702 {
703   jpElementStart(2);
704   jpCheckEmpty(2);
705   $<str>$ = 0;
706   yyGetParser->SetCurrentCombine("");
707 }
708
709 InterfaceTypeList:
710 InterfaceType
711 {
712   jpElementStart(1);
713   jpCheckEmpty(1);
714   $<str>$ = 0;
715   yyGetParser->SetCurrentCombine("");
716 }
717 |
718 InterfaceTypeList jp_COMMA InterfaceType
719 {
720   jpElementStart(3);
721   jpCheckEmpty(3);
722   $<str>$ = 0;
723   yyGetParser->SetCurrentCombine("");
724 }
725
726 ClassBody:
727 jp_CURLYSTART ClassBodyDeclarations jp_CURLYEND
728 {
729   jpElementStart(3);
730   jpCheckEmpty(3);
731   $<str>$ = 0;
732   yyGetParser->SetCurrentCombine("");
733 }
734
735 ClassBodyDeclarations:
736 {
737   jpElementStart(1);
738   $<str>$ = 0;
739   yyGetParser->SetCurrentCombine("");
740 }
741 |
742 ClassBodyDeclarations ClassBodyDeclaration
743 {
744   jpElementStart(2);
745   jpCheckEmpty(2);
746   $<str>$ = 0;
747   yyGetParser->SetCurrentCombine("");
748 }
749
750 ClassBodyDeclaration:
751 ClassMemberDeclaration
752 {
753   jpElementStart(1);
754   jpCheckEmpty(1);
755   $<str>$ = 0;
756   yyGetParser->SetCurrentCombine("");
757 }
758 |
759 StaticInitializer
760 {
761   jpElementStart(1);
762   jpCheckEmpty(1);
763   $<str>$ = 0;
764   yyGetParser->SetCurrentCombine("");
765 }
766 |
767 ConstructorDeclaration
768 {
769   jpElementStart(1);
770   jpCheckEmpty(1);
771   $<str>$ = 0;
772   yyGetParser->SetCurrentCombine("");
773 }
774 |
775 TypeDeclaration
776 {
777   jpElementStart(1);
778   jpCheckEmpty(1);
779   $<str>$ = 0;
780   yyGetParser->SetCurrentCombine("");
781 }
782
783 ClassMemberDeclaration:
784 FieldDeclaration
785 {
786   jpElementStart(1);
787   jpCheckEmpty(1);
788   $<str>$ = 0;
789   yyGetParser->SetCurrentCombine("");
790 }
791 |
792 MethodDeclaration
793 {
794   jpElementStart(1);
795   jpCheckEmpty(1);
796   $<str>$ = 0;
797   yyGetParser->SetCurrentCombine("");
798 }
799
800 FieldDeclaration:
801 Modifiersopt Type VariableDeclarators jp_SEMICOL
802 {
803   jpElementStart(4);
804 }
805
806 VariableDeclarators:
807 VariableDeclarator
808 {
809   jpElementStart(1);
810   jpCheckEmpty(1);
811   $<str>$ = 0;
812   yyGetParser->SetCurrentCombine("");
813 }
814 |
815 VariableDeclarators jp_COMMA VariableDeclarator
816 {
817   jpElementStart(3);
818   jpCheckEmpty(3);
819   $<str>$ = 0;
820   yyGetParser->SetCurrentCombine("");
821 }
822
823 VariableDeclarator:
824 VariableDeclaratorId
825 {
826   jpElementStart(1);
827   jpCheckEmpty(1);
828   $<str>$ = 0;
829   yyGetParser->SetCurrentCombine("");
830 }
831 |
832 VariableDeclaratorId jp_EQUALS VariableInitializer
833 {
834   jpElementStart(3);
835   jpCheckEmpty(3);
836   $<str>$ = 0;
837   yyGetParser->SetCurrentCombine("");
838 }
839
840 VariableDeclaratorId:
841 Identifier
842 {
843   jpElementStart(1);
844   yyGetParser->DeallocateParserType(&($<str>1));
845   jpCheckEmpty(1);
846   $<str>$ = 0;
847   yyGetParser->SetCurrentCombine("");
848 }
849 |
850 VariableDeclaratorId jp_BRACKETSTART jp_BRACKETEND
851 {
852   jpElementStart(1);
853   jpCheckEmpty(1);
854   $<str>$ = 0;
855   yyGetParser->SetCurrentCombine("");
856 }
857
858 VariableInitializer:
859 Expression
860 {
861   jpElementStart(1);
862   jpCheckEmpty(1);
863   $<str>$ = 0;
864   yyGetParser->SetCurrentCombine("");
865 }
866 |
867 ArrayInitializer
868 {
869   jpElementStart(1);
870   jpCheckEmpty(1);
871   $<str>$ = 0;
872   yyGetParser->SetCurrentCombine("");
873 }
874
875 MethodDeclaration:
876 MethodHeader jp_SEMICOL
877 {
878   jpElementStart(2);
879   jpCheckEmpty(2);
880   $<str>$ = 0;
881   yyGetParser->SetCurrentCombine("");
882 }
883 |
884 MethodHeader MethodBody
885 {
886   jpElementStart(2);
887   jpCheckEmpty(2);
888   $<str>$ = 0;
889   yyGetParser->SetCurrentCombine("");
890 }
891 |
892 MethodHeader MethodBody jp_SEMICOL
893 {
894   jpElementStart(3);
895   jpCheckEmpty(3);
896   $<str>$ = 0;
897   yyGetParser->SetCurrentCombine("");
898 }
899
900 MethodHeader:
901 Modifiersopt Type MethodDeclarator Throwsopt
902 {
903   jpElementStart(4);
904   jpCheckEmpty(4);
905   $<str>$ = 0;
906   yyGetParser->SetCurrentCombine("");
907
908 }
909 |
910 Modifiersopt jp_VOID MethodDeclarator Throwsopt
911 {
912   jpElementStart(4);
913   jpCheckEmpty(4);
914   $<str>$ = 0;
915   yyGetParser->SetCurrentCombine("");
916
917 }
918
919 Throwsopt:
920 {
921   jpElementStart(0);
922   $<str>$ = 0;
923   yyGetParser->SetCurrentCombine("");
924
925 }
926 |
927 Throws
928 {
929   jpElementStart(1);
930   jpCheckEmpty(1);
931   $<str>$ = 0;
932   yyGetParser->SetCurrentCombine("");
933
934 }
935
936 MethodDeclarator:
937 Identifier jp_PARESTART FormalParameterListopt jp_PAREEND
938 {
939   jpElementStart(4);
940   yyGetParser->DeallocateParserType(&($<str>1));
941   jpCheckEmpty(4);
942   $<str>$ = 0;
943   yyGetParser->SetCurrentCombine("");
944
945 }
946 |
947 MethodDeclarator jp_BRACKETSTART jp_BRACKETEND
948 {
949   jpElementStart(3);
950
951 }
952
953 FormalParameterListopt:
954 {
955   jpElementStart(0);
956   $<str>$ = 0;
957   yyGetParser->SetCurrentCombine("");
958
959 }
960 |
961 FormalParameterList
962
963 FormalParameterList:
964 FormalParameter
965 {
966   jpElementStart(1);
967
968 }
969 |
970 FormalParameterList jp_COMMA FormalParameter
971 {
972   jpElementStart(3);
973   jpCheckEmpty(3);
974   $<str>$ = 0;
975   yyGetParser->SetCurrentCombine("");
976
977 }
978
979 FormalParameter:
980 Modifiersopt Type VariableDeclaratorId
981 {
982   jpElementStart(3);
983   jpCheckEmpty(3);
984   $<str>$ = 0;
985   yyGetParser->SetCurrentCombine("");
986
987 }
988
989 Throws:
990 jp_THROWS ClassTypeList
991 {
992   jpElementStart(2);
993   jpCheckEmpty(2);
994   $<str>$ = 0;
995   yyGetParser->SetCurrentCombine("");
996
997 }
998
999 ClassTypeList:
1000 ClassType
1001 {
1002   jpElementStart(1);
1003
1004 }
1005 |
1006 ClassTypeList jp_COMMA ClassType
1007 {
1008   jpElementStart(3);
1009   jpCheckEmpty(3);
1010   $<str>$ = 0;
1011   yyGetParser->SetCurrentCombine("");
1012
1013 }
1014
1015 MethodBody:
1016 Block
1017 {
1018   jpElementStart(1);
1019   jpCheckEmpty(1);
1020   $<str>$ = 0;
1021   yyGetParser->SetCurrentCombine("");
1022
1023 }
1024
1025 StaticInitializer:
1026 jp_STATIC Block
1027 {
1028   jpElementStart(2);
1029   jpCheckEmpty(2);
1030   $<str>$ = 0;
1031   yyGetParser->SetCurrentCombine("");
1032
1033 }
1034
1035 ConstructorDeclaration:
1036 Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody
1037 {
1038   jpElementStart(4);
1039   jpCheckEmpty(4);
1040   $<str>$ = 0;
1041   yyGetParser->SetCurrentCombine("");
1042
1043 }
1044 |
1045 Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody jp_SEMICOL
1046 {
1047   jpElementStart(5);
1048   jpCheckEmpty(5);
1049   $<str>$ = 0;
1050   yyGetParser->SetCurrentCombine("");
1051
1052 }
1053
1054 ConstructorDeclarator:
1055 SimpleName jp_PARESTART FormalParameterListopt jp_PAREEND
1056 {
1057   jpElementStart(4);
1058   yyGetParser->DeallocateParserType(&($<str>1));
1059   jpCheckEmpty(4);
1060   $<str>$ = 0;
1061   yyGetParser->SetCurrentCombine("");
1062
1063 }
1064
1065 ConstructorBody:
1066 jp_CURLYSTART ExplicitConstructorInvocationopt BlockStatementsopt jp_CURLYEND
1067 {
1068   jpElementStart(4);
1069   jpCheckEmpty(4);
1070   $<str>$ = 0;
1071   yyGetParser->SetCurrentCombine("");
1072
1073 }
1074
1075 ExplicitConstructorInvocationopt:
1076 {
1077   jpElementStart(0);
1078   $<str>$ = 0;
1079   yyGetParser->SetCurrentCombine("");
1080
1081 }
1082 |
1083 ExplicitConstructorInvocationopt ExplicitConstructorInvocation
1084 {
1085   jpElementStart(2);
1086   jpCheckEmpty(2);
1087   $<str>$ = 0;
1088   yyGetParser->SetCurrentCombine("");
1089
1090 }
1091
1092 ExplicitConstructorInvocation:
1093 jp_THIS jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL
1094 {
1095   jpElementStart(5);
1096   jpCheckEmpty(5);
1097   $<str>$ = 0;
1098   yyGetParser->SetCurrentCombine("");
1099
1100 }
1101 |
1102 jp_SUPER jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL
1103 {
1104   jpElementStart(5);
1105   jpCheckEmpty(5);
1106   $<str>$ = 0;
1107   yyGetParser->SetCurrentCombine("");
1108
1109 }
1110
1111 InterfaceHeader:
1112 Modifiersopt jp_INTERFACE Identifier
1113 {
1114   yyGetParser->StartClass($<str>3);
1115   jpElementStart(3);
1116   yyGetParser->DeallocateParserType(&($<str>3));
1117   jpCheckEmpty(3);
1118 }
1119
1120 InterfaceDeclaration:
1121 InterfaceHeader ExtendsInterfacesopt InterfaceBody
1122 {
1123   jpElementStart(2);
1124   jpCheckEmpty(2);
1125   $<str>$ = 0;
1126   yyGetParser->SetCurrentCombine("");
1127   yyGetParser->EndClass();
1128 }
1129
1130 ExtendsInterfacesopt:
1131 {
1132   jpElementStart(0);
1133   $<str>$ = 0;
1134   yyGetParser->SetCurrentCombine("");
1135 }
1136 |
1137 ExtendsInterfaces
1138 {
1139   jpElementStart(1);
1140   jpCheckEmpty(1);
1141   $<str>$ = 0;
1142   yyGetParser->SetCurrentCombine("");
1143
1144 }
1145
1146 ExtendsInterfaces:
1147 jp_EXTENDS InterfaceType
1148 {
1149   jpElementStart(2);
1150   jpCheckEmpty(2);
1151   $<str>$ = 0;
1152   yyGetParser->SetCurrentCombine("");
1153
1154 }
1155 |
1156 ExtendsInterfaces jp_COMMA InterfaceType
1157 {
1158   jpElementStart(3);
1159   jpCheckEmpty(3);
1160   $<str>$ = 0;
1161   yyGetParser->SetCurrentCombine("");
1162
1163 }
1164
1165 InterfaceBody:
1166 jp_CURLYSTART InterfaceMemberDeclarations jp_CURLYEND
1167 {
1168   jpElementStart(3);
1169   jpCheckEmpty(3);
1170   $<str>$ = 0;
1171   yyGetParser->SetCurrentCombine("");
1172
1173 }
1174
1175 InterfaceMemberDeclarations:
1176 {
1177   jpElementStart(0);
1178   $<str>$ = 0;
1179   yyGetParser->SetCurrentCombine("");
1180
1181 }
1182 |
1183 InterfaceMemberDeclarations InterfaceMemberDeclaration
1184 {
1185   jpElementStart(2);
1186   $<str>$ = 0;
1187   yyGetParser->SetCurrentCombine("");
1188
1189 }
1190
1191 InterfaceMemberDeclaration:
1192 ConstantDeclaration
1193 {
1194   jpElementStart(1);
1195   jpCheckEmpty(1);
1196   $<str>$ = 0;
1197   yyGetParser->SetCurrentCombine("");
1198
1199 }
1200 |
1201 AbstractMethodDeclaration
1202 {
1203   jpElementStart(1);
1204   jpCheckEmpty(1);
1205   $<str>$ = 0;
1206   yyGetParser->SetCurrentCombine("");
1207
1208 }
1209 |
1210 ClassDeclaration
1211 {
1212   jpElementStart(1);
1213   jpCheckEmpty(1);
1214   $<str>$ = 0;
1215   yyGetParser->SetCurrentCombine("");
1216
1217 }
1218 |
1219 ClassDeclaration jp_SEMICOL
1220 {
1221   jpElementStart(2);
1222   $<str>$ = 0;
1223   yyGetParser->SetCurrentCombine("");
1224
1225 }
1226 |
1227 InterfaceDeclaration
1228 {
1229   jpElementStart(1);
1230   jpCheckEmpty(1);
1231   $<str>$ = 0;
1232   yyGetParser->SetCurrentCombine("");
1233
1234 }
1235 |
1236 InterfaceDeclaration jp_SEMICOL
1237 {
1238   jpElementStart(2);
1239   $<str>$ = 0;
1240   yyGetParser->SetCurrentCombine("");
1241
1242 }
1243
1244 ConstantDeclaration:
1245 FieldDeclaration
1246 {
1247   jpElementStart(1);
1248   jpCheckEmpty(1);
1249   $<str>$ = 0;
1250   yyGetParser->SetCurrentCombine("");
1251
1252 }
1253
1254 AbstractMethodDeclaration:
1255 MethodHeader Semicols
1256 {
1257   jpElementStart(2);
1258   jpCheckEmpty(2);
1259   $<str>$ = 0;
1260   yyGetParser->SetCurrentCombine("");
1261
1262 }
1263
1264 Semicols:
1265 jp_SEMICOL
1266 {
1267   jpElementStart(1);
1268   jpCheckEmpty(1);
1269   $<str>$ = 0;
1270   yyGetParser->SetCurrentCombine("");
1271
1272 }
1273 |
1274 Semicols jp_SEMICOL
1275 {
1276   jpElementStart(2);
1277   jpCheckEmpty(2);
1278   $<str>$ = 0;
1279   yyGetParser->SetCurrentCombine("");
1280
1281 }
1282
1283 ArrayInitializer:
1284 jp_CURLYSTART VariableInitializersOptional jp_CURLYEND
1285 {
1286   jpElementStart(3);
1287   jpCheckEmpty(3);
1288   $<str>$ = 0;
1289   yyGetParser->SetCurrentCombine("");
1290
1291 }
1292
1293 VariableInitializersOptional:
1294 {
1295   jpElementStart(1);
1296   $<str>$ = 0;
1297   yyGetParser->SetCurrentCombine("");
1298
1299 }
1300 |
1301 VariableInitializers
1302 {
1303   jpElementStart(1);
1304   jpCheckEmpty(1);
1305   $<str>$ = 0;
1306   yyGetParser->SetCurrentCombine("");
1307
1308 }
1309 |
1310 VariableInitializers jp_COMMA
1311 {
1312   jpElementStart(2);
1313   jpCheckEmpty(2);
1314   $<str>$ = 0;
1315   yyGetParser->SetCurrentCombine("");
1316
1317 }
1318
1319 VariableInitializers:
1320 VariableInitializer
1321 {
1322   jpElementStart(1);
1323   jpCheckEmpty(1);
1324   $<str>$ = 0;
1325   yyGetParser->SetCurrentCombine("");
1326
1327 }
1328 |
1329 VariableInitializers jp_COMMA VariableInitializer
1330 {
1331   jpElementStart(3);
1332   jpCheckEmpty(3);
1333   $<str>$ = 0;
1334   yyGetParser->SetCurrentCombine("");
1335
1336 }
1337
1338 Block:
1339 jp_CURLYSTART BlockStatementsopt jp_CURLYEND
1340 {
1341   jpElementStart(4);
1342   $<str>$ = 0;
1343   yyGetParser->SetCurrentCombine("");
1344
1345 }
1346
1347 BlockStatementsopt:
1348 {
1349   jpElementStart(1);
1350   $<str>$ = 0;
1351   yyGetParser->SetCurrentCombine("");
1352
1353 }
1354 |
1355 BlockStatements
1356 {
1357   jpElementStart(1);
1358   jpCheckEmpty(1);
1359   $<str>$ = 0;
1360   yyGetParser->SetCurrentCombine("");
1361
1362 }
1363
1364 BlockStatements:
1365 BlockStatement
1366 {
1367   jpElementStart(1);
1368   jpCheckEmpty(1);
1369   $<str>$ = 0;
1370   yyGetParser->SetCurrentCombine("");
1371
1372 }
1373 |
1374 BlockStatements BlockStatement
1375 {
1376   jpElementStart(1);
1377   jpCheckEmpty(2);
1378   $<str>$ = 0;
1379   yyGetParser->SetCurrentCombine("");
1380
1381 }
1382
1383 BlockStatement:
1384 LocalVariableDeclarationStatement
1385 {
1386   jpElementStart(1);
1387   jpCheckEmpty(1);
1388   $<str>$ = 0;
1389   yyGetParser->SetCurrentCombine("");
1390
1391 }
1392 |
1393 Statement
1394 {
1395   jpElementStart(1);
1396   jpCheckEmpty(1);
1397   $<str>$ = 0;
1398   yyGetParser->SetCurrentCombine("");
1399
1400 }
1401 |
1402 ClassDeclaration
1403 {
1404   jpElementStart(1);
1405   jpCheckEmpty(1);
1406   $<str>$ = 0;
1407   yyGetParser->SetCurrentCombine("");
1408
1409 }
1410
1411 LocalVariableDeclarationStatement:
1412 LocalVariableDeclaration jp_SEMICOL
1413 {
1414   jpElementStart(1);
1415   jpCheckEmpty(2);
1416   $<str>$ = 0;
1417   yyGetParser->SetCurrentCombine("");
1418
1419 }
1420
1421 LocalVariableDeclaration:
1422 Modifiers Type VariableDeclarators
1423 {
1424   jpElementStart(1);
1425   jpCheckEmpty(3);
1426   $<str>$ = 0;
1427   yyGetParser->SetCurrentCombine("");
1428
1429 }
1430 |
1431 Type VariableDeclarators
1432 {
1433   jpElementStart(1);
1434   jpCheckEmpty(2);
1435   $<str>$ = 0;
1436   yyGetParser->SetCurrentCombine("");
1437
1438 }
1439
1440 Statement:
1441 StatementWithoutTrailingSubstatement
1442 {
1443   jpElementStart(1);
1444   jpCheckEmpty(1);
1445   $<str>$ = 0;
1446   yyGetParser->SetCurrentCombine("");
1447
1448 }
1449 |
1450 LabeledStatement
1451 {
1452   jpElementStart(1);
1453   jpCheckEmpty(1);
1454   $<str>$ = 0;
1455   yyGetParser->SetCurrentCombine("");
1456
1457 }
1458 |
1459 IfThenStatement
1460 {
1461   jpElementStart(1);
1462   jpCheckEmpty(1);
1463   $<str>$ = 0;
1464   yyGetParser->SetCurrentCombine("");
1465
1466 }
1467 |
1468 IfThenElseStatement
1469 {
1470   jpElementStart(1);
1471   jpCheckEmpty(1);
1472   $<str>$ = 0;
1473   yyGetParser->SetCurrentCombine("");
1474
1475 }
1476 |
1477 WhileStatement
1478 {
1479   jpElementStart(1);
1480   jpCheckEmpty(1);
1481   $<str>$ = 0;
1482   yyGetParser->SetCurrentCombine("");
1483
1484 }
1485 |
1486 ForStatement
1487 {
1488   jpElementStart(1);
1489   jpCheckEmpty(1);
1490   $<str>$ = 0;
1491   yyGetParser->SetCurrentCombine("");
1492
1493 }
1494
1495 StatementNoShortIf:
1496 StatementWithoutTrailingSubstatement
1497 {
1498   jpElementStart(1);
1499   jpCheckEmpty(1);
1500   $<str>$ = 0;
1501   yyGetParser->SetCurrentCombine("");
1502
1503 }
1504 |
1505 LabeledStatementNoShortIf
1506 {
1507   jpElementStart(1);
1508   jpCheckEmpty(1);
1509   $<str>$ = 0;
1510   yyGetParser->SetCurrentCombine("");
1511
1512 }
1513 |
1514 IfThenElseStatementNoShortIf
1515 {
1516   jpElementStart(1);
1517   jpCheckEmpty(1);
1518   $<str>$ = 0;
1519   yyGetParser->SetCurrentCombine("");
1520
1521 }
1522 |
1523 WhileStatementNoShortIf
1524 {
1525   jpElementStart(1);
1526   jpCheckEmpty(1);
1527   $<str>$ = 0;
1528   yyGetParser->SetCurrentCombine("");
1529
1530 }
1531 |
1532 ForStatementNoShortIf
1533 {
1534   jpElementStart(1);
1535   jpCheckEmpty(1);
1536   $<str>$ = 0;
1537   yyGetParser->SetCurrentCombine("");
1538
1539 }
1540
1541 StatementWithoutTrailingSubstatement:
1542 Block
1543 {
1544   jpElementStart(1);
1545   jpCheckEmpty(1);
1546   $<str>$ = 0;
1547   yyGetParser->SetCurrentCombine("");
1548
1549 }
1550 |
1551 EmptyStatement
1552 {
1553   jpElementStart(1);
1554   jpCheckEmpty(1);
1555   $<str>$ = 0;
1556   yyGetParser->SetCurrentCombine("");
1557
1558 }
1559 |
1560 ExpressionStatement
1561 {
1562   jpElementStart(1);
1563   jpCheckEmpty(1);
1564   $<str>$ = 0;
1565   yyGetParser->SetCurrentCombine("");
1566
1567 }
1568 |
1569 SwitchStatement
1570 {
1571   jpElementStart(1);
1572   jpCheckEmpty(1);
1573   $<str>$ = 0;
1574   yyGetParser->SetCurrentCombine("");
1575
1576 }
1577 |
1578 DoStatement
1579 {
1580   jpElementStart(1);
1581   jpCheckEmpty(1);
1582   $<str>$ = 0;
1583   yyGetParser->SetCurrentCombine("");
1584
1585 }
1586 |
1587 BreakStatement
1588 {
1589   jpElementStart(1);
1590   jpCheckEmpty(1);
1591   $<str>$ = 0;
1592   yyGetParser->SetCurrentCombine("");
1593
1594 }
1595 |
1596 ContinueStatement
1597 {
1598   jpElementStart(1);
1599   jpCheckEmpty(1);
1600   $<str>$ = 0;
1601   yyGetParser->SetCurrentCombine("");
1602
1603 }
1604 |
1605 ReturnStatement
1606 {
1607   jpElementStart(1);
1608   jpCheckEmpty(1);
1609   $<str>$ = 0;
1610   yyGetParser->SetCurrentCombine("");
1611
1612 }
1613 |
1614 SynchronizedStatement
1615 {
1616   jpElementStart(1);
1617   jpCheckEmpty(1);
1618   $<str>$ = 0;
1619   yyGetParser->SetCurrentCombine("");
1620
1621 }
1622 |
1623 ThrowStatement
1624 {
1625   jpElementStart(1);
1626   jpCheckEmpty(1);
1627   $<str>$ = 0;
1628   yyGetParser->SetCurrentCombine("");
1629
1630 }
1631 |
1632 TryStatement
1633 {
1634   jpElementStart(1);
1635   jpCheckEmpty(1);
1636   $<str>$ = 0;
1637   yyGetParser->SetCurrentCombine("");
1638
1639 }
1640 |
1641 AssertStatement
1642 {
1643   jpElementStart(1);
1644   jpCheckEmpty(1);
1645   $<str>$ = 0;
1646   yyGetParser->SetCurrentCombine("");
1647
1648 }
1649
1650 EmptyStatement:
1651 jp_SEMICOL
1652 {
1653   jpElementStart(1);
1654   jpCheckEmpty(1);
1655   $<str>$ = 0;
1656   yyGetParser->SetCurrentCombine("");
1657
1658 }
1659
1660 LabeledStatement:
1661 Identifier jp_COLON Statement
1662 {
1663   jpElementStart(3);
1664   yyGetParser->DeallocateParserType(&($<str>1));
1665   jpCheckEmpty(3);
1666   $<str>$ = 0;
1667   yyGetParser->SetCurrentCombine("");
1668
1669 }
1670
1671 LabeledStatementNoShortIf:
1672 Identifier jp_COLON StatementNoShortIf
1673 {
1674   jpElementStart(3);
1675   jpCheckEmpty(3);
1676   $<str>$ = 0;
1677   yyGetParser->SetCurrentCombine("");
1678
1679 }
1680
1681 ExpressionStatement:
1682 StatementExpression jp_SEMICOL
1683 {
1684   jpElementStart(2);
1685   jpCheckEmpty(2);
1686   $<str>$ = 0;
1687   yyGetParser->SetCurrentCombine("");
1688
1689 }
1690
1691 StatementExpression:
1692 Assignment
1693 {
1694   jpElementStart(1);
1695   jpCheckEmpty(1);
1696   $<str>$ = 0;
1697   yyGetParser->SetCurrentCombine("");
1698
1699 }
1700 |
1701 PreIncrementExpression
1702 {
1703   jpElementStart(1);
1704   jpCheckEmpty(1);
1705   $<str>$ = 0;
1706   yyGetParser->SetCurrentCombine("");
1707
1708 }
1709 |
1710 PreDecrementExpression
1711 {
1712   jpElementStart(1);
1713   jpCheckEmpty(1);
1714   $<str>$ = 0;
1715   yyGetParser->SetCurrentCombine("");
1716
1717 }
1718 |
1719 PostIncrementExpression
1720 {
1721   jpElementStart(1);
1722   jpCheckEmpty(1);
1723   $<str>$ = 0;
1724   yyGetParser->SetCurrentCombine("");
1725
1726 }
1727 |
1728 PostDecrementExpression
1729 {
1730   jpElementStart(1);
1731   jpCheckEmpty(1);
1732   $<str>$ = 0;
1733   yyGetParser->SetCurrentCombine("");
1734
1735 }
1736 |
1737 MethodInvocation
1738 {
1739   jpElementStart(1);
1740   jpCheckEmpty(1);
1741   $<str>$ = 0;
1742   yyGetParser->SetCurrentCombine("");
1743
1744 }
1745 |
1746 ClassInstanceCreationExpression
1747 {
1748   jpElementStart(1);
1749   jpCheckEmpty(1);
1750   $<str>$ = 0;
1751   yyGetParser->SetCurrentCombine("");
1752
1753 }
1754
1755 IfThenStatement:
1756 jp_IF jp_PARESTART Expression jp_PAREEND Statement
1757 {
1758   jpElementStart(5);
1759   jpCheckEmpty(5);
1760   $<str>$ = 0;
1761   yyGetParser->SetCurrentCombine("");
1762
1763 }
1764
1765 IfThenElseStatement:
1766 jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE Statement
1767 {
1768   jpElementStart(7);
1769   jpCheckEmpty(7);
1770   $<str>$ = 0;
1771   yyGetParser->SetCurrentCombine("");
1772
1773 }
1774
1775 IfThenElseStatementNoShortIf:
1776 jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE StatementNoShortIf
1777 {
1778   jpElementStart(7);
1779   jpCheckEmpty(7);
1780   $<str>$ = 0;
1781   yyGetParser->SetCurrentCombine("");
1782
1783 }
1784
1785 SwitchStatement:
1786 jp_SWITCH jp_PARESTART Expression jp_PAREEND SwitchBlock
1787 {
1788   jpElementStart(5);
1789
1790 }
1791
1792 SwitchBlock:
1793 jp_CURLYSTART SwitchBlockStatementGroups SwitchLabelsopt jp_CURLYEND
1794 {
1795   jpElementStart(4);
1796
1797 }
1798
1799 SwitchLabelsopt:
1800 {
1801   jpElementStart(0);
1802   $<str>$ = 0;
1803   yyGetParser->SetCurrentCombine("");
1804
1805 }
1806 |
1807 SwitchLabels
1808 {
1809   jpElementStart(1);
1810   jpCheckEmpty(1);
1811   $<str>$ = 0;
1812   yyGetParser->SetCurrentCombine("");
1813
1814 }
1815
1816 SwitchBlockStatementGroups:
1817 {
1818   jpElementStart(0);
1819   $<str>$ = 0;
1820   yyGetParser->SetCurrentCombine("");
1821
1822 }
1823 |
1824 SwitchBlockStatementGroups SwitchBlockStatementGroup
1825 {
1826   jpElementStart(2);
1827   jpCheckEmpty(2);
1828   $<str>$ = 0;
1829   yyGetParser->SetCurrentCombine("");
1830
1831 }
1832
1833 SwitchBlockStatementGroup:
1834 SwitchLabels BlockStatements
1835 {
1836   jpElementStart(2);
1837   jpCheckEmpty(2);
1838   $<str>$ = 0;
1839   yyGetParser->SetCurrentCombine("");
1840
1841 }
1842
1843 SwitchLabels:
1844 SwitchLabel
1845 {
1846   jpElementStart(1);
1847   jpCheckEmpty(1);
1848   $<str>$ = 0;
1849   yyGetParser->SetCurrentCombine("");
1850
1851 }
1852 |
1853 SwitchLabels SwitchLabel
1854 {
1855   jpElementStart(2);
1856   jpCheckEmpty(2);
1857   $<str>$ = 0;
1858   yyGetParser->SetCurrentCombine("");
1859
1860 }
1861
1862 SwitchLabel:
1863 jp_CASE ConstantExpression jp_COLON
1864 {
1865   jpElementStart(3);
1866   jpCheckEmpty(3);
1867   $<str>$ = 0;
1868   yyGetParser->SetCurrentCombine("");
1869
1870 }
1871 |
1872 jp_DEFAULT jp_COLON
1873 {
1874   jpElementStart(2);
1875   jpCheckEmpty(2);
1876   $<str>$ = 0;
1877   yyGetParser->SetCurrentCombine("");
1878
1879 }
1880
1881 WhileStatement:
1882 jp_WHILE jp_PARESTART Expression jp_PAREEND Statement
1883 {
1884   jpElementStart(5);
1885
1886 }
1887
1888 WhileStatementNoShortIf:
1889 jp_WHILE jp_PARESTART Expression jp_PAREEND StatementNoShortIf
1890 {
1891   jpElementStart(5);
1892
1893 }
1894
1895 DoStatement:
1896 jp_DO Statement jp_WHILE jp_PARESTART Expression jp_PAREEND jp_SEMICOL
1897 {
1898   jpElementStart(7);
1899
1900 }
1901
1902 ForStatement:
1903 jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND
1904 Statement
1905 {
1906   jpElementStart(9);
1907
1908 }
1909
1910 ForUpdateopt:
1911 {
1912   jpElementStart(1);
1913   $<str>$ = 0;
1914   yyGetParser->SetCurrentCombine("");
1915
1916 }
1917 |
1918 ForUpdate
1919 {
1920   jpElementStart(1);
1921   jpCheckEmpty(1);
1922   $<str>$ = 0;
1923   yyGetParser->SetCurrentCombine("");
1924
1925 }
1926
1927 ForInitopt:
1928 {
1929   jpElementStart(0);
1930   $<str>$ = 0;
1931   yyGetParser->SetCurrentCombine("");
1932
1933 }
1934 |
1935 ForInit
1936 {
1937   jpElementStart(1);
1938   jpCheckEmpty(1);
1939   $<str>$ = 0;
1940   yyGetParser->SetCurrentCombine("");
1941
1942 }
1943
1944 ForStatementNoShortIf:
1945 jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND
1946 StatementNoShortIf
1947 {
1948   jpElementStart(9);
1949   $<str>$ = 0;
1950   yyGetParser->SetCurrentCombine("");
1951
1952 }
1953
1954 Expressionopt:
1955 {
1956   jpElementStart(0);
1957   $<str>$ = 0;
1958   yyGetParser->SetCurrentCombine("");
1959
1960 }
1961 |
1962 Expression
1963 {
1964   jpElementStart(1);
1965   jpCheckEmpty(1);
1966   $<str>$ = 0;
1967   yyGetParser->SetCurrentCombine("");
1968
1969 }
1970
1971 ForInit:
1972 StatementExpressionList
1973 {
1974   jpElementStart(1);
1975   jpCheckEmpty(1);
1976   $<str>$ = 0;
1977   yyGetParser->SetCurrentCombine("");
1978
1979 }
1980 |
1981 LocalVariableDeclaration
1982 {
1983   jpElementStart(1);
1984   jpCheckEmpty(1);
1985   $<str>$ = 0;
1986   yyGetParser->SetCurrentCombine("");
1987
1988 }
1989
1990 ForUpdate:
1991 StatementExpressionList
1992 {
1993   jpElementStart(1);
1994   jpCheckEmpty(1);
1995   $<str>$ = 0;
1996   yyGetParser->SetCurrentCombine("");
1997
1998 }
1999
2000 StatementExpressionList:
2001 StatementExpression
2002 {
2003   jpElementStart(1);
2004   jpCheckEmpty(1);
2005   $<str>$ = 0;
2006   yyGetParser->SetCurrentCombine("");
2007
2008 }
2009 |
2010 StatementExpressionList jp_COMMA StatementExpression
2011 {
2012   jpElementStart(3);
2013   jpCheckEmpty(3);
2014   $<str>$ = 0;
2015   yyGetParser->SetCurrentCombine("");
2016
2017 }
2018
2019 AssertStatement:
2020 jp_ASSERT Expression jp_SEMICOL
2021 {
2022   jpElementStart(3);
2023   jpCheckEmpty(3);
2024   $<str>$ = 0;
2025   yyGetParser->SetCurrentCombine("");
2026
2027 }
2028 |
2029 jp_ASSERT Expression jp_COLON Expression jp_SEMICOL
2030 {
2031   jpElementStart(5);
2032   jpCheckEmpty(5);
2033   $<str>$ = 0;
2034   yyGetParser->SetCurrentCombine("");
2035
2036 }
2037
2038 BreakStatement:
2039 jp_BREAK Identifieropt jp_SEMICOL
2040 {
2041   jpElementStart(3);
2042   yyGetParser->DeallocateParserType(&($<str>2));
2043   jpCheckEmpty(3);
2044   $<str>$ = 0;
2045   yyGetParser->SetCurrentCombine("");
2046
2047 }
2048
2049 Identifieropt:
2050 {
2051   jpElementStart(0);
2052   $<str>$ = 0;
2053   yyGetParser->SetCurrentCombine("");
2054
2055 }
2056 |
2057 Identifier
2058 {
2059   jpElementStart(1);
2060
2061 }
2062
2063 ContinueStatement:
2064 jp_CONTINUE Identifieropt jp_SEMICOL
2065 {
2066   jpElementStart(3);
2067   yyGetParser->DeallocateParserType(&($<str>2));
2068   jpCheckEmpty(3);
2069   $<str>$ = 0;
2070   yyGetParser->SetCurrentCombine("");
2071
2072 }
2073
2074 ReturnStatement:
2075 jp_RETURN Expressionopt jp_SEMICOL
2076 {
2077   jpElementStart(3);
2078   jpCheckEmpty(3);
2079   $<str>$ = 0;
2080   yyGetParser->SetCurrentCombine("");
2081
2082 }
2083
2084 ThrowStatement:
2085 jp_THROW Expression jp_SEMICOL
2086 {
2087   jpElementStart(3);
2088   jpCheckEmpty(3);
2089   $<str>$ = 0;
2090   yyGetParser->SetCurrentCombine("");
2091
2092 }
2093
2094 SynchronizedStatement:
2095 jp_SYNCHRONIZED jp_PARESTART Expression jp_PAREEND Block
2096 {
2097   jpElementStart(5);
2098   jpCheckEmpty(5);
2099   $<str>$ = 0;
2100   yyGetParser->SetCurrentCombine("");
2101
2102 }
2103
2104 TryStatement:
2105 jp_TRY Block Catches
2106 {
2107   jpElementStart(3);
2108   jpCheckEmpty(3);
2109   $<str>$ = 0;
2110   yyGetParser->SetCurrentCombine("");
2111
2112 }
2113 |
2114 jp_TRY Block Catchesopt Finally
2115 {
2116   jpElementStart(4);
2117   jpCheckEmpty(4);
2118   $<str>$ = 0;
2119   yyGetParser->SetCurrentCombine("");
2120
2121 }
2122
2123 Catchesopt:
2124 {
2125   jpElementStart(1);
2126   $<str>$ = 0;
2127   yyGetParser->SetCurrentCombine("");
2128
2129 }
2130 |
2131 Catches
2132 {
2133   jpElementStart(1);
2134   jpCheckEmpty(1);
2135   $<str>$ = 0;
2136   yyGetParser->SetCurrentCombine("");
2137
2138 }
2139
2140 Catches:
2141 CatchClause
2142 {
2143   jpElementStart(1);
2144   jpCheckEmpty(1);
2145   $<str>$ = 0;
2146   yyGetParser->SetCurrentCombine("");
2147
2148 }
2149 |
2150 Catches CatchClause
2151 {
2152   jpElementStart(2);
2153   jpCheckEmpty(2);
2154   $<str>$ = 0;
2155   yyGetParser->SetCurrentCombine("");
2156
2157 }
2158
2159 CatchClause:
2160 jp_CATCH jp_PARESTART FormalParameter jp_PAREEND Block
2161 {
2162   jpElementStart(5);
2163
2164 }
2165
2166 Finally:
2167 jp_FINALLY Block
2168 {
2169   jpElementStart(2);
2170   jpCheckEmpty(2);
2171   $<str>$ = 0;
2172   yyGetParser->SetCurrentCombine("");
2173
2174 }
2175
2176 Primary:
2177 PrimaryNoNewArray
2178 {
2179   jpElementStart(1);
2180   jpCheckEmpty(1);
2181   $<str>$ = 0;
2182   yyGetParser->SetCurrentCombine("");
2183
2184 }
2185 |
2186 ArrayCreationExpression
2187 {
2188   jpElementStart(1);
2189   jpCheckEmpty(1);
2190   $<str>$ = 0;
2191   yyGetParser->SetCurrentCombine("");
2192
2193 }
2194
2195 PrimaryNoNewArray:
2196 Literal
2197 {
2198   jpElementStart(1);
2199   jpCheckEmpty(1);
2200   $<str>$ = 0;
2201   yyGetParser->SetCurrentCombine("");
2202
2203 }
2204 |
2205 jp_THIS
2206 {
2207   jpElementStart(1);
2208
2209 }
2210 |
2211 jp_PARESTART Expression jp_PAREEND
2212 {
2213   jpElementStart(3);
2214   jpCheckEmpty(3);
2215   $<str>$ = 0;
2216   yyGetParser->SetCurrentCombine("");
2217
2218 }
2219 |
2220 ClassInstanceCreationExpression
2221 {
2222   jpElementStart(1);
2223   jpCheckEmpty(1);
2224   $<str>$ = 0;
2225   yyGetParser->SetCurrentCombine("");
2226
2227 }
2228 |
2229 FieldAccess
2230 {
2231   jpElementStart(1);
2232   jpCheckEmpty(1);
2233   $<str>$ = 0;
2234   yyGetParser->SetCurrentCombine("");
2235
2236 }
2237 |
2238 MethodInvocation
2239 {
2240   jpElementStart(1);
2241   jpCheckEmpty(1);
2242   $<str>$ = 0;
2243   yyGetParser->SetCurrentCombine("");
2244
2245 }
2246 |
2247 ArrayAccess
2248 {
2249   jpElementStart(1);
2250   jpCheckEmpty(1);
2251   $<str>$ = 0;
2252   yyGetParser->SetCurrentCombine("");
2253
2254 }
2255
2256 ClassInstanceCreationExpression:
2257 New ClassType jp_PARESTART ArgumentListopt jp_PAREEND ClassBodyOpt
2258 {
2259   jpElementStart(6);
2260   jpCheckEmpty(6);
2261   $<str>$ = 0;
2262   yyGetParser->SetCurrentCombine("");
2263
2264 }
2265
2266 ClassBodyOpt:
2267 {
2268   jpElementStart(0);
2269   $<str>$ = 0;
2270   yyGetParser->SetCurrentCombine("");
2271
2272 }
2273 |
2274 ClassBody
2275 {
2276   jpElementStart(1);
2277   jpCheckEmpty(1);
2278   $<str>$ = 0;
2279   yyGetParser->SetCurrentCombine("");
2280
2281 }
2282
2283 ArgumentListopt:
2284 {
2285   jpElementStart(0);
2286   $<str>$ = 0;
2287   yyGetParser->SetCurrentCombine("");
2288
2289 }
2290 |
2291 ArgumentList
2292 {
2293   jpElementStart(1);
2294   jpCheckEmpty(1);
2295   $<str>$ = 0;
2296   yyGetParser->SetCurrentCombine("");
2297
2298 }
2299
2300 ArgumentList:
2301 Expression
2302 {
2303   jpElementStart(1);
2304   jpCheckEmpty(1);
2305   $<str>$ = 0;
2306   yyGetParser->SetCurrentCombine("");
2307
2308 }
2309 |
2310 ArgumentList jp_COMMA Expression
2311 {
2312   jpElementStart(3);
2313   jpCheckEmpty(3);
2314   $<str>$ = 0;
2315   yyGetParser->SetCurrentCombine("");
2316
2317 }
2318
2319 ArrayCreationExpression:
2320 New PrimitiveType DimExprs Dimsopt
2321 {
2322   jpElementStart(4);
2323   jpCheckEmpty(4);
2324   $<str>$ = 0;
2325   yyGetParser->SetCurrentCombine("");
2326
2327 }
2328 |
2329 New ClassOrInterfaceType DimExprs Dimsopt
2330 {
2331   jpElementStart(4);
2332   jpCheckEmpty(4);
2333   $<str>$ = 0;
2334   yyGetParser->SetCurrentCombine("");
2335
2336 }
2337 |
2338 New PrimitiveType Dims ArrayInitializer
2339 {
2340   jpElementStart(4);
2341   jpCheckEmpty(4);
2342   $<str>$ = 0;
2343   yyGetParser->SetCurrentCombine("");
2344
2345 }
2346 |
2347 New ClassOrInterfaceType Dims ArrayInitializer
2348 {
2349   jpElementStart(4);
2350   jpCheckEmpty(4);
2351   $<str>$ = 0;
2352   yyGetParser->SetCurrentCombine("");
2353
2354 }
2355
2356 Dimsopt:
2357 {
2358   jpElementStart(0);
2359   $<str>$ = 0;
2360   yyGetParser->SetCurrentCombine("");
2361
2362 }
2363 |
2364 Dims
2365 {
2366   jpElementStart(1);
2367   jpCheckEmpty(1);
2368   $<str>$ = 0;
2369   yyGetParser->SetCurrentCombine("");
2370
2371 }
2372
2373 DimExprs:
2374 DimExpr
2375 {
2376   jpElementStart(1);
2377   jpCheckEmpty(1);
2378   $<str>$ = 0;
2379   yyGetParser->SetCurrentCombine("");
2380
2381 }
2382 |
2383 DimExprs DimExpr
2384 {
2385   jpElementStart(2);
2386   jpCheckEmpty(2);
2387   $<str>$ = 0;
2388   yyGetParser->SetCurrentCombine("");
2389
2390 }
2391
2392 DimExpr:
2393 jp_BRACKETSTART Expression jp_BRACKETEND
2394 {
2395   jpElementStart(3);
2396   jpCheckEmpty(3);
2397   $<str>$ = 0;
2398   yyGetParser->SetCurrentCombine("");
2399
2400 }
2401
2402 Dims:
2403 jp_BRACKETSTART jp_BRACKETEND
2404 {
2405   jpElementStart(2);
2406
2407 }
2408 |
2409 Dims jp_BRACKETSTART jp_BRACKETEND
2410 {
2411   jpElementStart(3);
2412
2413 }
2414
2415 FieldAccess:
2416 Primary jp_DOT Identifier
2417 {
2418   jpElementStart(3);
2419   yyGetParser->DeallocateParserType(&($<str>3));
2420   jpCheckEmpty(3);
2421   $<str>$ = 0;
2422   yyGetParser->SetCurrentCombine("");
2423
2424 }
2425 |
2426 jp_SUPER jp_DOT Identifier
2427 {
2428   jpElementStart(3);
2429   yyGetParser->DeallocateParserType(&($<str>3));
2430   jpCheckEmpty(3);
2431   $<str>$ = 0;
2432   yyGetParser->SetCurrentCombine("");
2433
2434 }
2435 |
2436 jp_THIS jp_DOT Identifier
2437 {
2438   jpElementStart(3);
2439   yyGetParser->DeallocateParserType(&($<str>3));
2440   jpCheckEmpty(3);
2441   $<str>$ = 0;
2442   yyGetParser->SetCurrentCombine("");
2443
2444 }
2445 |
2446 Primary jp_DOT jp_THIS
2447 {
2448   jpElementStart(3);
2449   yyGetParser->DeallocateParserType(&($<str>3));
2450   jpCheckEmpty(3);
2451   $<str>$ = 0;
2452   yyGetParser->SetCurrentCombine("");
2453
2454 }
2455
2456 MethodInvocation:
2457 Name jp_PARESTART ArgumentListopt jp_PAREEND
2458 {
2459   jpElementStart(4);
2460   yyGetParser->DeallocateParserType(&($<str>1));
2461   jpCheckEmpty(4);
2462   $<str>$ = 0;
2463   yyGetParser->SetCurrentCombine("");
2464
2465 }
2466 |
2467 Primary jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND
2468 {
2469   jpElementStart(6);
2470   yyGetParser->DeallocateParserType(&($<str>1));
2471   yyGetParser->DeallocateParserType(&($<str>3));
2472   jpCheckEmpty(6);
2473   $<str>$ = 0;
2474   yyGetParser->SetCurrentCombine("");
2475
2476 }
2477 |
2478 jp_SUPER jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND
2479 {
2480   jpElementStart(6);
2481   yyGetParser->DeallocateParserType(&($<str>3));
2482   jpCheckEmpty(6);
2483   $<str>$ = 0;
2484   yyGetParser->SetCurrentCombine("");
2485
2486 }
2487 |
2488 jp_THIS jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND
2489 {
2490   jpElementStart(6);
2491   yyGetParser->DeallocateParserType(&($<str>3));
2492   jpCheckEmpty(6);
2493   $<str>$ = 0;
2494   yyGetParser->SetCurrentCombine("");
2495
2496 }
2497
2498 ArrayAccess:
2499 Name jp_BRACKETSTART Expression jp_BRACKETEND
2500 {
2501   jpElementStart(4);
2502   yyGetParser->DeallocateParserType(&($<str>1));
2503   jpCheckEmpty(4);
2504   $<str>$ = 0;
2505   yyGetParser->SetCurrentCombine("");
2506
2507 }
2508 |
2509 PrimaryNoNewArray jp_BRACKETSTART Expression jp_BRACKETEND
2510 {
2511   jpElementStart(4);
2512   jpCheckEmpty(4);
2513   $<str>$ = 0;
2514   yyGetParser->SetCurrentCombine("");
2515
2516 }
2517
2518 PostfixExpression:
2519 Primary
2520 {
2521   jpElementStart(1);
2522   jpCheckEmpty(1);
2523   $<str>$ = 0;
2524   yyGetParser->SetCurrentCombine("");
2525
2526 }
2527 |
2528 Name
2529 {
2530   jpElementStart(1);
2531   yyGetParser->DeallocateParserType(&($<str>1));
2532   $<str>$ = 0;
2533   yyGetParser->SetCurrentCombine("");
2534
2535 }
2536 |
2537 ArrayType jp_DOT jp_CLASS
2538 {
2539   jpElementStart(3);
2540   jpCheckEmpty(3);
2541   $<str>$ = 0;
2542   yyGetParser->SetCurrentCombine("");
2543
2544 }
2545 |
2546 PostIncrementExpression
2547 {
2548   jpElementStart(1);
2549   jpCheckEmpty(1);
2550   $<str>$ = 0;
2551   yyGetParser->SetCurrentCombine("");
2552
2553 }
2554 |
2555 PostDecrementExpression
2556 {
2557   jpElementStart(1);
2558   jpCheckEmpty(1);
2559   $<str>$ = 0;
2560   yyGetParser->SetCurrentCombine("");
2561
2562 }
2563
2564 PostIncrementExpression:
2565 PostfixExpression jp_PLUSPLUS
2566 {
2567   jpElementStart(2);
2568   jpCheckEmpty(2);
2569   $<str>$ = 0;
2570   yyGetParser->SetCurrentCombine("");
2571
2572 }
2573
2574 PostDecrementExpression:
2575 PostfixExpression jp_MINUSMINUS
2576 {
2577   jpElementStart(2);
2578   jpCheckEmpty(2);
2579   $<str>$ = 0;
2580   yyGetParser->SetCurrentCombine("");
2581
2582 }
2583
2584 UnaryExpression:
2585 PreIncrementExpression
2586 {
2587   jpElementStart(1);
2588   jpCheckEmpty(1);
2589   $<str>$ = 0;
2590   yyGetParser->SetCurrentCombine("");
2591
2592 }
2593 |
2594 PreDecrementExpression
2595 {
2596   jpElementStart(1);
2597   jpCheckEmpty(1);
2598   $<str>$ = 0;
2599   yyGetParser->SetCurrentCombine("");
2600
2601 }
2602 |
2603 jp_PLUS UnaryExpression
2604 {
2605   jpElementStart(2);
2606   jpCheckEmpty(2);
2607   $<str>$ = 0;
2608   yyGetParser->SetCurrentCombine("");
2609
2610 }
2611 |
2612 jp_MINUS UnaryExpression
2613 {
2614   jpElementStart(2);
2615   jpCheckEmpty(2);
2616   $<str>$ = 0;
2617   yyGetParser->SetCurrentCombine("");
2618
2619 }
2620 |
2621 UnaryExpressionNotPlusMinus
2622 {
2623   jpElementStart(1);
2624   jpCheckEmpty(1);
2625   $<str>$ = 0;
2626   yyGetParser->SetCurrentCombine("");
2627
2628 }
2629
2630 PreIncrementExpression:
2631 jp_PLUSPLUS UnaryExpression
2632 {
2633   jpElementStart(2);
2634   jpCheckEmpty(2);
2635   $<str>$ = 0;
2636   yyGetParser->SetCurrentCombine("");
2637
2638 }
2639
2640 PreDecrementExpression:
2641 jp_MINUSMINUS UnaryExpression
2642 {
2643   jpElementStart(2);
2644   jpCheckEmpty(2);
2645   $<str>$ = 0;
2646   yyGetParser->SetCurrentCombine("");
2647
2648 }
2649
2650 UnaryExpressionNotPlusMinus:
2651 PostfixExpression
2652 {
2653   jpElementStart(1);
2654   jpCheckEmpty(1);
2655   $<str>$ = 0;
2656   yyGetParser->SetCurrentCombine("");
2657
2658 }
2659 |
2660 jp_TILDE UnaryExpression
2661 {
2662   jpElementStart(2);
2663   jpCheckEmpty(2);
2664   $<str>$ = 0;
2665   yyGetParser->SetCurrentCombine("");
2666
2667 }
2668 |
2669 jp_EXCLAMATION UnaryExpression
2670 {
2671   jpElementStart(2);
2672   jpCheckEmpty(2);
2673   $<str>$ = 0;
2674   yyGetParser->SetCurrentCombine("");
2675
2676 }
2677 |
2678 CastExpression
2679 {
2680   jpElementStart(1);
2681   jpCheckEmpty(1);
2682   $<str>$ = 0;
2683   yyGetParser->SetCurrentCombine("");
2684
2685 }
2686
2687 CastExpression:
2688 jp_PARESTART PrimitiveType Dimsopt jp_PAREEND UnaryExpression
2689 {
2690   jpElementStart(5);
2691   jpCheckEmpty(5);
2692   $<str>$ = 0;
2693   yyGetParser->SetCurrentCombine("");
2694
2695 }
2696 |
2697 jp_PARESTART Expression jp_PAREEND UnaryExpressionNotPlusMinus
2698 {
2699   jpElementStart(4);
2700   jpCheckEmpty(4);
2701   $<str>$ = 0;
2702   yyGetParser->SetCurrentCombine("");
2703
2704 }
2705 |
2706 jp_PARESTART Name Dims jp_PAREEND UnaryExpressionNotPlusMinus
2707 {
2708   jpElementStart(5);
2709
2710 }
2711
2712 MultiplicativeExpression:
2713 UnaryExpression
2714 {
2715   jpElementStart(1);
2716   jpCheckEmpty(1);
2717   $<str>$ = 0;
2718   yyGetParser->SetCurrentCombine("");
2719
2720 }
2721 |
2722 MultiplicativeExpression jp_TIMES UnaryExpression
2723 {
2724   jpElementStart(3);
2725   jpCheckEmpty(3);
2726   $<str>$ = 0;
2727   yyGetParser->SetCurrentCombine("");
2728
2729 }
2730 |
2731 MultiplicativeExpression jp_DIVIDE UnaryExpression
2732 {
2733   jpElementStart(3);
2734   jpCheckEmpty(3);
2735   $<str>$ = 0;
2736   yyGetParser->SetCurrentCombine("");
2737
2738 }
2739 |
2740 MultiplicativeExpression jp_PERCENT UnaryExpression
2741 {
2742   jpElementStart(3);
2743   jpCheckEmpty(3);
2744   $<str>$ = 0;
2745   yyGetParser->SetCurrentCombine("");
2746
2747 }
2748
2749 AdditiveExpression:
2750 MultiplicativeExpression
2751 {
2752   jpElementStart(1);
2753   jpCheckEmpty(1);
2754   $<str>$ = 0;
2755   yyGetParser->SetCurrentCombine("");
2756
2757 }
2758 |
2759 AdditiveExpression jp_PLUS MultiplicativeExpression
2760 {
2761   jpElementStart(3);
2762   jpCheckEmpty(3);
2763   $<str>$ = 0;
2764   yyGetParser->SetCurrentCombine("");
2765
2766 }
2767 |
2768 AdditiveExpression jp_MINUS MultiplicativeExpression
2769 {
2770   jpElementStart(3);
2771   jpCheckEmpty(3);
2772   $<str>$ = 0;
2773   yyGetParser->SetCurrentCombine("");
2774
2775 }
2776
2777 ShiftExpression:
2778 AdditiveExpression
2779 {
2780   jpElementStart(1);
2781   jpCheckEmpty(1);
2782   $<str>$ = 0;
2783   yyGetParser->SetCurrentCombine("");
2784
2785 }
2786 |
2787 ShiftExpression jp_LTLT AdditiveExpression
2788 {
2789   jpElementStart(3);
2790   jpCheckEmpty(3);
2791   $<str>$ = 0;
2792   yyGetParser->SetCurrentCombine("");
2793
2794 }
2795 |
2796 ShiftExpression jp_GTGT AdditiveExpression
2797 {
2798   jpElementStart(3);
2799   jpCheckEmpty(3);
2800   $<str>$ = 0;
2801   yyGetParser->SetCurrentCombine("");
2802
2803 }
2804 |
2805 ShiftExpression jp_GTGTGT AdditiveExpression
2806 {
2807   jpElementStart(3);
2808   jpCheckEmpty(3);
2809   $<str>$ = 0;
2810   yyGetParser->SetCurrentCombine("");
2811
2812 }
2813
2814 RelationalExpression:
2815 ShiftExpression
2816 {
2817   jpElementStart(1);
2818   jpCheckEmpty(1);
2819   $<str>$ = 0;
2820   yyGetParser->SetCurrentCombine("");
2821
2822 }
2823 |
2824 RelationalExpression jp_LESSTHAN ShiftExpression
2825 {
2826   jpElementStart(3);
2827   jpCheckEmpty(3);
2828   $<str>$ = 0;
2829   yyGetParser->SetCurrentCombine("");
2830
2831 }
2832 |
2833 RelationalExpression jp_GREATER ShiftExpression
2834 {
2835   jpElementStart(3);
2836   jpCheckEmpty(3);
2837   $<str>$ = 0;
2838   yyGetParser->SetCurrentCombine("");
2839
2840 }
2841 |
2842 RelationalExpression jp_LTEQUALS ShiftExpression
2843 {
2844   jpElementStart(3);
2845   jpCheckEmpty(3);
2846   $<str>$ = 0;
2847   yyGetParser->SetCurrentCombine("");
2848
2849 }
2850 |
2851 RelationalExpression jp_GTEQUALS ShiftExpression
2852 {
2853   jpElementStart(3);
2854   jpCheckEmpty(3);
2855   $<str>$ = 0;
2856   yyGetParser->SetCurrentCombine("");
2857
2858 }
2859 |
2860 RelationalExpression jp_INSTANCEOF ReferenceType
2861 {
2862   jpElementStart(3);
2863   jpCheckEmpty(3);
2864   $<str>$ = 0;
2865   yyGetParser->SetCurrentCombine("");
2866
2867 }
2868
2869 EqualityExpression:
2870 RelationalExpression
2871 {
2872   jpElementStart(1);
2873   jpCheckEmpty(1);
2874   $<str>$ = 0;
2875   yyGetParser->SetCurrentCombine("");
2876
2877 }
2878 |
2879 EqualityExpression jp_EQUALSEQUALS RelationalExpression
2880 {
2881   jpElementStart(3);
2882   jpCheckEmpty(3);
2883   $<str>$ = 0;
2884   yyGetParser->SetCurrentCombine("");
2885
2886 }
2887 |
2888 EqualityExpression jp_EXCLAMATIONEQUALS RelationalExpression
2889 {
2890   jpElementStart(3);
2891   jpCheckEmpty(3);
2892   $<str>$ = 0;
2893   yyGetParser->SetCurrentCombine("");
2894
2895 }
2896
2897 AndExpression:
2898 EqualityExpression
2899 {
2900   jpElementStart(1);
2901   jpCheckEmpty(1);
2902   $<str>$ = 0;
2903   yyGetParser->SetCurrentCombine("");
2904
2905 }
2906 |
2907 AndExpression jp_AND EqualityExpression
2908 {
2909   jpElementStart(3);
2910   jpCheckEmpty(3);
2911   $<str>$ = 0;
2912   yyGetParser->SetCurrentCombine("");
2913
2914 }
2915
2916 ExclusiveOrExpression:
2917 AndExpression
2918 {
2919   jpElementStart(1);
2920   jpCheckEmpty(1);
2921   $<str>$ = 0;
2922   yyGetParser->SetCurrentCombine("");
2923
2924 }
2925 |
2926 ExclusiveOrExpression jp_CARROT AndExpression
2927 {
2928   jpElementStart(3);
2929   jpCheckEmpty(3);
2930   $<str>$ = 0;
2931   yyGetParser->SetCurrentCombine("");
2932
2933 }
2934
2935 InclusiveOrExpression:
2936 ExclusiveOrExpression
2937 {
2938   jpElementStart(1);
2939   jpCheckEmpty(1);
2940   $<str>$ = 0;
2941   yyGetParser->SetCurrentCombine("");
2942
2943 }
2944 |
2945 InclusiveOrExpression jp_PIPE ExclusiveOrExpression
2946 {
2947   jpElementStart(3);
2948   jpCheckEmpty(3);
2949   $<str>$ = 0;
2950   yyGetParser->SetCurrentCombine("");
2951
2952 }
2953
2954 ConditionalAndExpression:
2955 InclusiveOrExpression
2956 {
2957   jpElementStart(1);
2958   jpCheckEmpty(1);
2959   $<str>$ = 0;
2960   yyGetParser->SetCurrentCombine("");
2961
2962 }
2963 |
2964 ConditionalAndExpression jp_ANDAND InclusiveOrExpression
2965 {
2966   jpElementStart(3);
2967   jpCheckEmpty(3);
2968   $<str>$ = 0;
2969   yyGetParser->SetCurrentCombine("");
2970
2971 }
2972
2973 ConditionalOrExpression:
2974 ConditionalAndExpression
2975 {
2976   jpElementStart(1);
2977   jpCheckEmpty(1);
2978   $<str>$ = 0;
2979   yyGetParser->SetCurrentCombine("");
2980
2981 }
2982 |
2983 ConditionalOrExpression jp_PIPEPIPE ConditionalAndExpression
2984 {
2985   jpElementStart(3);
2986   jpCheckEmpty(3);
2987   $<str>$ = 0;
2988   yyGetParser->SetCurrentCombine("");
2989
2990 }
2991
2992 ConditionalExpression:
2993 ConditionalOrExpression
2994 {
2995   jpElementStart(1);
2996   jpCheckEmpty(1);
2997   $<str>$ = 0;
2998   yyGetParser->SetCurrentCombine("");
2999
3000 }
3001 |
3002 ConditionalOrExpression jp_QUESTION Expression jp_COLON ConditionalExpression
3003 {
3004   jpElementStart(5);
3005   jpCheckEmpty(5);
3006   $<str>$ = 0;
3007   yyGetParser->SetCurrentCombine("");
3008
3009 }
3010
3011 AssignmentExpression:
3012 ConditionalExpression
3013 {
3014   jpElementStart(1);
3015   jpCheckEmpty(1);
3016   $<str>$ = 0;
3017   yyGetParser->SetCurrentCombine("");
3018
3019 }
3020 |
3021 Assignment
3022 {
3023   jpElementStart(1);
3024   jpCheckEmpty(1);
3025   $<str>$ = 0;
3026   yyGetParser->SetCurrentCombine("");
3027
3028 }
3029
3030 Assignment:
3031 LeftHandSide AssignmentOperator AssignmentExpression
3032 {
3033   jpElementStart(3);
3034   jpCheckEmpty(3);
3035   $<str>$ = 0;
3036   yyGetParser->SetCurrentCombine("");
3037
3038 }
3039
3040 LeftHandSide:
3041 Name
3042 {
3043   jpElementStart(1);
3044   yyGetParser->DeallocateParserType(&($<str>1));
3045   jpCheckEmpty(1);
3046   $<str>$ = 0;
3047   yyGetParser->SetCurrentCombine("");
3048
3049 }
3050 |
3051 FieldAccess
3052 {
3053   jpElementStart(1);
3054   jpCheckEmpty(1);
3055   $<str>$ = 0;
3056   yyGetParser->SetCurrentCombine("");
3057
3058 }
3059 |
3060 ArrayAccess
3061 {
3062   jpElementStart(1);
3063   jpCheckEmpty(1);
3064   $<str>$ = 0;
3065   yyGetParser->SetCurrentCombine("");
3066
3067 }
3068
3069 AssignmentOperator:
3070 jp_EQUALS
3071 {
3072   jpElementStart(1);
3073   jpCheckEmpty(1);
3074   $<str>$ = 0;
3075   yyGetParser->SetCurrentCombine("");
3076
3077 }
3078 |
3079 jp_TIMESEQUALS
3080 {
3081   jpElementStart(1);
3082   jpCheckEmpty(1);
3083   $<str>$ = 0;
3084   yyGetParser->SetCurrentCombine("");
3085
3086 }
3087 |
3088 jp_DIVIDEEQUALS
3089 {
3090   jpElementStart(1);
3091   jpCheckEmpty(1);
3092   $<str>$ = 0;
3093   yyGetParser->SetCurrentCombine("");
3094
3095 }
3096 |
3097 jp_PERCENTEQUALS
3098 {
3099   jpElementStart(1);
3100   jpCheckEmpty(1);
3101   $<str>$ = 0;
3102   yyGetParser->SetCurrentCombine("");
3103
3104 }
3105 |
3106 jp_PLUSEQUALS
3107 {
3108   jpElementStart(1);
3109   jpCheckEmpty(1);
3110   $<str>$ = 0;
3111   yyGetParser->SetCurrentCombine("");
3112
3113 }
3114 |
3115 jp_MINUSEQUALS
3116 {
3117   jpElementStart(1);
3118   jpCheckEmpty(1);
3119   $<str>$ = 0;
3120   yyGetParser->SetCurrentCombine("");
3121
3122 }
3123 |
3124 jp_LESLESEQUALS
3125 {
3126   jpElementStart(1);
3127   jpCheckEmpty(1);
3128   $<str>$ = 0;
3129   yyGetParser->SetCurrentCombine("");
3130
3131 }
3132 |
3133 jp_GTGTEQUALS
3134 {
3135   jpElementStart(1);
3136   jpCheckEmpty(1);
3137   $<str>$ = 0;
3138   yyGetParser->SetCurrentCombine("");
3139
3140 }
3141 |
3142 jp_GTGTGTEQUALS
3143 {
3144   jpElementStart(1);
3145   jpCheckEmpty(1);
3146   $<str>$ = 0;
3147   yyGetParser->SetCurrentCombine("");
3148
3149 }
3150 |
3151 jp_ANDEQUALS
3152 {
3153   jpElementStart(1);
3154   jpCheckEmpty(1);
3155   $<str>$ = 0;
3156   yyGetParser->SetCurrentCombine("");
3157
3158 }
3159 |
3160 jp_CARROTEQUALS
3161 {
3162   jpElementStart(1);
3163   jpCheckEmpty(1);
3164   $<str>$ = 0;
3165   yyGetParser->SetCurrentCombine("");
3166
3167 }
3168 |
3169 jp_PIPEEQUALS
3170 {
3171   jpElementStart(1);
3172   jpCheckEmpty(1);
3173   $<str>$ = 0;
3174   yyGetParser->SetCurrentCombine("");
3175
3176 }
3177
3178 Expression:
3179 AssignmentExpression
3180 {
3181   jpElementStart(1);
3182   jpCheckEmpty(1);
3183   $<str>$ = 0;
3184   yyGetParser->SetCurrentCombine("");
3185
3186 }
3187
3188 ConstantExpression:
3189 Expression
3190 {
3191   jpElementStart(1);
3192   jpCheckEmpty(1);
3193   $<str>$ = 0;
3194   yyGetParser->SetCurrentCombine("");
3195
3196 }
3197
3198 New:
3199 jp_NEW
3200 {
3201   jpElementStart(1);
3202   jpCheckEmpty(1);
3203   $<str>$ = 0;
3204   yyGetParser->SetCurrentCombine("");
3205
3206 }
3207 |
3208 Name jp_DOT jp_NEW
3209 {
3210   jpElementStart(3);
3211   jpStoreClass($<str>1);
3212   jpCheckEmpty(3);
3213   $<str>$ = 0;
3214   yyGetParser->SetCurrentCombine("");
3215
3216 }
3217
3218 %%
3219 /* End of grammar */
3220
3221 /*--------------------------------------------------------------------------*/
3222 void cmDependsJavaError(yyscan_t yyscanner, const char* message)
3223 {
3224   yyGetParser->Error(message);
3225 }
3226