phraine
asked on
Designing a programming language
Hi!
I'm interested in designing a simple scripting language.
I would like it to have a syntax like Lisp or Scheme (you know all that parens).
I do a lot of high-level programming, so I would like to write the high-level code in my language,
and then do the code below in C or C++.
I tried to do something with Bison, but I don't have any example how to do a language parser in Bison.
Well, bison.info explains the basics, but it's not enough - I got stucked on branching :-(
Please, tell me is there any easier way. GPL-ed if possible.
Thanx.
I'm interested in designing a simple scripting language.
I would like it to have a syntax like Lisp or Scheme (you know all that parens).
I do a lot of high-level programming, so I would like to write the high-level code in my language,
and then do the code below in C or C++.
I tried to do something with Bison, but I don't have any example how to do a language parser in Bison.
Well, bison.info explains the basics, but it's not enough - I got stucked on branching :-(
Please, tell me is there any easier way. GPL-ed if possible.
Thanx.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the best "introductory" compiler book i can think of is writing compilers and interpreters by mak. beyond that you might look at modern compilers and interpreters by grune, bal, jacobs & langendoen, as well as the mk series including advanced compiler design and implementation by muchnick and programming language pragmatics by scott. most of these deal with compilation specifics but the bridge between interpretation and compilation has narrowed greatly over the last 10 years that knowledge of each is applicable. mak's book is almost exclusively focused on parsing and runtime interpretation.