Find Jobs
Hire Freelancers

Compiler Design Project -- 2

$10-30 USD

Closed
Posted about 3 years ago

$10-30 USD

Paid on delivery
Consider the following extended BNF grammar for a subset of the Python programming language ([login to view URL]), called TinyPython. program ::= from typing import List { function-def } main-def main-def ::= def main ( ) : block function-def ::= def function-identifier ( [ param { , param } ] ) -> type-expression : [block] return expression param ::= variable-identifier : type-expression type-expression ::= bool | int | List [ type-expression ] block ::= statement { statement } statement ::= compound-stmt | simple-stmt simple-stmt ::= assignment | print ( expression ) | pass assignment ::= variable-identifier = array-definition | variable = int ( input ( ) ) | variable = expression array-definition ::= dimension-definition | [ array-definition for in dimension-definition ] dimension-definition ::= [ integer ] ∗ integer compound-stmt ::= if expression : nested-block ; [else : nested-block ;] | while expression : nested-block ; nested-block ::= [block] simple-stmt expression ::= conjunction { or conjunction } conjunction ::= inversion { and inversion } inversion ::= comparison | not inversion comparison ::= sum comp-operator sum comp-operator ::= < | > | == | >= | <= | ! = sum ::= term { add-operator term } add-operator ::= + | − term ::= factor { mult-operator factor } mult-operator ::= ∗ | // factor ::= [add-operator] primary primary ::= variable | True | False | integer | ( expression ) | function-identifier ( [ expression { , expression } ] ) variable ::= variable-identifier { [ sum ] } Syntactic and Semantic Conventions The keywords and the token symbols in TinyPython are in bold. Note that TinyPython has symbols [, and ] which are distinguished from grammar metasymbols [, and ], respectively, by underlining. Assume that an id can only contain letters (only alphabetic characters), digits, and underscores ( ) with the restrictions that it must begin with a letter, cannot end with an underscore and cannot have two consecutive underscores. For example, give 2 Joe, tell me and A45Asm3 are valid identifiers, but 6gh, two bad, and no end are not. integer is an unsigned integer. function-identifiers and variable-identifiers are the same lexical/syntactic items as identifiers but have the semantics given by the appropriate qualifier. Comments are preceded by # and are terminated by the end of the line. Your program is as follows: 1. Determine the set of tokens which a lexical analyzer would need to recognize. 2. Design and implement a lexical analyzer procedure to read a source program in the above language and print the next token in the input stream. If the token detected is a valueless token, such as a keyword, then it is sufficient to print only the keyword. If it has a value, then both the token type and lexeme should be printed. 3. You will be given several TinyPython programs with which to test your lexical analyzer. These will be located on the class WWW page and will be of the form [login to view URL], [login to view URL], etc. Run your lexical analyzer on each test program. Suggestion: Use the lex, flex, or JFlex tool to automatically construct a lexical analyzer for TinyPython from a set of regular expressions specifying tokens.
Project ID: 29712989

About the project

4 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
4 freelancers are bidding on average $30 USD for this job
User Avatar
Hi There...! Note : I give you 25% off on my all services. So grabs this special limited discount offer. Let’s get to the Project. I came to know that your Looking a developer which have rich knowledge about website development .you need .complier desiger project According to your post description, you need the job done very quickly with an affordable budget. Your requirements are fully clear to me and I am applying only because I meet all the requirements that you are looking for. I have been working as a full stack web developer for more than 10 years and I know all the ins and outs of web development and customization Project should be 100% correct and Complete that will be my first guarantee service in this project. Moreover, I will be available for you for any kind of future edits and customizations. Sometimes my ten years back clients search for me till now only because of my excellent service. I am mostly in love with communication. I like to be in touch with my clients 24/7 so that they can catch me at any time when they need me. I am looking for the clear final requirements docs of your project so that I can start working immediately. If you need to discuss with me for any kind of suggestions or information, please knock me anytime. I am looking forward to hearing from you. Thanks Zohaib jamil
$10 USD in 1 day
4.9 (37 reviews)
5.9
5.9
User Avatar
Hello, I am Manan from Armenia Yerevan. I read your description in detail. I have experiences at web security and can help you. I am very excited on your project, and I am ready to start work immediately. I have skills: C language and C++ language I am very experienced, have good skills, and also have much availability to work at anytime. I wish to work for you, please open chat with me. Thank you. I want to work with you for a long time
$80 USD in 7 days
5.0 (11 reviews)
4.4
4.4
User Avatar
Hi. Nice to meet you. I have read about your requirements in details. I have 10+ years of experience about C Programming, Java, Python and C++ Programming. I want to discuss with you in chart. Thank you.
$10 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Hyderabad, United States
5.0
5
Payment method verified
Member since Oct 19, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.