This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-09-26 11:11:51

theamazingblob
Scratcher
Registered: 2011-11-19
Posts: 45

How Can I Make A New Programming Language?

Hello, I have been thinking about making a new programming language for a while now.  It won't really be like C or C++, it will be more like Adobe Flash.  Here's what I'm thinking: a user would open a text editor (gedit in Ubuntu, notepad in windows, textedit in OSX) and type code specifying the height and width of the end result, the background, the characters, and the scripts and save it as a .isg file.  Then, they would close the text editor and open the file in something like a flash player (which is what I need help making) and they will be able to play the game.  So, how would I program the player?  I have a basic understanding of C++, I should probably learn some more though... Thanks for all of your help!

Offline

 

#2 2012-09-26 11:18:27

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: How Can I Make A New Programming Language?

It sounds like you want an interpreted language, so:
1. Make a parser
2. Make an interpreter
3. Implement primitives


nXIII

Offline

 

#3 2012-09-26 11:28:49

taddl
Scratcher
Registered: 2009-03-08
Posts: 100+

Re: How Can I Make A New Programming Language?

You can look at my project called How to make a programming language. But it just shows you how to make a mini programming language inside scratch...


http://blocks.scratchr.org/API.php?action=projects&type=newest&return=image&user=taddl
http://blocks.scratchr.org/API.php?user=taddl&action=projects&type=newest&return=text&num=1

Offline

 

#4 2012-09-26 15:53:33

logiblocs
Scratcher
Registered: 2010-05-05
Posts: 100+

Re: How Can I Make A New Programming Language?

If you are serious take a look at JavaCC or flex/bison. This will only help you making a lexer and parser, the rest is your work. They both require you to be an expert at Java and C respectively. If you can't use pointers, don't even bother with bison.

Offline

 

Board footer