The Artima Developer Community
Sponsored Link

Scala Buzz
Progress of Scala for NetBeans - with a New Written Lexer and Parser

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Caoyuan Deng

Posts: 165
Nickname: dcaoyuan
Registered: Jan, 2008

Caoyuan Deng is an independent developer
Progress of Scala for NetBeans - with a New Written Lexer and Parser Posted: Apr 12, 2008 11:51 PM
Reply to this message Reply

This post originated from an RSS feed registered with Scala Buzz by Caoyuan Deng.
Original Post: Progress of Scala for NetBeans - with a New Written Lexer and Parser
Feed Title: Blogs about Scala from Caoyuan
Feed URL: http://blogtrader.org/page/dcaoyuan/feed/entries/atom?tags=scala
Feed Description: Blogs about Scala from Caoyuan Deng
Latest Scala Buzz Posts
Latest Scala Buzz Posts by Caoyuan Deng
Latest Posts From Blogs about Scala from Caoyuan

Advertisement

According to this post:

I talked to Jetbrains about this, and they told me that they stopped working on the Scala plugin for the time being, because - demand for Groovy/Ruby was higher - the language was moving too fast - Scala is a terribly difficult language for compiler/tool writers, and the only good way to analyze Scala programs might be through the official compiler, which didn't yet support this

It's true that "Scala is a terribly difficult language for compiler/tool writers", but I'm trying to bypass "the only good way to analyze Scala programs might be through the official compiler"

Before rewriting Scala for NetBeans, I considered some parser choices, one was Scala's native compiler, which is good for compiling/building Scala project, but not suitable for Editor. And JavaCC, ANTLR, which may be good enough, but it's not natural to express Scala's grammar.

Then I found Rats! which is used by Fortress, a very very clean, powerful parser generator. After couple of days working, I got an incrementally lexer for Scala, and a parser for Scala that with Scala's grammar being naturally expressed (the grammar definition is ParserScala.rats). The benefit of a complete controllable parser is that I can now do some type inference and wholly semantic analysis freely and immediately.

Another progress is that I've decoupled the Scala project's dependency on Java's classpath in NetBeans, instead, GSF's classpath is used in Scala project module now. That means, I can begin the indexer for Scala's standard library and project source files.

The next steps will be type inference; smart completion with type inferred information; indexer for later refectory and usages searching; parsing error recover etc.

nn

Read: Progress of Scala for NetBeans - with a New Written Lexer and Parser

Topic: New Blog Previous Topic   Next Topic Topic: Implementing OOP in Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use