diff options
author | drh <drh@noemail.net> | 2020-09-01 11:20:03 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2020-09-01 11:20:03 +0000 |
commit | 60c71b02ca6d2a964ab4ae9bbdd7dc0814b7402d (patch) | |
tree | 1faf5d795186a1e9617600054a121f7cdabdb538 /src | |
parent | fa17e134b2a006b4f5463743a72ab720502a5ecc (diff) | |
download | sqlite-60c71b02ca6d2a964ab4ae9bbdd7dc0814b7402d.tar.gz sqlite-60c71b02ca6d2a964ab4ae9bbdd7dc0814b7402d.zip |
Lemon updates: (1) include the #defines for all tokens in the generated C
file, so that the C-file can be stand-alone. (2) If the grammar begins with
a %include {...} directive on line one, make that directive the header for
the generated C file. (3) Enhance the lemon.html documentation.
FossilOrigin-Name: 84d54eb35716174195ee7e5ac846f47308e5dbb0056e8ff568daa133860bab74
Diffstat (limited to 'src')
-rw-r--r-- | src/parse.y | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/parse.y b/src/parse.y index c44d6563a..d3ec2b3da 100644 --- a/src/parse.y +++ b/src/parse.y @@ -1,5 +1,6 @@ +%include { /* -** 2001 September 15 +** 2001-09-15 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: @@ -9,11 +10,16 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* -** This file contains SQLite's grammar for SQL. Process this file -** using the lemon parser generator to generate C code that runs -** the parser. Lemon will also generate a header file containing -** numeric codes for all of the tokens. +** This file contains SQLite's SQL parser. +** +** The canonical source code to this file ("parse.y") is a Lemon grammar +** file that specifies the input grammar and actions to take while parsing. +** That input file is processed by Lemon to generate a C-language +** implementation of a parser for the given grammer. You might be reading +** this comment as part of the translated C-code. Edits should be made +** to the original parse.y sources. */ +} // All token codes are small integers with #defines that begin with "TK_" %token_prefix TK_ |