]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
In the LEMON parser generator, provide reduce actions with access to the
authordrh <drh@noemail.net>
Fri, 15 Dec 2017 12:22:21 +0000 (12:22 +0000)
committerdrh <drh@noemail.net>
Fri, 15 Dec 2017 12:22:21 +0000 (12:22 +0000)
lookahead token.

FossilOrigin-Name: 42af190f4f86ad60de02800054010fafd484ac86ca41e2a13799b2e583eea98c

manifest
manifest.uuid
tool/lempar.c

index 1c8585e662181c72baeff72af974aadb014d49ae..40cc2db6527d20b09d9eb9557cf0f2b81f3fa678 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C In\svalueFromExpr()\sonly\sgenerate\sa\sOOM\sfault\sif\sthere\shave\sbeen\snow\sprior\nfaults.
-D 2017-12-13T23:47:55.478
+C In\sthe\sLEMON\sparser\sgenerator,\sprovide\sreduce\sactions\swith\saccess\sto\sthe\nlookahead\stoken.
+D 2017-12-15T12:22:21.137
 F Makefile.in 6a879cbf01e37f9eac131414955f71774b566502d9a57ded1b8585b507503cb8
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc a2492b29176edc3c754aa7a2f7daa20cd3fa20a56e3ee64e376092836177c42a
@@ -1602,7 +1602,7 @@ F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
 F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
 F tool/kvtest-speed.sh 4761a9c4b3530907562314d7757995787f7aef8f
 F tool/lemon.c e6056373044d55296d21f81467dba7632bbb81dc49af072b3f0e76338771497e
-F tool/lempar.c 105d0d9cbe5a25d24d4769241ffbfc63ac7c09e6ccee0dc43dcc8a4c4ae4e426
+F tool/lempar.c 967ebf585cd09b11b89d255d213865109a9c4ff075680d22580a2826de288c89
 F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9
 F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
 F tool/logest.c 11346aa019e2e77a00902aa7d0cabd27bd2e8cca
@@ -1680,7 +1680,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 6de21deac469ab25378656f6f58115a92f5892428c6f2f3545c9bafac37e4a41
-R 44abcc3575bcbddb8f261c0eaf812ba5
+P 3765aaf712998af5ffb6bc680a0c1419f2b5deb47ecbc1835ba5879127c4dbe3
+R 545f6d4adf455d1fa5987c428909cf33
 U drh
-Z 3fcdf29f818607817f06d87e8d680060
+Z 7981b7f16ad8b88f8d8fe8aa12f607a9
index f81e89e40c39e2c2759224cee0424d029620b195..999df6a24e9b5c2b0291156497588f9c18da42a5 100644 (file)
@@ -1 +1 @@
-3765aaf712998af5ffb6bc680a0c1419f2b5deb47ecbc1835ba5879127c4dbe3
\ No newline at end of file
+42af190f4f86ad60de02800054010fafd484ac86ca41e2a13799b2e583eea98c
\ No newline at end of file
index 37a589219535f59df09a9301f977ba28ef8130e4..da81ddd4bc068ba0d69911dc9f2cc429e8864173 100644 (file)
@@ -651,10 +651,18 @@ static void yy_accept(yyParser*);  /* Forward Declaration */
 /*
 ** Perform a reduce action and the shift that must immediately
 ** follow the reduce.
+**
+** The yyLookahead and yyLookaheadToken parameters provide reduce actions
+** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
+** if the lookahead token has already been consumed.  As this procedure is
+** only called from one place, optimizing compilers will in-line it, which
+** means that the extra parameters have no performance impact.
 */
 static void yy_reduce(
   yyParser *yypParser,         /* The parser */
-  unsigned int yyruleno        /* Number of the rule by which to reduce */
+  unsigned int yyruleno,       /* Number of the rule by which to reduce */
+  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
+  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
 ){
   int yygoto;                     /* The next state */
   int yyact;                      /* The next action */
@@ -853,7 +861,7 @@ void Parse(
 #endif
       yymajor = YYNOCODE;
     }else if( yyact <= YY_MAX_REDUCE ){
-      yy_reduce(yypParser,yyact-YY_MIN_REDUCE);
+      yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor);
     }else{
       assert( yyact == YY_ERROR_ACTION );
       yyminorunion.yy0 = yyminor;