Lemon is a parser generator, maintained as part of the SQLite project, that generates an LALR(1) parser in the C programming language from an input context-free grammar. Do not use this tag for questions about the COIN-OR Lemon Graph library (use [lemon-graph-library]) nor for questions about the R ggplot2 add-on lemon (use [ggplot2]).
Lemon) is a public-domain parser generator, maintained as part of the SQLite project, that generates an LALR(1) parser in the C programming language from an input context-free grammar. Please do not use this tag for questions about the COIN-OR Lemon Graph library (use lemon-graph-library) nor for questions about the R ggplot2 add-on lemon (use ggplot2).
Lemon grammars are described in BNF (similar to Yacc or Bison grammars, although the syntax is not compatible). It differs from Yacc in that tokens and their associated semantic value are passed to a Lemon parser one at a time in individual function calls. (Yacc parsers call the lexical analyser to get the token; semantic values are passed in globals.)
Although packages for Lemon do exist, it is trivial to build, since it consists of a single stand-alone source file and a template file used to create the generated parser, both found in the SQLite source tree. Lemon documentation can be found in the SQLite documentation directory.