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