1 /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2 * Use of this file is governed by the BSD 3-clause license that
3 * can be found in the LICENSE.txt file in the project root.
8 #include "atn/LexerAction.h"
9 #include "atn/LexerActionType.h"
15 /// Implements the {@code popMode} lexer action by calling <seealso cref="Lexer#popMode"/>.
17 /// <para>The {@code popMode} command does not have any parameters, so this action is
18 /// implemented as a singleton instance exposed by <seealso cref="#INSTANCE"/>.</para>
20 /// @author Sam Harwell
23 class ANTLR4CPP_PUBLIC LexerPopModeAction final : public LexerAction {
26 /// Provides a singleton instance of this parameterless lexer action.
28 static const Ref<LexerPopModeAction> getInstance();
31 /// {@inheritDoc} </summary>
32 /// <returns> This method returns <seealso cref="LexerActionType#POP_MODE"/>. </returns>
33 virtual LexerActionType getActionType() const override;
36 /// {@inheritDoc} </summary>
37 /// <returns> This method returns {@code false}. </returns>
38 virtual bool isPositionDependent() const override;
43 /// <para>This action is implemented by calling <seealso cref="Lexer#popMode"/>.</para>
45 virtual void execute(Lexer *lexer) override;
47 virtual size_t hashCode() const override;
48 virtual bool operator == (const LexerAction &obj) const override;
49 virtual std::string toString() const override;
52 /// Constructs the singleton instance of the lexer {@code popMode} command.