日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲AV成人精品日韩一区18p

代寫CSE 465/565 解析器 interpreter

時間:2024-03-01  來源:  作者: 我要糾錯


CSE 465/565

Homework #1: 55 points

Outcomes:

● Warming up by writing a java code

● Understand how an interpreter works

● Understand some of the difficulties involved in designing a new programming language.

Scoring:

●   (10 pts) Successful upload on GIT. If your code is submitted on GIT successfully, the following aspects of your program will be graded

● (45 pts) Write an interpreter (Java or C++) to execute Z+-  programs

○ (10 pts) Basic structure, integer variables only

○ (10 pts) Basic structure, integer and string variables

○ (10 pts for Graduate students-20 pts for Undergraduate students) For loops

○ (10 pts) Nested for loops (only for graduate students)

○ (5 pts) Detection of runtime errors

Requirements:

● Java version 17 or older. If you haven’t installed java before on your laptop, download JDK

from here: https://www.oracle.com/java/technologies/downloads/ .You can install the latest  version which is JDK21 (if you already don’t have any java version 17 or older on your laptop), reset your computer, and it should be done.

●   Although you can use any IDE of your choice, Eclipse is recommended. Follow the instructions for installing and configuring Eclipse here: Install and Configure Eclipse

●   You must name your main class Zpm. You can create additional classes as needed, but the Zpm class should be the one containing the main method.

●   Your program must take a Z+- code as a file with .zpm extensions through the command line    argument. which means your program must run on a terminal (windows terminal or CMD on   windows, and terminal on mac) using the standard compile command. Naming the main class Zpm, and assuming prog.zpm is a file with Z+- codes in it:

javac *.java

java Zpm prog.zpm

●   So, your program does not prompt the user to enter a file or anything like that. Instead, it receives a file as an argument when the program is run through the terminal (as shown above), not during compilation.

Instructions:

(55 points) Consider a very simple programming language named Z+-. The Z+-  programming language has the following features:

1.   Call your project on GitLab/GitHub Homework1. This folder/package should be saved inside your “CSE465_565” project on your GIT.

2.   Z+- variables are case-sensitive and consist of one letter [A-Z]. No numbers, no special characters.

3.   Z+- variables can store a string or integer value. A single variable can switch between integer and string values during program execution. Assigning a value to a variable creates that variable for future use.

4.   A runtime error occurs if a variable is used before it is given a value.

5.   The PRINT statement displays a particular variable’s value. This is done as:

PRINT numCookies ;

6.   The right-hand side of a simple assignment statement (i.e., =) is either a variable name (which must have a value), signed integer, or string literal. For example, the following are valid:

A = 12 ;

A = B ;   (B must have values)

A = "hello" ;

7.   There are three compound assignment statements: +=, *=,and -=.  The meaning of these operators depends on the data type of the left and right hand side of the operator.

+=   concat right string onto end of left string

+= increment left integer with value on right

*= multiply left integer by value on right

-= subtract right integer from value on left

A += 34 ;

A *= B ;   (B must have values)

A += "hello world" ;   (Assuming A is already holding a

String value)

All other combinations are illegal and cause a runtime error.

8.    Every statement is terminated by a semi-colon.

9.   There is a loop statement – FOR - whose body contains at least one simple statement (i.e., no nested loops), which are presented on one line. The keyword FOR is followed by an integer constant, which indicates the number of times to execute the loop. Following this number is a sequence of statements defining the loop's body, followed by the word ENDFOR.

FOR 5 B += A ; A *= 2 ; ENDFOR

10. Graduate Students: Graduate students should also make the Z+- language to work with nested loops:

FOR 5 B += A ; A *= 2 ; FOR 10 A += B ; ENDFOR ENDFOR

this could be more than one loop inside another one.

11. Z+- programs must have at least one space separating all elements.

12. You also need to throw an exception if the given file is not a .zpm file or no file is given.

13. A general rule: Any line that ends with a value (e.g., "hello", 3434) or a variable (e.g., A) should conclude with a semicolon. Therefore, assignment statements and print statements must end   with a semicolon. However, for loops should conclude with 'ENDFOR'.

