Commit graph

55 commits

Author SHA1 Message Date
Marisa Heit
f23e5d2677 Fixed: XLAT would not parse
- Disable the changes from commit 96afce241d
  because it appears to not recognize default rules that reduce as
  reducing.
- When tracing a parser, flush after every line output in case an
  assert is hit so you can actually see what it did up to that point.
2016-10-14 22:02:55 -05:00
Marisa Heit
696beca40f Lemon update 2016-08-16 16:46:40 on branch trunk
— Fix a bug in destructorprocessing of Lemon. That has no impact on the SQLite grammar. The bug was introduced by prior work to optimize the Lemon-generated parser used by SQLite. (user: drh)
2016-10-13 22:23:28 -05:00
Marisa Heit
3b1a048885 Lemon update 2016-05-24 18:55:08 on branch trunk
— Enhance Lemon and the parser template so that it can once again build parsers that have no unreachable branches. (user: drh)
2016-10-13 22:22:04 -05:00
Marisa Heit
96afce241d Lemon update 2016-05-24 18:55:08 on branch trunk
— Enhance Lemon and the parser template so that it can once again build
parsers that have no unreachable branches. (user: drh)
2016-10-13 22:18:20 -05:00
Marisa Heit
64bd551d20 Lemon update 2016-05-23 14:24:31 on branch trunk
— Fix comment typos and improve clarity of presention in Lemon. The output
should be identical. (user: drh)
2016-10-13 22:09:13 -05:00
Marisa Heit
0d67d107ab Lemon update 2016-05-23 14:24:31 on branch trunk
— Fix comment typos and improve clarity of presention in Lemon. The output
should be identical. (user: drh)
2016-10-13 22:07:01 -05:00
Marisa Heit
45d441f103 Lemon update 2016-04-29 11:28:35 on branch trunk
— Lemon bug fix: Do not merge action routines unless their destructors are
also identical. Problem and suggested fix reported on the mailing list by
Kelvin Sherlock. (user: drh)
2016-10-13 21:48:29 -05:00
Marisa Heit
de56be6c01 Lemon update 2016-04-29 11:28:35 on branch trunk
— Lemon bug fix: Do not merge action routines unless their destructors are
also identical. Problem and suggested fix reported on the mailing list by
Kelvin Sherlock. (user: drh)
2016-10-13 21:41:54 -05:00
Randy Heit
7f3e1777a7 Add -C option to Lemon, to specify an output directory 2016-03-20 14:26:02 -05:00
Randy Heit
3897f109ed VS2015 warning fixes for Lemon 2016-03-20 13:35:46 -05:00
Randy Heit
4641549e0e Lemon update 2016-03-16 19:45:54 on branch trunk
- Enhance Lemon so that it reorders the reduce rules such that rules without 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. (user: drh)
2016-03-20 13:06:54 -05:00
Randy Heit
4a24f7adcf Lemon update 2016-02-17 12:34:03 on branch parser-performance
- More agressive use of /*A-overwrites-X*/ in the parser. Fix an off-by-one error in parser stack overflow detection. (user: drh)
2016-03-20 13:06:54 -05:00
Randy Heit
25972d79a7 Lemon update 2016-02-17 04:33:10 on branch parser-performance
- Enhance Lemon so that if reduce code contains a comment of the form "/*A-overwrites-X*/" then a LHS label A is allowed to overwrite the RHS label X. (user: drh)
2016-03-20 13:06:54 -05:00
Randy Heit
ab4c3a0c5e Lemon update 2016-02-17 01:46:19 on branch parser-performance
- Further improvements to the Lemon-generated code for yy_reduce(). (user: drh)
2016-03-20 13:06:54 -05:00
Randy Heit
8a18e5c7eb Lemon update 2016-02-17 01:18:33 on branch parser-performance
- In Lemon, add the ability for the left-most RHS label to be the same as the LHS label, causing the LHS values to be written directly into the stack. (user: drh)
2016-03-20 13:06:54 -05:00
Randy Heit
5286a7fef3 Lemon update 2015-10-29 13:48:15 on branch trunk
- Fix uses of ctype functions (ex: isspace()) on signed characters in test programs and in some obscure extensions. No changes to the core. (user: drh)
2016-03-20 13:06:53 -05:00
Randy Heit
daa68a0c88 Lemon update 2015-09-07 23:40:42 on branch trunk
- Minor tweaks to Lemon. (user: drh)
2016-03-20 13:06:53 -05:00
Randy Heit
3d5867d29e Lemon update 2015-09-07 18:23:37 on branch lemon-update
- For the Lemon-generated parser, add a new action type SHIFTREDUCE and use it to further compress the parser tables and improve parser performance. (user: drh)
2016-03-20 13:06:52 -05:00
Randy Heit
2b5cef0c17 Lemon update 2015-09-07 14:22:24 on branch trunk
- In the "parse.out" output file from Lemon, show addition the complete text of rules on reduce actions. (user: drh)
2016-03-20 13:06:52 -05:00
Randy Heit
00de97aca2 Lemon update 2015-09-07 02:23:02 on branch trunk
- Improved "Parser Statistics" output (the -s option) for the Lemon parser generator. (user: drh)
2016-03-20 13:06:52 -05:00
Randy Heit
23f69b6fbc Lemon update 2015-09-04 18:03:45 on branch trunk
- Fix over-length source code lines in Lemon. (user: drh)
2016-03-20 13:06:52 -05:00
Randy Heit
9413ea15b6 Lemon update 2015-01-01 19:11:22 on branch trunk
- Enhance the "lemon" executable so that it ignores -f, -W, -O, and -I 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. (user: drh)
2016-03-20 13:06:52 -05:00
Randy Heit
06455b49c0 Lemon update 2014-06-09 13:11:40 on branch trunk
- Modify the %nonassoc directive in lemon so that it generates a run-time 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. (user: drh)
2016-03-20 13:06:52 -05:00
Randy Heit
dd0d0e036c Lemon update 2014-01-11 12:52:25 on branch trunk
- In LEMON, limit the size of the grammar file to 100MB. This ensures that the program will never experience integer overflow. To be doubly sure, use calloc() instead of malloc() when allocating arrays. (user: drh)
2016-03-20 13:06:52 -05:00
Randy Heit
e59ef08cc8 Lemon update 2014-01-11 03:06:18 on branch lemon-updates
- Add the new "%token_class" directive for defining symbolic names that stand any one of a collection of tokens. (user: drh)
2016-03-20 13:06:51 -05:00
Randy Heit
249aed455b Lemon update 2013-10-02 20:46:30 on branch trunk
- In the lemon parser generator, change all hashes to unsigned to avoid potential problems with signed integer overflow. (user: drh)
2016-03-20 13:06:51 -05:00
Randy Heit
c5e4f05fe2 Lemon update 2012-01-09 14:19:05 on branch trunk
- Cosmetic changes to lemon. No changes to core functionality nor impact on SQLite. (user: drh)
2016-03-20 13:06:51 -05:00
Randy Heit
cb7eb1abc5 Lemon update 2010-07-19 01:52:07 on branch trunk
- Improvements to the formatting of parse.out file from Lemon. Add the -r option to Lemon to disable the state sorting, making debugging easier. (user: drh)
2016-03-20 13:06:51 -05:00
Randy Heit
e20dc913b7 Lemon update 2010-07-18 11:35:53 on branch trunk
- Add the -p option to lemon to cause conflicts resolved by precedence rules to appear in the parse.out file. (user: drh)
2016-03-20 13:06:51 -05:00
Randy Heit
54ff482d8f Lemon update 2010-02-17 20:31:32 on branch lemon-update-2010
- Report error if the grammar has multiple %type lines for the same nonterminal.
2016-03-20 13:06:51 -05:00
Randy Heit
3d7a8e8348 Lemon update 2010-02-17 20:19:51 on branch lemon-update-2010
- Corrected error message (cut-and-paste bug). (user: icculus)
2016-03-20 13:06:51 -05:00
Randy Heit
031cebb138 Lemon update 2010-02-15 00:01:04 on branch lemon-update-2010
- Removed the 80-char line formatting for ErrorMsg(), on dhr's suggestion. (user: icculus)
2016-03-20 13:06:51 -05:00
Randy Heit
2e8d5e763b Lemon update 2010-02-14 17:14:23 on branch lemon-update-2010
- Make Lemon able to compile as C++ code. (user: icculus)
2016-03-20 13:06:50 -05:00
Randy Heit
a656bb4f72 Lemon update 2010-02-14 00:48:50 on branch lemon-update-2010
- Added -T option, to specify a template filename on the command line.
  The default is still "lempar.c", though. (user: icculus)
