Commit Graph

46 Commits

Author SHA1 Message Date
drh
f16371d650 Enhancements to lemon to generate more compact action tables and to avoid
making array bounds tests that can never fail on action table calculations.

FossilOrigin-Name: 27d8e684db4651155c4bcb8bb44bf1c692b8c48b
2009-11-03 19:18:31 +00:00
drh
8a415d3743 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)

FossilOrigin-Name: fe9c9177340a3dc372ffa1b851030d005e0c46db
2009-06-12 13:53:51 +00:00
drh
d3ec02d38e Modifications to the parser to eliminate unreachable code. (CVS 6749)
FossilOrigin-Name: 457e0b245b1833c0d297bc6f4ff9785e6a2cee02
2009-06-12 02:27:14 +00:00
shane
d87897dfa2 Minor changes to remove a few MSVC compiler warnings at /W3. Ticket #3610. (CVS 6215)
FossilOrigin-Name: c74c78e4eb7f6d674b7564b33387db996fbe5725
2009-01-30 05:40:27 +00:00
drh
15b024c22a Initialize the yyzerominor constant generated by lemon. (CVS 6016)
FossilOrigin-Name: 76c8f6ba87f333f15444ba5444bc675ec4cfd89e
2008-12-11 02:20:43 +00:00
drh
3abbd39a87 More code obfuscation designed to thwart compiler warning messages. (CVS 6015)
FossilOrigin-Name: 0a1888a7e6fb56e56d8078e7792379d908ba7a70
2008-12-10 23:04:13 +00:00
drh
b27b7f5d3b More explicit type casting to silence VC++. (CVS 6006)
FossilOrigin-Name: 14e6d19c3157ccdce170e769d678c7f472dd3db2
2008-12-10 18:03:45 +00:00
drh
4c6517848f Fix to the lemon parser template when YYSTACKSIZE is 0 (dynamically
allocated stack space). (CVS 5919)

FossilOrigin-Name: 00ccc5967f8912961029a3513445c5e2ac713560
2008-11-18 23:25:54 +00:00
drh
7a4dde7165 Modify the lemon parser template to avoid using zero-initialized constants
when compiled with C++.  Ticket #3288. (CVS 5571)

FossilOrigin-Name: 71992f4a3723418df5f16093aec92f1f95f0b604
2008-08-20 17:48:21 +00:00
drh
633e6d57d9 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)

FossilOrigin-Name: e48f9697e9fea339e150ddc32940760027dd07d9
2008-07-28 19:34:53 +00:00
drh
ec424a5be6 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)

FossilOrigin-Name: ef0250f3dc769a4acd534f31fa06d90922d4145b
2008-07-25 15:39:03 +00:00
drh
2abcd58f09 Reduce the size of the parser allocation. Add additional instrumentation
to mem2.  speed1*.test uses scratch malloc. (CVS 5472)

FossilOrigin-Name: 599a9dea8fc97d0e7f09e67c9954de8cc1b8748e
2008-07-24 23:34:07 +00:00
drh
34ff57b12f Fix additional typos in comments within lemon. Ticket #3215. (CVS 5405)
FossilOrigin-Name: 372147699585ca4bd11100983de924f63c5cfce5
2008-07-14 12:27:51 +00:00
drh
7f7c257b6b Fix the lemon parser generator so that it works again with the "error"
symbol.  Ticket #3079 (CVS 5052)

FossilOrigin-Name: 20ed749266d099eb35f40ca479db8baa75186b60
2008-04-27 18:45:10 +00:00
drh
26c9b5eaba 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)

FossilOrigin-Name: 2589955507fc1717891c4e07d1d658eb41660b87
2008-04-11 14:56:53 +00:00
drh
01495b9921 Improvements to test coverage in the lemon-generated parser and in the
sqlite3_get_table() interface. (CVS 4745)

FossilOrigin-Name: 9f95d79daeb5e7f6fd62f3c896dae4d332121d1c
2008-01-23 12:52:40 +00:00
drh
4b2f9368cb Improved test coverage for the tokenizer and sqlite3_complete() interface.
Fix bugs in parsing blob literals and SQL variables beginning with $. (CVS 4743)

FossilOrigin-Name: c82033faf8bdb83ce43f0dd1611408e7796d53de
2008-01-22 23:37:09 +00:00
drh
5517625960 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)

FossilOrigin-Name: 83ca4fc7dc18d6deca58fe4181905eb9754e03da
2008-01-22 14:50:16 +00:00
drh
c4dd3fd280 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)

FossilOrigin-Name: 2a0bc1e186532a0bfe36ca18fda74a5e7a199227
2008-01-22 01:48:05 +00:00
drh
bb5f18d2ca Additional coverage testing. (CVS 3823)
FossilOrigin-Name: 26b2e1aede3f776134b2d6e941d17a907843e650
2007-04-06 18:23:17 +00:00
drh
b601861cc3 Make yypMinor available to the stack overflow callbacks in lemon
generated parsers.  This does not effect SQLite. (CVS 3761)

FossilOrigin-Name: 70c8c7e2ce5213778e63c200a6637849920deea6
2007-03-30 13:35:05 +00:00
drh
b7bac72350 Get LEMON working again when YYSTACKDEPTH is greater than zero. (CVS 3739)
FossilOrigin-Name: e72c81dbb309709462e49c4e3e90c3e16ead1265
2007-03-29 02:26:45 +00:00
drh
b19fd012b0 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)