Sample Run:

1.   Here is an example Z+- program:

A = 1 ;

B = 0 ;

FOR 5 B += A ; A *= 2 ; ENDFOR

A += 1000 ;

PRINT A ;

PRINT B ;

This program's output is (pay attention that there is no space in between):

A=1032

B=31

2.   Here is a second Z+- program:

A = 10 ;

A += A ;

PRINT A ;

A = "hello" ;

A += A ;

PRINT A ;

A += 123 ;

PRINT A ;

The output to this second program would be (pay attention that there is no space in between):

A=20

A=hellohello

RUNTIME ERROR: line 7

You may assume that the programs are syntactically correct but may have runtime errors (e.g., add integer and string, or doing operator on a variable that hasn't been initialized).

When an error happens, your program should print the runtime error, and stop the program.

Test your program:

Come up with Z+- codes similar to the ones shown above, and test your program comprehensively.
請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:代寫CS444 Linear classifiers
  • 下一篇:代做代寫COMPSCI 4091 Advanced Networked Systems
  • 無相關信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗證碼平臺 理財 WPS下載

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲AV成人精品日韩一区18p

              9000px;">

                        亚洲精品视频自拍| 亚洲伊人色欲综合网| 欧美区一区二区三区| 成人av电影在线播放| 美女一区二区视频| 日产国产高清一区二区三区| 天堂va蜜桃一区二区三区| 亚洲国产综合91精品麻豆| 一区二区三区四区五区视频在线观看 | 欧美日韩视频在线第一区 | 寂寞少妇一区二区三区| 日韩电影一区二区三区四区| 午夜亚洲国产au精品一区二区| 自拍视频在线观看一区二区| 国产人久久人人人人爽| 国产精品素人视频| 久久九九99视频| 中文字幕第一区综合| 国产精品欧美久久久久无广告 | 欧美色偷偷大香| 欧美精品vⅰdeose4hd| 欧美一区二区视频在线观看2020| 精品国精品自拍自在线| 精品欧美久久久| 国产精品美女久久福利网站| 亚洲黄色在线视频| 午夜精品久久久久久久99水蜜桃 | 一道本成人在线| 欧美性受极品xxxx喷水| 欧美一级日韩免费不卡| 久久久久综合网| 亚洲欧洲一区二区在线播放| 舔着乳尖日韩一区| 国产一区二区毛片| 在线一区二区三区四区| 欧美一区二区三区小说| 国产欧美日韩综合精品一区二区| 亚洲资源中文字幕| 精品无人码麻豆乱码1区2区| 91蜜桃网址入口| 欧美成人女星排行榜| 国产精品国产成人国产三级| 天堂va蜜桃一区二区三区漫画版| 国产成人鲁色资源国产91色综| 欧美专区亚洲专区| 久久色在线视频| 亚洲精品一二三四区| 韩国三级电影一区二区| 欧洲一区二区三区在线| 久久亚洲私人国产精品va媚药| 亚洲最大的成人av| 国产盗摄女厕一区二区三区| 欧美丰满嫩嫩电影| 国产精品蜜臀在线观看| 黄色资源网久久资源365| 在线亚洲人成电影网站色www| 久久天天做天天爱综合色| 午夜久久久久久久久久一区二区| 成人深夜福利app| 欧美变态口味重另类| 亚洲成人动漫在线免费观看| 成人午夜又粗又硬又大| 日韩一区二区三区在线| 亚洲高清免费在线| 色婷婷综合久久久中文字幕| 久久日一线二线三线suv| 视频一区视频二区在线观看| 在线观看视频91| 亚洲欧美综合色| 粗大黑人巨茎大战欧美成人| 精品国产一区二区三区四区四| 亚洲va欧美va国产va天堂影院| 91亚洲国产成人精品一区二三| 久久久久国产精品麻豆ai换脸| 免费看日韩精品| 在线播放中文一区| 亚洲成av人片一区二区三区| 在线视频你懂得一区二区三区| 中文字幕精品一区| 成人性生交大片免费看在线播放| 国产无人区一区二区三区| 国产一区二区三区久久悠悠色av| 精品欧美乱码久久久久久| 久久91精品久久久久久秒播| 日韩一区国产二区欧美三区| 人人超碰91尤物精品国产| 欧美日韩夫妻久久| 天天色天天爱天天射综合| 欧美高清视频不卡网| 麻豆精品蜜桃视频网站| 日韩三级免费观看| 国产在线播放一区三区四| 久久精品视频在线免费观看| 国产精品综合二区| 亚洲欧洲美洲综合色网| 日本大香伊一区二区三区| 午夜精品福利在线| 久久午夜老司机| 99re热视频这里只精品| 夜夜夜精品看看| 777xxx欧美| 高清不卡在线观看av| 亚洲蜜臀av乱码久久精品蜜桃| 在线视频你懂得一区| 久久se精品一区精品二区| 久久久国产午夜精品 | 亚洲一区二区五区| 精品区一区二区| 成人午夜激情影院| 亚洲成人你懂的| 国产亚洲一区字幕| 欧美在线影院一区二区| 久久99久久精品| 亚洲丝袜精品丝袜在线| 69久久99精品久久久久婷婷| 成人免费视频视频| 日韩**一区毛片| 日韩久久一区二区| 日韩女优毛片在线| 色综合久久综合| 国产自产v一区二区三区c| 亚洲激情网站免费观看| 国产欧美日韩三区| 91精品国产全国免费观看| 99久久精品国产观看| 久久99精品久久只有精品| 一区二区欧美在线观看| 国产日产欧美一区| 日韩视频一区二区三区在线播放 | 99r精品视频| 国产乱码精品1区2区3区| 亚洲国产精品久久人人爱| 久久精品视频在线免费观看| 欧美日韩国产一级二级| 91影视在线播放| 国产一区 二区| 视频一区国产视频| 亚洲一区二区视频在线| 中文字幕一区二区三中文字幕| 久久女同性恋中文字幕| 欧美一个色资源| 欧美一区二区福利在线| 欧美日韩精品一二三区| 色综合天天狠狠| 99在线精品一区二区三区| 国产一区二区精品在线观看| 精品一区二区在线视频| 美女一区二区视频| 日韩成人免费看| 日韩电影在线观看电影| 视频一区二区三区入口| 日韩不卡一区二区三区| 亚洲国产精品久久久男人的天堂| 亚洲国产精品久久久久婷婷884| 一区二区三区加勒比av| 亚洲欧美日韩在线| 亚洲黄色小视频| 一区二区在线观看av| |精品福利一区二区三区| 中文字幕一区二区三区视频| 国产精品久久久久影院色老大| 国产精品亲子乱子伦xxxx裸| 日本一区二区不卡视频| 国产精品国产自产拍在线| 亚洲色图20p| 香蕉影视欧美成人| 麻豆成人久久精品二区三区红 | 欧美色网站导航| 欧美日韩在线播| 日韩一区二区在线免费观看| 精品久久人人做人人爰| 久久先锋影音av鲁色资源网| 国产精品日韩成人| 亚洲国产你懂的| 精品在线观看视频| 成人晚上爱看视频| 欧美日韩大陆一区二区| 91麻豆精品国产91久久久久| 久久蜜桃一区二区| 亚洲激情综合网| 毛片av中文字幕一区二区| 国产在线精品不卡| 色88888久久久久久影院按摩| 91精品国产综合久久久蜜臀图片| 精品成人免费观看| 中文字幕亚洲区| 午夜精品久久一牛影视| 国产主播一区二区| 色天使色偷偷av一区二区| 日韩久久精品一区| 亚洲老司机在线| 精品一区二区久久| 91在线你懂得| 精品日韩av一区二区| 有坂深雪av一区二区精品| 久草中文综合在线| 欧美丝袜第三区| 欧美高清在线视频| 久久精品国产精品青草| 在线一区二区三区做爰视频网站|