1 ;;; wisent-java-wy.el --- Generated parser support file
3 ;; Copyright (C) 2002, 2003, 2004, 2005, 2006 David Ponce
5 ;; Author: Eric M. Ludlam <zappo@projectile.siege-engine.com>
6 ;; Created: 2007-06-05 21:46:56-0400
8 ;; X-RCS: $Id: wisent-java-wy.el,v 1.1 2007-11-26 15:12:32 michaels Exp $
10 ;; This file is not part of GNU Emacs.
12 ;; This program is free software; you can redistribute it and/or
13 ;; modify it under the terms of the GNU General Public License as
14 ;; published by the Free Software Foundation; either version 2, or (at
15 ;; your option) any later version.
17 ;; This software is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
29 ;; PLEASE DO NOT MANUALLY EDIT THIS FILE! It is automatically
30 ;; generated from the grammar file wisent-java.wy.
39 ;; Stack of enum names in scope.
40 (defvar wisent-java-wy--enums nil)
41 ;; Stack of anonymous class declarations found in an expression.
42 (defvar wisent-java-wy--anons nil)
46 (defconst wisent-java-wy--keyword-table
47 (semantic-lex-make-keyword-table
48 '(("abstract" . ABSTRACT)
58 ("continue" . CONTINUE)
71 ("implements" . IMPLEMENTS)
73 ("instanceof" . INSTANCEOF)
75 ("interface" . INTERFACE)
81 ("protected" . PROTECTED)
86 ("strictfp" . STRICTFP)
89 ("synchronized" . SYNCHRONIZED)
93 ("transient" . TRANSIENT)
96 ("volatile" . VOLATILE)
99 ("@version" . _VERSION)
101 ("@return" . _RETURN)
102 ("@exception" . _EXCEPTION)
103 ("@throws" . _THROWS)
106 ("@serial" . _SERIAL)
107 ("@serialData" . _SERIALDATA)
108 ("@serialField" . _SERIALFIELD)
109 ("@deprecated" . _DEPRECATED))
110 '(("@deprecated" javadoc
112 (type function variable)
114 ("@serialField" javadoc
118 ("@serialData" javadoc
128 (type function variable)
132 (type function variable)
138 ("@exception" javadoc
155 ("while" summary "while (<expr>) <stmt> | do <stmt> while (<expr>);")
156 ("volatile" summary "Field declaration modifier: volatile <type> <name> ...")
157 ("void" summary "Method return type: void <name> ...")
158 ("try" summary "try {<stmts>} [catch(<parm>) {<stmts>} ...] [finally {<stmts>}]")
159 ("transient" summary "Field declaration modifier: transient <type> <name> ...")
160 ("throws" summary "Method|Constructor declaration: throws <classType>, ...")
161 ("throw" summary "throw <expr> ;")
162 ("synchronized" summary "synchronized (<expr>) ... | Method decl. modifier: synchronized <type> <name> ...")
163 ("switch" summary "switch(<expr>) {[case <const-expr>: <stmts> ...] [default: <stmts>]}")
164 ("strictfp" summary "Declaration modifier: strictfp {class|interface|<type>} <name> ...")
165 ("static" summary "Declaration modifier: static {class|interface|<type>} <name> ...")
166 ("short" summary "Integral primitive type (-32768 to 32767)")
167 ("return" summary "return [<expr>] ;")
168 ("public" summary "Access level modifier: public {class|interface|<type>} <name> ...")
169 ("protected" summary "Access level modifier: protected {class|interface|<type>} <name> ...")
170 ("private" summary "Access level modifier: private {class|interface|<type>} <name> ...")
171 ("package" summary "Package declaration: package <name>")
172 ("native" summary "Method declaration modifier: native <type> <name> ...")
173 ("long" summary "Integral primitive type (-9223372036854775808 to 9223372036854775807)")
174 ("interface" summary "Interface declaration: interface <name>")
175 ("int" summary "Integral primitive type (-2147483648 to 2147483647)")
176 ("import" summary "Import package declarations: import <package>")
177 ("implements" summary "Class SuperInterfaces declaration: implements <name> [, ...]")
178 ("if" summary "if (<expr>) <stmt> [else <stmt>]")
179 ("goto" summary "Unused reserved word")
180 ("for" summary "for ([<init-expr>]; [<expr>]; [<update-expr>]) <stmt>")
181 ("float" summary "Primitive floating-point type (single-precision 32-bit IEEE 754)")
182 ("finally" summary "try {<stmts>} ... finally {<stmts>}")
183 ("final" summary "Class|Member declaration modifier: final {class|<type>} <name> ...")
184 ("extends" summary "SuperClass|SuperInterfaces declaration: extends <name> [, ...]")
185 ("enum" summary "Enum declaration")
186 ("else" summary "if (<expr>) <stmt> else <stmt>")
187 ("double" summary "Primitive floating-point type (double-precision 64-bit IEEE 754)")
188 ("do" summary "do <stmt> while (<expr>);")
189 ("default" summary "switch(<expr>) { ... default: <stmts>}")
190 ("continue" summary "continue [<label>] ;")
191 ("const" summary "Unused reserved word")
192 ("class" summary "Class declaration: class <name>")
193 ("char" summary "Integral primitive type ('u0000' to 'uffff') (0 to 65535)")
194 ("catch" summary "try {<stmts>} catch(<parm>) {<stmts>} ... ")
195 ("case" summary "switch(<expr>) {case <const-expr>: <stmts> ... }")
196 ("byte" summary "Integral primitive type (-128 to 127)")
197 ("break" summary "break [<label>] ;")
198 ("boolean" summary "Primitive logical quantity type (true or false)")
199 ("assert" summary "Assertion statement: assert <expr> [,<expr> ...];")
200 ("abstract" summary "Class|Method declaration modifier: abstract {class|<type>} <name> ...")))
201 "Table of language keywords.")
203 (defconst wisent-java-wy--token-table
204 (semantic-lex-make-type-table
211 (BOOLEAN_LITERAL . "\\`true\\'")
212 (BOOLEAN_LITERAL . "\\`false\\'")
213 (NULL_LITERAL . "\\`null\\'"))
266 (BRACK_BLOCK . "(LBRACK RBRACK)")
267 (BRACE_BLOCK . "(LBRACE RBRACE)")
268 (PAREN_BLOCK . "(LPAREN RPAREN)")))
269 '(("keyword" :declared t)
270 ("number" :declared t)
271 ("string" :declared t)
272 ("symbol" :declared t)
273 ("punctuation" :declared t)
274 ("block" :declared t)))
275 "Table of lexical tokens.")
277 (defconst wisent-java-wy--parse-table
280 (require 'wisent-comp))
281 (wisent-compile-grammar
282 '((PAREN_BLOCK BRACE_BLOCK BRACK_BLOCK LPAREN RPAREN LBRACE RBRACE LBRACK RBRACK NOT NOTEQ MOD MODEQ AND ANDAND ANDEQ MULT MULTEQ PLUS PLUSPLUS PLUSEQ COMMA MINUS MINUSMINUS MINUSEQ DOT DIV DIVEQ COLON SEMICOLON LT LSHIFT LSHIFTEQ LTEQ EQ EQEQ GT GTEQ RSHIFT RSHIFTEQ URSHIFT URSHIFTEQ QUESTION XOR XOREQ OR OREQ OROR COMP ELLIPSIS AT NULL_LITERAL BOOLEAN_LITERAL IDENTIFIER STRING_LITERAL NUMBER_LITERAL ABSTRACT ASSERT BOOLEAN BREAK BYTE CASE CATCH CHAR CLASS CONST CONTINUE DEFAULT DO DOUBLE ELSE ENUM EXTENDS FINAL FINALLY FLOAT FOR GOTO IF IMPLEMENTS IMPORT INSTANCEOF INT INTERFACE LONG NATIVE NEW PACKAGE PRIVATE PROTECTED PUBLIC RETURN SHORT STATIC STRICTFP SUPER SWITCH SYNCHRONIZED THIS THROW THROWS TRANSIENT TRY VOID VOLATILE WHILE _AUTHOR _VERSION _PARAM _RETURN _EXCEPTION _THROWS _SEE _SINCE _SERIAL _SERIALDATA _SERIALFIELD _DEPRECATED)
285 ((compilation_unit)))
299 ((floating_point_type)))
310 ((class_or_interface_type))
316 ((class_or_interface LT type_argument_list_1 DOT name)
317 (concat $1 $2 $3 $4 $5)))
318 (class_or_interface_type
319 ((class_or_interface))
320 ((class_or_interface LT type_argument_list_1)
323 ((class_or_interface_type)))
325 ((class_or_interface_type)))
327 ((primitive_type dims)
331 ((class_or_interface LT type_argument_list_1 DOT name dims)
332 (concat $1 $2 $3 $4 $5 $6))
333 ((class_or_interface LT type_argument_list_1 dims)
334 (concat $1 $2 $3 $4)))
340 ((LT type_argument_list_1)
344 ((QUESTION EXTENDS reference_type)
345 (concat $1 " " $2 " " $3))
346 ((QUESTION SUPER reference_type)
347 (concat $1 " " $2 " " $3)))
351 ((QUESTION EXTENDS reference_type_1)
352 (concat $1 " " $2 " " $3))
353 ((QUESTION SUPER reference_type_1)
354 (concat $1 " " $2 " " $3)))
358 ((QUESTION EXTENDS reference_type_2)
359 (concat $1 " " $2 " " $3))
360 ((QUESTION SUPER reference_type_2)
361 (concat $1 " " $2 " " $3)))
365 ((QUESTION EXTENDS reference_type_3)
366 (concat $1 " " $2 " " $3))
367 ((QUESTION SUPER reference_type_3)
368 (concat $1 " " $2 " " $3)))
372 ((class_or_interface LT type_argument_list_2)
375 ((reference_type RSHIFT)
377 ((class_or_interface LT type_argument_list_3)
380 ((reference_type URSHIFT)
384 ((type_argument_list COMMA type_argument)
386 (type_argument_list_1
388 ((type_argument_list COMMA type_argument_1)
390 (type_argument_list_2
392 ((type_argument_list COMMA type_argument_2)
394 (type_argument_list_3
396 ((type_argument_list COMMA type_argument_3)
416 ((name DOT IDENTIFIER)
419 ((package_declaration))
420 ((import_declaration))
421 ((type_declaration)))
423 ((modifiers_opt PACKAGE name SEMICOLON)
426 (semantic-tag-new-package $3 nil :typemodifiers $1)))))
428 ((IMPORT name SEMICOLON)
431 (semantic-tag-new-include $2 nil))))
432 ((IMPORT name DOT MULT SEMICOLON)
435 (semantic-tag-new-include
438 ((IMPORT STATIC name SEMICOLON)
441 (semantic-tag-new-include $3 nil :static-flag t))))
442 ((IMPORT STATIC name DOT MULT SEMICOLON)
445 (semantic-tag-new-include
447 nil :static-flag t)))))
449 ((class_declaration))
450 ((interface_declaration))
452 ((annotation_type_declaration)
462 ((modifiers modifier)
479 ((modifiers_opt CLASS IDENTIFIER type_parameters_opt super_opt interfaces_opt class_body)
482 (semantic-tag-new-type $3 $2 $7
486 :typemodifiers $1 :template-specifier $4)))))
488 ((EXTENDS class_type)
494 ((IMPLEMENTS interface_type_list)
503 ((interface_type_list COMMA interface_type)
506 ((LBRACE class_body_declarations_opt RBRACE)
511 (class_body_declarations_opt
513 ((class_body_declarations)
516 (class_body_declarations
517 ((class_body_declaration)
519 ((class_body_declarations class_body_declaration)
521 (class_body_declaration
522 ((class_member_declaration))
523 ((static_initializer))
524 ((constructor_declaration))
527 (wisent-skip-token)))
528 (class_member_declaration
529 ((field_declaration))
530 ((method_declaration))
531 ((class_declaration))
533 ((interface_declaration))
537 ((modifiers_opt ENUM IDENTIFIER interfaces_opt
538 (push $3 wisent-java-wy--enums)
541 (pop wisent-java-wy--enums)
544 (semantic-tag-new-type $3 $2 $6
547 :typemodifiers $1))))))
549 ((LBRACE enum_constants_opt enum_body_declarations_opt RBRACE)
552 (wisent-skip-block nil)))
561 ((enum_constants COMMA enum_constant)
564 ((IDENTIFIER enum_arguments_opt)
567 (semantic-tag-new-type $1
568 (car wisent-java-wy--enums)
569 nil nil :enum-constant-flag t))))
570 ((IDENTIFIER enum_arguments_opt class_body)
573 (semantic-tag-new-type $1
574 (car wisent-java-wy--enums)
575 $3 nil :enum-constant-flag t)))))
578 ((LPAREN argument_list_opt RPAREN))
580 (wisent-skip-block nil)))
581 (enum_body_declarations_opt
583 ((SEMICOLON class_body_declarations_opt)
586 ((modifiers_opt type variable_declarators SEMICOLON)
596 (semantic-tag-new-variable decls $2 nil :typemodifiers $1 :members anons))))))
597 (variable_declarators
598 ((variable_declarator)
600 ((variable_declarators COMMA variable_declarator)
608 ((variable_declarator_id)
612 ((variable_declarator_id
613 (setq wisent-java-wy--anons nil)
614 EQ variable_initializer)
617 wisent-java-wy--anons)))
618 (variable_declarator_id
620 ((variable_declarator_id LBRACK RBRACK)
622 (variable_initializer
624 ((array_initializer)))
626 ((method_header method_body)
630 (wisent-cook-tag tag))))
632 ((modifiers_opt type method_declarator throws_opt)
634 (semantic-tag-new-function ',(car $3)
636 :typemodifiers ',$1 :throws ',$4)))
637 ((modifiers_opt LT type_parameter_list_1 type method_declarator throws_opt)
639 (semantic-tag-new-function ',(car $5)
641 :typemodifiers ',$1 :template-specifier ',(concat $2 $3)
643 ((modifiers_opt VOID method_declarator throws_opt)
645 (semantic-tag-new-function ',(car $3)
647 :typemodifiers ',$1 :throws ',$4)))
648 ((modifiers_opt LT type_parameter_list_1 VOID method_declarator throws_opt)
650 (semantic-tag-new-function ',(car $5)
652 :typemodifiers ',$1 :template-specifier ',(concat $2 $3)
655 ((IDENTIFIER LPAREN formal_parameter_list_opt RPAREN)
657 ((IDENTIFIER LPAREN error)
660 (wisent-skip-block $region2)))
661 ((method_declarator LBRACK RBRACK)
667 (formal_parameter_list_opt
669 ((formal_parameter_list)
672 (formal_parameter_list
675 ((formal_parameter_list COMMA formal_parameter)
678 ((type variable_declarator_id)
681 (semantic-tag-new-variable $2 $1 nil))))
682 ((modifiers type variable_declarator_id)
685 (semantic-tag-new-variable $3 $2 nil :typemodifiers $1))))
686 ((type ELLIPSIS IDENTIFIER)
689 (semantic-tag-new-variable $3 $1 nil :vararg-flag t))))
690 ((modifiers type ELLIPSIS IDENTIFIER)
693 (semantic-tag-new-variable $4 $2 nil :typemodifiers $1 :vararg-flag t)))))
698 ((THROWS class_type_list)
703 ((class_type_list COMMA class_type)
712 (semantic-tag-put-attribute $2 :typemodifiers
715 (constructor_declaration
716 ((modifiers_opt constructor_declarator throws_opt constructor_body)
719 (semantic-tag-new-function
723 :typemodifiers $1 :throws $3 :constructor-flag t))))
724 ((modifiers_opt LT type_parameter_list_1 constructor_declarator throws_opt constructor_body)
727 (semantic-tag-new-function
731 :typemodifiers $1 :template-specifier
733 :throws $5 :constructor-flag t)))))
734 (constructor_declarator
735 ((simple_name LPAREN formal_parameter_list_opt RPAREN)
737 ((simple_name LPAREN error)
740 (wisent-skip-block $region2))))
742 ((LBRACE explicit_constructor_invocation block_statements RBRACE)
744 ((LBRACE explicit_constructor_invocation RBRACE)
746 ((LBRACE block_statements RBRACE)
751 (wisent-skip-block nil)))
752 (explicit_constructor_invocation
753 ((THIS LPAREN argument_list_opt RPAREN SEMICOLON))
754 ((type_arguments THIS LPAREN argument_list_opt RPAREN SEMICOLON))
755 ((SUPER LPAREN argument_list_opt RPAREN SEMICOLON))
756 ((type_arguments SUPER LPAREN argument_list_opt RPAREN SEMICOLON))
757 ((primary DOT SUPER LPAREN argument_list_opt RPAREN SEMICOLON))
758 ((primary DOT type_arguments SUPER LPAREN argument_list_opt RPAREN SEMICOLON))
759 ((name DOT SUPER LPAREN argument_list_opt RPAREN SEMICOLON))
760 ((name DOT type_arguments SUPER LPAREN argument_list_opt RPAREN SEMICOLON)))
761 (interface_declaration
762 ((modifiers_opt INTERFACE IDENTIFIER type_parameters_opt extends_interfaces_opt interface_body)
765 (semantic-tag-new-type $3 $2 $6
768 :template-specifier $4 :typemodifiers $1)))))
769 (extends_interfaces_opt
771 ((extends_interfaces)
774 ((EXTENDS interface_type)
776 ((extends_interfaces COMMA interface_type)
779 ((LBRACE interface_member_declarations_opt RBRACE)
781 (interface_member_declarations_opt
783 ((interface_member_declarations)
786 (interface_member_declarations
787 ((interface_member_declaration)
789 ((interface_member_declarations interface_member_declaration)
791 (interface_member_declaration
792 ((constant_declaration))
793 ((abstract_method_declaration))
794 ((class_declaration))
796 ((interface_declaration))
800 (wisent-skip-token)))
801 (constant_declaration
802 ((field_declaration)))
803 (abstract_method_declaration
804 ((method_header SEMICOLON)
808 (wisent-cook-tag tag))))
810 ((LBRACE variable_initializers COMMA RBRACE))
811 ((LBRACE variable_initializers RBRACE))
812 ((LBRACE COMMA RBRACE))
815 (wisent-skip-block nil)))
816 (variable_initializers
817 ((variable_initializer))
818 ((variable_initializers COMMA variable_initializer)))
820 ((LBRACE block_statements_opt RBRACE)
823 (wisent-skip-block nil)))
824 (block_statements_opt
826 ((block_statements)))
828 ((block_statements_reverse)
831 (semantic-tag "block" 'block :members
834 (block_statements_reverse
837 ((block_statements_reverse block_statement)
840 ((local_variable_declaration_statement))
843 ((class_declaration))
845 ((interface_declaration)))
846 (local_variable_declaration_statement
847 ((local_variable_declaration SEMICOLON)))
848 (local_variable_declaration
849 ((type variable_declarators)
859 (semantic-tag-new-variable decls $1 nil :members anons)))))
860 ((modifiers type variable_declarators)
870 (semantic-tag-new-variable decls $2 nil :typemodifiers $1 :members anons))))))
872 ((statement_without_trailing_substatement))
873 ((labeled_statement))
874 ((if_then_statement))
875 ((if_then_else_statement))
878 ((foreach_statement)))
879 (statement_no_short_if
880 ((statement_without_trailing_substatement))
881 ((labeled_statement_no_short_if))
882 ((if_then_else_statement_no_short_if))
883 ((while_statement_no_short_if))
884 ((for_statement_no_short_if))
885 ((foreach_statement_no_short_if)))
886 (statement_without_trailing_substatement
889 ((expression_statement))
893 ((continue_statement))
895 ((synchronized_statement))
898 ((assert_statement)))
902 ((IDENTIFIER COLON statement)))
903 (labeled_statement_no_short_if
904 ((IDENTIFIER COLON statement_no_short_if)))
905 (expression_statement
906 ((statement_expression SEMICOLON)))
907 (statement_expression
909 ((preincrement_expression))
910 ((predecrement_expression))
911 ((postincrement_expression))
912 ((postdecrement_expression))
913 ((method_invocation))
914 ((class_instance_creation_expression)))
916 ((IF LPAREN expression RPAREN statement)))
917 (if_then_else_statement
918 ((IF LPAREN expression RPAREN statement_no_short_if ELSE statement)))
919 (if_then_else_statement_no_short_if
920 ((IF LPAREN expression RPAREN statement_no_short_if ELSE statement_no_short_if)))
922 ((SWITCH LPAREN expression RPAREN switch_block)))
924 ((LBRACE switch_block_statement_groups switch_labels RBRACE))
925 ((LBRACE switch_block_statement_groups RBRACE))
926 ((LBRACE switch_labels RBRACE))
929 (wisent-skip-block nil)))
930 (switch_block_statement_groups
931 ((switch_block_statement_group))
932 ((switch_block_statement_groups switch_block_statement_group)))
933 (switch_block_statement_group
934 ((switch_labels block_statements)))
937 ((switch_labels switch_label)))
939 ((CASE constant_expression COLON))
942 ((WHILE LPAREN expression RPAREN statement)))
943 (while_statement_no_short_if
944 ((WHILE LPAREN expression RPAREN statement_no_short_if)))
946 ((DO statement WHILE LPAREN expression RPAREN SEMICOLON)))
948 ((FOR LPAREN type variable_declarator_id COLON expression RPAREN statement)
950 ((FOR LPAREN modifiers type variable_declarator_id COLON expression RPAREN statement)
952 ((FOR IDENTIFIER LPAREN type variable_declarator_id IDENTIFIER expression RPAREN statement)
954 ((FOR IDENTIFIER LPAREN modifiers type variable_declarator_id IDENTIFIER expression RPAREN statement)
956 (foreach_statement_no_short_if
957 ((FOR LPAREN type variable_declarator_id COLON expression RPAREN statement_no_short_if)
959 ((FOR LPAREN modifiers type variable_declarator_id COLON expression RPAREN statement_no_short_if)
961 ((FOR IDENTIFIER LPAREN type variable_declarator_id IDENTIFIER expression RPAREN statement_no_short_if)
963 ((FOR IDENTIFIER LPAREN modifiers type variable_declarator_id IDENTIFIER expression RPAREN statement_no_short_if)
966 ((FOR LPAREN for_init_opt SEMICOLON expression_opt SEMICOLON for_update_opt RPAREN statement)
968 (for_statement_no_short_if
969 ((FOR LPAREN for_init_opt SEMICOLON expression_opt SEMICOLON for_update_opt RPAREN statement_no_short_if)
975 ((statement_expression_list)
977 ((local_variable_declaration)))
982 ((statement_expression_list)))
983 (statement_expression_list
984 ((statement_expression))
985 ((statement_expression_list COMMA statement_expression)))
990 ((BREAK identifier_opt SEMICOLON)))
992 ((CONTINUE identifier_opt SEMICOLON)))
994 ((RETURN expression_opt SEMICOLON)))
996 ((THROW expression SEMICOLON)))
997 (synchronized_statement
998 ((SYNCHRONIZED LPAREN expression RPAREN block)))
1000 ((TRY block catches))
1001 ((TRY block catches_opt finally)))
1007 ((catches catch_clause)))
1009 ((CATCH LPAREN formal_parameter RPAREN block)))
1013 ((ASSERT expression SEMICOLON))
1014 ((ASSERT expression COLON expression SEMICOLON)))
1016 ((primary_no_new_array))
1017 ((array_creation_init))
1018 ((array_creation_uninit)))
1019 (primary_no_new_array
1022 ((LPAREN name RPAREN))
1023 ((LPAREN expression_no_name RPAREN))
1024 ((class_instance_creation_expression))
1026 ((method_invocation))
1030 ((primitive_type DOT CLASS))
1031 ((primitive_type dims DOT CLASS))
1033 ((name dims DOT CLASS)))
1034 (class_instance_creation_expression
1035 ((NEW class_or_interface_type LPAREN argument_list_opt RPAREN class_body_opt)
1037 (setq wisent-java-wy--anons
1038 (nconc wisent-java-wy--anons
1041 (semantic-tag-new-type
1043 "class" $6 nil)))))))
1044 ((NEW type_arguments class_or_interface_type LPAREN argument_list_opt RPAREN class_body_opt)
1046 (setq wisent-java-wy--anons
1047 (nconc wisent-java-wy--anons
1050 (semantic-tag-new-type
1052 "class" $7 nil)))))))
1053 ((primary DOT NEW type_arguments_opt IDENTIFIER type_arguments_opt LPAREN argument_list_opt RPAREN class_body_opt)
1055 (setq wisent-java-wy--anons
1056 (nconc wisent-java-wy--anons
1059 (semantic-tag-new-type
1061 "class" $10 nil)))))))
1062 ((name DOT NEW type_arguments_opt IDENTIFIER type_arguments_opt LPAREN argument_list_opt RPAREN class_body_opt)
1064 (setq wisent-java-wy--anons
1065 (nconc wisent-java-wy--anons
1068 (semantic-tag-new-type
1070 "class" $10 nil))))))))
1076 ((argument_list COMMA expression)))
1077 (array_creation_uninit
1078 ((NEW primitive_type dim_exprs dims_opt))
1079 ((NEW class_or_interface_type dim_exprs dims_opt)))
1080 (array_creation_init
1081 ((NEW primitive_type dims array_initializer))
1082 ((NEW class_or_interface_type dims array_initializer)))
1085 ((dim_exprs dim_expr)))
1087 ((LBRACK expression RBRACK))
1089 (wisent-skip-block nil)))
1097 ((dims LBRACK RBRACK)
1100 ((primary DOT IDENTIFIER))
1101 ((SUPER DOT IDENTIFIER))
1102 ((name DOT SUPER DOT IDENTIFIER)))
1104 ((name LPAREN argument_list_opt RPAREN))
1105 ((primary DOT IDENTIFIER LPAREN argument_list_opt RPAREN))
1106 ((primary DOT type_arguments IDENTIFIER LPAREN argument_list_opt RPAREN))
1107 ((name DOT type_arguments IDENTIFIER LPAREN argument_list_opt RPAREN))
1108 ((SUPER DOT IDENTIFIER LPAREN argument_list_opt RPAREN))
1109 ((SUPER DOT type_arguments IDENTIFIER LPAREN argument_list_opt RPAREN))
1110 ((name DOT SUPER DOT IDENTIFIER LPAREN argument_list_opt RPAREN))
1111 ((name DOT SUPER DOT type_arguments IDENTIFIER LPAREN argument_list_opt RPAREN)))
1113 ((name LBRACK expression RBRACK))
1114 ((primary_no_new_array LBRACK expression RBRACK))
1115 ((array_creation_init LBRACK expression RBRACK)))
1119 ((postincrement_expression))
1120 ((postdecrement_expression)))
1121 (postincrement_expression
1122 ((postfix_expression PLUSPLUS)))
1123 (postdecrement_expression
1124 ((postfix_expression MINUSMINUS)))
1126 ((preincrement_expression))
1127 ((predecrement_expression))
1128 ((PLUS unary_expression))
1129 ((MINUS unary_expression))
1130 ((unary_expression_not_plus_minus)))
1131 (preincrement_expression
1132 ((PLUSPLUS unary_expression)))
1133 (predecrement_expression
1134 ((MINUSMINUS unary_expression)))
1135 (unary_expression_not_plus_minus
1136 ((postfix_expression))
1137 ((COMP unary_expression))
1138 ((NOT unary_expression))
1139 ((cast_expression)))
1141 ((LPAREN primitive_type dims_opt RPAREN unary_expression))
1142 ((LPAREN name RPAREN unary_expression_not_plus_minus))
1143 ((LPAREN name dims RPAREN unary_expression_not_plus_minus))
1144 ((LPAREN name LT type_argument_list_1 dims_opt RPAREN unary_expression_not_plus_minus))
1145 ((LPAREN name LT type_argument_list_1 DOT class_or_interface_type dims_opt RPAREN unary_expression_not_plus_minus)))
1146 (multiplicative_expression
1147 ((unary_expression))
1148 ((multiplicative_expression MULT unary_expression))
1149 ((multiplicative_expression DIV unary_expression))
1150 ((multiplicative_expression MOD unary_expression)))
1151 (additive_expression
1152 ((multiplicative_expression))
1153 ((additive_expression PLUS multiplicative_expression))
1154 ((additive_expression MINUS multiplicative_expression)))
1156 ((additive_expression))
1157 ((shift_expression LSHIFT additive_expression))
1158 ((shift_expression RSHIFT additive_expression))
1159 ((shift_expression URSHIFT additive_expression)))
1160 (relational_expression
1161 ((shift_expression))
1162 ((relational_expression LT shift_expression))
1163 ((relational_expression GT shift_expression))
1164 ((relational_expression LTEQ shift_expression))
1165 ((relational_expression GTEQ shift_expression)))
1166 (instanceof_expression
1167 ((relational_expression))
1168 ((instanceof_expression INSTANCEOF reference_type)))
1169 (equality_expression
1170 ((instanceof_expression))
1171 ((equality_expression EQEQ instanceof_expression))
1172 ((equality_expression NOTEQ instanceof_expression)))
1174 ((equality_expression))
1175 ((and_expression AND equality_expression)))
1176 (exclusive_or_expression
1178 ((exclusive_or_expression XOR and_expression)))
1179 (inclusive_or_expression
1180 ((exclusive_or_expression))
1181 ((inclusive_or_expression OR exclusive_or_expression)))
1182 (conditional_and_expression
1183 ((inclusive_or_expression))
1184 ((conditional_and_expression ANDAND inclusive_or_expression)))
1185 (conditional_or_expression
1186 ((conditional_and_expression))
1187 ((conditional_or_expression OROR conditional_and_expression)))
1188 (conditional_expression
1189 ((conditional_or_expression))
1190 ((conditional_or_expression QUESTION expression COLON conditional_expression)))
1191 (assignment_expression
1192 ((conditional_expression))
1195 ((postfix_expression assignment_operator assignment_expression)))
1196 (assignment_operator
1213 ((assignment_expression)))
1214 (constant_expression
1216 (type_parameters_opt
1220 ((LT type_parameter_list_1)
1222 (type_parameter_list
1223 ((type_parameter_list COMMA type_parameter)
1226 (type_parameter_list_1
1227 ((type_parameter_1))
1228 ((type_parameter_list COMMA type_parameter_1)
1231 ((type_variable type_bound_opt)
1236 ((type_variable type_bound_1)
1243 ((EXTENDS reference_type additional_bound_list_opt)
1244 (concat $1 " " $2 " " $3)))
1246 ((EXTENDS reference_type_1)
1248 ((EXTENDS reference_type additional_bound_list_1)
1249 (concat $1 " " $2 " " $3)))
1250 (additional_bound_list_opt
1251 ((additional_bound_list))
1254 (additional_bound_list
1255 ((additional_bound additional_bound_list)
1257 ((additional_bound)))
1258 (additional_bound_list_1
1259 ((additional_bound additional_bound_list_1)
1261 ((additional_bound_1)))
1263 ((AND interface_type)
1264 (concat $1 " " $2)))
1266 ((AND reference_type_1)
1267 (concat $1 " " $2)))
1268 (postfix_expression_no_name
1270 ((postincrement_expression))
1271 ((postdecrement_expression)))
1272 (unary_expression_no_name
1273 ((preincrement_expression))
1274 ((predecrement_expression))
1275 ((PLUS unary_expression))
1276 ((MINUS unary_expression))
1277 ((unary_expression_not_plus_minus_no_name)))
1278 (unary_expression_not_plus_minus_no_name
1279 ((postfix_expression_no_name))
1280 ((COMP unary_expression))
1281 ((NOT unary_expression))
1282 ((cast_expression)))
1283 (multiplicative_expression_no_name
1284 ((unary_expression_no_name))
1285 ((name MULT unary_expression))
1286 ((multiplicative_expression_no_name MULT unary_expression))
1287 ((name DIV unary_expression))
1288 ((multiplicative_expression_no_name DIV unary_expression))
1289 ((name MOD unary_expression))
1290 ((multiplicative_expression_no_name MOD unary_expression)))
1291 (additive_expression_no_name
1292 ((multiplicative_expression_no_name))
1293 ((name PLUS multiplicative_expression))
1294 ((additive_expression_no_name PLUS multiplicative_expression))
1295 ((name MINUS multiplicative_expression))
1296 ((additive_expression_no_name MINUS multiplicative_expression)))
1297 (shift_expression_no_name
1298 ((additive_expression_no_name))
1299 ((name LSHIFT additive_expression))
1300 ((shift_expression_no_name LSHIFT additive_expression))
1301 ((name RSHIFT additive_expression))
1302 ((shift_expression_no_name RSHIFT additive_expression))
1303 ((name URSHIFT additive_expression))
1304 ((shift_expression_no_name URSHIFT additive_expression)))
1305 (relational_expression_no_name
1306 ((shift_expression_no_name))
1307 ((name LT shift_expression))
1308 ((shift_expression_no_name LT shift_expression))
1309 ((name GT shift_expression))
1310 ((shift_expression_no_name GT shift_expression))
1311 ((name LTEQ shift_expression))
1312 ((relational_expression_no_name LTEQ shift_expression))
1313 ((name GTEQ shift_expression))
1314 ((relational_expression_no_name GTEQ shift_expression)))
1315 (instanceof_expression_no_name
1316 ((relational_expression_no_name))
1317 ((name INSTANCEOF reference_type))
1318 ((instanceof_expression_no_name INSTANCEOF reference_type)))
1319 (equality_expression_no_name
1320 ((instanceof_expression_no_name))
1321 ((name EQEQ instanceof_expression))
1322 ((equality_expression_no_name EQEQ instanceof_expression))
1323 ((name NOTEQ instanceof_expression))
1324 ((equality_expression_no_name NOTEQ instanceof_expression)))
1325 (and_expression_no_name
1326 ((equality_expression_no_name))
1327 ((name AND equality_expression))
1328 ((and_expression_no_name AND equality_expression)))
1329 (exclusive_or_expression_no_name
1330 ((and_expression_no_name))
1331 ((name XOR and_expression))
1332 ((exclusive_or_expression_no_name XOR and_expression)))
1333 (inclusive_or_expression_no_name
1334 ((exclusive_or_expression_no_name))
1335 ((name OR exclusive_or_expression))
1336 ((inclusive_or_expression_no_name OR exclusive_or_expression)))
1337 (conditional_and_expression_no_name
1338 ((inclusive_or_expression_no_name))
1339 ((name ANDAND inclusive_or_expression))
1340 ((conditional_and_expression_no_name ANDAND inclusive_or_expression)))
1341 (conditional_or_expression_no_name
1342 ((conditional_and_expression_no_name))
1343 ((name OROR conditional_and_expression))
1344 ((conditional_or_expression_no_name OROR conditional_and_expression)))
1345 (conditional_expression_no_name
1346 ((conditional_or_expression_no_name))
1347 ((name QUESTION expression COLON conditional_expression))
1348 ((conditional_or_expression_no_name QUESTION expression COLON conditional_expression)))
1349 (assignment_expression_no_name
1350 ((conditional_expression_no_name))
1353 ((assignment_expression_no_name)))
1354 (annotation_type_declaration
1355 ((modifiers AT INTERFACE IDENTIFIER annotation_type_body))
1356 ((AT INTERFACE IDENTIFIER annotation_type_body)))
1357 (annotation_type_body
1358 ((LBRACE annotation_type_member_declarations_opt RBRACE))
1360 (wisent-skip-block nil)))
1361 (annotation_type_member_declarations_opt
1363 ((annotation_type_member_declarations)))
1364 (annotation_type_member_declarations
1365 ((annotation_type_member_declaration))
1366 ((annotation_type_member_declarations annotation_type_member_declaration)))
1367 (annotation_type_member_declaration
1368 ((modifiers_opt type IDENTIFIER LPAREN RPAREN default_value_opt SEMICOLON))
1369 ((constant_declaration))
1370 ((class_declaration))
1371 ((interface_declaration))
1372 ((enum_declaration))
1373 ((annotation_type_declaration))
1379 ((DEFAULT member_value)))
1383 ((AT name LPAREN member_value RPAREN)
1385 ((AT name LPAREN member_value_pairs RPAREN)
1387 ((AT name LPAREN RPAREN)
1389 ((AT name LPAREN error)
1392 (wisent-skip-block $region3))))
1394 ((member_value_pair))
1395 ((member_value_pairs COMMA member_value_pair)))
1397 ((simple_name EQ member_value)))
1399 ((conditional_expression))
1401 ((member_value_array_initializer)))
1402 (member_value_array_initializer
1403 ((LBRACE member_values COMMA RBRACE))
1404 ((LBRACE member_values RBRACE))
1405 ((LBRACE COMMA RBRACE))
1408 (wisent-skip-block nil)))
1411 ((member_values COMMA member_value))))
1412 '(goal package_declaration import_declaration class_declaration enum_declaration enum_constant field_declaration method_declaration formal_parameter constructor_declaration interface_declaration abstract_method_declaration block_statements local_variable_declaration block_statement)))
1415 (defun wisent-java-wy--install-parser ()
1416 "Setup the Semantic Parser."
1417 (semantic-install-function-overrides
1418 '((parse-stream . wisent-parse-stream)))
1419 (setq semantic-parser-name "LALR"
1420 semantic--parse-table wisent-java-wy--parse-table
1421 semantic-debug-parser-source "wisent-java.wy"
1422 semantic-flex-keywords-obarray wisent-java-wy--keyword-table
1423 semantic-lex-types-obarray wisent-java-wy--token-table)
1424 ;; Collect unmatched syntax lexical tokens
1425 (semantic-make-local-hook 'wisent-discarding-token-functions)
1426 (add-hook 'wisent-discarding-token-functions
1427 'wisent-collect-unmatched-syntax nil t))
1432 (require 'semantic-lex)
1434 (define-lex-keyword-type-analyzer wisent-java-wy--<keyword>-keyword-analyzer
1435 "keyword analyzer for <keyword> tokens."
1436 "\\(\\sw\\|\\s_\\)+")
1438 (define-lex-block-type-analyzer wisent-java-wy--<block>-block-analyzer
1439 "block analyzer for <block> tokens."
1441 '((("(" LPAREN PAREN_BLOCK)
1442 ("{" LBRACE BRACE_BLOCK)
1443 ("[" LBRACK BRACK_BLOCK))
1449 (define-lex-regex-type-analyzer wisent-java-wy--<symbol>-regexp-analyzer
1450 "regexp analyzer for <symbol> tokens."
1451 "\\(\\sw\\|\\s_\\)+"
1452 '((BOOLEAN_LITERAL . "\\`true\\'")
1453 (BOOLEAN_LITERAL . "\\`false\\'")
1454 (NULL_LITERAL . "\\`null\\'"))
1457 (define-lex-sexp-type-analyzer wisent-java-wy--<string>-sexp-analyzer
1458 "sexp analyzer for <string> tokens."
1462 (define-lex-regex-type-analyzer wisent-java-wy--<number>-regexp-analyzer
1463 "regexp analyzer for <number> tokens."
1464 semantic-lex-number-expression
1468 (define-lex-string-type-analyzer wisent-java-wy--<punctuation>-string-analyzer
1469 "string analyzer for <punctuation> tokens."
1470 "\\(\\s.\\|\\s$\\|\\s'\\)+"
1480 (URSHIFTEQ . ">>>=")
1518 ;; Define the lexer for this grammar
1519 (define-lex wisent-java-lexer
1520 "Lexical analyzer that handles Java buffers.
1521 It ignores whitespaces, newlines and comments."
1522 semantic-lex-ignore-whitespace
1523 semantic-lex-ignore-newline
1524 semantic-lex-ignore-comments
1525 ;;;; Auto-generated analyzers.
1526 wisent-java-wy--<number>-regexp-analyzer
1527 wisent-java-wy--<string>-sexp-analyzer
1528 ;; Must detect keywords before other symbols
1529 wisent-java-wy--<keyword>-keyword-analyzer
1530 wisent-java-wy--<symbol>-regexp-analyzer
1531 wisent-java-wy--<punctuation>-string-analyzer
1532 wisent-java-wy--<block>-block-analyzer
1534 semantic-lex-default-action)
1536 (provide 'wisent-java-wy)
1538 ;;; wisent-java-wy.el ends here