]> code.delx.au - gnu-emacs/blobdiff - admin/grammars/java-tags.wy
Update copyright year to 2016
[gnu-emacs] / admin / grammars / java-tags.wy
index 99d2b9df81d4b0d2527a055f71945d53a023a69f..7284f0242b2419162caf4bcc1288447856c55b73 100644 (file)
@@ -1,6 +1,6 @@
 ;;; java-tags.wy -- Semantic LALR grammar for Java
 
-;; Copyright (C) 2002-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2016 Free Software Foundation, Inc.
 ;;
 ;; Author: David Ponce <david@dponce.com>
 ;; Maintainer: David Ponce <david@dponce.com>
 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 %package wisent-java-tags-wy
+%provide semantic/wisent/javat-wy
+
+%{
+(declare-function semantic-parse-region "semantic"
+                 (start end &optional nonterminal depth returnonerror))
+}
 
 %languagemode  java-mode
 
 
 %keyword CHAR         "char"
 %put     CHAR summary
-"Integral primitive type ('\u0000' to '\uffff') (0 to 65535)"
+"Integral primitive type (0 to 65535)"
 
 %keyword CLASS        "class"
 %put     CLASS summary
 %keyword WHILE        "while"
 %put     WHILE summary
 "while (<expr>) <stmt> | do <stmt> while (<expr>);"
-  
+
 ;; --------------------------
 ;; Official javadoc line tags
 ;; --------------------------
 %keyword _AUTHOR      "@author"
 %put     _AUTHOR      javadoc (seq 1 usage (type))
 %keyword _VERSION     "@version"
-%put     _VERSION     javadoc (seq 2 usage (type)) 
+%put     _VERSION     javadoc (seq 2 usage (type))
 %keyword _PARAM       "@param"
-%put     _PARAM       javadoc (seq 3 usage (function) with-name t) 
+%put     _PARAM       javadoc (seq 3 usage (function) with-name t)
 %keyword _RETURN      "@return"
-%put     _RETURN      javadoc (seq 4 usage (function)) 
+%put     _RETURN      javadoc (seq 4 usage (function))
 %keyword _EXCEPTION   "@exception"
-%put     _EXCEPTION   javadoc (seq 5 usage (function) with-name t) 
+%put     _EXCEPTION   javadoc (seq 5 usage (function) with-name t)
 %keyword _THROWS      "@throws"
-%put     _THROWS      javadoc (seq 6 usage (function) with-name t) 
+%put     _THROWS      javadoc (seq 6 usage (function) with-name t)
 %keyword _SEE         "@see"
-%put     _SEE         javadoc (seq 7 usage (type function variable) opt t with-ref t) 
+%put     _SEE         javadoc (seq 7 usage (type function variable) opt t with-ref t)
 %keyword _SINCE       "@since"
-%put     _SINCE       javadoc (seq 8 usage (type function variable) opt t) 
+%put     _SINCE       javadoc (seq 8 usage (type function variable) opt t)
 %keyword _SERIAL      "@serial"
-%put     _SERIAL      javadoc (seq 9 usage (variable) opt t) 
+%put     _SERIAL      javadoc (seq 9 usage (variable) opt t)
 %keyword _SERIALDATA  "@serialData"
-%put     _SERIALDATA  javadoc (seq 10 usage (function) opt t) 
+%put     _SERIALDATA  javadoc (seq 10 usage (function) opt t)
 %keyword _SERIALFIELD "@serialField"
-%put     _SERIALFIELD javadoc (seq 11 usage (variable) opt t) 
+%put     _SERIALFIELD javadoc (seq 11 usage (variable) opt t)
 %keyword _DEPRECATED  "@deprecated"
-%put     _DEPRECATED  javadoc (seq 12 usage (type function variable) opt t) 
+%put     _DEPRECATED  javadoc (seq 12 usage (type function variable) opt t)
 
 %%
 
@@ -386,7 +392,7 @@ package_declaration
   ;
 
 ;;; Include file token
-;; ("FILE" include SYSTEM "DOCSTRING") 
+;; ("FILE" include SYSTEM "DOCSTRING")
 import_declaration
   : IMPORT qualified_name SEMICOLON
     (INCLUDE-TAG $2 nil)
@@ -444,7 +450,7 @@ class_member_declaration
 ;;; Type Declaration token
 ;; ("NAME" type "TYPE" ( PART-LIST ) ( PARENTS ) EXTRA-SPEC "DOCSTRING")
 interface_declaration
-  : modifiers_opt INTERFACE IDENTIFIER extends_interfaces_opt interface_body
+  : modifiers_opt INTERFACE qualified_name extends_interfaces_opt interface_body
     (TYPE-TAG $3 $2 $5 (if $4 (cons nil $4)) :typemodifiers $1)
   ;
 
@@ -475,7 +481,7 @@ static_initializer
   ;
 
 ;;; Function token
-;; ("NAME" function "TYPE" ( ARG-LIST ) EXTRA-SPEC "DOCSTRING") 
+;; ("NAME" function "TYPE" ( ARG-LIST ) EXTRA-SPEC "DOCSTRING")
 constructor_declaration
   : modifiers_opt constructor_declarator throwsc_opt constructor_body
     (FUNCTION-TAG (car $2) nil (cdr $2)
@@ -490,11 +496,11 @@ constructor_declarator
   ;
 
 constructor_body
-  : block 
+  : block
   ;
 
 ;;; Function token
-;; ("NAME" function "TYPE" ( ARG-LIST ) EXTRA-SPEC "DOCSTRING") 
+;; ("NAME" function "TYPE" ( ARG-LIST ) EXTRA-SPEC "DOCSTRING")
 method_declaration
   : modifiers_opt VOID method_declarator throwsc_opt method_body
     (FUNCTION-TAG (car $3) $2 (cdr $3) :typemodifiers $1 :throws $4)
@@ -547,7 +553,7 @@ formal_parameters
 ;;; Variable token
 ;; ("NAME" variable "TYPE" DEFAULT-VALUE EXTRA-SPEC "DOCSTRING")
 formal_parameter
-  : formal_parameter_modifier_opt type variable_declarator_id
+  : formal_parameter_modifier_opt type opt_variable_declarator_id
     (VARIABLE-TAG $3 $2 nil :typemodifiers $1)
   ;
 
@@ -582,6 +588,13 @@ variable_declarator
     (cons $1 $region)
   ;
 
+opt_variable_declarator_id
+  : ;; EMPTY
+    (identity "")
+  | variable_declarator_id
+    (identity $1)
+  ;
+
 variable_declarator_id
   : IDENTIFIER dims_opt
     (concat $1 $2)
@@ -740,7 +753,7 @@ It ignores whitespaces, newlines and comments."
   wisent-java-tags-wy--<symbol>-regexp-analyzer
   wisent-java-tags-wy--<punctuation>-string-analyzer
   wisent-java-tags-wy--<block>-block-analyzer
-  ;; In theory, unicode chars should be turned into normal chars
+  ;; In theory, Unicode chars should be turned into normal chars
   ;; and then combined into regular ascii keywords and text.  This
   ;; analyzer just keeps these things from making the lexer go boom.
   wisent-java-tags-wy--<unicode>-regexp-analyzer