PageRenderTime 45ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/Dependencies/boo/src/Boo.Lang.Parser/antlr/antlr/ASTNULLType.cs

https://github.com/w4x/boolangstudio
C# | 123 lines | 103 code | 6 blank | 14 comment | 0 complexity | 585a25d1b85ec6015b9dda0ebe305e13 MD5 | raw file
Possible License(s): GPL-2.0
  1. using System;
  2. using IEnumerator = System.Collections.IEnumerator;
  3. using AST = antlr.collections.AST;
  4. using Token = antlr.Token;
  5. namespace antlr
  6. {
  7. /*ANTLR Translator Generator
  8. * Project led by Terence Parr at http://www.jGuru.com
  9. * Software rights: http://www.antlr.org/license.html
  10. *
  11. * $Id:$
  12. */
  13. //
  14. // ANTLR C# Code Generator by Micheal Jordan
  15. // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com
  16. // Anthony Oguntimehin
  17. //
  18. // With many thanks to Eric V. Smith from the ANTLR list.
  19. //
  20. /*There is only one instance of this class **/
  21. public class ASTNULLType : AST
  22. {
  23. public virtual void addChild(AST c) {}
  24. public virtual bool Equals(AST t)
  25. {
  26. return false;
  27. }
  28. public virtual bool EqualsList(AST t)
  29. {
  30. return false;
  31. }
  32. public virtual bool EqualsListPartial(AST t)
  33. {
  34. return false;
  35. }
  36. public virtual bool EqualsTree(AST t)
  37. {
  38. return false;
  39. }
  40. public virtual bool EqualsTreePartial(AST t)
  41. {
  42. return false;
  43. }
  44. public virtual IEnumerator findAll(AST tree)
  45. {
  46. return null;
  47. }
  48. public virtual IEnumerator findAllPartial(AST subtree)
  49. {
  50. return null;
  51. }
  52. public virtual AST getFirstChild()
  53. {
  54. return this;
  55. }
  56. public virtual AST getNextSibling()
  57. {
  58. return this;
  59. }
  60. public virtual string getText()
  61. {
  62. return "<ASTNULL>";
  63. }
  64. public virtual int Type
  65. {
  66. get { return Token.NULL_TREE_LOOKAHEAD; }
  67. set { ; }
  68. }
  69. public int getNumberOfChildren()
  70. {
  71. return 0;
  72. }
  73. public virtual void initialize(int t, string txt)
  74. {
  75. }
  76. public virtual void initialize(AST t)
  77. {
  78. }
  79. public virtual void initialize(IToken t)
  80. {
  81. }
  82. public virtual void setFirstChild(AST c)
  83. {
  84. ;
  85. }
  86. public virtual void setNextSibling(AST n)
  87. {
  88. ;
  89. }
  90. public virtual void setText(string text)
  91. {
  92. ;
  93. }
  94. public virtual void setType(int ttype)
  95. {
  96. this.Type = ttype;
  97. }
  98. override public string ToString()
  99. {
  100. return getText();
  101. }
  102. public virtual string ToStringList()
  103. {
  104. return getText();
  105. }
  106. public virtual string ToStringTree()
  107. {
  108. return getText();
  109. }
  110. #region Implementation of ICloneable
  111. public object Clone()
  112. {
  113. return MemberwiseClone();
  114. }
  115. #endregion
  116. }
  117. }