aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/antlr3_cpp_runtime/include/antlr3commontree.hpp
diff options
context:
space:
mode:
authorantonovvk <antonovvk@yandex-team.ru>2022-02-10 16:47:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:52 +0300
commit37de222addabbef336dcaaea5f7c7645a629fc6d (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /contrib/libs/antlr3_cpp_runtime/include/antlr3commontree.hpp
parent37a63debdc21e372d99e1808cdd31aecf75018c3 (diff)
downloadydb-37de222addabbef336dcaaea5f7c7645a629fc6d.tar.gz
Restoring authorship annotation for <antonovvk@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/antlr3_cpp_runtime/include/antlr3commontree.hpp')
-rw-r--r--contrib/libs/antlr3_cpp_runtime/include/antlr3commontree.hpp130
1 files changed, 65 insertions, 65 deletions
diff --git a/contrib/libs/antlr3_cpp_runtime/include/antlr3commontree.hpp b/contrib/libs/antlr3_cpp_runtime/include/antlr3commontree.hpp
index d7adf2a726..2a5e61f94f 100644
--- a/contrib/libs/antlr3_cpp_runtime/include/antlr3commontree.hpp
+++ b/contrib/libs/antlr3_cpp_runtime/include/antlr3commontree.hpp
@@ -1,44 +1,44 @@
-/** Interface for an ANTLR3 common tree which is what gets
- * passed around by the AST producing parser.
- */
-
+/** Interface for an ANTLR3 common tree which is what gets
+ * passed around by the AST producing parser.
+ */
+
#ifndef _ANTLR3_COMMON_TREE_HPP
#define _ANTLR3_COMMON_TREE_HPP
-
-// [The "BSD licence"]
-// Copyright (c) 2005-2009 Gokulakannan Somasundaram, ElectronDB
-
-//
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// 3. The name of the author may not be used to endorse or promote products
-// derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+
+// [The "BSD licence"]
+// Copyright (c) 2005-2009 Gokulakannan Somasundaram, ElectronDB
+
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// 3. The name of the author may not be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
namespace antlr3 {
-
-template<class ImplTraits>
+
+template<class ImplTraits>
class CommonTree : public ImplTraits::AllocPolicyType
-{
-public:
+{
+public:
typedef typename ImplTraits::AllocPolicyType AllocPolicyType;
typedef typename ImplTraits::StringType StringType;
typedef typename ImplTraits::CommonTokenType CommonTokenType;
@@ -50,51 +50,51 @@ public:
typedef typename ImplTraits::TreeUserDataType UserDataType;
protected:
/// The list of all the children that belong to this node. They are not part of the node
- /// as they belong to the common tree node that implements this.
- ///
+ /// as they belong to the common tree node that implements this.
+ ///
ChildrenType m_children;
-
-
- /// Start token index that encases this tree
- ///
+
+
+ /// Start token index that encases this tree
+ ///
ANTLR_MARKER m_startIndex;
-
- /// End token that encases this tree
- ///
+
+ /// End token that encases this tree
+ ///
ANTLR_MARKER m_stopIndex;
-
- /// A single token, this is the payload for the tree
- ///
+
+ /// A single token, this is the payload for the tree
+ ///
const CommonTokenType* m_token;
-
+
/// Points to the node that has this node as a child.
/// If this is NULL, then this is the root node.
///
CommonTree* m_parent;
-
+
/// What index is this particular node in the child list it
/// belongs to?
///
ANTLR_INT32 m_childIndex;
-
-public:
+
+public:
CommonTree();
CommonTree( const CommonTokenType* token );
CommonTree( const CommonTree* token );
CommonTree( const CommonTree& ctree );
~CommonTree();
-
+
const CommonTokenType* get_token() const;
void set_token(CommonTokenType const*);
-
+
ChildrenType& get_children();
const ChildrenType& get_children() const;
ANTLR_INT32 get_childIndex() const;
TreeType* get_parent() const;
-
+
ANTLR_MARKER get_startIndex() const;
void set_startIndex(ANTLR_MARKER index);
-
+
ANTLR_MARKER get_stopIndex() const;
void set_stopIndex(ANTLR_MARKER index);
@@ -141,12 +141,12 @@ public:
void reuse();
UserDataType UserData;
-};
-
+};
+
}
-
-#include "antlr3commontree.inl"
-
-#endif
-
-
+
+#include "antlr3commontree.inl"
+
+#endif
+
+