mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
%provides, and %code-top) into a single %code directive with an optional qualifier field. Discussed at <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>. * NEWS (2.3a+): Rewrite the existing entry for the prologue alternatives. * doc/bison.texinfo (Prologue Alternatives): Update. (Decl Summary): Update to %code "requires" and %code "provides". (Calc++ Parser): Update to %code "requires". (Bison Symbols): Remove entries for %requires, %provides, and %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry. * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these are replaced by b4_percent_code_provides and b4_percent_code_requires, which are skeleton-specific. (b4_check_percent_code_qualifiers): New. A skeleton can use this to declare what %code qualifiers it supports and to complain if any other qualifiers were used in the grammar. * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires]) and b4_user_code([b4_percent_code_provides]) in place of b4_user_requires and b4_user_provides. * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise. Add b4_user_code([b4_percent_code_top]) and b4_user_code([b4_percent_code]). Invoke b4_check_percent_code_qualifiers. * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES, PERCENT_REQUIRES): Remove. (grammar_declaration): Remove RHS's for %code-top, %provides, and %requires. Rewrite the %code RHS as the unqualified form defining the muscle b4_percent_code. Add another RHS for the qualified %code form, which defines muscles of the form b4_percent_code_QUALIFIER and the b4_used_percent_code_qualifiers muscle. * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES, PERCENT_REQUIRES): Remove. * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use %code "requires" and %code "provides". * tests/input.at (Reject bad %code qualifiers): New.
-*- outline -*- This directory contains Bison skeletons: the general shapes of the different parser kinds, that are specialized for specific grammars by the bison program. Currently, there are only three supported skeletons: - yacc.c It used to be named bison.simple: it corresponds to C Yacc compatible LALR(1) parsers. - lalr1.cc Produces a C++ parser class. It is still very experimental, and not yet supported. Please, subscribe to bison-patches@gnu.org. - glr.c A Generalized LR C parser based on Bison's LALR(1) tables. These skeletons are the only ones supported by the Bison team. Because the interface between skeletons and the bison program is not finished, *we are not bound to it*. In particular, Bison is not mature enough for us to consider that ``foreign skeletons'' are supported. ----- Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Bison. GNU Bison 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. GNU Bison 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 Bison; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.