From 45409c781a9e35df68c43b1e2f028d30bf90c0a0 Mon Sep 17 00:00:00 2001
From: Patrick Schönberger
Date: Wed, 28 Jul 2021 09:07:53 +0200
Subject: Initial commit
---
.../antlr4-runtime/atn/LexerIndexedCustomAction.h | 82 ++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 antlr4-cpp-runtime-4.9.2-source/install/include/antlr4-runtime/atn/LexerIndexedCustomAction.h
(limited to 'antlr4-cpp-runtime-4.9.2-source/install/include/antlr4-runtime/atn/LexerIndexedCustomAction.h')
diff --git a/antlr4-cpp-runtime-4.9.2-source/install/include/antlr4-runtime/atn/LexerIndexedCustomAction.h b/antlr4-cpp-runtime-4.9.2-source/install/include/antlr4-runtime/atn/LexerIndexedCustomAction.h
new file mode 100644
index 0000000..bb371f8
--- /dev/null
+++ b/antlr4-cpp-runtime-4.9.2-source/install/include/antlr4-runtime/atn/LexerIndexedCustomAction.h
@@ -0,0 +1,82 @@
+/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
+ * Use of this file is governed by the BSD 3-clause license that
+ * can be found in the LICENSE.txt file in the project root.
+ */
+
+#pragma once
+
+#include "RuleContext.h"
+#include "atn/LexerAction.h"
+
+namespace antlr4 {
+namespace atn {
+
+ ///
+ /// This implementation of is used for tracking input offsets
+ /// for position-dependent actions within a .
+ ///
+ /// This action is not serialized as part of the ATN, and is only required for
+ /// position-dependent lexer actions which appear at a location other than the
+ /// end of a rule. For more information about DFA optimizations employed for
+ /// lexer actions, see and
+ /// .
+ ///
+ /// @author Sam Harwell
+ /// @since 4.2
+ ///
+ class ANTLR4CPP_PUBLIC LexerIndexedCustomAction final : public LexerAction {
+ public:
+ ///
+ /// Constructs a new indexed custom action by associating a character offset
+ /// with a .
+ ///
+ /// Note: This class is only required for lexer actions for which
+ /// returns {@code true}.
+ ///
+ /// The offset into the input , relative to
+ /// the token start index, at which the specified lexer action should be
+ /// executed.
+ /// The lexer action to execute at a particular offset in the
+ /// input .
+ LexerIndexedCustomAction(int offset, Ref const& action);
+
+ ///
+ /// Gets the location in the input at which the lexer
+ /// action should be executed. The value is interpreted as an offset relative
+ /// to the token start index.
+ ///
+ /// The location in the input at which the lexer
+ /// action should be executed.
+ int getOffset() const;
+
+ ///
+ /// Gets the lexer action to execute.
+ ///
+ /// A object which executes the lexer action.
+ Ref getAction() const;
+
+ ///
+ /// {@inheritDoc}
+ ///
+ /// This method returns the result of calling
+ /// on the returned by .
+ virtual LexerActionType getActionType() const override;
+
+ ///
+ /// {@inheritDoc}
+ /// This method returns {@code true}.
+ virtual bool isPositionDependent() const override;
+
+ virtual void execute(Lexer *lexer) override;
+ virtual size_t hashCode() const override;
+ virtual bool operator == (const LexerAction &obj) const override;
+ virtual std::string toString() const override;
+
+ private:
+ const int _offset;
+ const Ref _action;
+ };
+
+} // namespace atn
+} // namespace antlr4
+
--
cgit v1.2.3