;;; semantic-grammar.wy -- LALR grammar of Semantic input grammars
;;
-;; 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>
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+%package semantic-grammar-wy
+%provide semantic/grammar-wy
+
%{
(defvar semantic-grammar-lex-c-char-re)
(defvar semantic-grammar-wy--rindx nil)
}
-%package semantic-grammar-wy
-
%languagemode wy-mode
;; Main
%keyword LEFT "%left"
%keyword NONASSOC "%nonassoc"
%keyword PACKAGE "%package"
+%keyword PROVIDE "%provide"
%keyword PREC "%prec"
%keyword PUT "%put"
%keyword QUOTEMODE "%quotemode"
| no_default_prec_decl
| languagemode_decl
| package_decl
+ | provide_decl
| precedence_decl
| put_decl
| quotemode_decl
`(PACKAGE-TAG ',$2 nil)
;
+provide_decl:
+ PROVIDE SYMBOL
+ `(TAG ',$2 'provide)
+ ;
+
precedence_decl:
associativity token_type_opt items
`(TAG ',$1 'assoc :type ',$2 :value ',$3)