Go to file
dependabot[bot] b972e88f66
Bump addressable from 2.7.0 to 2.8.0 in /site (#16)
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/sporkmonger/addressable/releases)
- [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0)

---
updated-dependencies:
- dependency-name: addressable
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-13 12:49:28 +02:00
Parser_Tools Update after review-comments. 2020-04-09 17:19:19 +02:00
annotation-test-suite Fixed @@inject 2018-01-26 18:10:50 +01:00
dropin made dropin compile again 2018-01-31 20:46:58 +01:00
server Get rid of the warnings in the "server" as well 2020-04-09 10:44:29 +02:00
site Bump addressable from 2.7.0 to 2.8.0 in /site (#16) 2021-07-13 12:49:28 +02:00
src Update after review-comments. 2020-04-09 17:19:19 +02:00
test Make the tests compile clean. 2020-04-09 10:01:26 +02:00
test-vms
util/src Implemented @@inject 2017-12-09 15:11:25 +01:00
yaml-test-suite
.gitignore Get rid of the warnings in the "server" as well 2020-04-09 10:44:29 +02:00
Changelog.md Changelog for v0.3.0; updated Readme 2018-03-22 21:17:02 +01:00
Makefile
Readme.md Just update links in the Readme, 2020-04-09 16:03:01 +02:00
copying.txt
libyaml_dropin-utils.gpr Remove ilegal library_dir in non library projects (#15) 2021-05-27 12:54:51 +02:00
libyaml_dropin.gpr Improvements to libyaml-dropin 2017-10-14 18:08:33 +02:00
yaml-annotation_processor.gpr Extracted annotation processor to own project 2017-11-30 18:26:22 +01:00
yaml-server.gpr Remove ilegal library_dir in non library projects (#15) 2021-05-27 12:54:51 +02:00
yaml-tests.gpr Remove ilegal library_dir in non library projects (#15) 2021-05-27 12:54:51 +02:00
yaml-utils.gpr Remove ilegal library_dir in non library projects (#15) 2021-05-27 12:54:51 +02:00
yaml.gpr Make the tests compile clean. 2020-04-09 10:01:26 +02:00
yaml_all.gpr Get rid of the warnings in the "server" as well 2020-04-09 10:44:29 +02:00

Readme.md

AdaYaml - YAML 1.3 implementation in Ada

This is an implementation of the upcoming YAML 1.3 standard. Since the standard is not completed yet, some features are due to change.

You can use it as YAML 1.2 implementation, it will parse almost all valid YAML 1.2 documents since proposed changes to 1.3 are minimal and only cover edge cases.

Status

Current YAML test suite status:

Total Tests Run:   249
Successful Tests:  244
Failed Assertions: 2
Unexpected Errors: 3

The parser is thoroughly tested and only fails test cases that are expected not to pass in YAML 1.3. Lionel Matias has fuzzy-tested AdaYaml, his findings have been adressed. Benchmarks of AdaYaml show that it currently uses about twice the time libyaml uses for parsing large YAML documents.

The parts of AdaYaml which have not undergone extensive testing are the DOM API and the Presenter.

Installation

You can install AdaYaml easily by executing

gprbuild -p -XMode=release yaml.gpr
gprinstall -XMode=release yaml.gpr

Afterwards, you can with "yaml"; in your projects.

YAML 1.3 Features

Status of YAML 1.3 features, taken from this list:

Number Desciption Status
RFC-001 Remove the 1024 character limit Implemented
RFC-002 Limit content allowed after the '---' header Implemented
RFC-003 Characters that can appear in anchor Implemented
RFC-004 Block sequence entries must use space after dash Implemented
RFC-005 Restrict default implicit types to JSON semantics Not applicable
RFC-006 Disallow carriage return as a break Implemented
RFC-007 Disallow flow collections as implicit keys Implemented
RFC-008 Annotations Can be parsed
RFC-009 Allow unresolvable aliases Implemented
RFC-010 Fixed position of properties and block scalars Implemented
RFC-011 Indentation of block scalars Implemented
RFC-012 Remove wiki-like syntax from folded block scalars Implemented
RFC-013 retracted Not implemented
RFC-014 Anchors always come before tags (when both) Not implemented

General Roadmap

  • Have a basic working lexer
  • Have a basic working parser
  • Have a basic working representer
  • Test against the YAML test suite
  • Implement fancy error reporting (starting line of error with marker)
  • Do some benchmarks
  • Web demo
  • Implement UTF-16 and UTF-32 encodings
  • Make AdaYaml a drop-in replacement for libyaml (provide the C interface)
  • As proof-of-concept, implement the Transformations extension
  • Maybe provide a DOM API

Hacking

You can build the tests with:

make test

This builds the unit tests. The executables will be located in the test/bin directory (be sure that the root folder is the working directory when executing).

If you have GNAT GPL and GNATcoverage, you can also compute code coverage from the testsuite:

make test-coverage-run

The following command builds a small utility that reads a YAML files and outputs a stream of events to the command line:

make utils

It is located in util/bin afterwards. The tool reads either the file specified as first command line parameter, or, in absense of that parameter, from stdin.

To edit the code, you can use GNAT Programming Studio to open the *.gpr files.

License

MIT