Convert the following grammar into LL(1) grammar then write a Java -- 3

ปิด โพสต์แล้ว 4 ปีที่ผ่านมา ชำระเงินเมื่อจัดส่ง
ปิด ชำระเงินเมื่อจัดส่ง

Convert the following grammar into LL(1) grammar then write a Java or C++ program that uses the

LL(1) method to decide whether a given string can be derived in the grammar. If the sentence is

derivable, your program should output the derivation of the sentence.

program → data_decls func_list

func_list → ɛ | func func_list

func → func_decl ; | func_decl { data_decls statements }

func_decl → type_name ID ( parameter_list )

type_name → int | void | decimal

parameter_list → ɛ | void | non-empty_list

non-empty_list → type_name ID | non-empty_list , type_name ID

data_decls → ɛ | type_name id_list ; data_decls

id_list → id | id_list , id

id → ID | ID [ expression ]

block_statements → { statements }

statements → ɛ | statement statements

statement → assignment | func_call | return_statement

assignment → id = expression ;

func_call → ID ( expr_list ) ;

expr_list → ɛ | non-empty_expr_list

non-empty_expr_list → expression | non-empty_expr_list , expression

return_statement → return expression ; | return ;

expression → term | expression addop term

addop → + | -

term → factor | term mulop factor

mulop → * | /

factor → ID | ID [ expression ] | ID ( expr_list ) | NUMBER | ( expression )

Java Computer Science

หมายเลขโปรเจค: #24683281

เกี่ยวกับโปรเจกต์

4 ข้อเสนอ โปรเจกต์ระยะไกล ใช้งาน %project.latestActivity_relativeTime|แทนที่%

freelancer 4 คน กำลังเสนอราคาในงานนี้ โดยมีราคาเฉลี่ยอยู่ที่ $26

dhirendrasaw9598

Hello I am full stack java developer i have 2 year working experience in java. i think i will help you to develop your requirements in java. if you are interested then please let me know.

$30 USD ใน 3 วัน
(0 รีวิว)
0.0
TsukiZombina

I've got experience developing LL1 parsers for C-like languages. I would develop this project in C++ language.

$30 USD ใน 5 วัน
(0 รีวิว)
0.0
khwbilal93

I am a computer scientist and teacher by profession . have been teaching compiler construction from past 1 year i can do your task.

$30 USD ใน 5 วัน
(0 รีวิว)
0.0
vinnytry

I am an MSc Theoretical Computer science graduate Relevant Skills and Experience I know basic java programming

$15 USD ใน 7 วัน
(0 รีวิว)
0.0