ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/antlr/BaseAST.hpp
(Generate patch)

Comparing:
trunk/src/antlr/BaseAST.hpp (file contents), Revision 770 by tim, Fri Dec 2 15:38:03 2005 UTC vs.
branches/development/src/antlr/BaseAST.hpp (file contents), Revision 1633 by gezelter, Thu Sep 15 13:39:36 2011 UTC

# Line 5 | Line 5
5   * Project led by Terence Parr at http://www.jGuru.com
6   * Software rights: http://www.antlr.org/license.html
7   *
8 < * $Id: BaseAST.hpp,v 1.1 2005-12-02 15:38:02 tim Exp $
8 > * $Id$
9   */
10  
11 #include <iostream>
12
11   #include <antlr/config.hpp>
12   #include <antlr/AST.hpp>
13  
14 + #include <iostream>
15 +
16   #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
17   namespace antlr {
18   #endif
# Line 34 | Line 34 | class ANTLR_API BaseAST : public AST { (public)
34          }
35  
36          /// Return the class name
37 <        const char* typeName( void ) const
38 <        {
39 <                return BaseAST::TYPE_NAME;
40 <        }
37 >        virtual const char* typeName( void ) const = 0;
38  
39          /// Clone this AST node.
40 <        RefAST clone( void ) const
44 <        {
45 <                ANTLR_USE_NAMESPACE(std)cerr << "BaseAST::clone()" << ANTLR_USE_NAMESPACE(std)endl;
46 <                return nullAST;
47 <        }
40 >        virtual RefAST clone( void ) const = 0;
41  
42     /// Is node t equal to this in terms of token type and text?
43          virtual bool equals(RefAST t) const;
# Line 138 | Line 131 | class ANTLR_API BaseAST : public AST { (public)
131          }
132  
133          /// Set the next sibling after this one.
134 <        void setNextSibling(RefAST n)
134 >        virtual void setNextSibling(RefAST n)
135          {
136                  right = static_cast<BaseAST*>(static_cast<AST*>(n));
137          }
# Line 175 | Line 168 | class ANTLR_API BaseAST : public AST { (public)
168          /// Print out a child sibling tree in LISP notation
169          virtual ANTLR_USE_NAMESPACE(std)string toStringList() const;
170          virtual ANTLR_USE_NAMESPACE(std)string toStringTree() const;
178
179        static const char* const TYPE_NAME;
171   protected:
172          RefBaseAST down;
173          RefBaseAST right;

Comparing:
trunk/src/antlr/BaseAST.hpp (property svn:keywords), Revision 770 by tim, Fri Dec 2 15:38:03 2005 UTC vs.
branches/development/src/antlr/BaseAST.hpp (property svn:keywords), Revision 1633 by gezelter, Thu Sep 15 13:39:36 2011 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines