Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a2368e94ee39cb43

Jump to content

Lemon (parser generator)

From Wikipedia, the free encyclopedia
Lemon
DeveloperD. Richard Hipp
Written inC
Operating systemCross-platform
TypeParser generator
LicensePublic domain
Websitewww.hwaci.com/sw/lemon/ Edit this at Wikidata

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. [1]

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. [2]

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

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

OpenFOAM expression evaluation[7] uses a combination of ragel and a version of lemon that has been minimally modified[8] to ease C++ integration without affecting C integration.[9] The parser grammars are augmented with m4 macros.

  1. "The Lemon LALR(1) Parser Generator". SQLite. SQLite. 2022-04-18. Retrieved 2026-07-27.
  2. "The Lemon Parser Generator". SQLite. SQLite. 2025-11-18. Retrieved 2026-07-27.
  3. Brlcad; Carlmoore; Starseeker (2017-11-30). "BRL-CAD: The Lemon Parser Generator". SourceForge. Slashdot Media. Retrieved 2019-09-21.
  4. Bumbulis, Peter (2011-08-23). "Read Me". SourceForge. Slashdot Media. Retrieved 2019-09-21.
  5. Boerger, Marcus (2014-06-24). "Read Me". SourceForge. Slashdot Media. Retrieved 2019-09-21.
  6. "Read Me". STEPcode. GitHub. 2015. Archived from the original on 2018-04-10. Retrieved 2019-09-21.
  7. "New expressions syntax". OpenFOAM. OpenCFD. 2019-12-23. Retrieved 2020-01-13.
  8. "wmake sources". OpenFOAM. OpenCFD. 2019-09-27. Retrieved 2020-01-13.
  9. "README". OpenFOAM. OpenCFD. 2019-09-27. Retrieved 2020-01-13.

References

[edit source]
[edit source]