爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频

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

    爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频
    <strike id="bfrlb"></strike><form id="bfrlb"><form id="bfrlb"><nobr id="bfrlb"></nobr></form></form>

        <sub id="bfrlb"><listing id="bfrlb"><menuitem id="bfrlb"></menuitem></listing></sub>

          <form id="bfrlb"></form>

            <form id="bfrlb"></form>

              <address id="bfrlb"></address>

              <address id="bfrlb"></address>
              国产一区日韩二区欧美三区| 日韩视频免费在线| 欧美资源在线观看| 黑人中文字幕一区二区三区| 午夜精品福利一区二区蜜股av| 亚洲国产精品久久精品怡红院| 国语对白精品一区二区| 日韩特黄影片| 你懂的视频一区二区| 欧美大片一区二区三区| 麻豆av一区二区三区久久| 欧美视频国产精品| 精品成人乱色一区二区| 久久亚洲精品一区二区| 国产一区二区三区成人欧美日韩在线观看| 久久亚洲精品一区| 亚洲欧美另类中文字幕| 韩国一区二区三区美女美女秀| 欧美色图天堂网| 国产日韩欧美麻豆| 黄色在线一区| 久久精品亚洲精品| 欧美在线日韩精品| 欧美自拍偷拍| 亚洲尤物在线| 国产综合第一页| 亚洲欧美激情精品一区二区| 欧美日韩在线播放三区四区| 亚洲高清在线| 国产精品久久久久婷婷| 欧美日韩精品一区视频| 99在线热播精品免费| 麻豆成人精品| 亚洲小说欧美另类社区| 欧美日韩国产大片| 国产精品99久久久久久白浆小说| 亚洲肉体裸体xxxx137| 国产精品日日摸夜夜添夜夜av| 激情综合网激情| 免费欧美日韩国产三级电影| 国产老女人精品毛片久久| 夜夜嗨av色综合久久久综合网| 美国三级日本三级久久99| 亚洲人成免费| 国产精品红桃| av成人动漫| 亚洲三级电影全部在线观看高清| 亚洲影视在线| 国产一级揄自揄精品视频| 欧美日韩一卡| 国产免费亚洲高清| 久久视频这里只有精品| 亚洲欧洲在线视频| 精品电影在线观看| 亚洲激情国产精品| 欧美午夜在线视频| 欧美性理论片在线观看片免费| 久久婷婷人人澡人人喊人人爽| 亚洲精品一二三区| 欧美日韩国产999| 国产精品v亚洲精品v日韩精品| 欧美三级午夜理伦三级中视频| 狠狠久久五月精品中文字幕| 欧美成年人视频网站欧美| 一区二区三区偷拍| 久久久国产精品亚洲一区| 亚洲精品中文字幕女同| 久久网站免费| 亚洲国产日韩一区二区| 久久久久青草大香线综合精品| 免费不卡视频| 香蕉久久国产| 午夜性色一区二区三区免费视频| 狠狠色丁香久久婷婷综合丁香| 亚洲一区二区在线视频| 欧美图区在线视频| 一区二区三区四区五区视频| 亚洲男人第一av网站| 久久久国际精品| 欧美一区二区三区免费观看| 久久精品视频在线看| 亚洲视频免费观看| 欧美视频在线看| 欧美日韩蜜桃| 欧美精品成人在线| 久久av资源网站| 欧美婷婷六月丁香综合色| 欧美一区在线直播| 99视频精品免费观看| 亚洲一区中文字幕在线观看| 亚洲一区二区在线视频| 亚洲精品1区| 亚洲精品视频在线播放| 日韩一级免费观看| 国内久久精品视频| 亚洲区一区二| 夜夜嗨av一区二区三区中文字幕| 一区二区三区国产精华| 美日韩免费视频| 久久av老司机精品网站导航| 久久激情网站| 亚洲精品影视在线观看| 欧美精品一区二区精品网| 久热精品视频在线免费观看| 国产精品视频yy9299一区| 国内精品视频在线播放| 亚洲欧美国产精品专区久久| 99riav久久精品riav| 亚洲第一区在线| 久久久久青草大香线综合精品| 久久久精品2019中文字幕神马| 欧美/亚洲一区| 国产主播喷水一区二区| 欧美久久九九| 日韩亚洲欧美成人一区| 在线成人黄色| 亚洲国产日韩欧美在线动漫| 国产美女扒开尿口久久久| 亚洲激情网站免费观看| 亚洲与欧洲av电影| 午夜精品久久久久久久蜜桃app| 亚洲精品乱码久久久久久久久| 欧美一级网站| 正在播放亚洲| 欧美视频在线免费| 亚洲一二三四久久| 国产久一道中文一区| 欧美岛国在线观看| 亚洲激情av| 国外成人性视频| 国产精品高潮呻吟久久av无限| 一区二区不卡在线视频 午夜欧美不卡'| 9国产精品视频| 亚洲成人在线免费| 国产精品青草综合久久久久99| 精品1区2区| 亚洲精品一区二区在线| 黄色成人在线观看| 免费久久99精品国产| 亚洲日本在线观看| 久久久久国产精品午夜一区| 久久久久久有精品国产| 欧美日韩精品国产| 亚欧成人在线| 欧美午夜电影在线观看| 亚洲午夜精品国产| 国产精品免费观看视频| 国产欧美综合一区二区三区| 香蕉视频成人在线观看| 亚洲激情在线视频| 国产精品人人做人人爽人人添| 免费久久久一本精品久久区| 99国产精品久久久久久久成人热| 女生裸体视频一区二区三区| 国产精品观看| 欧美日韩亚洲一区二区三区在线| 国产精品久久久久久久久久免费看| 激情久久久久久久| 欧美日韩国产首页在线观看| 午夜免费久久久久| 欧美jjzz| 久久久噜噜噜久久中文字幕色伊伊| 欧美在线观看网址综合| 性一交一乱一区二区洋洋av| 国产精品国色综合久久| 国产亚洲精品成人av久久ww| 国产日韩欧美精品| 亚洲午夜电影网| 国产九色精品成人porny| 日韩午夜视频在线观看| 亚洲第一视频网站| 亚洲综合视频一区| 亚洲高清资源综合久久精品| 亚洲综合国产| 免费高清在线一区| 亚洲一区成人| 亚洲二区免费| 一区二区三区免费观看| 欧美淫片网站| 国产精品美女久久久久av超清| 日韩亚洲欧美成人| 精品福利电影| 亚洲国产精品成人| 亚洲国产女人aaa毛片在线| 91久久精品视频| 夜久久久久久| 欧美日本不卡高清| 欧美巨乳在线| 国产精品高潮久久| 国产日韩欧美亚洲| 一本大道久久a久久综合婷婷| 国产精品一区二区三区乱码| 国产日韩精品入口| 亚洲永久在线| 牛夜精品久久久久久久99黑人| 欧美三级电影一区| 亚洲精品美女在线| 麻豆精品视频在线观看视频| 99re这里只有精品6| 卡一卡二国产精品|