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 6af65f2
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 99 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
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
87 changes: 0 additions & 87 deletions oc2/dapy.h

This file was deleted.

0 comments on commit 6af65f2

Please sign in to comment.