免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300

代寫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

    免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300
    欧美日韩一区二区三区在线看| 黄一区二区三区| 欧美人妇做爰xxxⅹ性高电影| 一区二区免费在线| 久久精品av麻豆的观看方式| 777a∨成人精品桃花网| 青娱乐精品视频在线| 欧美成人video| 国产成人午夜精品影院观看视频| 国产亚洲精品中文字幕| 成人黄色777网| 亚洲精品五月天| 欧美日本在线观看| 精品影视av免费| 国产精品视频在线看| 91麻豆福利精品推荐| 在线亚洲免费视频| 视频一区免费在线观看| 精品国产制服丝袜高跟| 成人av集中营| 亚洲国产精品久久人人爱| 日韩一区二区中文字幕| 国产精品1区2区3区| 亚洲猫色日本管| 日韩一区和二区| 粉嫩aⅴ一区二区三区四区五区| 亚洲视频在线观看一区| 在线播放国产精品二区一二区四区| 蜜臀久久99精品久久久画质超高清 | 久久综合九色综合97婷婷| 波多野结衣中文字幕一区二区三区| 一区二区三区日韩| 精品国产亚洲在线| 91色综合久久久久婷婷| 日本一道高清亚洲日美韩| 久久久一区二区三区| 91久久精品国产91性色tv| 日韩激情av在线| 国产精品女人毛片| 欧美日韩成人综合| 福利一区二区在线观看| 亚洲1区2区3区4区| 亚洲国产精品二十页| 欧美精品在线视频| 成人中文字幕合集| 日韩在线a电影| 中文字幕一区二区三区乱码在线| 欧美二区三区91| 成人小视频在线观看| 天天色综合成人网| 国产精品久久久久久福利一牛影视 | 国产盗摄一区二区| 亚洲福利国产精品| 欧美国产一区视频在线观看| 欧美日韩第一区日日骚| 粉嫩嫩av羞羞动漫久久久| 日本中文字幕一区| 亚洲三级在线观看| 久久久久久久久久久久久久久99 | 一区二区三区欧美视频| 久久品道一品道久久精品| 欧美视频自拍偷拍| 成人永久aaa| 美女视频网站黄色亚洲| 依依成人精品视频| 国产清纯白嫩初高生在线观看91| 欧美日韩大陆在线| 91原创在线视频| 国产精品99久久久久| 日韩高清在线不卡| 一区二区三区四区亚洲| 国产欧美一区二区三区沐欲| 在线播放日韩导航| 在线精品亚洲一区二区不卡| 国产成人精品免费看| 美女一区二区在线观看| 一区二区三区成人| 国产精品久久毛片av大全日韩| 国产aⅴ综合色| 美女视频网站久久| 午夜视黄欧洲亚洲| 一区二区三区精密机械公司| 欧美激情一区三区| xfplay精品久久| 欧美一级精品大片| 欧美日本乱大交xxxxx| 色天天综合久久久久综合片| 国产a精品视频| 国产一区二区免费视频| 久久福利资源站| 日本欧美一区二区三区| 亚洲国产欧美一区二区三区丁香婷| 国产一区二区精品久久99| 日本不卡高清视频| 日韩精品三区四区| 性做久久久久久免费观看| 一区二区成人在线观看| 亚洲乱码中文字幕| 亚洲女子a中天字幕| 中文字幕一区二区三| 国产精品免费看片| 欧美高清在线一区二区| 国产色爱av资源综合区| 久久精品视频网| 国产亚洲一区字幕| 国产日韩欧美电影| 国产欧美日韩综合| 国产肉丝袜一区二区| 国产午夜精品久久| 久久久久久久久久久久电影| 日韩精品中文字幕一区二区三区 | 激情综合网激情| 国精产品一区一区三区mba视频| 美女一区二区视频| 精品在线观看免费| 国产美女娇喘av呻吟久久| 国产精品一区二区久久不卡 | 精品国产乱码久久久久久老虎| 日韩精品一区二区三区视频在线观看| 91精品国产色综合久久不卡电影| 欧美久久婷婷综合色| 欧美一区二区三区性视频| 日韩一级二级三级| 精品日韩欧美一区二区| 久久久久久9999| 国产欧美日韩麻豆91| 国产精品久久久久久久久快鸭| 一区视频在线播放| 亚洲综合男人的天堂| 午夜激情久久久| 老司机精品视频一区二区三区| 国内精品久久久久影院薰衣草| 国产精品主播直播| a美女胸又www黄视频久久| 色狠狠一区二区三区香蕉| 欧美日韩mp4| 日韩欧美国产不卡| 国产欧美一区二区精品婷婷| 国产精品国产三级国产a| 一区二区三区精品在线| 日韩av一级电影| 国产麻豆精品95视频| 不卡的av在线| 欧美色窝79yyyycom| 国产高清一区日本| 91免费视频网| 91超碰这里只有精品国产| 26uuu成人网一区二区三区| 亚洲欧美在线视频观看| 亚洲午夜激情av| 黑人巨大精品欧美黑白配亚洲| 成人黄色av电影| 欧美日本国产一区| 久久亚洲精华国产精华液 | 不卡的av电影| 欧美男人的天堂一二区| 久久婷婷国产综合国色天香 | 99re这里只有精品首页| 欧美日韩一级二级| 久久日一线二线三线suv| 亚洲三级视频在线观看| 首页欧美精品中文字幕| 国产成人精品亚洲日本在线桃色| 91电影在线观看| 精品国产一区二区亚洲人成毛片| 中文字幕不卡在线| 午夜视频一区在线观看| 国产不卡视频在线观看| 欧美日韩一区二区三区在线| 久久久久久日产精品| 亚洲午夜精品网| 国产精品 欧美精品| 欧美日韩中字一区| 国产视频亚洲色图| 亚洲一区电影777| 国产高清不卡一区二区| 欧美丝袜丝nylons| 欧美国产丝袜视频| 日本怡春院一区二区| 99精品一区二区| 日韩视频一区在线观看| 亚洲色图另类专区| 精品一区二区在线视频| 日本乱码高清不卡字幕| 久久欧美一区二区| 午夜久久福利影院| 99在线精品观看| 精品99一区二区三区| 亚洲国产乱码最新视频 | 亚洲精品一线二线三线| 亚洲国产成人tv| 成人一区二区三区中文字幕| 3d成人h动漫网站入口| 亚洲欧美日韩系列| 国产一区二区三区电影在线观看 | 东方aⅴ免费观看久久av| 欧美一二三区精品| 亚洲国产乱码最新视频| 99久久综合国产精品| 久久看人人爽人人|