mistachkin
7a429658d7
Fix harmless compiler warning in LEMON.
...
FossilOrigin-Name: f61a70589ac7e05008a362bd9d5b7bde5d07a758
2014-01-14 10:17:21 +00:00
drh
03e1b1f5ff
In LEMON, limit the size of the grammar file to 100MB. This ensures that
...
the program will never experience integer overflow. To be doubly sure,
use calloc() instead of malloc() when allocating arrays.
FossilOrigin-Name: 29ba458d849ad8864711cbe59fb10447a947e06a
2014-01-11 12:52:25 +00:00
drh
ecaa9d399c
Add the "%token_class" directive to the LEMON parser generator. This opens up
...
the possibility of simplifying the parser. Also remove all calls to
sprintf(), strcpy(), and strcat() from LEMON to avoid compiler warnings
on OpenBSD. (Aside: It is this change to avoid harmless compiler warnings
that was the cause of the reason spat of bugs.)
FossilOrigin-Name: 8eb48c04bd0a14031488b3160fde67307eb8b35d
2014-01-11 03:27:37 +00:00
drh
61f92cd045
In LEMON, fix a bug in the text formatter introduced by the previous
...
commit. Also add the new "%token_class" directive for defining symbolic
names that stand any one of a collection of tokens.
FossilOrigin-Name: da7890ca6b1d8e511377a469047120220e8c3b2d
2014-01-11 03:06:18 +00:00
drh
898799fa00
Do not use sprintf(), strcpy() or strcat() in the implementation of the
...
lemon parser generator tool, to avoid compiler warnings in OpenBSD.
FossilOrigin-Name: e43c522dde01e134f1adc94f534d2b3eda74afc2
2014-01-10 23:21:00 +00:00
drh
2b51f2153b
Fix a harmless compiler warning in lemon.c.
...
FossilOrigin-Name: 62959c0ce3a2c486ebd82e6511efad0412b944a0
2013-10-11 23:01:02 +00:00
drh
01f75f2d68
In the lemon parser generator, change all hashes to unsigned to avoid
...
potential problems with signed integer overflow.
FossilOrigin-Name: 8d399a03de63c15908d63ed69140ee15c6275b8d
2013-10-02 20:46:30 +00:00
drh
f2f105d40e
Remove tab characters from source code files. Replace them with spaces.
...
FossilOrigin-Name: 7edd10a960d5ff121e470b0549b0aa9fb7760022
2012-08-20 15:53:54 +00:00
drh
8ba0d1cbca
In Lemon, when comparing the output to the *.h file to see if it has changed,
...
make sure that the proposed new output and the preexisting output are the
same size before deciding that they are the same.
FossilOrigin-Name: 0c2fb18d25217ada7e75dcab8b342bbc632875d8
2012-06-16 15:26:31 +00:00
drh
d25d692252
Fix a typecast problem in lemon that could cause problems on 64-bit machines.
...
FossilOrigin-Name: 4a5641cc0aa4c49762f4fe73dab4a6612631c0d2
2012-04-18 09:59:56 +00:00
drh
3cb2f6e60e
Cosmetic changes to lemon. No changes to core functionality nor impact on
...
SQLite.
FossilOrigin-Name: 393fc78a18004c839d889de2a25ec046ad6f13fc
2012-01-09 14:19:05 +00:00
drh
7dd1ac600e
Fix a bug in lemon in computation of which non-terminals can generate an
...
empty string. This bug and the fix make absolutely no difference for the
grammar used by SQLite, but it can make a difference when lemon is used
in other grammars.
FossilOrigin-Name: ce32775b232da894343f62deefaf19b0ec484636
2012-01-07 15:17:18 +00:00
drh
e0a59cf0e1
Fix a total unimportant file descriptor leak in lemon. This is to silence
...
warning messages.
FossilOrigin-Name: e95cf2c576dda656c0f31eeec3d98e911b9003a1
2011-08-30 00:58:58 +00:00
drh
57489b354d
Fix compiler warnings in lemon by removing some of the code added by
...
Ryan Gordon in [1e8b842039cc0].
FossilOrigin-Name: 76b18b2be072b9ea242df4c9535059f7b43f564b
2011-06-20 18:27:23 +00:00
drh
070d422d31
Add a missing check for out-of-memory in the lemon code generator.
...
FossilOrigin-Name: efb20b9da6c7cb310a449cc818eaccd3d5bb4ab3
2011-06-02 15:48:51 +00:00
drh
df60971765
Cherry-pick the lemon.c updates out of the lemon-update-2010 branch into
...
the trunk.
FossilOrigin-Name: 1541ae3fbd7b3d471e002c0ad14e7846f7ad9415
2010-11-23 20:55:27 +00:00
drh
dd7e9dba97
Improvements to the formatting of parse.out file from Lemon. Add the -r option
...
to Lemon to disable the state sorting, making debugging easier.
FossilOrigin-Name: a2eaf8294f6d3fb39548987d632e934bb5d71cc9
2010-07-19 01:52:07 +00:00
drh
f5c4e0f12a
Add the -p option to lemon to cause conflicts resolved by precedence rules
...
to appear in the parse.out file.
FossilOrigin-Name: fb6a59b0a905ddea071948f9a527483a1b1b219f
2010-07-18 11:35:53 +00:00
icculus
7b429aa6a8
Fixed compiler warning on Visual Studio.
...
FossilOrigin-Name: 83495128c820e963c70d11c3196f81d8cf01f867
2010-03-03 17:09:01 +00:00
icculus
d286fa6691
Whoops, that shouldn't have been in the merge. Removed buggy code.
...
FossilOrigin-Name: 643728003218c9841425dffb6fe506763859fd37
2010-03-03 17:06:32 +00:00
icculus
d49c1aa7a9
Use Strsafe() instead of strdup(). Fixes Visual Studio complaining.
...
FossilOrigin-Name: 89d8f98ea6d4d8bf871e08a8d8d1f0d2fd11aec1
2010-03-03 17:00:15 +00:00
icculus
05ac70ee0a
Merged trunk to lemon-update-2010 branch.
...
FossilOrigin-Name: 88b466bae47d006c48eff42ab271f05ff56d5ed1
2010-03-03 16:54:58 +00:00
icculus
866bf1e6a2
Repore error if the grammar has multiple %type lines for the same nonterminal.
...
FossilOrigin-Name: 721f33e7221c5fc907e9e293ac3242843f4fcfb7
2010-02-17 20:31:32 +00:00
icculus
d0d97b09c6
Fixed % formatting in some printf-style strings.
...
FossilOrigin-Name: f96add898f096cfc1e435c625ce74093d790b3c7
2010-02-17 20:22:10 +00:00
icculus
10163b7d82
Corrected error message (cut-and-paste bug).
...
FossilOrigin-Name: b3839f2aad00844c578d496c40481a39c018e4f6
2010-02-17 20:19:50 +00:00
icculus
a3191195af
Removed unused variables.
...
FossilOrigin-Name: ca570a02f5c5215098050de4eb551b2dcd11b1fd
2010-02-17 05:40:34 +00:00
icculus
8e15802812
Removed %expect directive, on drh's advice.
...
FossilOrigin-Name: b43ac3309e77dc8ea2952bf62da6eaad5aef6653
2010-02-16 16:09:03 +00:00
icculus
15a2cec1ed
Patched to compile. Accidentally removed va_list declaration.
...
FossilOrigin-Name: 673d470c0c14106da05461d355a0c09e5f62851d
2010-02-16 16:07:28 +00:00
icculus
1c11f74a8a
Removed the 80-char line formatting for ErrorMsg(), on dhr's suggestion.
...
FossilOrigin-Name: 132ea4e5d7f69fc307904f5086a72d8532e5aac6
2010-02-15 00:01:04 +00:00
icculus
9e44cf1a03
Make Lemon able to compile as C++ code.
...
FossilOrigin-Name: 75a1060b29eb4122487152b068e7d1073eb0ccab
2010-02-14 17:14:22 +00:00
icculus
d191282111
Added option to not clip error output.
...
This is useful for IDEs and other tools that benefit from full path
information, so they can jump directly to the error line in the source code.
FossilOrigin-Name: 90602030d18152a934644db119a291aa38fe3fd4
2010-02-14 05:42:46 +00:00
icculus
f5ad824071
Delete output files if this is a failed run.
...
Otherwise, the fail will stop a Makefile from progressing, but if you
immediately run the build again, Make will think the output files are up to
date, since they are newer (albeit incomplete/incorrect).
FossilOrigin-Name: e38c08d9cdeb0476ac1a77cd3f29f547a8205835
2010-02-14 05:34:42 +00:00
icculus
42585cf73a
Added %expect directive, to consider a certain number of conflicts "correct."
...
This has the side effect of changing the process exit code to never overflow.
FossilOrigin-Name: d8bab8cf0bc3fbd4c489c31a65d724dda2944d83
2010-02-14 05:19:56 +00:00
icculus
3e143bdfaf
Added -T option, to specify a template filename on the command line.
...
The default is still "lempar.c", though.
FossilOrigin-Name: e6cbe1e5ee80db282a41951b805b7bd8b13adf28
2010-02-14 00:48:49 +00:00
drh
8dc3e8f3e6
Another attempt at fixing the table generator in lemon. Again, this does
...
not effect the SQLite grammar.
FossilOrigin-Name: e22c090f35b3a2bac64781d33aa1123ed765dbbf
2010-01-07 03:53:03 +00:00
drh
cf3e518506
Fix an issue with lemon generating incorrect grammars. This issue does
...
not effect SQLite.
FossilOrigin-Name: 077a6bee2dd4668a5b13c37aa7d4c052350ec782
2010-01-06 13:07:30 +00:00
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
e594bc3595
Adjust the lemon implementation so that it always computes the same PDA
...
regardless of qsort() implementation on the host platform. In other words,
make all sorts in lemon stable.
FossilOrigin-Name: d66a0f31ebcc56e6f0f462b3db6aab54f7fab816
2009-11-03 13:02:25 +00:00
drh
c53eed1703
Change lemon so that it does not generate yytestcase() macros on destructor
...
cases since destructors are commonly unreachable in a reasonable grammar.
For the reduce-rule switch, gather all no-ops into the "default:" case. (CVS 6757)
FossilOrigin-Name: caebfe82cb1b1215a85ed48fe97360c5422c52e0
2009-06-12 17:46:19 +00:00
drh
7501301e8d
The previous check-in ((6755)) put in more yytestcase() macros than are
...
called for. This check-in addresses that problem. (CVS 6756)
FossilOrigin-Name: a5b182f93b9e57754c8b9507cf491a7bbf0fd127
2009-06-12 15:47:34 +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
1441f3e083
In lemon: omit unused entries from the end of the yyFallback array. (CVS 6754)
...
FossilOrigin-Name: 9cfbe2ba68470a2850a7d7a64eb088f7b422a3e5
2009-06-12 12:50:50 +00:00
drh
02368c983f
Fix a segfault in Lemon that occurs if the input grammar does not define
...
a type for tokens. This does not effect SQLite since the SQLite grammar
does define a type for tokens. (CVS 6451)
FossilOrigin-Name: 4424aee958b2e764a61141b5c66c063e36ed5aae
2009-04-05 15:18:02 +00:00
drh
15b024c22a
Initialize the yyzerominor constant generated by lemon. (CVS 6016)
...
FossilOrigin-Name: 76c8f6ba87f333f15444ba5444bc675ec4cfd89e
2008-12-11 02:20:43 +00:00
shane
5854393cd9
Added option (-l) to lemon parser to have it skip printing line numbers (#line ... ). (CVS 6008)
...
FossilOrigin-Name: ccb9393a7a10f0970419b860af293b0bdad7f894
2008-12-10 20:10:04 +00:00
drh
87cf137735
Explicit casts of the return from strlen() to int in lemon. This has
...
no effect on SQLite. It has no effect on any lemon-generated parser
with a grammar that is less than 2GB in size. Ticket #3293 . (CVS 5564)
FossilOrigin-Name: a519cdb2f46fffe16e666f161479a22463616cb3
2008-08-13 20:09:06 +00:00
drh
639efd0451
Fix token destructors in lemon generated parsers. Does not effect SQLite.
...
Ticket #3299 . (CVS 5563)
FossilOrigin-Name: 4887e8fc4af9e2963b3eff3187dee5b0d6297eb5
2008-08-13 20:04:29 +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
34ff57b12f
Fix additional typos in comments within lemon. Ticket #3215 . (CVS 5405)
...
FossilOrigin-Name: 372147699585ca4bd11100983de924f63c5cfce5
2008-07-14 12:27:51 +00:00
drh
b5bd49e9cb
Fix a bug in the #line generator of lemon. Ticket #3214 . (CVS 5404)
...
FossilOrigin-Name: dc697c26668929c4eed5ab8cde6975125a7e66c7
2008-07-14 12:21:08 +00:00