1<?php 2 3declare(strict_types=1); 4 5namespace Antlr\Antlr4\Runtime\Error\Listeners; 6 7use Antlr\Antlr4\Runtime\Atn\ATNConfigSet; 8use Antlr\Antlr4\Runtime\Dfa\DFA; 9use Antlr\Antlr4\Runtime\Error\Exceptions\RecognitionException; 10use Antlr\Antlr4\Runtime\Parser; 11use Antlr\Antlr4\Runtime\Recognizer; 12use Antlr\Antlr4\Runtime\Utils\BitSet; 13 14/** 15 * Provides an empty default implementation of {@see ANTLRErrorListener}. 16 * The default implementation of each method does nothing, but can be 17 * overridden as necessary. 18 */ 19class BaseErrorListener implements ANTLRErrorListener 20{ 21 public function syntaxError( 22 Recognizer $recognizer, 23 ?object $offendingSymbol, 24 int $line, 25 int $charPositionInLine, 26 string $msg, 27 ?RecognitionException $e 28 ) : void { 29 } 30 31 public function reportAmbiguity( 32 Parser $recognizer, 33 DFA $dfa, 34 int $startIndex, 35 int $stopIndex, 36 bool $exact, 37 ?BitSet $ambigAlts, 38 ATNConfigSet $configs 39 ) : void { 40 } 41 42 public function reportAttemptingFullContext( 43 Parser $recognizer, 44 DFA $dfa, 45 int $startIndex, 46 int $stopIndex, 47 ?BitSet $conflictingAlts, 48 ATNConfigSet $configs 49 ) : void { 50 } 51 52 public function reportContextSensitivity( 53 Parser $recognizer, 54 DFA $dfa, 55 int $startIndex, 56 int $stopIndex, 57 int $prediction, 58 ATNConfigSet $configs 59 ) : void { 60 } 61} 62