Slide 1

Slide 1 text

THE SBT-RATS PARSER GENERATOR PLUGIN FOR SCALA Anthony Sloane Franck Cassez Scott Buckley Programming Languages and Verification Group Macquarie University, Sydney, Australia

Slide 2

Slide 2 text

DEMO

Slide 3

Slide 3 text

RATS! http://cs.nyu.edu/rgrimm/xtc/rats-intro.html Robert Grimm Parsing expression grammars Packrat parsing Generates Java

Slide 4

Slide 4 text

MORE RATS!

Slide 5

Slide 5 text

SYNTAX DEFINITIONS

Slide 6

Slide 6 text

SYNTAX DEFINITIONS

Slide 7

Slide 7 text

TREE DEFINITION

Slide 8

Slide 8 text

PRETTY-PRINTING

Slide 9

Slide 9 text

BINARY PARSING

Slide 10

Slide 10 text

EXPRESSIONS

Slide 11

Slide 11 text

SCALA LLVM LIBRARY

Slide 12

Slide 12 text

MQ SCALA SMTLIB Replaces a hand-written lexer, parser, pretty-printer of more than 2,500 Scala code lines with less than 500 lines of syntax definition

Slide 13

Slide 13 text

SOFTWARE LANGUAGE ENGINEERING AT MACQUARIE UNIVERSITY https://bitbucket.org/inkytonik/sbt-rats https://bitbucket.org/inkytonik/kiama [email protected] @inkytonik on Twitter High-level language processing in a familiar programming setting strategic term rewriting dynamically-scheduled attribute grammars abstract state machines pretty-printing combinators