blob: 4560c6a70cc252822c532dfaedee8a4f18bf9b68 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# __DSL_NAME__
A Domain-Specific Language created with DSK (DSL Development Kit).
## Overview
- **Language Type**: __PARADIGM__
- **Purpose**: __PURPOSE__
- **Data Philosophy**: __DATA_PHILOSOPHY__
## Getting Started
### Prerequisites
- [Tree-sitter CLI](https://tree-sitter.github.io/tree-sitter/creating-parsers#installation)
- Node.js or Bun (for JavaScript bindings)
- C compiler (gcc/clang) for native compilation
### Development
```bash
# Start development mode with file watching
dsk dev
# Run tests
dsk test
# Build parser and packages
dsk build
# Generate editor syntax highlighting
dsk highlight
# Package for distribution
dsk package
```
## Project Structure
```
__DSL_NAME__/
├── grammar.js # Tree-sitter grammar definition
├── corpus/ # Test cases for the grammar
│ └── examples.txt
├── generated/ # Generated artifacts (created by dsk build)
│ ├── c/ # C static library
│ ├── js/ # JavaScript/Node.js package
│ └── editors/ # Editor configurations
└── examples/ # Example programs in your language
└── hello.__EXT__
```
## Language Features
__FEATURES_LIST__
## Grammar Rules
The grammar includes rules for:
- **Tokens**: Identifiers, numbers, strings, comments
- **Expressions**: Based on your language paradigm
- **Statements**: Control flow and declarations
- **Data Structures**: __DATA_STRUCTURES__
## Next Steps
1. **Customize the Grammar**: Edit `grammar.js` to refine your language syntax
2. **Add Test Cases**: Create examples in `corpus/examples.txt`
3. **Write Example Programs**: Add sample code to `examples/`
4. **Generate Editor Support**: Run `dsk highlight` for syntax highlighting
5. **Build and Test**: Use `dsk dev` for iterative development
## Resources
- [Tree-sitter Documentation](https://tree-sitter.github.io/tree-sitter/)
- [DSK Documentation](https://github.com/your-org/dsk)
- [Language Implementation Patterns](https://pragprog.com/titles/tpdsl/)
---
Generated by [DSK](https://github.com/your-org/dsk) - DSL Development Kit
|