Design and implement a pushdown automaton that accepts the language of all arithmetic expressions in a programming language that are syntactically correct
$10-30 USD
Закрито
Опублікований about 8 years ago
$10-30 USD
Оплачується при отриманні
Design and implement a pushdown automaton that accepts the language of all arithmetic
expressions in a programming language that are syntactically correct. An arithmetic expression is
syntactically correct if and only if it is generated by the context-free grammar below.
G = (V,T,S,P), where
V = { <expr>, <term>, <factor>, <id> }
T = { x, y, z, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, +, -, *, / , (, ) }
<expr> is S, the start symbol
P:
<expr> <expr> + <term> | <expr> - <term> | <term>
<term> <term> * <factor> | <term> / <factor> | <factor>
<factor> <id> | (<expr>)
<id> x | y | z | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
.
1. This is a two-team student assignment.
2. Programming languages you can choose from: C, C++, Java. Your programs must run on
empress.
3. For input: expressions such as:
( x * y / ( 3 + z)),
3 + 4 * 5,
x * x * x
Your program must display:
“Expression is syntactically correct”
For input expressions such as:
Z )(3 ** y
f * x )
/ 5 y
((( z + 3 – x))
Your program must display:
“Expression is not an arithmetic expression”
4. You can prompt the user to input an expression or you can prompt the user to type the
name of a file. If you do the latter name your file expressions.txt.
Hello,
Before you select a part time developer from here, take a look at fugacode.com. If you like what you see, contact us. That's all.
"Why hire freelancers? when you can hire professional developers for the same cost"
Regards,
FUGACODE Team
I am familiar with context-free grammars/pushdown automata and theory of computation in general. This will be a quick and easy project for me. I can deliver well-designed and thoroughly documented code.
Hi,
I have 4+ years of experience in IT industry as C,C++,JAVA,PERL and Python developer. But I am new to freelancer. I have very good knowledge in Theory of computing\Automata. I can assure you that I will finish the work on time. Thank you.