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