source: trunk/yao/share/antlr-2.7.7/examples/python/multiParser/parser1.g @ 1

Last change on this file since 1 was 1, checked in by lnalod, 15 years ago

Initial import of YAO sources

File size: 346 bytes
Line 
1/* This grammar demonstrates the use of two parsers sharing a token
2 * vocabulary with a single lexer.
3 */
4
5header {
6# empty header
7}
8
9options {
10    language="Python";
11}
12
13class SimpleParser extends Parser;
14
15options {
16    k=1;
17    importVocab=Simple;
18}
19
20simple:  ( x )+
21        ;
22
23x:
24        (a) =>  a
25|       b
26;
27
28a :  A B C;
29b : A B D;
Note: See TracBrowser for help on using the repository browser.