#Why
##Structure
The basic structure that Turtle is built on is Entity Attribute Value. An entity can be thought of as a named set of key-value pairs.
- entities are represented by identifiers.
- attributes (properties) are also represented by identifiers (this allows the semantics of an attribute to be described, if so wished)
- values may be an identifier (of an entity), a string, a number, or an ordered list.
An entity description is terminated by a full-stop (period) .
character:
<entity> <attribute> "value" .
An identifier begins with < and ends with >
eg:
<myProductionServer>
Strings begin with "
and end with "
.
Multiline strings begin with """
and end with """
.
Optionally, a string may be tagged with a language code: "Bonjour"@fr
eg:
"a single line string"
""" a
multi-line
string
"""
###Numbers
Numbers are represented by digits 0123456789
, and can contain a decimal point .
.
###Booleans
Booleans are written without quotes, in lower case: true
or false
Attributes and values are separated by white space.
Attribute-value pairs are separated by semi-colons ;
.
eg:
<theProductionServer>
<port> 4040 ;
<homeDir> "/var/www/public/" ;
.
Multiple values of an attribute are separated by a comma ,
.
eg:
<jane> <friend> <sue> , <tom> , <heather> .
<bill> <nickname> "Wild Bill", "Crazy Bill", "Billy" .
A list can represent a set of values where order is significant. A list begins with (
and ends with )
. Values in a list are separated with white space.
eg:
<breakfastBananaRecipe> <instructions> (
"buy 6 bananas"
"peel bananas"
"eat bananas"
) .
An unnamed entity can be represented just by its attribute list like