# 使用 Homebrew, apt, dnf, MacPorts, Nix, pacman, zypper 安装 lemon

查看 lemon 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:lemon
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lemon
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install lemon
```

  证据: MacPorts ports tree: lang/lemon/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install lemon
```

  证据: Debian stable package indexes: lemon from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install lemon
```

  证据: Fedora Rawhide package metadata: lemon from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#lemon
```

  证据: nixpkgs package indexes: pkgs/by-name/le/lemon/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S lemon
```

  证据: Arch Linux sync databases: lemon from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- zypper (92%):

```sh
sudo zypper install lemon
```

  证据: openSUSE Tumbleweed package metadata: lemon from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:lemon
- **软件包管理器:** Homebrew
- **版本:** 3.53.4
- **来源摘要:** LALR(1) parser generator like yacc or bison
- **主页:** <https://www.hwaci.com/sw/lemon/>
- **最后更新:** 2026-07-25T14:38:49Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- lemon (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 3.53.4
## 项目历史与用法

Lemon is an LALR(1) parser generator in the SQLite orbit: a yacc-like tool for generating C parsers, but with a deliberately different grammar format and a reentrant, thread-safe parser model.

### 项目历史

The project is documented by Hwaci and SQLite as a small code-generation utility rather than a standalone source repository. SQLite documents Lemon as a set of files kept inside the SQLite source tree, including lemon.c for the generator, lempar.c for the parser template, and lemon.html for detailed documentation.

Lemon evolved as a tool shaped by SQLite's own parser needs. SQLite's Lemon page notes that keeping the generator inside the SQLite project allowed the tool to gain SQLite-specific features, such as fallback tokens for SQL keywords and changes aimed at efficient parser generation.

### 采用历史

Its most important adoption path is SQLite itself. SQLite uses Lemon to generate the main SQL parser from parse.y, and also uses it for FTS5 query-pattern parsing from fts5parse.y.

Outside SQLite, Lemon is attractive to C projects that want a compact parser generator with generated parsers that avoid yacc's global-state style.

### 使用方式

Users write a context-free grammar and run lemon to emit C parser code. Compared with yacc and bison, Lemon uses different grammar syntax, expects the tokenizer to call the parser, and emphasizes reentrant and thread-safe generated parsers.

### 为什么软件包爱好者会关心

Lemon is a package-nerd favorite because it is a small, old-school build-time tool hidden inside one of the most widely deployed C projects. Installing it as a separate package gives developers access to SQLite's parser generator without vendoring the SQLite source tree.

### 时间线

- 2000s: Lemon became part of the SQLite source tree as the generator for SQLite's SQL parser.
- 2022: SQLite's Lemon documentation described Lemon as having no standalone source repository and being maintained as files inside the SQLite tree.

### Related projects

- SQLite is the parent project and primary user.
- yacc and GNU Bison are the older parser-generator family Lemon is commonly compared with.

### 来源

- <https://sqlite.org/lemon.html>
- <https://www.hwaci.com/sw/lemon/>


## 安全说明

没有找到 lemon 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 其他软件包管理器记录

- Debian apt - lemon - 3.46.1-7+deb13u1: normalized package name match | Debian stable package indexes: lemon from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | LALR(1) Parser Generator for C or C++ | https://www.sqlite.org/
- Nix - lemon: normalized package name match | nixpkgs package indexes: pkgs/by-name/le/lemon/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - lemon - 3.45.1-1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: lemon from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | LALR(1) Parser Generator for C or C++ | https://www.sqlite.org/
- dnf - lemon - 3.53.4-1.fc45: normalized package name match | Fedora Rawhide package metadata: lemon from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A parser generator | http://www.sqlite.org/
- pacman - lemon - 3.53.4-1: normalized package name match | Arch Linux sync databases: lemon from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | A parser generator | https://www.sqlite.org/
- zypper - lemon - 3.53.2-3.2: normalized package name match | openSUSE Tumbleweed package metadata: lemon from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A parser generator | https://www.sqlite.org/
- MacPorts - lemon: normalized package name match | MacPorts ports tree: lang/lemon/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/lemon.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lemon.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