FossilOrigin-Name: 06719b741ab1a2df0371f6d587563cc81eb8880a
2007-03-29 01:44:45 +00:00
drh
cb6c565eab 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)

FossilOrigin-Name: d537aa5edecb5c7b84d8eb876453f385f6f3d91a
2007-01-16 18:19:12 +00:00
drh
4767d978de Fix a C++-ism in lempar.c. Ticket #1848. (CVS 3244)
FossilOrigin-Name: a0a3b34db86ef1c31d172ca1b56afd26d18e429f
2006-06-14 15:03:49 +00:00
drh
d9f291ea95 Minor changes to lempar.c to reduce warnings on some compilers. (CVS 3224)
FossilOrigin-Name: dae71de10d0f34a001b8070266d4016baafa6623
2006-06-13 11:15:47 +00:00
drh
e09daa90ac Basic parsing of CREATE VIRTUAL TABLE statements. (CVS 3210)
FossilOrigin-Name: 66370cb99bd93abb33e1e8433672da45e1795f78
2006-06-10 13:29:31 +00:00
drh
f3a5888dde Fix error processing in Lemon. SQLite does not use this feature of lemon
so it is uneffected. (CVS 3181)

FossilOrigin-Name: 864cac960390a31c240d34ffd62bb084ab780267
2006-05-08 15:14:19 +00:00
drh
ada354db0e Improved table compression in lemon reduces the overall library size
by about 1.5KiB. (CVS 2761)

FossilOrigin-Name: 86ac11476962727d2d40b62ce87d689c01969537
2005-11-05 15:03:59 +00:00
drh
29f214bdaa Change to the lemon parser suggested by Geert Janssen. Appears to have no
impact on SQLite. (CVS 2458)

FossilOrigin-Name: 6fda60083f258a4943c859d768ea7142de831594
2005-05-11 14:28:14 +00:00
drh
7bec505e26 Add the (highly experimental) omit_readlock pragma that disables the use
of readlocks on read-only databases that are connected using ATTACH. (CVS 2317)

FossilOrigin-Name: 2155448d2128119f74241da0ea07d6713b71765c
2005-02-06 02:45:41 +00:00
drh
161aba32be More performance tweaking in the parser. (CVS 2302)
FossilOrigin-Name: a3d12726bb7bce72b8266236800c07f22ac5212f
2005-02-01 04:09:36 +00:00
drh
490a73bcde 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)

FossilOrigin-Name: adcd9a3fa2a86464abd613aa88ae110b4799a241
2005-02-01 03:20:00 +00:00
drh
5719628afb Convert many constants to have type "const". (CVS 2006)
FossilOrigin-Name: d790c84c5a889928d07f5394fffef0cbb8d5f214
2004-10-06 15:41:16 +00:00
drh
3ddfdf7ac6 Optimizations to the LEMON parser template. (CVS 1143)
FossilOrigin-Name: 06db29df8f0c1cd29e696537e622f0c5456056f5
2003-12-22 14:53:19 +00:00
drh
8548a059ff Comment changes to the lemon parser template. Change some sqliteMalloc() calls
to sqliteMallocRaw() for speed.  Update the website template. (CVS 1114)

FossilOrigin-Name: c637caf13f579959ecdb6b134d0114e8efbcac60
2003-10-22 22:15:27 +00:00
drh
fdbf928b08 Fix bugs in lemon associated with the change to a perfect hash table. (CVS 1113)
FossilOrigin-Name: c0d1b26966aeb445fea5792e5a9e93632e758c2a
2003-10-21 16:34:41 +00:00
drh
8b582012de 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)

FossilOrigin-Name: 4f955c00076b16166ff837749efb84201eab3c3a
2003-10-21 13:16:03 +00:00
drh
0bd1f4ea5a 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)

FossilOrigin-Name: 7ac5bd293cbb2bf252f31f1571f7efac7e77280a
2002-06-06 18:54:39 +00:00
drh
1f245e488a Change the way that lemon handles %extra_argument. (CVS 427)
FossilOrigin-Name: ffc387a48a9864b7f323314fbf8295b5bb2a3bd1
2002-03-11 13:55:50 +00:00
drh
7218ac7098 Bug fix: updates within a transaction would fail if there was existed
a temporary table. (CVS 425)

FossilOrigin-Name: 02cc2d60b2a5ee50efdbd90df90810ba559a453f
2002-03-10 21:21:00 +00:00
drh
b29b0a5227 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)

FossilOrigin-Name: 67a135a051e7c96ddbfe85976539b4b8372c7026
2002-02-23 19:39:46 +00:00
drh
b19a2bc603 Disclaimed copyright. Preparing for release 2.0. (CVS 250)
FossilOrigin-Name: 4e926efe2b59adfec4086eb1d2ba830238facb4c
2001-09-16 00:13:26 +00:00
drh
a1b351af54 Bug fixes and speed improvements. Delete is still slow. (CVS 244)
FossilOrigin-Name: 7da856cd94d2572070e40762e5bc477679e60042
2001-09-14 16:42:12 +00:00
drh
960e8c6317 Bug fixes from Oleg Oleinick (CVS 195)
FossilOrigin-Name: 1f0197d504fa2bde15b287ac6c0102cacdb1e482
2001-04-03 16:53:21 +00:00
drh
75897234be initial check-in of the new version (CVS 1)
FossilOrigin-Name: 6f3655f79f9b6fc9fb7baaa10a7e0f2b6a512dfa
2000-05-29 14:26:00 +00:00