diff options
author | drh <> | 2024-01-26 20:34:48 +0000 |
---|---|---|
committer | drh <> | 2024-01-26 20:34:48 +0000 |
commit | 82bf13796adf380c70badde482e1e05c5d151128 (patch) | |
tree | 5a9563f6264d914c0eacdc2626425d68ee1eb5d3 /doc | |
parent | 539085ddf5d575e3be4ace469551d4d7ff92b975 (diff) | |
download | sqlite-82bf13796adf380c70badde482e1e05c5d151128.tar.gz sqlite-82bf13796adf380c70badde482e1e05c5d151128.zip |
Experimental changes that prevent parser stack overflows by growing the
parser stack with heap memory when it reaches its limit.
FossilOrigin-Name: 3fd062905fc20507b7cfc97fa976ac5b57c5b68926bf9136bd5ea4265d2d6528
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lemon.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/lemon.html b/doc/lemon.html index 66665f46f..4147d9b31 100644 --- a/doc/lemon.html +++ b/doc/lemon.html @@ -683,6 +683,7 @@ other than that, the order of directives in Lemon is arbitrary.</p> <li><tt><a href='#pifdef'>%endif</a></tt> <li><tt><a href='#extraarg'>%extra_argument</a></tt> <li><tt><a href='#pfallback'>%fallback</a></tt> +<li><tt><a href='#reallc'>%free</a></tt> <li><tt><a href='#pifdef'>%if</a></tt> <li><tt><a href='#pifdef'>%ifdef</a></tt> <li><tt><a href='#pifdef'>%ifndef</a></tt> @@ -693,6 +694,7 @@ other than that, the order of directives in Lemon is arbitrary.</p> <li><tt><a href='#parse_accept'>%parse_accept</a></tt> <li><tt><a href='#parse_failure'>%parse_failure</a></tt> <li><tt><a href='#pright'>%right</a></tt> +<li><tt><a href='#reallc'>%realloc</a></tt> <li><tt><a href='#stack_overflow'>%stack_overflow</a></tt> <li><tt><a href='#stack_size'>%stack_size</a></tt> <li><tt><a href='#start_symbol'>%start_symbol</a></tt> @@ -1200,6 +1202,21 @@ match any input token.</p> the wildcard token and some other token, the other token is always used. The wildcard token is only matched if there are no alternatives.</p> +<a id='reallc'></a> +<h4>4.4.26 The <tt>%realloc</tt> and <tt>%free</tt> directives</h4> + +<p>The <tt>%realloc</tt> and <tt>%free</tt> directives defines function +that allocate and free heap memory. The signatures of these functions +should be the same as the realloc() and free() functions from the standard +C library. + +<p>If both of these functions are defined +then these functions are used to allocate and free +memory for supplemental parser stack space, if the initial +parse stack space is exceeded. The initial parser stack size +is specified by either <tt>%stack_size</tt> or the +-DYYSTACKDEPTH compile-time flag. + <a id='errors'></a> <h2>5.0 Error Processing</h2> @@ -1224,6 +1241,7 @@ to begin parsing a new file. This is what will happen at the very first syntax error, of course, if there are no instances of the "error" non-terminal in your grammar.</p> + <a id='history'></a> <h2>6.0 History of Lemon</h2> |