aboutsummaryrefslogtreecommitdiff
path: root/tool/lempar.c
Commit message (Collapse)AuthorAge
* 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
* Performance enhancements to the parser template.drh2024-01-27
| | | FossilOrigin-Name: 2db8b30acdeaeaf7ec92dc0382a25f96bca4561fb68a72713ff963e27f39c63b
* 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
* Bug fixes in the function that expands the parser stack.drh2024-01-26
| | | FossilOrigin-Name: e91179fe849760771c3508b1e7d75325183e5c3b029752d0a97dbdbd57188b97
* 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
* Fix lempar.c so that Lemon can compile with NDEBUG defined.drh2021-11-09
| | | | | [forum:/forumpost/f331adca0b|Forum post f331adca0b] FossilOrigin-Name: ba4fb51853fbcb8c142a350b4db0d59153f28ba0a63ad9a2d6fea7096d3dd544
* Patch lemon to fix "error" token handling, according otdrh2021-08-27
| | | | | [forum:/forumpost/e680f42f53090061|forum post e680f42f53090061]. FossilOrigin-Name: 106b5e5355a3836a9756333e6dcbb13f0878a5352dab00973b8f0900879bd724
* Improvement to error handling in Lemon. No impact on SQLite.drh2021-08-20
| | | | | [forum:/forumpost/2f468f43cbc48d7f|Forum post 2f468f43cbc48d7f] FossilOrigin-Name: 18cc2f85744a18b6810d30baebe07a7a1bd332348e13b1a50d779edc616fb0c1
* Fix an off-by-one error in the error-handling logic of the Lemondrh2021-08-17
| | | | | | parser-generator. This does not affect SQLite. [forum:/forumpost/cff80737bf|Forum cff80737bf]. FossilOrigin-Name: 7cca80808cef192fe0479477056a028e230a164fd368e72100def065d424ca2c
* In Lemon, factor the parser stack overflow detection logic out of thedrh2021-01-02
| | | | | | | yy_reduce() subroutine and into the main parser routine, so that when overflow is detected, it can exit immediately. This saves a single conditional in the main loop of the parser. FossilOrigin-Name: 203c049c662380411522d0c7c493201331bbb2792a7c5b12684f04f532a0695d
* Remove a new assert() that the compiler finds is always true at compile-time,drh2020-09-20
| | | | | to avoid a compiler warning. FossilOrigin-Name: 8bbaee238593741da107b92b254cb5f0cf8b6bcc760bf2b25d20e46c8edee2a9
* 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
* 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
* Improved tracing output from the LEMON-generated parser.drh2019-12-11
| | | FossilOrigin-Name: 4d6d2fc046d586a1e5989bbb2757f13d0371fbfad0acf45a0e2fd77dffd8d8f9
* Try to fix a harmless compiler warning reported by ICC.drh2019-10-21
| | | FossilOrigin-Name: 7f41b44ca2ecb907ea0fd09a974ac9dbdf911463a94f0f77c826cf1b1d9c3e8c
* Fix an unreachable branch in sqlite3ParserFallback()drh2019-08-28
| | | FossilOrigin-Name: e059178b47109caee2c2211b2db6e594c014af636677118a64e10edf01ac017d
* 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
* Add new assert() statements in an attempt to help static analyzers avoiddrh2019-07-16
| | | | | false-positives. FossilOrigin-Name: 9e66458592d40fbd96ea5f21339573110ca1cfe328238a020c9420a87d35dd72
* 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 simple test case for Lemon. Always include assert.h in thedrh2018-11-27
| | | | | Lemon-generated parser. FossilOrigin-Name: 9c9c46dcbe92aeabe3d5675bb69681b6dfd53798bc67e6a2ceba67ed3c4fb0af
* Fix to the error handling logic in the Lemon parser template. This doesdrh2018-11-27
| | | | | | not affect SQLite since SQLite does not use that part of the Lemon parser template. FossilOrigin-Name: c6dfc59eb12a02d35b708b5d94239377c79f688fa572f72bad51a157b1bf599c
* Fix more harmless compiler warnings seen with MSVC.mistachkin2018-07-22
| | | FossilOrigin-Name: edab5666f8470b37e6031dfd80e615b1aab95d1d85ccbe4ece1a813f8b3d4d95
* Fixes for various harmless compiler warnings.drh2018-07-09
| | | FossilOrigin-Name: 5023b1b85b883a716a5da673740b6effe214ee0490f4ca45f161bb8b04784366
* Quick patch to the Lemon parser template to avoid an array overread reporteddrh2018-07-01
| | | | | | | by OSSFuzz. A proper fix involves enhancements to the table generators in Lemon to make the overread impossible. That fix will take longer to implement. The current check-in is a stop-gap. FossilOrigin-Name: 3f6730be4cb712a28401be6d96e56ccb3f2e98dd8961b477befec3f363715178
* Merge all changes from the weak-fallback branch except those related to thedan2018-06-30
|\ | | | | | | | | weak-fallback feature itself. FossilOrigin-Name: aad718fb1afacf1c921966796ab1e149207c31b16409c5672f0371f4fb9d6565
| * Instead of using a lemon %fallback directive, have the tokenizer try to figuredan2018-06-29
| | | | | | | | | | out whether an instance of "WINDOW" should be TK_WINDOW or TK_ID. FossilOrigin-Name: 022079cb0d67be5ac0a50dd9a4d41ee55ce8df681ecd0a544170d75fc8649978
| * Introduce the concept of "weak fallback" in the parser. A weak fallbackdrh2018-06-28
|/ | | | | only occurs if a syntax error would result otherwise. FossilOrigin-Name: c41d7079fb63831bd2f009b64cbf5a423e8119e6b841bfd9bd5a2d85fba3b142
* Fix an unreachable branch associated with stack overflow in thedrh2018-04-23
| | | | | LEMON-generated parser. FossilOrigin-Name: e3064ba3b68ca2a1c54561756e8c898866a19ef6e785d315171cd47827a50c85
* Performance improvements on the main loop of the LEMON-generated parser.drh2018-04-21
| | | FossilOrigin-Name: fec1ebadeb9d6b55b19a1c159c543fd7ae67b3307c4caee4d2541bd783630e23
* 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
* Fix a harmless compiler warning.drh2018-02-09
| | | FossilOrigin-Name: a6c3115483d597fc77ab19fdcfd1d3437cad7e467081ad8c5315fb98c115eed9
* Fix harmless compiler warnings, mostly unused parameters for UDFs in the CLI.drh2018-01-17
| | | FossilOrigin-Name: bfbeffab7735461acb3773242ba31dae15af9f8b0291c54a6734747bb1b36e66
* The previous check-in had an error in the coverage reporting logic.drh2017-12-27
| | | FossilOrigin-Name: ec9b19eb652e81cd3c8a5595eb39aac3aca4abe72136c4b65c9cc257594a9c92
* Change the coverage measurement logic in the lemon-generated parser so thatdrh2017-12-27
| | | | | | | | it only checks for coverage of state/lookahead pairs that are valid syntax. It turns out that some states are unreachable if the lookahead is not valid syntax, because the states are only reachable through a shift following a reduce, and the reduce does not happen if the lookahead is a syntax error. FossilOrigin-Name: 9dce46508772bd0f9e940c4d44933154044bb58c1b3511dd0143287bf795dd6b
* In the lemon-generated parser, do not report the End-of-input character anddrh2017-12-27
| | | | | the wildcard character as missed coverage. FossilOrigin-Name: 3fe964873da16c0e0b1c4f1945f965d4137df7a307acd6a3eb6585ffbaa2afd1
* Change the lemon-parser coverage report format to report all state/lookaheaddrh2017-12-26
| | | | | pairs and indicate on each whether it is hit or missed. FossilOrigin-Name: 86e30fc284c740b55f75884b67988fe837b28878f586f6ec8850ecf80164e700
* 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, avoid unnecessary tests for the acceptancedrh2017-12-25
| | | | | state. FossilOrigin-Name: fdbb35c54f2b6cb65d04ac295f207ff3e69360e0558348c77eb5e62691807046
* 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
* Improved parser tracing output.drh2017-12-24
| | | FossilOrigin-Name: 25be5750545b7b0ed9e1a1baca31611b354519688f875aa1590b21bb6ff42f1b
* In the LEMON parser generator, provide reduce actions with access to thedrh2017-12-15
| | | | | lookahead token. FossilOrigin-Name: 42af190f4f86ad60de02800054010fafd484ac86ca41e2a13799b2e583eea98c
* Improvements to a comment in lempar.c. No code changes.drh2017-10-02
| | | FossilOrigin-Name: 8000d230171fe53599fc6a916666f60f88f789e6c9c6c2869514c02d837d6fc8
* Fix a problem in the lempar.c Lemon template for YYSTACKDEPTH<=0 introduceddrh2017-07-04
| | | | | by check-in [36e54cd8b1fb37] FossilOrigin-Name: 268a40f44cea6c3f561b7f54c90d631877be44292911424bac24f72c5ee87d60
* Faster parser stack overflow detection.drh2017-06-28
| | | FossilOrigin-Name: 36e54cd8b1fb374fd41e3e09b34b86e34327bf07c9e4bfec58382163c5c5d279
* 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
* In the amalgamation, allocate the parser engine object from stack rather thandrh2017-01-28
| | | | | | from heap, for improved performance. This only happens in the amalgamation, since otherwise the sqlite3RunParser() routine does not know the object size. FossilOrigin-Name: 4fe879d4b5da6ae0688a7a99004683a234966597