← All projects
Project record1 mention
Originally shared on Hacker News

Pep/nom

A DSL for parsing text patterns (context-free and some context-sensitive), inspired by sed, built on the pep virtual machine (an array and stack of strings synchronised on push and pop). Its language, nom, uses a curly brace syntax and a set of commands that manipulate the text register machine; nom is self hosting and can translate itself to other languages such as perl, lua, dart and rust.

Last shared
01 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Pep/nom

    A DSL for parsing text patterns (context-free and some context-sensitive), inspired by sed, built on the pep virtual machine (an array and stack of strings synchronised on push and pop). Its language, nom, uses a curly brace syntax and a set of commands that manipulate the text register machine; nom is self hosting and can translate itself to other languages such as perl, lua, dart and rust.

    Posted by @mjbq · Original source ↗

    Story title · @mjbq · · Source ↗

    Show HN: Pep/nom, a sed-inspired language for parsing

    Submitted URL · @mjbq · · Source ↗

    https://nomlang.org/

    Source text · @mjbq · · Source ↗

    Pep/nom is a DSL for parsing text patterns (context-free and some context-sensitive). It was inspired by sed, the stream editor, but it uses a more capable underlying virtual machine (which I call pep) which is basically an array and stack of strings that is synchronised on push and pop (push increments an array point, and pop decrements the array pointer).

    Source text · @mjbq · · Source ↗

    The actual language, which I call "nom" uses a curly brace syntax and a set of commands that manipulate the text register machine.

    Source text · @mjbq · · Source ↗

    Nom is self hosting and can translate itself to other languages such as perl, lua, dart and rust.

    Source text · @mjbq · · Source ↗

    Documentation is at http://nomlang.org/doc/ and a set of nom example scripts is at http://nomlang.org/eg/