Skip to content

add a raw ParseTokenizer interface to call yyParse under the hood#4250

Merged
sougou merged 1 commit intovitessio:masterfrom
tinyspeck:quiet-unused-yyparse
Oct 8, 2018
Merged

add a raw ParseTokenizer interface to call yyParse under the hood#4250
sougou merged 1 commit intovitessio:masterfrom
tinyspeck:quiet-unused-yyparse

Conversation

@demmer
Copy link
Copy Markdown
Member

@demmer demmer commented Oct 8, 2018

The prior change to use pooled parsers meant that the generated
yyParse function was unused, triggering warnings from the unused
vet tool.

Add a public interface ParseTokenizer so that these unused warnings
no longer show up. Plus this could be useful for some third-party
that wants to have raw access to the underlying tokenizer / parser.

The prior change to use pooled parsers meant that the generated
yyParse function was unused, triggering warnings from the `unused`
vet tool.

Add a public interface `ParseTokenizer` so that these unused warnings
no longer show up. Plus this _could_ be useful for some third-party
that wants to have raw access to the underlying tokenizer / parser.

Signed-off-by: Michael Demmer <mdemmer@slack-corp.com>
@demmer demmer requested review from danieltahara and sougou October 8, 2018 14:40
@demmer
Copy link
Copy Markdown
Member Author

demmer commented Oct 8, 2018

@sougou / @danieltahara I ran into an issue while developing a new grammar feature where the recent change to pool parsers meant that yyParse was no longer being called.

I think it's best if we either silence that warning altogether for this whole package or we do something like this to actually call yyParse. I have no allegiance to the particular function I chose, it just seemed like the simplest.

@danieltahara
Copy link
Copy Markdown

Seems completely reasonable.

@sougou sougou merged commit 22b54de into vitessio:master Oct 8, 2018
@rafael rafael deleted the quiet-unused-yyparse branch October 29, 2018 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants