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

[Compiler] How to inspect symbol table?

3 replies
Stefan Kuhn
Joined: 2009-10-01,
User offline. Last seen 42 years 45 weeks ago.

Afaik, the state of compiler consists of the AST and the symbol table. I
can inspect the AST with -Xprint or -Ybrowse. How can I inspect the
symbol table?

http://stackoverflow.com/questions/4735978/scala-compiler-how-to-inspect...

thx
stefan

Miguel Garcia
Joined: 2009-06-10,
User offline. Last seen 42 years 45 weeks ago.
Re: [Compiler] How to inspect symbol table?

Part of the solution (code snippet included) at
http://www.scala-lang.org/node/5763

Miguel
http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/

"Stefan Kuhn" wrote in message
news:ih6qcv$pqs$1@dough.gmane.org...
> Afaik, the state of compiler consists of the AST and the symbol table. I
> can inspect the AST with -Xprint or -Ybrowse. How can I inspect the symbol
> table?
>
> http://stackoverflow.com/questions/4735978/scala-compiler-how-to-inspect...
>
> thx
> stefan
>
>

rytz
Joined: 2008-07-01,
User offline. Last seen 45 weeks 5 days ago.
Re: [Compiler] How to inspect symbol table?
A student at EPFL, Lomig Megard, just finished working on a semester projectin which he extended the jclasslib bytecode viewer to show the scala signature.
It shows you the signature in a raw format (using scala.tools.nsc.util.ShowPickled) and allows you to browse symbols and see their types.
The code is on https://github.com/soundrabbit/sclasslib/tree/scala, but it's not very stable yet. There are sometimes issues related to the compiler instancewhen the classpath in jclasslib changes. Also, i seem to get a NPE lately..
Lukas


On Wed, Jan 19, 2011 at 14:53, Stefan Kuhn <qn.666@gmx.net> wrote:
Afaik, the state of compiler consists of the AST and the symbol table. I can inspect the AST with -Xprint or -Ybrowse. How can I inspect the symbol table?

http://stackoverflow.com/questions/4735978/scala-compiler-how-to-inspect-symbol-table

thx
stefan


Kevin Wright 2
Joined: 2010-05-30,
User offline. Last seen 26 weeks 4 days ago.
Re: [Compiler] How to inspect symbol table?
It's a work in progress, absolutely not usable right now, but might contain some useful ideas: https://github.com/scalaj/scalaj-reflect

On 19 January 2011 15:03, Lukas Rytz <lukas.rytz@epfl.ch> wrote:
A student at EPFL, Lomig Megard, just finished working on a semester projectin which he extended the jclasslib bytecode viewer to show the scala signature.
It shows you the signature in a raw format (using scala.tools.nsc.util.ShowPickled) and allows you to browse symbols and see their types.
The code is on https://github.com/soundrabbit/sclasslib/tree/scala, but it's not very stable yet. There are sometimes issues related to the compiler instancewhen the classpath in jclasslib changes. Also, i seem to get a NPE lately..
Lukas


On Wed, Jan 19, 2011 at 14:53, Stefan Kuhn <qn.666@gmx.net> wrote:
Afaik, the state of compiler consists of the AST and the symbol table. I can inspect the AST with -Xprint or -Ybrowse. How can I inspect the symbol table?

http://stackoverflow.com/questions/4735978/scala-compiler-how-to-inspect-symbol-table

thx
stefan





--
Kevin Wright

gtalk / msn : kev.lee.wright@gmail.comkev.lee.wright@gmail.commail: kevin.wright@scalatechnology.com
vibe / skype: kev.lee.wright
twitter: @thecoda

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