# Install treecc with Homebrew, MacPorts

Aspect-oriented approach to writing compilers. Version 0.3.10 via Homebrew; verified from local package data. Also installable with macports: sudo port install treecc.

## Install

```sh
sudo av install brew:treecc
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install treecc
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install treecc
```

  Evidence: MacPorts ports tree: devel/treecc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:treecc
- **Package manager:** Homebrew
- **Version:** 0.3.10
- **Source summary:** Aspect-oriented approach to writing compilers
- **Homepage:** <https://gnu.org/software/dotgnu/treecc/treecc.html>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- treecc (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.3.10
## Project history and usage

treecc is an older GNU/DotGNU compiler-construction tool for generating tree-building and tree-walking code from declarative input files.

### Project history

The GNU treecc manual frames the tool as a complement to lex and yacc: traditional parser tools help with tokenizing and parsing, but leave semantic analysis, tree construction, and code generation largely to the programmer.

treecc's approach is to use a simple rule-based language, with embedded implementation code, that a translator converts into ordinary source code. The generated code helps build and walk trees and checks that relevant operations have been implemented for node types.

Historically, treecc lived inside the DotGNU/Portable.NET world. GNU's DotGNU page lists Portable.NET as an implementation of the Common Language Infrastructure and records releases that included TreeCC in the mid-2000s; it also states that DotGNU was decommissioned as of December 2012 except for libjit.

### Adoption history

treecc appears to have remained a niche compiler-construction utility rather than becoming a general parser ecosystem. Its package-manager interest is mostly archival and practical: keeping old DotGNU-era source packages buildable and keeping a small AOP-influenced compiler helper available.

### How it is used

The documented command form is `treecc [OPTIONS] INPUT ...`, with options to select output and header files, Java output directories, extensions, forced creation, no-output checking, and option values supplied from the command line.

### Why package nerds care

treecc is significant mainly as a preserved GNU-era compiler tool: small, specific, historically tied to Portable.NET, and useful to package maintainers who care about old language-runtime experiments.

### Timeline

- 2004: GNU DotGNU news records Portable.NET 0.6.4 and Treecc 0.3.0.
- 2005: GNU DotGNU news records Portable.NET 0.6.12 and TreeCC 0.3.6.
- 2009: The published treecc manual HTML was generated from its Texinfo source.
- 2012: GNU states the DotGNU project was decommissioned except for libjit.

### Related projects

- treecc was related to DotGNU Portable.NET, pnetC, pnetlib, and libjit in the old GNU/DotGNU stack.
- Conceptually it sits near lex/yacc-style compiler tools, but focuses on tree-building and tree-walking rather than lexical analysis or parsing.

### Sources

- <https://www.dotgnu.org/pnet-git.html>
- <https://www.gnu.org/software/dotgnu/>
- <https://www.gnu.org/software/dotgnu/treecc/treecc.html>
- <https://www.gnu.org/software/dotgnu/treecc/treecc_1.html>
- <https://www.gnu.org/software/dotgnu/treecc/treecc_3.html>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Other Package-Manager Records

- MacPorts - treecc: normalized package name match | MacPorts ports tree: devel/treecc/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/treecc.yml](https://github.com/mxcl/pkgdb/blob/main/combined/treecc.yml)


## Sources

- 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
