Index: aapl/avlcommon.h --- aapl/avlcommon.h.orig 2008-10-07 01:04:57.000000000 +0200 +++ aapl/avlcommon.h 2015-09-27 12:06:18.625714020 +0200 @@ -881,9 +881,9 @@ } #ifdef AVL_BASIC - keyRelation = compare( *element, *curEl ); + keyRelation = Compare::compare( *element, *curEl ); #else - keyRelation = compare( element->BASEKEY(getKey()), + keyRelation = Compare::compare( element->BASEKEY(getKey()), curEl->BASEKEY(getKey()) ); #endif @@ -920,7 +920,7 @@ long keyRelation; while (curEl) { - keyRelation = compare( *element, *curEl ); + keyRelation = Compare::compare( *element, *curEl ); /* Do we go left? */ if ( keyRelation < 0 ) @@ -969,7 +969,7 @@ return element; } - keyRelation = compare( key, curEl->BASEKEY(getKey()) ); + keyRelation = Compare::compare( key, curEl->BASEKEY(getKey()) ); /* Do we go left? */ if ( keyRelation < 0 ) { @@ -1023,7 +1023,7 @@ return element; } - keyRelation = compare(key, curEl->getKey()); + keyRelation = Compare::compare(key, curEl->getKey()); /* Do we go left? */ if ( keyRelation < 0 ) { @@ -1058,7 +1058,7 @@ long keyRelation; while (curEl) { - keyRelation = compare( key, curEl->BASEKEY(getKey()) ); + keyRelation = Compare::compare( key, curEl->BASEKEY(getKey()) ); /* Do we go left? */ if ( keyRelation < 0 ) Index: aapl/bstcommon.h --- aapl/bstcommon.h.orig 2008-10-07 01:04:57.000000000 +0200 +++ aapl/bstcommon.h 2015-09-27 12:06:18.625714020 +0200 @@ -361,7 +361,7 @@ } mid = lower + ((upper-lower)>>1); - keyRelation = compare(key, GET_KEY(*mid)); + keyRelation = Compare::compare(key, GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; @@ -373,12 +373,12 @@ lower = mid - 1; while ( lower != lowEnd && - compare(key, GET_KEY(*lower)) == 0 ) + Compare::compare(key, GET_KEY(*lower)) == 0 ) lower--; upper = mid + 1; while ( upper != highEnd && - compare(key, GET_KEY(*upper)) == 0 ) + Compare::compare(key, GET_KEY(*upper)) == 0 ) upper++; low = (Element*)lower + 1; @@ -419,7 +419,7 @@ } mid = lower + ((upper-lower)>>1); - keyRelation = compare(key, GET_KEY(*mid)); + keyRelation = Compare::compare(key, GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; @@ -457,7 +457,7 @@ } mid = lower + ((upper-lower)>>1); - keyRelation = compare(key, GET_KEY(*mid)); + keyRelation = Compare::compare(key, GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; @@ -508,7 +508,7 @@ } mid = lower + ((upper-lower)>>1); - keyRelation = compare(key, GET_KEY(*mid)); + keyRelation = Compare::compare(key, GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; @@ -603,7 +603,7 @@ } mid = lower + ((upper-lower)>>1); - keyRelation = compare(GET_KEY(el), GET_KEY(*mid)); + keyRelation = Compare::compare(GET_KEY(el), GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; @@ -662,7 +662,7 @@ } mid = lower + ((upper-lower)>>1); - keyRelation = compare(GET_KEY(el), GET_KEY(*mid)); + keyRelation = Compare::compare(GET_KEY(el), GET_KEY(*mid)); if ( keyRelation < 0 ) upper = mid - 1; Index: cxxprep/Makefile --- cxxprep/Makefile.orig 2008-10-07 01:04:57.000000000 +0200 +++ cxxprep/Makefile 2015-09-27 12:06:18.625714020 +0200 @@ -22,8 +22,8 @@ INCS = -I ../aapl DEFS = -CFLAGS = -g -Wall -LDFLAGS = -g +CFLAGS = +LDFLAGS = CC_SRCS = main.cpp scanner.cpp parser.cpp keys.cpp names.cpp CC_HEADERS = parser.h @@ -33,7 +33,7 @@ # Programs CXX = c++ AR = ar -KELBT = ../kelbt/kelbt +KELBT = kelbt RAGEL = ragel RLCODEGEN = rlgen-cd @@ -44,7 +44,7 @@ # Rules. all: cxxprep undo -cxxprep: $(KELBT) $(CC_HEADERS) $(CC_SRCS) $(OBJS) +cxxprep: $(CC_HEADERS) $(CC_SRCS) $(OBJS) $(CXX) $(LDFLAGS) -o $@ $(OBJS) undo: undo.lex @@ -54,9 +54,9 @@ keys.cpp: keys.gperf gperf -L C++ -t $< > $@ -parser.h: parser.kh $(KELBT) +parser.h: parser.kh $(KELBT) -o $@ $< -parser.cpp: parser.kl parser.kh $(KELBT) +parser.cpp: parser.kl parser.kh $(KELBT) -o $@ $< Index: kelbt.1 --- kelbt.1.orig 2015-09-27 12:06:18.625714020 +0200 +++ kelbt.1 2015-09-27 12:06:18.625714020 +0200 @@ -0,0 +1,31 @@ +.TH KELBT 1 "May 2007" "Kelbt 0.12" "Backtracking LR Parser Generator" +.SH NAME +kelbt \- generate backtracking LR parsers +.SH SYNOPSIS +.B kelbt +.RI [ options ] files +.SH DESCRIPTION +This manual page very briefly documents \fBkelbt\fP, a backtracking LR parser +generator. For a better reference on how to use it, see the provided examples +and the paper at http://www.cs.queensu.ca/~thurston/thurston_CASCON_06_btlr.pdf + +.SH OPTIONS +.TP +.BR \-h ", " \-H ", " \-? ", " \-\-help +Print this usage and exit +.TP +.B \-v, \-\-version +Print version information and exit +.B \-o " file" +Write output to file +.B \-V +Generate a Graphviz dotfile +.B \-i +Show branch point info +.B \-t +Force top-down with unique empty productions +.B \-l +Inhibit writing of #line directives + +.SH AUTHOR +kelbt was written by Adrian Thurston . Index: kelbt/Makefile.in --- kelbt/Makefile.in.orig 2012-01-22 18:51:25.000000000 +0100 +++ kelbt/Makefile.in 2015-09-27 12:06:18.625714020 +0200 @@ -21,7 +21,7 @@ INCS = -I../aapl DEFS = -CFLAGS = -g -Wall +CFLAGS = LDFLAGS = CC_SRCS = \ Index: test/runtests --- test/runtests.orig 2008-10-07 01:04:57.000000000 +0200 +++ test/runtests 2015-09-27 12:06:18.625714020 +0200 @@ -23,7 +23,7 @@ [ -z "$*" ] && set -- *.kl compiler=`sed '/^#define CXX/s/#define CXX *//p;d' ../config.h` -cflags="-Wall -O3" +cflags="-O3" function test_error {