Evaluation of the Use of Different Parser Generators in a Compiler Construction Course

Abstract

Compiler construction is a common course in many computer science degrees. Although there are different lexer and parser generation tools, Lex/Yacc is still the preferred option in multiple universities. ANTLR is a powerful compiler construction tool that, among other features, provides parser generation. Although ANTLR has been used in the implementation of different languages and software tools, it is not as common as Lex/Yacc in compiler construction courses. Therefore, we conduct an experiment to evaluate the impact of using ANTLR instead of Lex/Yacc in courses where students build a compiler. To that aim, we divide the year-3 students of a Programming Language Design and Implementation course into two random groups. The course is delivered using Lex/Yacc for one group and ANTLR for the other one. Different values are measured to statistically compare both approaches, including the work completed by the students, the number of hours it took them to finish different tasks, their anonymous opinion about the parser generator used, and their performance. The use of ANTLR shows significant benefits in most of the evaluations.

Publication
Proceedings of the World Conference on Information Systems and Technologies 2022