]> pd.if.org Git - pccts/blobdiff - testcpp/6/test.g
auto commit for import
[pccts] / testcpp / 6 / test.g
diff --git a/testcpp/6/test.g b/testcpp/6/test.g
new file mode 100755 (executable)
index 0000000..a61f534
--- /dev/null
@@ -0,0 +1,20 @@
+/* This is test.g which tests linking multiple scanners/parsers together;
+ * DLG-based scanner
+ */
+
+<<
+typedef ANTLRCommonToken ANTLRToken;
+>>
+
+#token "[\ \t\n]+"     <<skip();>>
+
+class A {
+
+e      :       IDENTIFIER NUMBER
+               <<fprintf(stderr, "text is %s,%s\n", $1->getText(), $2->getText());>>
+       ;
+
+}
+
+#token IDENTIFIER      "[a-z]+"
+#token NUMBER          "[0-9]+"