1 | <?php |
||
11 | class SyntaxAnalyzer |
||
12 | { |
||
13 | /** @var \Wandu\Compiler\LexicalAnalyzer */ |
||
14 | protected $lexer; |
||
15 | |||
16 | protected $tokens = []; |
||
17 | |||
18 | protected $syntaxes; |
||
19 | |||
20 | /** |
||
21 | * @param \Wandu\Compiler\LexicalAnalyzer $lexer |
||
22 | */ |
||
23 | public function __construct(LexicalAnalyzer $lexer) |
||
27 | |||
28 | public function setTokens(array $tokens) // Nonterminal |
||
32 | |||
33 | /** |
||
34 | * @param $nonTermName |
||
35 | * @param array $tokens |
||
36 | * @param \Closure $handler |
||
37 | * @return self |
||
38 | */ |
||
39 | public function addSyntax($nonTermName, array $tokens, Closure $handler) |
||
44 | |||
45 | public function analyze($context) |
||
74 | } |
||
75 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.