2 pointsby mjbq4 hours ago1 comment
  • mjbq4 hours ago
    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).

    I have been working on this for several years in order to explore the idea and have found it useful and stimulating. The actual language, which I call "nom" uses a curly brace syntax and a set of commands that manipulate the text register machine.

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

    Nom is self hosting and can translate itself to other languages such as perl, lua, dart and rust. Recently I have been working on a higher level parsing language which I call "syntagma" and which is much more similar to EBNF syntax. Some syntagma scripts can be seen at http://nomlang.org/syntagma/eg/