;;; 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 <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
%languagemode java-mode
;;; 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)
;
;;; 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)
;
(cons $1 $region)
;
+opt_variable_declarator_id
+ : ;; EMPTY
+ (identity "")
+ | variable_declarator_id
+ (identity $1)
+ ;
+
variable_declarator_id
: IDENTIFIER dims_opt
(concat $1 $2)
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