Solved

Designing a programming language

Posted on 2004-04-07
5
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short article about problems I had with the new location API and permissions in Marshmallow
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

738 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