# 使用 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/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-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/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## 软件包事实

- **软件包键:** brew:lemon
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/lemon>
- **版本:** 3.53.3
- **来源摘要:** LALR(1) parser generator like yacc or bison
- **主页:** <https://www.hwaci.com/sw/lemon/>
- **仓库:** <https://www.sqlite.org/src>
- **上游文档:** <https://www.hwaci.com/sw/lemon>
- **许可证:** blessing
- **源码归档:** <https://www.sqlite.org/2026/sqlite-src-3530300.zip>
- **最后更新:** 2026-06-27T14:08:56Z
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- lemon (cli)
- lemon (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sequoia, sonoma, tahoe, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 3.53.3
- 管理器更新时间: 2026-06-27
- 本地数据: OK
- 上游仓库: https://www.hwaci.com/sw/lemon/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

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。


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** lemon
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- 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.2-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/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A parser generator | http://www.sqlite.org/
- pacman - lemon - 3.53.2-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-1.1: normalized package name match | openSUSE Tumbleweed package metadata: lemon from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-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


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [antlr](https://www.automicvault.com/zh-hans/pkg/brew/antlr/) - Shares av.db curated category or tags: cli, developer-tools, parser-generator, parser-generators.
- [bison](https://www.automicvault.com/zh-hans/pkg/brew/bison/) - Shares av.db curated category or tags: cli, developer-tools, parser-generator, parser-generators.
- [goyacc](https://www.automicvault.com/zh-hans/pkg/brew/goyacc/) - Shares av.db curated category or tags: cli, developer-tools, parser-generator, parser-generators.
- [packcc](https://www.automicvault.com/zh-hans/pkg/brew/packcc/) - Shares av.db curated category or tags: cli, developer-tools, parser-generator, parser-generators.
- [byacc](https://www.automicvault.com/zh-hans/pkg/brew/byacc/) - Shares av.db curated category or tags: cli, developer-tools, lalr, parser-generator.
- [bnfc](https://www.automicvault.com/zh-hans/pkg/brew/bnfc/) - Shares av.db curated category or tags: cli, developer-tools, parser-generator.
- [javacc](https://www.automicvault.com/zh-hans/pkg/brew/javacc/) - Shares av.db curated category or tags: cli, developer-tools, parser-generator.
- [kaitai-struct-compiler](https://www.automicvault.com/zh-hans/pkg/brew/kaitai-struct-compiler/) - Shares av.db curated category or tags: cli, developer-tools, parser-generator.

## Combined YAML source

View the package source record on GitHub. [combined/lemon.yml](https://github.com/automic-vault/db/blob/main/combined/lemon.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
