/ File History
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History of tool/lempar.c

2018-07-22
21:23
Fix more harmless compiler warnings seen with MSVC. file: [6020ce61] check-in: [edab5666] user: mistachkin branch: trunk, size: 36636
2018-07-09
22:49
Fixes for various harmless compiler warnings. file: [428a0507] check-in: [5023b1b8] user: drh branch: trunk, size: 36603
2018-07-01
16:05
Quick patch to the Lemon parser template to avoid an array overread reported by OSSFuzz. A proper fix involves enhancements to the table generators in Lemon to make the overread impossible. That fix will take longer to implement. The current check-in is a stop-gap. file: [a6ebc202] check-in: [3f6730be] user: drh branch: trunk, size: 36567
2018-06-30
19:12
Merge all changes from the weak-fallback branch except those related to the weak-fallback feature itself. file: [6f64bc81] check-in: [aad718fb] user: dan branch: exp-window-functions, size: 36507
2018-06-29
17:44
Instead of using a lemon %fallback directive, have the tokenizer try to figure out whether an instance of "WINDOW" should be TK_WINDOW or TK_ID. file: [afc03d26] check-in: [022079cb] user: dan branch: weak-fallback, size: 36803
2018-06-28
03:38
Introduce the concept of "weak fallback" in the parser. A weak fallback only occurs if a syntax error would result otherwise. file: [c7371bad] check-in: [c41d7079] user: drh branch: weak-fallback, size: 36528
2018-04-23
00:25
Fix an unreachable branch associated with stack overflow in the LEMON-generated parser. file: [bf7db78e] check-in: [e3064ba3] user: drh branch: trunk, size: 36162
2018-04-21
22:40
Performance improvements on the main loop of the LEMON-generated parser. file: [01f28a4d] check-in: [fec1ebad] user: drh branch: trunk, size: 36156
13:51
Add the %extra_context directive to lemon, as an alternative to %extra_argument. Use this to improve the performance of the parser. file: [8ce83cbe] check-in: [be47a6f5] user: drh branch: trunk, size: 35736
2018-02-09
15:04
Fix a harmless compiler warning. file: [468a155e] check-in: [a6c31154] user: drh branch: trunk, size: 35159
2018-01-17
13:15
Fix harmless compiler warnings, mostly unused parameters for UDFs in the CLI. file: [da840fc8] check-in: [bfbeffab] user: drh branch: trunk, size: 35142
2017-12-27
17:36
The previous check-in had an error in the coverage reporting logic. file: [dddd4f59] check-in: [ec9b19eb] user: drh branch: lemon-improvements, size: 35095
17:14
Change the coverage measurement logic in the lemon-generated parser so that it only checks for coverage of state/lookahead pairs that are valid syntax. It turns out that some states are unreachable if the lookahead is not valid syntax, because the states are only reachable through a shift following a reduce, and the reduce does not happen if the lookahead is a syntax error. file: [1b1279a3] check-in: [9dce4650] user: drh branch: lemon-improvements, size: 35084
16:13
In the lemon-generated parser, do not report the End-of-input character and the wildcard character as missed coverage. file: [48ca9d9f] check-in: [3fe96487] user: drh branch: lemon-improvements, size: 34823
2017-12-26
18:32
Change the lemon-parser coverage report format to report all state/lookahead pairs and indicate on each whether it is hit or missed. file: [64e760f7] check-in: [86e30fc2] user: drh branch: lemon-improvements, size: 34787
18:04
Add support for measuring and reporting coverage of the parser state machine using the SQLITE_TESTCTRL_PARSER_COVERAGE test-control. file: [2a688bf3] check-in: [1253a872] user: drh branch: lemon-improvements, size: 34735
2017-12-25
04:15
Enhance LEMON so that it generates the action table in such a way that no range check is needed on the lookahead table to verify that the next input token is valid. This makes the lookahead table slightly larger (about 120 bytes) but helps the parser to run faster. file: [427ee280] check-in: [7eb0198d] user: drh branch: lemon-improvements, size: 33701
00:10
In the LEMON-generated parser, avoid unnecessary tests for the acceptance state. file: [8062f219] check-in: [fdbb35c5] user: drh branch: lemon-improvements, size: 34075
2017-12-24
23:38
In the LEMON-generated parser, rearrange the meanings of integer action codes so that reduce actions occur last. This means that the most common case (reduce actions) can be recognized with a single comparison operation, thus speeding up the main parser loop, slightly. file: [c8dd4dcf] check-in: [7bfe7a36] user: drh branch: lemon-improvements, size: 34082
14:14
Improved parser tracing output. file: [a427c237] check-in: [c4951833] user: drh branch: span-refactor, size: 34082
2017-12-15
12:22
In the LEMON parser generator, provide reduce actions with access to the lookahead token. file: [967ebf58] check-in: [42af190f] user: drh branch: trunk, size: 33531
2017-10-02
02:32
Improvements to a comment in lempar.c. No code changes. file: [105d0d9c] check-in: [8000d230] user: drh branch: trunk, size: 33004
2017-07-04
12:50
Fix a problem in the lempar.c Lemon template for YYSTACKDEPTH<=0 introduced by check-in [36e54cd8b1fb37] file: [10579a61] check-in: [268a40f4] user: drh branch: trunk, size: 32946
2017-06-28
15:01
Faster parser stack overflow detection. file: [f0dc07c2] check-in: [36e54cd8] user: drh branch: trunk, size: 32920
13:47
In the lemon-generated parser, store the number of symbols on the RHS of each rule as a negative number and add it to the stack pointer, rather than storing the value as a positive and subtracting it. This makes the parser faster. file: [1653b070] check-in: [b362f0d8] user: drh branch: trunk, size: 32819
11:56
In the lemon-generated parser, automatically promote SHIFTREDUCE actions on nonterminal systems to pure REDUCE actions, for a performance enhancement. file: [12d9fc3b] check-in: [c46d94a8] user: drh branch: trunk, size: 32821
2017-01-28
20:46
In the amalgamation, allocate the parser engine object from stack rather than from heap, for improved performance. This only happens in the amalgamation, since otherwise the sqlite3RunParser() routine does not know the object size. file: [db1bdb48] check-in: [4fe879d4] user: drh branch: trunk, size: 32649
2016-12-06
17:59
In the LEMON parser-generator, fix the stack overflow processing so that it correct invokes the destructor on the top-level of the parse stack. file: [320d630b] check-in: [e8247065] user: drh branch: trunk, size: 32271
2016-10-04
12:20
Fix a problem with the lempar.c parser template. file: [7cf04777] check-in: [3a9d802f] user: drh branch: trunk, size: 32244
2016-08-10
13:30
Improved comments on the lempar.c parser template. Adjust the YY_SHIFT_USE_DFLT constant in the Lemon-generated parser tables so as to guarantee that it is always out of range of the yy_lookahead[] table. file: [147e42a5] check-in: [83622f3f] user: drh branch: trunk, size: 32245
01:43
Performance optimization in the yy_find_shift_action() routine of the Lemon-generated parser. file: [321ebbf1] check-in: [ba6663be] user: drh branch: trunk, size: 32038
2016-07-12
19:54
Fix the error counter reset in Lemon generated parsers. This has no effect on SQLite. file: [57ffa985] check-in: [3ef93950] user: drh branch: trunk, size: 32167
2016-07-08
19:54
Another attempt to fix error handling in Lemon. This change is a no-op for SQLite's usage. file: [77c685a6] check-in: [e1d8ef31] user: drh branch: trunk, size: 32171
2016-07-05
16:11
More fixes to Lemon so that it automatically resets its error counter at the end of a parse. file: [072ff998] check-in: [2683b375] user: drh branch: trunk, size: 32104
12:47
Attempt to reset the error count in the Lemon-generated parser after a parse failure. file: [f2c88a13] check-in: [91889fa3] user: drh branch: trunk, size: 32039
2016-06-06
18:17
Fix lempar.c so that the shift-reduce optimization works for error processing. This is a Lemon issue only and has no impact on SQLite. file: [8c4e9d85] check-in: [3665a2f5] user: drh branch: trunk, size: 31971
13:24
Initialize the yyerrcnt variable in the lemon parser template. This has no effect on SQLite itself. file: [66a16b5e] check-in: [45531654] user: drh branch: trunk, size: 31973
2016-05-27
04:10
Fix Lemon so that it actually works with -DYYSTACKDEPTH=0. file: [f06b7e98] check-in: [a9be4c2d] user: drh branch: trunk, size: 31912
01:07
Fix the Lemon-generated parser so that it compiles with -DYYSTACKDEPTH=0. It does compile now, but there are subtle issues still. file: [7689ddc4] check-in: [28d439f8] user: drh branch: trunk, size: 31613
2016-05-24
18:55
Enhance Lemon and the parser template so that it can once again build parsers that have no unreachable branches. file: [1f69ad75] check-in: [41fd46e2] user: drh branch: trunk, size: 31613
00:40
Improvements to the initialization of the push-down automoton for the Lemon-generated parser. Smaller and faster. file: [8569dd3e] check-in: [3b28b68e] user: drh branch: trunk, size: 31642
2016-05-23
21:56
Use a pointer to the top of the stack rather than an index into the stack in the Lemon-generated parser template, for about 6.6% parser performance gain. file: [872383eb] check-in: [3c2a7705] user: drh branch: trunk, size: 31928
2016-03-16
19:45
Enhance Lemon so that it reorders the reduce rules such that rules without actions occur at the end and so that the first rule is number 0. This reduces the size of the jump table on the reduce switch, and helps the parser to run faster. file: [404ea3dc] check-in: [d5712f21] user: drh branch: trunk, size: 31547
2016-02-19
13:19
Omit the unused yyzerominor constant. file: [d5114c7d] check-in: [60ad68a9] user: drh branch: trunk, size: 31577
2016-02-17
12:34
More agressive use of /*A-overwrites-X*/ in the parser. Fix an off-by-one error in parser stack overflow detection. file: [5f626c74] check-in: [417e7777] user: drh branch: parser-performance, size: 31722
01:46
Further improvements to the Lemon-generated code for yy_reduce(). file: [c7dde8fa] check-in: [ef95a7d6] user: drh branch: parser-performance, size: 31716
01:18
In Lemon, add the ability for the left-most RHS label to be the same as the LHS label, causing the LHS values to be written directly into the stack. file: [08bbb0fb] check-in: [4bb94c7c] user: drh branch: parser-performance, size: 31752
2016-02-16
21:19
Experimental changes to Lemon for improved parser performance. file: [5478c529] check-in: [a65d583c] user: drh branch: parser-performance, size: 31852
01:01
Improve the Lemon parser template (lempar.c) so that it avoids unnecessary work when the grammer defines YYNOERRORRECOVERY (as SQLite does). Slightly smaller and faster code results. file: [ff776374] check-in: [9235b0cf] user: drh branch: trunk, size: 31718
2015-11-10
14:51
Improved output formatting for "PRAGMA parser_trace=ON;". file: [3ec1463a] check-in: [e43e1171] user: drh branch: trunk, size: 31619
2015-11-09
19:35
Fix a comment typo in the lempar.c template that was missed by the prior check-in. file: [02cd882b] check-in: [c4a7e93f] user: drh branch: parser-enhancements, size: 31320
19:33
Change the parser to use the standard "lempar.c" template over in the tool/ folder rather than the customized "lempar.c" found in src/. file: [586bd85c] check-in: [0a72991f] user: drh branch: parser-enhancements, size: 31320
15:06
Avoid recursion in the yy_find_shift_action() routine of the Lemon-generated parser, so that routine can be inlined, for a size reduction and performance increase. file: [4ff2afb0] check-in: [0557a179] user: drh branch: trunk, size: 29290
14:11
Size reduction and performance improvement in the stack-popping logic of the Lemon-generated parser. file: [5ea7cad7] check-in: [9748c48a] user: drh branch: trunk, size: 28900
2015-09-07
20:02
Fix an unreachable branch in the new parse automaton. file: [3617143d] check-in: [e9d604b4] user: drh branch: lemon-update, size: 29054
19:52
Change the parser engine so that it (once again) waits for a lookahead token before reducing, even in a SHIFTREDUCE action. file: [9bec5f85] check-in: [2c17a135] user: drh branch: lemon-update, size: 29050
18:23
For the Lemon-generated parser, add a new action type SHIFTREDUCE and use it to further compress the parser tables and improve parser performance. file: [15223666] check-in: [531c3974] user: drh branch: lemon-update, size: 28830
2009-11-03
19:18
Enhancements to lemon to generate more compact action tables and to avoid making array bounds tests that can never fail on action table calculations. file: [01ca97f8] check-in: [27d8e684] user: drh branch: trunk, size: 27773
2009-06-12
13:53
The lemon parser generator now inserts yytestcase() macros on reduce action and on each destructor, to verify that all have been executed. yytestcase() is a no-op by default but can be set to something more useful inside of %include. (CVS 6755) file: [2ed70b3f] check-in: [fe9c9177] user: drh branch: trunk, size: 27691
02:27
Modifications to the parser to eliminate unreachable code. (CVS 6749) file: [d2fbe360] check-in: [457e0b24] user: drh branch: trunk, size: 27313
2009-01-30
05:40
Minor changes to remove a few MSVC compiler warnings at /W3. Ticket #3610. (CVS 6215) file: [aeba88b8] check-in: [c74c78e4] user: shane branch: trunk, size: 26681
2008-12-11
02:20
Initialize the yyzerominor constant generated by lemon. (CVS 6016) file: [c9151d2a] check-in: [76c8f6ba] user: drh branch: trunk, size: 26655
2008-12-10
23:04
More code obfuscation designed to thwart compiler warning messages. (CVS 6015) file: [8b91df35] check-in: [0a1888a7] user: drh branch: trunk, size: 26697
18:03
More explicit type casting to silence VC++. (CVS 6006) file: [fece0da8] check-in: [14e6d19c] user: drh branch: trunk, size: 26686
2008-11-18
23:25
Fix to the lemon parser template when YYSTACKSIZE is 0 (dynamically allocated stack space). (CVS 5919) file: [9ef68098] check-in: [00ccc596] user: drh branch: trunk, size: 26617
2008-08-20
17:48
Modify the lemon parser template to avoid using zero-initialized constants when compiled with C++. Ticket #3288. (CVS 5571) file: [770dc64b] check-in: [71992f4a] user: drh branch: trunk, size: 26562
2008-07-28
19:34
Implement the "lookaside" memory allocation cache. Use of this cache makes the speed1.test script run about 15% faster. Added new interfaces to control the cache. (CVS 5488) file: [4d115ee7] check-in: [e48f9697] user: drh branch: trunk, size: 26498
2008-07-25
15:39
Add the capability to track the maximum depth of the LALR(1) parser stack so that critical applications can check to see if they are getting close to limits. (CVS 5481) file: [49e9b3b9] check-in: [ef0250f3] user: drh branch: trunk, size: 26315
2008-07-24
23:34
Reduce the size of the parser allocation. Add additional instrumentation to mem2. speed1*.test uses scratch malloc. (CVS 5472) file: [82ad5e30] check-in: [599a9dea] user: drh branch: trunk, size: 25839
2008-07-14
12:27
Fix additional typos in comments within lemon. Ticket #3215. (CVS 5405) file: [1a2caec8] check-in: [37214769] user: drh branch: trunk, size: 25819
2008-04-27
18:45
Fix the lemon parser generator so that it works again with the "error" symbol. Ticket #3079 (CVS 5052) file: [aab54f17] check-in: [20ed7492] user: drh branch: trunk, size: 25812
2008-04-11
14:56
Speed improvements by removing unnecessary memset() operations. Also: do not resize the opcode array of a virtual machine to its minimum size after code generation completes. The extra resize merely uses time. (CVS 4987) file: [5ebb066c] check-in: [25899555] user: drh branch: trunk, size: 25578
2008-01-23
12:52
Improvements to test coverage in the lemon-generated parser and in the sqlite3_get_table() interface. (CVS 4745) file: [ac41fdc4] check-in: [9f95d79d] user: drh branch: trunk, size: 25370
2008-01-22
23:37
Improved test coverage for the tokenizer and sqlite3_complete() interface. Fix bugs in parsing blob literals and SQL variables beginning with $. (CVS 4743) file: [2dafd3da] check-in: [c82033fa] user: drh branch: trunk, size: 25543
14:50
Remove dead code from the lemon-generated parser. Better testing of the sqlite3_file_control() interface, and in particular make sure the interface works on :memory: databases. (CVS 4738) file: [feab108e] check-in: [83ca4fc7] user: drh branch: trunk, size: 25534
01:48
Changes to lemon to generate additional comments in the output file and to remove unreachable code. Additional test cases for improved test coverage. (CVS 4736) file: [71f92c13] check-in: [2a0bc1e1] user: drh branch: trunk, size: 25557
2007-04-06
18:23
Additional coverage testing. (CVS 3823) file: [8f998bf8] check-in: [26b2e1ae] user: drh branch: trunk, size: 25555
2007-03-30
13:35
Make yypMinor available to the stack overflow callbacks in lemon generated parsers. This does not effect SQLite. (CVS 3761) file: [20851553] check-in: [70c8c7e2] user: drh branch: trunk, size: 25873
2007-03-29
02:26
Get LEMON working again when YYSTACKDEPTH is greater than zero. (CVS 3739) file: [707cc8d6] check-in: [e72c81db] user: drh branch: trunk, size: 25761
01:44
Lemon change: compile the resulting parser with -DYYSTACKDEPTH=0 or set the "%stack_size" parameter to 0 in the grammar and the parser stack will be dynamically allocated using realloc() and free(). The default behavior is to have a finite depth stack. (CVS 3738) file: [1c08d864] check-in: [06719b74] user: drh branch: trunk, size: 25734
2007-01-16
18:19
Additional memory initialization in lemon - bug reported from wireshark. Ticket #2172. Note this problem only comes up with certain grammars, and does not impact SQLite. On the other hand, it might cause SQLite to run slower. So we might want to revisit this change at some point. (CVS 3594) file: [fdc1672e] check-in: [d537aa5e] user: drh branch: trunk, size: 24561
2006-06-14
15:03
Fix a C++-ism in lempar.c. Ticket #1848. (CVS 3244) file: [0a2a5cf9] check-in: [a0a3b34d] user: drh branch: trunk, size: 24213
2006-06-13
11:15
Minor changes to lempar.c to reduce warnings on some compilers. (CVS 3224) file: [bd4efbd3] check-in: [dae71de1] user: drh branch: trunk, size: 24167
2006-06-10
13:29
Basic parsing of CREATE VIRTUAL TABLE statements. (CVS 3210) file: [880cc102] check-in: [66370cb9] user: drh branch: trunk, size: 24155
2006-05-08
15:14
Fix error processing in Lemon. SQLite does not use this feature of lemon so it is uneffected. (CVS 3181) file: [5112eda4] check-in: [864cac96] user: drh branch: trunk, size: 23725
2005-11-05
15:04
Improved table compression in lemon reduces the overall library size by about 1.5KiB. (CVS 2761) file: [424df14a] check-in: [86ac1147] user: drh branch: trunk, size: 23639
2005-05-11
14:28
Change to the lemon parser suggested by Geert Janssen. Appears to have no impact on SQLite. (CVS 2458) file: [f0c30abc] check-in: [6fda6008] user: drh branch: trunk, size: 23643
2005-02-06
02:45
Add the (highly experimental) omit_readlock pragma that disables the use of readlocks on read-only databases that are connected using ATTACH. (CVS 2317) file: [e8b0eb00] check-in: [2155448d] user: drh branch: trunk, size: 23604
2005-02-01
04:09
More performance tweaking in the parser. (CVS 2302) file: [9bf2f402] check-in: [a3d12726] user: drh branch: trunk, size: 23055
03:20
Lemon optimization: When doing a shift following a reduce that pops one or more elements off the stack, no need to check for stack overflow. (CVS 2300) file: [38b1f1fc] check-in: [adcd9a3f] user: drh branch: trunk, size: 23026
2004-10-06
15:41
Convert many constants to have type "const". (CVS 2006) file: [1e61d2b6] check-in: [d790c84c] user: drh branch: trunk, size: 22548
2003-12-22
14:53
Optimizations to the LEMON parser template. (CVS 1143) file: [0b5e7a58] check-in: [06db29df] user: drh branch: trunk, size: 22530
2003-10-22
22:15
Comment changes to the lemon parser template. Change some sqliteMalloc() calls to sqliteMallocRaw() for speed. Update the website template. (CVS 1114) file: [686d85ff] check-in: [c637caf1] user: drh branch: trunk, size: 22609
2003-10-21
16:34
Fix bugs in lemon associated with the change to a perfect hash table. (CVS 1113) file: [043b18f4] check-in: [c0d1b269] user: drh branch: trunk, size: 22340
13:16
Convert lemon to use a single perfect hash table for storing the actions. This should make the resulting parser both smaller and faster. (CVS 1112) file: [a3406868] check-in: [4f955c00] user: drh branch: trunk, size: 22339
2002-06-06
18:54
Added the %fallback directive to the lemon parser generator and used this in the parser to make the parse tables much smaller. This reduced the size of the library by 15K. (CVS 605) file: [73a991cc] check-in: [7ac5bd29] user: drh branch: trunk, size: 21803
2002-03-11
13:55
Change the way that lemon handles %extra_argument. (CVS 427) file: [ee508b94] check-in: [ffc387a4] user: drh branch: trunk, size: 20384
2002-03-10
21:21
Bug fix: updates within a transaction would fail if there was existed a temporary table. (CVS 425) file: [5c7d2b78] check-in: [02cc2d60] user: drh branch: trunk, size: 19924
2002-02-23
19:39
Modify lemon to use much less memory for its parser tables. This reduces the size of the library by 50K, which is important for an embedded library. (CVS 389) file: [2ff25518] check-in: [67a135a0] user: drh branch: trunk, size: 19918
2001-09-16
00:13
Disclaimed copyright. Preparing for release 2.0. (CVS 250) file: [9b604e6a] check-in: [4e926efe] user: drh branch: trunk, size: 19870
2001-09-14
16:42
Bug fixes and speed improvements. Delete is still slow. (CVS 244) file: [276d8ab7] check-in: [7da856cd] user: drh branch: trunk, size: 20671
2001-04-03
16:53
Bug fixes from Oleg Oleinick (CVS 195) file: [943b476d] check-in: [1f0197d5] user: drh branch: trunk, size: 20629
2000-05-29
14:26
initial check-in of the new version (CVS 1) file: [a1eec94d] check-in: [6f3655f7] user: drh branch: trunk, size: 20681 Added