1 | <?php |
||
24 | class Generator |
||
25 | { |
||
26 | /** |
||
27 | * @var Parser |
||
28 | */ |
||
29 | protected $parser; |
||
30 | |||
31 | /** |
||
32 | * @var Lalr |
||
33 | */ |
||
34 | protected $lalr; |
||
35 | |||
36 | /** |
||
37 | * @var Compress |
||
38 | */ |
||
39 | protected $compressor; |
||
40 | |||
41 | /** |
||
42 | * Generator constructor. |
||
43 | * |
||
44 | * @param Parser|null $parser |
||
45 | * @param Lalr|null $lalr |
||
46 | * @param Compress|null $compressor |
||
47 | */ |
||
48 | public function __construct(Parser $parser = null, Lalr $lalr = null, Compress $compressor = null) |
||
54 | |||
55 | /** |
||
56 | * @param Context $context |
||
57 | * @param string $grammar |
||
58 | * @param string $template |
||
59 | * @param string $resultFile |
||
60 | * |
||
61 | * @throws Exception\LexingException |
||
62 | * @throws Exception\LogicException |
||
63 | * @throws Exception\ParseException |
||
64 | * @throws Exception\TemplateException |
||
65 | * |
||
66 | * @return void |
||
67 | */ |
||
68 | public function generate(Context $context, string $grammar, string $template, string $resultFile) |
||
78 | } |
||
79 |