Ginni has Published 1580 Articles

What is Top-Down Parsing?

Ginni

Ginni

Updated on 29-Oct-2021 06:59:41

11K+ Views

In top-down parsing, the parse tree is generated from top to bottom, i.e., from root to leaves & expand till all leaves are generated.It generates the parse tree containing root as the starting symbol of the Grammar. It starts derivation from the start symbol of Grammar & performs leftmost derivation ... Read More

What are Parsing Techniques in Compiler Design?

Ginni

Ginni

Updated on 29-Oct-2021 06:57:11

11K+ Views

Parsing is known as Syntax Analysis. It contains arranging the tokens as source code into grammatical phases that are used by the compiler to synthesis output generally grammatical phases of the source code are defined by parse tree. There are various types of parsing techniques which are as follows −Top-Down ... Read More

What is Ambiguous Grammar?

Ginni

Ginni

Updated on 26-Oct-2021 08:59:12

16K+ Views

A Grammar that makes more than one Leftmost Derivation (or Rightmost Derivation) for the similar sentence is called Ambiguous Grammar.Example − Verify whether the following Grammar is Ambiguous or Not.E → E+E|E $\ast$ E|idSolutionFor string id + id * id, there exist two parse trees.E ⇒lm $\underline{E}$+E ⇒ id+ $\underline{E}$⇒ id+$\underline{E}$ $\ast$ ... Read More

What are Parse Trees (Derivation Trees)?

Ginni

Ginni

Updated on 26-Oct-2021 08:47:49

11K+ Views

Derivations mean replacing a given string’s non-terminal by the right-hand side of the production rule. The sequence of applications of rules that makes the completed string of terminals from the starting symbol is known as derivation. The parse tree is the pictorial representation of derivations. Therefore, it is also known ... Read More

What are Derivations?

Ginni

Ginni

Updated on 26-Oct-2021 08:38:45

3K+ Views

Derivations mean replacing a given string’s non-terminal by the right-hand side of the production rule. The sequence of applications of rules that makes the completed string of terminals from the starting symbol is known as derivation.It can derive terminal strings, beginning with the start symbol, by repeatedly replacing a variable ... Read More

What is Context-Free Grammar?

Ginni

Ginni

Updated on 26-Oct-2021 08:20:44

5K+ Views

Grammar − It is a set of rules which checks whether a string belongs to a particular language a not.A program consists of various strings of characters. But, every string is not a proper or meaningful string. So, to identify valid strings in a language, some rules should be specified ... Read More

What is the implementation of a Lexical Analyzer?

Ginni

Ginni

Updated on 26-Oct-2021 08:18:10

9K+ Views

Lexical Analysis is the first step of the compiler which reads the source code one character at a time and transforms it into an array of tokens. The token is a meaningful collection of characters in a program. These tokens can be keywords including do, if, while etc. and identifiers ... Read More

What is minimizing of DFA in compiler design?

Ginni

Ginni

Updated on 26-Oct-2021 08:09:57

3K+ Views

Minimizing means reducing the number of states in DFA. We have to detect those states of DFA whose presence or absence in DFA does not affect language accepted by DFA. These states can be eliminated from DFA.Algorithm: Minimization of DFAInput − DFA D1 with a set of states Q with ... Read More

Can we convert a non-deterministic finite automata into a deterministic finite Automata?

Ginni

Ginni

Updated on 26-Oct-2021 08:02:51

909 Views

Yes, we can convert a NFA into DFA. For every NFA there exists an equivalent DFA. The equivalence is defined in terms of languages acceptance. Since NFA is nothing but a finite automata in which zero, one or more transitions on an input symbols are permitted. It can always construct ... Read More

What is Non-Deterministic Finite Automata (NFA)?

Ginni

Ginni

Updated on 26-Oct-2021 07:54:36

2K+ Views

Non-Deterministic means that there can be several possible transitions on the same input symbol from some state. The output is non-deterministic for a given input. NFA can be represented as a nondeterministic finite state machine.NFA can be represented by 5 tuples (Q, $\sum$, $\delta$, q0, F)Q is a finite non-empty ... Read More

Advertisements