Skip to content

Instantly share code, notes, and snippets.

@mikkelking
Created July 28, 2015 15:42
Show Gist options
  • Save mikkelking/641b37cb74a3a7c918cd to your computer and use it in GitHub Desktop.
Save mikkelking/641b37cb74a3a7c918cd to your computer and use it in GitHub Desktop.
Human2machine syntax
Introduction
============
This document describes the syntax as recognised by human2machine.
Conventions used in this document
---------------------------------
```
<variable> - variable text or name
```
----------
**Syntax: pages**
```
<number> pages: <page1>, <page2>, <page3>
```
example:
```
Three pages: home, customers and about .
```
----------
**Syntax: page attributes**
```
In <pagename> page [<pagetype>] title: "<quoted-title>", text: "<quoted-text>", button url: "<thing>"
```
example:
```
In home page jumbotron title: "This application is written in human language!", text: "Human to describe app, machine to write code!", button url: "customers".
```
----------
**Syntax: Collection declaration**
```
<number> collection: <collection-list>
```
example:
```
One collection: customers.
```
----------
**Syntax: Collection data fields**
```
In <collection-name> collection three fields: name, address and e-mail.
```
example:
```
In customers collection three fields: name, address and e-mail.
In products collection three fields: item code, description, price(currency), minimum order(number).
```
Data type for minimum order is number.
Data type for price is currency.
----------
**Syntax: Data maintenance page (Maintenance = Create, Read, Update and Delete)**
```
In <pagename> page maintain <collection-name> collection.
```
example:
```
In customers page maintain customers collection.
```
----------
Rules: Lists are comma delimited, can use "and" as well, eg "Court and Spark" is the same as "Court, Spark"
> Written with [StackEdit](https://stackedit.io/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment