From Structured Text to Code

Building Custom Grammars and Parsing with Java with ANTLR

In this talk, we will explore the powerful capabilities of ANTLR (Another Tool for Language Recognition) to define custom grammars and parse structured files. ANTLR, a widely used parser generator, simplifies the process of translating domain-specific languages (DSLs) or structured data formats into executable code, making it an invaluable tool for Java developers. We will start by introducing ANTLR’s architecture and how it works to create parsers for custom languages. Through live code examples, we will develop a simple grammar, generate a parser, and demonstrate how to translate structured data into Java code. Attendees will gain insights into building a language from scratch, generating parse trees, and integrating ANTLR into a Java-based project. By the end of this session, you will have a practical understanding of how to use ANTLR to efficiently build and extend grammars, and how to apply these techniques in real-world scenarios, such as interpreting structured files or DSLs for translation into Java.

Date
02.04.2025
Location
Nürburgring
Birgit Kratz
Birgit Kratz
Softwarecrafter

Softwarearchitect and Developer Java, SpringBoot, Clean Code, Agile