Find Jobs
Hire Freelancers

lexical analyser

$30-250 USD

Ditutup
Disiarkan sekitar 7 tahun yang lalu

$30-250 USD

Dibayar semasa penghantaran
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. Textbook 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 textbook 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. 
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. 
 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) 
} 

ID Projek: 13709425

Tentang projek

10 cadangan
Projek jarak jauh
Aktif 7 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
10 pekerja bebas membida secara purata $219 USD untuk pekerjaan ini
Avatar Pengguna
Hello. I've just read your job posting and I’m very interested. I'm a certificated freelancer with almost 650 good reviews from clients. I have full skills in Android, IPhone, JAVA, C++ & C & C#, PHP, Qt, ASP.Net, Web scraping. Please check my profile and portfolio. I have to check details of your requirement but I'll try to complete the task as fast as I can. I'd be happy to keep long partnership,if you'd like. Looking forward for your kind answer. Best Regards.
$250 USD dalam 3 hari
4.9 (579 ulasan)
8.7
8.7
Avatar Pengguna
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.
$180 USD dalam 3 hari
4.9 (127 ulasan)
6.9
6.9
Avatar Pengguna
Hello. How are you today. I have read and understood the project. I have strong knowledge in Data structures and Algorithms. And I'm expert in Java ,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.
$350 USD dalam 5 hari
5.0 (137 ulasan)
6.2
6.2
Avatar Pengguna
I, Jignesh Lakhani completed my masters from IIT Roorkee in Computer Engineering. I am having very good knowledge of C, C++, Java, JavaFX, Algorithm and Data Structure. 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
$177 USD dalam 3 hari
5.0 (21 ulasan)
5.6
5.6
Avatar Pengguna
Hello Thank you for taking the time to review our bid! I just checked the description you have provided regarding the project and it would be a pleasure to assist you as well. I am really eager to work on your project with full dedication to give you the best output because I believe in ORIGINAL and QUALITY work since Work is my solo identity. I am highly motivated and professional so can deliver you the work within the desired timeframe Once you agree, I can start at the same time without any delay assuring top quality work. I look forward to hear from you and a long term relationship ahead. Wishing you a great day ahead. Regards, Zain
$124 USD dalam 0 hari
0.0 (0 ulasan)
0.0
0.0

Tentang klien

Bendera SAUDI ARABIA
Riyadh, Saudi Arabia
3.6
2
Kaedah pembayaran disahkan
Ahli sejak Nov 23, 2016

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.