From: drh
Date: Fri, 3 Jul 2020 18:07:22 +0000 (+0000)
Subject: Update the lemon documentation to match recent enhancements.
X-Git-Tag: version-3.33.0~74
X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f0d37b57e692353a8412454c02572f3177753f7;p=thirdparty%2Fsqlite.git
Update the lemon documentation to match recent enhancements.
FossilOrigin-Name: ca7630a5772ab919482a3629e11627143a1e1ec290a570ce4188189e671f9015
---
diff --git a/doc/lemon.html b/doc/lemon.html
index 17988deef4..714cbfa5b2 100644
--- a/doc/lemon.html
+++ b/doc/lemon.html
@@ -104,9 +104,13 @@ Write all output files into directory. Normally, output files
are written into the directory that contains the input grammar file.
-Dname
Define C preprocessor macro name. This macro is usable by
-"%ifdef" and
-"%ifndef" lines
+"%ifdef",
+"%ifndef", and
+"%if lines
in the grammar file.
+-E
+Run the "%if" preprocessor step only and print the revised grammar
+file.
-g
Do not generate a parser. Instead write the input grammar to standard
output with all comments, actions, and other extraneous text removed.
@@ -555,9 +559,11 @@ other than that, the order of directives in Lemon is arbitrary.
%default_destructor
%default_type
%destructor
+%else
%endif
%extra_argument
%fallback
+%if
%ifdef
%ifndef
%include
@@ -737,10 +743,11 @@ arguments are tokens which fall back to the token identified by the first
argument.
-The %ifdef, %ifndef, and %endif directives
+The %if directive and its friends
-The %ifdef, %ifndef, and %endif directives
-are similar to #ifdef, #ifndef, and #endif in the C-preprocessor,
+
The %if, %ifdef, %ifndef, %else,
+and %endif directives
+are similar to #if, #ifdef, #ifndef, #else, and #endif in the C-preprocessor,
just not as general.
Each of these directives must begin at the left margin. No whitespace
is allowed between the "%" and the directive name.
@@ -749,12 +756,22 @@ is allowed between the "%" and the directive name.
"%endif" is
ignored unless the "-DMACRO" command-line option is used. Grammar text
betwen "%ifndef MACRO" and the next nested "%endif" is
-included except when the "-DMACRO" command-line option is used.
-
-Note that the argument to %ifdef and %ifndef must
-be a single preprocessor symbol name, not a general expression.
-There is no "%else" directive.
-
+included except when the "-DMACRO" command-line option is used.
+
+
The text in between "%if CONDITIONAL" and its
+corresponding %endif is included only if CONDITIONAL
+is true. The CONDITION is one or more macro names, optionally connected
+using the "||" and "&&" binary operators, the "!" unary operator,
+and grouped using balanced parentheses. Each term is true if the
+corresponding macro exists, and false if it does not exist.
+
+An optional "%else" directive can occur anywhere in between a
+%ifdef, %ifndef, or %if directive and
+its corresponding %endif.
+
+Note that the argument to %ifdef and %ifndef is
+intended to be a single preprocessor symbol name, not a general expression.
+Use the "%if" directive for general expressions.
The %include directive
diff --git a/manifest b/manifest
index ea1399f6aa..a369c187d9 100644
--- a/manifest
+++ b/manifest
@@ -1,9 +1,10 @@
B 7a876209a678a34c198b54ceef9e3c041f128a14dc73357f6a57cadadaa6cf7b
-C If\sthe\samalgamation\sis\sbuilt\susing\sOPT_FEATURE_FLAGS\s=\s\n-DSQLITE_UDL_CAPABLE_PARSER\sthen\sit\scan\sbe\scompiled\swith\sor\swithout\nthe\s-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT\soption\sand\sit\sworks\seither\sway.
-D 2020-07-03T17:24:35.418
+C Update\sthe\slemon\sdocumentation\sto\smatch\srecent\senhancements.
+D 2020-07-03T18:07:22.898
F Makefile.in 19374a5db06c3199ec1bab71ab74a103d8abf21053c05e9389255dc58083f806
F Makefile.msc 48f5a3fc32672c09ad73795749f6253e406a31526935fbbffd8f021108d54574
F autoconf/Makefile.am a8d1d24affe52ebf8d7ddcf91aa973fa0316618ab95bb68c87cabf8faf527dc8
+F doc/lemon.html 1edc0f916e771212792d4d077aedc05168bf13fd65d64d41b2c13e46ac0063a8
F ext/fts3/fts3.c 5ffabd0d13210fb9cfe1c08184201282722adfeea49cd9e8e2ae29d1fefd7fcb
F ext/fts3/fts3_write.c d1258a4ec15465304421ba6c1f0937bf9c0bd71af85fae49a8d7b68c2af97d4f
F ext/lsm1/lsm_unix.c 11e0a5c19d754a4e1d93dfad06de8cc201f10f886b8e61a4c599ed34e334fc24
@@ -42,7 +43,7 @@ F tool/mksqlite3c.tcl f4ef476510eca4124c874a72029f1e01bc54a896b1724e8f9eef0d8bfa
F tool/mksqlite3h.tcl 1f5e4a1dbbbc43c83cc6e74fe32c6c620502240b66c7c0f33a51378e78fc4edf
F tool/showlocks.c 9cc5e66d4ebbf2d194f39db2527ece92077e86ae627ddd233ee48e16e8142564
F tool/speed-check.sh 615cbdf50f1409ef3bbf9f682e396df80f49d97ed93ed3e61c8e91fae6afde58
-P 951d22b72f80de9e23df645abcc3d88ca1a275b46ea23b84152ef48716922b37
-R d9d05305347b9302aaa0f35e8a659f07
+P 1f96a29dd8654ee30d36982a8bcd3f17a4b9193d3879fdb38fa3f03eeeff3080
+R 79a8d1ad41b0c1babbad2c5c324665c3
U drh
-Z d4f97e7ba76a75a88b5069bbca131775
+Z 2f120daeb9a5bbdda2feb88571bfebc7
diff --git a/manifest.uuid b/manifest.uuid
index 6b1f94e00b..7a72156d69 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-1f96a29dd8654ee30d36982a8bcd3f17a4b9193d3879fdb38fa3f03eeeff3080
\ No newline at end of file
+ca7630a5772ab919482a3629e11627143a1e1ec290a570ce4188189e671f9015
\ No newline at end of file