encyclopegia.org

Lemon (parser generator)

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.[src] The generator is quite simple, implemented in one C source file with another file used as a template for output.[src] Lexical analysis is performed externally.[src] Lemon is similar to the programs Bison and Yacc, but is incompatible with both.[src] The grammar input format is different, to help prevent common coding errors.[src] 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.[src] SQLite uses Lemon with a hand-coded tokenizer to parse SQL strings.[src] Lemon, together with re2c and a re2c wrapper named Perplex, are used in BRL-CAD as platform-agnostic and easily compilable alternatives to Flex and Bison.[src] This combination is also used with STEPcode.[src] OpenFOAM expression evaluation uses a combination of ragel and a version of lemon that has been minimally modified to ease C++ integration without affecting C integration.[src] The parser grammars are augmented with m4 macros.[src]

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.[src] The generator is quite simple, implemented in one C source file with another file used as a template for output.[src] Lexical analysis is performed externally.[src] Lemon is similar to the programs Bison and Yacc, but is incompatible with both.[src] The grammar input format is different, to help prevent common coding errors.[src] 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.[src] SQLite uses Lemon with a hand-coded tokenizer to parse SQL strings.[src] Lemon, together with re2c and a re2c wrapper named Perplex, are used in BRL-CAD as platform-agnostic and easily compilable alternatives to Flex and Bison.[src] This combination is also used with STEPcode.[src] OpenFOAM expression evaluation uses a combination of ragel and a version of lemon that has been minimally modified to ease C++ integration without affecting C integration.[src] The parser grammars are augmented with m4 macros.[src] ==Notes== ==References== ==External links== Calculator with Lemon and Lex in C++ Example Understanding Lemon generated Parser Lemon, bundled with Re2c and Perplex Lemon Grove: Lemon along with sibling projects, forks and assets[src]

23 sentences · 23 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Lemon (parser generator)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/lemon-parser-generator. Accessed 27 November 2026.

Chicago

"Lemon (parser generator)." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/lemon-parser-generator.

APA

encyclopegia.org. (2026). Lemon (parser generator). Retrieved November 27, 2026, from https://encyclopegia.org/wiki/lemon-parser-generator

Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Blind Lemon Jefferson

stub · references available

Lehmer random number generator

stub · references available

magnetohydrodynamic generator

stub · references available

lemon zest

stub · references available

lemon socialism

stub · references available

heat recovery steam generator

stub · references available

lemon law

stub · references available

The Lemon Pipers

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1366337912 · 0.5 · snapshot enwiki-001366337912

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.