狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线

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

    狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线
  • <dl id="akume"></dl>
  • <noscript id="akume"><object id="akume"></object></noscript>
  • <nav id="akume"><dl id="akume"></dl></nav>
  • <rt id="akume"></rt>
    <dl id="akume"><acronym id="akume"></acronym></dl><dl id="akume"><xmp id="akume"></xmp></dl>
    亚洲国产精品无码观看久久| 欧美美女黄色网| 538任你躁在线精品免费| 午夜精品在线免费观看| 少妇高潮喷水在线观看| 97在线播放视频| 中文字幕色网站| 欧美日韩dvd| 久久精品.com| 久久综合在线观看| 妞干网在线观看视频| 亚洲国产精品久久久久婷蜜芽| 男女男精品视频站| 大桥未久一区二区三区| 欧美精品一区免费| 超碰中文字幕在线观看| www..com日韩| 一级淫片在线观看| 国产v片免费观看| 色91精品久久久久久久久| 轻点好疼好大好爽视频| 99热这里只有精品在线播放| 免费的av在线| 午夜在线观看av| 毛片av在线播放| 一个色综合久久| 久久久一本二本三本| 性欧美1819| 日韩avxxx| 青草网在线观看| 久久久久久蜜桃一区二区| 亚洲熟妇无码一区二区三区| 中文 日韩 欧美| 国产精品亚洲a| 欧美亚洲色图视频| 福利网在线观看| 午夜不卡福利视频| 我看黄色一级片| 欧美在线一区视频| 一区二区三区四区免费观看| 五月婷婷深爱五月| 能在线观看的av| 黄色一级视频片| 国产高清av在线播放| 久久久久久久久网| 小早川怜子一区二区三区| 免费大片在线观看| 黄www在线观看| 色欲色香天天天综合网www| 欧美日韩视频免费在线观看| 久久久久久蜜桃一区二区| 久久精品.com| 日本老熟妇毛茸茸| 欧美视频第一区| 免费av网址在线| 欧美成人黑人猛交| 欧美日韩在线免费播放| 亚洲成熟丰满熟妇高潮xxxxx| 欧美 日韩 国产在线观看| av女优在线播放| 日韩欧美不卡在线| 成人一区二区免费视频| 免费国产a级片| 18禁男女爽爽爽午夜网站免费| av网站大全免费| 日本精品一区二区三区四区 | 加勒比成人在线| 国产 欧美 日本| 日韩精品―中文字幕| 欧美男女爱爱视频| 久久网站免费视频| 午夜免费精品视频| 国产欧美一区二| 99精品视频免费版的特色功能| 香蕉精品视频在线| 7777在线视频| 欧美 日韩 激情| 中文字幕 91| 国产91沈先生在线播放| 黄网站欧美内射| 国产成人亚洲精品无码h在线| 日日躁夜夜躁aaaabbbb| 九一免费在线观看| 一女被多男玩喷潮视频| 久久婷五月综合| 久久久国内精品| 欧美日韩怡红院| 青青草综合视频| 精品久久久久av| 中文字幕制服丝袜在线| 国产一级爱c视频| 国产美女18xxxx免费视频| 免费看日b视频| 亚洲视频在线a| 国产肉体ⅹxxx137大胆| 成人午夜视频免费在线观看| 亚洲制服在线观看| 青青艹视频在线| 亚洲AV无码成人精品一区| 337p粉嫩大胆噜噜噜鲁| www.色欧美| 熟女性饥渴一区二区三区| 国产欧美精品一二三| 97xxxxx| 国产一级大片免费看| av污在线观看| 欧美日本视频在线观看| 国产91porn| 国产在线观看中文字幕| 欧美一级片中文字幕| 欧美在线观看黄| 亚洲一区二区在线视频观看| 99精品免费在线观看| 国产女主播自拍| 午夜探花在线观看| 亚洲欧美在线精品| 久热免费在线观看| 丝袜人妻一区二区三区| 肉色超薄丝袜脚交| 99视频在线视频| 欧美黄色一级片视频| 久草热视频在线观看| 大片在线观看网站免费收看| 嫩草视频免费在线观看| 精品999在线| 免费看污污网站| 成人午夜激情av| 亚洲男人天堂色| 欧美精品性生活| 黄色永久免费网站| 色国产在线视频| 精品日韩久久久| 奇米影音第四色| 日本三级黄色网址| 欧美精品久久久久久久久25p| 久久久久久久少妇| 无人在线观看的免费高清视频| 人妻内射一区二区在线视频 | 一区二区久久精品| 99精品999| 午夜久久久久久久久久久| 91手机视频在线| 日本福利视频在线观看| 国产精品69久久久| 一区二区传媒有限公司| 亚洲国产精品久久久久爰色欲| 国产成人黄色片| 色免费在线视频| 激情久久综合网| 一二三四中文字幕| 日韩欧美不卡在线| 老熟妇仑乱视频一区二区| 牛夜精品久久久久久久| 国产精品久久久久久9999| 91国在线高清视频| 久色视频在线播放| 91女神在线观看| 红桃一区二区三区| 92看片淫黄大片一级| 国产成人美女视频| 成年女人18级毛片毛片免费| 日本免费不卡一区二区| 亚洲美女性囗交| 欧美性受xxxx黑人猛交88| 日韩成人三级视频| 青青在线免费观看视频| 大地资源第二页在线观看高清版| 波多野结衣av一区二区全免费观看| 美脚丝袜脚交一区二区| 国产精品视频分类| 97超碰在线人人| 日本免费色视频| 黄色一级片黄色| 激情黄色小视频| 成 年 人 黄 色 大 片大 全| 自拍偷拍21p| 日本网站免费在线观看| 久久久国产精华液999999| 蜜臀av无码一区二区三区| 一区二区三区 日韩| 热99这里只有精品| 小说区视频区图片区| 亚洲午夜无码av毛片久久| 四虎永久免费网站| 亚洲xxx在线观看| 99视频在线免费播放| 亚洲自拍偷拍一区二区三区| 好男人www社区| 久激情内射婷内射蜜桃| 五月天在线免费视频| 五月天开心婷婷| 大香煮伊手机一区| 日本中文字幕网址| 浴室偷拍美女洗澡456在线| 中文字幕第100页| 久久国产乱子伦免费精品| 久久亚洲精品无码va白人极品| 自拍偷拍视频在线| 伊人精品视频在线观看| 天天插天天操天天射|