From 75ef314fcce61467a493b53faf58e9179d90767c Mon Sep 17 00:00:00 2001 From: Terence Parr <> Date: Wed, 13 Sep 1995 19:39:24 -0500 Subject: [PATCH] auto commit for import --- testcpp/8/test.g | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 testcpp/8/test.g diff --git a/testcpp/8/test.g b/testcpp/8/test.g new file mode 100755 index 0000000..d7af59e --- /dev/null +++ b/testcpp/8/test.g @@ -0,0 +1,22 @@ +/* This is test.g which tests a simple DLG-based scanner, but with + * a main() in another file. + */ + +#header << +#include "AToken.h" // what's ANTLRCommonToken look like? +typedef ANTLRCommonToken ANTLRToken; // by placing in header, Expr.h gets it +>> + +#token "[\ \t\n]+" <> +#token Eof "@" + +class Expr { /* Define a grammar class */ + +e : IDENTIFIER NUMBER Eof + <getText(), $2->getText());>> + ; + +} + +#token IDENTIFIER "[a-z]+" +#token NUMBER "[0-9]+" -- 2.40.0