Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS4308 Project 1 CS 4308 Concepts of Programming Languages Course Project The project for this course is the development of an interpreter of a language

CS4308 Project 1 CS 4308 Concepts of Programming Languages Course Project The project for this course is the development of an interpreter of a language implemented in any of the following programming languages: C/C++, Java, Python, or Ada. Interpreter Project This project consists of developing an interpreter for a minimal form (subset) of the Lua language. This minimal form of Lua has only 1 data type, integer, and the only identifiers are single letters. Lua is not case sensitive. The specification of the grammar is given below. Download Lua http://www.lua.org/download.html Reference Manual http://www.lua.org/manual/5.1/manual.html The interpreter will process a Lua program and build some intermediate data structures. These data structures will then be interpreted to execute the program. All tokens in this language are separated by white space. The parsing algorithm should detect any syntactical or semantic error. The first such error discovered should cause an appropriate error message to be printed, and then the interpreter should terminate. Run-time errors should also be detected with appropriate error messages being printed. Deliverables (see course schedule for due dates): 1. Module_3 1st Deliverable Develop a complete scanner. You must show the execution of this program by using a relevant source line as input, the program must show a list of the tokens in that line. Write a short report describing the work performed. 2. Module_5 2nd Deliverable Develop a complete parser that executes with the scanner. You must show the execution of this program by using a relevant source line as input, the program must show the corresponding statement recognized. Write a short report describing the work performed. 3. Module_7 3rd Deliverable Develop a complete interpreter that executes with the scanner and parser. You must show the CS4308 Project 2 execution of this program by using a relevant source line as input, the program must show the results after executing the statement recognize by the parser. Write a short report describing the work performed. Grammar for the (subset of Lua) language Syntax Analyzer function id ( ) end | | | | | if then else end while do end -> id -> repeat until print ( ) le_operator | lt_operator | ge_operator | gt_operator | eq_operator | ne_operator | | add_operator | sub_operator | mul_operator | div_operator CS4308 Project 3 Lexical Analyzer id letter literal_integer digit literal_integer | digit assignment_operator = le_operator <= lt_operator < ge_operator >= gt_operator > eq_operator = = ne_operator ~= add_operator + sub_operator - mul_operator * div_operator /

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

=+C&B (especially taxation) laws, regulations, and practices?

Answered: 1 week ago

Question

=+designing international assignment C&B packages.

Answered: 1 week ago