Skip to main content

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

  • 91 Accesses

Part of the Lecture Notes in Networks and Systems book series (LNNS,volume 470)


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.


  • Parser generation
  • Compiler construction
  • Parser
  • Lexer
  • Lex
  • Yacc

This is a preview of subscription content, access via your institution.

Buying options

USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-031-04829-6_30
  • Chapter length: 9 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
USD   229.00
Price excludes VAT (USA)
  • ISBN: 978-3-031-04829-6
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   299.99
Price excludes VAT (USA)
Fig. 1.
Fig. 2.
Fig. 3.


  1. Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools, 2nd edn. Addison Wesley, Boston (2006)

    MATH  Google Scholar 

  2. Parr, T.J., Quong, R.W.: ANTLR: a predicated-LL(k) parser generator. Softw.: Pract. Exp. 25(7), 789–810 (1995)

    Google Scholar 

  3. Comparison of parser generators. Accessed 19 Oct 2021

  4. Shanghai Consultancy, Global Ranking of Academic Subjects, Computer Science. Accessed 19 Oct 2021

  5. Quacquarelli Symonds, QS World University Rankings - Computer Science. Accessed 19 Oct 2021

  6. Times Higher Education, World University Rankings 2021 by subject: Computer Science.!/page/0/length/25/sort_by/rank/sort_order/asc/cols/stats. Accessed 19 Oct 2021

  7. Parr, T.: The Definitive ANTLR 4 Reference, 2nd edn. Pragmatic Bookshelf, Raleigh (2013)

    Google Scholar 

  8. Parr, T., Fisher, K.: LL(*): the foundation of the ANTLR parser generator. In: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2011, pp. 425–436. Association for Computing Machinery, New York (2011)

    Google Scholar 

  9. Parr, T., Harwell, S., Fisher, K.: Adaptive LL(*) parsing: the power of dynamic analysis. In: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA 2014, pp. 579–598. Association for Computing Machinery, New York (2014)

    Google Scholar 

  10. DeRemer, F., Pennello, T.: Efficient computation of LALR(1) look-ahead sets. ACM Trans. Program. Lang. Syst. 4(4), 615–649 (1982)

    CrossRef  Google Scholar 

  11. Levine, J.R., Mason, T., Brown, D.: Lex & Yacc, 2nd edn. O’Reilly & Associates Inc., USA (1992)

    Google Scholar 

  12. McCauley, R.: A bounty of accessible language translation tools. ACM SIGCSE Bull. 33(2), 14–15 (2001)

    CrossRef  Google Scholar 

  13. Ortin, F., Zapico, D., Cueva, J.M.: Design patterns for teaching type checking in a compiler construction course. IEEE Trans. Educ. 50, 273–283 (2007)

    CrossRef  Google Scholar 

  14. Ortin, F., Redondo, J.M., Quiroga, J.: Design and evaluation of an alternative programming paradigms course. Telemat. Inform. 34(6), 813–823 (2017)

    CrossRef  Google Scholar 

  15. Ortin, F., Redondo, J.M., Perez-Schofield, J.B.G.: Efficient virtual machine support of runtime structural reflection. Sci. Comput. Program. 74(10), 836–860 (2009)

    MathSciNet  CrossRef  Google Scholar 

  16. Georges, A., Buytaert, D., Eeckhout, L.: Statistically rigorous java performance evaluation. In: Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications, OOPSLA, pp. 57–76. ACM, New York (2007)

    Google Scholar 

  17. Grosch, J.: Generators for high-speed front-ends. In: Hammer, D. (ed.) CCHSC 1988. LNCS, vol. 371, pp. 81–92. Springer, Heidelberg (1989).

    CrossRef  Google Scholar 

  18. Chen, X.: Hyacc parser generator. Accessed 19 Oct 2021

  19. Chen, X., Pager, D.: Full LR(1) parser generator Hyacc and study on the performance of LR(1) algorithms. In: Proceedings of the 4th International C* Conference on Computer Science and Software Engineering, C3S2E 2011, pp. 83–92. Association for Computing Machinery, New York (2011)

    Google Scholar 

  20. da Cruz, D., Varanda, M.J., Verón, M., Fonseca, R., Henriques, P.R.: Comparing generators for language-based tools. Technical report, Departamento de Informatica, Universidade do Minho, CCTC, Braga, Portugal (2007)

    Google Scholar 

  21. Fowler, M.: Language workbenches: the killer-app for domain specific languages?. Accessed 19 Oct 2021

  22. Dmitriev, S.: Language Oriented Programming: The Next Programming Paradigm. Accessed 19 Oct 2021

  23. Erdweg, S., et al.: Evaluating and comparing language workbenches: existing results and benchmarks for the future. Comput. Lang. Syst. Struct. 44, 24–47 (2015)

    Google Scholar 

  24. Klint, P., van der Storm, T., Vinju, J.: On the impact of DSL tools on the maintainability of language implementations. In: Proceedings of the 10th Workshop on Language Descriptions, Tools and Applications, LDTA 2010, pp. 1–9. Association for Computing Machinery, New York (2010)

    Google Scholar 

  25. Ortin, F., Zapico, D., Quiroga, J., Garcia, M.: TyS - a framework to facilitate the implementation of object-oriented type checkers. In: Proceedings of the 26th International Conference on Software Engineering and Knowledge Engineering, SEKE 2014, pp. 150–155 (2014)

    Google Scholar 

  26. Ortin, F., Zapico, D., Quiroga, J., Garcia, M.: Automatic generation of object-oriented type checkers. Lect. Notes Softw. Eng. 2(4), 288–293 (2014)

    CrossRef  Google Scholar 

  27. Wimmer, C., Würthinger, T.: Truffle: a self-optimizing runtime system. In: Leavens, G.T. (ed.) Conference on Systems, Programming, and Applications: Software for Humanity, SPLASH 2012, pp. 13–14. ACM, Tucson (21–25 October 2012)

    Google Scholar 

Download references


This work has been partially funded by the Spanish Department of Science, Innovation, and Universities: project RTI2018-099235-B-I00. The authors have also received funds from the University of Oviedo through its support to official research groups (GR-2011-0040).

Author information

Authors and Affiliations


Corresponding author

Correspondence to Francisco Ortin .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Verify currency and authenticity via CrossMark

Cite this paper

Ortin, F., Quiroga, J., Rodriguez-Prieto, O., Garcia, M. (2022). Evaluation of the Use of Different Parser Generators in a Compiler Construction Course. In: Rocha, A., Adeli, H., Dzemyda, G., Moreira, F. (eds) Information Systems and Technologies. WorldCIST 2022. Lecture Notes in Networks and Systems, vol 470. Springer, Cham.

Download citation