Parsing state of the art and ANTLR 4 demo using intellij plugin

75 %
25 %
Information about Parsing state of the art and ANTLR 4 demo using intellij plugin

Published on March 7, 2014

Author: parrt



Quick discussion of attempts to increase top-down parsing strength and a demo of ANTLR 4 using the Intellij plugin. The demo language is Valgol, derived from "Valley girl" speak from 1980s. Hilarious. Speed comparison of ANTLR to many other tools when parsing Java.

Computer Language Design and Implementation meetup March 6, 2014 Latest and greatest parsing stuff Terence Parr University of San Francisco

Believe it or not... ● I think I have built my last parser generator ● ``Why program by hand in 5 days what you can spend 5 years of your life automating?’’ ^ 2

The great struggle ● Top-down (LL), bottom-up (LR,GLR) have duked it out for a long time ● LL(k) much weaker than GLR as GLR can take any grammar ● LL is O(n), GLR is “O(n^3)” ● Some worked on increasing LL strength ● Others worked on optimizing GLR for speed

Increasing LL strength ● ● ● ● All about the lookahead 1990: LL(k) for k>1 1994: limited backtracking (syn. predicates) 2004: PEG: parser expression grammars formalized syn preds. Key addition: memoize partial parsing results to get O(n); ● 2007: ANTLR 3 LL(*) ● 2010: GLL; any grammar but O(n^3)

2012: ANTLR 4 ALL(*) ● ● ● ● ● Any grammar w/o indirect left-recursion Can tweak grammar to make very fast Auto constructs parse trees Generates listeners and/or visitors Good doc (if you have $25)

ALL(*) vs X speed parsing Java 12,920 Java files, 3.6M lines, size 123M.

Time and space to parse and optionally build trees. Single 3.2M Java file

Listener events

Depth-First Search of parse tree, firing events

Demo: let’s build Valgol From “Valley girls” in 1980s def f(x,y) { code: plugin: var z = grody^max gag me with a spoon totally do antlr = like bitchen for i = like 1 to maybe 10 totally do x = fersure tubular }

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Parsing state of the art and ANTLR 4 demo using intellij ...

Parsing state of the art and ANTLR 4 demo using intellij plugin Nov 29, 2014 Technology terence-parr
Read more

The Art Of Parsing @ Devoxx France 2014 - Software

Parsing state of the art and ANTLR 4 demo using intellij plugin
Read more

Antlr rafaelpsouza - Documents - DOCSLIDE.US

What is ANTLR?A powerful parser generator you can use toimplement language interpreters, ... Share Antlr rafaelpsouza. ... 4. Language ...
Read more

Eclipse Articles, Tutorials, Demos, Books, and More ...

Eclipse Articles, Tutorials, Demos, Books, ... Eclipse is more than a state-of-the-art IDE: ... The reader will learn how to use plugin tools for using ...
Read more

Gradle User Guide -

IntelliJ IDEA Integration 26. The War Plugin 26.1. Usage ... Using the ANTLR plugin 40.4. ... With the state-of-art incremental build function.
Read more

IntelliJ IDEA Blog | Tips & tricks, news, how-to’s about ...

We’re excited to tell you that IntelliJ IDEA has won the Geek Choice 2014 award! We are proud to receive this award and wish to thank RebelLabs, ...
Read more

TypeScript - JavaScript that scales.

State of the art JavaScript. TypeScript offers support for the latest and evolving JavaScript features, ... With TypeScript, ...
Read more

SQL Reporting Services - CodeProject

SQL Reporting Services ... Dynamically Pointing to Shared Data Sources on SQL Reporting Services using a Report Definition ... intellij. Interaction.
Read more