cws
Greetings Guest
home > library > journal > view_article
« Back to Articles ✎ Edit Article ✖ Delete Article » Journal
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]
[Public] ? ?
?FYI...
This article is a work in progress! Check back later in case any changes have occurred.
Menu 1. The goal with Trhon 2. Writing the grammar 3. Variables 4. Questions 5. Ideas
[edit] [top]The goal with Trhon

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.

[edit] [top]Writing the grammar

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.

[edit] [top]Variables

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:

1st2nd3rd
Subjectjonzexim
Objectrhonrecim
Namedontekem


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).

[edit] [top]Questions


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
privacy | FAQs | rules | statistics | graphs | donate | api (indev)
Viewing CWS in: English | Time now is 20-Apr-24 04:55 | Δt: 312.942ms