0% found this document useful (0 votes)
369 views1 page

Compiler Construction Asig

This document contains 5 questions regarding compiler construction and languages like Pascal, C, Ada, and Lisp. Question 1 asks about the input alphabets of each language. Question 2 asks about conventions for blanks in each language. Question 3 asks to identify lexemes and tokens in a code sample. Question 4 asks to write regular definitions for 4 language samples. Question 5 asks for lexical forms/patterns for numeric constants, identifiers, and keywords in C.

Uploaded by

Adeel Durrani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
369 views1 page

Compiler Construction Asig

This document contains 5 questions regarding compiler construction and languages like Pascal, C, Ada, and Lisp. Question 1 asks about the input alphabets of each language. Question 2 asks about conventions for blanks in each language. Question 3 asks to identify lexemes and tokens in a code sample. Question 4 asks to write regular definitions for 4 language samples. Question 5 asks for lexical forms/patterns for numeric constants, identifiers, and keywords in C.

Uploaded by

Adeel Durrani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Compiler Construction

ASSIGNMENT#02
Question#01: What is the Input alphabet of each of the following Languages?
1.
2.
3.
4.

Pascal
C
Ada
LISP

Question#02: What are the conventions regarding the use of blanks in each of the Languages
in Question#01?

Question#03: Identify the Lexemes that make up the tokens in the following programs. Give
reasonable attribute values for the tokens.

a) int max ( i , j ) int i , j;


/* return maximum of integers I and j */
{
return i > j ? i : j ;
}

Question#04: Write regular definitions for the following languages.


a)
b)
c)
d)

All strings of letters that contain the five vowels in order.


All strings of letters in which the letters are in ascending lexicographic order.
All strings of digits with at most no repeated digit.
All strings of digits with at most one repeated digit.

Question#05: Specify the Lexical form regular expression/ pattern) of


1. Numeric Constant in C language.
2. Identifiers in C Language
3. Keywords in C language

You might also like