1 | <?php |
||
22 | class Result |
||
23 | { |
||
24 | /** |
||
25 | * @var Analyzer\Analyzer[] |
||
26 | */ |
||
27 | private const RULE_ANALYZERS = [ |
||
28 | GrammarAnalyzer::class |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * @var PragmaResolver |
||
33 | */ |
||
34 | private $pragmas; |
||
35 | |||
36 | /** |
||
37 | * @var TokenResolver |
||
38 | */ |
||
39 | private $tokens; |
||
40 | |||
41 | /** |
||
42 | * @var RuleResolver |
||
43 | */ |
||
44 | private $rules; |
||
45 | |||
46 | /** |
||
47 | * Result constructor. |
||
48 | * @param PragmaResolver $pragmas |
||
49 | * @param TokenResolver $tokens |
||
50 | * @param RuleResolver $rules |
||
51 | */ |
||
52 | public function __construct(PragmaResolver $pragmas, TokenResolver $tokens, RuleResolver $rules) |
||
58 | |||
59 | /** |
||
60 | * @return TokenResolver |
||
61 | */ |
||
62 | public function tokensResolver(): TokenResolver |
||
66 | |||
67 | /** |
||
68 | * @return RuleResolver |
||
69 | */ |
||
70 | public function rulesResolver(): RuleResolver |
||
74 | |||
75 | /** |
||
76 | * @return PragmaResolver |
||
77 | */ |
||
78 | public function pragmasResolver(): PragmaResolver |
||
82 | |||
83 | /** |
||
84 | * @return Runtime |
||
85 | */ |
||
86 | public function getRuntime(): Runtime |
||
90 | |||
91 | /** |
||
92 | * @return ParserInterface |
||
93 | * @throws \InvalidArgumentException |
||
94 | */ |
||
95 | public function getParser(): ParserInterface |
||
99 | |||
100 | /** |
||
101 | * @return LexerInterface |
||
102 | */ |
||
103 | public function getLexer(): LexerInterface |
||
107 | } |
||
108 |