Preview

Mobile Cloning

Good Essays
Open Document
Open Document
4981 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Mobile Cloning
Compiler Design
UNIT 1

1 What is compiler?
Ans:- A compiler is a program that translates human readable source code into computer executable machine code. To do this successfully the human readable code must c omply with the syntax rules of whichever programming language it is written in. The compiler is only a program and cannot fix your programs for you. If you make a mistake, you have to correc t the syntax or it won't compile 2 compare NFA and DFA ?
Ans:DFA- single value transition function is represented
- it take more memory space
- number of state is more
- it not support null move
- backtracking is possible
-dfa is faster recognizer
NFA- multi value transition function is represented
- it take less memory space
- number of state is less
- it support null moves
- backtrakin is possible some cases
- nfa is slower recognizer
3 Define bootstrap and cross compiler?
Ans:- Bootstrap:In computing, bootstrapping (from an old expression "to pull oneself up by one's bootstraps") is a technique by which a simple computer program activates a more complicated system of programs. In the start up process of a computer system, a small program (such as BIOS) initializes and tests that a basic requirement of hardware, peripherals and external memory devices are connected.
Cross compiler:A compiler that runs on one computer but produces object code for a different type of computer. Cross compilers are used to generate software that can run on computers with a new architecture or on specialpurpose devices that cannot host their own compilers.
4 Define token lexeme pattern ?
Ans:- Token-A lexical token is a sequence of characters that can be treated as a unit in the grammar of the programming languages.
Example of tokens:
Type token (id, num, real, . . . )
Punctuation tokens (IF, void, return, . . . )
Alphabetic tokens (keywords)
Example of non-tokens:
Comments, preprocessor directive, macros, blanks, tabs, newline, . . .

Lexeme-A

You May Also Find These Documents Helpful

Related Topics