ddonche/goblin-lang
0.47.39
1
0
docs reference
[[yall]]

YALL


Version 1.1


Overview

YALL is Goblin's native configuration and structured data language. YALL was created to provide a small, deterministic, and human-readable alternative to YAML for Goblin projects.

YALL is designed around one simple idea:

Be easy for humans to read and easy for machines to parse.

YALL intentionally omits many of YAML's advanced features in favor of a language that is predictable, explicit, and straightforward to implement.

If a feature makes the language more difficult to understand, parse, or explain, it does not belong in YALL.

Lore
Originally created for Sheriff (a static site generator in Goblin); the name itself actually comes from being a sort of "YAML lite" that made it possible to keep with the Sheriff naming themes (Trailboss, Prospector, Brindle, Sawbones, etc). YALL is one letter away from YAML, and you can even write it as Y'all.

Example YALL File

The following YALL example has literally every syntax rule contained within it.

/// Single-line comment

////
Block comment.
Everything here is ignored.
////

name: Goblin <---- inline comment
version: 1.1
enabled: true
deleted: false
parent: nil

title: "Quoted string with spaces"
path: /docs/index.html
portal: #site
need: #need::output_dir
action: trailboss::build_routes_once

tags:
  - compiler
  - vm
  - docs

ports: [80, 443, 8080]
ports_trailing: [80, 443, 8080,]

author: { name: Dan, role: Creator }
author_trailing: { name: Dan, role: Creator, }

site:
  title: Goblin
  base_url: /
  description: """
YALL is small.

It supports multiline strings.
Comment markers inside strings are just text:
/// not a comment
//// not a block comment
<---- not an inline comment
"""

users:
  - name: Dan
    role: Admin
  - name: Lisa
    role: User
/// Single-line comment

////
Block comment.
Everything here is ignored.
////

name: Goblin <---- inline comment
version: 1.1
enabled: true
deleted: false
parent: nil

title: "Quoted string with spaces"
path: /docs/index.html
portal: #site
need: #need::output_dir
action: trailboss::build_routes_once

tags:
  - compiler
  - vm
  - docs

ports: [80, 443, 8080]
ports_trailing: [80, 443, 8080,]

author: { name: Dan, role: Creator }
author_trailing: { name: Dan, role: Creator, }

site:
  title: Goblin
  base_url: /
  description: """
YALL is small.

It supports multiline strings.
Comment markers inside strings are just text:
/// not a comment
//// not a block comment
<---- not an inline comment
"""

users:
  - name: Dan
    role: Admin
  - name: Lisa
    role: User


Design Goals

YALL is:

  • Human-readable
  • Deterministic
  • Strict
  • Lightweight
  • Easy to implement
  • Easy to debug

YALL is not intended to serialize every possible object. It exists to represent configuration and structured application data clearly and consistently.


Document Structure

A YALL document always consists of a single top-level map.

Valid:

name: Goblin
version: 1.1
name: Goblin
version: 1.1

Invalid:

- Goblin
- YALL
- Goblin
- YALL

Invalid:

42
42

Every YALL document begins with a map.


Supported Types

YALL supports seven value types:

  • nil
  • bool
  • int
  • float
  • string
  • array
  • map

Example:

enabled: true
deleted: false
parent: nil

count: 42
price: 19.95

title: Goblin
description: "Goblin Programming Language"

tags:
  - compiler
  - vm
  - docs

author:
  name: Dan
  role: Creator
enabled: true
deleted: false
parent: nil

count: 42
price: 19.95

title: Goblin
description: "Goblin Programming Language"

tags:
  - compiler
  - vm
  - docs

author:
  name: Dan
  role: Creator


Maps

Maps use key/value pairs.

site:
  title: Goblin
  base_url: /
site:
  title: Goblin
  base_url: /

Nested maps are created through indentation.

Indentation rules:

  • Spaces only
  • Two spaces per nesting level
  • Tabs are not permitted
  • Unexpected indentation is an error

Arrays

Arrays begin with -.

routes:
  - /
  - /docs
  - /blog
routes:
  - /
  - /docs
  - /blog

Arrays may contain any supported value type.

Example:

users:
  - name: Dan
    role: Admin

  - name: Lisa
    role: User
users:
  - name: Dan
    role: Admin

  - name: Lisa
    role: User

Arrays may also be written inline.

ports: [80, 443, 8080]
ports: [80, 443, 8080]


Inline Maps

