Jump to content
  • Advertisement
Sign in to follow this  
dubb861

easiest way to make your own pl?

This topic is 4815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, whats the easiest way to create your own version of a programming language? something that does not need you to create a compiler.. one that uses like java's resources.. how do you go about it? tnx.

Share this post


Link to post
Share on other sites
Advertisement
Maybe you souldn't. There are plenty of free scripting languages availiable, such as Lua ( http://lua.org ). Though, for education you may want to do a few google searches on yacc (yet another compiler compiler). It gives you a compiler based on your language's lexicon.

Share this post


Link to post
Share on other sites
The easiest way is to write an interpreter. Instead of creating a binary machine language executable file, you run directly from the source code.

Share this post


Link to post
Share on other sites
When I first started making languages and couldnt handle compilers, I made interpreters. I then moved on to compiling down to a bytecode then interpreting that.

Hope that helps,
Later

Share this post


Link to post
Share on other sites
What is lua anyways, I went to the site but I still cant find sample code or anything, also, dont you write languages in ASM most of the time?

Share this post


Link to post
Share on other sites
No, the majority of high level programming languages are written in C. (PHP, Perl, Python, Ruby, etc)

You'll have to go learn about Bison/yacc (Or LEMON, I prefer LEMON), and Flex/lex if you want to write a language lexer and parser. Then you'll want to learn about bytecode and writing a VM. This is by no means an easy task.

Share this post


Link to post
Share on other sites
Also have a look though the other threads recently posted in this forum. There have been *a lot* of these threads lately, so you might find something useful on one of them.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!