This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Getting started on the compiler source

3 replies
Kevin Wright
Joined: 2009-06-09,
User offline. Last seen 49 weeks 3 days ago.
Can anyone give me a *quick* summary of important classes/objects in the nsc?I'm especially interested in writing plugins but would like a good general understanding of what already exists before I do that.
I can figure it out myself, but with a codebase of this size it's always a nightmare at first knowing what's significant and where to start.  A couple of pointers can often save days of exploration...
It's also my goal to write up some of this stuff for a wiki article on scala-lang.
rytz
Joined: 2008-07-01,
User offline. Last seen 45 weeks 5 days ago.
Re: Getting started on the compiler source
Have a look at scala.tools.nsc.  ast.Trees (there are things like traversers and transformers in there)  ast.parsers.Parser  symtab.Symbols (look at TypeHistory to see how types are attached to symbols)   symtab.Types (there are also utils like TypeMap)  typechecker.Namers (assings symbols and lazy types to declarations)  typechecker.Typers (if you dare)
for plugins   Global (how things are glued together)  plugins._
Cheers: Lukas
On Tue, Jul 28, 2009 at 16:52, Kevin Wright <kev.lee.wright@googlemail.com> wrote:
Can anyone give me a *quick* summary of important classes/objects in the nsc?I'm especially interested in writing plugins but would like a good general understanding of what already exists before I do that.
I can figure it out myself, but with a codebase of this size it's always a nightmare at first knowing what's significant and where to start.  A couple of pointers can often save days of exploration...
It's also my goal to write up some of this stuff for a wiki article on scala-lang.

Iulian Dragos 2
Joined: 2009-02-10,
User offline. Last seen 42 years 45 weeks ago.
Re: Getting started on the compiler source

Have you seen the three videos on scala-lang? Martin gives an overall
view of symbols and types in the Scala compiler:

http://www.scala-lang.org/node/598

iulian

Kevin Wright wrote:
> Can anyone give me a *quick* summary of important classes/objects in
> the nsc?
> I'm especially interested in writing plugins but would like a good
> general understanding of what already exists before I do that.
>
> I can figure it out myself, but with a codebase of this size it's
> always a nightmare at first knowing what's significant and where to
> start. A couple of pointers can often save days of exploration...
>
> It's also my goal to write up some of this stuff for a wiki article on
> scala-lang.

Kevin Wright
Joined: 2009-06-09,
User offline. Last seen 49 weeks 3 days ago.
Re: Getting started on the compiler source
No I haven't!
They look ideal :)

On Wed, Jul 29, 2009 at 12:49 PM, Iulian Dragos <iulian.dragos@epfl.ch> wrote:
Have you seen the three videos on scala-lang? Martin gives an overall view of symbols and types in the Scala compiler:

http://www.scala-lang.org/node/598

iulian



Kevin Wright wrote:
Can anyone give me a *quick* summary of important classes/objects in the nsc?
I'm especially interested in writing plugins but would like a good general understanding of what already exists before I do that.

I can figure it out myself, but with a codebase of this size it's always a nightmare at first knowing what's significant and where to start.  A couple of pointers can often save days of exploration...

It's also my goal to write up some of this stuff for a wiki article on scala-lang.


Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland