1 | <?php |
||
25 | class Reader |
||
26 | { |
||
27 | /** |
||
28 | * @var Readable |
||
29 | */ |
||
30 | private $file; |
||
31 | |||
32 | /** |
||
33 | * @var ParserInterface |
||
34 | */ |
||
35 | private $pp; |
||
36 | |||
37 | /** |
||
38 | * @var LexerInterface |
||
39 | */ |
||
40 | private $lexer; |
||
41 | |||
42 | /** |
||
43 | * @var GrammarInterface |
||
44 | */ |
||
45 | private $grammar; |
||
46 | |||
47 | /** |
||
48 | * Reader constructor. |
||
49 | * @param Readable $file |
||
50 | */ |
||
51 | public function __construct(Readable $file) |
||
60 | |||
61 | /** |
||
62 | * @return void |
||
63 | */ |
||
64 | private function boot(): void |
||
72 | |||
73 | /** |
||
74 | * @return ParserInterface |
||
75 | * @throws \Railt\Io\Exception\ExternalFileException |
||
76 | * @throws \Railt\Io\Exception\NotReadableException |
||
77 | */ |
||
78 | public function getParser(): ParserInterface |
||
84 | |||
85 | /** |
||
86 | * @param Readable $file |
||
87 | * @throws \Railt\Io\Exception\ExternalFileException |
||
88 | * @throws \Railt\Io\Exception\NotReadableException |
||
89 | */ |
||
90 | private function addGrammar(Readable $file): void |
||
102 | } |
||
103 |