Find Jobs
Hire Freelancers

Complilers - Lexical analyser and Syntactic parsing

$10-30 USD

Κλειστή
Αναρτήθηκε περίπου 7 χρόνια πριν

$10-30 USD

Πληρωμή κατά την παράδοση
Phase 1: Lexical analyser The user enter a code in Mini C language (described below). The analyser tokenizes the code into tokens according to white spaces and symbols. Each token is assigned to a valid type and line number. The description of types are below. You have to write a regular expression for each type. For assigning a type for a token you can use the following algorithm: Your program should have one GUI interface that have: text box to type a code by the user. Textbox to show the errors if any. 2 buttons one for lexical analyser and the other for syntax parsing. An option to upload a text file. • The lexical analyser reads any code from a textbox or a file (note that multi-spaces are accepted as one space for tokenization) • You should use regular expressions to identify types of the tokens. • Output: Identify the lexical errors with a clear message. • Output: a list of (line number, token, type) should be generated in a text file with all errors exist. • The user can modify the code from the screen and rescan again. Note: This phase concerns on the tokens regardless the syntax structure of the statements. For example: the tokens in a statement (x int =5;) are accepted; but one token is not accepted in (3int x=5;) as 3int is not accepted in all DFA we have. Thus you should report a lexical error with line number. Mini C language: This language is a subset of C language just to practice compiler design process. It contains a set of primitive types (that you have to write a regular expression for each) and other types that will be used in the grammars in the syntax phase. Primitive types: Digit, letter, INT_NUM, FLOAT_NUM, ID, Void STR is a type of string which has numbers/spaces/letters/symbols Token *\ Type: END COMMENT. Token: /* Type: BEGIN COMMENT. Token: if Type: IF. Token: Token: * Type: MULT. Token else Type: ELSE. And so on.. The syntax is similar to C language that has: Control statements (if, loops,…) and nested statements Declarations will be in format (variables: type) all variables must be declared at the beginning of the program or function. Function will be in format (function_name: type(list of parameters){}), recursive call is also accepted Blocks of code will be in format { code } It is not case sensitive (small/capital letters are the same). The project submission requirements: • A report with a brief description of the compiler phases. • Regular expression and types of the programming language • Snapshots of the lexical analyser input and output. • The context free grammars for the syntax using the description and the start symbol will be: Program -> Proram_name srart: Declarations functions body • The code. • A video of how to run the program with correct and incorrect input. Ex: TestProgram start: Var1, Locvar1,age Integer var1:=5 func1: Void (var2 integer) { print ( var2) } Locvar1:=var1+6-2 enter( age) if (4+2 == var1*2) then { print(“good”, age) func1(var1) } Phase 2: Syntactic parsing a) You will use the grammars in phase1 after getting the feedback from the instructor. Using one of the available syntactic parsing tool, you will generate the LALR parsing table. b) Either use a parsing tool component or Implement LR parser using the parsing table generated automatically from (a) to parse the code entered by the user in phase 1. Your parser should tell if there is syntax errors and line number of the error. c) You should integrate the two phases in one program and GUI that has two buttons (lexical parser and syntax parser). Note: if you should to implement a parser you will get 3 marks. The project submission requirements: • The parsing table and which tool is used. • The code of the LR parsing. • A video of how to run the program with correct and incorrect input. • Note the error message should be meaningful with the line number.
Ταυτότητα εργασίας: 13576162

Σχετικά με την εργασία

9 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 7 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
9 freelancers δίνουν μια μέση προσφορά $103 USD για αυτή τη δουλειά
Avatar Χρήστη
Hello I'm interesting your project very well I'm a Good C++, Ruby, OpenCV, Math, Jave, Algorithm expert. I m quite well experienced in these jobs. Let's go ahead with me I want to service for you continously. Thanks
$206 USD σε 4 ημέρες
4,9 (395 αξιολογήσεις)
8,1
8,1
Avatar Χρήστη
Hi, I'm a OS expert experienced C/C++/ObjC developing. I can develop almost kinds of C/C++/ObjC codes for any OS : Windows, Linux, MAC OS X... I can use almost of develop libraries such as QT, MFC, boost... and ant IDE tools that you prefer. I had done several developing tasks related operating systems or applications. I can also develop IPhone/IPad Apps with Corona SDK, Obj C, QT and Swift Please check my profile and contact with me. I think we can discuss more details for our sake. Best regards!
$210 USD σε 3 ημέρες
5,0 (81 αξιολογήσεις)
7,0
7,0
Avatar Χρήστη
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environment. I made many great projects using c++, for example, I made the tools which could convert java codes into c++ scripts, of course garbage collection included, this was very similar to a compiler, and was very complex. I also made our own mobile game using c++, I can show you the demo of client, if you like. I am very proficient in java also. I have a very good review on Freelancer.com, I never miss a project once I accept the job, you can check my review. Trust me, please let expert help you.
$150 USD σε 2 ημέρες
4,9 (77 αξιολογήσεις)
6,7
6,7
Avatar Χρήστη
Hello. How are you. I have read and understood the project. I have strong knowledge in Compiler and Algorithms. And I'm expert in Flex&Bison , ,C/C++,C#, Python ,PHP etc. I'm interested this project. So, firstly I want to discuss with you about this project. Then I'll be happy. I wait for your good reply. Thanks.
$100 USD σε 5 ημέρες
5,0 (79 αξιολογήσεις)
5,8
5,8
Avatar Χρήστη
I, Jignesh Lakhani completed my masters from IIT Roorkee in Computer Engineering. I am having very good knowledge of C, C++, Java, Lex, YACC. I am having strong analytical power. I will complete your project before deadline I am looking forward to discussing with you about this job post. Please feel free to contact me. Respectfully, Jignesh
$77 USD σε 1 ημέρα
5,0 (9 αξιολογήσεις)
4,5
4,5
Avatar Χρήστη
Hi Sir ,, I can make your compiler in c , i read full description and understand all your project what you exactly need , i can make it in less budget and give you best solution of compiler thank you
$25 USD σε 2 ημέρες
5,0 (6 αξιολογήσεις)
3,6
3,6

Σχετικά με τον πελάτη

Σημαία της SAUDI ARABIA
Riyadh, Saudi Arabia
5,0
3
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Μαΐ 15, 2016

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.