classBisonTokenStream
final class BisonTokenStream
Adds lookahead to a Bison lexer.
A recursive-descent parser has to decide what it is reading before it commits to reading it, which means looking at tokens it does not want to consume yet. Buffering those here keeps the lexer a plain forward scan: nothing in it has to know that a token may be read twice.
Methods§
public function __construct(BisonLexer $lexer)Parameters
$lexer | BisonLexer | Source of tokens |
Test cases 101
BisonTokenStreamTest::testConsumeRemainingDiscardsBufferedLookaheadcoversBisonTokenStreamTest::testConsumeRemainingTakesEverythingAfterTheTokensAlreadyReadcoversBisonTokenStreamTest::testNextActioncoversBisonTokenStreamTest::testNextActionDeeplyNestedcoversBisonTokenStreamTest::testNextActionEmptycoversBisonTokenStreamTest::testNextActionNestedcoversBisonTokenStreamTest::testNextActionUnterminatedcoversBisonTokenStreamTest::testNextActionWithBlockCommentcoversBisonTokenStreamTest::testNextActionWithCharLiteralContainingBracecoversBisonTokenStreamTest::testNextActionWithLineCommentcoversBisonTokenStreamTest::testNextActionWithStringContainingBracecoversBisonTokenStreamTest::testNextActionWithUnterminatedStringcoversBisonTokenStreamTest::testNextActionWithWhitespaceOnlycoversBisonTokenStreamTest::testNextCharLiteralcoversBisonTokenStreamTest::testNextCharLiteralEmptycoversBisonTokenStreamTest::testNextCharLiteralUnterminatedcoversBisonTokenStreamTest::testNextCharLiteralWithEscapecoversBisonTokenStreamTest::testNextColoncoversBisonTokenStreamTest::testNextCompleteGrammarFragmentcoversBisonTokenStreamTest::testNextDirectivecoversBisonTokenStreamTest::testNextDirectiveWithDotscoversBisonTokenStreamTest::testNextDirectiveWithHyphencoversBisonTokenStreamTest::testNextDirectiveWithNumberscoversBisonTokenStreamTest::testNextIdentifiercoversBisonTokenStreamTest::testNextIdentifierSingleCharcoversBisonTokenStreamTest::testNextIdentifierUpperCasecoversBisonTokenStreamTest::testNextIdentifierWithDigitscoversBisonTokenStreamTest::testNextIdentifierWithDotscoversBisonTokenStreamTest::testNextIdentifierWithUnderscorecoversBisonTokenStreamTest::testNextIfAcceptsAnyOfSeveralKindscoversBisonTokenStreamTest::testNextIfAcceptsNothingWhenNoKindIsGivencoversBisonTokenStreamTest::testNextIfConsumesATokenOfAnAcceptedKindcoversBisonTokenStreamTest::testNextIfLeavesTheStreamUnmovedWhenTheKindDoesNotMatchcoversBisonTokenStreamTest::testNextIntReadsANonNumericTokenAsZerocoversBisonTokenStreamTest::testNextIntReadsANumericTokenAsAnIntegercoversBisonTokenStreamTest::testNextMultipleTokenscoversBisonTokenStreamTest::testNextNumbercoversBisonTokenStreamTest::testNextNumberSingleDigitcoversBisonTokenStreamTest::testNextNumberZerocoversBisonTokenStreamTest::testNextPercentPercentcoversBisonTokenStreamTest::testNextPipecoversBisonTokenStreamTest::testNextProloguecoversBisonTokenStreamTest::testNextPrologueEmptycoversBisonTokenStreamTest::testNextPrologueUnterminatedcoversBisonTokenStreamTest::testNextPrologueWithWhitespaceOnlycoversBisonTokenStreamTest::testNextReturnsEofAfterEofcoversBisonTokenStreamTest::testNextReturnsEofForEmptyInputcoversBisonTokenStreamTest::testNextReturnsEofForWhitespaceOnlyInputcoversBisonTokenStreamTest::testNextReturnsTokenFromBuffercoversBisonTokenStreamTest::testNextSemicoloncoversBisonTokenStreamTest::testNextSkipsBlockCommentcoversBisonTokenStreamTest::testNextSkipsBlockCommentMultilinecoversBisonTokenStreamTest::testNextSkipsBlockCommentUnterminatedcoversBisonTokenStreamTest::testNextSkipsConsecutiveBlockCommentscoversBisonTokenStreamTest::testNextSkipsConsecutiveLineCommentscoversBisonTokenStreamTest::testNextSkipsLineCommentcoversBisonTokenStreamTest::testNextSkipsLineCommentAtEofcoversBisonTokenStreamTest::testNextSkipsMixedCommentscoversBisonTokenStreamTest::testNextSkipsWhitespacecoversBisonTokenStreamTest::testNextStringLiteralcoversBisonTokenStreamTest::testNextStringLiteralEmptycoversBisonTokenStreamTest::testNextStringLiteralEscapeAtEndcoversBisonTokenStreamTest::testNextStringLiteralUnterminatedcoversBisonTokenStreamTest::testNextStringLiteralWithBackslashcoversBisonTokenStreamTest::testNextStringLiteralWithEscapedQuotecoversBisonTokenStreamTest::testNextThrowsForDigitStartingIdentifierPositioncoversBisonTokenStreamTest::testNextThrowsForEmptyDirectivecoversBisonTokenStreamTest::testNextThrowsForUnexpectedCharactercoversBisonTokenStreamTest::testNextThrowsForUnexpectedSlashcoversBisonTokenStreamTest::testNextThrowsForUnterminatedTypeTagcoversBisonTokenStreamTest::testNextTokenTypes#actioncoversBisonTokenStreamTest::testNextTokenTypes#char literalcoversBisonTokenStreamTest::testNextTokenTypes#coloncoversBisonTokenStreamTest::testNextTokenTypes#directive leftcoversBisonTokenStreamTest::testNextTokenTypes#directive startcoversBisonTokenStreamTest::testNextTokenTypes#directive tokencoversBisonTokenStreamTest::testNextTokenTypes#identifiercoversBisonTokenStreamTest::testNextTokenTypes#identifier with digitscoversBisonTokenStreamTest::testNextTokenTypes#numbercoversBisonTokenStreamTest::testNextTokenTypes#number zerocoversBisonTokenStreamTest::testNextTokenTypes#percent percentcoversBisonTokenStreamTest::testNextTokenTypes#pipecoversBisonTokenStreamTest::testNextTokenTypes#prologuecoversBisonTokenStreamTest::testNextTokenTypes#semicoloncoversBisonTokenStreamTest::testNextTokenTypes#string literalcoversBisonTokenStreamTest::testNextTokenTypes#type tagcoversBisonTokenStreamTest::testNextTracksOffsetcoversBisonTokenStreamTest::testNextTracksOffsetAfterCommentcoversBisonTokenStreamTest::testNextTracksOffsetAfterWhitespacecoversBisonTokenStreamTest::testNextTypeTagcoversBisonTokenStreamTest::testNextTypeTagEmptycoversBisonTokenStreamTest::testNextTypeTagTrimmedcoversBisonTokenStreamTest::testNextTypeTagWithSpecialCharscoversBisonTokenStreamTest::testOverReadsTheSourceItWasGivencoversBisonTokenStreamTest::testPeekDoesNotConsumecoversBisonTokenStreamTest::testPeekNAfterPartialConsumptioncoversBisonTokenStreamTest::testPeekNReturnsNthTokencoversBisonTokenStreamTest::testPeekNReturnsSameResultcoversBisonTokenStreamTest::testPeekNThenPeekNSmallercoversBisonTokenStreamTest::testPeekReturnsSameTokencoversBisonTokenStreamTest::testPeekThenNextThenPeekcovers
public static function over(string $source): selfBuilds a stream over grammar source text.
Parameters
$source | string | Bison grammar text |
Returns
self A stream reading that source with the default lexeme rulesTest cases 178
BisonPreambleReaderTest::testReadConsumesTheSectionSeparatorSoTheRulesFollowcallsBisonPreambleReaderTest::testReadDropsADeclarationWhoseArgumentsDoNotFitItsDirectivecallsBisonPreambleReaderTest::testReadKeepsADirectiveItHasNoModelForcallsBisonPreambleReaderTest::testReadKeepsTheLastPrologueWhenAFileHasSeveralcallsBisonPreambleReaderTest::testReadReportsNoPrologueWhenTheFileHasNonecallsBisonPreambleReaderTest::testReadStopsAtTheEndOfAFileWithoutASeparatorcallsBisonPreambleReaderTest::testReadTakesThePrologueAndTheDeclarationscallsBisonPreambleReaderTest::testReadUsesTheDirectiveChainItWasGivencallsBisonDirectiveReaderChainTest::testForBisonGrammarConsultsTheUnknownReaderLastcallsBisonDirectiveReaderChainTest::testReadDeclaresNothingWhenNoReaderClaimsTheDirectivecallsBisonDirectiveReaderChainTest::testReadFallsBackToTheUnknownReaderRatherThanDroppingADirectivecallsBisonDirectiveReaderChainTest::testReadRoutesEachDirectiveToTheReaderThatKnowsItcallsBisonDirectiveReaderTest::testReadConsumesTheArgumentsUpToTheNextDeclarationcallsDefineDirectiveReaderTest::testReadDeclaresNothingWhenNoNameFollowscallsDefineDirectiveReaderTest::testReadStopsBeforeTheNextDirectivecallsDefineDirectiveReaderTest::testReadTakesANameWithoutAValueAsAFlagcallsDefineDirectiveReaderTest::testReadTakesANumericValuecallsDefineDirectiveReaderTest::testReadTakesAQuotedValuecallsExpectDirectiveReaderTest::testReadDeclaresNothingWhenNoNumberFollowscallsExpectDirectiveReaderTest::testReadLeavesATokenItDidNotClaimcallsExpectDirectiveReaderTest::testReadTakesTheConflictCountcallsParamDirectiveReaderTest::testReadDeclaresNothingWhenNoBracedCodeFollowscallsParamDirectiveReaderTest::testReadDistinguishesTheScannerDirectivecallsParamDirectiveReaderTest::testReadTakesTheBracedArgumentAndTheDirectiveKindcallsPrecedenceDirectiveReaderTest::testReadSkipsWhatIsNotAnOperatorcallsPrecedenceDirectiveReaderTest::testReadStopsAtTheSectionSeparatorcallsPrecedenceDirectiveReaderTest::testReadTakesOperatorsWrittenAsNamesOrAsCharacterscallsPrecedenceDirectiveReaderTest::testReadTakesTheAssociativityFromTheDirectiveNamecallsPrecedenceDirectiveReaderTest::testReadTakesTheOptionalTypeTagcallsStartDirectiveReaderTest::testReadDeclaresNothingWhenNoRuleNameFollowscallsStartDirectiveReaderTest::testReadLeavesATokenItDidNotClaimcallsStartDirectiveReaderTest::testReadTakesTheRuleNamecallsTokenDirectiveReaderTest::testReadReportsNoTypeTagWhenNoneIsWrittencallsTokenDirectiveReaderTest::testReadStopsAtTheNextDirectivecallsTokenDirectiveReaderTest::testReadTakesAnEmptyDeclarationAsNoTerminalscallsTokenDirectiveReaderTest::testReadTakesEveryTerminalNamedcallsTokenDirectiveReaderTest::testReadTakesTheOptionalTypeTagcallsTokenDirectiveReaderTest::testReadTerminalTakesACodeAndAnAliasTogethercallsTokenDirectiveReaderTest::testReadTerminalTakesTheAliascallsTokenDirectiveReaderTest::testReadTerminalTakesTheExplicitTokenCodecallsTokenDirectiveReaderTest::testReadTerminalTakesTheNameAlonecallsTypeDirectiveReaderTest::testReadDeclaresNothingWithoutATypeTagcallsTypeDirectiveReaderTest::testReadSkipsWhatIsNotARuleNamecallsTypeDirectiveReaderTest::testReadStopsAtTheNextDirectivecallsTypeDirectiveReaderTest::testReadTakesTheTypeTagAndTheRulesItAppliesTocallsUnknownDirectiveReaderTest::testReadKeepsTheArgumentsAsTextcallsUnknownDirectiveReaderTest::testReadKeepsTheDirectiveWithoutArgumentscallsUnknownDirectiveReaderTest::testReadLeavesTheStreamOnTheNextDeclarationcallsBisonTokenStreamTest::testConsumeRemainingDiscardsBufferedLookaheadcovers and callsBisonTokenStreamTest::testConsumeRemainingTakesEverythingAfterTheTokensAlreadyReadcovers and callsBisonTokenStreamTest::testNextActioncovers and callsBisonTokenStreamTest::testNextActionDeeplyNestedcovers and callsBisonTokenStreamTest::testNextActionEmptycovers and callsBisonTokenStreamTest::testNextActionNestedcovers and callsBisonTokenStreamTest::testNextActionUnterminatedcovers and callsBisonTokenStreamTest::testNextActionWithBlockCommentcovers and callsBisonTokenStreamTest::testNextActionWithCharLiteralContainingBracecovers and callsBisonTokenStreamTest::testNextActionWithLineCommentcovers and callsBisonTokenStreamTest::testNextActionWithStringContainingBracecovers and callsBisonTokenStreamTest::testNextActionWithUnterminatedStringcovers and callsBisonTokenStreamTest::testNextActionWithWhitespaceOnlycovers and callsBisonTokenStreamTest::testNextCharLiteralcovers and callsBisonTokenStreamTest::testNextCharLiteralEmptycovers and callsBisonTokenStreamTest::testNextCharLiteralUnterminatedcovers and callsBisonTokenStreamTest::testNextCharLiteralWithEscapecovers and callsBisonTokenStreamTest::testNextColoncovers and callsBisonTokenStreamTest::testNextCompleteGrammarFragmentcovers and callsBisonTokenStreamTest::testNextDirectivecovers and callsBisonTokenStreamTest::testNextDirectiveWithDotscovers and callsBisonTokenStreamTest::testNextDirectiveWithHyphencovers and callsBisonTokenStreamTest::testNextDirectiveWithNumberscovers and callsBisonTokenStreamTest::testNextIdentifiercovers and callsBisonTokenStreamTest::testNextIdentifierSingleCharcovers and callsBisonTokenStreamTest::testNextIdentifierUpperCasecovers and callsBisonTokenStreamTest::testNextIdentifierWithDigitscovers and callsBisonTokenStreamTest::testNextIdentifierWithDotscovers and callsBisonTokenStreamTest::testNextIdentifierWithUnderscorecovers and callsBisonTokenStreamTest::testNextIfAcceptsAnyOfSeveralKindscovers and callsBisonTokenStreamTest::testNextIfAcceptsNothingWhenNoKindIsGivencovers and callsBisonTokenStreamTest::testNextIfConsumesATokenOfAnAcceptedKindcovers and callsBisonTokenStreamTest::testNextIfLeavesTheStreamUnmovedWhenTheKindDoesNotMatchcovers and callsBisonTokenStreamTest::testNextIntReadsANonNumericTokenAsZerocovers and callsBisonTokenStreamTest::testNextIntReadsANumericTokenAsAnIntegercovers and callsBisonTokenStreamTest::testNextMultipleTokenscovers and callsBisonTokenStreamTest::testNextNumbercovers and callsBisonTokenStreamTest::testNextNumberSingleDigitcovers and callsBisonTokenStreamTest::testNextNumberZerocovers and callsBisonTokenStreamTest::testNextPercentPercentcovers and callsBisonTokenStreamTest::testNextPipecovers and callsBisonTokenStreamTest::testNextProloguecovers and callsBisonTokenStreamTest::testNextPrologueEmptycovers and callsBisonTokenStreamTest::testNextPrologueUnterminatedcovers and callsBisonTokenStreamTest::testNextPrologueWithWhitespaceOnlycovers and callsBisonTokenStreamTest::testNextReturnsEofAfterEofcovers and callsBisonTokenStreamTest::testNextReturnsEofForEmptyInputcovers and callsBisonTokenStreamTest::testNextReturnsEofForWhitespaceOnlyInputcovers and callsBisonTokenStreamTest::testNextReturnsTokenFromBuffercovers and callsBisonTokenStreamTest::testNextSemicoloncovers and callsBisonTokenStreamTest::testNextSkipsBlockCommentcovers and callsBisonTokenStreamTest::testNextSkipsBlockCommentMultilinecovers and callsBisonTokenStreamTest::testNextSkipsBlockCommentUnterminatedcovers and callsBisonTokenStreamTest::testNextSkipsConsecutiveBlockCommentscovers and callsBisonTokenStreamTest::testNextSkipsConsecutiveLineCommentscovers and callsBisonTokenStreamTest::testNextSkipsLineCommentcovers and callsBisonTokenStreamTest::testNextSkipsLineCommentAtEofcovers and callsBisonTokenStreamTest::testNextSkipsMixedCommentscovers and callsBisonTokenStreamTest::testNextSkipsWhitespacecovers and callsBisonTokenStreamTest::testNextStringLiteralcovers and callsBisonTokenStreamTest::testNextStringLiteralEmptycovers and callsBisonTokenStreamTest::testNextStringLiteralEscapeAtEndcovers and callsBisonTokenStreamTest::testNextStringLiteralUnterminatedcovers and callsBisonTokenStreamTest::testNextStringLiteralWithBackslashcovers and callsBisonTokenStreamTest::testNextStringLiteralWithEscapedQuotecovers and callsBisonTokenStreamTest::testNextThrowsForDigitStartingIdentifierPositioncovers and callsBisonTokenStreamTest::testNextThrowsForEmptyDirectivecovers and callsBisonTokenStreamTest::testNextThrowsForUnexpectedCharactercovers and callsBisonTokenStreamTest::testNextThrowsForUnexpectedSlashcovers and callsBisonTokenStreamTest::testNextThrowsForUnterminatedTypeTagcovers and callsBisonTokenStreamTest::testNextTokenTypescallsBisonTokenStreamTest::testNextTokenTypes#actioncoversBisonTokenStreamTest::testNextTokenTypes#char literalcoversBisonTokenStreamTest::testNextTokenTypes#coloncoversBisonTokenStreamTest::testNextTokenTypes#directive leftcoversBisonTokenStreamTest::testNextTokenTypes#directive startcoversBisonTokenStreamTest::testNextTokenTypes#directive tokencoversBisonTokenStreamTest::testNextTokenTypes#identifiercoversBisonTokenStreamTest::testNextTokenTypes#identifier with digitscoversBisonTokenStreamTest::testNextTokenTypes#numbercoversBisonTokenStreamTest::testNextTokenTypes#number zerocoversBisonTokenStreamTest::testNextTokenTypes#percent percentcoversBisonTokenStreamTest::testNextTokenTypes#pipecoversBisonTokenStreamTest::testNextTokenTypes#prologuecoversBisonTokenStreamTest::testNextTokenTypes#semicoloncoversBisonTokenStreamTest::testNextTokenTypes#string literalcoversBisonTokenStreamTest::testNextTokenTypes#type tagcoversBisonTokenStreamTest::testNextTracksOffsetcovers and callsBisonTokenStreamTest::testNextTracksOffsetAfterCommentcovers and callsBisonTokenStreamTest::testNextTracksOffsetAfterWhitespacecovers and callsBisonTokenStreamTest::testNextTypeTagcovers and callsBisonTokenStreamTest::testNextTypeTagEmptycovers and callsBisonTokenStreamTest::testNextTypeTagTrimmedcovers and callsBisonTokenStreamTest::testNextTypeTagWithSpecialCharscovers and callsBisonTokenStreamTest::testOverReadsTheSourceItWasGivencovers and callsBisonTokenStreamTest::testPeekDoesNotConsumecovers and callsBisonTokenStreamTest::testPeekNAfterPartialConsumptioncovers and callsBisonTokenStreamTest::testPeekNReturnsNthTokencovers and callsBisonTokenStreamTest::testPeekNReturnsSameResultcovers and callsBisonTokenStreamTest::testPeekNThenPeekNSmallercovers and callsBisonTokenStreamTest::testPeekReturnsSameTokencovers and callsBisonTokenStreamTest::testPeekThenNextThenPeekcovers and callsBisonAlternativeReaderTest::testEndsTheRuleConsumesNothingcallsBisonAlternativeReaderTest::testEndsTheRuleReportsTheEndOfTheSectioncallsBisonAlternativeReaderTest::testEndsTheRuleReportsTheStartOfTheNextRulecallsBisonAlternativeReaderTest::testEndsTheRuleTreatsALoneNameAsPartOfTheAlternativecallsBisonAlternativeReaderTest::testReadAllDoesNotCarryAnActionIntoTheNextAlternativecallsBisonAlternativeReaderTest::testReadAllKeepsEachAlternativesOwnActioncallsBisonAlternativeReaderTest::testReadAllSplitsAlternativesOnThePipecallsBisonAlternativeReaderTest::testReadAllStopsAtTheEndOfTheSectioncallsBisonAlternativeReaderTest::testReadAllStopsWhereTheNextRuleBeginscallsBisonAlternativeReaderTest::testReadAllTakesTheSymbolsUpToTheSemicoloncallsBisonAlternativeReaderTest::testReadDynamicPrecedenceReportsNothingWhenNoneIsNamedcallsBisonAlternativeReaderTest::testReadDynamicPrecedenceTakesTheRankcallsBisonAlternativeReaderTest::testReadInlineDirectiveAppliesPrecedencecallsBisonAlternativeReaderTest::testReadInlineDirectiveIgnoresADirectiveItDoesNotModelcallsBisonAlternativeReaderTest::testReadMergeFunctionReportsNothingWhenNoneIsNamedcallsBisonAlternativeReaderTest::testReadMergeFunctionTakesTheTaggedNamecallsBisonAlternativeReaderTest::testReadPartAddsACharacterSymbolcallsBisonAlternativeReaderTest::testReadPartAddsANamedSymbolcallsBisonAlternativeReaderTest::testReadPartSkipsWhatBelongsToNoAlternativecallsBisonAlternativeReaderTest::testReadPrecedenceSymbolReportsNothingWhenNoneIsNamedcallsBisonAlternativeReaderTest::testReadPrecedenceSymbolTakesANameOrACharactercallsBisonRuleReaderTest::testReadAllFindsNoRulesInAnEmptySectioncallsBisonRuleReaderTest::testReadAllKeepsTheRulesInTheOrderTheyWereDeclaredcallsBisonRuleReaderTest::testReadAllSkipsWhatDoesNotOpenARulecallsBisonRuleReaderTest::testReadAllStopsAtTheSectionSeparatorcallsBisonRuleReaderTest::testReadConsumesTheNameItRejectedSoTheScanCanAdvancecallsBisonRuleReaderTest::testReadFindsNoRuleWhenNoColonFollowsTheNamecallsBisonRuleReaderTest::testReadTakesTheRuleNameAndItsAlternativescalls
Called from 1
Calls 2
- new
selfline 49 - new BisonLexer line 49
public function next(): BisonTokenConsumes the next token.
Returns
BisonToken The token, taken from the lookahead buffer when one is waitingThrows
GrammarParseException When the source cannot be tokenizedTest cases 96
BisonTokenStreamTest::testConsumeRemainingTakesEverythingAfterTheTokensAlreadyReadcoversBisonTokenStreamTest::testNextActioncoversBisonTokenStreamTest::testNextActionDeeplyNestedcoversBisonTokenStreamTest::testNextActionEmptycoversBisonTokenStreamTest::testNextActionNestedcoversBisonTokenStreamTest::testNextActionUnterminatedcoversBisonTokenStreamTest::testNextActionWithBlockCommentcoversBisonTokenStreamTest::testNextActionWithCharLiteralContainingBracecoversBisonTokenStreamTest::testNextActionWithLineCommentcoversBisonTokenStreamTest::testNextActionWithStringContainingBracecoversBisonTokenStreamTest::testNextActionWithUnterminatedStringcoversBisonTokenStreamTest::testNextActionWithWhitespaceOnlycoversBisonTokenStreamTest::testNextCharLiteralcoversBisonTokenStreamTest::testNextCharLiteralEmptycoversBisonTokenStreamTest::testNextCharLiteralUnterminatedcoversBisonTokenStreamTest::testNextCharLiteralWithEscapecoversBisonTokenStreamTest::testNextColoncoversBisonTokenStreamTest::testNextCompleteGrammarFragmentcoversBisonTokenStreamTest::testNextDirectivecoversBisonTokenStreamTest::testNextDirectiveWithDotscoversBisonTokenStreamTest::testNextDirectiveWithHyphencoversBisonTokenStreamTest::testNextDirectiveWithNumberscoversBisonTokenStreamTest::testNextIdentifiercoversBisonTokenStreamTest::testNextIdentifierSingleCharcoversBisonTokenStreamTest::testNextIdentifierUpperCasecoversBisonTokenStreamTest::testNextIdentifierWithDigitscoversBisonTokenStreamTest::testNextIdentifierWithDotscoversBisonTokenStreamTest::testNextIdentifierWithUnderscorecoversBisonTokenStreamTest::testNextIfAcceptsAnyOfSeveralKindscoversBisonTokenStreamTest::testNextIfAcceptsNothingWhenNoKindIsGivencoversBisonTokenStreamTest::testNextIfConsumesATokenOfAnAcceptedKindcoversBisonTokenStreamTest::testNextIfLeavesTheStreamUnmovedWhenTheKindDoesNotMatchcoversBisonTokenStreamTest::testNextIntReadsANonNumericTokenAsZerocoversBisonTokenStreamTest::testNextIntReadsANumericTokenAsAnIntegercoversBisonTokenStreamTest::testNextMultipleTokenscoversBisonTokenStreamTest::testNextNumbercoversBisonTokenStreamTest::testNextNumberSingleDigitcoversBisonTokenStreamTest::testNextNumberZerocoversBisonTokenStreamTest::testNextPercentPercentcoversBisonTokenStreamTest::testNextPipecoversBisonTokenStreamTest::testNextProloguecoversBisonTokenStreamTest::testNextPrologueEmptycoversBisonTokenStreamTest::testNextPrologueUnterminatedcoversBisonTokenStreamTest::testNextPrologueWithWhitespaceOnlycoversBisonTokenStreamTest::testNextReturnsEofAfterEofcoversBisonTokenStreamTest::testNextReturnsEofForEmptyInputcoversBisonTokenStreamTest::testNextReturnsEofForWhitespaceOnlyInputcoversBisonTokenStreamTest::testNextReturnsTokenFromBuffercoversBisonTokenStreamTest::testNextSemicoloncoversBisonTokenStreamTest::testNextSkipsBlockCommentcoversBisonTokenStreamTest::testNextSkipsBlockCommentMultilinecoversBisonTokenStreamTest::testNextSkipsBlockCommentUnterminatedcoversBisonTokenStreamTest::testNextSkipsConsecutiveBlockCommentscoversBisonTokenStreamTest::testNextSkipsConsecutiveLineCommentscoversBisonTokenStreamTest::testNextSkipsLineCommentcoversBisonTokenStreamTest::testNextSkipsLineCommentAtEofcoversBisonTokenStreamTest::testNextSkipsMixedCommentscoversBisonTokenStreamTest::testNextSkipsWhitespacecoversBisonTokenStreamTest::testNextStringLiteralcoversBisonTokenStreamTest::testNextStringLiteralEmptycoversBisonTokenStreamTest::testNextStringLiteralEscapeAtEndcoversBisonTokenStreamTest::testNextStringLiteralUnterminatedcoversBisonTokenStreamTest::testNextStringLiteralWithBackslashcoversBisonTokenStreamTest::testNextStringLiteralWithEscapedQuotecoversBisonTokenStreamTest::testNextThrowsForDigitStartingIdentifierPositioncoversBisonTokenStreamTest::testNextThrowsForEmptyDirectivecoversBisonTokenStreamTest::testNextThrowsForUnexpectedCharactercoversBisonTokenStreamTest::testNextThrowsForUnexpectedSlashcoversBisonTokenStreamTest::testNextThrowsForUnterminatedTypeTagcoversBisonTokenStreamTest::testNextTokenTypes#actioncoversBisonTokenStreamTest::testNextTokenTypes#char literalcoversBisonTokenStreamTest::testNextTokenTypes#coloncoversBisonTokenStreamTest::testNextTokenTypes#directive leftcoversBisonTokenStreamTest::testNextTokenTypes#directive startcoversBisonTokenStreamTest::testNextTokenTypes#directive tokencoversBisonTokenStreamTest::testNextTokenTypes#identifiercoversBisonTokenStreamTest::testNextTokenTypes#identifier with digitscoversBisonTokenStreamTest::testNextTokenTypes#numbercoversBisonTokenStreamTest::testNextTokenTypes#number zerocoversBisonTokenStreamTest::testNextTokenTypes#percent percentcoversBisonTokenStreamTest::testNextTokenTypes#pipecoversBisonTokenStreamTest::testNextTokenTypes#prologuecoversBisonTokenStreamTest::testNextTokenTypes#semicoloncoversBisonTokenStreamTest::testNextTokenTypes#string literalcoversBisonTokenStreamTest::testNextTokenTypes#type tagcoversBisonTokenStreamTest::testNextTracksOffsetcoversBisonTokenStreamTest::testNextTracksOffsetAfterCommentcoversBisonTokenStreamTest::testNextTracksOffsetAfterWhitespacecoversBisonTokenStreamTest::testNextTypeTagcoversBisonTokenStreamTest::testNextTypeTagEmptycoversBisonTokenStreamTest::testNextTypeTagTrimmedcoversBisonTokenStreamTest::testNextTypeTagWithSpecialCharscoversBisonTokenStreamTest::testOverReadsTheSourceItWasGivencoversBisonTokenStreamTest::testPeekDoesNotConsumecoversBisonTokenStreamTest::testPeekNAfterPartialConsumptioncoversBisonTokenStreamTest::testPeekThenNextThenPeekcovers
Called from 15
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:52
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:62
- method-call SqlFaker\Compiler\Bison\Directive\PrecedenceDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/PrecedenceDirectiveReader.php:73
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:68
- method-call SqlFaker\Compiler\Bison\Directive\TypeDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TypeDirectiveReader.php:70
- method-call SqlFaker\Compiler\Bison\Lexer\BisonTokenStream::nextIf() packages/sql-faker/src/Compiler/Bison/Lexer/BisonTokenStream.php:120
- method-call SqlFaker\Compiler\Bison\Lexer\BisonTokenStream::nextString() packages/sql-faker/src/Compiler/Bison/Lexer/BisonTokenStream.php:132
- method-call SqlFaker\Compiler\Bison\Lexer\BisonTokenStream::nextInt() packages/sql-faker/src/Compiler/Bison/Lexer/BisonTokenStream.php:144
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:46
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:53
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:105
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:45
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:50
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::read() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:73
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::read() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:79
Calls 2
- function-call
array_shiftline 61 - method-call BisonLexer::scan() line 63
public function peek(): BisonTokenReads the next token without consuming it.
Returns
BisonToken The token that the next call to next() will returnThrows
GrammarParseException When the source cannot be tokenizedTest cases 8
BisonTokenStreamTest::testNextIfAcceptsAnyOfSeveralKindscoversBisonTokenStreamTest::testNextIfAcceptsNothingWhenNoKindIsGivencoversBisonTokenStreamTest::testNextIfConsumesATokenOfAnAcceptedKindcoversBisonTokenStreamTest::testNextIfLeavesTheStreamUnmovedWhenTheKindDoesNotMatchcoversBisonTokenStreamTest::testNextReturnsTokenFromBuffercoversBisonTokenStreamTest::testPeekDoesNotConsumecoversBisonTokenStreamTest::testPeekReturnsSameTokencoversBisonTokenStreamTest::testPeekThenNextThenPeekcovers
Called from 14
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:48
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:49
- method-call SqlFaker\Compiler\Bison\Directive\PrecedenceDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/PrecedenceDirectiveReader.php:70
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:66
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:67
- method-call SqlFaker\Compiler\Bison\Directive\TypeDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TypeDirectiveReader.php:67
- method-call SqlFaker\Compiler\Bison\Directive\UnknownDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/UnknownDirectiveReader.php:61
- method-call SqlFaker\Compiler\Bison\Lexer\BisonTokenStream::nextIf() packages/sql-faker/src/Compiler/Bison/Lexer/BisonTokenStream.php:116
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:44
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::endsTheRule() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:71
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:88
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:43
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:44
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:49
Calls 1
- method-call BisonTokenStream::peekN() line 75
public function peekN(int $distance): BisonTokenReads a token further ahead without consuming anything.
Parameters
$distance | int | How many tokens ahead to look, counting from one |
Returns
BisonToken The token at that distanceThrows
InvalidArgumentException When the distance is less than oneGrammarParseException When the source cannot be tokenizedTest cases 13
BisonTokenStreamTest::testConsumeRemainingDiscardsBufferedLookaheadcoversBisonTokenStreamTest::testNextIfAcceptsAnyOfSeveralKindscoversBisonTokenStreamTest::testNextIfAcceptsNothingWhenNoKindIsGivencoversBisonTokenStreamTest::testNextIfConsumesATokenOfAnAcceptedKindcoversBisonTokenStreamTest::testNextIfLeavesTheStreamUnmovedWhenTheKindDoesNotMatchcoversBisonTokenStreamTest::testNextReturnsTokenFromBuffercoversBisonTokenStreamTest::testPeekDoesNotConsumecoversBisonTokenStreamTest::testPeekNAfterPartialConsumptioncoversBisonTokenStreamTest::testPeekNReturnsNthTokencoversBisonTokenStreamTest::testPeekNReturnsSameResultcoversBisonTokenStreamTest::testPeekNThenPeekNSmallercoversBisonTokenStreamTest::testPeekReturnsSameTokencoversBisonTokenStreamTest::testPeekThenNextThenPeekcovers
Called from 3
- method-call SqlFaker\Compiler\Bison\Lexer\BisonTokenStream::peek() packages/sql-faker/src/Compiler/Bison/Lexer/BisonTokenStream.php:75
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::endsTheRule() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:77
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::read() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:72
Calls 3
- new
InvalidArgumentExceptionline 91 - function-call
countline 94 - method-call BisonLexer::scan() line 95
public function nextIf(BisonLexeme ...$accepted): BisonToken|nullConsumes the next token only when it is one of the given kinds.
Reading a grammar is mostly "take this if it is there": a type tag, an explicit token code, an alias. Asking the stream keeps that one step, so a reader cannot look at one token and then consume another.
Parameters
$accepted | BisonLexeme | Kinds the caller is willing to take |
Returns
BisonToken|null The consumed token, or null with the stream unmovedThrows
GrammarParseException When the source cannot be tokenizedTest cases 4
Called from 15
- method-call SqlFaker\Compiler\Bison\Directive\DefineDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/DefineDirectiveReader.php:51
- method-call SqlFaker\Compiler\Bison\Directive\DefineDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/DefineDirectiveReader.php:56
- method-call SqlFaker\Compiler\Bison\Directive\ExpectDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/ExpectDirectiveReader.php:46
- method-call SqlFaker\Compiler\Bison\Directive\ParamDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/ParamDirectiveReader.php:48
- method-call SqlFaker\Compiler\Bison\Directive\PrecedenceDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/PrecedenceDirectiveReader.php:66
- method-call SqlFaker\Compiler\Bison\Directive\PrecedenceDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/PrecedenceDirectiveReader.php:71
- method-call SqlFaker\Compiler\Bison\Directive\StartDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/StartDirectiveReader.php:46
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:62
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::readTerminal() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:89
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::readTerminal() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:90
- method-call SqlFaker\Compiler\Bison\Directive\TypeDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TypeDirectiveReader.php:60
- method-call SqlFaker\Compiler\Bison\Directive\TypeDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TypeDirectiveReader.php:68
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPrecedenceSymbol() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:134
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readDynamicPrecedence() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:146
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readMergeFunction() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:158
Calls 3
- function-call
in_arrayline 116 - method-call BisonTokenStream::peek() line 116
- method-call BisonTokenStream::next() line 120
public function nextString(): stringConsumes the next token and reads its value as a string.
Returns
string The token value, with a numeric value rendered as digitsThrows
GrammarParseException When the source cannot be tokenizedCalled from 9
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:57
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:66
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::readTerminal() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:88
- method-call SqlFaker\Compiler\Bison\Directive\UnknownDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/UnknownDirectiveReader.php:62
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:89
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:91
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:94
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readInlineDirective() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:117
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::read() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:78
Calls 1
- method-call BisonTokenStream::next() line 132
public function nextInt(): intConsumes the next token and reads its value as an integer.
Returns
int The token value, with a non-numeric value read as zeroThrows
GrammarParseException When the source cannot be tokenizedTest cases 2
Calls 1
- method-call BisonTokenStream::next() line 144
public function consumeRemaining(): stringConsumes the rest of the source as raw text.
Buffered lookahead is discarded rather than prepended: the cursor has already moved past those tokens, so the text they came from is behind the point the epilogue starts at.
Returns
string Everything left after the tokens already scannedTest cases 2
Calls 1
- method-call BisonLexer::consumeRemaining() line 160
Private surface 2§
Implementation details, listed for orientation only.
private BisonLexer $lexerprivate list<BisonToken> $lookahead = []Test cases 179§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 102
BisonTokenStreamTest::testConsumeRemainingDiscardsBufferedLookaheadcovers and callsBisonTokenStreamTest::testConsumeRemainingTakesEverythingAfterTheTokensAlreadyReadcovers and callsBisonTokenStreamTest::testNextActioncovers and callsBisonTokenStreamTest::testNextActionDeeplyNestedcovers and callsBisonTokenStreamTest::testNextActionEmptycovers and callsBisonTokenStreamTest::testNextActionNestedcovers and callsBisonTokenStreamTest::testNextActionUnterminatedcovers and callsBisonTokenStreamTest::testNextActionWithBlockCommentcovers and callsBisonTokenStreamTest::testNextActionWithCharLiteralContainingBracecovers and callsBisonTokenStreamTest::testNextActionWithLineCommentcovers and callsBisonTokenStreamTest::testNextActionWithStringContainingBracecovers and callsBisonTokenStreamTest::testNextActionWithUnterminatedStringcovers and callsBisonTokenStreamTest::testNextActionWithWhitespaceOnlycovers and callsBisonTokenStreamTest::testNextCharLiteralcovers and callsBisonTokenStreamTest::testNextCharLiteralEmptycovers and callsBisonTokenStreamTest::testNextCharLiteralUnterminatedcovers and callsBisonTokenStreamTest::testNextCharLiteralWithEscapecovers and callsBisonTokenStreamTest::testNextColoncovers and callsBisonTokenStreamTest::testNextCompleteGrammarFragmentcovers and callsBisonTokenStreamTest::testNextDirectivecovers and callsBisonTokenStreamTest::testNextDirectiveWithDotscovers and callsBisonTokenStreamTest::testNextDirectiveWithHyphencovers and callsBisonTokenStreamTest::testNextDirectiveWithNumberscovers and callsBisonTokenStreamTest::testNextIdentifiercovers and callsBisonTokenStreamTest::testNextIdentifierSingleCharcovers and callsBisonTokenStreamTest::testNextIdentifierUpperCasecovers and callsBisonTokenStreamTest::testNextIdentifierWithDigitscovers and callsBisonTokenStreamTest::testNextIdentifierWithDotscovers and callsBisonTokenStreamTest::testNextIdentifierWithUnderscorecovers and callsBisonTokenStreamTest::testNextIfAcceptsAnyOfSeveralKindscovers and callsBisonTokenStreamTest::testNextIfAcceptsNothingWhenNoKindIsGivencovers and callsBisonTokenStreamTest::testNextIfConsumesATokenOfAnAcceptedKindcovers and callsBisonTokenStreamTest::testNextIfLeavesTheStreamUnmovedWhenTheKindDoesNotMatchcovers and callsBisonTokenStreamTest::testNextIntReadsANonNumericTokenAsZerocovers and callsBisonTokenStreamTest::testNextIntReadsANumericTokenAsAnIntegercovers and callsBisonTokenStreamTest::testNextMultipleTokenscovers and callsBisonTokenStreamTest::testNextNumbercovers and callsBisonTokenStreamTest::testNextNumberSingleDigitcovers and callsBisonTokenStreamTest::testNextNumberZerocovers and callsBisonTokenStreamTest::testNextPercentPercentcovers and callsBisonTokenStreamTest::testNextPipecovers and callsBisonTokenStreamTest::testNextProloguecovers and callsBisonTokenStreamTest::testNextPrologueEmptycovers and callsBisonTokenStreamTest::testNextPrologueUnterminatedcovers and callsBisonTokenStreamTest::testNextPrologueWithWhitespaceOnlycovers and callsBisonTokenStreamTest::testNextReturnsEofAfterEofcovers and callsBisonTokenStreamTest::testNextReturnsEofForEmptyInputcovers and callsBisonTokenStreamTest::testNextReturnsEofForWhitespaceOnlyInputcovers and callsBisonTokenStreamTest::testNextReturnsTokenFromBuffercovers and callsBisonTokenStreamTest::testNextSemicoloncovers and callsBisonTokenStreamTest::testNextSkipsBlockCommentcovers and callsBisonTokenStreamTest::testNextSkipsBlockCommentMultilinecovers and callsBisonTokenStreamTest::testNextSkipsBlockCommentUnterminatedcovers and callsBisonTokenStreamTest::testNextSkipsConsecutiveBlockCommentscovers and callsBisonTokenStreamTest::testNextSkipsConsecutiveLineCommentscovers and callsBisonTokenStreamTest::testNextSkipsLineCommentcovers and callsBisonTokenStreamTest::testNextSkipsLineCommentAtEofcovers and callsBisonTokenStreamTest::testNextSkipsMixedCommentscovers and callsBisonTokenStreamTest::testNextSkipsWhitespacecovers and callsBisonTokenStreamTest::testNextStringLiteralcovers and callsBisonTokenStreamTest::testNextStringLiteralEmptycovers and callsBisonTokenStreamTest::testNextStringLiteralEscapeAtEndcovers and callsBisonTokenStreamTest::testNextStringLiteralUnterminatedcovers and callsBisonTokenStreamTest::testNextStringLiteralWithBackslashcovers and callsBisonTokenStreamTest::testNextStringLiteralWithEscapedQuotecovers and callsBisonTokenStreamTest::testNextThrowsForDigitStartingIdentifierPositioncovers and callsBisonTokenStreamTest::testNextThrowsForEmptyDirectivecovers and callsBisonTokenStreamTest::testNextThrowsForUnexpectedCharactercovers and callsBisonTokenStreamTest::testNextThrowsForUnexpectedSlashcovers and callsBisonTokenStreamTest::testNextThrowsForUnterminatedTypeTagcovers and callsBisonTokenStreamTest::testNextTokenTypescallsBisonTokenStreamTest::testNextTokenTypes#actioncoversBisonTokenStreamTest::testNextTokenTypes#char literalcoversBisonTokenStreamTest::testNextTokenTypes#coloncoversBisonTokenStreamTest::testNextTokenTypes#directive leftcoversBisonTokenStreamTest::testNextTokenTypes#directive startcoversBisonTokenStreamTest::testNextTokenTypes#directive tokencoversBisonTokenStreamTest::testNextTokenTypes#identifiercoversBisonTokenStreamTest::testNextTokenTypes#identifier with digitscoversBisonTokenStreamTest::testNextTokenTypes#numbercoversBisonTokenStreamTest::testNextTokenTypes#number zerocoversBisonTokenStreamTest::testNextTokenTypes#percent percentcoversBisonTokenStreamTest::testNextTokenTypes#pipecoversBisonTokenStreamTest::testNextTokenTypes#prologuecoversBisonTokenStreamTest::testNextTokenTypes#semicoloncoversBisonTokenStreamTest::testNextTokenTypes#string literalcoversBisonTokenStreamTest::testNextTokenTypes#type tagcoversBisonTokenStreamTest::testNextTracksOffsetcovers and callsBisonTokenStreamTest::testNextTracksOffsetAfterCommentcovers and callsBisonTokenStreamTest::testNextTracksOffsetAfterWhitespacecovers and callsBisonTokenStreamTest::testNextTypeTagcovers and callsBisonTokenStreamTest::testNextTypeTagEmptycovers and callsBisonTokenStreamTest::testNextTypeTagTrimmedcovers and callsBisonTokenStreamTest::testNextTypeTagWithSpecialCharscovers and callsBisonTokenStreamTest::testOverReadsTheSourceItWasGivencovers and callsBisonTokenStreamTest::testPeekDoesNotConsumecovers and callsBisonTokenStreamTest::testPeekNAfterPartialConsumptioncovers and callsBisonTokenStreamTest::testPeekNReturnsNthTokencovers and callsBisonTokenStreamTest::testPeekNReturnsSameResultcovers and callsBisonTokenStreamTest::testPeekNThenPeekNSmallercovers and callsBisonTokenStreamTest::testPeekReturnsSameTokencovers and callsBisonTokenStreamTest::testPeekThenNextThenPeekcovers and calls
Other tests reaching this symbol 77
BisonParserTestcallsBisonPreambleReaderTest::testReadConsumesTheSectionSeparatorSoTheRulesFollowcallsBisonPreambleReaderTest::testReadDropsADeclarationWhoseArgumentsDoNotFitItsDirectivecallsBisonPreambleReaderTest::testReadKeepsADirectiveItHasNoModelForcallsBisonPreambleReaderTest::testReadKeepsTheLastPrologueWhenAFileHasSeveralcallsBisonPreambleReaderTest::testReadReportsNoPrologueWhenTheFileHasNonecallsBisonPreambleReaderTest::testReadStopsAtTheEndOfAFileWithoutASeparatorcallsBisonPreambleReaderTest::testReadTakesThePrologueAndTheDeclarationscallsBisonPreambleReaderTest::testReadUsesTheDirectiveChainItWasGivencallsBisonDirectiveReaderChainTest::testForBisonGrammarConsultsTheUnknownReaderLastcallsBisonDirectiveReaderChainTest::testReadDeclaresNothingWhenNoReaderClaimsTheDirectivecallsBisonDirectiveReaderChainTest::testReadFallsBackToTheUnknownReaderRatherThanDroppingADirectivecallsBisonDirectiveReaderChainTest::testReadRoutesEachDirectiveToTheReaderThatKnowsItcallsBisonDirectiveReaderTest::testReadConsumesTheArgumentsUpToTheNextDeclarationcallsDefineDirectiveReaderTest::testReadDeclaresNothingWhenNoNameFollowscallsDefineDirectiveReaderTest::testReadStopsBeforeTheNextDirectivecallsDefineDirectiveReaderTest::testReadTakesANameWithoutAValueAsAFlagcallsDefineDirectiveReaderTest::testReadTakesANumericValuecallsDefineDirectiveReaderTest::testReadTakesAQuotedValuecallsExpectDirectiveReaderTest::testReadDeclaresNothingWhenNoNumberFollowscallsExpectDirectiveReaderTest::testReadLeavesATokenItDidNotClaimcallsExpectDirectiveReaderTest::testReadTakesTheConflictCountcallsParamDirectiveReaderTest::testReadDeclaresNothingWhenNoBracedCodeFollowscallsParamDirectiveReaderTest::testReadDistinguishesTheScannerDirectivecallsParamDirectiveReaderTest::testReadTakesTheBracedArgumentAndTheDirectiveKindcallsPrecedenceDirectiveReaderTest::testReadSkipsWhatIsNotAnOperatorcallsPrecedenceDirectiveReaderTest::testReadStopsAtTheSectionSeparatorcallsPrecedenceDirectiveReaderTest::testReadTakesOperatorsWrittenAsNamesOrAsCharacterscallsPrecedenceDirectiveReaderTest::testReadTakesTheAssociativityFromTheDirectiveNamecallsPrecedenceDirectiveReaderTest::testReadTakesTheOptionalTypeTagcallsStartDirectiveReaderTest::testReadDeclaresNothingWhenNoRuleNameFollowscallsStartDirectiveReaderTest::testReadLeavesATokenItDidNotClaimcallsStartDirectiveReaderTest::testReadTakesTheRuleNamecallsTokenDirectiveReaderTest::testReadReportsNoTypeTagWhenNoneIsWrittencallsTokenDirectiveReaderTest::testReadStopsAtTheNextDirectivecallsTokenDirectiveReaderTest::testReadTakesAnEmptyDeclarationAsNoTerminalscallsTokenDirectiveReaderTest::testReadTakesEveryTerminalNamedcallsTokenDirectiveReaderTest::testReadTakesTheOptionalTypeTagcallsTokenDirectiveReaderTest::testReadTerminalTakesACodeAndAnAliasTogethercallsTokenDirectiveReaderTest::testReadTerminalTakesTheAliascallsTokenDirectiveReaderTest::testReadTerminalTakesTheExplicitTokenCodecallsTokenDirectiveReaderTest::testReadTerminalTakesTheNameAlonecallsTypeDirectiveReaderTest::testReadDeclaresNothingWithoutATypeTagcallsTypeDirectiveReaderTest::testReadSkipsWhatIsNotARuleNamecallsTypeDirectiveReaderTest::testReadStopsAtTheNextDirectivecallsTypeDirectiveReaderTest::testReadTakesTheTypeTagAndTheRulesItAppliesTocallsUnknownDirectiveReaderTest::testReadKeepsTheArgumentsAsTextcallsUnknownDirectiveReaderTest::testReadKeepsTheDirectiveWithoutArgumentscallsUnknownDirectiveReaderTest::testReadLeavesTheStreamOnTheNextDeclarationcallsBisonAlternativeReaderTest::testEndsTheRuleConsumesNothingcallsBisonAlternativeReaderTest::testEndsTheRuleReportsTheEndOfTheSectioncallsBisonAlternativeReaderTest::testEndsTheRuleReportsTheStartOfTheNextRulecallsBisonAlternativeReaderTest::testEndsTheRuleTreatsALoneNameAsPartOfTheAlternativecallsBisonAlternativeReaderTest::testReadAllDoesNotCarryAnActionIntoTheNextAlternativecallsBisonAlternativeReaderTest::testReadAllKeepsEachAlternativesOwnActioncallsBisonAlternativeReaderTest::testReadAllSplitsAlternativesOnThePipecallsBisonAlternativeReaderTest::testReadAllStopsAtTheEndOfTheSectioncallsBisonAlternativeReaderTest::testReadAllStopsWhereTheNextRuleBeginscallsBisonAlternativeReaderTest::testReadAllTakesTheSymbolsUpToTheSemicoloncallsBisonAlternativeReaderTest::testReadDynamicPrecedenceReportsNothingWhenNoneIsNamedcallsBisonAlternativeReaderTest::testReadDynamicPrecedenceTakesTheRankcallsBisonAlternativeReaderTest::testReadInlineDirectiveAppliesPrecedencecallsBisonAlternativeReaderTest::testReadInlineDirectiveIgnoresADirectiveItDoesNotModelcallsBisonAlternativeReaderTest::testReadMergeFunctionReportsNothingWhenNoneIsNamedcallsBisonAlternativeReaderTest::testReadMergeFunctionTakesTheTaggedNamecallsBisonAlternativeReaderTest::testReadPartAddsACharacterSymbolcallsBisonAlternativeReaderTest::testReadPartAddsANamedSymbolcallsBisonAlternativeReaderTest::testReadPartSkipsWhatBelongsToNoAlternativecallsBisonAlternativeReaderTest::testReadPrecedenceSymbolReportsNothingWhenNoneIsNamedcallsBisonAlternativeReaderTest::testReadPrecedenceSymbolTakesANameOrACharactercallsBisonRuleReaderTest::testReadAllFindsNoRulesInAnEmptySectioncallsBisonRuleReaderTest::testReadAllKeepsTheRulesInTheOrderTheyWereDeclaredcallsBisonRuleReaderTest::testReadAllSkipsWhatDoesNotOpenARulecallsBisonRuleReaderTest::testReadAllStopsAtTheSectionSeparatorcallsBisonRuleReaderTest::testReadConsumesTheNameItRejectedSoTheScanCanAdvancecallsBisonRuleReaderTest::testReadFindsNoRuleWhenNoColonFollowsTheNamecallsBisonRuleReaderTest::testReadTakesTheRuleNameAndItsAlternativescalls
Relations§
Static calls 1
Method calls 51
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:48
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:49
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:52
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:57
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:62
- method-call SqlFaker\Compiler\Bison\BisonPreambleReader::read() packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:66
- method-call SqlFaker\Compiler\Bison\Directive\DefineDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/DefineDirectiveReader.php:51
- method-call SqlFaker\Compiler\Bison\Directive\DefineDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/DefineDirectiveReader.php:56
- method-call SqlFaker\Compiler\Bison\Directive\ExpectDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/ExpectDirectiveReader.php:46
- method-call SqlFaker\Compiler\Bison\Directive\ParamDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/ParamDirectiveReader.php:48
- method-call SqlFaker\Compiler\Bison\Directive\PrecedenceDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/PrecedenceDirectiveReader.php:66
- method-call SqlFaker\Compiler\Bison\Directive\PrecedenceDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/PrecedenceDirectiveReader.php:70
- method-call SqlFaker\Compiler\Bison\Directive\PrecedenceDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/PrecedenceDirectiveReader.php:71
- method-call SqlFaker\Compiler\Bison\Directive\PrecedenceDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/PrecedenceDirectiveReader.php:73
- method-call SqlFaker\Compiler\Bison\Directive\StartDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/StartDirectiveReader.php:46
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:62
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:66
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:67
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:68
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::readTerminal() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:88
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::readTerminal() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:89
- method-call SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader::readTerminal() packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:90
- method-call SqlFaker\Compiler\Bison\Directive\TypeDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TypeDirectiveReader.php:60
- method-call SqlFaker\Compiler\Bison\Directive\TypeDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TypeDirectiveReader.php:67
- method-call SqlFaker\Compiler\Bison\Directive\TypeDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TypeDirectiveReader.php:68
- method-call SqlFaker\Compiler\Bison\Directive\TypeDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/TypeDirectiveReader.php:70
- method-call SqlFaker\Compiler\Bison\Directive\UnknownDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/UnknownDirectiveReader.php:61
- method-call SqlFaker\Compiler\Bison\Directive\UnknownDirectiveReader::read() packages/sql-faker/src/Compiler/Bison/Directive/UnknownDirectiveReader.php:62
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:44
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:46
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:53
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::endsTheRule() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:71
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::endsTheRule() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:77
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:88
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:89
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:91
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:94
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPart() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:105
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readInlineDirective() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:117
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readPrecedenceSymbol() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:134
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readDynamicPrecedence() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:146
- method-call SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader::readMergeFunction() packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:158
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:43
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:44
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:45
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:49
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::readAll() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:50
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::read() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:72
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::read() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:73
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::read() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:78
- method-call SqlFaker\Compiler\Bison\Rule\BisonRuleReader::read() packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:79
Type declarations 21
- type SqlFaker\Compiler\Bison\BisonPreambleReader packages/sql-faker/src/Compiler/Bison/BisonPreambleReader.php:42
- type SqlFaker\Compiler\Bison\Directive\BisonDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/BisonDirectiveReader.php:40
- type SqlFaker\Compiler\Bison\Directive\BisonDirectiveReaderChain packages/sql-faker/src/Compiler/Bison/Directive/BisonDirectiveReaderChain.php:59
- type SqlFaker\Compiler\Bison\Directive\DefineDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/DefineDirectiveReader.php:47
- type SqlFaker\Compiler\Bison\Directive\ExpectDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/ExpectDirectiveReader.php:42
- type SqlFaker\Compiler\Bison\Directive\ParamDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/ParamDirectiveReader.php:46
- type SqlFaker\Compiler\Bison\Directive\PrecedenceDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/PrecedenceDirectiveReader.php:61
- type SqlFaker\Compiler\Bison\Directive\StartDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/StartDirectiveReader.php:42
- type SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:58
- type SqlFaker\Compiler\Bison\Directive\TokenDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/TokenDirectiveReader.php:85
- type SqlFaker\Compiler\Bison\Directive\TypeDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/TypeDirectiveReader.php:56
- type SqlFaker\Compiler\Bison\Directive\UnknownDirectiveReader packages/sql-faker/src/Compiler/Bison/Directive/UnknownDirectiveReader.php:58
- type SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:32
- type SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:69
- type SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:86
- type SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:115
- type SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:132
- type SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:144
- type SqlFaker\Compiler\Bison\Rule\BisonAlternativeReader packages/sql-faker/src/Compiler/Bison/Rule/BisonAlternativeReader.php:156
- type SqlFaker\Compiler\Bison\Rule\BisonRuleReader packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:39
- type SqlFaker\Compiler\Bison\Rule\BisonRuleReader packages/sql-faker/src/Compiler/Bison/Rule/BisonRuleReader.php:70