Permalink
Browse files

removed examples

  • Loading branch information...
1 parent 224d74d commit ea4e774913bbe8e11e68c2c3497763756f8e1169 @tj committed May 8, 2011
View
@@ -1,79 +0,0 @@
-EXAMPLES = test rule accept wc dc dcv calc basic
-
-CFLAGS = -g -O3
-
-DIFF = diff
-TEE = cat >
-
-all : $(EXAMPLES)
-
-test : .FORCE
- ../peg -o test.peg.c test.peg
- $(CC) $(CFLAGS) -o test test.c
- echo 'ab.ac.ad.ae.afg.afh.afg.afh.afi.afj.' | ./$@ | $(TEE) $@.out
- $(DIFF) $@.ref $@.out
- rm -f $@.out
- @echo
-
-rule : .FORCE
- ../peg -o rule.peg.c rule.peg
- $(CC) $(CFLAGS) -o rule rule.c
- echo 'abcbcdabcbcdabcbcdabcbcd' | ./$@ | $(TEE) $@.out
- $(DIFF) $@.ref $@.out
- rm -f $@.out
- @echo
-
-accept : .FORCE
- ../peg -o accept.peg.c accept.peg
- $(CC) $(CFLAGS) -o accept accept.c
- echo 'abcbcdabcbcdabcbcdabcbcd' | ./$@ | $(TEE) $@.out
- $(DIFF) $@.ref $@.out
- rm -f $@.out
- @echo
-
-wc : .FORCE
- ../leg -o wc.leg.c wc.leg
- $(CC) $(CFLAGS) -o wc wc.leg.c
- cat wc.leg | ./$@ | $(TEE) $@.out
- $(DIFF) $@.ref $@.out
- rm -f $@.out
- @echo
-
-dc : .FORCE
- ../peg -o dc.peg.c dc.peg
- $(CC) $(CFLAGS) -o dc dc.c
- echo ' 2 *3 *(3+ 4) ' | ./dc | $(TEE) $@.out
- $(DIFF) $@.ref $@.out
- rm -f $@.out
- @echo
-
-dcv : .FORCE
- ../peg -o dcv.peg.c dcv.peg
- $(CC) $(CFLAGS) -o dcv dcv.c
- echo 'a = 6; b = 7; a * b' | ./dcv | $(TEE) $@.out
- $(DIFF) $@.ref $@.out
- rm -f $@.out
- @echo
-
-calc : .FORCE
- ../leg -o calc.leg.c calc.leg
- $(CC) $(CFLAGS) -o calc calc.leg.c
- echo 'a = 6; b = 7; a * b' | ./calc | $(TEE) $@.out
- $(DIFF) $@.ref $@.out
- rm -f $@.out
- @echo
-
-basic : .FORCE
- ../leg -o basic.leg.c basic.leg
- $(CC) $(CFLAGS) -o basic basic.leg.c
- ( echo 'load "test"'; echo "run" ) | ./basic | $(TEE) $@.out
- $(DIFF) $@.ref $@.out
- rm -f $@.out
- @echo
-
-clean : .FORCE
- rm -f *~ *.o *.[pl]eg.[cd] $(EXAMPLES)
-
-spotless : clean
-
-.FORCE :
View
@@ -1,11 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "accept.peg.c"
-
-int main()
-{
- while (yyparse());
-
- return 0;
-}
View
@@ -1,8 +0,0 @@
-start <- abcd+
-
-abcd <- 'a' { printf("A %d\n", yypos); } bc { printf("ABC %d\n", yypos); } &{YYACCEPT}
- / 'b' { printf("B %d\n", yypos); } cd { printf("BCD %d\n", yypos); } &{YYACCEPT}
-
-bc <- 'b' { printf("B %d\n", yypos); } 'c' { printf("C %d\n", yypos); }
-
-cd <- 'c' { printf("C %d\n", yypos); } 'd' { printf("D %d\n", yypos); }
View
@@ -1,32 +0,0 @@
-A 3
-B 3
-C 3
-ABC 3
-B 3
-C 3
-D 3
-BCD 3
-A 3
-B 3
-C 3
-ABC 3
-B 3
-C 3
-D 3
-BCD 3
-A 3
-B 3
-C 3
-ABC 3
-B 3
-C 3
-D 3
-BCD 3
-A 3
-B 3
-C 3
-ABC 3
-B 3
-C 3
-D 3
-BCD 3
Oops, something went wrong.

0 comments on commit ea4e774

Please sign in to comment.