]> pd.if.org Git - pccts/commitdiff
auto commit for import
authorTerence Parr <>
Thu, 14 Sep 1995 00:39:54 +0000 (19:39 -0500)
committerNathan Wagner <nw@hydaspes.if.org>
Sun, 26 Feb 2017 02:16:51 +0000 (20:16 -0600)
testcpp/8/main.cpp [new file with mode: 0755]

diff --git a/testcpp/8/main.cpp b/testcpp/8/main.cpp
new file mode 100755 (executable)
index 0000000..ad324c1
--- /dev/null
@@ -0,0 +1,14 @@
+/* Simple main() to call a parser in another file */
+
+#include "tokens.h"                    // define TokenType
+#include "Expr.h"                      // define parser
+#include "DLGLexer.h"          // define scanner
+#include "PBlackBox.h"         // Define ParserBlackBox
+
+int main()
+{
+       ParserBlackBox<DLGLexer, Expr, ANTLRToken> p(stdin);
+
+       p.parser()->e();                        /* start parsing at rule 'e' of that parser */
+       return 0;
+}