🔒 Locked
Creating a scripting language
Advertisement
Original Post
Try "Writing Compilers and Interpreters" by Ronald Mak. It''s in C++.
flex/lex and bison/yacc are awesome, and they come with good documentation and are easy to use. A must.
Also there are some pretty good articles at www.flipcode.com that I recommend if you don''t want to cash out the money a book costs.
"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album
Also there are some pretty good articles at www.flipcode.com that I recommend if you don''t want to cash out the money a book costs.
"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album
quote:
Original post by Staffan
flex/lex and bison/yacc are awesome, and they come with good documentation and are easy to use.
LOL!
Edited by - Eraserhead on April 20, 2001 11:47:01 AM
quote:
Original post by Eraserhead
[quote]Original post by Staffan
flex/lex and bison/yacc are awesome, and they come with good documentation and are easy to use.
LOL!
Edited by - Eraserhead on April 20, 2001 11:47:01 AM
But they _are_!
"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album
Well, How would you guys feel about a language that is converted into C then compiled say w/ GCC?
For instance, I could make the parser w/ Perl and have it translate the code to C and then let it be compiled w/ GCC.
I read somewhere GCC does the same thing; I could be mistaken though. Does anyone know more about this?
Edited by - owen on April 21, 2001 10:40:09 PM
For instance, I could make the parser w/ Perl and have it translate the code to C and then let it be compiled w/ GCC.
I read somewhere GCC does the same thing; I could be mistaken though. Does anyone know more about this?
Edited by - owen on April 21, 2001 10:40:09 PM
Thanks for the link! You do a good job explaining the basics of creating a language, and I hope you finish it soon.
Also, I'll need to pick up on Assembly; do you recommend any good books?
BTW, I'm looking forward to Ultima 1 - A legend is reborn. =)
Thanks again,
Owen
Edited by - owen on April 22, 2001 11:01:14 AM
BTW, I'm looking forward to Ultima 1 - A legend is reborn. =)
Thanks again,
Owen
Edited by - owen on April 22, 2001 11:01:14 AM
What a coincidence! I''m in the process of writing my own scripting language. A lot of linked lists, lemme tell ya. Right now I''m just working on the parser. I already have it read the file and load the parameters into linked lists and such, as the parser is just about done. All I need to do is work on more complex statements than function calls, like assignment statements and loops and such. My suggestion to you is to design how you will store all the script information first, and whether or not you want to use linked lists or static arrays, etc. Then you want to figure out a way you want your script to be formatted so that the loader can actually read the file and load your data structures with the right information. After you have all the basic loading/parsing done, you want to be able to interpret the scripts into actual commands and functions and have the program execute the right thing. If you have any more questions, I''d be glad to help. Scripting engines are fun to work on... at least for me.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement