Update changes.
[castle.git] / Experiments / Rook / Castle.Rook / antlr.collections.impl / ASTArray.cs
blobcea241c3840814bac872f00f388c5b03137a159e
1 using System;
2 using AST = antlr.collections.AST;
4 namespace antlr.collections.impl
6 /*ANTLR Translator Generator
7 * Project led by Terence Parr at http://www.jGuru.com
8 * Software rights: http://www.antlr.org/license.html
10 * $Id:$
14 // ANTLR C# Code Generator by Micheal Jordan
15 // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com
16 // Anthony Oguntimehin
18 // With many thanks to Eric V. Smith from the ANTLR list.
21 /*ASTArray is a class that allows ANTLR to
22 * generate code that can create and initialize an array
23 * in one expression, like:
24 * (new ASTArray(3)).add(x).add(y).add(z)
26 public class ASTArray
28 public int size = 0;
29 public AST[] array;
32 public ASTArray(int capacity)
34 array = new AST[capacity];
36 public virtual ASTArray add(AST node)
38 array[size++] = node;
39 return this;