pcd lab manual

213 views
Skip to first unread message

shruti salunke

unread,
Jul 17, 2012, 11:51:24 AM7/17/12
to be_c...@googlegroups.com
pcd_labmanual.rar

minal patil

unread,
Oct 9, 2012, 1:03:20 AM10/9/12
to be_c...@googlegroups.com

Pimpri Chinchwad College of Engineering

Sector 26, Pradhikaran, Nigdi, Pune – 411 044.


Department of Computer Engineering

Academic Year 2011-12 [Semester I]

Class : B.E. ( Comp. Engg. )

Subject : Computer Laboratory -1

Date: 19-10-2011


  1. a) Write a lex program to read a text file and to calculate no.of characters, no.of words , no of newline characters, no of white spaces in the file b) write a lex program to read a text file and to replace the given word in small case letters with the capital letters


  1. Construct lexical analyzer for subset of 'C' language(5 keywords,5 operators, identifiers, constants and comments). Generate lexeme and token table. Do symbol table management for identifiers.


  1. Write a YACC prog to convert an infix expression to its equivalent postfix expression


  1. Design a calculator using YACC with symbol table management.


  1. Generate three address code for Subset of ‘C’ using quadruples.


  1. Generate the target code for the optimized code for above generated intermediate code using Sethi Ullman algorithm.


  1. Write a lex program to read a text file and to count no.of vowels and consonants.


  1. Write a YACC prog to convert an infix expression to its equivalent prefix expression



  1. Write a lex program to read a text file and to calculate no. of numbers(constants/literals)


  1. Write a lex program to convert all a’ s in small into capital letter when it is followed by ‘b’.


  1. Write a lex program to convert all identifiers in small into capital letter when it is followed by comma.



  1. Write a Lex program to convert floating point numbers into integers.


  1. Generate three address code for assignment statements of ‘C’ programming language using YACC.





Prepared By

Mrs Sonal Gore

Mrs B Mahalaxmi



On Tuesday, July 17, 2012 9:21:24 PM UTC+5:30, shruti salunke wrote:

Reply all
Reply to author
Forward
0 new messages