Re: Language Design n Compiler

"BGB / cr88192" <>
Mon, 14 Dec 2009 15:33:02 -0700

          From comp.compilers

Related articles
Language Design n Compiler (honey sran) (2009-12-14)
Re: Language Design n Compiler (Matthias-Christian ott) (2009-12-14)
Re: Language Design n Compiler (BGB / cr88192) (2009-12-14)
Re: Language Design n Compiler (Kaz Kylheku) (2009-12-15)
| List of all articles for this month |

From: "BGB / cr88192" <>
Newsgroups: comp.compilers
Date: Mon, 14 Dec 2009 15:33:02 -0700
References: 09-12-026
Keywords: practice
Posted-Date: 15 Dec 2009 00:33:48 EST

"honey sran" <> wrote in message
> hi i'm new to compilers and language design. i want to write a simple
> language and its grammer- with elementary operations say addition ,
> subtraction,printing etc. and corresponding compiler for that
> language- how and from where should i to start( what all know how is
> required to design a language.). plz point out the steps involved in
> the whole process.
> [You can start with the list of compiler books in the FAQ. -John]

a few bigger questions may be:
what is the language intended to be used for (standalone apps, scripting
within a given app);
how heavily will the language be used (periodic event handling, running
continuously, ...), and acceptable performance characteristics;
what "form" is the code to be distributed and run (as native binaries, as
bytecode fragments, as textual fragments given by a user or mixed with other
how much code and implementation complexity is reasonable;

all of these may effect the overall design of a language, and consequently a
compiler or interpreter.

for example, for a language designed to handle and respond to user input,
and perform various tasks (such as javascript and web-forms), the language
design may differ notably from a language intended to do real-time 3D
rendering and lots of numeric calculations, ...

and a language intended for app development and deployment may differ in
terms of its design and implementation than one intended for scripting.


As For Learning, I Would Recommend First Looking At Simpler Languages For
Ideas, Such As Scheme, Forth Or Postscript, Self And/Or Smalltalk, ... These
Can Help Give Ideas Which Directions To Go, And How The Parts Fit Together.

(I would not recommend trying to develop a compiler for a more complex
language, such a C or Java, right off, or even a language such as
JavaScript, absent first having some experience in writing simpler compilers
or interpreters...).

(otherwise people seem to get stuck on "what is the best parsing
strategy?...", and AFAICT tend not to make much progress beyond this...).

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.