aboutsummaryrefslogtreecommitdiff
path: root/tool/lemon.c
Commit message (Collapse)AuthorAge
* 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
* Add support for measuring and reporting coverage of the parser state machinedrh2017-12-26
| | | | | using the SQLITE_TESTCTRL_PARSER_COVERAGE test-control. FossilOrigin-Name: 1253a872dbf48656d4efd588ab61223a5ac550d9b2b932249d6ba585276ba573
* Enhance LEMON so that it generates the action table in such a way that nodrh2017-12-25
| | | | | | | range check is needed on the lookahead table to verify that the next input token is valid. This makes the lookahead table slightly larger (about 120 bytes) but helps the parser to run faster. FossilOrigin-Name: 7eb0198d0102e97e4b7ad9e359d95985e55e09c510ea4b360265ac8feb9ed814
* In the LEMON-generated parser, rearrange the meanings of integer action codesdrh2017-12-24
| | | | | | | so that reduce actions occur last. This means that the most common case (reduce actions) can be recognized with a single comparison operation, thus speeding up the main parser loop, slightly. FossilOrigin-Name: 7bfe7a360261ac7227840db49487c2f0fe338a2f1b868fcaada1e04a8d2b8f7a
* Add the "%token" control to the lemon parser. Not currently used by SQLite.drh2017-08-02
| | | FossilOrigin-Name: a6e4c5ae8f29bc2e7f2088426341254e9281d19db9dc9a14abc376d56dad4c4b
* In the lemon-generated parser, store the number of symbols on the RHS of eachdrh2017-06-28
| | | | | | rule as a negative number and add it to the stack pointer, rather than storing the value as a positive and subtracting it. This makes the parser faster. FossilOrigin-Name: b362f0d8ed34839bf3b29d10ed0853ab94245fba135ccd28e619caa6ee6992d5
* In the lemon-generated parser, automatically promote SHIFTREDUCE actions ondrh2017-06-28
| | | | | nonterminal systems to pure REDUCE actions, for a performance enhancement. FossilOrigin-Name: c46d94a8cde816ca383e771721ebd4900de77950cba700e35a26f70fd5b794a4
* Fix a subtle bug in Lemon discovered and reported on the mailing listdrh2017-04-26
| | | | | by Kelvin Sherlock, who also suggested the correct fix. FossilOrigin-Name: 304689f8acb53d68e1afed6e6c4332e78132e3d57071b8f94df0d13515b3b3d8
* Remove end-of-line whitespace from lemon.c.drh2017-04-14
| | | FossilOrigin-Name: d78355c85f49e139f1ac1a660563865350f0e442652b7bc50b684398f81cc602
* Fix some left-over K&R-C constructs in lemon.c. No changes to the core.drh2017-04-14
| | | FossilOrigin-Name: a53799059d4ece246610b6c877ab7088ded3548cbca7149a03deea8ac0e27e68
* Fix harmless compiler warnings in the command-line shell and in Lemon.drh2016-12-29
| | | FossilOrigin-Name: afcdc4a60e357d171156e0de705bf7ad1b37daab
* Fix a bug in destructor processing of Lemon. That has no impact on thedrh2016-08-16
| | | | | | SQLite grammar. The bug was introduced by prior work to optimize the Lemon-generated parser used by SQLite. FossilOrigin-Name: f9035b8e2ea331801402bcb62b203ab092949770
* Improved comments on the lempar.c parser template. Adjust thedrh2016-08-10
| | | | | | YY_SHIFT_USE_DFLT constant in the Lemon-generated parser tables so as to guarantee that it is always out of range of the yy_lookahead[] table. FossilOrigin-Name: 83622f3f50030e4d6abafb99d99742928aaf157c