Lemon (parser generator)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Jerryobject (talk | contribs) at 07:58, 21 September 2019 (Jerryobject moved page Lemon Parser Generator to Lemon (parser generator): Nonlead-words nonproper nouns MOS:CAPS > sentence case.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Lemon (parser generator)
Developer(s)D. Richard Hipp
Written inC
Operating systemCross-platform
TypeParser generator
LicensePublic domain
Websitewww.hwaci.com/sw/lemon

Lemon is a parser generator, maintained as part of the SQLite project, that generates a look-ahead LR parser (LALR parser) in the programming language C from an input context-free grammar. The generator is quite simple, implemented in one C source file with another file used as a template for output. Lexical analysis is performed externally.

Lemon is similar to the programs Bison and Yacc, but is incompatible with both. The grammar input format is different, to help prevent common coding errors. Other distinctive features include a reentrant, thread-safe output parser, and the concept of non-terminal destructors that try to make it easier to avoid memory leaks.

SQLite uses Lemon with a hand-coded tokenizer to parse SQL strings.

Lemon, together with re2c and a re2c wrapper named Perplex, are used[1][2][3] in BRL-CAD as platform-agnostic and easily compilable alternatives to Flex and Bison. This combination is also used with STEPcode.[4]

Notes

  1. ^ Brlcad; Carlmoore; Starseeker (2017-11-30). "BRL-CAD: The Lemon Parser Generator". SourceForge. Slashdot Media. Retrieved 2019-09-21.
  2. ^ Bumbulis, Peter (2011-08-23). "Read Me". SourceForge. Slashdot Media. Retrieved 2019-09-21.
  3. ^ Boerger, Marcus (2014-06-24). "Read Me". SourceForge. Slashdot Media. Retrieved 2019-09-21.
  4. ^ "Read Me". STEPcode. GitHub. 2015. Archived from the original on 2018-04-10. Retrieved 2019-09-21.{{cite web}}: CS1 maint: unfit URL (link)

References

External links