Yameru

Yameru language and library for Elixir

Yameru is a Setting Description Language which human read and computer readable inspired by yaml.

Features

Yameru is made to write humans knowledge up with more friendly language.

Yameru syntax specialize in strings; most strings can be written with no escaping, even if it is key.

What's New : FIFA World Cup finished.
Belgium vs Japan : 3-2

Any non-string type scalars are sandwitched with brackets. Currently Yameru supports integer, float, boolean, iso8601.

integer : [10 000]
float   : [1.0e4]
boolean : [yes]
iso8601 : [2018-07-03]

As block elements, dictionary, sequence and preformed text is supported. Dictionary and sequence can be top level block.

dictionary:
    key: value
sequence:
    - value
text: /
    Preformed Text

Yameru doesn’t have comment syntax; all knowledge are written as value. If you want to supplement some value, you can use tuple syntax shown below.

limit : [10:55:00]
    because: the ladder are put back 5 minutes before departure.

Library

I made Yameru for dsl in application I developing. So an Elixir library leads this language.

Currently the library supports only loading.

# load yameru file
{:ok, map} = Yameru.load "sample/sample.yameru"

# any value is `{scalar, block}` form
{title, nil} = map["title"]

Installation

Yameru library for elixir can be installed by adding yameru to your list of dependencies in mix.exs:

def deps do
  [
    {:yameru, "~> 0.1.0"}
  ]
end

Documentation is: https://hexdocs.pm/yameru.