COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
LEX
|
|
YACC
|
|
Pascal
|
|
Simula
|
Detailed explanation-1: -yacc can generate parsers in C or C++ and supports loadable resources for Microsoft Windows. The language in use determines the name of the file containing the prototype code, and the name of the code file. With the-d option, or when C++ code is requested, an additional definitions file is written.
Detailed explanation-2: -Yacc (yet another compiler compiler) is a grammar parser and parser generator. That is, it is a program that reads a grammar specification and generates code that is able to organize input tokens in a syntactic tree in accordance with the grammar.
Detailed explanation-3: -LALR parser: The underlying parsing algorithm in Yacc-generated parsers. Bison: The GNU version of Yacc. Lex (and Flex lexical analyser), a token parser commonly used in conjunction with Yacc (and Bison).
Detailed explanation-4: -YACC stands for Yet Another Compiler Compiler. YACC provides a tool to produce a parser for a given grammar. YACC is a program designed to compile a LALR (1) grammar. It is used to produce the source code of the syntactic analyzer of the language produced by LALR (1) grammar.
Detailed explanation-5: -The input to yacc describes the rules of a grammar. yacc uses these rules to produce the source code for a program that parses the grammar. You can then compile this source code to obtain a program that reads input, parses it according to the grammar, and takes action based on the result.