- automake 1.10 (ylwrap) naming system modification

This commit is contained in:
Antoine Fraboulet 2007-08-04 19:57:45 +00:00
parent 5199b6b7c1
commit 33e5b23004
3 changed files with 43 additions and 28 deletions

View file

@ -21,10 +21,11 @@ noinst_LIBRARIES = libdic.a
INCLUDES = -I$(top_srcdir)
libdic_a_CFLAGS=$(DEBUGFLAGS)
libdic_a_YFLAGS=-d
libdic_a_YFLAGS=
libdic_a_LFLAGS=
libdic_a_SOURCES= \
er.y \
er.l \
ery.y \
erl.l \
dic_internals.h \
dic_search.c dic_search.h \
dic.c dic.h \
@ -33,21 +34,30 @@ libdic_a_SOURCES = \
regexp.c regexp.h \
alist.h alist.c
BUILT_SOURCES= \
libdic_a-erl.c \
libdic_a-erl.h \
libdic_a-ery.c \
libdic_a-ery.h
nodist_libdic_a_SOURCES= \
er.c \
scanner.h \
libdic_a-er.c \
libdic_a-er.h
libdic_a-erl.c \
libdic_a-erl.h \
libdic_a-ery.c \
libdic_a-ery.h
BUILT_SOURCES=er.c \
scanner.h \
libdic_a-er.c \
libdic_a-er.h
CLEANFILES= \
libdic_a-erl.c \
libdic_a-erl.h \
libdic_a-ery.c \
libdic_a-ery.h
CLEANFILES=er.c \
scanner.h \
libdic_a-er.c \
libdic_a-er.h
## automake workaround to generate .h file
libdic_a-erl.h: erl.l
${LEX} ${srcdir}/erl.l
#####################################
#####################################
if BUILD_DICTOOLS
@ -67,8 +77,8 @@ listdic_SOURCES= \
dic.c dic.h \
listdic.c
regexp_SOURCES= regexpmain.c
#regexp_CFLAGS=-DDEBUG_RE
regexp_SOURCES=regexpmain.c
regexp_LDADD=libdic.a
endif

View file

@ -20,14 +20,14 @@
#include "dic.h"
#include "regexp.h"
#include "libdic_a-er.h"
#include "libdic_a-ery.h"
#define MASK_TO_REMOVE 0x1F
%}
%option prefix="regexp"
%option outfile="lex.yy.c"
%option header-file="scanner.h"
%option header-file="libdic_a-erl.h"
%option reentrant bison-bridge
%option bison-locations
%option noyywrap nounput

View file

@ -25,9 +25,12 @@
#include "dic.h"
#include "regexp.h"
#include "libdic_a-er.h"
#include "scanner.h"
#include "libdic_a-ery.h"
#include "libdic_a-erl.h"
/* ************************************************** */
/* ************************************************** */
/* ************************************************** */
/**
* function prototype for parser generated by bison
@ -35,6 +38,7 @@
int regexpparse(yyscan_t scanner, NODE** root,
struct search_RegE_list_t *list,
struct regexp_error_report_t *err);
/**
* function prototype for error reporting
*/
@ -43,6 +47,9 @@ void regexperror(YYLTYPE *llocp, yyscan_t scanner, NODE** root,
struct regexp_error_report_t *err,
char const *msg);
/* ************************************************** */
/* ************************************************** */
/* ************************************************** */
%}
%union {
@ -270,8 +277,10 @@ vardis: LEX_CHAR
%%
void regexperror(YYLTYPE *llocp, yyscan_t yyscanner, NODE** root,
struct search_RegE_list_t *list,
#define UNUSED __attribute__((unused))
void regexperror(YYLTYPE *llocp, yyscan_t UNUSED yyscanner, NODE UNUSED **root,
struct search_RegE_list_t UNUSED *list,
struct regexp_error_report_t *err, char const *msg)
{
err->pos1 = llocp->first_column;
@ -282,8 +291,4 @@ void regexperror(YYLTYPE *llocp, yyscan_t yyscanner, NODE** root,
/*
* shut down the compiler
*/
static int yy_init_globals (yyscan_t yyscanner )
{
yy_init_globals(yyscanner);
return 0;
}
//int yy_init_globals (yyscan_t yyscanner);