精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕

代寫CSE 465/565 解析器 interpreter

時(shí)間:2024-03-01  來源:  作者: 我要糾錯(cuò)


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.
請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

標(biāo)簽:

掃一掃在手機(jī)打開當(dāng)前頁(yè)
  • 上一篇:代寫CS444 Linear classifiers
  • 下一篇:代做代寫COMPSCI 4091 Advanced Networked Systems
  • 無相關(guān)信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國(guó)家級(jí)風(fēng)景名勝區(qū)
    昆明西山國(guó)家級(jí)風(fēng)景名勝區(qū)
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗(yàn)證碼平臺(tái) 理財(cái) WPS下載

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕
    <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
    <ul id="e4iaa"></ul>
    <blockquote id="e4iaa"><tfoot id="e4iaa"></tfoot></blockquote>
    • <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
      <ul id="e4iaa"></ul>
      <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp><ul id="e4iaa"></ul>
      <ul id="e4iaa"></ul>
      <th id="e4iaa"><menu id="e4iaa"></menu></th>
      天天爽夜夜爽夜夜爽精品| av高清一区二区| 手机看片日韩av| 国产精品久久久久久久久久久久久久久久久| 免费中文字幕av| 国产成人av免费看| 亚洲国产精品欧美久久| 天天干天天草天天| 人人妻人人澡人人爽人人精品 | 国产成人无码www免费视频播放| 色婷婷久久综合中文久久蜜桃av| 国产三级精品三级在线| 亚洲一区二区三区黄色| 中字幕一区二区三区乱码| 无限资源日本好片| 无码人妻aⅴ一区二区三区有奶水| 免费观看特级毛片| 久久久精品成人| 久久精品这里有| 久久国产柳州莫菁门| 国产一级特黄毛片| 久草视频福利在线| 九九热在线视频播放| 精品国自产在线观看| 国产中文av在线| 久久视频精品在线观看| 国内精品福利视频| 国模无码视频一区| 蜜臀久久99精品久久久久久| 久久久国产免费| 欧美一级淫片aaaaaa| 日韩一区二区三区不卡| 色欲欲www成人网站| 熟妇人妻系列aⅴ无码专区友真希| 少妇久久久久久被弄高潮| 姝姝窝人体www聚色窝| 中文字幕 国产精品| 亚洲天堂手机版| 国产精品成人免费观看| 国内精品国产三级国产aⅴ久| 免费精品99久久国产综合精品应用| 男人的天堂久久久| 四虎成人免费视频| 亚洲影院一区二区三区| 韩国中文字幕hd久久精品| 男人的天堂久久久| 中国xxxx性xxxx产国| 国产精品国产高清国产| 欧美一区二区三区成人精品| 永久免费的av网站| 国产伦精品一区二区免费| 欧美成人三级在线播放| 中文字幕在线播放av| 国产在线免费av| 亚洲不卡的av| 国产污视频网站| 五月婷婷六月丁香激情| 亚洲精品久久久狠狠狠爱| 丰满人妻一区二区三区四区53| 久久夜色精品亚洲| 中文字幕亚洲日本| 国产一区二区在线免费播放| 午夜免费福利视频在线观看| 国产精品sm调教免费专区| 人妻少妇精品一区二区三区| 亚洲精品性视频| 久久香蕉精品视频| 亚洲一区二区三区黄色| 欧美69精品久久久久久不卡| www.五月婷婷.com| 天堂av一区二区三区| 国产伦精品一区二区免费| 日韩av片网站| 国产免费高清av| 亚洲乱妇老熟女爽到高潮的片| 久久久久久久久精| www色com| 亚洲国产精品一区二区久久hs| 久久精品成人av| 91在线公开视频| 无码精品人妻一区二区| 久久久久亚洲av成人片| 999久久久精品视频| 日日夜夜综合网| 久草手机视频在线观看| 99成人在线观看| 亚洲a视频在线| 精品夜夜澡人妻无码av| 亚洲图片综合网| 五月花丁香婷婷| 久久久久久久久久久久国产精品| www.国产福利| 99热这里只有精| 最新中文字幕av| 午夜精品一区二区三区视频| 人妻丰满熟妇av无码区| 精品国产乱码久久久久久1区二区 精品国产鲁一鲁一区二区三区 | 欧美日韩一级黄色片| 国产精品永久久久久久久久久| 亚洲高清精品视频| 日韩欧美亚洲另类| 青青草av在线播放| 免费在线黄色网| 刘亦菲久久免费一区二区| 精品久久久久久久久久久久久久久久久久| 亚洲精品怡红院| 中文天堂资源在线| 中文字幕在线观看欧美| 亚洲aⅴ在线观看| 尤物国产在线观看| 在线播放黄色av| 中文人妻熟女乱又乱精品| 午夜国产在线观看| 午夜精品福利在线视频| 永久免费黄色片| 中文字幕线观看| 亚洲一区在线观| 91视频免费观看网站| www.色小姐com| 国产伦子伦对白视频| 黄色一级片免费在线观看 | 少妇一区二区三区四区| 日本特黄特色aaa大片免费| 欧美高清视频一区二区三区| 麻豆成人免费视频| 秋霞精品一区二区三区| 婷婷色在线观看| 亚洲一区二区蜜桃| 成人久久精品人妻一区二区三区| 国产毛片久久久久| 免费一级suv好看的国产网站 | 国产熟妇一区二区三区四区| 久草热在线观看| 色欲无码人妻久久精品| 中文字幕人妻一区二| 99精品视频99| 国产毛片一区二区三区va在线| 国产精品99re| 免费中文字幕日韩| 亚洲高清精品视频| www视频在线| 麻豆亚洲av成人无码久久精品| 熟妇无码乱子成人精品| 亚洲少妇久久久| 国产在线观看成人| 色丁香婷婷综合久久| av网在线播放| 久久精品国产亚洲av麻豆色欲 | 国产成人精品亚洲男人的天堂 | 国产69视频在线观看| 久久免费手机视频| 中文字幕码精品视频网站| 国产美女免费视频| 日本一卡二卡在线| 成人无码www在线看免费| 人妻互换一区二区激情偷拍| 99精品免费观看| 欧美日韩免费做爰视频| √资源天堂中文在线| 欧美成人午夜精品免费| jlzzjlzzjlzz亚洲人| 人妻激情偷乱频一区二区三区| 中文字幕在线视频精品| 精品久久免费视频| 亚洲美女福利视频| 久久久综合久久久| 亚洲美女爱爱视频| 日韩va在线观看| 国产精品呻吟久久| 在线观看国产一区二区三区| 国产在线观看免费av| 亚洲va在线va天堂va偷拍| 精品人妻av一区二区三区| 中文字幕丰满人伦在线| 久久久久亚洲av片无码下载蜜桃| 97人妻天天摸天天爽天天 | 免费一级特黄特色大片| 99国产揄拍国产精品| 午夜精品一区二| 女同性恋一区二区三区| 丰满人妻一区二区三区四区 | 777一区二区| 亚欧视频在线观看| 农村妇女精品一区二区| 国产一级理论片| 91亚洲精品国偷拍自产在线观看| 日韩免费不卡视频| 精品女人久久久| 国产免费一区二区三区最新6| 亚洲一区二区91| 亚洲精品成人区在线观看| 婷婷免费在线观看| 日本二区在线观看| 免费看一级一片| 欧美精品日韩在线| 蜜桃视频污在线观看| 精品午夜福利视频| 精品久久人妻av中文字幕| 超碰97人人干| www久久久久久久|