discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting!


From: Kevin Ingwersen
Subject: Re: Scripting!
Date: Thu, 1 May 2014 18:55:27 +0200

Am 01.05.2014 um 18:26 schrieb Dr. H. Nikolaus Schaller <hns@goldelico.com>:

> 
> Am 01.05.2014 um 18:03 schrieb Kevin Ingwersen:
> 
>> Hey guys!
>> 
>> Thanks for your replies - and for the little fun hidden within the 
>> lines…that exception got me laughing for good. :)
>> 
>> I did see Small/StepTalk actualy, but neither of them did compile on my Mac 
>> - Cling included. I did find Cling actually, but it throws about 29 errors 
>> on a single file, that of course terminates the compilation for good.
>> 
>> I was indeed looking for a scripting language with the square brackets, as 
>> it gives the language a nice structure, realy.
>> 
>> I will look at the LanguageKit and see what it offers! It so far sounds very 
>> interesting, especially that it uses a JIT compiler.
>> 
>> Since there does not seem to be any scripting language with valid 
>> Objective-C syntax, I might just sit down and write my own, with the help of 
>> a more experienced developer then. Might be interesting to hook it up with 
>> GnuStep as a framework to extend programs with a scripting language…who 
>> knows, somebody may find this interesting. :)
> 
> I will definitively be interested in the results!
> 
> It might help in testing/developing algorithms and writing some simple 
> scripts.
Oh! that’s awesome =)

> 
> And if things work, it should be possible to copy parts of the sources and 
> compile them.
> 
> What I would not expect (because it is very complex for a scripting language) 
> is to handle #import, @interface, @implementation etc.
At least @implementation, though. For example, Objective-J uses a preprocessor 
to parse #import, and uses @implementation only and simply skips @interface.

> 
> You might also want to take a look into:
> 
> http://git.goldelico.com/?p=mySTEP.git;a=tree;f=objc2pp;h=c858992617777a1c34963c15a2f3eba2554d72ea;hb=HEAD
> 
> which is a quite small and simple Obj-C scanner/parser and AST builder. And 
> completely self-contained (no need for external libraries). Just flex+bison 
> for compilation.
> 
> It should not be very difficult to modify it that you can write into a file:
> 
> #!/usr/local/bin/objcscript
> main() {
> [Object sendMessage];
> }
> 
> and make chmod +x. Then you can run it directly from the shell.
> 
> But: it is more an experiment than a working and debugged compiler. 
> Especially the grammar isn't mature.
But it definitively gives a starting point. I would probably mainly develop it 
in C++ so it can be utilized even outside of Objective-C environments, but a 
ObjC wrapper for „native“ integration.

Thanks for the link, that might be very helpful. :)

Kind regards,
Ingwie.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]