owens-ml-parser

Crates.ioowens-ml-parser
lib.rsowens-ml-parser
version0.0.0
sourcesrc
created_at2019-08-07 02:11:23.095776
updated_at2019-08-07 02:11:23.095776
descriptionA lightweight parser for a lightweight markup language.
homepage
repositoryhttps://gitlab.com/scOwez/owens-ml-parser
max_upload_size
id154720
size23,773
Owen Griffiths (Owez)

documentation

README

Parser Overview

About owens-ml-parser

This parser for the owens-ml markup language is a learning project to make a simple library using nom. This "core" parser can then easily be extended to runtimes and bindings in other languages (Python using pyo3 for example) to make a small ecosystem.

NOTE: As it is a learning project, it may not be to the best of quality.

Planned ecosystem


Markup Language Spec Overview

About owens-ml

owens-ml is an easy-to-parse, generalized (can be used in place of json/yaml/toml/similar), implamented with Rust + the nom library.

Some of the key objectives for owens-ml are described in the bullet-points below:

  • Easy & efficiant to parse; no infering types.
  • Generalized syntax; cross compatibile with JSON, TOML, YAML or Python Dicts with very small to none changes in layout.
  • Relativly easy to read; this is not a main priority for this mu language but it is always nice to have.
  • (Future) owens-ml compatibility with serde to allow translations to and from owens-ml.

Example owens-ml syntax

(s) "hello there" (o) {
    (s) "woo" (a-i) [
        4234,
        5,
        34
    ],
    (i) 3423 (o) {
        (s) "ids" (o) {
            (i) 423 (s) "scOwez",
            (i) 4234 (s) "gdude",
            (i) 234 (s) "bisk",
            (s) "username_dynamic" (s) "woo"
        }
    }
},
(s) "cool_array" (a-s) [
    "woo",
    "cool",
    "awesome",
    ":)"
]

As you can see, owens-ml is a fiercely statically-typed markup language with a different annotation for every different type. This has a reason: parsing ease.

Commit count: 89

cargo fmt