1 | <?php |
||
22 | class Grammar |
||
23 | { |
||
24 | private const STATE_CONFIGURE = 0x00; |
||
25 | private const STATE_TOKEN = 0x01; |
||
26 | private const STATE_PRODUCTIONS = 0x02; |
||
27 | |||
28 | /** |
||
29 | * @var array|ResolverInterface[] |
||
30 | */ |
||
31 | private $resolvers; |
||
32 | |||
33 | /** |
||
34 | * Parser constructor. |
||
35 | */ |
||
36 | public function __construct() |
||
44 | |||
45 | /** |
||
46 | * @param Readable $file |
||
47 | * @param TokenInterface $token |
||
48 | */ |
||
49 | public function process(Readable $file, TokenInterface $token): void |
||
53 | |||
54 | /** |
||
55 | * @param TokenInterface $token |
||
56 | * @return int |
||
57 | */ |
||
58 | private function getState(TokenInterface $token): int |
||
70 | |||
71 | /** |
||
72 | * @return Result |
||
73 | */ |
||
74 | public function getResult(): Result |
||
78 | } |
||
79 |