* src/skeleton.h: New.

* src/output.c (output_parser, output_master_parser): Remove, dead
code.
* src/output.h (get_lines_number, actions_output, guards_output)
(token_definitions_output): Prototype them.
* src/parse-skel.y: Add the license notice.
Include output.h and skeleton.h.
(process_skeleton): Returns void, and takes a single parameter.
* src/scan-skel.l: Add the license notice.
Include skeleton.h.
Don't use %option yylineno: it seems that then Flex imagines
REJECT has been used, and therefore it won't reallocate its
buffers (which makes no other sense to me than a bug).  It results
in warnings for `unused: yy_flex_realloc'.
to guess if the generated parsers should have '.tab' in their
* src/Makefile.am (bison_SOURCES): Add scan-skel.l and
This commit is contained in:
Akim Demaille
2001-12-30 21:05:12 +00:00
parent 9b3add5beb
commit 1239777d4f
15 changed files with 168 additions and 167 deletions

View File

@@ -1,15 +1,41 @@
/* -*- C -*- */
/* Scan Bison Skeletons.
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
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.
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., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
%{
#include <stdlib.h>
#include <string.h>
#include "system.h"
#include "skeleton.h"
#include "parse-skel.h"
%}
%option nounput
%option noyywrap
%option yylineno
/* If we enable
%option yylineno
Then we have warning: `yy_flex_realloc' defined but not used.
Seems like a Flex bug to me: Why the heck yylineno would trigger
the REJECT exception??? */
%%