Small maps may be written inline.

author: {
  name: Dan,
  role: Creator
}
author: {
  name: Dan,
  role: Creator
}

Inline maps and block maps represent identical data.


Strings

Whenever possible, strings may be written without quotes.

name: Goblin

action: trailboss::build_routes_once

portal: #site

need: #need::output_dir
name: Goblin

action: trailboss::build_routes_once

portal: #site

need: #need::output_dir

Quote strings only when necessary.

title: "Goblin Programming Language"

description: "Contains spaces."

path: "/default/docs.html"
title: "Goblin Programming Language"

description: "Contains spaces."

path: "/default/docs.html"

Double-quoted strings support escape sequences.

\n
\r
\t
\
\"
\n
\r
\t
\
\"


Multiline Strings

Multiline strings use triple double-quotes.

description: """
Goblin is a programming language built around clarity,
explicit behavior, and readable syntax.

YALL is its native configuration language.
"""
description: """
Goblin is a programming language built around clarity,
explicit behavior, and readable syntax.

YALL is its native configuration language.
"""

Rules:

  • Opening delimiter is """
  • Closing delimiter is """
  • Line breaks are preserved
  • Multiline strings do not nest
  • Comment markers inside multiline strings are treated as normal text

Example:

message: """
Line one
Line two
Line three
"""
message: """
Line one
Line two
Line three
"""

Produces:

Line one
Line two
Line three
Line one
Line two
Line three

Use normal quoted strings for short strings.


Keywords

Only three keywords exist.

true
false
nil
true
false
nil

Everything else is treated as a string unless it is a valid integer or floating-point number.

YALL has no implicit booleans.

The following are strings:

yes
no
on
off
TRUE
False
yes
no
on
off
TRUE
False


Comments

Comments are ignored by the parser.

Single-line comments begin with:

/// This is a comment.
/// This is a comment.

Block comments begin with //// and end with ////.

////
This is a block comment.
Everything inside is ignored.
////
////
This is a block comment.
Everything inside is ignored.
////

Block comments do not nest.

Inline comments begin with <---- after a value.

title: Goblin <---- Homepage title
title: Goblin <---- Homepage title

Inline comments are only recognized after a value and must be preceded by whitespace.

The # character has no special meaning and may safely appear inside strings.


Trailing Commas

Trailing commas are optional.

The following arrays are equivalent.

Without trailing commas:

ports: [
  80,
  443,
  8080
]
ports: [
  80,
  443,
  8080
]

With trailing commas:

ports: [
  80,
  443,
  8080,
]
ports: [
  80,
  443,
  8080,
]

Inline arrays:

ports: [80, 443, 8080]
ports: [80, 443, 8080]

ports: [80, 443, 8080,]
ports: [80, 443, 8080,]

Maps are identical.

Without trailing commas:

author: {
  name: Dan,
  role: Creator
}
author: {
  name: Dan,
  role: Creator
}

With trailing commas:

author: {
  name: Dan,
  role: Creator,
}
author: {
  name: Dan,
  role: Creator,
}

The presence or absence of a trailing comma never changes the meaning of a YALL document.

Trailing commas exist solely to make editing easier.


Formatting

YALL permits both block and inline representations where appropriate.

A formatter may choose whichever representation is most readable while preserving the meaning of the document.


Differences from YAML and TOML

YALL was designed specifically for Goblin. It combines the readability of indentation-based configuration with a small, deterministic grammar.

Feature YAML TOML YALL
Human-readable
Deterministic parsing
Small grammar
Implicit typing
Anchors
Aliases
Tags
Multiple documents
Indentation-based nesting
Inline maps
Inline arrays
Trailing commas Mixed
Multiline strings
Native Goblin syntax

YALL is not intended to replace YAML or TOML in every environment.

It exists because Goblin needs a configuration language that is easy to read, easy to write, easy to implement, and tightly integrated with the Goblin ecosystem.


Why YALL?

Goblin needed a configuration language that was easy to read, easy to write, and easy to implement.

Existing formats either provided unnecessary complexity or relied on parser-specific behavior.

YALL intentionally favors explicitness over cleverness.

Every feature in YALL exists because it solves a common configuration problem.

If a feature makes the language harder to read, harder to parse, or harder to explain, it does not belong in YALL.

Simple languages are easier to learn.

Simple languages are easier to maintain.

Simple languages are easier to trust.

If the parser has to guess, the language has failed.