AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Online compiler for lex and yacc3/18/2024 ![]() ![]() Parser generators are also used to teach programming language and compiler implementation courses in computer science degrees. There exist plenty of parser generators, such as Yacc/Bison, ANTLR, JavaCC, LISA, SableCC, and Coco/R, among many others -some of them provide additional features for compiler construction beyond parsing.Īlthough these tools have different properties such as the parsing strategy or the programming language of the generated code, most software developers opt for either the classic Lex/Yacc approach or the ANTLR 4 parser generator. By using these tools, the user describes the syntax of the language to be recognized, and the tool generates a parser for the specified language. The importance of parsing in computer science has implied the existence of different tools aimed at the automatic generation of parsers. Parsers are used for different tasks in computer science such as performing machine-level translation of programs ( e.g., (de)compilers, transpilers, and (dis)assemblers), creating software development tools ( e.g., profilers, debuggers, and linkers), natural language processing ( e.g., dependency and constituency parsing), and data format processing ( e.g., JSON, GraphViz DOT, and DNS zone files). Parsers are software components that, using a lexer to recognize the terminal symbols of a given language, analyze an input, check its correct syntax, and build a tree that represents the input program with a hierarchical data structure. Lexical analyzers are commonly called lexers or scanners. The process of recognizing the terminal symbols, also called tokens, from a sequence of characters is called lexical analysis. Such a grammar may describe a natural language ( e.g., English or French), a computer programming language, or even a data format. Parsing-also known as syntax or syntactic analysis-is the process of analyzing a string of terminal symbols conforming to the rules of a formal grammar. ![]() The authors have also received funds from the University of Oviedo through its support to official research groups (GR-2011-0040).Ĭompeting interests: The authors have declared that no competing interests exist. įunding: This work has been partially funded by the Spanish Department of Science, Innovation, and Universities: project RTI2018-099235-B-I00. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.ĭata Availability: All the raw data obtained from conducting all the experiments are available for download from. Received: OctoAccepted: FebruPublished: March 3, 2022Ĭopyright: © 2022 Ortin et al. ![]() Under the context of the academic study conducted, ANTLR has shown significant differences for most of the empirical features measured.Ĭitation: Ortin F, Quiroga J, Rodriguez-Prieto O, Garcia M (2022) An empirical evaluation of Lex/Yacc and ANTLR parser generation tools. Two random groups of students implement the same language using a different parser generator, and we statistically compare their performance with different measures. In this article, we present such an empirical study by conducting an experiment with undergraduate students of a Software Engineering degree. There exist different qualitative comparisons of the features provided by both approaches, but no study evaluates empirical features such as language implementor productivity and tool simplicity, intuitiveness, and maintainability. Even though ANTLR provides more advanced features, Lex/Yacc is still the preferred choice in many university courses. Two of the most common parser generation tools are the classic Lex/Yacc and ANTLR. Due to the widespread usage of parsers, there exist different tools aimed at automizing their generation. Parsers are used in different software development scenarios such as compiler construction, data format processing, machine-level translation, and natural language processing.
0 Comments
Read More
Leave a Reply. |