Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use classic names for bison generated files (in oc2/ only) #2925

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
11 changes: 4 additions & 7 deletions oc2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/include

# OC Sources; include the dapy.[ch] to avoid the need for bison by user
SRC=oc.c \
daplex.c dapparse.c dapy.c \
daplex.c dapparse.c dap.tab.c \
occompile.c occurlfunctions.c \
ocdata.c ocdebug.c ocdump.c \
ocinternal.c ocnode.c \
Expand All @@ -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
Loading