COSCUP 2025

Understanding Ruby Grammar Through Conflicts
2025-08-09 , TR209

Have you ever created a parser using an LR parser generator such as Lrama or GNU Bison? If so, you've likely encountered conflicts – perhaps even many times – leaving you feeling lost and unsure of what to do. However, conflicts offer incredibly valuable insights for understanding the grammar of programming languages.
In this presentation, we will delve into the structure of Ruby's grammar by intentionally introducing changes to its syntax, triggering conflicts, and then analyzing those conflicts. Through this process, we aim to deepen our understanding of how Ruby's grammar is constructed.


Difficulty:

Intermediate

The author of Lrama LALR parser generator. Ruby committer.