X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/1a834b22e8c5a729b95ab255fd7d7006e973a961..2cc82b9fbc6e67878e89d7006cc69ffb5227daa1:/admin/grammars/java-tags.wy diff --git a/admin/grammars/java-tags.wy b/admin/grammars/java-tags.wy index 99d2b9df81..3f5c3ad04c 100644 --- a/admin/grammars/java-tags.wy +++ b/admin/grammars/java-tags.wy @@ -1,6 +1,6 @@ ;;; java-tags.wy -- Semantic LALR grammar for Java -;; Copyright (C) 2002-2011 Free Software Foundation, Inc. +;; Copyright (C) 2002-2013 Free Software Foundation, Inc. ;; ;; Author: David Ponce ;; Maintainer: David Ponce @@ -23,6 +23,12 @@ ;; along with GNU Emacs. If not, see . %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 @@ -153,7 +159,7 @@ %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 @@ -311,7 +317,7 @@ %keyword WHILE "while" %put WHILE summary "while () | do while ();" - + ;; -------------------------- ;; Official javadoc line tags ;; -------------------------- @@ -339,27 +345,27 @@ %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---regexp-analyzer wisent-java-tags-wy---string-analyzer wisent-java-tags-wy---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---regexp-analyzer