久久久久久精品无码人妻_青春草无码精品视频在线观_无码精品国产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

    久久久久久精品无码人妻_青春草无码精品视频在线观_无码精品国产VA在线观看_国产色无码专区在线观看

    久草视频这里只有精品| 天天插天天操天天射| 免费成人午夜视频| 激情五月婷婷基地| 国产aaa一级片| 四虎精品欧美一区二区免费| 日本精品免费在线观看| 深夜做爰性大片蜜桃| 欧美在线观看成人| 欧美aaa在线观看| 日本黄网站免费| 免费日韩在线观看| www.99r| 国精产品一区一区三区视频| 亚洲最新免费视频| 欧美精品aaaa| 亚洲熟妇无码一区二区三区| av中文字幕av| 色播五月综合网| 欧美三级一级片| 狠狠精品干练久久久无码中文字幕 | 高潮一区二区三区| 日本新janpanese乱熟| 国产肥臀一区二区福利视频| 精品无码一区二区三区爱欲| 996这里只有精品| 久久香蕉视频网站| 国产在线无码精品| 黄色一级片黄色| 亚洲高潮无码久久| 国产精品8888| 国产黄色激情视频| 国产精品视频二| 日韩精品在线视频免费观看| 91午夜在线观看| 久久视频这里有精品| 亚洲中文字幕无码中文字| 大陆极品少妇内射aaaaa| 日本中文字幕网址| 亚洲成熟丰满熟妇高潮xxxxx| 激情婷婷综合网| 亚洲高清免费在线观看| 男生操女生视频在线观看| 久久出品必属精品| 91传媒免费视频| 精品无码国产一区二区三区av| 大j8黑人w巨大888a片| 女人另类性混交zo| 日本 片 成人 在线| mm131午夜| 日韩国产欧美亚洲| 亚洲中文字幕久久精品无码喷水| 亚洲欧美aaa| 精品国产无码在线| 国产av人人夜夜澡人人爽麻豆| 女人天堂av手机在线| 免费看国产黄色片| av在线网站免费观看| 日本aa在线观看| 少妇性饥渴无码a区免费| 欧美日韩一区二区三区69堂| 日本一级淫片演员| 9久久9毛片又大又硬又粗| 91在线视频观看免费| 91手机视频在线| 阿v天堂2017| 97超碰人人爽| 一本久道高清无码视频| 午夜激情在线观看视频| 亚洲国产精品影视| 黄色a级片免费| 三年中国中文在线观看免费播放 | 亚洲精品午夜在线观看| 中文字幕综合在线观看| 欧美成人三级在线视频| 亚洲一区精品视频在线观看| 国产一区二区三区小说| 亚洲欧美国产日韩综合| 狠狠精品干练久久久无码中文字幕 | 天天色综合社区| 人人妻人人澡人人爽欧美一区双 | 黄色网在线视频| 国产精品涩涩涩视频网站| 色乱码一区二区三区熟女 | 国产xxxx振车| 91看片在线免费观看| 男女啪啪免费视频网站| 亚洲va在线va天堂va偷拍| 国产va亚洲va在线va| 激情文学亚洲色图| 欧美色图色综合| 蜜桃网站在线观看| 911福利视频| a√天堂在线观看| 国产精品久久成人免费观看| 天天干天天干天天干天天干天天干| 国产欧美日韩小视频| 亚洲一区二区偷拍| 日本va中文字幕| 青青青免费在线| 日韩精品福利片午夜免费观看| 少妇一级淫免费放| www.99热这里只有精品| 一二三四中文字幕| 亚洲第一色av| 日韩视频在线免费看| 国产精品久久久久7777| 最新中文字幕久久| 天天操狠狠操夜夜操| 韩国日本美国免费毛片| 国内精品视频一区二区三区| 99精品一区二区三区的区别| 国产免费又粗又猛又爽| 国产一区二区三区精彩视频 | 国产一区二区在线免费播放| 精品欧美一区免费观看α√| 欧美久久久久久久久久久久久久| 无套内谢丰满少妇中文字幕| 激情五月俺来也| 搡女人真爽免费午夜网站| 国产亚洲天堂网| 国产网站免费在线观看| 岛国大片在线播放| 精品成在人线av无码免费看| 热久久最新网址| 国内外成人激情免费视频| 日本黄色a视频| 一级片免费在线观看视频| 中文字幕视频三区| 天堂av2020| 欧美午夜精品理论片| 国产精品嫩草影视| 亚洲一区二区图片| 懂色av粉嫩av蜜臀av| 大地资源第二页在线观看高清版| 亚洲高清av一区二区三区| 午夜激情影院在线观看| 久久人人爽av| 在线a免费观看| 在线观看成人免费| 乱熟女高潮一区二区在线| 999久久欧美人妻一区二区| 国内自拍中文字幕| 人人妻人人澡人人爽欧美一区双| 欧美国产视频一区| 精品久久一二三| 久久久久久香蕉| 五月天av在线播放| 中文字幕一区二区三区四区五区人| 亚洲av综合色区| 成年人网站国产| 国产aaa一级片| 欧美黄色性生活| 在线观看国产福利| 男人天堂成人网| 国产色一区二区三区| 国产性xxxx18免费观看视频| 韩国日本在线视频| 爆乳熟妇一区二区三区霸乳| 我要看一级黄色大片| 2025韩国大尺度电影| 国产精品69久久久| 亚洲精品中文字幕无码蜜桃| 国产一区二区在线免费播放| 性鲍视频在线观看| 黄色国产一级视频| 无限资源日本好片| 久久久久久久久网| 中国丰满人妻videoshd| www亚洲成人| 国产高清不卡无码视频| 草草久久久无码国产专区| 亚洲欧美偷拍另类| 国产在线无码精品| 一本久道综合色婷婷五月| 搡的我好爽在线观看免费视频| 成人网站免费观看入口| 天天操天天爽天天射| 中文字幕乱码免费| 哪个网站能看毛片| 在线无限看免费粉色视频| 3d动漫一区二区三区| 亚洲第一色av| 国产极品粉嫩福利姬萌白酱| 99九九99九九九99九他书对| 日韩中字在线观看| 天天久久综合网| 日本a在线免费观看| 中文字幕22页| 日韩av在线播放不卡| 一道本视频在线观看| 国产一线二线三线女| wwww.国产| 黄色大片在线免费看| www,av在线| 青青在线视频免费| 欧洲精品在线播放| 天天久久综合网| 日韩福利视频在线| 国产手机免费视频|