Grammar Design

SkillMedia

Expert skill for formal grammar design including disambiguation, precedence, and validation

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

Then ask your AI: use the Grammar Design skill

What this skill tells your AI

The instructions your AI receives, as published by a5c-ai/babysitter in library/specializations/programming-languages/skills/grammar-design/SKILL.md and read by ahel’s review.

Overview

Expert skill for formal grammar design including disambiguation, precedence, and validation.

Capabilities

  • Write EBNF/BNF grammar specifications
  • Design unambiguous grammars
  • Handle operator precedence and associativity
  • Analyze grammar conflicts
  • Design grammar for specific parser classes (LL, LR, PEG)
  • Document grammar with examples
  • Design syntax for common language constructs
  • Handle grammar evolution and backwards compatibility

Target Processes

  • language-grammar-design.js
  • lexer-implementation.js
  • parser-development.js

Dependencies

Parsing theory literature (Dragon Book, Parsing Techniques)

Usage Guidelines

  1. Notation: Use standard EBNF notation for grammar specifications
  2. Disambiguation: Make grammars unambiguous or document precedence rules
  3. Parser Class: Design grammar to fit target parser class (LL(k), LALR, PEG)
  4. Examples: Include examples for all grammar rules
  5. Evolution: Plan for backwards-compatible grammar evolution

Output Schema

{
  "type": "object",
  "properties": {
    "notation": {
      "type": "string",
      "enum": ["ebnf", "bnf", "peg", "antlr"]
    },
    "parserClass": {
      "type": "string",
      "enum": ["ll1", "llk", "lalr", "glr", "peg"]
    },
    "productionCount": { "type": "integer" },
    "conflicts": {
      "type": "array",
      "items": { "type": "string" }
    },
    "generatedFiles": {
      "type": "array",
      "items": { "type": "string" }
    }
  }
}

Signals

GitHub stars
2k
Forks
112
Last commit
Sep 2026
Advanced
Item type
skill
Key
grammar-design
Source
github.com/a5c-ai/babysitter