SDF2

1 program Added 2026-03-16T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Syntax Definition Formalism 2
Provenance: commit 0188a19c67 · authored 2026-03-16T22:56:21+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

SDF (0.79)PSF (0.22)SFDL (0.17)Ampersand (0.16)CDDL (0.15)

LLM-contributed programs

Expression Grammar

Provenance: commit 0188a19c67 · authored 2026-03-16T22:56:21+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.sdf · added: 2026-03-16T10:00:00Z
module Expressions

imports
  Basic

exports
  sorts Exp Id IntConst

  lexical syntax
    [0-9]+                    -> IntConst
    [a-zA-Z][a-zA-Z0-9_]*    -> Id

  context-free syntax
    IntConst        -> Exp
    Id              -> Exp
    Exp "+" Exp     -> Exp  {left, cons("Add")}
    Exp "-" Exp     -> Exp  {left, cons("Sub")}
    Exp "*" Exp     -> Exp  {left, cons("Mul")}
    Exp "/" Exp     -> Exp  {left, cons("Div")}
    "(" Exp ")"     -> Exp  {bracket}

  context-free priorities
    {left: Exp "*" Exp -> Exp
           Exp "/" Exp -> Exp} >
    {left: Exp "+" Exp -> Exp
           Exp "-" Exp -> Exp}

Contribute — propose a file extension

Tell us where to find evidence about SDF2 (mapped to pl/sdf2). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/SDF2/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← sdf-format SDL →