X-Git-Url: https://pd.if.org/git/?p=pccts;a=blobdiff_plain;f=support%2Frexpr%2Ftest.c;fp=support%2Frexpr%2Ftest.c;h=e159cc415c377c67f5eb152f2059e999d609236d;hp=0000000000000000000000000000000000000000;hb=56dd00148e59773742903ee71be791eaa49a8616;hpb=cb15b978c765a661bf3154d865fa3e2401d649f5 diff --git a/support/rexpr/test.c b/support/rexpr/test.c new file mode 100755 index 0000000..e159cc4 --- /dev/null +++ b/support/rexpr/test.c @@ -0,0 +1,19 @@ +#include +#include "rexpr.h" + +/* + * test for rexpr(). + * To make this test: + * cc -o rexpr test.c rexpr.c + * Then from command line type: + * rexpr r string + * where r is the regular expression that decribes a language + * and string is the string to verify. + */ +main(argc,argv) +int argc; +char *argv[]; +{ + if ( argc!=3 ) fprintf(stderr,"rexpr: expr s\n"); + else printf("%d\n", rexpr(argv[1], argv[2])); +}