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

more pattern-matching-translation in bite-sized chunks

No replies
Miguel Garcia
Joined: 2009-06-10,
User offline. Last seen 42 years 45 weeks ago.

I've made some progress with the Scala to Java translator. "Simple" pattern
matching expressions are being translated into cascading ifs (no jumps in
sight).

It will take more time and even more refactoring, but the current codegen
techniques will do fine when handling more complex patterns. The translator
is described in Ch. 8 and 9 of the attached PDF, the previous chapters are a
catalog of AST shapes around patterns.

BTW, if you find this project interesting, you may consider tackling one of
the open subproblems [1]

Stay tuned!

Miguel
http://www.sts.tu-harburg.de/people/mi.garcia/

[1] Sec. 2.3 in
http://www.sts.tu-harburg.de/people/mi.garcia/ScalaCompilerCorner/ScalaT...

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