1/28/00 : loic

Apply automake everywhere
  Keep configure scripts so that people are not *forced* to autoconf
          Keep sources generated by yacc so that compilation without yacc
  is possible.
  Source/LParse/cscanner.c: change lyacc.h into parser.h to please
  default yacc generation rules.
  Use AC_CONFIG_SUBDIRS in configure.in instead of hand made script.
  Update all relevant .cvsignore to include .deps
  Fixed missing ; line 136 Source/Swig/swig.h


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@164 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Loic Dachary 2000-01-29 01:06:10 +00:00
commit 5be3d9e104
50 changed files with 19913 additions and 514 deletions

View file

@ -1 +1,2 @@
Makefile y.tab.* lyacc.h parser.c
Makefile
.deps

View file

@ -0,0 +1,12 @@
include $(top_srcdir)/Makefile.common
INCLUDES = $(SWIG_INCLUDES) \
-I$(top_srcdir)/Source/Swig \
-I$(top_srcdir)/Source/Include \
-I$(top_srcdir)/Source/Preprocessor
noinst_LIBRARIES = liblparse.a
liblparse_a_SOURCES = parser.y cscanner.c type.c
noinst_HEADERS = lparse.h lyacc.h

View file

@ -1,41 +1,341 @@
#####################################################################
# LParse
#####################################################################
# Makefile.in generated automatically by automake 1.4a from Makefile.am
CC = @CC@
AR = @AR@
RANLIB = @RANLIB@
prefix = @prefix@
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
RPATH = @RPATH@
SO = @SO@
CCSHARED = @CCSHARED@
LDSHARED = @LDSHARED@
YACC = @YACC@
INCLUDE = -I. -I../Swig -I../DOH/Include -I../Preprocessor
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
SRCS = cscanner.c type.c
OBJS = parser.o cscanner.o type.o
DESTDIR =
.c.o:
$(CC) $(CCSHARED) $(INCLUDE) $(CFLAGS) -c -o $*.o $<
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
#####################################################################
# TARGET: experiment
#####################################################################
# friendly to the toplevel makefile
experiment: $(OBJS)
for i in $(OBJS); do echo Source/LParse/$$i >> $(OBJS_FILE); done
top_builddir = ../..
parser.o: parser.c
$(CC) $(CCSHARED) $(INCLUDE) $(CFLAGS) -c -o $*.o $<
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
parser.c: parser.y
$(YACC) -d parser.y
@cp y.tab.h lyacc.h
@cp y.tab.c parser.c
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
transform = @program_transform_name@
clean:
rm -f *.o *~ core *.so *.a y.tab*
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
AR = @AR@
AUTOCONF = @AUTOCONF@
CC = @CC@
CCSHARED = @CCSHARED@
CXX = @CXX@
LDSHARED = @LDSHARED@
LIBC = @LIBC@
LIBCRYPT = @LIBCRYPT@
LIBM = @LIBM@
MACHDEP = @MACHDEP@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
PERL = @PERL@
PERL5EXT = @PERL5EXT@
PYINCLUDE = @PYINCLUDE@
PYLIB = @PYLIB@
PYLINK = @PYLINK@
RANLIB = @RANLIB@
ROOT_DIR = @ROOT_DIR@
RPATH = @RPATH@
SO = @SO@
TCLINCLUDE = @TCLINCLUDE@
TCLLIB = @TCLLIB@
VERSION = @VERSION@
XINCLUDES = @XINCLUDES@
XLIBSW = @XLIBSW@
YACC = @YACC@
YFLAGS = @YFLAGS@
AUTOMAKE_OPTIONS = foreign
SWIG_INCLUDES = -I$(top_srcdir)/Source/DOH/Include -I$(top_srcdir)/Source/SWILL/Include
SWIG_LIBS = $(top_builddir)/Source/DOH/Doh/libdoh.a $(top_builddir)/Source/SWILL/SWILL/libswill.a
INCLUDES = $(SWIG_INCLUDES) -I$(top_srcdir)/Source/Swig -I$(top_srcdir)/Source/Include -I$(top_srcdir)/Source/Preprocessor
noinst_LIBRARIES = liblparse.a
liblparse_a_SOURCES = parser.y cscanner.c type.c
noinst_HEADERS = lparse.h lyacc.h
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
liblparse_a_LIBADD =
liblparse_a_OBJECTS = parser.o cscanner.o type.o
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
HEADERS = $(noinst_HEADERS)
DIST_COMMON = Makefile.am Makefile.in parser.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
DEP_FILES = .deps/cscanner.P .deps/parser.P .deps/type.P
SOURCES = $(liblparse_a_SOURCES)
OBJECTS = $(liblparse_a_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s .y
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/Makefile.common
cd $(top_srcdir) && $(AUTOMAKE) --foreign Source/LParse/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstLIBRARIES:
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
distclean-noinstLIBRARIES:
maintainer-clean-noinstLIBRARIES:
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
liblparse.a: $(liblparse_a_OBJECTS) $(liblparse_a_DEPENDENCIES)
-rm -f liblparse.a
$(AR) cru liblparse.a $(liblparse_a_OBJECTS) $(liblparse_a_LIBADD)
$(RANLIB) liblparse.a
.y.c:
$(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
parser.h: parser.c
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = Source/LParse
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Source/LParse/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile $(LIBRARIES) $(HEADERS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-test -z "parserhparserc" || rm -f parserh parserc
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-depend \
clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-noinstLIBRARIES distclean-compile \
distclean-tags distclean-depend distclean-generic \
clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
distclean-depend clean-depend maintainer-clean-depend info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -15,7 +15,7 @@ static char cvsroot[] = "$Header$";
#define yylval lparse_yylval
#include "lyacc.h"
#include "parser.h"
#include <stdarg.h>
static int map[][2] = {

4269
SWIG/Source/LParse/parser.c Normal file

File diff suppressed because it is too large Load diff

146
SWIG/Source/LParse/parser.h Normal file
View file

@ -0,0 +1,146 @@
typedef union {
struct {
DOH *filename;
int line;
DOH *text;
int ivalue;
void *data;
} tok;
DOH *node;
LParseType *type;
struct {
DOH *id;
int is_pointer;
int is_reference;
} decl;
struct {
DOH *name;
DOH *value;
DOH *array;
} pname;
struct {
DOH *name;
DOH *array;
DOH *parms;
} tmname;
} YYSTYPE;
#define ID 257
#define TYPE_TYPEDEF 258
#define HBLOCK 259
#define STRING 260
#define NUM_INT 261
#define NUM_FLOAT 262
#define CHARCONST 263
#define NUM_UNSIGNED 264
#define NUM_LONG 265
#define NUM_ULONG 266
#define LPAREN 267
#define RPAREN 268
#define LBRACE 269
#define RBRACE 270
#define COMMA 271
#define SEMI 272
#define PERIOD 273
#define LBRACKET 274
#define RBRACKET 275
#define EQUAL 276
#define COLON 277
#define POUND 278
#define CONST 279
#define DEFINED 280
#define ENUM 281
#define EXTERN 282
#define SIZEOF 283
#define STATIC 284
#define STRUCT 285
#define TYPEDEF 286
#define UNION 287
#define CLASS 288
#define FRIEND 289
#define OPERATOR 290
#define PRIVATE 291
#define PROTECTED 292
#define PUBLIC 293
#define TEMPLATE 294
#define THROW 295
#define VIRTUAL 296
#define OC_INTERFACE 297
#define OC_END 298
#define OC_PUBLIC 299
#define OC_PRIVATE 300
#define OC_PROTECTED 301
#define OC_CLASS 302
#define OC_IMPLEMENT 303
#define OC_PROTOCOL 304
#define TYPE_INT 305
#define TYPE_UNSIGNED 306
#define TYPE_SHORT 307
#define TYPE_LONG 308
#define TYPE_FLOAT 309
#define TYPE_DOUBLE 310
#define TYPE_CHAR 311
#define TYPE_VOID 312
#define TYPE_SIGNED 313
#define TYPE_BOOL 314
#define ADDMETHODS 315
#define ALPHA_MODE 316
#define APPLY 317
#define CHECKOUT 318
#define CLEAR 319
#define CONSTANT 320
#define DOCONLY 321
#define DOC_DISABLE 322
#define DOC_ENABLE 323
#define ECHO 324
#define EXCEPT 325
#define ILLEGAL 326
#define IMPORT 327
#define INCLUDE 328
#define INIT 329
#define INLINE 330
#define LOCALSTYLE 331
#define MACRO 332
#define MODULE 333
#define NAME 334
#define NATIVE 335
#define NEW 336
#define PRAGMA 337
#define RAW_MODE 338
#define READONLY 339
#define READWRITE 340
#define RENAME 341
#define SECTION 342
#define STYLE 343
#define SUBSECTION 344
#define SUBSUBSECTION 345
#define TEXT 346
#define TITLE 347
#define TYPE 348
#define TYPEMAP 349
#define USERDIRECTIVE 350
#define WEXTERN 351
#define WRAPPER 352
#define LOR 353
#define LAND 354
#define EQUALTO 355
#define NOTEQUAL 356
#define GREATERTHAN 357
#define LESSTHAN 358
#define LTEQUAL 359
#define GTEQUAL 360
#define OR 361
#define XOR 362
#define AND 363
#define LSHIFT 364
#define RSHIFT 365
#define PLUS 366
#define MINUS 367
#define STAR 368
#define SLASH 369
#define UMINUS 370
#define NOT 371
#define LNOT 372
#define DCOLON 373
extern YYSTYPE yylval;