aboutsummaryrefslogtreecommitdiff
path: root/tool/lemon.c
Commit message (Collapse)AuthorAge
* Update the "msort" function in Lemon so that it works with lists of anydrh2025-06-06
| | | | | | | length, and also so that the sort is stable. This patch was motivated by [forum:/forumpost/63750d717c9ed961|forum post 63750d717c] but was independently developed, then tested by temporarily setting LISTSIZE to 2. FossilOrigin-Name: aba5c3135edf7de2798ad808fa0ff176fdba3f4a9b101f1f4210b441cba8e75d
* Fix a goofy hash function in Lemon. No changes to SQLite itself.drh2025-05-29
| | | FossilOrigin-Name: d6cbabe23d3919d5bde6a83421cdae92125caec09d5c39a648d0305878c6a1dc
* Avoid calls to sprintf() in Lemon, since OpenBSD hates sprintf().drh2025-05-26
| | | FossilOrigin-Name: ed17858ddf833b6b9c2164f31ee9138a998d28ec1564d09e20deb102eefedbc8
* Approximately 100 typo corrections spanning the whole tree, submitted via ↵stephan2025-02-27
| | | | | [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text. FossilOrigin-Name: f50c21484d3cac73589da0376c423de39ae8b842218105786c5aa3726e4dcaed
* Enhance lemon so that it accepts the -U command-line option that undefinesdrh2024-12-19
| | | | | a preprocessor macro. FossilOrigin-Name: e2188a3edf3576963b45e9ffe6ef53e2a85aa68ea3dfb3243b4943d06ffaf829
* Revert Lemon so that it only shows -D options that are actually used. Thoughdrh2024-06-19
| | | | | the change to display the options in sorted order is retained. FossilOrigin-Name: e54eb217c9508c19aee085b111a1323c9009f014ba4db6019918e27002c4ca8c
* In lemon, show all the -D options in the generated header, even if none of themdrh2024-06-19
| | | | | are used. FossilOrigin-Name: 2aa009c38bb207ac59b9bbd6f8e0d7315697b3fd6a01f9431f29a3c7ccad53e7
* Enhance lemon.c so that when it shows the compile-time options in the headerdrh2024-06-19
| | | | | | comment of the generated output file, it shows all options, even those not used, and it shows them in sorted order. FossilOrigin-Name: eed76e6698eabe47c6bf9696599ce1c2f7aa428cf60f39d0566fbd0d1f6c4c62
* Fix (totally harmless) memory leaks in Lemon to avoid warnings during ASANdrh2024-03-15
| | | | | builds. FossilOrigin-Name: ce009205a8edc02b7d45ac01bd0e692c3d2c3ffeadb68e4f1bad20c39075e692
* Fix harmless compiler warnings seen with MSVC.mistachkin2024-02-04
| | | FossilOrigin-Name: e52c87420b072fa68d921eda66069542d50accbfaf1110ac4cc1543a4162200d
* Optimizations to ParseFinalize() to make up for the extra cleanup associateddrh2024-01-27
| | | | | | with the allocated parser stack. This branch now runs faster than trunk and is less than 300 bytes larger. FossilOrigin-Name: f7290db63cc2568090c14dffc4ea4eadfacb5b94b50a1852ef6eefd9e2e32533
* Experimental changes that prevent parser stack overflows by growing thedrh2024-01-26
| | | | | parser stack with heap memory when it reaches its limit. FossilOrigin-Name: 3fd062905fc20507b7cfc97fa976ac5b57c5b68926bf9136bd5ea4265d2d6528
* Enhance Lemon so that it remembers which -D command-line options are actuallydrh2023-06-08
| | | | | | used in the grammar and includes a list of all such options in the header of the generated output file. FossilOrigin-Name: c47a4dbd24b8277c57b7a83a8c0aeac2bc8f6ab75d1b65ba5e1fa83d1868d95f
* Fix the parsing of C-style comments in Lemon, as reported bydrh2022-04-07
| | | | | | [forum:/forumpost/b6edc69548|forum post b6edc69548]. This has no affect on SQLite itself. FossilOrigin-Name: 201569e09b000919ccb463bd581fb2ecd5320e7f584fdb1bc2aaba111061d5c3
* Remove code from lemon.c that was made superfluous bydrh2022-01-14
| | | | | [1b22b42e59793af1|check-in 1b22b42e59793af1] in late 2017. FossilOrigin-Name: 6d2f95a474a0c196f36317d88557bfb449ce125c1d012fc1844378c450697a05
* Fix harmless static analyzer warnings in auxiliary build tools, mkkeywordhash.cdrh2021-10-04
| | | | | and lemon.c. No changes to the SQLite core. FossilOrigin-Name: f2f279b2cc1c8b3b162058c33956be4037cd519715ac0c4290f10c58d2528f0a
* Patch lemon to fix "error" token handling, according otdrh2021-08-27
| | | | | [forum:/forumpost/e680f42f53090061|forum post e680f42f53090061]. FossilOrigin-Name: 106b5e5355a3836a9756333e6dcbb13f0878a5352dab00973b8f0900879bd724
* Document the "%token" directive for Lemon. This directive has been in placedrh2021-03-28
| | | | | for a while, but was previously undocumented. FossilOrigin-Name: 36624d3740a8d095eee061bcc5037deabddb88a53444ec1a956a8af7684efa43
* Fix harmless typos in comments per drh2021-01-07
| | | | | [forum:/forumpost/7849e58dd5|forum post 7849e58dd5] FossilOrigin-Name: d1e22e2f76cce7eb9f9029646176daef2d9e41c7bb1d3e1da182fbdd0096605c
* Fix harmless compiler warning seen with MSVC.mistachkin2020-09-21
| | | FossilOrigin-Name: 4591ee03d7a1ef3f0f6ad0629493fdb7a1c0ddb3277a9e87aa244cb0ca770593
* Attempt to silence harmless static analyzer warnings in Lemon and in thedrh2020-09-20
| | | | | Lemon-generated parser. FossilOrigin-Name: de8ce22a46c90afa5475cd24c28b7a82b26410dc72d662af2f9d9e5e528e0eec
* Fix harmless compiler warnings in Lemon.drh2020-09-16
| | | FossilOrigin-Name: 6c94ba4b1c16b676978808dcb24f63c2f22915af5dcfe9f635c037011affcf4b
* Fix a bug in Fossil that might cause it to crash if there isdrh2020-09-05
| | | | | | a multi-terminal token with a space following the "|" separator. This does not affect SQLite. FossilOrigin-Name: 430c5d1da57af452f236cc862139d84ab97b6020f6d327dae5268c58e6e83a87
* Fix harmless compiler warning.mistachkin2020-09-01
| | | FossilOrigin-Name: a711e8cd2c7b64e06241736ecef478ac64ddbe7b58e0933b6febba63f7fb06e1
* In the Lemon output, add a prefix comment that explains that the output filedrh2020-09-01
| | | | | is automatically generated and shows the name of the source file. FossilOrigin-Name: d34caf3bb63d0512ea116a8c8c8343b76aa39441bd4b3e98231747a705b91d54
* Lemon updates: (1) include the #defines for all tokens in the generated Cdrh2020-09-01
| | | | | | | 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
* In lemon, add "%if" and "%else" and allow boolean expressions as thedrh2020-07-03
| | | | | argument to "%if", "%ifdef", and "%ifndef". FossilOrigin-Name: 951d22b72f80de9e23df645abcc3d88ca1a275b46ea23b84152ef48716922b37
* Fix incorrect SQL generated by the Lemon change of the previous check-in.drh2019-12-19
| | | FossilOrigin-Name: fccfb8a9ed3c1df9f23762bb8df6fdf36a21118899e3fae41f451169a5f2c08e
* Modify the parse.sql output file from Lemon so that the RULE table containsdrh2019-12-19
| | | | | a column with the complete text of the rule. FossilOrigin-Name: 329cbb372d4d77f774f01a87d104c40ef42d713afbe76195b65f5ca205c5ea7b
* Fix goofy string formatting in lemon.c that dates from the K&R-C days.drh2019-12-12
| | | FossilOrigin-Name: 48ba5e5a2227257cebafacbb09e9dd91d9b89ab2d52a8b4e4113c1d017d95f41
* Improved tracing output from the LEMON-generated parser.drh2019-12-11
| | | FossilOrigin-Name: 4d6d2fc046d586a1e5989bbb2757f13d0371fbfad0acf45a0e2fd77dffd8d8f9
* Enhance LEMON to provide the ability to mark a rules as one that will neverdrh2019-12-10
| | | | | | reduce due to intervention of actions. Use this new capability to designate the EXPLAIN rule as NEVER-REDUCES. FossilOrigin-Name: 136cdefb2f7b582ff1771ac7f9e733dc24c357605526cbfb1834937697c8a922
* Add comments in the parse.sql file to help demonstrate how rules aredrh2019-11-29
| | | | | encoded. FossilOrigin-Name: 2c4f714892327a1a9a303267b1f9685e310cca5dcea9c61287d95e26291b0506
* Fix the parse.sql output file so that it is readable into a database wheredrh2019-11-29
| | | | | foreign keys are enforced. FossilOrigin-Name: 3a82c554c3bde4640df6865686f8f70e2c1e07c581fed4772b6b0a8ec1b10bb6
* Add the new -S option to the lemon parser generator to cause it to outputdrh2019-11-26
| | | | | SQL that describes the input grammar. FossilOrigin-Name: 4dbd398d640852d4a696d68c72ee039968023d402a8053b5e6b4ef1d75e982a8
* Fix typo for one instance of line number handling in the Lemon tool.mistachkin2019-09-11
| | | FossilOrigin-Name: 980be1730dc1239c63a107923bf2e32b4ec7d4bc31b9190e711cc35f18cc2bb4
* Further improvements to parser speed by enlarging lookup tables to eliminatedrh2019-08-28
| | | | | the need to do range checking on the index prior to lookup. FossilOrigin-Name: 47d3e091ae49eb7947af5abef9b5b96b16b86d349e51fe0677795649be6db473
* Increase the size of the yy_lookahead table so that it is never necessary todrh2019-08-28
| | | | | down bounds checking on the index. FossilOrigin-Name: bafd872398e58766e996963372c7acc03a1e20a6d39a3867ca45d3ea0ed2ac1d
* Fix harmless compiler warning in lemon.mistachkin2019-06-03
| | | FossilOrigin-Name: 2da0eea02d128c37f2fbe764227ac526d3e993284516544adc0a216a035c5676
* Fix some harmless compiler warnings.mistachkin2019-05-10
| | | FossilOrigin-Name: ca068d82387fc3cda9d2050cedb4f9c61b6d9dc54f89015b4b2ee492243ed5c9
* Fix an error message in the Lemon parser generator.drh2019-04-30
| | | FossilOrigin-Name: b6d7d42b7426622a26b67809cd1f21285fea120aa1897377b9946840463b41f1
* Fix a harmless memory leak in the Lemon parser generator utility program.drh2019-01-15
| | | FossilOrigin-Name: 1caff0fb0b2051e205e7a8cfd5dadf92680c52a88a441ded95b1ea6542db5f83
* Reduce the size of the parser tables generated by Lemon by splitting thedrh2018-12-03
| | | | | yyRuleInfo structure into separate yyRuleInfoLhs and yyRuleInfoNRhs arrays. FossilOrigin-Name: 70fe8ec2ae3099b8773834c7ac2e56768addbecd57956ac523e71a7dc264049c
* Add a missing call to free() in Lemon.mistachkin2018-09-08
| | | FossilOrigin-Name: 8b4cf33aafe09d9009119dcbd464b54be9605af5701002ee458819efa6e2e1f9
* Enhance LEMON to track which symbols actually carry semantic content.drh2018-04-21
| | | | | | Output the list of symbols that do not carry content at the end of the report, but do not (yet) do anything else with the information. FossilOrigin-Name: dcf2bafc159179859b91ffea3a4ebd70b5ca6de9e1d515eaf9afde8cfff26c6c
* Add the %extra_context directive to lemon, as an alternative to %extra_argument.drh2018-04-21
| | | | | Use this to improve the performance of the parser. FossilOrigin-Name: be47a6f5262a43f477700579512fe7112a0872faedcbbe5c3383d13a08af6440
* Add the -dDIRECTORY command-line option to LEMON.drh2018-04-20
| | | FossilOrigin-Name: 9cd20475ff3b2ca1a58e441194c921780d25bdb9b9c744a6b4541b888194efb8
* Lemon enhancements: (1) Do not allocate space for the 'error' non-terminaldrh2018-04-16
| | | | | | if it is not used. (2) Fix an off-by-one problem so that 'unsigned char' can be used for symbol numbers if the number of symbols is 256. FossilOrigin-Name: 3b7801acff91905d0e78e06121ebcf2664f6de5f605699dc8726ec9bcb558eb8
* Enhance LEMON to show precendence of symbols and all rules in the reportdrh2018-04-06
| | | | | that is generated in parallel to the parser. FossilOrigin-Name: 602fbd8149b53d8f0e9a223cc1aec912e7df03fca35071e8d707776ce225371c
* In LEMON, fix an off-by-one error that can make the lookahead table onedrh2017-12-27
| | | | | byte too smal. FossilOrigin-Name: 93792bc58a2eccc7e07b14307388350bb376db32c5055b79a44e4fa8ff91d58e