Grammar design
Skill a5c-ai/babysitter/library/specializations/programming-languages/skills/grammar-design
Expert skill for formal grammar design including disambiguation, precedence, and validationFrom its SKILL.md
npx -y skills add a5c-ai/babysitter --skill grammar-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.9 KB, 384 tokens by cl100k_base, as published. Nobody here has run it
Grammar Design Skill
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
- Notation: Use standard EBNF notation for grammar specifications
- Disambiguation: Make grammars unambiguous or document precedence rules
- Parser Class: Design grammar to fit target parser class (LL(k), LALR, PEG)
- Examples: Include examples for all grammar rules
- 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" }
}
}
}
What ships with it: 1 file
786 B alongside SKILL.md
- README.md786 B