From 3a922f50294f87067c1b51650770e8e0d63a0bd2 Mon Sep 17 00:00:00 2001 From: Atreya Bain Date: Wed, 30 Sep 2020 01:18:35 +0530 Subject: [PATCH] Trim commit tree --- lib/antlr4/include/ANTLRErrorListener.h | 167 ---- lib/antlr4/include/ANTLRErrorStrategy.h | 121 --- lib/antlr4/include/ANTLRFileStream.h | 27 - lib/antlr4/include/ANTLRInputStream.h | 69 -- lib/antlr4/include/BailErrorStrategy.h | 59 -- lib/antlr4/include/BaseErrorListener.h | 36 - lib/antlr4/include/BufferedTokenStream.h | 200 ---- lib/antlr4/include/CharStream.h | 37 - lib/antlr4/include/CommonToken.h | 158 --- lib/antlr4/include/CommonTokenFactory.h | 74 -- lib/antlr4/include/CommonTokenStream.h | 79 -- lib/antlr4/include/ConsoleErrorListener.h | 35 - lib/antlr4/include/DefaultErrorStrategy.h | 466 --------- lib/antlr4/include/DiagnosticErrorListener.h | 80 -- lib/antlr4/include/Exceptions.h | 99 -- lib/antlr4/include/FailedPredicateException.h | 32 - lib/antlr4/include/InputMismatchException.h | 24 - lib/antlr4/include/IntStream.h | 218 ----- lib/antlr4/include/InterpreterRuleContext.h | 45 - lib/antlr4/include/Lexer.h | 196 ---- lib/antlr4/include/LexerInterpreter.h | 52 - .../include/LexerNoViableAltException.h | 31 - lib/antlr4/include/ListTokenSource.h | 88 -- lib/antlr4/include/NoViableAltException.h | 42 - lib/antlr4/include/Parser.h | 467 --------- lib/antlr4/include/ParserInterpreter.h | 179 ---- lib/antlr4/include/ParserRuleContext.h | 147 --- lib/antlr4/include/ProxyErrorListener.h | 38 - lib/antlr4/include/RecognitionException.h | 98 -- lib/antlr4/include/Recognizer.h | 164 ---- lib/antlr4/include/RuleContext.h | 137 --- lib/antlr4/include/RuleContextWithAltNum.h | 32 - lib/antlr4/include/RuntimeMetaData.h | 155 --- lib/antlr4/include/Token.h | 92 -- lib/antlr4/include/TokenFactory.h | 30 - lib/antlr4/include/TokenSource.h | 85 -- lib/antlr4/include/TokenStream.h | 137 --- lib/antlr4/include/TokenStreamRewriter.h | 293 ------ lib/antlr4/include/UnbufferedCharStream.h | 123 --- lib/antlr4/include/UnbufferedTokenStream.h | 115 --- lib/antlr4/include/Vocabulary.h | 193 ---- lib/antlr4/include/WritableToken.h | 23 - lib/antlr4/include/antlr4-common.h | 137 --- lib/antlr4/include/antlr4-runtime.h | 167 ---- lib/antlr4/include/atn/ATN.h | 112 --- lib/antlr4/include/atn/ATNConfig.h | 148 --- lib/antlr4/include/atn/ATNConfigSet.h | 110 --- .../include/atn/ATNDeserializationOptions.h | 50 - lib/antlr4/include/atn/ATNDeserializer.h | 85 -- lib/antlr4/include/atn/ATNSerializer.h | 61 -- lib/antlr4/include/atn/ATNSimulator.h | 87 -- lib/antlr4/include/atn/ATNState.h | 133 --- lib/antlr4/include/atn/ATNType.h | 20 - .../include/atn/AbstractPredicateTransition.h | 24 - lib/antlr4/include/atn/ActionTransition.h | 33 - lib/antlr4/include/atn/AmbiguityInfo.h | 68 -- .../include/atn/ArrayPredictionContext.h | 43 - lib/antlr4/include/atn/AtomTransition.h | 30 - lib/antlr4/include/atn/BasicBlockStartState.h | 22 - lib/antlr4/include/atn/BasicState.h | 21 - lib/antlr4/include/atn/BlockEndState.h | 24 - lib/antlr4/include/atn/BlockStartState.h | 21 - .../include/atn/ContextSensitivityInfo.h | 47 - lib/antlr4/include/atn/DecisionEventInfo.h | 70 -- lib/antlr4/include/atn/DecisionInfo.h | 227 ----- lib/antlr4/include/atn/DecisionState.h | 30 - .../include/atn/EmptyPredictionContext.h | 27 - lib/antlr4/include/atn/EpsilonTransition.h | 39 - lib/antlr4/include/atn/ErrorInfo.h | 43 - lib/antlr4/include/atn/LL1Analyzer.h | 109 --- lib/antlr4/include/atn/LexerATNConfig.h | 44 - lib/antlr4/include/atn/LexerATNSimulator.h | 210 ---- lib/antlr4/include/atn/LexerAction.h | 66 -- lib/antlr4/include/atn/LexerActionExecutor.h | 115 --- lib/antlr4/include/atn/LexerActionType.h | 55 -- lib/antlr4/include/atn/LexerChannelAction.h | 63 -- lib/antlr4/include/atn/LexerCustomAction.h | 87 -- .../include/atn/LexerIndexedCustomAction.h | 82 -- lib/antlr4/include/atn/LexerModeAction.h | 61 -- lib/antlr4/include/atn/LexerMoreAction.h | 57 -- lib/antlr4/include/atn/LexerPopModeAction.h | 57 -- lib/antlr4/include/atn/LexerPushModeAction.h | 61 -- lib/antlr4/include/atn/LexerSkipAction.h | 55 -- lib/antlr4/include/atn/LexerTypeAction.h | 55 -- lib/antlr4/include/atn/LookaheadEventInfo.h | 42 - lib/antlr4/include/atn/LoopEndState.h | 22 - lib/antlr4/include/atn/NotSetTransition.h | 25 - lib/antlr4/include/atn/OrderedATNConfigSet.h | 20 - lib/antlr4/include/atn/ParseInfo.h | 102 -- lib/antlr4/include/atn/ParserATNSimulator.h | 904 ------------------ lib/antlr4/include/atn/PlusBlockStartState.h | 25 - lib/antlr4/include/atn/PlusLoopbackState.h | 22 - .../atn/PrecedencePredicateTransition.h | 29 - lib/antlr4/include/atn/PredicateEvalInfo.h | 62 -- lib/antlr4/include/atn/PredicateTransition.h | 39 - lib/antlr4/include/atn/PredictionContext.h | 254 ----- lib/antlr4/include/atn/PredictionMode.h | 436 --------- .../include/atn/ProfilingATNSimulator.h | 60 -- lib/antlr4/include/atn/RangeTransition.h | 29 - lib/antlr4/include/atn/RuleStartState.h | 25 - lib/antlr4/include/atn/RuleStopState.h | 25 - lib/antlr4/include/atn/RuleTransition.h | 40 - lib/antlr4/include/atn/SemanticContext.h | 222 ----- lib/antlr4/include/atn/SetTransition.h | 30 - .../include/atn/SingletonPredictionContext.h | 36 - lib/antlr4/include/atn/StarBlockStartState.h | 21 - lib/antlr4/include/atn/StarLoopEntryState.h | 35 - lib/antlr4/include/atn/StarLoopbackState.h | 21 - lib/antlr4/include/atn/TokensStartState.h | 21 - lib/antlr4/include/atn/Transition.h | 76 -- lib/antlr4/include/atn/WildcardTransition.h | 25 - lib/antlr4/include/dfa/DFA.h | 91 -- lib/antlr4/include/dfa/DFASerializer.h | 32 - lib/antlr4/include/dfa/DFAState.h | 144 --- lib/antlr4/include/dfa/LexerDFASerializer.h | 23 - .../include/misc/InterpreterDataReader.h | 31 - lib/antlr4/include/misc/Interval.h | 84 -- lib/antlr4/include/misc/IntervalSet.h | 198 ---- lib/antlr4/include/misc/MurmurHash.h | 76 -- lib/antlr4/include/misc/Predicate.h | 21 - lib/antlr4/include/support/Any.h | 170 ---- lib/antlr4/include/support/Arrays.h | 110 --- lib/antlr4/include/support/BitSet.h | 76 -- lib/antlr4/include/support/CPPUtils.h | 78 -- lib/antlr4/include/support/Declarations.h | 163 ---- lib/antlr4/include/support/StringUtils.h | 54 -- lib/antlr4/include/support/guid.h | 112 --- .../include/tree/AbstractParseTreeVisitor.h | 128 --- lib/antlr4/include/tree/ErrorNode.h | 19 - lib/antlr4/include/tree/ErrorNodeImpl.h | 33 - .../include/tree/IterativeParseTreeWalker.h | 53 - lib/antlr4/include/tree/ParseTree.h | 102 -- lib/antlr4/include/tree/ParseTreeListener.h | 39 - lib/antlr4/include/tree/ParseTreeProperty.h | 50 - lib/antlr4/include/tree/ParseTreeVisitor.h | 57 -- lib/antlr4/include/tree/ParseTreeWalker.h | 31 - lib/antlr4/include/tree/TerminalNode.h | 32 - lib/antlr4/include/tree/TerminalNodeImpl.h | 33 - lib/antlr4/include/tree/Trees.h | 78 -- lib/antlr4/include/tree/pattern/Chunk.h | 44 - .../include/tree/pattern/ParseTreeMatch.h | 132 --- .../include/tree/pattern/ParseTreePattern.h | 105 -- .../tree/pattern/ParseTreePatternMatcher.h | 185 ---- .../include/tree/pattern/RuleTagToken.h | 117 --- lib/antlr4/include/tree/pattern/TagChunk.h | 86 -- lib/antlr4/include/tree/pattern/TextChunk.h | 51 - .../include/tree/pattern/TokenTagToken.h | 80 -- lib/antlr4/include/tree/xpath/XPath.h | 86 -- lib/antlr4/include/tree/xpath/XPathElement.h | 40 - lib/antlr4/include/tree/xpath/XPathLexer.h | 56 -- .../tree/xpath/XPathLexerErrorListener.h | 22 - .../tree/xpath/XPathRuleAnywhereElement.h | 27 - .../include/tree/xpath/XPathRuleElement.h | 26 - .../tree/xpath/XPathTokenAnywhereElement.h | 25 - .../include/tree/xpath/XPathTokenElement.h | 26 - .../tree/xpath/XPathWildcardAnywhereElement.h | 23 - .../include/tree/xpath/XPathWildcardElement.h | 23 - lib/antlr4/lib/libantlr4-runtime.so.4.8 | Bin 1612832 -> 0 bytes lib/generated/bf.tokens | 21 - lib/generated/bfBaseListener.cpp | 7 - lib/generated/bfBaseListener.h | 47 - lib/generated/bfBaseVisitor.cpp | 7 - lib/generated/bfBaseVisitor.h | 48 - lib/generated/bfLexer.cpp | 168 ---- lib/generated/bfLexer.h | 57 -- lib/generated/bfLexer.tokens | 21 - lib/generated/bfListener.cpp | 7 - lib/generated/bfListener.h | 40 - lib/generated/bfParser.cpp | 687 ------------- lib/generated/bfParser.h | 181 ---- lib/generated/bfVisitor.cpp | 7 - lib/generated/bfVisitor.h | 38 - 172 files changed, 15255 deletions(-) delete mode 100644 lib/antlr4/include/ANTLRErrorListener.h delete mode 100644 lib/antlr4/include/ANTLRErrorStrategy.h delete mode 100644 lib/antlr4/include/ANTLRFileStream.h delete mode 100644 lib/antlr4/include/ANTLRInputStream.h delete mode 100644 lib/antlr4/include/BailErrorStrategy.h delete mode 100644 lib/antlr4/include/BaseErrorListener.h delete mode 100644 lib/antlr4/include/BufferedTokenStream.h delete mode 100644 lib/antlr4/include/CharStream.h delete mode 100644 lib/antlr4/include/CommonToken.h delete mode 100644 lib/antlr4/include/CommonTokenFactory.h delete mode 100644 lib/antlr4/include/CommonTokenStream.h delete mode 100644 lib/antlr4/include/ConsoleErrorListener.h delete mode 100644 lib/antlr4/include/DefaultErrorStrategy.h delete mode 100644 lib/antlr4/include/DiagnosticErrorListener.h delete mode 100644 lib/antlr4/include/Exceptions.h delete mode 100644 lib/antlr4/include/FailedPredicateException.h delete mode 100644 lib/antlr4/include/InputMismatchException.h delete mode 100644 lib/antlr4/include/IntStream.h delete mode 100644 lib/antlr4/include/InterpreterRuleContext.h delete mode 100644 lib/antlr4/include/Lexer.h delete mode 100644 lib/antlr4/include/LexerInterpreter.h delete mode 100644 lib/antlr4/include/LexerNoViableAltException.h delete mode 100644 lib/antlr4/include/ListTokenSource.h delete mode 100644 lib/antlr4/include/NoViableAltException.h delete mode 100644 lib/antlr4/include/Parser.h delete mode 100644 lib/antlr4/include/ParserInterpreter.h delete mode 100644 lib/antlr4/include/ParserRuleContext.h delete mode 100644 lib/antlr4/include/ProxyErrorListener.h delete mode 100644 lib/antlr4/include/RecognitionException.h delete mode 100644 lib/antlr4/include/Recognizer.h delete mode 100644 lib/antlr4/include/RuleContext.h delete mode 100644 lib/antlr4/include/RuleContextWithAltNum.h delete mode 100644 lib/antlr4/include/RuntimeMetaData.h delete mode 100644 lib/antlr4/include/Token.h delete mode 100644 lib/antlr4/include/TokenFactory.h delete mode 100644 lib/antlr4/include/TokenSource.h delete mode 100644 lib/antlr4/include/TokenStream.h delete mode 100644 lib/antlr4/include/TokenStreamRewriter.h delete mode 100644 lib/antlr4/include/UnbufferedCharStream.h delete mode 100644 lib/antlr4/include/UnbufferedTokenStream.h delete mode 100644 lib/antlr4/include/Vocabulary.h delete mode 100644 lib/antlr4/include/WritableToken.h delete mode 100644 lib/antlr4/include/antlr4-common.h delete mode 100644 lib/antlr4/include/antlr4-runtime.h delete mode 100644 lib/antlr4/include/atn/ATN.h delete mode 100644 lib/antlr4/include/atn/ATNConfig.h delete mode 100644 lib/antlr4/include/atn/ATNConfigSet.h delete mode 100644 lib/antlr4/include/atn/ATNDeserializationOptions.h delete mode 100644 lib/antlr4/include/atn/ATNDeserializer.h delete mode 100644 lib/antlr4/include/atn/ATNSerializer.h delete mode 100644 lib/antlr4/include/atn/ATNSimulator.h delete mode 100644 lib/antlr4/include/atn/ATNState.h delete mode 100644 lib/antlr4/include/atn/ATNType.h delete mode 100644 lib/antlr4/include/atn/AbstractPredicateTransition.h delete mode 100644 lib/antlr4/include/atn/ActionTransition.h delete mode 100644 lib/antlr4/include/atn/AmbiguityInfo.h delete mode 100644 lib/antlr4/include/atn/ArrayPredictionContext.h delete mode 100644 lib/antlr4/include/atn/AtomTransition.h delete mode 100644 lib/antlr4/include/atn/BasicBlockStartState.h delete mode 100644 lib/antlr4/include/atn/BasicState.h delete mode 100644 lib/antlr4/include/atn/BlockEndState.h delete mode 100644 lib/antlr4/include/atn/BlockStartState.h delete mode 100644 lib/antlr4/include/atn/ContextSensitivityInfo.h delete mode 100644 lib/antlr4/include/atn/DecisionEventInfo.h delete mode 100644 lib/antlr4/include/atn/DecisionInfo.h delete mode 100644 lib/antlr4/include/atn/DecisionState.h delete mode 100644 lib/antlr4/include/atn/EmptyPredictionContext.h delete mode 100644 lib/antlr4/include/atn/EpsilonTransition.h delete mode 100644 lib/antlr4/include/atn/ErrorInfo.h delete mode 100644 lib/antlr4/include/atn/LL1Analyzer.h delete mode 100644 lib/antlr4/include/atn/LexerATNConfig.h delete mode 100644 lib/antlr4/include/atn/LexerATNSimulator.h delete mode 100644 lib/antlr4/include/atn/LexerAction.h delete mode 100644 lib/antlr4/include/atn/LexerActionExecutor.h delete mode 100644 lib/antlr4/include/atn/LexerActionType.h delete mode 100644 lib/antlr4/include/atn/LexerChannelAction.h delete mode 100644 lib/antlr4/include/atn/LexerCustomAction.h delete mode 100644 lib/antlr4/include/atn/LexerIndexedCustomAction.h delete mode 100644 lib/antlr4/include/atn/LexerModeAction.h delete mode 100644 lib/antlr4/include/atn/LexerMoreAction.h delete mode 100644 lib/antlr4/include/atn/LexerPopModeAction.h delete mode 100644 lib/antlr4/include/atn/LexerPushModeAction.h delete mode 100644 lib/antlr4/include/atn/LexerSkipAction.h delete mode 100644 lib/antlr4/include/atn/LexerTypeAction.h delete mode 100644 lib/antlr4/include/atn/LookaheadEventInfo.h delete mode 100644 lib/antlr4/include/atn/LoopEndState.h delete mode 100644 lib/antlr4/include/atn/NotSetTransition.h delete mode 100644 lib/antlr4/include/atn/OrderedATNConfigSet.h delete mode 100644 lib/antlr4/include/atn/ParseInfo.h delete mode 100644 lib/antlr4/include/atn/ParserATNSimulator.h delete mode 100644 lib/antlr4/include/atn/PlusBlockStartState.h delete mode 100644 lib/antlr4/include/atn/PlusLoopbackState.h delete mode 100644 lib/antlr4/include/atn/PrecedencePredicateTransition.h delete mode 100644 lib/antlr4/include/atn/PredicateEvalInfo.h delete mode 100644 lib/antlr4/include/atn/PredicateTransition.h delete mode 100644 lib/antlr4/include/atn/PredictionContext.h delete mode 100644 lib/antlr4/include/atn/PredictionMode.h delete mode 100644 lib/antlr4/include/atn/ProfilingATNSimulator.h delete mode 100644 lib/antlr4/include/atn/RangeTransition.h delete mode 100644 lib/antlr4/include/atn/RuleStartState.h delete mode 100644 lib/antlr4/include/atn/RuleStopState.h delete mode 100644 lib/antlr4/include/atn/RuleTransition.h delete mode 100644 lib/antlr4/include/atn/SemanticContext.h delete mode 100644 lib/antlr4/include/atn/SetTransition.h delete mode 100644 lib/antlr4/include/atn/SingletonPredictionContext.h delete mode 100644 lib/antlr4/include/atn/StarBlockStartState.h delete mode 100644 lib/antlr4/include/atn/StarLoopEntryState.h delete mode 100644 lib/antlr4/include/atn/StarLoopbackState.h delete mode 100644 lib/antlr4/include/atn/TokensStartState.h delete mode 100644 lib/antlr4/include/atn/Transition.h delete mode 100644 lib/antlr4/include/atn/WildcardTransition.h delete mode 100644 lib/antlr4/include/dfa/DFA.h delete mode 100644 lib/antlr4/include/dfa/DFASerializer.h delete mode 100644 lib/antlr4/include/dfa/DFAState.h delete mode 100644 lib/antlr4/include/dfa/LexerDFASerializer.h delete mode 100644 lib/antlr4/include/misc/InterpreterDataReader.h delete mode 100644 lib/antlr4/include/misc/Interval.h delete mode 100644 lib/antlr4/include/misc/IntervalSet.h delete mode 100644 lib/antlr4/include/misc/MurmurHash.h delete mode 100644 lib/antlr4/include/misc/Predicate.h delete mode 100644 lib/antlr4/include/support/Any.h delete mode 100644 lib/antlr4/include/support/Arrays.h delete mode 100644 lib/antlr4/include/support/BitSet.h delete mode 100644 lib/antlr4/include/support/CPPUtils.h delete mode 100644 lib/antlr4/include/support/Declarations.h delete mode 100644 lib/antlr4/include/support/StringUtils.h delete mode 100644 lib/antlr4/include/support/guid.h delete mode 100644 lib/antlr4/include/tree/AbstractParseTreeVisitor.h delete mode 100644 lib/antlr4/include/tree/ErrorNode.h delete mode 100644 lib/antlr4/include/tree/ErrorNodeImpl.h delete mode 100644 lib/antlr4/include/tree/IterativeParseTreeWalker.h delete mode 100644 lib/antlr4/include/tree/ParseTree.h delete mode 100644 lib/antlr4/include/tree/ParseTreeListener.h delete mode 100644 lib/antlr4/include/tree/ParseTreeProperty.h delete mode 100644 lib/antlr4/include/tree/ParseTreeVisitor.h delete mode 100644 lib/antlr4/include/tree/ParseTreeWalker.h delete mode 100644 lib/antlr4/include/tree/TerminalNode.h delete mode 100644 lib/antlr4/include/tree/TerminalNodeImpl.h delete mode 100644 lib/antlr4/include/tree/Trees.h delete mode 100644 lib/antlr4/include/tree/pattern/Chunk.h delete mode 100644 lib/antlr4/include/tree/pattern/ParseTreeMatch.h delete mode 100644 lib/antlr4/include/tree/pattern/ParseTreePattern.h delete mode 100644 lib/antlr4/include/tree/pattern/ParseTreePatternMatcher.h delete mode 100644 lib/antlr4/include/tree/pattern/RuleTagToken.h delete mode 100644 lib/antlr4/include/tree/pattern/TagChunk.h delete mode 100644 lib/antlr4/include/tree/pattern/TextChunk.h delete mode 100644 lib/antlr4/include/tree/pattern/TokenTagToken.h delete mode 100644 lib/antlr4/include/tree/xpath/XPath.h delete mode 100644 lib/antlr4/include/tree/xpath/XPathElement.h delete mode 100644 lib/antlr4/include/tree/xpath/XPathLexer.h delete mode 100644 lib/antlr4/include/tree/xpath/XPathLexerErrorListener.h delete mode 100644 lib/antlr4/include/tree/xpath/XPathRuleAnywhereElement.h delete mode 100644 lib/antlr4/include/tree/xpath/XPathRuleElement.h delete mode 100644 lib/antlr4/include/tree/xpath/XPathTokenAnywhereElement.h delete mode 100644 lib/antlr4/include/tree/xpath/XPathTokenElement.h delete mode 100644 lib/antlr4/include/tree/xpath/XPathWildcardAnywhereElement.h delete mode 100644 lib/antlr4/include/tree/xpath/XPathWildcardElement.h delete mode 100755 lib/antlr4/lib/libantlr4-runtime.so.4.8 delete mode 100644 lib/generated/bf.tokens delete mode 100644 lib/generated/bfBaseListener.cpp delete mode 100644 lib/generated/bfBaseListener.h delete mode 100644 lib/generated/bfBaseVisitor.cpp delete mode 100644 lib/generated/bfBaseVisitor.h delete mode 100644 lib/generated/bfLexer.cpp delete mode 100644 lib/generated/bfLexer.h delete mode 100644 lib/generated/bfLexer.tokens delete mode 100644 lib/generated/bfListener.cpp delete mode 100644 lib/generated/bfListener.h delete mode 100644 lib/generated/bfParser.cpp delete mode 100644 lib/generated/bfParser.h delete mode 100644 lib/generated/bfVisitor.cpp delete mode 100644 lib/generated/bfVisitor.h diff --git a/lib/antlr4/include/ANTLRErrorListener.h b/lib/antlr4/include/ANTLRErrorListener.h deleted file mode 100644 index d6efad1..0000000 --- a/lib/antlr4/include/ANTLRErrorListener.h +++ /dev/null @@ -1,167 +0,0 @@ -/* 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 "RecognitionException.h" - -namespace antlrcpp { - class BitSet; -} - -namespace antlr4 { - - /// How to emit recognition errors (an interface in Java). - class ANTLR4CPP_PUBLIC ANTLRErrorListener { - public: - virtual ~ANTLRErrorListener(); - - /// - /// Upon syntax error, notify any interested parties. This is not how to - /// recover from errors or compute error messages. - /// specifies how to recover from syntax errors and how to compute error - /// messages. This listener's job is simply to emit a computed message, - /// though it has enough information to create its own message in many cases. - ///

- /// The is non-null for all syntax errors except - /// when we discover mismatched token errors that we can recover from - /// in-line, without returning from the surrounding rule (via the single - /// token insertion and deletion mechanism). - ///

- /// - /// What parser got the error. From this - /// object, you can access the context as well - /// as the input stream. - /// - /// The offending token in the input token - /// stream, unless recognizer is a lexer (then it's null). If - /// no viable alternative error, {@code e} has token at which we - /// started production for the decision. - /// - /// The line number in the input where the error occurred. - /// - /// The character position within that line where the error occurred. - /// - /// The message to emit. - /// - /// The exception generated by the parser that led to - /// the reporting of an error. It is null in the case where - /// the parser was able to recover in line without exiting the - /// surrounding rule. - virtual void syntaxError(Recognizer *recognizer, Token *offendingSymbol, size_t line, - size_t charPositionInLine, const std::string &msg, std::exception_ptr e) = 0; - - /** - * This method is called by the parser when a full-context prediction - * results in an ambiguity. - * - *

Each full-context prediction which does not result in a syntax error - * will call either {@link #reportContextSensitivity} or - * {@link #reportAmbiguity}.

- * - *

When {@code ambigAlts} is not null, it contains the set of potentially - * viable alternatives identified by the prediction algorithm. When - * {@code ambigAlts} is null, use {@link ATNConfigSet#getAlts} to obtain the - * represented alternatives from the {@code configs} argument.

- * - *

When {@code exact} is {@code true}, all of the potentially - * viable alternatives are truly viable, i.e. this is reporting an exact - * ambiguity. When {@code exact} is {@code false}, at least two of - * the potentially viable alternatives are viable for the current input, but - * the prediction algorithm terminated as soon as it determined that at - * least the minimum potentially viable alternative is truly - * viable.

- * - *

When the {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} prediction - * mode is used, the parser is required to identify exact ambiguities so - * {@code exact} will always be {@code true}.

- * - *

This method is not used by lexers.

- * - * @param recognizer the parser instance - * @param dfa the DFA for the current decision - * @param startIndex the input index where the decision started - * @param stopIndex the input input where the ambiguity was identified - * @param exact {@code true} if the ambiguity is exactly known, otherwise - * {@code false}. This is always {@code true} when - * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} is used. - * @param ambigAlts the potentially ambiguous alternatives, or {@code null} - * to indicate that the potentially ambiguous alternatives are the complete - * set of represented alternatives in {@code configs} - * @param configs the ATN configuration set where the ambiguity was - * identified - */ - virtual void reportAmbiguity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, bool exact, - const antlrcpp::BitSet &ambigAlts, atn::ATNConfigSet *configs) = 0; - - /** - * This method is called when an SLL conflict occurs and the parser is about - * to use the full context information to make an LL decision. - * - *

If one or more configurations in {@code configs} contains a semantic - * predicate, the predicates are evaluated before this method is called. The - * subset of alternatives which are still viable after predicates are - * evaluated is reported in {@code conflictingAlts}.

- * - *

This method is not used by lexers.

- * - * @param recognizer the parser instance - * @param dfa the DFA for the current decision - * @param startIndex the input index where the decision started - * @param stopIndex the input index where the SLL conflict occurred - * @param conflictingAlts The specific conflicting alternatives. If this is - * {@code null}, the conflicting alternatives are all alternatives - * represented in {@code configs}. At the moment, conflictingAlts is non-null - * (for the reference implementation, but Sam's optimized version can see this - * as null). - * @param configs the ATN configuration set where the SLL conflict was - * detected - */ - virtual void reportAttemptingFullContext(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, - const antlrcpp::BitSet &conflictingAlts, atn::ATNConfigSet *configs) = 0; - - /** - * This method is called by the parser when a full-context prediction has a - * unique result. - * - *

Each full-context prediction which does not result in a syntax error - * will call either {@link #reportContextSensitivity} or - * {@link #reportAmbiguity}.

- * - *

For prediction implementations that only evaluate full-context - * predictions when an SLL conflict is found (including the default - * {@link ParserATNSimulator} implementation), this method reports cases - * where SLL conflicts were resolved to unique full-context predictions, - * i.e. the decision was context-sensitive. This report does not necessarily - * indicate a problem, and it may appear even in completely unambiguous - * grammars.

- * - *

{@code configs} may have more than one represented alternative if the - * full-context prediction algorithm does not evaluate predicates before - * beginning the full-context prediction. In all cases, the final prediction - * is passed as the {@code prediction} argument.

- * - *

Note that the definition of "context sensitivity" in this method - * differs from the concept in {@link DecisionInfo#contextSensitivities}. - * This method reports all instances where an SLL conflict occurred but LL - * parsing produced a unique result, whether or not that unique result - * matches the minimum alternative in the SLL conflicting set.

- * - *

This method is not used by lexers.

- * - * @param recognizer the parser instance - * @param dfa the DFA for the current decision - * @param startIndex the input index where the decision started - * @param stopIndex the input index where the context sensitivity was - * finally determined - * @param prediction the unambiguous result of the full-context prediction - * @param configs the ATN configuration set where the unambiguous prediction - * was determined - */ - virtual void reportContextSensitivity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, - size_t prediction, atn::ATNConfigSet *configs) = 0; - }; - -} // namespace antlr4 diff --git a/lib/antlr4/include/ANTLRErrorStrategy.h b/lib/antlr4/include/ANTLRErrorStrategy.h deleted file mode 100644 index a3eecd1..0000000 --- a/lib/antlr4/include/ANTLRErrorStrategy.h +++ /dev/null @@ -1,121 +0,0 @@ -/* 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 "Token.h" - -namespace antlr4 { - - /// - /// The interface for defining strategies to deal with syntax errors encountered - /// during a parse by ANTLR-generated parsers. We distinguish between three - /// different kinds of errors: - /// - /// - /// - /// Implementations of this interface report syntax errors by calling - /// . - ///

