Professional Documents
Culture Documents
Compiler Construction Theory Assognment - 1
Compiler Construction Theory Assognment - 1
Compiler Construction Theory Assognment - 1
Campus
Theory Assignment 1
COMPUTER
Department of: SCIENCE
Due
Class/Program: BS(7-A,C,D) Date: 29 Sep 2022 11:59 AM
Subject: Compiler Construction Instructor: Muhammad Nadeem
Note: copying will lead to ZERO
This is hand written assignment.
You are required to write your Name and Registration Number on top of each
paper of your assignment.
You need to submit hard and soft form of assignment. Both must be
submitted in time.
Also Scan assignment using any scanner tool (like CAMSCANNER), create a
pdf , and upload to server (CUONLINE), prior to due time.
No email will be accepted, except the students having registration issue.
Q1. Java Script is a scripting and powerful language for client side
scripting. It has different type of tokens, with unique properties.
Different tokens with associated properties are given below. You need to
write a Regular Expression for each type of token.
if (isPrime) {
console.log(`${number} is a prime number`);
} else {
console.log(`${number} is a not prime number`);
}
}