Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install check and build tooling
run: |
python -m pip install -e ".[dev]"
python -m pip install yini-test-suite==0.3.0rc1
python -m pip install yini-test-suite==0.4.0rc1

- name: Verify release tag matches package version
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yini-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install yini-test-suite==0.3.0rc1
python -m pip install yini-test-suite==0.4.0rc1

- name: Run shared YINI test suite
run: >
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@

## [Upcoming/Unreleased]

- Implement parser updates to align with YINI Spec RC6x:
* **Fixed:** Inline object keys named `hex` now accept values without whitespace after `:`, including nested objects, while hexadecimal value literals retain their numeric meaning.
* **Fixed:** `@yini lenient` now emits a mode-mismatch warning in strict mode and continues strict validation instead of rejecting the declaration.
* **Added:** Deprecated `%` binary literals now emit a warning recommending `0b` in both parsing modes, including lenient string concatenation.

## 1.0.0 release candidate 1 - 2026 October
- **Changed:** Updated the package version to `1.0.0rc1` for release-candidate testing against YINI Specification 1.0.0 RC.6.
- **Added:** Support for `command"""` multiline strings, including structural indentation removal and preservation of content line endings. Command strings are parsed as text and are not executed.
- **Added:** Support for `E`/`e` escaped strings, including triple-quoted forms. `C`/`c` remain valid deprecated aliases.
- **Added:** Added Dependabot configuration for monthly npm and GitHub Actions dependency updates.
- **Fixed:** Backticked member keys, inline-object keys, and section names now decode `\\` to one backslash in both lenient and strict modes. Previously, parsed names retained both backslashes.
- **Fixed:** Single-line raw and escaped strings now preserve literal tabs in both lenient and strict modes, while continuing to reject other disallowed control characters.

## 1.0.0 beta 1 - 2026 August
- **Changed:** Bumped the package version to `1.0.0b1` after the parser passed `yini-test-suite` `0.3.0b2`, the **shared conformance suite** with broad coverage of YINI Specification 1.0.0 Release Candidate 6.
Expand Down
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ The official Python parser for **YINI** (by the YINI-lang project) — a human-r

## Project links

