Related articles |
---|
Information about scripting languages silvestri.gianluca@gmail.com (Gianluca Silvestri) (2008-09-10) |
Re: Information about scripting languages licaner@gmail.com (lican) (2008-09-16) |
Re: Information about scripting languages sh006d3592@blueyonder.co.uk (Stephen Horne) (2008-09-17) |
Re: Information about scripting languages jdpoirier@gmail.com (jpoirier) (2008-09-18) |
Re: Information about scripting languages silvestri.gianluca@gmail.com (Gianluca Silvestri) (2008-09-19) |
From: | lican <licaner@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Tue, 16 Sep 2008 19:05:59 -0700 (PDT) |
Organization: | Compilers Central |
References: | 08-09-053 |
Keywords: | interpreter |
Posted-Date: | 17 Sep 2008 07:58:20 EDT |
Hi,
I'm trying to do the same thing right now. I wrote the lexer, parser
and code generator. All is left is the VM (I'm working on it right
now). The problem is that most of the books and works stop after
parsing and AST and do not explain what to do exactly between AST and
code generation. I looked at some popular languages like Lua and PHP.
Also some less popular like Dao or a source code of a language I
forgot from where it was (don't know the name or author, but I found
the name 'Alex Stojan' in one of the files).
The thing is most of them are complex (even the less popular), but you
can trace the base classes or structures and spot constructs that you
find interesting. It just depends on the time you give yourself for
that task. I spent like a month alone looking at other languages and
digging for more info. Most of them were rubbish, but some inspired
me. I like Dao, but it's source is (for me) very hard to digest. On
the other hand I was a bit impatient and just skim read it in most
places. Lua is great, pitty there's no bytecode optimization. PHP...
well, to be honest I expected something more. I found out that the
simple scripting languages I googled were mostly a enhanced calculator
or something. Nothing new there really.
So, not much help or links from me. I will just recommend this
languages (it's really not that hard to understand the source if you
have sufficient time and some C/C++ knowledge) and maybe the book:
Compilers: Principles, Techniques, and Tools; Second Edition by Alfred
V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Read it, got some valuable
info from it (it's thick, but the parser lexer ast stuff is less than
300 pages long). I know how hard it is to start so good luck with your
project! :)
Return to the
comp.compilers page.
Search the
comp.compilers archives again.