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 */
19interface 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    public function reportAmbiguity(
31        Parser $recognizer,
32        DFA $dfa,
33        int $startIndex,
34        int $stopIndex,
35        bool $exact,
36        ?BitSet $ambigAlts,
37        ATNConfigSet $configs
38    ) : void;
39
40    public function reportAttemptingFullContext(
41        Parser $recognizer,
42        DFA $dfa,
43        int $startIndex,
44        int $stopIndex,
45        ?BitSet $conflictingAlts,
46        ATNConfigSet $configs
47    ) : void;
48
49    public function reportContextSensitivity(
50        Parser $recognizer,
51        DFA $dfa,
52        int $startIndex,
53        int $stopIndex,
54        int $prediction,
55        ATNConfigSet $configs
56    ) : void;
57}
58