Commit b98c4724 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

[buddy] Adjust parser construction to support Automake 1.11 and 1.12.

* examples/bddcalc/parser.yxx: Rename as ...
* examples/bddcalc/parser.y: ... this.
* examples/bddcalc/parser_.cxx: New file that includes parser.c.
* examples/bddcalc/Makefile.am: Adjust.
* examples/bddcalc/parser.hxx: Delete this unused file.
parent 25aca9ab
2012-06-19 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Adjust parser construction to support Automake 1.11 and 1.12.
* examples/bddcalc/parser.yxx: Rename as ...
* examples/bddcalc/parser.y: ... this.
* examples/bddcalc/parser_.cxx: New file that includes parser.c.
* examples/bddcalc/Makefile.am: Adjust.
* examples/bddcalc/parser.hxx: Delete this unused file.
2011-11-12 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* src/kernel.h (PAIR, TRIPLE): Redefine these hash functions using
......
......@@ -19,6 +19,8 @@ bddcalc_SOURCES = \
hashtbl.h \
hashtbl.cxx \
lexer.lxx \
parser.yxx \
parser_.cxx \
parser_.h \
slist.h
EXTRA_bddcalc_SOURCES = parser.y
/* A Bison parser, made by GNU Bison 1.875. */
/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
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 program 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 this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
T_id = 258,
T_str = 259,
T_intval = 260,
T_true = 261,
T_false = 262,
T_initial = 263,
T_inputs = 264,
T_actions = 265,
T_size = 266,
T_dumpdot = 267,
T_autoreorder = 268,
T_reorder = 269,
T_win2 = 270,
T_win2ite = 271,
T_sift = 272,
T_siftite = 273,
T_none = 274,
T_cache = 275,
T_tautology = 276,
T_print = 277,
T_lpar = 278,
T_rpar = 279,
T_equal = 280,
T_semi = 281,
T_dot = 282,
T_forall = 283,
T_exist = 284,
T_biimp = 285,
T_imp = 286,
T_nor = 287,
T_or = 288,
T_xor = 289,
T_and = 290,
T_nand = 291,
T_not = 292
};
#endif
#define T_id 258
#define T_str 259
#define T_intval 260
#define T_true 261
#define T_false 262
#define T_initial 263
#define T_inputs 264
#define T_actions 265
#define T_size 266
#define T_dumpdot 267
#define T_autoreorder 268
#define T_reorder 269
#define T_win2 270
#define T_win2ite 271
#define T_sift 272
#define T_siftite 273
#define T_none 274
#define T_cache 275
#define T_tautology 276
#define T_print 277
#define T_lpar 278
#define T_rpar 279
#define T_equal 280
#define T_semi 281
#define T_dot 282
#define T_forall 283
#define T_exist 284
#define T_biimp 285
#define T_imp 286
#define T_nor 287
#define T_or 288
#define T_xor 289
#define T_and 290
#define T_nand 291
#define T_not 292
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
extern YYSTYPE yylval;
// This is a hack to support both Automake <= 1.11.x, and Automake >=
// 1.12.x The problem with is that old versions used to create
// parser.h, and parser.cxx from a parse.yxx grammar, while new
// versions create parser.hxx and parser.cxx.
//
// We want to support both version of Automake, because 1.11.x is fairly
// well distributed, and 1.12 did not make it into Debian 7.0.
//
// Yet it's difficult to support both versions because of the name
// change. Our hack is to rename parse.yxx as parse.y, so that
// automake will generate rule to build parse.h and parse.c, and then
// this parser_.cxx file is used to compile parse.c in C++. This way
// we always have a parse.h file regardless of the Automake version.
//
// We can fix this mess once Automake 1.12 is available everywhere.
#include "parser.c"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment