classSymbolEntry
final class SymbolEntry
Public API: explicitly declared with
@visibility public.One symbol of a %token, %nterm, %type or precedence declaration, with what was declared about it.
$file = (new \BisonParser\Parser())->parse("%token <str> IDENT 258 \"identifier\" NUM\n%%\ns: NUM;\n");
$entries = $file->declarations[0]->entries;
[$entries[0]->tag, $entries[0]->number, $entries[0]->alias?->text] // => ['str', 258, 'identifier']
[$entries[1]->tag, $entries[1]->number, $entries[1]->alias] // => ['str', null, null]Properties§
public Symbol $symbolpublic string|null $tagpublic int|null $numberpublic Alias|null $aliasMethods§
Test cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 15
TreeDumpercallsPrecedenceDeclarationTest::testLocationcallsSymbolDeclarationTest::testLocationcallsBisonGrammarCompilerTestcallsBisonGrammarReaderTestcallsParserTestcallsDeclarationPrinterTest::testEntriescallsDeclarationPrinterTest::testPrintcallsDeclarationParserTest::testDirectiveReadsNtermAsNonterminalscallsSymbolListParserTest::testEntriescallsSymbolListParserTest::testEntriesPassOverALineBetweenEntriescallsSymbolListParserTest::testNtermDeclarationscallsSymbolListParserTest::testPrecedenceDeclarationscallsSymbolListParserTest::testTokenDeclarationscallsSymbolListParserTest::testTypeDeclarationscalls