1

Hello all..

is it possible to create my own simple programming language in c++?
complete with the compiler,editor and the libraries..
just a basic model where i can write simple instructions,save it with my own extension
and run atleast a few simple algorithms..

Comments
It really very fantastic
6
Contributors
9
Replies
15
Views
6 Years
Discussion Span
Last Post by firstPerson
Featured Replies
  • 1

    For a start, try reading about Lexers, Parsers. Lex and Yacc by John R Levine. Also, since you are planning on building a compiler too, try reading this book: Compiler Design by Aho, Ullman, Sethi Read More

  • [QUOTE=Redhaze46;1322810]i have no clue where or how to start, any idea would be immensely helpful..[/QUOTE] If I was doing this 'but I'm not' I would investigate here [url]http://epaperpress.com/lexandyacc/[/url] Read More

0

>is it possible to create my own simple programming language in c++?
Of course it's possible. But it's harder than you probably think.

0

i have no clue where or how to start, any idea would be immensely helpful..

1

For a start, try reading about Lexers, Parsers.

Lex and Yacc by John R Levine.

Also, since you are planning on building a compiler too, try reading this book:
Compiler Design by Aho, Ullman, Sethi

Comments
thanks
0

You might want to do an easier alternative.

For example, say you write a code in a text file like so :

//code.txt
START_PROGRAM
  print "hello world"
END_PROGRAM

That file contains your new programming language code. Now you can use C++ to read in the file, and parse it accordingly and do proper stuff.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.