Skip to the content.

Edigen Internals

This site documents the current Edigen implementation from parser to generated Java source. It focuses on:

Reading Order

  1. Architecture
  2. AST Transformation Pipeline
  3. Code Generation
  4. Templates

End-to-End Pipeline

.eds specification
    ->
JavaCC parser (`Grammar.jj`)
    ->
AST (`Specification`)
    ->
semantic + structural visitor passes
    ->
generator visitors
    ->
template expansion (`Decoder.edt`, `Disassembler.edt`)
    ->
generated Java classes

Main Runtime Components

The implementation is centered around these layers:

Design Summary

Edigen does not generate code directly from the parser. It first builds a generic AST, then mutates that AST through a fixed sequence of visitors until the tree has a shape that is easy to emit as Java source. The decoder and disassembler generators then walk that normalized tree and inject generated fragments into text templates.

This split is the key architectural idea in the project:

Notes About Current Behavior

The documentation here follows the current implementation, including a few places where the code is more authoritative than the README:

If you need the detail behind those statements, the later pages point to the relevant classes and template sections.