01 — Parser Generator (Waggle)
LL(k) parser generator for context-free grammars. Generates a parser and a full AST (Abstract Syntax Tree) for Java, C++ & Rust from a single .waggle grammar.
Describe your application and business logic once as a model — independent of technology and platform. The platform may change; the model stays. HiveVM provides the tools and projects to run it wherever it needs to go.
$ git clone https://github.com/hivevm/waggle
// LL(k) grammar — generates a parser + AST grammar Calc; expr : term (('+' | '-') term)* ; term : factor (('*' | '/') factor)* ; factor : NUMBER | '(' expr ')' ; NUMBER : [0-9]+ ('.' [0-9]+)? ; WS : [ \t\r\n]+ -> skip ;
$ waggle generate Calc.waggle --target java,cpp
Parsing grammar Calc.waggle…
✓ LL(k) analysis complete (k=2)
✓ Parser → java/CalcParser.java
✓ AST → cpp/CalcNode.hpp
→ 2 targets built in 0.4s
watching grammar for changes
Generates and builds across your stack
Toolkit
Each tool turns a model into something concrete — a grammar into a parser, Markdown into a manual, a specification into a project — so your repository stays focused on intent, not on one architecture, technology or deployment.
LL(k) parser generator for context-free grammars. Generates a parser and a full AST (Abstract Syntax Tree) for Java, C++ & Rust from a single .waggle grammar.
Manual generator for collections of Markdown documents. Supports the CommonMark syntax to turn a folder of files into one coherent manual.
A starting point for building software with coding agents inside a ready-to-use Dev Container. Work is driven by a written specification and ADRs, with AGENTS.md as the single source of truth for every agent.
The same grammar emits idiomatic Java, C++ and Rust — keep one source of truth and let HiveVM project it onto each language.
Server launchers wire your generated tooling straight into VSCode, so language features light up as soon as the model changes.
Developer experience
Grammars, documents and specifications are plain declarative files. Describe the intent once and let HiveVM generate the parser, the manual — and let coding agents grow the project from it.
grammar Calc; expr : term (('+' | '-') term)* ; term : factor (('*' | '/') factor)* ; factor : NUMBER | '(' expr ')' ; NUMBER : [0-9]+ ;
# Agent Guide Single source of truth for all coding agents. ## Start here 1. docs/SPECIFICATION.md — the specification 2. docs/adr/ — accepted ADRs are binding ## ADR rules - Create an ADR before any architecture-relevant change - Set status proposed, then stop and ask for review
# User Manual Built from a collection of **CommonMark** files. - [Getting started](./start.md) - [Configuration](./config.md) - [Grammar reference](./grammar.md)
Parser generation
Waggle is an LL(k) parser generator for context-free grammars. From a single
.waggle grammar it generates a recursive-descent parser and a full AST for
Java, C++ and Rust — and the generated parsers carry
no Waggle runtime dependency.
Waggle started as a fork of JavaCC 7.0.13 and keeps its proven model: LL(k) recursive
descent, a token manager with lexical states, and syntactic and semantic lookahead. What
changed is the surface — a simplified, EBNF-like syntax, and tree building written right in
the grammar with #Node annotations, so there is no separate JJTree step.
Why “Waggle”? Honeybees talk in the waggle dance: a forager encodes the direction and distance of a food source in a figure-eight run, and the other bees in the hive parse the dance to find it. A grammar that others read — which is exactly what a parser generator is about.
Agentic development
NUC is a starting point for building software with coding agents inside a
ready-to-use Dev Container. Work is driven by a written specification and
Architecture Decision Records — with AGENTS.md as the single
source of truth every agent reads.
Why “NUC”? In beekeeping, a nucleus colony — a NUC — is the small starter colony a full hive grows from. Same idea here: a compact, ready-made nucleus that a complete project grows out of.
Open source
Every HiveVM tool lives in its own public repository. Read the source, file issues or build from it — the whole toolkit is open.
LL(k) parser generator for context-free grammars. Generates parser and AST for Java, C++ & Rust from .waggle grammars.
Manual generator for collections of Markdown documents. Supports the CommonMark syntax.
Open repositoryA starting point for building software with coding agents inside a ready-to-use Dev Container. Specification & ADR driven.
Open repositoryAbout the name
HiveVM is a cross-platform, model-driven application platform in Rust —
applications are described as models, and the platform runs them. The name captures both
halves of that idea.
A tribute to the hexagonal architecture at the platform's core. Hexagons are among the most stable, efficient structures in nature — the same property that makes the design resilient and composable. And like a hive, the system is built from many small parts working together toward one coherent whole.
A virtual machine: the runtime that executes applications described as models. Just as a classic VM runs bytecode, HiveVM runs models — the model is what gets executed.
Start from a grammar, a folder of Markdown or a project specification. HiveVM turns the model into a parser, a manual or a running application — whatever the architecture, technology or deployment.