<s>
Lemon	B-Application
is	O
a	O
parser	B-Language
generator	I-Language
,	O
maintained	O
as	O
part	O
of	O
the	O
SQLite	B-Language
project	O
,	O
that	O
generates	O
a	O
look-ahead	B-Application
LR	I-Application
parser	I-Application
(	O
LALR	B-Application
parser	I-Application
)	O
in	O
the	O
programming	B-Language
language	I-Language
C	I-Language
from	O
an	O
input	O
context-free	O
grammar	O
.	O
</s>
<s>
The	O
generator	O
is	O
quite	O
simple	O
,	O
implemented	O
in	O
one	O
C	B-Language
source	O
file	O
with	O
another	O
file	O
used	O
as	O
a	O
template	O
for	O
output	O
.	O
</s>
<s>
Lexical	B-Application
analysis	I-Application
is	O
performed	O
externally	O
.	O
</s>
<s>
Lemon	B-Application
is	O
similar	O
to	O
the	O
programs	O
Bison	B-Application
and	O
Yacc	B-Application
,	O
but	O
is	O
incompatible	O
with	O
both	O
.	O
</s>
<s>
Other	O
distinctive	O
features	O
include	O
a	O
reentrant	B-Operating_System
,	O
thread-safe	B-Operating_System
output	O
parser	B-Language
,	O
and	O
the	O
concept	O
of	O
non-terminal	O
destructors	O
that	O
try	O
to	O
make	O
it	O
easier	O
to	O
avoid	O
memory	B-Error_Name
leaks	I-Error_Name
.	O
</s>
<s>
SQLite	B-Language
uses	O
Lemon	B-Application
with	O
a	O
hand-coded	O
tokenizer	O
to	O
parse	O
SQL	B-Language
strings	O
.	O
</s>
<s>
Lemon	B-Application
,	O
together	O
with	O
re2c	B-Application
and	O
a	O
re2c	B-Application
wrapper	O
named	O
Perplex	O
,	O
are	O
used	O
in	O
BRL-CAD	B-Language
as	O
platform-agnostic	B-Operating_System
and	O
easily	O
compilable	O
alternatives	O
to	O
Flex	O
and	O
Bison	B-Application
.	O
</s>
<s>
OpenFOAM	O
expression	O
evaluation	O
uses	O
a	O
combination	O
of	O
ragel	B-Application
and	O
a	O
version	O
of	O
lemon	B-Application
that	O
has	O
been	O
minimally	O
modified	O
to	O
ease	O
C++	O
integration	O
without	O
affecting	O
C	B-Language
integration	O
.	O
</s>
<s>
The	O
parser	B-Language
grammars	O
are	O
augmented	O
with	O
m4	O
macros	O
.	O
</s>
