Skip to content

Commit 5a81915

Browse files
committed
Merge pull request scala#423 from alexander-myltsev/proposal-a_myltsev
GSoC'16 Proposal: Scala Compiler Plugin for Parser Combinators
2 parents 6b49a41 + 90af030 commit 5a81915

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

gsoc/2016.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,41 @@ construction.** Ideally, it should point to a compiler project you have written
208208

209209
Supervised by [@sjrd](https://github.com/sjrd/)
210210

211+
### Scala Compiler Plugin for Parser Combinators
212+
213+
Parsing can be found everywhere in computing today: from log analysis to
214+
computer languages. Functional programming offers concise approach to
215+
parser generators development: a parsing grammar for generator is composed
216+
via higher-order functions -- [parser combinators](http://www.cs.nott.ac.uk/~pszgmh/monparsing.pdf).
217+
218+
As a program, parser generator should be programmed easily and work fast.
219+
Popular parser generators in Scala ([Scala Combinator Parsers](https://github.com/scala/scala-parser-combinators),
220+
[parboiled2](http://parboiled2.org), [FastParse](https://github.com/lihaoyi/fastparse ),
221+
[PapaCarlo](http://lakhin.com/projects/papa-carlo/), etc.) can be much faster
222+
or have complications in development.
223+
224+
Scala Combinator Parsers library is most concise. It is implemented as plain
225+
library in Scala. And because of that has few facilities for optimizations.
226+
227+
parboiled2 drops off most of algebraic sanity, and leaves a programmer with
228+
imperative-style parsing and Value Stack. That causes type soundness bugs,
229+
clumsy code that is hard to debug, and bad error reporting. FastParse fixes
230+
most critical issues of parboiled2. But both lacks can’t perform cross-rules
231+
analysis and deep optimisations.
232+
233+
The proposed solution requires users to use SBT build system with external plugin.
234+
Scala compiler plugin should rewrite Scala AST of a parser: compile high-level
235+
concise monadic Scala Combinator Parsers to highly-effective runtime code.
236+
237+
The plugin would be written in Scala. Existing projects written in Scala
238+
are expected. Ideally you should have understanding of compilers in
239+
general and Scala compiler inner parts.
240+
241+
Supervised by [@alexander-myltsev](https://github.com/alexander-myltsev),
242+
[a core contributor to parboiled2 during GSoC'2013](https://github.com/sirthias/parboiled2/commits?author=alexander-myltsev)
243+
and [biological names parser based or parboiled2](https://github.com/GlobalNamesArchitecture/gnparser/commits?author=alexander-myltsev)
244+
writing [notes sometimes in his blog](http://myltsev.com/tags/#parboiled2).
245+
211246
## ENSIME project ideas
212247

213248
ENSIME is a JVM process that indexes your dependencies and understands your source code

0 commit comments

Comments
 (0)