Solved

Designing a programming language

Posted on 2004-04-07
5
266 Views
Last Modified: 2010-04-17
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.
0
Comment
Question by:phraine
5 Comments
 
LVL 22

Accepted Solution

by:
NovaDenizen earned 25 total points
ID: 10777583

Sorry, but I don't think there's any easy shortcut.  It's tough to do anything with bison or yacc without first understanding parsing theory.  I would suggest looking at _Compilers_ by Aho, Sethi, and Ullman to learn about parsing.  There is a lot in that book about compilation that you don't really need, but the parsing bits are very necessary and helpful.

 -NovaDenizen
0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 25 total points
ID: 10779515
0
 
LVL 5

Expert Comment

by:Droby10
ID: 10780282
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.

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question