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:
+3
-2
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user