Using Scala’s pattern matching features for an attribute grammar formalisation of the CSS layout specification
It is difficult to verify that the popular implementations of CSS layout match the specification, due to the very different languages being used. We hope to bridge this gap by formalising the specification using attribute grammars, which are formulae for specifying tree computations. Kiama is a language processing library that uses Scala’s pattern matching syntax as a baseline for defining attribute formulae. This format is useful for defining a formula for many production rules in one place. Further, Kiama 2.0 introduced the ability to interrogate the structure of a tree using extractor patterns, which allows us to write tree matching patterns that match not only downwards on the tree, but also upwards or sideways. We have also been using extractor patterns to grant easy access to commonly used attributes, and to express the attributes in a language that closely resembles the CSS specification.
Mon 31 OctDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
15:40 - 17:20 | |||
15:40 25mTalk | Using Scala’s pattern matching features for an attribute grammar formalisation of the CSS layout specification Scala Scott Buckley Macquarie University, Australia | ||
16:05 25mTalk | The sbt-rats Parser Generator Plugin for Scala (Tool Paper) Scala Anthony Sloane Macquarie University, Australia, Franck Cassez Macquarie University, Australia, Scott Buckley Macquarie University, Australia DOI Media Attached | ||
16:30 50mOther | Unconference 2 Scala |