summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/support/rexpr/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/support/rexpr/test.c')
-rw-r--r--src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/support/rexpr/test.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/support/rexpr/test.c b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/support/rexpr/test.c
new file mode 100644
index 00000000..e159cc41
--- /dev/null
+++ b/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/VfrCompile/Pccts/support/rexpr/test.c
@@ -0,0 +1,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]));
+}