PHPackages                             johnsquibb/adventure-game-markup-language - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. johnsquibb/adventure-game-markup-language

AbandonedArchivedProject

johnsquibb/adventure-game-markup-language
=========================================

A set of utilities for working with Adventure Game Markup Language (AGML) to build games for the Adventure Game Framework.

0.1.1-alpha(4y ago)1421MITPHP

Since Jun 19Pushed 4y ago2 watchersCompare

[ Source](https://github.com/johnsquibb/adventure-game-markup-language)[ Packagist](https://packagist.org/packages/johnsquibb/adventure-game-markup-language)[ RSS](/packages/johnsquibb-adventure-game-markup-language/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (1)

Adventure Game Markup Language
==============================

[](#adventure-game-markup-language)

A set of utilities for working with Adventure Game Markup Language (AGML) to build games for the [Adventure Game Framework](https://github.com/johnsquibb/adventure-game-framework).

Key Features
------------

[](#key-features)

- Defines and documents AGML syntax.
- Provides sample code for transpiling AGML into hydrator objects that can be used with the framework.

AGML Syntax
-----------

[](#agml-syntax)

The following snippet is valid AGML and demonstrates the use of: types, comments, literals, identifiers, assignments, list assignments, and multiline text assignments.

```
# Type Declaration.
# Types must be UPPERCASE.
[ITEM]

# Any line beginning with '#' will be ignored.
# This is a comment

# An assignment.
# Format is variable=value
id=flashlight

# Booleans assignments
# 'yes' yields true.
acquirable=yes
# Any other value yields false.
deactivatable=no

# CSV list assignment produces array of values.
# Format is variable=value,value,..
tags=flashlight,light,magic torch stick

# Multiline assignment. Variable name in brackets must be lowercase.
# Any number of lines may follow, and the parser will continue until reaching a new instruction.
[description]
Description #1
Description #2
Description #3
# ...

# Another multi-line assignment
[text]
Text #1
Text #2
Text #3
# ...

# To use reserved symbols in assignments, escape them with Backslash.
# Examples:
#             \,
#             \\
#             \=
#             \[
#             \]

```

Using the Transpiler
--------------------

[](#using-the-transpiler)

The following PHP code snippet demonstrates transpiler usage.

```
$markup =
