A practical approach to parsing

Presented at May Contain Hackers (MCH2022), July 24, 2022, 1 p.m. (90 minutes)

Many parsing tools and generators have been developed starting from a certain parsing algorithm. In the past twenty years, I have worked on a parser tool with a focus on usability and being intuitive. Not necessarily producing the most efficient parser, but one that is fast enough for practical purposes. The workshop will start with the most elementary aspects of parsing from examples and gradually explain all the complexities of writing grammars and explain the solutions to them. The workshop will start with some simple examples of parsing, starting with arithmetic expressions. An online interactive parser will be used to explain various examples and allow participants to experiment themselves. Next the workshop will explain a practical and intuitive approach to specifying grammars. In a number of small steps, the various aspects will be explained. Subjects like operator priorities and dealing with ambiguity will be addressed. Also the build-in method for constructing an abstract syntax tree will be explained. At the end the participants should be able to write a grammar for a small programming language and even implement an interpreter for it based on one that is provided. If there is room to dive into the more technical aspects of the parser, I can delve into the various implementations in C, C++ and JavaScript. I would very much like to give this as an interactive workshop, starting with the most simple question: What is 3 + 4? The materials for this workshop will can be found at https://fransfaase.github.io/MCH2022ParserWorkshop/

Presenters:

  • Frans Faase
    I studied computer science at the University of Twente on the topics of compiler development. I graduated cum laude with a master degree. I worked some years in academics and with various companies, mostly developing software in C++. Besides having an interest in the subject of developing parsers, I have also done some reverse engineering (of binary and textual formats), helped with the development with some international standard and developed several scripting language one of which is still in use in a commercial available tool for Enterprise Architecture. Besides this, I also have an interest in combinatorics and puzzles. See further github.com/FransFaase and www.iwriteiam.nl

Links:

Similar Presentations: