# AmadeusITGroup's Edison gives Python a real syntax tree for EDIFACT

Original title: Parsing EDIFACT in Python with syntax trees

> Hacker News story 50195535 · language: en · submitted 2026-10-22
> Web version: https://zeli.app/story/50195535
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 25 · by [alexprengere](<https://news.ycombinator.com/user?id=alexprengere>) · 💬 17
[original](<https://github.com/AmadeusITGroup/Edison>) · [HN discussion](<https://news.ycombinator.com/item?id=50195535>)

## Summary

Edison, an open-source Python library from AmadeusITGroup, parses EDIFACT messages as recursive syntax trees instead of flat segment lists. You define a schema in Python, and Edison compiles it into a state machine for parsing, validation, and pretty-printing. It supports versioned schemas, mandatory and repeatable groups, parsing callbacks, escaped separators, EBCDIC normalization, and pydot transition graphs. Requires Python 3.12+.

## Key quote

> Instead of treating a message as a flat list of segments, it models messages as a syntax tree: segments can define groups of child segments, recursively.

## HN discussion (17 comments)

### [CharlesW](<https://news.ycombinator.com/item?id=50223748>)

> In case other HNers have also not heard of this: https://en.wikipedia.org/wiki/EDIFACT

### [LouDNL](<https://news.ycombinator.com/item?id=50224107>)

> Really nice! I've been preparing to parse this for a possible customer in another language. Thanks for the insights.

### [DonaldPShimoda](<https://news.ycombinator.com/item?id=50223690>)

> What is a "real" syntax tree? I wonder if the intent was "concrete" (the contrast to an abstract syntax tree), or if it's meant colloquially (as in "you really get a syntax tree" or "you get an actual syntax tree") rather than as a technical term.

---

## Cite

- Page: https://zeli.app/story/50195535
- Date: 2026-10-22
- Source: github.com (https://github.com/AmadeusITGroup/Edison)
- Hacker News: https://news.ycombinator.com/item?id=50195535

## Other languages

- zh: https://zeli.app/zh/story/50195535 · markdown: https://zeli.app/zh/story/50195535.md
- ja: https://zeli.app/ja/story/50195535 · markdown: https://zeli.app/ja/story/50195535.md
- ko: https://zeli.app/ko/story/50195535 · markdown: https://zeli.app/ko/story/50195535.md
- de: https://zeli.app/de/story/50195535 · markdown: https://zeli.app/de/story/50195535.md
- es: https://zeli.app/es/story/50195535 · markdown: https://zeli.app/es/story/50195535.md
- ru: https://zeli.app/ru/story/50195535 · markdown: https://zeli.app/ru/story/50195535.md
