Yacc

From Wikipedia, the free encyclopedia

The correct title of this article is yacc. The initial letter is shown capitalized due to technical restrictions.

yacc is a computer program that serves as the standard parser generator on Unix systems. The name is an acronym for "Yet Another Compiler Compiler." It generates a parser (the part of a compiler that tries to make sense of the input) based on an analytic grammar written in a notation similar to BNF. Yacc generates the code for the parser in the C programming language.

Yacc was developed by Stephen C. Johnson at AT&T for the Unix operating system. Later compatible programs were written, such as Berkeley Yacc, GNU bison, MKS yacc and Abraxas yacc. An updated version of the original AT&T version is also open source as part of Sun's OpenSolaris project. Each offer slight improvements and additional features over the original Yacc, but the concept has remained the same. Yacc has also been rewritten for other languages, including Ratfor, EFL, ML, Ada, Java, and Limbo.

Since the parser generated by Yacc requires a lexical analyzer, it is often used in combination with a lexical analyzer generator, in most cases either Lex or the free software alternative Flex. The IEEE POSIX P1003.2 standard defines the functionality and requirements to both Lex and Yacc.

Versions of AT&T Yacc have become open source; the source code is available with the standard distributions of Plan 9 and OpenSolaris.

  • LALR parser: The underlying parsing algorithm in Yacc.
  • Bison: The GNU version of Yacc.
  • Lex (and Flex lexical analyser) , the token parser commonly used in conjunction with yacc (and Bison).
  • BNF, is a metasyntax used to express context-free grammars: that is, a formal way to describe formal languages.

  • Stephen C. Johnson. YACC: Yet another compiler-compiler. Unix Programmer's Manual Vol 2b, 1979.

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.