2016-03-20 13:06:50 -05:00
Randy Heit
7e8b9219a8 Lemon update 2010-01-07 03:53:04 on branch trunk
- Another attempt at fixing the table generator in lemon. Again, this does not effect the SQLite grammar. (user: drh)
2016-03-20 13:06:50 -05:00
Randy Heit
961188bc81 Lemon update 2010-01-06 13:07:31 on branch trunk
- Fix an issue with lemon generating incorrect grammars. This issue does not effect SQLite. (user: drh)
2016-03-20 13:06:50 -05:00
Randy Heit
1c592c9601 Lemon update 2009-11-03 19:18:32 on branch trunk
- Enhancements to lemon to generate more compact action tables and to avoid making array bounds tests that can never fail on action table calculations. (user: drh)
- Update zcc-parse.lemon: YY_SZ_ACTTAB is now YY_ACTTAB_COUNT
2016-03-20 13:06:43 -05:00
Randy Heit
cafbc8b50a Lemon update 2009-11-03 13:02:26 on branch trunk
- Adjust the lemon implementation so that it always computes the same PDA regardless of qsort() implementation on the host platform. In other words, make all sorts in lemon stable. (user: drh)
2016-03-20 11:35:06 -05:00
Randy Heit
55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers
cfcd2668cc Merge commit '772a5724313f2ad0bd6828fcc28545a9ee5e6068' into scripting
Conflicts:
	src/p_pspr.cpp
	src/thingdef/thingdef_codeptr.cpp
