From: Terence Parr <> Date: Thu, 14 Sep 1995 00:39:24 +0000 (-0500) Subject: auto commit for import X-Git-Url: https://pd.if.org/git/?p=pccts;a=commitdiff_plain;h=75ef314fcce61467a493b53faf58e9179d90767c auto commit for import --- 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]+"