亚洲十八**毛片_亚洲综合影院_五月天精品一区二区三区_久久久噜噜噜久久中文字幕色伊伊 _欧美岛国在线观看_久久国产精品毛片_欧美va在线观看_成人黄网大全在线观看_日韩精品一区二区三区中文_亚洲一二三四区不卡

代寫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| 亚洲欧美一级二级三级| 妖精一区二区三区精品视频| 色呦呦网站在线观看| 欧美日韩国产综合一区二区| 国产精品亚洲视频| 亚洲精品资源| 男男gay无套免费视频欧美| 黄色电影免费在线看| 国产精品视频一区二区三区不卡| 亚洲精品少妇| 欧美激情在线免费观看| 久久午夜免费电影| 日韩福利电影在线观看| 成av人片在线观看www| 在线观看入口黄最新永久免费国产| 免费不卡视频| 日本高清视频在线播放| 日夜干在线视频| 欧美亚洲尤物久久| 欧美影院午夜播放| 日韩欧美精品网址| 亚州av乱码久久精品蜜桃| 免费成人蒂法| 国产一区二区三区站长工具| 西野翔中文久久精品国产| 巨胸喷奶水www久久久| 91高清在线| 免费网站免费进入在线| 在线看小视频| 亚洲综合999| 国产日韩欧美一区二区三区综合| 欧美精品色一区二区三区| 国产中文字幕在线看| 黄色在线网站| 精品美女视频在线观看免费软件| 国产乱视频在线观看| 色婷婷精品大在线视频| 欧美精彩视频一区二区三区| 日韩欧美999| 91精品国产综合久久小美女| www.99色| av福利精品| 日韩制服诱惑| 精品久久久久久久久久岛国gif| 黄视频网站在线看| 九色porny自拍视频在线播放| 韩国久久久久久| 国产精品第一国产精品| 五月婷婷在线观看| 欧美日韩在线精品一区二区三区激情综| 99999色| 麻豆视频久久| 国产99久久久国产精品潘金网站| 日本亚洲三级在线| 中文字幕视频一区| 欧美xxxx老人做受| 在线欧美日韩国产| 一本到高清视频免费精品| 先锋av资源在线| 日韩精品久久久久久久软件91| 国产精品视屏| 中文字幕欧美日韩一区| 五月婷婷在线视频| 99精品视频在线免费观看| 美女做暖暖视频免费在线观看全部网址91| 91精品国产乱码久久久久久久 | 9191国产精品| 国产美女av在线| 精品少妇一区| 国产剧情一区二区三区| 精品久久久视频| 一区二区三区资源| 一区二区三区蜜桃网| 色综合久久综合网欧美综合网| 欧美日韩情趣电影| 黑巨人与欧美精品一区| 一区二区三区视频网站| 欧美色图激情小说| 国产精品国产三级国产| 91精品国产一区二区人妖| 麻豆久久久久| 丝袜亚洲另类欧美综合| 91精品黄色片免费大全| 992tv成人国产福利在线| 日韩影片在线观看| 国产精品资源网| 成人亚洲在线观看| 国产欧美啪啪| 国产欧美日韩亚州综合| 日韩电影免费| 欧美人成在线| 欧美图区在线视频| 四虎国产精品免费久久| yourporn久久国产精品| 夜色资源站国产www在线视频| 日韩精品一区二区三区免费观影| 亚洲男同性恋视频| 日韩免费影院| 精品综合久久久久久8888| 成人午夜激情| 久久中文字幕av| 天天综合天天做天天综合| 国产又色又爽又黄刺激在线视频| 99香蕉国产精品偷在线观看| 欧美一级在线免费| 欧洲亚洲一区二区三区| 亚洲精品乱码久久久久久黑人| 伊人春色在线观看| 国产精品一区二区在线观看网站| 天堂在线看视频| 国产精品成人一区二区不卡| 黑人巨大精品欧美一区二区一视频| 亚洲高清黄色| 久久蜜臀中文字幕| caoporn97在线视频| 国产九九视频一区二区三区| 亚洲成人影院在线观看| 亚洲激情婷婷| 丁香婷婷自拍| 欧美在线不卡| 精品av综合导航| 亚洲成人精品| 免费在线播放av| 亚洲欧洲日韩| 欧美成人一区二区三区在线观看| 凹凸成人精品亚洲精品密奴| 欧美日韩精品二区第二页| 久久夜色精品国产噜噜av小说| 婷婷激情综合网| 超碰精品在线| 色欧美日韩亚洲| 日本一道高清一区二区三区| 色一区在线观看| 精品在线观看入口| 69久久99精品久久久久婷婷| 久久亚洲成人| 激情五月色综合亚洲小说| 亚洲深深色噜噜狠狠爱网站| 成人免费视频77777| 亚洲国产清纯| 日本成人一区| 国产69精品久久777的优势| av在线播放观看| 久久久久久久久久久久久久久99| 欧美aa一级| 亚洲男人的天堂av| 日本精品视频| 3d动漫精品啪啪1区2区免费| 欧美一区免费| 伊人影院在线播放| 国产精品一二一区| 牛牛精品一区二区| 亚洲一区在线看| 在线看成人短视频| 天天色天天操天天做| 久久精品1区| 国产写真视频在线观看| 日本一区二区免费在线 | 亚洲一区二区欧美日韩| 国产精品中文字幕制服诱惑| 91麻豆精品国产综合久久久久久| 希岛爱理一区二区三区| 亚洲美女在线免费观看| 国产精品综合一区二区| 日本不卡免费高清视频在线| 一区二区三区在线视频观看58| 老司机aⅴ在线精品导航| 欧美日韩日日摸| 欧美亚洲在线| 国产丝袜视频在线播放| 一区二区三区在线视频观看| 欧美肉体xxxx裸体137大胆| 天堂中文字幕| 久久久久久久久久电影| 在线综合色站| 嫩模私拍啪啪| 99精品欧美一区二区三区综合在线| 天然素人一区二区视频| 欧美日本一道本| 久久天堂成人| 国产污视频在线播放| 欧美性xxxxx| 亚洲韩日在线| 92久久精品| 欧美日韩一区 二区 三区 久久精品| 一级成人国产| 深夜福利视频一区二区| 欧美日韩另类国产亚洲欧美一级| 久久成人精品| 欧美xoxoxo| 精品久久久久久亚洲综合网| 国产福利一区二区三区视频在线 | 在线一区二区三区四区| 丝袜美腿成人在线| 欧美另类激情| 蜜桃tv在线播放| 1区2区3区国产精品|