answersLogoWhite

0


Best Answer

first:

1. If first character of production is terminal then becomes first.

eg. first(abAb)={a};

2.If a production of this type A->BCD...

means all are variable or non-terminal then

if first(B) donot contains null then

first(A)=first(B)

stop here.

else

then also check for next non terminal like C here

same as above step

and first(A)=First(B)+first(C).

if we get null stop there.

FOLLOW:

if you know first then you can easily go with follow.

1.if a variable is start symbol then follow=$.

2.if a production is of A->(any string1)B(any string2)

then

follow(B)=first(any string2) -{null}

3.if a production is of A->(any string)B

then

follow(B)=follow(A) .

stop

it is very simple, please try to understand!

really good answer, for more visit:www.cmail.99k.org

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can we find out First and follow in compiler design?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Other Engineering

What is an example of a Uniformly distributed load?

Zero amps on the neutral at the distribution panel. In a real life example - a fish tank (full of water) the same size as the panel. The water evenly distributes the load over the entire surface area of the panel / shelf. follow this link to find out more www.blog.rapidracking.com


How do you analysis stress in flexible pavement using kenpave software?

Hi! The stress analysis of Flexible and Rigid pavements in KENPAVE is highly flexible and easier than any other softwares. All you have to do is to input the geometric properties of pavement and material characteristics such as Modulus, Poisson ratio of individual layers, design traffic in Msa, wheel load, tire pressure and co-ordinates at which stresses, strains and deformations are required. You can perform any number of permutations by varying the layer thickness and material properties to find the impact on the results. This software can also be used for the design of Overlays especially flexible overlays as it can perform non-linear analysis too. Design of semi-rigid pavements can be performed without any difficulty. It's really versatile. The Fatigue and Rutting life equations are parametric in nature, hence needs proper calibration before use. From pgs


How do you find diameter of a shaft when bearing no is given?

How do you find dia meter of shaft when bearing no is given?


Where can you find a simple machine?

Almost everywhere!!!


Where can find a plentum?

A plenum is a space, usually an enlarged space in air handler ductwork (forced hot air heating systems). In the plenum the air can be heated, cooled, humidified or dehumidified before being redirected down smaller ducts for the final endusers. It is often the first space through which air, being drawn in through the filters, passes into the system.

Related questions

How to design a Compiler?

This is a fairly complex answer, but it basically boils down to a few oversimplified steps. First, design a language, or find the specifications for a language you would like to use. Second, design a lexical parser that can interpret the "tokens" that you designed in your language. Third, design a compiler/linker that will assemble the tokens into binary code, and link them with the appropriate libraries. Your exact steps will vary depending on the operating system you are using, the compiler you have available, etc.


What is the meaning of import in java program?

It tells the compiler where to find classes that are outside the file you are editing.It tells the compiler where to find classes that are outside the file you are editing.It tells the compiler where to find classes that are outside the file you are editing.It tells the compiler where to find classes that are outside the file you are editing.


Grace Murry Hopper Invented the compiler and was reported to find the first bug in a relay-what did she do with it?

Obama


How do you design hand screw press?

Find a design pattern online for a hand screw press and follow it or alter it as needed to fit your needs.


Where can you find an Ada compiler for windows?

thefreecountry.net


What happens if you try to find address of register variable?

Either you get a compiler error. Or you get a compiler warning, and the variable won't be stored in register.


How can you find out the size of int for a particular compiler?

That' what sizeof is good for.


Where can one find a free Pascal compiler?

A free Pascal compiler can be found in several locations. Download sites such as Brothersoft, Sourceforge, Bloodshed, Softpedia, and Tucows offer a free download of a Pascal compiler.


Where can I find a free C plus plus compiler download for Linux?

Codeblocks has a Linux version compiler. There's a link to it under the related links.


What command do you use to find the version of the GCC compiler?

gcc --version


Where would you find the meaning of lexicographer?

The author or compiler of a lexicon or dictionary.


Describe how to develop a hypothesis and design an expriment?

find out the aim of the experiment first.