Find Jobs
Hire Freelancers

I need to execute the code for a parsed input

$30-250 USD

Terminado
Publicado hace más de 7 años

$30-250 USD

Pagado a la entrega
For this assignment we are expanding on assignment 3. Now that we have parsed input, we will execute the code. As a reminder, the language has the following rules: 1. An empty string is a semantic error. 2. The language contains only two types: a string and an integer. 3. The language contains only two statements: a print statement, and a set statement. 4. PRINT means evaluate the expression and printing the result on standard out. 5. SET means evaluate the expression and save the value in the variable named ID 6. It is an error to use a variable that has not been set. 7. The addition and multiplication operators associate left-to-right. 8. Addition is defined only between two integers or two strings. String addition is concatenation. 9. Multiplication is defined between two integers or between an integer and a string. Multiplying a string by an integer X repeats the string X times. 10. The language includes a subscripting operator which may have one or two expressions inside the square bracket, separated by a semicolon. Both expressions must evaluate to integers, which are used as indexes into the string (starting, of course, from zero). A single expression results in a string containing the single character at that position. Two expressions results in a substring beginning at the first position and ending at the character before the second position. If either of the expressions would access a character that is not in the string, this will be deemed a runtime error. 11. All other combination of types and operations are undefined. For this assignment, after parsing you must perform all semantic checks and execute the program. Please note that some of the checks can be performed statically (an empty string constant is an error, and using a variable before setting it is an error), but some can only be performed at run time. Failing a static check should print an error message and stop execution. Failing a dynamic check should print the string RUNTIME ERROR followed by a description of the error (for example; RUNTIME ERROR types being added are not permitted). Observe that doing this assignment involves evaluating the parse tree, which is a recursive operation. Defining a virtual eval() function, with different implementations in different classes, is a useful approach. It’s also likely that you will need to define some idea of a Type and a Value for this assignment. The eval() function will likely want to return a Value, and will need to test a Type. Your program should read the file whose name is passed as a command line argument, or the standard input if no command line argument is provided. You may divide this assignment into as many files as you like. You MUST use p2lex.h from the last assignment, with no changes. You MUST have your lexical analyzer in a separate file.
ID del proyecto: 12228879

Información sobre el proyecto

10 propuestas
Proyecto remoto
Activo hace 7 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hello Sir/Mam NovaSofts Inc. is the leading IT Company of Islamabad Pakistan. We have 9+ years of experience and strong knowledge about programming languages Java C++ C C# Android So you don't worry about third party client. We are very much experienced and assure you that we’ll provide quality work. The project bid is negotiable and P.M for sample work. Thanks
$220 USD en 5 días
4,8 (272 comentarios)
7,3
7,3
10 freelancers están ofertando un promedio de $157 USD por este trabajo
Avatar del usuario
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on server side, using c++ under linux environment. I used c++ to make many great projects, for example, I made the tools which can convert java files into c++ scripts, of course garbage collection included, this job is very similar to a compiler, and is 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.
$120 USD en 3 días
4,8 (96 comentarios)
6,6
6,6
Avatar del usuario
Hi, I am a qualified programmer with hands on experience in C/C++ and Java. I have deep knowledge of compilers and i have worked on the similar projects before. I can do this job efficiently in short time. Please get back to me so we can discuss it further. Thank you
$180 USD en 5 días
5,0 (14 comentarios)
3,9
3,9
Avatar del usuario
Dear, I have already read your job post in carefully and understood it well. I have good and full experiences on mathematics and algorithm, computation, numerical analysis, digital image processing using C/C++, Matlab for 10+ years and I had worked on many matlab project before. So, I can complete your project within your timeline, finely. Please let me know about your project detail and inform me. I am waiting for your good reply. Thanks and regards, Xie
$222 USD en 3 días
5,0 (5 comentarios)
2,8
2,8
Avatar del usuario
★★★★★ Full 5 mark, Certificated Developer from Freelancer. Dear Employer. I’m an expert mobile programming with more than 4 years working. So, I think you’ll find, I’ve the skills you’re looking for. I’m very much interested in your project with all your requirement. For more on my skill, please have a look on my Profile, Portfolio. My timezone is UTC+8. I’m always available on Freelancer. I’ll be available more than 60 hours per week and able to start your project as soon as possible according to you. I look forward to hearing from you. Thank you for your consideration. Best Regards. Liu
$222 USD en 10 días
4,1 (2 comentarios)
3,0
3,0
Avatar del usuario
Hello, how are you? I hope you have a bright day/evening from your side. I have read the details provided, but please contact me so that we can discuss more on the project. I believe I have the required skills in this case. I will work on your requirements personally since I do not outsource to third parties, this guarantees you high-quality work that is delivered on time. You can also request for revisions till you’re fully satisfied with the work. I believe writing is a passion and not a money making business where people will deliver low-quality work just to get paid. Try my services, and you will never regret. Waiting for your kind response
$147 USD en 3 días
2,8 (5 comentarios)
4,5
4,5
Avatar del usuario
(((((((((((((((( i can help you very low price Chat me now please now )))))))))))))))))) *************************************************************
$30 USD en 1 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
West New York, United States
5,0
2
Forma de pago verificada
Miembro desde nov 29, 2016

Verificación del cliente

Otros trabajos de este cliente

Recursive Programm in QTSpim
$30-250 USD
¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.