prolog-dcg
CommunityProlog DCGs for parsing and generation.
Authorhafley66
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Prolog DCGs provide a concise way to define grammars and parsers by embedding list threading directly into Prolog rules, enabling parsing and generation from a single, bidirectional specification.
Core Features & Use Cases
- DCG syntax and transformation to standard clauses for terminals and nonterminals.
- phrase/2 and phrase/3 interfaces for parsing, recognition, and generation.
- Bidirectional grammars that support both parsing and generation with Prolog backtracking.
- Optional state threading and pushback to handle complex parsing tasks.
- Use Case: quickly prototype a small language grammar and generate sample sentences.
Quick Start
Define a small DCG rule and use phrase/2 to parse a sample input.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: prolog-dcg Download link: https://github.com/hafley66/claude-research/archive/main.zip#prolog-dcg Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.