Uploaded by Md. Al Mamun

Compiler design & construction assignment no1 2016-13-24

advertisement
Rangamati Science & Technology University
Department of Computer Science & Engineering
Assignment on:
Designing a language
Course Title: Compiler Design & Construction
Course Code: CSE 4102
Submitted to:
Mr. Md. Mynoddin
Lecturer, Dept. of CSE, RMSTU
Submitted by:
Karimun Nesa Nigar
Reg no: 2016-13-24
Dept. of CSE, RMSTU
Submission date:
18 April, 2022
I was assigned to design a computer programming language. I have
decided to name my own designed language as “Shohoj script”. Here is
the list of identifiers, datatypes, keywords and operators for my own
designed language Compared with C programming language’s
identifiers, datatypes, keywords and operators.
Keywords
jodi - if
nahoy jodi - if else
nahoy - else
ebong - and
hae - ==
na - !=
loop - loop
cholbe - continue
thamo - break
shunno - null
fungtion - function
return - return
infinity - infinity
index - index
pai - get
Functions
dekhao() – printf()
nao() – input()
prokar() – type()
borgomul() – sqrt()
pai()- get
Datatypes
purnoshonkha - integer
doshomik - float
dirgho doshomik - double float
borno - character
bakyo - string
Operators
+
*
/
shoman - =
choto - <
boro - >
kom - <=
beshi - >=
The rules for naming identifiers are as follows:
Identifier names are unique.
Cannot use a keyword as identifiers.
Identifier has to begin with a letter or underscore (_).
It should not contain white space.
Special characters are not allowed.
Identifiers can consist of only letters, digits, or underscore.
Case sensitive.
Download