File: test.c

package info (click to toggle)
pccts 1.33MR33-6
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 3,220 kB
  • ctags: 5,279
  • sloc: ansic: 46,053; cpp: 3,234; makefile: 959
file content (19 lines) | stat: -rw-r--r-- 412 bytes parent folder | download | duplicates (30)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#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]));
}