Assignment # 01
Fall 2011
Total Marks = 20
Deadline
Your assignment must be uploaded / submitted before or on November 1, 2011
Upload Instructions
Please view the assignment submission process document provided to you by the
Virtual University.
Rules for Marking
Please note that your assignment will not be graded if:
- • It is submitted after due date
- • The file you uploaded does not open
- • The file you uploaded is copied from someone else or from internet
- • It is in some format other than .doc
Note: Material that is an exact copy from handouts or internet would be graded
zero marks. Your solution should consist of the material found through different sources and written in your own words.
Assignment Statements:
Question 1:
Suppose that you are working as a programmer in Microsoft. They assigned you a task to draw a finite acceptor which can be useful for lexical analyses of language L expressed as L = {w (a, b)* / nb(w) mod 3 > 1.}. You are requested to analyze this language and construct a deterministic finite acceptor of this language.
Question 2:
We can follow two approaches during the construction of lexical analyzer. We can construct it as a separate module or it can be a part of scanner. If scanner is the part of parse then in this approach parser usually generates syntax tree of the source program as defined by a grammar. The leaves of the tree are the terminal symbols of the grammar. These terminal symbols or tokens pass to the parser. But generally we choose to handle analysis separately for the better modularity and portability, and to allow make syntax analysis easier, so what are the reasons for decoupling the scanner from parser?
![]() |
Upload your Solution |

