aboutsummaryrefslogtreecommitdiff
path: root/antlr-3.4/runtime/ObjC/Framework/examples/treeparser/LangDumpDecl.g
blob: 07d3e3983fbab91acf872a08680e7a9d7f976b70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
tree grammar LangDumpDecl;
options {
    tokenVocab=Lang;
	language = ObjC;
    ASTLabelType = ANTLRCommonTree;
}

decl : ^(DECL type declarator)
       // label.start, label.start, label.text
       { NSLog(@"int \%@", $declarator.text);}
     ;

type : INTTYPE ;

declarator
     : ID
     ;