test.c
Upload User: itx_2006
Upload Date: 2007-01-06
Package Size: 493k
Code Size: 0k
Development Platform:

Others

  1. #include <stdio.h>
  2. #include "rexpr.h"
  3. /*
  4.  * test for rexpr().
  5.  * To make this test:
  6.  * cc -o rexpr test.c rexpr.c
  7.  * Then from command line type:
  8.  * rexpr r string
  9.  * where r is the regular expression that decribes a language
  10.  * and string is the string to verify.
  11.  */
  12. main(argc,argv)
  13. int argc;
  14. char *argv[];
  15. {
  16. if ( argc!=3 ) fprintf(stderr,"rexpr: expr sn");
  17. else printf("%dn", rexpr(argv[1], argv[2]));
  18. }