by Vincent Salamanca-Gagnon
Formatting complex string representations in mobile applications often results in code that is error-prone and difficult to maintain. Encapsulating this logic into a Domain Specific Language (DSL) can simplify your codebase, but building a DSL and its parser can be intimidating.
This talk demystifies the process by introducing the fundamental concepts of constructing a small parser, using a practical use case to illustrate each step. Attendees will learn about building a lexer, parser construction, Abstract Syntax Tree (AST) generation, and error handling. The parsing logic is implemented within a Kotlin Multiplatform Library to accommodate platform-specific rendering, ensure consistency, and avoid code duplication across platforms.
DevFest Montreal 2024