Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I want to make a non-english programming language that is identical to what CoffeeScript is to JavaScript. What I mean is that I don't want to build my own design or syntax. Just want to have a non-english programming language that compiles to JavaScript. I want to follow everything CoffeeScript fellows so I don't really want to make any design decisions.

For example:

This is coffeescript:

number   = 42
opposite = true

number = -42 if opposite

I want my language to be something like:

رقم = 42
عكس = صحيح

رقم = -42 إذا عكس

that get compiled to:

var number, opposite;

number = 42;

opposite = true;

if (opposite) {
  number = -42;
}
share|improve this question

closed as too broad by Mathew Foscarini, GlenH7, MichaelT, Ross Patterson, gnat Jun 3 at 6:56

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Wouldn't it be easier to compile to coffeescript then? –  Doval Jun 2 at 22:10
    
@MathewFoscarini what about my title :) –  Ansd Jun 2 at 22:16
    
@Doval sounds interesting, would appreciate more explanations. –  Ansd Jun 2 at 22:17
4  
github.com/jashkenas/coffeescript fork and modify... –  Mathew Foscarini Jun 2 at 22:18
1  
@Ans By the way, understand that if you do this, you won't be able to get help from anyone else that doesn't understand Arabic. See babylscript.com/mappings/ar.html for what you are doing (but in JavaScript) not CoffeScript –  Juan Mendes Jun 2 at 22:33

1 Answer 1

up vote 2 down vote accepted

Perform a simple, direct transliteration from the Arabic symbols to the English ones in CoffeeScript, and then run the result through the CoffeeScript compiler. Leave the remaining symbols unchanged.

That's by far the simplest and most reliable way to accomplish what you want, and probably the only way that doesn't require extended semantic analysis.

share|improve this answer
    
He also wants right-to-left. Wouldn't this complicate things? –  dave Jun 2 at 23:24
    
I have no idea. –  Robert Harvey Jun 2 at 23:31
    
@dave RTL could be sorted out later once basic things works :) –  Ansd Jun 2 at 23:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.