日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲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;">

                        欧美日韩午夜在线| 天天综合色天天综合色h| 午夜电影一区二区三区| 亚洲国产精品激情在线观看| 久久精品国产精品亚洲精品| 91精品综合久久久久久| 日韩中文字幕1| 欧美不卡在线视频| 成人久久视频在线观看| 国产精品国模大尺度视频| 一本久久a久久精品亚洲| 亚洲线精品一区二区三区| 这里只有精品电影| 51久久夜色精品国产麻豆| 欧美三级中文字幕在线观看| 91麻豆精品视频| 蜜臀av性久久久久蜜臀aⅴ | 夜色激情一区二区| 欧美日本在线看| 国产成人av影院| 国产精品久久久久一区二区三区| 亚洲国产精品精华液2区45| 国产精品久久精品日日| 亚洲精品五月天| 精品国产1区2区3区| 91小视频免费观看| 欧美在线一区二区| 高清shemale亚洲人妖| 亚洲国产aⅴ天堂久久| 午夜不卡av免费| 精品一区免费av| 一区二区欧美国产| 日本中文字幕不卡| 一级精品视频在线观看宜春院| 亚洲免费观看高清完整版在线| 日韩欧美一级二级三级| 91亚洲资源网| 欧美日韩高清在线播放| 精品国产91洋老外米糕| 国产精品乱人伦| 久久综合久久综合久久| 91精品国产综合久久小美女| 久久精品一区二区三区四区| 欧美精品丝袜中出| 欧美日韩成人在线| 国产色爱av资源综合区| 亚洲一二三四久久| 亚洲三级免费电影| 亚洲丝袜精品丝袜在线| 麻豆成人91精品二区三区| 国产91精品一区二区麻豆网站| 欧美日韩久久久久久| 国产三级欧美三级| 欧美电影免费提供在线观看| 亚洲三级小视频| 成人永久免费视频| 欧美久久久影院| 亚洲欧洲综合另类| 成人综合在线网站| 日韩午夜精品视频| 久久久电影一区二区三区| 国产亚洲精品超碰| 热久久久久久久| 精品一区二区三区免费播放| 色婷婷久久久久swag精品| 亚洲国产精品成人综合色在线婷婷| 亚洲大尺度视频在线观看| 日韩国产欧美在线播放| 91免费视频大全| 中文字幕久久午夜不卡| 国产一区二区三区四区在线观看| 国产麻豆视频一区| 亚洲精品一区二区在线观看| 美国精品在线观看| 欧美一级夜夜爽| 欧美激情综合五月色丁香小说| 久久99精品国产麻豆婷婷| 欧美一区二区三区的| 日韩激情视频在线观看| 欧美精品第1页| 亚洲网友自拍偷拍| 欧美日韩精品一区二区| 丝袜国产日韩另类美女| 777午夜精品免费视频| 日本在线播放一区二区三区| 51午夜精品国产| 国产最新精品精品你懂的| 色狠狠一区二区三区香蕉| 欧美一区二区不卡视频| 久久精品久久99精品久久| 91精品免费在线观看| 老司机午夜精品99久久| 欧美一区二区大片| 国产成人免费视频一区| 国产精品久久久久久妇女6080 | 91捆绑美女网站| 亚洲成人1区2区| 欧美一区二区福利视频| 国产精品小仙女| 欧美日韩精品一区二区三区四区| 亚洲成人黄色影院| 精品sm捆绑视频| 99天天综合性| 久久久久久久综合日本| 99re66热这里只有精品3直播| 日韩你懂的在线播放| 国产精品白丝jk黑袜喷水| 中文字幕不卡的av| 欧美体内she精视频| 日韩毛片精品高清免费| 欧美美女一区二区三区| 国产精品77777| 一区二区在线看| 精品久久久久久久久久久院品网| 国产盗摄精品一区二区三区在线 | 欧美日韩国产经典色站一区二区三区| 美女网站视频久久| 亚洲色图一区二区| 日韩小视频在线观看专区| gogogo免费视频观看亚洲一| 亚洲成人自拍网| 中文字幕不卡一区| 日韩西西人体444www| 97久久超碰国产精品| 美女视频黄久久| 一区二区三区欧美亚洲| 久久精品人人做人人爽人人| 欧美日韩一级大片网址| 99这里只有精品| 国产精一区二区三区| 日本免费在线视频不卡一不卡二| 亚洲欧洲精品成人久久奇米网| 国产丶欧美丶日本不卡视频| 日韩成人一级大片| 亚洲欧美激情在线| 欧美极品xxx| 久久久精品影视| 日韩欧美亚洲另类制服综合在线| 色婷婷精品大视频在线蜜桃视频| 国产suv精品一区二区6| 久久se这里有精品| 午夜视频一区在线观看| 亚洲人精品午夜| 最新成人av在线| 国产精品久久久久久妇女6080| 精品粉嫩超白一线天av| 91精品国模一区二区三区| 在线免费一区三区| 91高清视频免费看| 色噜噜狠狠色综合欧洲selulu| k8久久久一区二区三区| 国产不卡一区视频| 国产精品一二三区| 国产不卡视频在线观看| 国产乱一区二区| 国产二区国产一区在线观看| 激情综合五月婷婷| 精品一区二区三区免费| 国产精品资源网| 国产69精品久久777的优势| 国产福利91精品| 99国产精品99久久久久久| 色一情一伦一子一伦一区| 99视频精品在线| 91老师片黄在线观看| 欧美色图天堂网| 日韩区在线观看| 国产欧美日韩亚州综合 | 欧美日韩免费观看一区二区三区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 91福利在线看| 91精品国产一区二区三区蜜臀| 欧美丰满一区二区免费视频| 精品卡一卡二卡三卡四在线| 精品国产凹凸成av人导航| 欧美国产精品专区| 亚洲自拍偷拍图区| 久久精品二区亚洲w码| 粉嫩久久99精品久久久久久夜| 99国内精品久久| 欧美丰满一区二区免费视频| 国产日韩影视精品| 亚洲欧美国产77777| 日韩精品一二三| 国产精品影视天天线| 在线免费一区三区| 久久亚洲春色中文字幕久久久| 综合av第一页| 韩国三级在线一区| 在线一区二区视频| 2023国产精华国产精品| 最新热久久免费视频| 日本午夜一区二区| 91一区二区在线| 久久久噜噜噜久久中文字幕色伊伊| 亚洲天堂av一区| 国产成人av电影在线播放| 欧美少妇一区二区| 国产精品嫩草99a| 免费看欧美女人艹b|