Need advices for creating a proprietary language

"Mike" <mike@heliovisionsproductions.fr>
3 Mar 1998 10:49:47 -0500

          From comp.compilers

Related articles
Need advices for creating a proprietary language mike@heliovisionsproductions.fr (Mike) (1998-03-03)
Re: Need advices for creating a proprietary language laheadle@cs.uchicago.edu (Lyn A Headley) (1998-03-06)
Re: Need advices for creating a proprietary language sandy.harris@sympatico.ca (1998-03-06)
Re: Need advices for creating a proprietary language joachim.durchholz@munich.netsurf.de (Joachim Durchholz) (1998-03-07)
Re: Need advices for creating a proprietary language mc@hack.org (MC) (1998-03-07)
Re: Need advices for creating a proprietary language markh@usai.asiainfo.com (Mark Harrison) (1998-03-07)
Re: Need advices for creating a proprietary language nixon@softlab.se (Leif Nixon) (1998-03-12)
[4 later articles]
| List of all articles for this month |
From: "Mike" <mike@heliovisionsproductions.fr>
Newsgroups: comp.compilers
Date: 3 Mar 1998 10:49:47 -0500
Organization: Compilers Central
Keywords: design, question

Hello.
For an internal (in the company I'm working for) project, I have to develop
a special simple language.
This language will be used to control the behavior of characters (ie:
objects) in a game. These characters can perform plenty of actions, like;
- Checking if another character is activated or not
- Checking if the character must move or not, depending of the state of some
variables (Am I in collision with something elses ? How many life point I
have ? Does the scenari allows me to go out of a certain area ? and so
on)...


All theses characters will be in a 3D world.
So I need some functions calls, like:
- GetXPositions(obj_name)
- GetLifePoint(obj_name)
- SetPosition(obj_name,x,y,z,alpha,beta,gamma)


Some arithmetic and logic structures:


        lp=GetLifePoint(obj_name)
        if (lp>20) then
                        // I will attack
        else
                        // I will retreat
        endif




This language will be interpreted in the game.


What I need, is to create a compiler that transform simple text files in a
kind of P-Code that will be interpreted in the game.
So, I have to check the syntaxis correctness, to check if all the functions
and structures are ok, and to handle the game ressources:
example:


        SetAnimation(obj_name,animation_name)
        PlaySample(sample_name,mode_repeat,3)


        For that, I need to check if the animation or the sample exist, and to
get a handle. So when the game will interpret that, it will be with a C code
that look like:


        current_instruction=*instruct_ptr++;
        switch (current_instruction)
        {
        case SET_ANIM:
                        obj_num=*instruct_ptr++;
                        anim_num=*instruct_ptr++;
                        Object[obj_num].current_anim_handle=anim_num;
                        break;




Can you help me, by giving me some adress of internet pages of valuable
interest, or explain me what I have to avoid.


(Use the following adress to mailto: mike@heliovisionsproductions.fr )


I'm looking on the net since 3 days, and now I know what means the words:
parser, token recognition,error recovery, semantic analysis, formal language
concepts, regular expressions, context-free grammars, top_down/bottom-up
parsing, etc...
But I'm submerged with url from american universities (xxxxxx.edu) that
present the content of the compiler courses !!!
I'm beeing driving crazy.
And all the rest is about how to use BISON,LEX,YACC, and stuff like that.
I don't think I must have to dive in such programs for creating my
compilator ??


Any help would be welcome.


Thanks a lot,


Mike.
Programmer,
Heliovisions Productions,
Lyon/France








--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.