You are on page 1of 2

1) What is the use of Lex and Yacc?

Yes, YACC is a parser, Lex is a lexical analyzer. They are typically used together:
you Lex the string input, and YACC the tokenized input provided by Lex. Now, a regular
expression can only represent regular languages. One of the constraints of a regular
language is the lack of "memory".

2) What Is Lex ?

Lex is a program designed to generate scanners, also known as tokenizers, which recognize
lexical patterns in text. Lex is an acronym that stands for "lexical analyzer generator." It is
intended primarily for Unix-based systems. The code for Lex was originally developed by Eric
Schmidt and Mike Lesk.

3) What Is Yacc ?

Yacc (for "yet another compiler compiler." ) is the standard parser generator for the Unix
operating system. An open source program, yacc generates code for the parser in the C
programming language. The acronym is usually rendered in lowercase but is occasionally seen
as YACC or Yacc.

4) What Is Lexical Analysis ?

Lexical analysis is the process of analyzing a stream of individual characters (normally


arranged as lines), into a sequence of lexical tokens (tokenization. for instance of "words" and
punctuation symbols that make up source code) to feed into the parser.

5) What Is Token ?

A lexeme is a sequence of characters in the source program that matches the pattern for
a token and is identified by the lexical analyzer as an instance of thattoken. ... A token is a pair
consisting of a token name and an optional attribute value.Feb 19, 2013.

6) What Is Syntax Tree ?

In computer science, an abstract syntax tree (AST), or justsyntax tree, is


a tree representation of the abstract syntacticstructure of source code written in a
programming language. Each node of the tree denotes a construct occurring in the
source code.

7) Front end & Back end ?

Front End vs Back End of a Compilers. The phases of a compiler are collected into front
end and back end. The front end includes all analysis phases end the intermediate code
generator. The back end includes the code optimization phase and final code generation phase.
8) Three Adresss Code ?

In computer science, three-address code (often abbreviated to TAC or 3AC) is an


intermediate code used by optimizing compilers to aid in the implementation ofcode-
improving transformations. Each TAC instruction has at most three operands and is typically
a combination of assignment and a binary operator.

9) Symbol Tabel ?

In computer science, a symbol table is a data structure used by a language translator such
as a compiler or interpreter, where each identifier (a.k.a. symbol) in a program's source
code is associated with information relating to its declaration or appearance in the source.
10) DAG ?

A multitree (also called a strongly unambiguous graph or a mangrove) is a directed


graph in which there is at most onedirected path (in either direction) between any two
vertices; equivalently, it is a DAG in which, for every vertex v, the subgraph reachable from v
forms a tree.