Touchez c'est du cuir ! La librairie PPT a l'air de maintenant fonctionner.

This commit is contained in:
Ludovic Jacomme 2002-04-11 15:55:39 +00:00
parent 37153e29a9
commit feac8a1c76
4 changed files with 13 additions and 14 deletions

View File

@ -2,7 +2,7 @@ AM_CFLAGS = @ALLIANCE_CFLAGS@
lib_LIBRARIES = libPpt.a
include_HEADERS = ppt.h
libPpt_a_SOURCES = pat_decl_l.l pat_decl_y.y pat_desc_l.l pat_desc_y.y\
libPpt_a_SOURCES = pat_decl_l.l pat_decl_y.y pat_desc_y.y\
pat_decl.h pat_defs.h \
pat_desc.h pat_drvpat.c \
pat_lodpaseq.c pat_pattostr.c pat_prspat.c pat_savpaseq.c \
@ -18,7 +18,14 @@ pat_decl_l.c : $(srcdir)/pat_decl_l.l pat_decl_y.h
$(LEX) -t $(srcdir)/pat_decl_l.l | sed -e "s/yy/pat_decl_y_/g" -e "s/YY/PAT_DECL_Y_/g" > pat_decl_l.c
pat_desc_y.c pat_desc_y.h : $(srcdir)/pat_desc_y.y
$(YACC) -d $(YFLAGS) $(srcdir)/pat_desc_y.y && sed -e "s/yy/pat_desc_y_/g" -e "s/YY/PAT_DESC_Y_/g" y.tab.c > pat_desc_y.c && sed -e "s/yy/pat_desc_y_/g" -e "s/YY/PAT_DESC_Y_/g" y.tab.h > pat_desc_y.h
$(YACC) -d $(YFLAGS) $(srcdir)/pat_desc_y.y \
&& sed -e "s/yyparse/pat_desc_y_parse/g" y.tab.c | \
sed -e "s/yy/pat_decl_y_/g" -e "s/YY/PAT_DECL_Y_/g" > pat_desc_y.c\
&& sed -e "s/yyparse/pat_desc_y_parse/g" y.tab.h | \
sed -e "s/yy/pat_decl_y_/g" -e "s/YY/PAT_DECL_Y_/g" > pat_desc_y.h
#sed -e "s/yy/pat_desc_y_/g" -e "s/YY/PAT_DESC_Y_/g" > pat_desc_y.c && sed -e "s/yy/pat_desc_y_/g" -e "s/YY/PAT_DESC_Y_/g" y.tab.h > pat_desc_y.h
# sed -e "s/yyin/pat_decl_y_/g" -e "s/yylex/pat_decl_y_lex/g" y.tab.c | \
pat_desc_l.c : $(srcdir)/pat_desc_l.l pat_desc_y.h
$(LEX) -t $(srcdir)/pat_desc_l.l | sed -e "s/yy/pat_desc_y_/g" -e "s/YY/PAT_DESC_Y_/g" > pat_desc_l.c

View File

@ -46,7 +46,7 @@
/* called func. : none */
/* ###--------------------------------------------------------------### */
static void pat_decl_y_error (str)
void pat_decl_y_error (str)
char *str;
{
@ -341,12 +341,10 @@ struct paseq *ptseq ;
{
extern FILE *pat_decl_y_in ;
extern FILE *pat_desc_y_in ;
static int call_nbr = 0;
PAT_SEQPNT = ptseq;
pat_decl_y_in = fp;
pat_desc_y_in = fp;
PAT_INSPNT = NULL;
PAT_COMPNT = NULL;

View File

@ -176,13 +176,6 @@ char usrval; /* user predicted value */
/* called func. : none */
/* ###--------------------------------------------------------------### */
static void pat_desc_y_error (str)
char *str;
{
ERR_FLG += pat_error (99, str, ' ', PAT_LINNUM);
}
/* ###--------------------------------------------------------------### */
/* function : tobin */
/* description : change to binary */
@ -626,7 +619,6 @@ unsigned char mode ; /* the description style */
struct paini *ptini ;
struct papat *lastpat;
extern FILE *pat_desc_y_in;
extern FILE *pat_decl_y_in;
int i ;
@ -843,7 +835,6 @@ unsigned char mode ; /* the description style */
PAT_LINNUM = ptseq->LINENO;
NAM_IDX = 0 ;
pat_desc_y_in = fp;
pat_decl_y_in = fp;
/* ###------------------------------------------------------### */

View File

@ -58,11 +58,13 @@ unsigned char mode ; /* complier mode */
/* begin parsing a new pattern file */
/* ###------------------------------------------------------### */
fprintf( stdout, "ICI %s %d!!\n", __FILE__, __LINE__ );
ptseq = pat_declpat (fp, ptseq);
if ((ptseq != NULL) && (ptseq->ERRFLG == 0))
{
ptseq->NAME = namealloc (name);
fprintf( stdout, "ICI %s %d!!\n", __FILE__, __LINE__ );
ptseq = pat_descpat (fp, ptseq, maxpat, mode);
}
@ -73,6 +75,7 @@ unsigned char mode ; /* complier mode */
/* continue parsing */
/* ###------------------------------------------------------### */
fprintf( stdout, "ICI %s %d!!\n", __FILE__, __LINE__ );
ptseq = pat_descpat (fp, ptseq, maxpat, mode);
}