Solved

Designing a programming language

Posted on 2004-04-07
5
262 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now