;;; wisent-java-tags.wy -- Semantic LALR grammar for Java ;; ;; Copyright (C) 2002, 2007 David Ponce ;; Copyright (C) 2007 Eric Ludlam ;; ;; Author: David Ponce ;; Maintainer: David Ponce ;; Created: 25 Feb 2002 ;; Keywords: syntax ;; X-RCS: $Id: wisent-java-tags.wy,v 1.1 2007-11-26 15:12:32 michaels Exp $ ;; ;; This file is not part of GNU Emacs. ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2, or (at ;; your option) any later version. ;; ;; This software is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;%package wisent-java-tags-wy %languagemode java-mode ;; The default start symbol %start compilation_unit ;; Alternate entry points ;; - Needed by partial re-parse %start package_declaration %start import_declaration %start class_declaration %start field_declaration %start method_declaration %start formal_parameter %start constructor_declaration %start interface_declaration ;; - Needed by EXPANDFULL clauses %start class_member_declaration %start interface_member_declaration %start formal_parameters ;; ----------------------------- ;; Block & Parenthesis terminals ;; ----------------------------- %type ;;syntax "\\s(\\|\\s)" matchdatatype block %token PAREN_BLOCK "(LPAREN RPAREN)" %token BRACE_BLOCK "(LBRACE RBRACE)" %token BRACK_BLOCK "(LBRACK RBRACK)" %token LPAREN "(" %token RPAREN ")" %token LBRACE "{" %token RBRACE "}" %token LBRACK "[" %token RBRACK "]" ;; ------------------ ;; Operator terminals ;; ------------------ %type ;;syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string %token NOT "!" %token NOTEQ "!=" %token MOD "%" %token MODEQ "%=" %token AND "&" %token ANDAND "&&" %token ANDEQ "&=" %token MULT "*" %token MULTEQ "*=" %token PLUS "+" %token PLUSPLUS "++" %token PLUSEQ "+=" %token COMMA "," %token MINUS "-" %token MINUSMINUS "--" %token MINUSEQ "-=" %token DOT "." %token DIV "/" %token DIVEQ "/=" %token COLON ":" %token SEMICOLON ";" %token LT "<" %token LSHIFT "<<" %token LSHIFTEQ "<<=" %token LTEQ "<=" %token EQ "=" %token EQEQ "==" %token GT ">" %token GTEQ ">=" %token RSHIFT ">>" %token RSHIFTEQ ">>=" %token URSHIFT ">>>" %token URSHIFTEQ ">>>=" %token QUESTION "?" %token XOR "^" %token XOREQ "^=" %token OR "|" %token OREQ "|=" %token OROR "||" %token COMP "~" ;; ----------------- ;; Literal terminals ;; ----------------- %type ;;syntax "\\(\\sw\\|\\s_\\)+" %token IDENTIFIER %type ;;syntax "\\s\"" matchdatatype sexp %token STRING_LITERAL %type ;;syntax semantic-lex-number-expression %token NUMBER_LITERAL %type syntax "\\\\u[0-9a-f][0-9a-f][0-9a-f][0-9a-f]" %token unicodecharacter ;; ----------------- ;; Keyword terminals ;; ----------------- ;; Generate a keyword analyzer %type ;;syntax "\\(\\sw\\|\\s_\\)+" matchdatatype keyword %keyword ABSTRACT "abstract" %put ABSTRACT summary "Class|Method declaration modifier: abstract {class|} ..." %keyword BOOLEAN "boolean" %put BOOLEAN summary "Primitive logical quantity type (true or false)" %keyword BREAK "break" %put BREAK summary "break [