2016-01-17 20:00:45 +01:00
Edoardo Prezioso
18de376edf - Fixed lemon trying to free non-allocated memory.
This is a regression from commit 24a096fb27 . It happened only the input files were present in the same directory as the executable.
2015-12-07 11:19:42 +01:00
Christoph Oelckers
1b29c3b6cf Merge branch 'master' into scripting
Conflicts:
	src/p_interaction.cpp
	tools/lemon/lemon.c
2015-04-30 16:13:32 +02:00
Edoardo Prezioso
24a096fb27 - Plug some lemon leaks during xlat generation.
Found with Address Sanitizer.
2015-04-30 12:52:04 +02:00
Randy Heit
91207ed3f4 Update lemon.c to August 2012 version from SQLite.
- Add a missing check for out-of-memory in the lemon code generator.
- Fix a total unimportant file descriptor leak in lemon. This is to silence warning messages.
- Fix a bug in lemon in computation of which non-terminals can generate an 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.
- In Lemon, when comparing the output to the *.h file to see if it has changed, make sure that the proposed new output and the preexisting output are the same size before deciding that they are the same.
2013-08-02 22:17:32 -05:00
Randy Heit
ec364c53c1 - Update Lemon to the latest SQLite CVS versions:
* lemon.c @ 1.69 ; lempar.c @ 1.45 

SVN r2172 (scripting)
2010-02-21 04:33:08 +00:00
Randy Heit
a4dc93fb91 - Removed the 8-character limit on endpic names from the parser. (Though it
might still be present in the texture manager; I don't remember.)
- Fixed: EndSequence needs a proper constructor.
- Some more GCC warning removals.



SVN r1021 (trunk)
2008-06-05 04:30:18 +00:00
Christoph Oelckers
6eca1036c3 - Changed Lemon so that it always writes the header. It still kept recompiling
the grammar over and over again once it had been changed locally.


SVN r851 (trunk)
2008-03-25 10:42:02 +00:00
Randy Heit
ec17f5a5b9 - Undid some of the changes from lempar.c v1.30->v1.31, because it broke
error handling.
- Fixed: dehsupp/scanner.re defined "}" as the token RPAREN. dehsupp/parse.y
  also defined action_list_def as needing a RBARCE. I'm surprised it worked
  at all before. I guess Lemon really was too accepting.
- Changed the way that xlatcc handles include statements so that I don't need
  to modify the logic of lempar.c. I also discovered that the grammar was
  improperly defined and only accepted the first statement. It worked before
  because Lemon used to accept multiple times before reaching the EOF token.
  I have also verified that it is still generating the proper lumps.
- Removed some unused wadsrc files from the repository.
- Fixed my re2c upgrade.
- Updated lemon.c to v1.53.

SVN r711 (trunk)
2008-01-26 04:33:34 +00:00
Randy Heit
e8495e90f5 Fixed some lemon bugs:
* "Symbol name missing after %destructor keyword" error message displayed incorrectly.
* Line numbers in the generated file for lines that came from the template were off.
* The parser did not immediately reduce after a shift. There always needed to be
  another token input first before a reduce would occur, and then the token would
  sometimes be lost.

SVN r469 (trunk)
2007-01-31 00:15:08 +00:00
Randy Heit
b06f4423b9 Updated lemon.c to version 1.43 from the SQLite source.
SVN r467 (trunk)
2007-01-30 20:05:39 +00:00