aboutsummaryrefslogtreecommitdiff
path: root/tool/lemon.c
Commit message (Collapse)AuthorAge
...
* 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
* Enhance Lemon and the parser template so that it can once again build parsersdrh2016-05-24
| | | | | that have no unreachable branches. FossilOrigin-Name: 41fd46e2962ba9a1e1f6867567499d1f6f5b8372
* Lemon enhancement: avoid unnecessary reduce actions that convert onedrh2016-05-23
| | | | | non-terminal into another but have no side effects. FossilOrigin-Name: a86e782ad1aa6f5a8b2c54f9dcf0fa61960843f3
* Fix comment typos and improve clarity of presention in Lemon. The outputdrh2016-05-23
| | | | | should be identical. FossilOrigin-Name: b91a5b8297756289d45c8fce0d3399c253517eb0
* More bug fixes to Lemon identified by Kelvin Sherlock. None of thesedrh2016-04-30
| | | | | have any impact on SQLite. FossilOrigin-Name: 762bdc55f8878ee2ef65af2165a8e7fdbddf0160
* Lemon bug fix: Do not merge action routines unless their destructors aredrh2016-04-29
| | | | | | also identical. Problem and suggested fix reported on the mailing list by Kelvin Sherlock. FossilOrigin-Name: 4792d6dbba6857f74d27332dcc1468e39c767c71
* Enhance Lemon so that it reorders the reduce rules such that rules withoutdrh2016-03-16
| | | | | | | actions occur at the end and so that the first rule is number 0. This reduces the size of the jump table on the reduce switch, and helps the parser to run faster. FossilOrigin-Name: d5712f21ec758ff096a7b1bb8ed4fc5ec400ca5d
* More agressive use of /*A-overwrites-X*/ in the parser. Fix an off-by-onedrh2016-02-17
| | | | | error in parser stack overflow detection. FossilOrigin-Name: 417e777701bbf4bd67626d4ca3bc2c5d847f6cd0
* Enhance Lemon so that if reduce code contains a comment of the formdrh2016-02-17
| | | | | | "/*A-overwrites-X*/" then a LHS label A is allowed to overwrite the RHS label X. FossilOrigin-Name: 5cfe9545d478a2c500083613dd20e14b2ffce645
* Further improvements to the Lemon-generated code for yy_reduce().drh2016-02-17
| | | FossilOrigin-Name: ef95a7d6490e33a9af4bc7b4b622de7328742ca7
* In Lemon, add the ability for the left-most RHS label to be the same as thedrh2016-02-17
| | | | | LHS label, causing the LHS values to be written directly into the stack. FossilOrigin-Name: 4bb94c7c4c3cb3ccad72c2451d88684130dde845
* Fix uses of ctype functions (ex: isspace()) on signed characters in testdrh2015-10-29
| | | | | programs and in some obscure extensions. No changes to the core. FossilOrigin-Name: 34eb6911afee09e779318b79baf953f616200128
* Remove an unused local variable from Lemon.drh2015-09-08
| | | FossilOrigin-Name: fe9ffe5eed7d376f3f08c78c1ce5514c886f3479
* Minor tweaks to Lemon.drh2015-09-07
| | | FossilOrigin-Name: 986677224a8da5e79fbbd90673f1b595da89c5d6
* For the Lemon-generated parser, add a new action type SHIFTREDUCE and use itdrh2015-09-07
| | | | | to further compress the parser tables and improve parser performance. FossilOrigin-Name: 531c3974b3d586c1989cde905b2fb4681239a570
* In the "parse.out" output file from Lemon, show addition the complete textdrh2015-09-07
| | | | | of rules on reduce actions. FossilOrigin-Name: b6ffb7e471e51ff69668154ad2c8790e466c9d37
* Improved "Parser Statistics" output (the -s option) for the Lemon parserdrh2015-09-07
| | | | | generator. FossilOrigin-Name: 809503e4efcdb498d176e8c0794a5ba0882adef2
* Fix over-length source code lines in Lemon.drh2015-09-04
| | | FossilOrigin-Name: 1efece95ff8777b89558be59277732ba2a68d5ab
* Fix harmless compiler warnings seen with MSVC 2015.mistachkin2015-04-19
| | | FossilOrigin-Name: d05becd873a03a366843a34e7f4c732dd8f88c86
* Fix harmless compiler warnings in lemon.cdrh2015-03-31
| | | FossilOrigin-Name: bbe7dcda689a25860f2104804f00ba0a720c1372
* Work in progress on fixing harmless compiler warnings when using -W4 and MSVC.mistachkin2015-01-12
| | | FossilOrigin-Name: 856dd245ce037f93d5ae2ddeb4fdf949c1e5c8e9
* Enhance the "lemon" executable so that it ignores -f, -W, -O, and -Idrh2015-01-01
| | | | | | | command-line options. This permits most of the same options that are passed to the compiler to also be harmlessly passed to lemon, and thus simplifies makefiles. FossilOrigin-Name: da408d128b4301d9fc7a3a00f219dce7ed48bc60
* Modify the %nonassoc directive in lemon so that it generates a run-timedrh2014-06-09
| | | | | | | error rather than a parsing conflict. This changes is due to a bug report on the mailing list. SQLite does not use the %nonassoc directive in its grammar so this change does not affect SQLite. FossilOrigin-Name: 1925f3a0a2caa709569df015a8e0d26412f1a9ff
* Fix harmless compiler warning in LEMON.mistachkin2014-01-14
| | | FossilOrigin-Name: f61a70589ac7e05008a362bd9d5b7bde5d07a758
* In LEMON, limit the size of the grammar file to 100MB. This ensures thatdrh2014-01-11
| | | | | | the program will never experience integer overflow. To be doubly sure, use calloc() instead of malloc() when allocating arrays. FossilOrigin-Name: 29ba458d849ad8864711cbe59fb10447a947e06a
* Add the "%token_class" directive to the LEMON parser generator. This opens updrh2014-01-11
|\ | | | | | | | | | | | | | | the possibility of simplifying the parser. Also remove all calls to sprintf(), strcpy(), and strcat() from LEMON to avoid compiler warnings on OpenBSD. (Aside: It is this change to avoid harmless compiler warnings that was the cause of the reason spat of bugs.) FossilOrigin-Name: 8eb48c04bd0a14031488b3160fde67307eb8b35d
| * In LEMON, fix a bug in the text formatter introduced by the previousdrh2014-01-11
| | | | | | | | | | | | commit. Also add the new "%token_class" directive for defining symbolic names that stand any one of a collection of tokens. FossilOrigin-Name: da7890ca6b1d8e511377a469047120220e8c3b2d
| * Do not use sprintf(), strcpy() or strcat() in the implementation of thedrh2014-01-10
|/ | | | | lemon parser generator tool, to avoid compiler warnings in OpenBSD. FossilOrigin-Name: e43c522dde01e134f1adc94f534d2b3eda74afc2
* Fix a harmless compiler warning in lemon.c.drh2013-10-11
| | | FossilOrigin-Name: 62959c0ce3a2c486ebd82e6511efad0412b944a0
* In the lemon parser generator, change all hashes to unsigned to avoiddrh2013-10-02
| | | | | potential problems with signed integer overflow. FossilOrigin-Name: 8d399a03de63c15908d63ed69140ee15c6275b8d
* Remove tab characters from source code files. Replace them with spaces.drh2012-08-20
| | | FossilOrigin-Name: 7edd10a960d5ff121e470b0549b0aa9fb7760022
* In Lemon, when comparing the output to the *.h file to see if it has changed,drh2012-06-16
| | | | | | make sure that the proposed new output and the preexisting output are the same size before deciding that they are the same. FossilOrigin-Name: 0c2fb18d25217ada7e75dcab8b342bbc632875d8
* Fix a typecast problem in lemon that could cause problems on 64-bit machines.drh2012-04-18
| | | FossilOrigin-Name: 4a5641cc0aa4c49762f4fe73dab4a6612631c0d2
* Cosmetic changes to lemon. No changes to core functionality nor impact ondrh2012-01-09
| | | | | SQLite. FossilOrigin-Name: 393fc78a18004c839d889de2a25ec046ad6f13fc
* Fix a bug in lemon in computation of which non-terminals can generate andrh2012-01-07
| | | | | | | empty string. This bug and the fix make absolutely no difference for the grammar used by SQLite, but it can make a difference when lemon is used in other grammars. FossilOrigin-Name: ce32775b232da894343f62deefaf19b0ec484636
* Fix a total unimportant file descriptor leak in lemon. This is to silencedrh2011-08-30
| | | | | warning messages. FossilOrigin-Name: e95cf2c576dda656c0f31eeec3d98e911b9003a1
* Fix compiler warnings in lemon by removing some of the code added bydrh2011-06-20
| | | | | Ryan Gordon in [1e8b842039cc0]. FossilOrigin-Name: 76b18b2be072b9ea242df4c9535059f7b43f564b
* Add a missing check for out-of-memory in the lemon code generator.drh2011-06-02
| | | FossilOrigin-Name: efb20b9da6c7cb310a449cc818eaccd3d5bb4ab3
* Cherry-pick the lemon.c updates out of the lemon-update-2010 branch intodrh2010-11-23
| | | | | the trunk. FossilOrigin-Name: 1541ae3fbd7b3d471e002c0ad14e7846f7ad9415