Update to version 0.9.1

PR:		24906
Submitted by:	Anton Berezin <tobez@tobez.org>
This commit is contained in:
Eivind Eklund 2001-02-20 22:25:04 +00:00
parent 84c5d89a6e
commit c4e3c399f3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=38532
7 changed files with 17 additions and 124 deletions

View File

@ -6,21 +6,29 @@
#
PORTNAME= re2c
PORTVERSION= 0.5
PORTVERSION= 0.9.1
CATEGORIES= devel
MASTER_SITES= ftp://csg.uwaterloo.ca/pub/peter/ \
ftp://ftp.uni-trier.de/pub/unix/compiler-toolkit/re2c/ \
ftp://ftp.tut.ac.jp/.h3/UNIX/lib/
DISTNAME= ${PORTNAME}.${PORTVERSION}
MASTER_SITES= http://www.tildeslash.org/re2c/ \
http://freesoftware.missouri.edu/pub/NetSW/SoftEng/CompilerConstruct/re2c/ \
http://www.tobez.org/download/port-mirrors/devel/re2c/
MAINTAINER= eivind@FreeBSD.org
USE_GMAKE= yes
MAN1= re2c.1
ALL_TARGET= default
pre-patch:
@${PERL} -pi -e 's|^CFLAGS.*$$|CFLAGS+=-Wall -I. -Wno-unused -Wno-parentheses|' ${WRKSRC}/Makefile
@${PERL} -pi -e 's|<malloc.h>|<stdlib.h>|' ${WRKSRC}/parser.cc ${WRKSRC}/parser.y
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/re2c ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/re2c.1 ${PREFIX}/man/man1
${MKDIR} ${PREFIX}/share/doc/re2c
${INSTALL_DATA} ${WRKSRC}/doc/loplas.ps.gz ${WRKSRC}/doc/sample.bib \
${PREFIX}/share/doc/re2c
.include <bsd.port.mk>

View File

@ -1 +1 @@
MD5 (re2c.0.5.tar.gz) = 5c00e8e554d4b650895ecfc3e63338b2
MD5 (re2c-0.9.1.tar.gz) = 574dc153ac4edd7ccbf712721af23040

View File

@ -1,13 +0,0 @@
--- basics.h.orig Thu May 14 16:35:56 1998
+++ basics.h Thu May 14 16:36:18 1998
@@ -6,10 +6,6 @@
//Initial revision
//
-typedef unsigned int bool;
-const bool true = (0 == 0);
-const bool false = (!true);
-
typedef unsigned int uint;
typedef unsigned char uchar, byte;
typedef unsigned short ushort, word;

View File

@ -1,20 +0,0 @@
--- Makefile.orig Fri Apr 15 20:23:55 1994
+++ Makefile Sun Sep 26 09:42:57 1999
@@ -15,7 +15,7 @@
OBJS = code.o dfa.o main.o parser.o actions.o scanner.o substr.o\
translate.o
-CC = gcc
+CC = c++
CFLAGS = -O2 -Wall -I.
YFLAGS = -d
LDFLAGS =
@@ -30,7 +30,7 @@
mv -f y.tab.c parser.cc
re2c: $(OBJS)
- $(CC) -o $@ $(OBJS) $(LDFLAGS) -lg++
+ $(CC) -o $@ $(OBJS) $(LDFLAGS) #-lg++
#
# generated with "gcc -I. -MM -x c++ *.cc *.y *.re"

View File

@ -1,72 +0,0 @@
--- dfa.cc.old Fri Feb 4 15:18:55 2000
+++ dfa.cc Fri Feb 4 15:22:57 2000
@@ -109,6 +109,7 @@
uint nc = ub - lb;
GoTo *goTo = new GoTo[nc];
Span *span = new Span[nc];
+ uint j;
memset((char*) goTo, 0, nc*sizeof(GoTo));
tail = &head;
head = NULL;
@@ -123,7 +124,7 @@
uint nGoTos = 0;
s->rule = NULL;
- for(iP = s->kernel; i = *iP; ++iP){
+ for(iP = s->kernel; (i = *iP) != NULL; ++iP){
if(i->i.tag == CHAR){
for(Ins *j = i + 1; j < (Ins*) i->i.link; ++j){
if(!(j->c.link = goTo[j->c.value - lb].to))
@@ -136,7 +137,7 @@
}
}
- for(uint j = 0; j < nGoTos; ++j){
+ for(j = 0; j < nGoTos; ++j){
GoTo *go = &goTo[goTo[j].ch - lb];
i = (Ins*) go->to;
for(cP = work; i; i = (Ins*) i->c.link)
@@ -169,7 +170,7 @@
DFA::~DFA(){
State *s;
- while(s = head){
+ while((s = head) != NULL){
head = s->next;
delete s;
}
@@ -185,11 +186,12 @@
State *DFA::findState(Ins **kernel, uint kCount){
Ins **cP, **iP, *i;
+ State *s;
kernel[kCount] = NULL;
cP = kernel;
- for(iP = kernel; i = *iP; ++iP){
+ for(iP = kernel; (i = *iP) != NULL; ++iP){
if(i->i.tag == CHAR || i->i.tag == TERM){
*cP++ = i;
} else {
@@ -199,9 +201,9 @@
kCount = cP - kernel;
kernel[kCount] = NULL;
- for(State *s = head; s; s = s->next){
+ for(s = head; s; s = s->next){
if(s->kCount == kCount){
- for(iP = s->kernel; i = *iP; ++iP)
+ for(iP = s->kernel; (i = *iP) != NULL; ++iP)
if(!isMarked(i))
goto nextState;
goto unmarkAll;
@@ -218,7 +220,7 @@
toDo = s;
unmarkAll:
- for(iP = kernel; i = *iP; ++iP)
+ for(iP = kernel; (i = *iP) != NULL; ++iP)
unmark(i);
return s;

View File

@ -1,13 +0,0 @@
--- actions.cc.old Fri Feb 4 15:23:32 2000
+++ actions.cc Fri Feb 4 15:24:14 2000
@@ -460,8 +460,9 @@
void genCode(ostream& o, RegExp *re){
CharSet cs;
+ uint j;
memset(&cs, 0, sizeof(cs));
- for(uint j = 0; j < nChars; ++j){
+ for(j = 0; j < nChars; ++j){
cs.rep[j] = &cs.ptn[0];
cs.ptn[j].nxt = &cs.ptn[j+1];
}

View File

@ -1 +1,4 @@
bin/re2c
share/doc/re2c/loplas.ps.gz
share/doc/re2c/sample.bib
@dirrm share/doc/re2c