Creating a new Prog Language

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: Dec 2007
Posts: 13
Reputation: rigidboss has a little shameless behaviour in the past 
Solved Threads: 0
rigidboss rigidboss is offline Offline
Newbie Poster

Creating a new Prog Language

 
0
  #1
24 Days Ago
hi..

All though this type of thread is already available, I'm re-posting, just because I wanna have some more details.

I wanna create a new Prog language .

I give input as a abstract sentence.

Eg Input : Let A be 10 , B be 10 . C be Sum of A & B.

SO the output to the compiler must be

int a=10, b=20 , c;
c = a+b;

Even though this is possible by simple character search, I wanna a well defined algorithm for this type of language.

Can you please help me how to go ahead with my proposal?????

Please help me guys...... I'm completely dependent upon this forum only...

--

rigidboss
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 82
Reputation: gusano79 is on a distinguished road 
Solved Threads: 4
gusano79 gusano79 is online now Online
Junior Poster in Training
 
0
  #2
23 Days Ago
Originally Posted by rigidboss View Post
I wanna create a new Prog language .

I give input as a abstract sentence.

Eg Input : Let A be 10 , B be 10 . C be Sum of A & B.

SO the output to the compiler must be

int a=10, b=20 , c;
c = a+b;

Even though this is possible by simple character search, I wanna a well defined algorithm for this type of language.
The standard well-defined approach is to create a parser for your input language and use it as part of a compiler that generates equivalent code in the output language.

Writing your own is certainly educational, but there are also parser generator applications out there that can take a grammar that describes your input language and generate code or other output for you--ANTLR is a good one.
--smg
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the Computer Science Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC