Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
LAB REPORT
Regular Expression
Course Code: CSE 331
Course Title: Compiler Design
Submitted By
Umme Habiba
Id:142-15-3677
S...
Problem Statement:
In this lab task, we will work on regular expressions. For simplicity, we will assume that there is a
f...
Input & Output Format:
Here we work with a fixed set of regular expressions and will not consider out of these. Per RE wil...
String:This variable is a character array type variable that is used to store the string that user is
given.
Flag: This is...
These all functions catch the input string parameters. Each function works with their own
algorithm according to the probl...
CorrectnessArguments:
As my algorithm works 100% properly to solve the RE problem and showing the expected
output format r...
Known Bugs:
I didn’t find any kind of bugs in my program.
Comment:
In the compiler, the most important topic is RE and I a...
Nächste SlideShare
Wird geladen in …5
×

von

Compiler lab final report writing Slide 1 Compiler lab final report writing Slide 2 Compiler lab final report writing Slide 3 Compiler lab final report writing Slide 4 Compiler lab final report writing Slide 5 Compiler lab final report writing Slide 6 Compiler lab final report writing Slide 7
Nächste SlideShare
What to Upload to SlideShare
Weiter
Herunterladen, um offline zu lesen und im Vollbildmodus anzuzeigen.

2 Gefällt mir

Teilen

Herunterladen, um offline zu lesen

Compiler lab final report writing

Herunterladen, um offline zu lesen

Here i am describing regular expression related problem.

Ähnliche Bücher

Kostenlos mit einer 30-tägigen Testversion von Scribd

Alle anzeigen

Ähnliche Hörbücher

Kostenlos mit einer 30-tägigen Testversion von Scribd

Alle anzeigen

Compiler lab final report writing

  1. 1. LAB REPORT Regular Expression Course Code: CSE 331 Course Title: Compiler Design Submitted By Umme Habiba Id:142-15-3677 Section -B Submitted To Mr. Seraj Al Mahmud Mostafa Senior Lecturer Dept. Of Computer Science and Engineering Daffodil International University Submission Date: 17/04/2017
  2. 2. Problem Statement: In this lab task, we will work on regular expressions. For simplicity, we will assume that there is a fixed set of regular expressions. We will not consider out of these. But we must not use any built-in method or package in our implementation .The selected Regular Expressions are: 1. a(bc)*de 2. a(bc)+de 3. a(bc)?de 4. [a-m]* 5. [^aeiou] 6. [^aeiou]{6} Here, '*' means occurrence of zero of more characters, '+' indicates happening of one or more characters, '?' means only once or not at all occurrence, '[ ]' indicates happening of inclusive characters, '^' indicates that next characters will not be used in the pattern, '[a-d]{3}' indicates that valid string will be exactly of length 3 inclusively using a, b, c, d. The program has to show “Accepted” if a given string is supported by a RE, otherwise, it will show “Not Accepted”.
  3. 3. Input & Output Format: Here we work with a fixed set of regular expressions and will not consider out of these. Per RE will generate an individual answer and the given format is like that…. When we run our program, command prompt tells how many string we want to input and after input the 1st string it shows the individual output of the RE. The Input-Output format of our program is like… Variable Description: In our whole program we use some variables.The most important variables that used in our program are string,flag,flag2,flag3,I and n.
  4. 4. String:This variable is a character array type variable that is used to store the string that user is given. Flag: This is a integer type variable. It helps our program to give output easier and accts as a status. Others: Here we also use some integer type variable and they helps for looping and keeping number. These are i,n. Algorithm Description: Algorithm that is used In our program to solve the problem more easier is given below: Algorithm: 1. Number input 2. For: Take input till number 3. String  input 4. For : Take string till null character 5. Check if the characters exists 6. If: exists 7. Print : Accepted 8. Else: 9. Print : Not Accepted 10. Return. The program starts with taking the string as input. Then, the program calls 6 function individually. The functions are: 1. zero_or_more(string) 2. one_or_more(string) 3. once_or_notAtAll(string) 4. character_class(string) 5. negationOf_character_class(string) 6.exactly_N_times(string)
  5. 5. These all functions catch the input string parameters. Each function works with their own algorithm according to the problem domain to justify the input string is valid or not. Structure Diagram: Here we show a structure diagram as well as flow chart of our project is: Start Input a number,n (i=0) i Call the functions yesNot Accepted Satisfy RE?? Input a string i<n End i++ yesno i++
  6. 6. CorrectnessArguments: As my algorithm works 100% properly to solve the RE problem and showing the expected output format result for the requirement, I honestly and truly can claim about it.There are some reasons why I claim about it- 1.Here in testing description section, I shall show the proof of my work that it can show output properly. 2.It shows the exact output what is wanted to show. 3.As I didn’t find any bug. TestDescription: A few Testing Screenshots of command prompt is shown in below:
  7. 7. Known Bugs: I didn’t find any kind of bugs in my program. Comment: In the compiler, the most important topic is RE and I am happy for completing my final lab project according with this topic.I enjoy my code as some portion make me thoughtful. Contribution: As I complete the given project myself, there is no contribution of any partner.
  • JasmineMurphy16

    Nov. 29, 2021
  • NitishKumar1293

    Nov. 18, 2020

Here i am describing regular expression related problem.

Aufrufe

Aufrufe insgesamt

1.811

Auf Slideshare

0

Aus Einbettungen

0

Anzahl der Einbettungen

9

Befehle

Downloads

24

Geteilt

0

Kommentare

0

Likes

2

×