Evaluation of the Use of Different Parser Generators in a Compiler Construction Course | SpringerLink
Skip to main content

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

  • Conference paper
  • First Online:
Information Systems and Technologies (WorldCIST 2022)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 32031
Price includes VAT (Japan)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 40039
Price includes VAT (Japan)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  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. https://en.wikipedia.org/wiki/Comparison_of_parser_generators. Accessed 19 Oct 2021

  4. Shanghai Consultancy, Global Ranking of Academic Subjects, Computer Science. https://www.shanghairanking.com/rankings/gras/2021/RS0210. Accessed 19 Oct 2021

  5. Quacquarelli Symonds, QS World University Rankings - Computer Science. https://content.qs.com/wur/Computer_Science.htm. Accessed 19 Oct 2021

  6. Times Higher Education, World University Rankings 2021 by subject: Computer Science. https://www.timeshighereducation.com/world-university-rankings/2021/subject-ranking/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)

    Article  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)

    Article  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)

    Article  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)

    Article  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)

    Article  MathSciNet  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). https://doi.org/10.1007/3-540-51364-7_6

    Chapter  Google Scholar 

  18. Chen, X.: Hyacc parser generator. http://hyacc.sourceforge.net. 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?. http://martinfowler.com/articles/languageWorkbench.html. Accessed 19 Oct 2021

  22. Dmitriev, S.: Language Oriented Programming: The Next Programming Paradigm. https://resources.jetbrains.com/storage/products/mps/docs/Language_Oriented_Programming.pdf. 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)

    Article  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

Acknowledgments

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

Authors

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

Check for updates. 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. https://doi.org/10.1007/978-3-031-04829-6_30

Download citation

Publish with us

Policies and ethics