Added ability to order the execution of dictionary adapter behaviors.
[castle.git] / Experiments / Attic / Rook / Castle.Rook.Compiler / Parser / antlr / CommonASTWithHiddenTokens.cs
bloba9284140522e52eef1346f63571e2380c0b5b0ea
1 using System;
2 using AST = antlr.collections.AST;
4 namespace antlr
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 /*A CommonAST whose initialization copies hidden token
22 * information from the Token used to create a node.
25 public class CommonASTWithHiddenTokens : CommonAST
27 new public static readonly CommonASTWithHiddenTokens.CommonASTWithHiddenTokensCreator Creator = new CommonASTWithHiddenTokensCreator();
29 protected internal IHiddenStreamToken hiddenBefore, hiddenAfter; // references to hidden tokens
31 public CommonASTWithHiddenTokens() : base()
35 public CommonASTWithHiddenTokens(IToken tok) : base(tok)
39 [Obsolete("Deprecated since version 2.7.2. Use ASTFactory.dup() instead.", false)]
40 protected CommonASTWithHiddenTokens(CommonASTWithHiddenTokens another) : base(another)
42 hiddenBefore = another.hiddenBefore;
43 hiddenAfter = another.hiddenAfter;
46 public virtual IHiddenStreamToken getHiddenAfter()
48 return hiddenAfter;
51 public virtual IHiddenStreamToken getHiddenBefore()
53 return hiddenBefore;
56 override public void initialize(AST t)
58 hiddenBefore = ((CommonASTWithHiddenTokens) t).getHiddenBefore();
59 hiddenAfter = ((CommonASTWithHiddenTokens) t).getHiddenAfter();
60 base.initialize(t);
63 override public void initialize(IToken tok)
65 IHiddenStreamToken t = (IHiddenStreamToken) tok;
66 base.initialize(t);
67 hiddenBefore = t.getHiddenBefore();
68 hiddenAfter = t.getHiddenAfter();
71 #region Implementation of ICloneable
72 [Obsolete("Deprecated since version 2.7.2. Use ASTFactory.dup() instead.", false)]
73 override public object Clone()
75 return new CommonASTWithHiddenTokens(this);
77 #endregion
79 public class CommonASTWithHiddenTokensCreator : ASTNodeCreator
81 public CommonASTWithHiddenTokensCreator() {}
83 /// <summary>
84 /// Returns the fully qualified name of the AST type that this
85 /// class creates.
86 /// </summary>
87 public override string ASTNodeTypeName
89 get
91 return typeof(antlr.CommonASTWithHiddenTokens).FullName;;
95 /// <summary>
96 /// Constructs a <see cref="AST"/> instance.
97 /// </summary>
98 public override AST Create()
100 return new CommonASTWithHiddenTokens();