Info and basic grammar
▲
0▲ 0 ▼ 0
yeah...
This public article was written by [Deactivated User], and last updated on 9 Mar 2016, 19:44.
[comments] gwigrammarinfo
?FYI...
This article is a work in progress! Check back later in case any changes have occurred.
This article is a work in progress! Check back later in case any changes have occurred.
Trhon is an experiment, inspired by Lojban, with the goal to create a "spoken programming language". The idea is to create a language that when written and spoken should be as a spoken language, but the grammar should be as similar as possible to programming language.
The grammar will be written as something similar to this:
the word <arg1><mod1> (maybe not arg and mod, but you get the idea).
The <tags> show you that you need to insert an appropriate word
The [square brackets] show a word that need to be inserted
So, for example, this statement:
to eat <eater><meal>
shows you that you need to use the word for to eat, and then insert the appropriate word for who's eating and what's being eaten.
My linguistic vocabulary is a bit restricted, so I will "invent" some new words for the concepts described below.
A variable is pretty similar to the indefinite article, meaning that you take up something not mentioned before in this conversation. A difference is that they have an identifier, like a pronoun. So if the word rhadok (belly) is mentioned for the first time in a conversation, you need to create a variable for it, which is done as follows:
rhadok [e] <identifier> -----> rhadok e jon
Choose an identifier from below:
1st | 2nd | 3rd | |
---|---|---|---|
Subject | jon | ze | xim |
Object | rhon | re | cim |
Name | don | te | kem |
These should be enough, and as with pronouns you can use them again to mean refer to something different.
Examples (guwo-cox = chicken meat):
helh rhadok e jon guwo-cox e rhon.
eat belly <id - jon><nocws> chicken meat <nocws><id - rhon>
A belly eats some chicken meat.
(weird sentence, but look what we can do now!)
helh jon rhon
This means the exact same thing as the above, only now we are using the identifiers to refer to what's inside our variables (and of course you need to have created variables first in order to do this, as we did above).
Questions are a bit different in Trhon.
Yes/no - questions (Is John 7 years old?):
Raw code
if(John.age == 7){
return true;
}
You could also specify an else and default.
Who? (Who's John's friend?):
return John.friend
Where? (Where's the pencil?)
return pencil.location
When? (When did they fight?):
return fight.time
-loops (for, while):
-for(i=0; i < 0; i++){ }
kan användas till att säga att något ska repeteras ett antal gånger
-while(i < 5){ }
-if statements
-functions
Verben! Funktioner ska användas som verb. Därför har alla verb speciella argument i formen
verb <sub.arg1><obj.arg2>
Under definitionen förklaras syntaxen . Så till exempel, funktionen helh (att äta)
helh <sub.eater> <obj.meal> <bool.enjoying>
Detta betyder att efter helh ska ett subjekt (den som äter) sättas, sedan ett objekt och sist en boolean (true/false).
-objects
✎ Edit Article ✖ Delete Article
Comments