- [YINI homepage](https://yini-lang.org?utm_source=github&utm_medium=referral&utm_campaign=yini_parser_python&utm_content=readme_project_links)
- [YINI specification](https://yini-lang.org/refs/specification?utm_source=github&utm_medium=referral&utm_campaign=yini_parser_python&utm_content=readme_project_links)
- [YINI homepage](https://yini-lang.org?utm_source=github&utm_campaign=yini_parser_python&utm_content=readme_project_links&utm_medium=referral)
- [YINI specification](https://yini-lang.org/refs/specification?utm_source=github&utm_campaign=yini_parser_python&utm_content=readme_project_links&utm_medium=referral)
- [GitHub repository](https://github.com/YINI-lang/yini-parser-python)
- [Bug reports and issues](https://github.com/YINI-lang/yini-parser-python/issues)

Expand Down Expand Up @@ -108,9 +108,23 @@ By default, both functions use lenient parsing. To validate a strict document,
pass `strict=True`; strict documents require one top-level section and a final
`/END`.

An explicit `@yini strict` declaration is rejected in lenient mode. An
`@yini lenient` declaration produces a warning in strict mode, and all strict
validation rules still apply. Duplicate sections under the same parent are
errors in both modes.
In lenient mode, empty member values become `None` with a warning, and duplicate
keys keep the first value with a warning. Mixed source line endings and misplaced
shebang-like comments also produce warnings in lenient mode and errors in strict
mode. The `@include` directive is reserved and is rejected in both modes.

The deprecated `%` binary prefix remains valid in both modes and produces a
warning recommending `0b` instead. Inline object keys named `hex` work without
whitespace after the separator: `{ hex:10 }` means `{"hex": 10}`, while
`{ value: hex:10 }` means `{"value": 16}`.

Inside backticked keys and section names, write `\\` for one literal backslash.

See the [YINI specification and documentation](https://yini-lang.org/refs/specification?utm_source=github&utm_medium=referral&utm_campaign=yini_parser_python&utm_content=readme).
See the [YINI specification and documentation](https://yini-lang.org/refs/specification?utm_source=github&utm_campaign=yini_parser_python&utm_content=readme&utm_medium=referral).

---

Expand Down Expand Up @@ -143,7 +157,7 @@ What they show:
- `examples/example2.py` reads `examples/nested.yini` and shows nested sections as nested Python dictionaries.
- `examples/example3.py` reads `examples/application.yini`, validates required fields, and prints a small configuration report.

More YINI syntax examples are available on the [YINI examples page](https://yini-lang.org/learn-yini/examples/?utm_source=yini-parser-python&utm_medium=github&utm_campaign=repo-link&utm_content=readme).
More YINI syntax examples are available on the [YINI examples page](https://yini-lang.org/learn-yini/examples/?utm_source=github&utm_campaign=yini_parser_python&utm_content=readme&utm_medium=referral).

Runnable example projects are available in the [YINI demo apps repository](https://github.com/YINI-lang/yini-demo-apps/tree/main/python):

Expand Down Expand Up @@ -184,6 +198,9 @@ mode = 'optional'
- `TLS` is nested under `Server`.
- The section markers `^` make the nesting explicit. Indentation is optional and not required for structure.
- Strings can use either `'` or `"`.
- `E`/`e` strings interpret escapes; `C`/`c` remain valid aliases.
- `command"""` starts a multiline literal that removes structural indentation and preserves line breaks.
- Source line endings in triple-quoted and command strings become LF (`\n`) in both modes. Characters produced by escape sequences retain their exact values.

### JSON
```json
Expand Down Expand Up @@ -304,7 +321,7 @@ The `tests/` directory contains a focused implementation-local test suite, inclu
- The public loading API.
- Values, numbers, strings, lists, and inline objects, including lenient `=` separators and strict `:` enforcement.
- Sections, nested sections, section depth, and section marker separators.
- Backticked keys and section names, including escaped backslashes.
- Backticked keys and section names, including escaped backslashes and backticks.
- Strict and lenient parser behavior.
- `@yini strict` and `@yini lenient` mode declarations.
- Duplicate keys, repeated sections, and key/section collisions.
Expand Down Expand Up @@ -346,8 +363,8 @@ strict modes against a pinned release of `yini-test-suite`.

## Links

- [YINI specification](https://yini-lang.org/refs/specification?utm_source=github&utm_medium=referral&utm_campaign=yini_parser_python&utm_content=readme)
- [YINI homepage](https://yini-lang.org?utm_source=github&utm_medium=referral&utm_campaign=yini_parser_python&utm_content=readme)
- [YINI specification](https://yini-lang.org/refs/specification?utm_source=github&utm_campaign=yini_parser_python&utm_content=readme&utm_medium=referral)
- [YINI homepage](https://yini-lang.org?utm_source=github&utm_campaign=yini_parser_python&utm_content=readme&utm_medium=referral)
- [YINI-lang on GitHub](https://github.com/YINI-lang)
- [yini-parser on PyPI](https://pypi.org/project/yini-parser/)

Expand All @@ -359,4 +376,4 @@ strict modes against a pinned release of `yini-test-suite`.
>
> It has a formal specification and a defined grammar.

[yini-lang.org](https://yini-lang.org/?utm_source=github&utm_campaign=yini_parser_python&utm_medium=referral&utm_content=readme_footer) · [YINI-lang on GitHub](https://github.com/YINI-lang)
[yini-lang.org](https://yini-lang.org/?utm_source=github&utm_campaign=yini_parser_python&utm_content=readme_footer&utm_medium=referral) · [YINI-lang on GitHub](https://github.com/YINI-lang)
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
version: '3'

vars:
GRAMMAR_BASE: ./grammar/v1.0.0-rc.6
GRAMMAR_BASE: ./grammar/v1.0.0-rc.6x

PARSER_FILE: "{{.GRAMMAR_BASE}}/YiniParser.g4"
LEXER_FILE: "{{.GRAMMAR_BASE}}/YiniLexer.g4"
Expand Down
Loading
Loading