Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
59 views3 pages

Compiler Design: Lab Record of

The document is a lab record submitted by student Shubham Raj Laxmi (170110044) for the course Compiler Design (CS 304). It contains 11 experiments conducted on compiler design topics like lexical analysis, parsing, and grammar. The record includes the objective, code, and signature of the faculty member for each experiment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views3 pages

Compiler Design: Lab Record of

The document is a lab record submitted by student Shubham Raj Laxmi (170110044) for the course Compiler Design (CS 304). It contains 11 experiments conducted on compiler design topics like lexical analysis, parsing, and grammar. The record includes the objective, code, and signature of the faculty member for each experiment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Lab Record

of

COMPILER
DESIGN
(CS 304)

Submitted to: Submitted by:


Ms. Aditi Sharma Shubham Raj Laxmi
Assistant Professor 170110044
School of Computing-CSE CSE-CCV

D.I.T. University 3rd(6th sem)

Session 2019-20
INDEX

S.No Title of Experiment/Objective Date of Signature


Conduction of Faculty
1 Write a program in C to count number of spaces in a line.

2 Write a program in C to count number of characters, spaces, and


digits in a line.

3 Write a C program to identify whether a given line is a comment


or not.

4 Write a C program to recognize strings under 'a*' , 'abb', and


a*b+.

5 Write a C program to test whether a given identifier is valid or


not – l(l+d)$*.

6 Write a C program to test whether a given operator is valid or


not.

7 Write a program in Lex to print whether the word is a collection


of lowercase or upper case or mix

8 Write a program using Lex to print any arithmetic expression in


the form of tokens

9 Write a program in Lex to identify whether letter is consonant


or vowel.

10 Write a program in C language to verify, whether an input string


is accepted by the given grammar or not.

S ⇾aSb | ε

11 LEX program to recognizes the keyword (like: if, begin) and


identifier (which isdefined as any string starts with letter and
followed by letter or digit) and alsocount the number of
identifiers, keywords and operators encountered in the input.

Subject Name & Code:- Student Roll No:- 170110044


School of Computing
Department of Computer Science & Engineering
EXPERIMENT 1:

OBECTIVE:
Write a program in C to count number of spaces in a line.
CODE:

Subject Name & Code:- Student Roll No:- 170110044


School of Computing
Department of Computer Science & Engineering

You might also like