Add the %extra_context directive to lemon, as an alternative to %extra_argument.

Use this to improve the performance of the parser.

FossilOrigin-Name: be47a6f5262a43f477700579512fe7112a0872faedcbbe5c3383d13a08af6440
This commit is contained in:
drh
2018-04-21 13:51:42 +00:00
parent f3d7bbb767
commit fb32c44e41
8 changed files with 125 additions and 56 deletions
+3 -2
View File
@@ -24,8 +24,9 @@
%token_type {Token}
%default_type {Token}
// The generated parser function takes a 4th argument as follows:
%extra_argument {Parse *pParse}
// An extra argument to the constructor for the parser, which is available
// to all actions.
%extra_context {Parse *pParse}
// This code runs whenever there is a syntax error
//