日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲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)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • NBA直播 短信驗證碼平臺 幣安官網下載 歐冠直播 WPS下載

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

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

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

              99re66热这里只有精品4| 一区二区三区四区五区视频 | 国模大胆一区二区三区| 国产日韩一级二级三级| 黄色日韩网站| 亚洲精品综合在线| 亚洲女与黑人做爰| 久久人人超碰| 欧美日韩综合久久| 国产麻豆91精品| 亚洲国产精品久久久久久女王| 亚洲精品一区二区三区四区高清| 日韩午夜三级在线| 久久岛国电影| 欧美伦理在线观看| 国产婷婷色一区二区三区四区| 在线日本成人| 亚洲欧美综合精品久久成人| 麻豆精品在线视频| 国产精品一区免费在线观看| 在线观看亚洲a| 亚洲一区视频| 欧美国产欧美亚洲国产日韩mv天天看完整 | 欧美一级黄色网| 欧美精品国产一区| 国产一区二区欧美日韩| 91久久亚洲| 久久国产福利国产秒拍| 欧美色播在线播放| 亚洲国产另类 国产精品国产免费| 亚洲女女女同性video| 欧美精品免费视频| 狠狠狠色丁香婷婷综合久久五月| 一区二区三区欧美日韩| 你懂的国产精品| 国产亚洲在线| 亚洲欧美日本精品| 国产精品不卡在线| 亚洲精品在线视频观看| 久久伊人免费视频| 韩国成人理伦片免费播放| 国产精品99久久99久久久二8 | 日韩午夜精品| 久久久久久午夜| 国产精品亚洲成人| 亚洲一区不卡| 国产精品不卡在线| 99精品视频免费观看视频| 久久综合久久美利坚合众国| 国产日韩欧美| 欧美一区二区三区婷婷月色 | 国产精品久久久久久久久久妞妞| 夜夜狂射影院欧美极品| 欧美激情精品久久久| 亚洲国产天堂久久综合网| 久久躁日日躁aaaaxxxx| 国产亚洲在线| 久久综合久久综合这里只有精品| 国内精品模特av私拍在线观看| 欧美在线观看网站| 国产一区二区在线观看免费| 久久精品视频免费观看| 国产一区二区剧情av在线| 欧美在现视频| 韩日成人在线| 欧美电影电视剧在线观看| 亚洲区国产区| 欧美日韩精品| 亚洲一区二区在线播放| 国产精品少妇自拍| 欧美在线高清| 精品成人国产| 欧美激情一区二区三区成人| 亚洲日本理论电影| 欧美亚男人的天堂| 性欧美在线看片a免费观看| 国产综合视频| 欧美精品偷拍| 午夜在线播放视频欧美| 国产精品捆绑调教| 性久久久久久| 亚洲国产欧美日韩| 欧美午夜视频在线观看| 久久精品国产一区二区电影| 亚洲第一色在线| 欧美日韩一区二区三区在线看 | 黑人巨大精品欧美一区二区| 免费h精品视频在线播放| 亚洲精品黄色| 国产午夜精品美女毛片视频| 欧美xart系列高清| 亚洲欧美bt| 91久久精品久久国产性色也91| 欧美视频中文字幕在线| 久色成人在线| 亚洲欧美日韩国产精品 | 欧美精品久久久久久久久久| 亚洲免费影视第一页| 在线日本欧美| 国产精品一区免费在线观看| 久久影院午夜片一区| 亚洲图片你懂的| 亚洲精品1区2区| 国产日韩一区在线| 欧美日韩亚洲在线| 欧美国产精品v| 久久久久久久综合色一本| 亚洲图片欧美一区| 亚洲人在线视频| 韩日成人av| 国产视频精品va久久久久久| 欧美日韩 国产精品| 久久人人看视频| 性色av一区二区三区红粉影视| 最新热久久免费视频| 一区二区在线视频播放| 国产精品毛片在线看| 欧美精品国产精品日韩精品| 久久久久久亚洲精品杨幂换脸| 欧美亚洲专区| 亚洲在线中文字幕| 亚洲无限乱码一二三四麻| 亚洲国产视频直播| 亚洲国产精品一区二区第四页av| 国产亚洲午夜| 国产日韩欧美二区| 国产欧美综合一区二区三区| 国产精品成人午夜| 国产精品国产三级国产aⅴ入口| 欧美日韩一区二区免费视频| 欧美人成在线视频| 欧美日韩三级| 国产精品国色综合久久| 欧美午夜激情在线| 国产精品a久久久久久| 国产精品sss| 国产精品伊人日日| 国产日韩欧美亚洲| 国产综合色产在线精品| 黑人极品videos精品欧美裸| 狠狠v欧美v日韩v亚洲ⅴ| 在线观看av一区| 亚洲国产一区二区三区青草影视| 亚洲激情视频网站| 亚洲美女色禁图| 亚洲午夜免费福利视频| 亚洲欧美日韩国产综合在线 | 99pao成人国产永久免费视频| 亚洲国产专区校园欧美| 亚洲美女毛片| 亚洲免费伊人电影在线观看av| 小黄鸭精品aⅴ导航网站入口| 久久九九免费视频| 欧美成人午夜免费视在线看片| 欧美美女bbbb| 国产麻豆91精品| 在线观看视频一区二区欧美日韩 | 国产视频欧美| 91久久久久久国产精品| 99视频有精品| 校园春色国产精品| 欧美成va人片在线观看| 欧美亚洲成人网| 欲色影视综合吧| 亚洲一二三四区| 久久九九热re6这里有精品 | 亚洲国产精品综合| 亚洲欧美精品伊人久久| 卡通动漫国产精品| 欧美天天影院| 亚洲国产精品99久久久久久久久| 日韩视频一区二区| 久久精品免费播放| 欧美日韩在线影院| **性色生活片久久毛片| 亚洲制服丝袜在线| 欧美高清免费| 国产一区二区三区精品久久久| 亚洲精品中文字幕有码专区| 欧美一区亚洲二区| 欧美日韩精品免费在线观看视频| 国模一区二区三区| 亚洲综合视频在线| 欧美理论电影在线观看| 狠狠色香婷婷久久亚洲精品| 亚洲一区二区毛片| 欧美女激情福利| 亚洲福利视频免费观看| 午夜免费日韩视频| 欧美手机在线| 日韩系列欧美系列| 欧美国产精品久久| 伊人精品在线| 久久精品亚洲热| 国产精品一国产精品k频道56| a91a精品视频在线观看| 欧美电影免费观看| 亚洲欧洲精品一区二区| 久久综合狠狠综合久久综合88 | 欧美成人视屏|