]> pd.if.org Git - pccts/blob - testcpp/6/test2.g
auto commit for import
[pccts] / testcpp / 6 / test2.g
1 /* This is test2.g which is a copy of test.g and tests linking
2  * multiple scanners/parsers together; DLG-based scanner
3  */
4
5 <<
6 typedef ANTLRCommonToken ANTLRToken;
7 >>
8
9 #token "[\ \t\n]+"      <<skip();>>
10 #token Eof "@"
11
12 class B {
13
14 e       :       IDENTIFIER NUMBER
15                 <<fprintf(stderr, "text is %s,%s\n", $1->getText(), $2->getText());>>
16                 Eof
17         ;
18
19 }
20
21 #token IDENTIFIER       "[a-z]+"
22 #token NUMBER   "[0-9]+"