Skip to content

Commit

Permalink
Use classic names for bison generated files (in oc2/ only)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgthegreat committed May 15, 2024
1 parent f8164e3 commit b64569e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion oc2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# University Corporation for Atmospheric Research/Unidata.

# See netcdf-c/COPYRIGHT file for more info.
set(oc_SOURCES oc.c daplex.c dapparse.c dapy.c occompile.c occurlfunctions.c ocdata.c ocdebug.c ocdump.c ocinternal.c ocnode.c ochttp.c ocread.c ocutil.c xxdr.c)
set(oc_SOURCES oc.c daplex.c dapparse.c dap.tab.c occompile.c occurlfunctions.c ocdata.c ocdebug.c ocdump.c ocinternal.c ocnode.c ochttp.c ocread.c ocutil.c xxdr.c)

add_library(oc2 OBJECT ${oc_SOURCES})

Expand Down
9 changes: 3 additions & 6 deletions oc2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ocread.c ocutil.c \
xxdr.c

HDRS=oc.h ocx.h \
dapparselex.h dapy.h \
dapparselex.h dap.tab.h \
occompile.h occonstraints.h occurlfunctions.h \
ocdata.h ocdatatypes.h ocdebug.h ocdump.h \
ocinternal.h ocnode.h \
Expand All @@ -40,8 +40,5 @@ liboc_la_CPPFLAGS = $(AM_CPPFLAGS)
# autoconf will forcibly delete files of the name *.tab.*

makeparser::
rm -f dap.tab.c dap.tab.h dapy.c dapy.h
bison --debug -d -p dap dap.y
sed -e 's/dap[.]tab[.]c/dapy.c/g' -e 's/dap[.]tab[.]h/dapy.h/g' <dap.tab.c >dapy.c
mv dap.tab.h dapy.h
rm -f dap.tab.c
rm -f dap.tab.c dap.tab.h
bison --debug --defines -p dap dap.y
4 changes: 2 additions & 2 deletions oc2/dapy.c → oc2/dap.tab.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

#include "config.h"
#include "dapparselex.h"
#include "dapy.h"
#include "dap.tab.h"
int dapdebug = 0;

#line 79 "dapy.c" /* yacc.c:339 */
Expand All @@ -94,7 +94,7 @@ int dapdebug = 0;
#endif

/* In a future release of Bison, this section will be replaced
by #include "dapy.h". */
by #include "dap.tab.h". */
#ifndef YY_DAP_DAP_TAB_H_INCLUDED
# define YY_DAP_DAP_TAB_H_INCLUDED
/* Debug traces. */
Expand Down
8 changes: 6 additions & 2 deletions oc2/dapy.h → oc2/dap.tab.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
/* A Bison parser, made by GNU Bison 3.5.1. */

/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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
Expand Down Expand Up @@ -30,6 +31,9 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */

/* Undocumented macros, especially those whose name start with YY_,
are private implementation details. Do not rely on them. */

#ifndef YY_DAP_DAP_TAB_H_INCLUDED
# define YY_DAP_DAP_TAB_H_INCLUDED
/* Debug traces. */
Expand Down
2 changes: 1 addition & 1 deletion oc2/dap.y
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%{
#include "config.h"
#include "dapparselex.h"
#include "dapy.h"
#include "dap.tab.h"
int dapdebug = 0;
%}

Expand Down
2 changes: 1 addition & 1 deletion oc2/daplex.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "oc.h"
#include "dapparselex.h"
#include "dapy.h"
#include "dap.tab.h"

#undef URLCVT /* NEVER turn this on */

Expand Down
2 changes: 1 addition & 1 deletion oc2/dapparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "config.h"
#include "dapparselex.h"
#include "dapy.h"
#include "dap.tab.h"
#include <stddef.h>

/* Forward */
Expand Down

0 comments on commit b64569e

Please sign in to comment.