- /// TODO: what to do about lexers - ///

- class ANTLR4CPP_PUBLIC ANTLRErrorStrategy { - public: - - /// - /// Reset the error handler state for the specified {@code recognizer}. - /// the parser instance - virtual ~ANTLRErrorStrategy(); - - virtual void reset(Parser *recognizer) = 0; - - /** - * This method is called when an unexpected symbol is encountered during an - * inline match operation, such as {@link Parser#match}. If the error - * strategy successfully recovers from the match failure, this method - * returns the {@link Token} instance which should be treated as the - * successful result of the match. - * - *

This method handles the consumption of any tokens - the caller should - * not call {@link Parser#consume} after a successful recovery.

- * - *

Note that the calling code will not report an error if this method - * returns successfully. The error strategy implementation is responsible - * for calling {@link Parser#notifyErrorListeners} as appropriate.

- * - * @param recognizer the parser instance - * @throws RecognitionException if the error strategy was not able to - * recover from the unexpected input symbol - */ - virtual Token* recoverInline(Parser *recognizer) = 0; - - /// - /// This method is called to recover from exception {@code e}. This method is - /// called after by the default exception handler - /// generated for a rule method. - /// - /// - /// the parser instance - /// the recognition exception to recover from - /// if the error strategy could not recover from - /// the recognition exception - virtual void recover(Parser *recognizer, std::exception_ptr e) = 0; - - /// - /// This method provides the error handler with an opportunity to handle - /// syntactic or semantic errors in the input stream before they result in a - /// . - ///

- /// The generated code currently contains calls to after - /// entering the decision state of a closure block ({@code (...)*} or - /// {@code (...)+}). - ///

- /// For an implementation based on Jim Idle's "magic sync" mechanism, see - /// . - ///

- /// - /// the parser instance - /// if an error is detected by the error - /// strategy but cannot be automatically recovered at the current state in - /// the parsing process - virtual void sync(Parser *recognizer) = 0; - - /// - /// Tests whether or not {@code recognizer} is in the process of recovering - /// from an error. In error recovery mode, adds - /// symbols to the parse tree by calling - /// {@link Parser#createErrorNode(ParserRuleContext, Token)} then - /// {@link ParserRuleContext#addErrorNode(ErrorNode)} instead of - /// {@link Parser#createTerminalNode(ParserRuleContext, Token)}. - /// - /// the parser instance - /// {@code true} if the parser is currently recovering from a parse - /// error, otherwise {@code false} - virtual bool inErrorRecoveryMode(Parser *recognizer) = 0; - - /// - /// This method is called by when the parser successfully matches an input - /// symbol. - /// - /// the parser instance - virtual void reportMatch(Parser *recognizer) = 0; - - /// - /// Report any kind of . This method is called by - /// the default exception handler generated for a rule method. - /// - /// the parser instance - /// the recognition exception to report - virtual void reportError(Parser *recognizer, const RecognitionException &e) = 0; - }; - -} // namespace antlr4 diff --git a/lib/antlr4/include/ANTLRFileStream.h b/lib/antlr4/include/ANTLRFileStream.h deleted file mode 100644 index 10c8550..0000000 --- a/lib/antlr4/include/ANTLRFileStream.h +++ /dev/null @@ -1,27 +0,0 @@ -/* 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 "ANTLRInputStream.h" - -namespace antlr4 { - - /// This is an ANTLRInputStream that is loaded from a file all at once - /// when you construct the object (or call load()). - // TODO: this class needs testing. - class ANTLR4CPP_PUBLIC ANTLRFileStream : public ANTLRInputStream { - protected: - std::string _fileName; // UTF-8 encoded file name. - - public: - // Assumes a file name encoded in UTF-8 and file content in the same encoding (with or w/o BOM). - ANTLRFileStream(const std::string &fileName); - - virtual void loadFromFile(const std::string &fileName); - virtual std::string getSourceName() const override; - }; - -} // namespace antlr4 diff --git a/lib/antlr4/include/ANTLRInputStream.h b/lib/antlr4/include/ANTLRInputStream.h deleted file mode 100644 index e985050..0000000 --- a/lib/antlr4/include/ANTLRInputStream.h +++ /dev/null @@ -1,69 +0,0 @@ -/* 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 "CharStream.h" - -namespace antlr4 { - - // Vacuum all input from a stream and then treat it - // like a string. Can also pass in a string or char[] to use. - // Input is expected to be encoded in UTF-8 and converted to UTF-32 internally. - class ANTLR4CPP_PUBLIC ANTLRInputStream : public CharStream { - protected: - /// The data being scanned. - // UTF-32 - UTF32String _data; - - /// 0..n-1 index into string of next char - size_t p; - - public: - /// What is name or source of this char stream? - std::string name; - - ANTLRInputStream(const std::string &input = ""); - ANTLRInputStream(const char data_[], size_t numberOfActualCharsInArray); - ANTLRInputStream(std::istream &stream); - - virtual void load(const std::string &input); - virtual void load(std::istream &stream); - - /// Reset the stream so that it's in the same state it was - /// when the object was created *except* the data array is not - /// touched. - virtual void reset(); - virtual void consume() override; - virtual size_t LA(ssize_t i) override; - virtual size_t LT(ssize_t i); - - /// - /// Return the current input symbol index 0..n where n indicates the - /// last symbol has been read. The index is the index of char to - /// be returned from LA(1). - /// - virtual size_t index() override; - virtual size_t size() override; - - /// - /// mark/release do nothing; we have entire buffer - virtual ssize_t mark() override; - virtual void release(ssize_t marker) override; - - /// - /// consume() ahead until p==index; can't just set p=index as we must - /// update line and charPositionInLine. If we seek backwards, just set p - /// - virtual void seek(size_t index) override; - virtual std::string getText(const misc::Interval &interval) override; - virtual std::string getSourceName() const override; - virtual std::string toString() const override; - - private: - void InitializeInstanceFields(); - }; - -} // namespace antlr4 diff --git a/lib/antlr4/include/BailErrorStrategy.h b/lib/antlr4/include/BailErrorStrategy.h deleted file mode 100644 index 2a8c36f..0000000 --- a/lib/antlr4/include/BailErrorStrategy.h +++ /dev/null @@ -1,59 +0,0 @@ -/* 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 "DefaultErrorStrategy.h" - -namespace antlr4 { - - /** - * This implementation of {@link ANTLRErrorStrategy} responds to syntax errors - * by immediately canceling the parse operation with a - * {@link ParseCancellationException}. The implementation ensures that the - * {@link ParserRuleContext#exception} field is set for all parse tree nodes - * that were not completed prior to encountering the error. - * - *

- * This error strategy is useful in the following scenarios.

- * - *
    - *
  • Two-stage parsing: This error strategy allows the first - * stage of two-stage parsing to immediately terminate if an error is - * encountered, and immediately fall back to the second stage. In addition to - * avoiding wasted work by attempting to recover from errors here, the empty - * implementation of {@link BailErrorStrategy#sync} improves the performance of - * the first stage.
  • - *
  • Silent validation: When syntax errors are not being - * reported or logged, and the parse result is simply ignored if errors occur, - * the {@link BailErrorStrategy} avoids wasting work on recovering from errors - * when the result will be ignored either way.
  • - *
- * - *

- * {@code myparser.setErrorHandler(new BailErrorStrategy());}

- * - * @see Parser#setErrorHandler(ANTLRErrorStrategy) - */ - class ANTLR4CPP_PUBLIC BailErrorStrategy : public DefaultErrorStrategy { - /// - /// Instead of recovering from exception {@code e}, re-throw it wrapped - /// in a so it is not caught by the - /// rule function catches. Use to get the - /// original . - /// - public: - virtual void recover(Parser *recognizer, std::exception_ptr e) override; - - /// Make sure we don't attempt to recover inline; if the parser - /// successfully recovers, it won't throw an exception. - virtual Token* recoverInline(Parser *recognizer) override; - - /// - /// Make sure we don't attempt to recover from problems in subrules. - virtual void sync(Parser *recognizer) override; - }; - -} // namespace antlr4 diff --git a/lib/antlr4/include/BaseErrorListener.h b/lib/antlr4/include/BaseErrorListener.h deleted file mode 100644 index aad2e5d..0000000 --- a/lib/antlr4/include/BaseErrorListener.h +++ /dev/null @@ -1,36 +0,0 @@ -/* 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 "ANTLRErrorListener.h" - -namespace antlrcpp { - class BitSet; -} - -namespace antlr4 { - - /** - * Provides an empty default implementation of {@link ANTLRErrorListener}. The - * default implementation of each method does nothing, but can be overridden as - * necessary. - */ - class ANTLR4CPP_PUBLIC BaseErrorListener : public ANTLRErrorListener { - - virtual void syntaxError(Recognizer *recognizer, Token * offendingSymbol, size_t line, size_t charPositionInLine, - const std::string &msg, std::exception_ptr e) override; - - virtual void reportAmbiguity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, bool exact, - const antlrcpp::BitSet &ambigAlts, atn::ATNConfigSet *configs) override; - - virtual void reportAttemptingFullContext(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, - const antlrcpp::BitSet &conflictingAlts, atn::ATNConfigSet *configs) override; - - virtual void reportContextSensitivity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, - size_t prediction, atn::ATNConfigSet *configs) override; - }; - -} // namespace antlr4 diff --git a/lib/antlr4/include/BufferedTokenStream.h b/lib/antlr4/include/BufferedTokenStream.h deleted file mode 100644 index fab74d2..0000000 --- a/lib/antlr4/include/BufferedTokenStream.h +++ /dev/null @@ -1,200 +0,0 @@ -/* 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 "TokenStream.h" - -namespace antlr4 { - - /** - * This implementation of {@link TokenStream} loads tokens from a - * {@link TokenSource} on-demand, and places the tokens in a buffer to provide - * access to any previous token by index. - * - *

- * This token stream ignores the value of {@link Token#getChannel}. If your - * parser requires the token stream filter tokens to only those on a particular - * channel, such as {@link Token#DEFAULT_CHANNEL} or - * {@link Token#HIDDEN_CHANNEL}, use a filtering token stream such a - * {@link CommonTokenStream}.

- */ - class ANTLR4CPP_PUBLIC BufferedTokenStream : public TokenStream { - public: - BufferedTokenStream(TokenSource *tokenSource); - BufferedTokenStream(const BufferedTokenStream& other) = delete; - - BufferedTokenStream& operator = (const BufferedTokenStream& other) = delete; - - virtual TokenSource* getTokenSource() const override; - virtual size_t index() override; - virtual ssize_t mark() override; - - virtual void release(ssize_t marker) override; - virtual void reset(); - virtual void seek(size_t index) override; - - virtual size_t size() override; - virtual void consume() override; - - virtual Token* get(size_t i) const override; - - /// Get all tokens from start..stop inclusively. - virtual std::vector get(size_t start, size_t stop); - - virtual size_t LA(ssize_t i) override; - virtual Token* LT(ssize_t k) override; - - /// Reset this token stream by setting its token source. - virtual void setTokenSource(TokenSource *tokenSource); - virtual std::vector getTokens(); - virtual std::vector getTokens(size_t start, size_t stop); - - /// - /// Given a start and stop index, return a List of all tokens in - /// the token type BitSet. Return null if no tokens were found. This - /// method looks at both on and off channel tokens. - /// - virtual std::vector getTokens(size_t start, size_t stop, const std::vector &types); - virtual std::vector getTokens(size_t start, size_t stop, size_t ttype); - - /// Collect all tokens on specified channel to the right of - /// the current token up until we see a token on DEFAULT_TOKEN_CHANNEL or - /// EOF. If channel is -1, find any non default channel token. - virtual std::vector getHiddenTokensToRight(size_t tokenIndex, ssize_t channel); - - /// - /// Collect all hidden tokens (any off-default channel) to the right of - /// the current token up until we see a token on DEFAULT_TOKEN_CHANNEL - /// or EOF. - /// - virtual std::vector getHiddenTokensToRight(size_t tokenIndex); - - /// - /// Collect all tokens on specified channel to the left of - /// the current token up until we see a token on DEFAULT_TOKEN_CHANNEL. - /// If channel is -1, find any non default channel token. - /// - virtual std::vector getHiddenTokensToLeft(size_t tokenIndex, ssize_t channel); - - /// - /// Collect all hidden tokens (any off-default channel) to the left of - /// the current token up until we see a token on DEFAULT_TOKEN_CHANNEL. - /// - virtual std::vector getHiddenTokensToLeft(size_t tokenIndex); - - virtual std::string getSourceName() const override; - virtual std::string getText() override; - virtual std::string getText(const misc::Interval &interval) override; - virtual std::string getText(RuleContext *ctx) override; - virtual std::string getText(Token *start, Token *stop) override; - - /// Get all tokens from lexer until EOF. - virtual void fill(); - - protected: - /** - * The {@link TokenSource} from which tokens for this stream are fetched. - */ - TokenSource *_tokenSource; - - /** - * A collection of all tokens fetched from the token source. The list is - * considered a complete view of the input once {@link #fetchedEOF} is set - * to {@code true}. - */ - std::vector> _tokens; - - /** - * The index into {@link #tokens} of the current token (next token to - * {@link #consume}). {@link #tokens}{@code [}{@link #p}{@code ]} should be - * {@link #LT LT(1)}. - * - *

This field is set to -1 when the stream is first constructed or when - * {@link #setTokenSource} is called, indicating that the first token has - * not yet been fetched from the token source. For additional information, - * see the documentation of {@link IntStream} for a description of - * Initializing Methods.

- */ - // ml: since -1 requires to make this member signed for just this single aspect we use a member _needSetup instead. - // Use bool isInitialized() to find out if this stream has started reading. - size_t _p; - - /** - * Indicates whether the {@link Token#EOF} token has been fetched from - * {@link #tokenSource} and added to {@link #tokens}. This field improves - * performance for the following cases: - * - *