pydelhi / talks

Talks at Python Delhi User Group!
https://pydelhi.org/talks/
66 stars 51 forks source link

Using ANTLR with Python3 (Parse tree magic for any grammar) #111

Closed virresh closed 5 years ago

virresh commented 6 years ago

Title

Using ANTLRv4 with Python 3 - An introduction to creating Meta-Programs

Brief description about the content to be covered

This talk aims at introducing ANTLR for python 3, and talk about Abstract Syntax Trees and Parse Trees. It will present an overview of the process, the intricacies and will end with a concrete example to show the utility.

ANTLRv4 is a tool that can generate parse trees for any compatible grammar, and provide tools to walk through that tree, so I will illustrate how to use that rather than dwelling more on the theory aspect of the parse trees and boost up the development of language tools. There is a speciality with ANTLRv4, we can separate context from the grammar (so we can get very close to the expectation that grammars are context free).

I expect the session to be beginner friendly so no pre-requisites save some basic python expected. Also I will cover some basic examples, and also a demo of an actual language grammar to create a meta-program if time permits. The session is expected to have the following things:

Time required for the talk

30-45 minutes

Link to slides / demos / any other content (if any)

A library for ANTLR that is being built by me is available here: https://gitlab.com/virresh/coala-antlr ANTLR's official page: http://www.antlr.org/ My blogs related to ANTLR in Python: https://virresh.wordpress.com/tag/antlr/ An example calculator: https://github.com/virresh/ANTLR4-Example

About yourself

I'm a student presently pursuing BTech in CSE at IIIT-Delhi, and am a GSoC student this year at coala.io and have been programming various stuff using python for around two years. I am developing a library to facilitate easy usage of ANTLR for building linting tools. I do my best to pick up and experiment with whatever technologies I can, and I love to learn ! My Web Space : https://virresh.github.io/

rajataaron commented 5 years ago

Hi @virresh ,

Are you available to deliver your talk on 23rd March, Venue for the vent is not finalized yet. But we will lock down venue latest by 12 March.

virresh commented 5 years ago

Hi @rajataaron, The talk was delivered on 22nd December :sweat_smile:

Unfortunately, I will not be able to give this talk again on 23rd March. Though here are the slides that I used for the session: https://virresh.github.io/web/viewer.html?file=ANTLRPy3.pdf , in case someone else would like to take it up further. Thanks for the opportunity though :smile:

rajataaron commented 5 years ago

Ohh Sorry for the confussion. So I am closing this issue for now.

Thanks for letting me know. :)