CS6660 CD Notes
Anna University Regulation 2013 Computer Science & Engineering (CSE) CS6660 CD Notes for all 5 units are provided below. Download link for CSE 6th SEM CS6660 Compiler Design Lecture Notes are listed down for students to make perfect utilization and score maximum marks with our study materials.
Unit -3 CS6660- Compiler Design
1. ROLE OF THE PARSER
Parser obtains a string of tokens from the lexical analyzer and verifies that it can be generated by the language for the source program. The parser should report any syntax errors in an intelligible fashion. The two types of parsers employed are:
1.Top down parser: which build parse trees from top(root) to bottom(leaves) 2.Bottom up parser: which build parse trees from leaves and work up the root. Therefore there are two types of parsing methods– top-down parsing and bottom-up parsing
2.Bottom up parser: which build parse trees from leaves and work up the root. Therefore there are two types of parsing methods– top-down parsing and bottom-up parsing
A program that performs syntax analysis is called a parser. A syntax analyzer takes tokens as input and output error message if the program syntax is wrong. The parser uses symbol-lookahead and an approach called top-down parsing without backtracking. Top-downparsers check to see if a string can be generated by a grammar by creating a parse tree starting from the initial symbol and working down. Bottom-up parsers, however, check to see a string can be generated from a grammar by creating a parse tree from the leaves, and working up. Early parser generators such as YACC creates bottom-up parsers whereas many of Java parser generators such as JavaCC create top-down parsers.
3.RECURSIVE DESCENT PARSING
Typically, top-down parsers are implemented as a set of recursive functions that descent through a parse tree for a string. This approach is known as recursive descent parsing, also known as LL(k) parsing where the first L stands for left-to-right, the second L stands for leftmost-derivation, and k indicates k-symbol lookahead. Therefore, a parser using the single symbol look-ahead method and top-down parsing without backtracking is called LL(1) parser.
In the following sections, we will also use an extended BNF notation in which some regulation expression operators are to be incorporated. A syntax expression defines sentences of the form , or . A syntax of the form defines sentences that consist of a sentence of the form followed by a sentence of the form followed by a sentence of the form . A syntax of the form defines zero or one occurrence of the form. A syntax of the form defines zero or more occurrences of the form .
CS6660 CD Unit 1 notes – Download Here
CS6660 CD Unit 2 notes – Download Here
CS6660 CD Unit 3 notes – Download Here
CS6660 CD Unit 4 notes – Download Here
CS6660 CD Unit 5 notes – Download Here
If you require any other notes/study materials, you can comment in the below section.
For CS6660 CD Previous Year Question Papers – Click here
For CS6660 CD Question Bank/2marks 16marks with answers – Click here
For CS6660 CD Important Questions/Answer Key – Click here
Anna University 6th SEM CSE CD Lecture Notes
CS6660 Compiler Design Notes free download
Anna University CSE CD Notes Regulation 2013
CS6660 Notes, CD Unit wise Lecture Notes – CSE 6th Semester