Find Jobs
Hire Freelancers

Compiler Design Project -- 2

$10-30 USD

Chiuso
Pubblicato circa 3 anni fa

$10-30 USD

Pagato al completamento
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.
Rif. progetto: 29712989

Info sul progetto

4 proposte
Progetto a distanza
Attivo 3 anni fa

Hai voglia di guadagnare un po'?

I vantaggi delle offerte su Freelancer

Imposta il tuo budget e le scadenze
Fatti pagare per il lavoro svolto
Delinea la tua proposta
La registrazione e le offerte sui lavori sono gratuite
4 freelance hanno fatto un'offerta media di $30 USD
Avatar dell'utente
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 giorno
4,9 (37 valutazioni)
5,9
5,9
Avatar dell'utente
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 giorni
5,0 (11 valutazioni)
4,4
4,4
Avatar dell'utente
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 giorno
0,0 (0 valutazioni)
0,0
0,0

Info sul cliente

Bandiera: UNITED STATES
Hyderabad, United States
5,0
5
Metodo di pagamento verificato
Membro dal ott 19, 2020

Verifica del cliente

Grazie! Ti abbiamo inviato tramite email il link per richiedere il tuo bonus gratuito.
Non è stato possibile inviarti l'email. Riprova per piacere.
di utenti registrati di lavori pubblicati
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Caricamento anteprima
Autorizzazione per la geolocalizzazione concessa.
La tua sessione è scaduta ed è stato effettuato il log out. Accedi nuovamente per piacere.