![]() |
Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
On Sat, 29 Dec 2007 02:38:06 -0500 David Kramer <[hidden email]> wrote: > IIRC, BASIC was invented to teach compiler design. Maybe you could > start there. Just don't learn the language itselt too deeply or you'll > be forever lost as a developer. Actually, that is not true. BASIC was designed back in the 1960s as an interactive interpretive language. Pascal was invented by Niklaus Wirth to teach compiler design. Wirth's books such as "Algorithms + Data Structures = Programs" I have found very useful over the years even though I don't use Pascal. His book, "Compiler Construction" looks pretty decent. The "Pascal User Manual and Report" defines the language. The nice thing about Pascal is that since the language was invented to teach data structures and compiler construction you get to learn a lot of the neat things. The C language, on the other hand was designed to write Unix with, and is not an easy language for compilers. Essentially, a compiler has a number of stages: 1. The lex phase. This essentially goes through the source code and translates the source language to a series of tokens. 2. The parser. This takes the output of the lexer and creates, what is called a parse tree. 3. Code generator. This takes the parse tree and creates object code. Most compilers today do a lot of optimization that can add additional steps. But, using Pascal and writing a pascal compiler is very doable, and you will learn a lot about compilers and computer languages. Trying to study a working commercial compiler, like GCC, or others, will make it difficult to see the basics. -- Jerry Feldman <[hidden email]> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9 _______________________________________________ Discuss mailing list [hidden email] http://lists.blu.org/mailman/listinfo/discuss
![]() |
|
BLU is a member of BostonUserGroups | |
We also thank MIT for the use of their facilities. |