Automic VaultAutomic Vault

brew

peg を Homebrew, apk, apt, MacPorts, Nix, pacman, zypper でインストール

peg のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

インストール

追加のインストールコマンド

macOS

Homebrew確認済み · 100%
brew install peg

local Homebrew formula metadata

MacPorts確認済み · 94%
sudo port install peg

MacPorts ports tree · devel/peg/Portfile · ソース: api.github.com

Linux

Alpine Linux apk確認済み · 92%
sudo apk add peg

Alpine Linux edge package indexes · peg · ソース: dl-cdn.alpinelinux.org

Debian apt確認済み · 92%
sudo apt install peg

Debian stable package indexes · peg · ソース: deb.debian.org

Nix確認済み · 92%
nix profile install nixpkgs#peg

nixpkgs package indexes · pkgs/by-name/pe/peg/package.nix · ソース: api.github.com

Arch Linux pacman確認済み · 92%
sudo pacman -S peg

Arch Linux sync databases · peg · ソース: geo.mirror.pkgbuild.com

openSUSE zypper確認済み · 92%
sudo zypper install peg

openSUSE Tumbleweed package metadata · peg · ソース: download.opensuse.org

概要

パッケージ概要

Program to perform pattern matching on text

コマンドとエイリアス

  • leg
  • peg

履歴

プロジェクトの歴史と使われ方

peg and leg are recursive-descent parser generators for C. They process Parsing Expression Grammars and generate C parsers, with `peg` following Bryan Ford's original PEG syntax and `leg` using conventions intended as an alternative to lex and yacc.

プロジェクトの歴史

Ian Piumarta's official page lists peg/leg as tools for generating recursive-descent parsers from Parsing Expression Grammars. The first public release in the official version history is 0.1.1 on 2007-05-15.

The manual page explains that peg reads grammar files or standard input and generates C source defining `yyparse()`, while leg uses a syntax intended to make it attractive to users familiar with lex and yacc workflows.

The official version history shows steady maintenance through 0.1.19 stable in 2023, including reentrant parsing support, error actions, UTF-8 fixes, C++ support improvements, and Windows/Mac build files.

採用の歴史

peg/leg spread through Unix-like package managers as a small C parser-generation tool: the input metadata lists Homebrew, Debian, Ubuntu, Arch, MacPorts, Nix, Alpine, and openSUSE package names.

Its niche is smaller than yacc-family tools, but it remains useful where a project wants PEG-style ordered choice, unlimited backtracking, and combined scanning and parsing in generated C.

使われ方

Typical use is to run `peg` or `leg` over a grammar file and compile or include the generated C source in a client program.

The official manual documents options such as `-o` for output file selection, `-P` for suppressing `#line` directives, `-v` for verbose mode, and `-V` for version output.

パッケージ好きにとっての重要性

peg/leg is package-manager-friendly because it is a compact C command-line tool with a stable manual page, source tarballs, and a long version history.

For package nerds it is also a useful contrast with lex/yacc: a small PEG-based generator that produces embeddable C parsers without requiring a larger parser framework.

タイムライン

  • 2007-05-15: First public release, 0.1.1.
  • 2013-06-03: 0.1.11 added error actions, C++ support improvements, and Win32/Mac build files.
  • 2016-07-22: 0.1.18 added the `-P` option to disable `#line` directives.
  • 2023-03-06: 0.1.19 stable added experimental re-entrant parsing through `yyparsefrom_r()`.
  • 2023-11-19: 0.1.20 development version listed with experimental inline-action variables and semantic values.

Related projects

  • Bryan Ford's 2004 Parsing Expression Grammars paper is the formal grammar reference cited by the official page.
  • lex and yacc are the comparison point used by the official page and manual.

セキュリティ状態

リスクレベル: グリーン

narrow executable package without higher-risk signals.

リスク分類器

リスク グリーン · 信頼度 低 · appliance

理由

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

インストール挙動

  • formula メタデータに Homebrew post-install フックは記録されていません。
  • Homebrew bottle メタデータは 10 個のプラットフォームターゲットで利用できます。

推奨レビュー

エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。

実行可能ファイル

インストールされる実行可能ファイル

コマンド種類公開範囲メモ
legcliグローバル実行可能ファイル
pegcliグローバル実行可能ファイル

鮮度

バージョンと鮮度

これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。

ページ生成日2026-07-10
マネージャ版0.1.19
マネージャ更新日2026-06-14
ローカルデータOK
上流not checked
検出された最新未検出

https://www.piumarta.com/software/peg/

インストールメタデータ

パッケージメタデータ

パッケージキーbrew:peg
バージョン0.1.19
パッケージマネージャHomebrew
パッケージマネージャページhttps://formulae.brew.sh/formula/peg
ホームページhttps://www.piumarta.com/software/peg/
上流ドキュメントhttps://www.piumarta.com/software/peg
ライセンスMIT
ソースアーカイブhttps://www.piumarta.com/software/peg/peg-0.1.19.tar.gz
最終更新2026-06-14T14:47:59+02:00
Pulseupdated
Bottle利用可能 (対象 arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux)
Homebrew post-install未定義
サービス宣言なし

レジストリ情報

ソースデータベース詳細

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namepeg
Aliases
  • leg
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

ソースデータベース一致

他のパッケージマネージャ記録

一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。

Debian apt95%

peg 0.1.20+really0.1.18-1

recursive-descent parser generators for C

https://piumarta.com/software/peg/

sudo apt install peg
  • Section: devel
  • Architecture: amd64
  • 1 依存関係
  • normalized package name match
  • 一致条件: Peg
Debian stable package indexes · deb.debian.org · Debian stable package indexes: peg from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

peg

nix profile install nixpkgs#peg
  • normalized package name match
  • 一致条件: Peg
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/pe/peg/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

peg 0.1.18-1build1

recursive-descent parser generators for C

http://piumarta.com/software/peg/

sudo apt install peg
  • Section: universe/devel
  • Architecture: amd64
  • 1 依存関係
  • normalized package name match
  • 一致条件: Peg
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: peg from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

peg 0.1.18-r1

Recursive-descent parser generators for C

https://www.piumarta.com/software/peg/

sudo apk add peg
  • License: MIT
  • Architecture: x86_64
  • Source Package: peg
  • 1 依存関係
  • 1 提供
  • normalized package name match
  • 一致条件: Peg
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: peg from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
apk95%

peg-doc 0.1.18-r1

Recursive-descent parser generators for C (documentation)

https://www.piumarta.com/software/peg/

sudo apk add peg-doc
  • License: MIT
  • Architecture: x86_64
  • Source Package: peg
  • normalized package name match
  • 一致条件: Peg
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: peg-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
pacman95%

peg 0.1.19-1

recursive-descent parser generators for C

http://piumarta.com/software/peg/

sudo pacman -S peg
  • License: MIT
  • Architecture: x86_64
  • normalized package name match
  • 一致条件: Peg
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: peg from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
zypper95%

peg 0.1.20-1.7

Recursive-Descent parser generators for C

https://piumarta.com/software/peg/

sudo zypper install peg
  • License: MIT
  • Category: Development/Tools/Building
  • Architecture: x86_64
  • Source Package: peg
  • 1 依存関係
  • 1 提供
  • normalized package name match
  • 一致条件: Peg
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: peg from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst
MacPorts95%

peg

sudo port install peg
  • normalized package name match
  • 一致条件: Peg
MacPorts ports tree · api.github.com · MacPorts ports tree: devel/peg/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

ソース経路

リポジトリデータから生成

このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。

使用ソース

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