Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: what's compiling ???

  1. #1
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    what's compiling ???

    dear all thinbasic and *basic users !

    I have a simple question belongs to my new powerbasic project ("lionbasic_warp demo"). this one looks something like powerbasic gui, hehe, but I will do quite other things for the future with graphic inputs so I will try to mix freebasic/powerbasic/thinbasic possibilities. It was only a test for understanding powerbasic language. I have written this lionbasic warp demo last days, week. and I would say thanks to jose roca for general help too

    now my "heavy" and "hard" question:

    What is "compiling" ? I mean, I have a text editor, so like Thinair does it too. What for do you need for creation of compiling structures ? For every command and syntax a own DLL and command and function declaration ? so I have done with "lion_gfx" module for
    thinbasic ? do you know more about such things ???

    I know charles pegge "oxygen project" I admire. A lot of respect to this asm work!
    I know delphi and c++ a few. I know java a few and lightwave, realsoft 3d and cinema 4d and of course blender 3d

    I am writing here because I have a dream some years before to make a real own 3d application calls "Inka 3d". I don't like c++. I have tried and visit a lot of course around it, but I don't like really windows appplications they are looking always to the same. so I have bought (I repeat BOUGHT!) powerbasic!!! I have tried to make up my mind to get a new LIONBASIC graphic language like TBGL of petr here and Micheal H. for 2D works to mix the best things from THINBASIC, POWERBASIC and FREEBASIC. I don't know how to do this one, I am truly, but I have to make it, because I have the power and enthusiasm for it So I am writing this silly things like "LionBasic". It's a simple GUI for showing what's possible with making a few code lines !

    I will add this program here.

    It must be possible to create new things like TBGL or GDIplus features for Thinbasic. I love (that the mainly part of I like!) thinbasic, I like Freebasic and I am curious about Powerbasic but the whole GUI looks very dry. Like dry wine ! I have own ideas to make a GRAPHIC COMPILER (that's what I am here for!) so I called it "LIONBASIC_Warp". the title belongs to enterprise and Star wars

    I know what horrible work it is to make an own compiler or Editor. My mind changed excactly one years ago I have seen some Freebasic example how (simple!!!) to create new graphic inputs and demonstrations of games. I was very impressed! Thinbasic I love for it's clear and simple syntax. I have difficult around powerbasic (because new for me!) but very detailed designed and go to very deep of programming language (translated from c++) I liked a lot how to do new GUI's. I have build last week some of new GUI's with DLL and so I try to go a new way. I cannot specify my Lionbasic Warp program, but it should do some graphic and calculations input.

    so I have this simple question to myself. I have build this editor "lionBasic Warp" and NOW??? How does a compiler work ? How I can make a own DLL to create a new Language, simple and with a clear overview ???

    uargh

    best regards, Frank Lionheart

    best thanks to eros, petr for reflections and comments
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  2. #2

    Re: what's compiling ???

    Uh man you put here so many questions in one post.
    I study this thematic but not in your direction.
    I study FreeBasic to and can say that is excellent.
    Not becose is free then becose is really powerfull and i think(just think)
    that is little bit easy to undestand then PowerBasic(maby i'm wrong).
    However i just lookin in one free GUI library:
    http://www.beyondata.com/default.htm
    But this is just for GUI.s and there be some others 3d look in :
    http://www.geocities.com/SiliconVall...4/guitool.html

    OH you say compiling, compiling is translating one source code to
    another( such a stupid explaination)- compiler is translator+parser
    or something like that...

    Good luck...

  3. #3
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: what's compiling ???

    hi zlatko

    thanks for reply and good wishes. my short question: what was you dream to make a compiler like aurel basic ??? this one is basically, isn't it ? So I am at this similar point of view. I know freebasic, I wonder how it gets so many people there although it's no more updates ? it's a simply great language. therefore I have tried to include new functions to thinbasic with lionbasic_gfx module

    thanks in advance, frank
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  4. #4

    Re: what's compiling ???

    What was my dream?
    I'm not quite sure - but i think maby some day if i have enough time
    write simple basic compiler.
    AurelBasic is not compiler he is very simple interpreter.
    Why i made them - first i love programming and second I always
    want my own basic like language(most for fun...)

  5. #5
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: what's compiling ???

    simple compiling example:

    here a very simple c++ example I have built

    do it: type in for example:

    6+4-4*9

    ...

    translate in asm...

    best regards, the exe file I add.

    frank
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  6. #6

    Re: what's compiling ???

    Hi Franck,

    As I have worked in past on my own compiler and still do once in a while, here are my 2 cents to the story. Warning: This is my personal view of things and I don’t claim to know everything about it:

    Quote Originally Posted by Lionheart008
    dear all thinbasic and *basic users !

    What is "compiling" ? I mean, I have a text editor, so like Thinair does it too. What for do you need for creation of compiling structures ?
    What is compiling? In the context of programming languages it is in general a translation from one language into another one. Be it from C++ into assembler, from BASIC into Byte-Code, anything. Some compilers do just that, some create a full executable or DLL or other stuff from it.

    Wikipedia is not always correct, but I think this link describes it well:

    http://en.wikipedia.org/wiki/Compiler

    For something like creating a programming language I would split a toolset into a FrontEnd part and a Backend:

    The Frontend would be a Parser/Translator that reads your source code, splits it up into tokens and then according to the defined syntax rules outputs eather another readable source code in another language like C++, ASM or some kind of byte code that can be used further.

    The Backend could be something like FlatAssembler, the GNU Compilers, linkers etc. These tools will take the output of the Frontend, translate it into object code and then a linker will create either an executable, a dynamic or static library. Or if you have created Byte code, it could be a virtual machine (VM) that can already run your code.
    Besides a VM, I would not create a backend myself. There are great tools available on the market that save you time and more nerves. Like Flatassembler, NASM, GNU C++ compiler, PellesC, FreePascal. They do an awesome job.

    For every command and syntax a own DLL and command and function declaration ? so I have done with "lion_gfx" module for thinbasic ? do you know more about such things ???
    What you refer to a DLL is one technic you can use to store a runtime library of language commands inside. A lot of languages do that. But also a lot have static libraries that are linked with an object code at compile time. These runtime libraries are the meat of any language and I consider them to be the most work from the whole process. Writing, testing, documenting. Argggg

    Google for Let’s Build a compiler by Jack Crenshaw. Or stuff from Nikolaus Wirth about compiler construction. He created great programming languages wrote great information about it. Also look into COCO/R, ANTLR and GOLD PARSER BUILDER. These are tools that will help you creating the most difficult parts of a compiling suit.

    And be prepared for a looooong learning process. Btw. which platform do you want to run your thing on? Windows only?

    But, what is a GraphicCompiler? Do you have a comandset to create graphics and then at runtime, it will display it? Some kind or TURTLE? At first, it sounded like a programming language. Then it sounds like a 3D app like 3DMax, then it sounds like a very specialized mark up language compiler. Can you elaborate more on what kind of application you want to create actually?

    Have fun
    Michael

  7. #7
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: what's compiling ???

    hi michael, many thanks for the infos and good links about the topic compiler and how to create a compiler. will be the right direction, I see.
    unfortunatley my pc breaked down last evening, missing one important file I have deleted or copied to another place (ntldr). I don't can start my win xp at all. but that's no problem I have good friends

    more about my compiling idea next week. best thanks, frank
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  8. #8

    Re: what's compiling ???

    this is a good info Michael , i begin to read about the subject.
    thanks

  9. #9

    Re: what's compiling ???

    Guys dont forget another one which is very good
    (of couse if you now C++)
    http://www.briancbecker.com/bcbcms/s...j/comptut.html

  10. #10

    Re: what's compiling ???

    Another great book is

    Compilers and Compiler Generators, an introduction with C++ by P.D. Terry

    All what I mentioned here is available for free and complete.

Page 1 of 2 12 LastLast

Similar Threads

  1. Compiling
    By Anonymous in forum Shout Box Area
    Replies: 1
    Last Post: 19-01-2006, 20:36

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •