A Human-Friendly Data Serialization Format
Thank you for your interest in contributing to UP! This document provides guidelines and information for contributors.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)# Clone the repository
git clone https://github.com/uplang/spec
cd up
# Install dependencies
go mod download
# Build
make build
# Run tests
go test ./...
# Run linter
golangci-lint run
Each parser in parsers/ has its own build system:
# JavaScript/TypeScript
cd parsers/javascript
npm install
npm test
# Python
cd parsers/python
pip install -e .
python -m pytest
# Rust
cd parsers/rust
cargo build
cargo test
# C
cd parsers/c
make
make test
gofmt)# Go tests
go test ./...
# Integration tests with examples
for file in examples/*.up; do
./bin/up validate -i "$file"
done
examples/ directoryexamples/README.mdIf proposing changes to the UP language:
grammar/GRAMMAR.md with formal specificationgrammar/up.y (Bison/Yacc)grammar/up.l (Flex)grammar/up.g4 (ANTLR4)grammar/up.peg (PEG)grammar/grammar.js (Tree-sitter)When implementing a UP parser in a new language:
parsers/<language>/
├── README.md # Usage and installation
├── parser files # Implementation
├── tests/ # Unit tests
└── examples/ # Language-specific examples
Ensure your parser correctly handles:
examples/ directoryUse clear, descriptive commit messages:
Add Python parser implementation
- Implement full UP parser in Python
- Add unit tests
- Add setup.py for pip installation
- Update README with Python usage
Format:
Fixes #123By contributing, you agree that your contributions will be licensed under the MIT License.
grammar/ and examples/Thank you for contributing to UP!