2023 2024 Student Forum > Management Forum > Main Forum

 
  #2  
24th May 2018, 04:32 PM
Unregistered
Guest
 
Re: PCD Lab Manual for CSE Anna University

Hii sir, I Wants to get the Lab Manual of the Compiler Design Program of the Computer Science And Engineering of the Anna University ?
  #3  
24th May 2018, 04:33 PM
Super Moderator
 
Join Date: Aug 2012
Re: PCD Lab Manual for CSE Anna University

Anna University is a state technical university in Tamil Nadu, India. The main campus is in Guindy, Chennai.

IMPLEMENTATION OF A LEXICAL ANALYZER IN C

AIM:
To write and execute a C program to implement the lexical analyzer.
ALGORITHM:
Start the program.
Declare the file pointer and necessary variables.
Open the input file in the read mode.
Use the analyze function to analyze the input program and store the
identifiers, keywords and operator on idhd, keyhd, ophd respectively.
Stores the tokens in data structure linked lists.
Increment the line number of each token and its occurrences.
Using the show function print the linked lists in a tabular format.
Stop the program


IMPLEMENTATION OF A LEXICAL ANALYZER USING LEX
TOOL

AIM:
To implement the lexical analyzer using lex tool for a subset of C language.

ALGORITHM:
Start the program.
Declare necessary variables and creates token representation using
Regular.
Print the pre processor or directives, keywords by analysis of the input
program.
In the program check whether there are arguments.
Declare a file and open it as read mode.
Read the file and if any taken in source program matches with RE that all
returned as integer value.
Print the token identified using YYdex() function.
Stop the program.


IMPLEMENTATION OF A RECURSIVE DESCENT PARSER
AIM:
To implement a recursive descent parser in a C program.
ALGORITHM:
Start the program.
Get the expression from the user and call the parser() function.
In lexer() get the input symbol and match with the look ahead
pointer and then return the token accordingly.
In E(), check whether the look ahead pointer is + or else
return syntax error.
In T(),check whether the look ahead pointer is * or / else
return syntax error.
In F(),check whether the look ahead pointer is a member of any
identifier.
In main(), check if the current look ahead points to the token in
a given CFG it doesntmatch the return syntax error.

Rest of the Lab Manuals you may get from the below Attachement that is Free to Download

Lab Manual of the Compiler Design Program of the Computer Science And Engineering of the Anna University


Contact Details
Anna University
Address: Inside Anna University, Opp to Gandhi Mandapam, Sardar Patel Rd, Guindy, Anna University, Kotturpuram, Chennai, Tamil Nadu 600025


Quick Reply
Your Username: Click here to log in

Message:
Options

Thread Tools Search this Thread



All times are GMT +5. The time now is 11:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
SEO by vBSEO 3.6.0 PL2

1 2 3 4