I'm still a scala newbie, so any comments/suggestions are appreciated.<p>The full source code is here: <a href="https://gist.github.com/dpapathanasiou/b9d85685a0381f1deea0" rel="nofollow">https://gist.github.com/dpapathanasiou/b9d85685a0381f1deea0</a>
You should check out the Parser package in the scala standard lib. I maintain a few DSLs using this and it's an absolute dream.<p><a href="https://wiki.scala-lang.org/display/SW/Parser+Combinators--Getting+Started" rel="nofollow">https://wiki.scala-lang.org/display/SW/Parser+Combinators--G...</a><p>Code looks solid otherwise...at least where I work the style would be to favor functional idioms over for loops but I think that's just personal preference.
Just for fun and to illustrate what's in my opinion is wrong with Scala approach to DSLs, implemented the same DSL using a specialised meta-language: <a href="http://bit.ly/1U2PGlV" rel="nofollow">http://bit.ly/1U2PGlV</a><p>The meta-language is available here: <a href="https://github.com/combinatorylogic/mbase" rel="nofollow">https://github.com/combinatorylogic/mbase</a>
For DSL implementation see string interpolation, <a href="http://stackoverflow.com/questions/10708136/how-to-create-dsl-in-scala-for-command-lines-with-minimum-extra-boilerplate" rel="nofollow">http://stackoverflow.com/questions/10708136/how-to-create-ds...</a>
This doesn't seem to solve the puzzle. As much as DSL processing part is done, the whole point of the puzzle was to make the operations sublinear in time complexity.
To anyone here who works on a large, scala codebase as a team: how do you manage compilation times and narrowing code standards to a manageable set of idioms?