programing language

can any one help?
i wanna create my own programming language …ive learnt compiler construction…but i want to know how to start from scratch…plz help me it would be a big achievement if i do so…doesnt matter if it takes 2 yrs e1…plz help…

which programming language are you fully qualified and capable in?


palladium

On Wed, 17 Feb 2010 18:06:02 +0000, rebellion87 wrote:

> i wanna create my own programming language

I would recommend a college-level course on programming languages and
compiler creation. That’s not really something you’re going to find a
lot of help for here (or in any online forum, really). Programming
language creation is a very complex process that takes a fair amount of
time and understanding to do - often times, it’s part of what you learn
in pursuit of a Computer Science degree.

Jim


Jim Henderson
openSUSE Forums Administrator

i m comfortable with c. i want the basic steps for language creation. please help.

C is not the only system programming language on the planet. And the target language isn’t always assembler code. It can be a VM bytecodes (e.g. JVM), sometimes even C or in one case, Javascript (GWT).

And there’s more to programming language design than coding.

rebellion87 wrote:

>
> i m comfortable with c. i want the basic steps for language creation.
> please help.
>
>

You cannot simply create “a” language and expect someone to help you. You
need a concept about syntax, semantics, field of application for the
language …

Normally one starts writing an interpreter as an excercise in this field …

I suggest that you start out looking at the abundance of already existing programming languages. A good overview is here: 99 Bottles of Beer. Then you need a clear concept what your new language should be good for. You have a chance that someone will use it when your new language does some highly specialized task better (or faster or easier) than anything else. An example for such a language is crm114, which does string manipulation and message classification extremely well and is mainly used for email filtering.

I see no point in writing yet another general purpose language again. Pick a specific job to be done (and not done well by anything else) and then design your language around it.

rebellion87 wrote:
> i m comfortable with c. i want the basic steps for language creation.
> please help.

if you only know one language then how could you possibly hope to
create a new one and by sheer bad luck not waste a lot of time by
creating one which already exists, but maybe is no longer used because
it didn’t work?

does that make sense?

if not, just let me suggest you gather more experience with the
history and how we got to what is available today…and then start
developing the next big thing…

just my two cents…


palladium

I don’t know exactly what you mean by starting from scratch. If you mean starting with binary code on cards using hole punchers, umm, good luck with that. If you mean using modern tools to build a language, I would think it would break down into 2 major parts:

  1. design the language,
  2. implement the language.

As to (1) I really have no idea. As to (2), I would probably use flex and bison to generate a parser, and then modify an existing gcc front end or write a new one, to at least get some portability out of it.

I’ve really never even considered doing this though, and I have to second everyone else who questions the efficacy of starting a new general purpose language. I mean, once you get it to work, who is going to write all the libraries?

i don wanna create a commercial language…its fine if it is even capable of adding two numbers,i want it to hav my own syntax…a small language…may be ony it can take input get compiled an diplay results…not a full fledged language…plz help

rebellion87 wrote:

>
> i don wanna create a commercial language…its fine if it is even
> capable of adding two numbers,i want it to hav my own syntax…a small
> language…may be ony it can take input get compiled an diplay
> results…not a full fledged language…plz help
>
>
so you simply want to create some small programming language to learn how to
do it?

On 02/20/10 20:56, rebellion87 wrote:
>
> i don wanna create a commercial language…its fine if it is even
> capable of adding two numbers,i want it to hav my own syntax…a small
> language…may be ony it can take input get compiled an diplay
> results…not a full fledged language…plz help
>
>

See http://en.wikipedia.org/wiki/Esoteric_programming_language
It also has links to the esolang wiki and there’s supposedly an IRC channel
for this family of languages.
For some of these langauges the authors must have been intoxicated with some
strong stuff, so I suggest you visit your local pusher first, and then start
coding…

Theo

LittleRedRooster wrote:
> See http://en.wikipedia.org/wiki/Esoteric_programming_language

GREAT answer Theo…wish i cudd’a!


palladium

Perhaps I misunderstand your intentions, but wow! There are already so many existing popular languages (and nuanced derivative languages) available that I can’t see the advantage of making a new one for everyday tasks. Take a look at already developed languages and try to perceive what they lack in your desire to accomplish some specific goals. Then you’ll be better equipped to have some finely focused objective and to attack it with a laser-like precision. I concur with hendersj [Feb 18 comment] that a college course in programming languages would be a good starting point.

On the other hand, don’t let me discourage you in trying to produce a new language. From such efforts by our forefathers/foremothers/foreprogrammers have come new ideas which have made life easier for those of us who try to use computers to actually simplify and organize our lives.

I do agree with hendersj too, I’d say: GO ON. For reason mentioned by 3bitsShortOfaByte, but also because we will always need people that know how to do things like this, or at least understand how things like this are done.