Đang Thực Hiện

Simple Project about Scanner, Parser, Evaluator

Project contains three tasks below;

1. task - SCANNER

Scanner represents the interface between the original program and parser. Its task is to give parser terminal symbols. Its task is also to exclude the empty spaces, new line breaks, and comments.

Scanner reads the input file as a string of characters which are then composed of the terminal symbols. For a description of the symbols used we use finite state automaton, which can be implemented by a two-dimensional table.

Expand the program of arithmetic expressions in such a way that will also support the following operations:

sin | cos | abs | sqr

Given program:

2 + 5 * 2 + cos (0)

Result:

'2' integer (1 , 1)

'+' operator (1 , 3)

'5' integer (1 , 5)

'*' operator (1 , 7)

'2' integer (1 , 9)

'+' operator (1 ,11)

'cos' function(1,13)

'(' separator(1 ,17)

'0' integer (1 ,18)

')' separator(1 ,19)

2. task - PARSER

Parser task is to identify the syntactical correctness given sequence of terminal symbols prf scanner. Write LL(1) parser for the programming language of arithmetic expressions with the following grammar:

E: T = EE;

EE: = EE + T | - T EE | epsilon;

T: F = TT;

TT: = TT * F | / F TT | epsilon;

F: = (E) | cos (E) | sin (E) | abs (E) | sqrt (E) | # float | - # float;

Given program:

2 + 5 * 2

Result:

true (program OK)

3. task - EVALUATOR

Write evaluator for arithmetic expressions. Evaluator task is to evaluate the given arithmetic expression. Parser from previous task has to be upgraded with semantic functions in order to obtain a numerical evaluation of the value of the input stream.

Given program:

2 + 5 * 2

Result:

12

Kỹ năng: Lập trình C++

Xem thêm: string cplusplus, stream programming, simple programming language, scanner programming, programming symbols, programming expression, programming comments, original programming, numerical programming, new programming language, float programming, expression programming, epsilon value, programming string functions, programming operator, cplusplus string, tt, sin, sin cos, simple language, semantic, scanner, integer programming, float, finite

Về Bên Thuê:
( 18 nhận xét ) London, United Kingdom

Mã Dự Án: #1082606

Đã trao cho:

siamsoft061

sir, i have four years experience in C,C++,java. I am ready to work.Thank you

$45 USD trong 1 ngày
(5 Đánh Giá)
3.2

6 freelancer đang chào giá trung bình $50 cho công việc này

dobreiiita

Hi,Please Check your inbox,Thanks.

$60 USD trong 2 ngày
(105 Đánh Giá)
5.8
Algotrade

Please see the PM for more details.

$50 USD trong 1 ngày
(13 Đánh Giá)
4.1
ankulgarg

Hey, please check your PMB.

$40 USD trong 1 ngày
(3 Đánh Giá)
2.5
AmeerHyder

Hello, Sir I have 3 years experience on C++ programming. I understand your requirements. I have solution of your requirements. So you can trust on me for better solution.

$45 USD trong 2 ngày
(0 Đánh Giá)
0.0
VikashThecoder

Hello I can do this PLease see PMB for more details

$60 USD trong 2 ngày
(0 Đánh Giá)
1.0