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.