KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > beaver > spec > ast > GrammarTreeRoot


1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * This file is part of Beaver Parser Generator. *
3  * Copyright (C) 2003,2004 Alexander Demenchuk <alder@softanvil.com>. *
4  * All rights reserved. *
5  * See the file "LICENSE" for the terms and conditions for copying, *
6  * distribution and modification of Beaver. *
7  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

8
9 package beaver.spec.ast;
10
11 /**
12  * AST root node
13  */

14 public class GrammarTreeRoot extends Node
15 {
16     public final Declaration[] declarations;
17     public final Rule[] rules;
18     
19     public GrammarTreeRoot(Declaration[] declarations, Rule[] rules)
20     {
21         this.declarations = declarations;
22         this.rules = rules;
23     }
24     
25     public void accept(TreeWalker walker)
26     {
27         walker.visit(this);
28     }
29 }
30
Popular Tags