Scala代写:CSE262 Table Driven Scanner代写R编程、R语言程序帮写

代写Scala作业,练习Scala的编程设计。IntroductionThis project is to implement the table driven scanner given in Figure 2.11 (pg. 66) in the text, which will use the table in Figure 2.12 (pg. 67) to scan the tokens for the same “calculator” language as my ad hoc scanner. You will need to implement the algorithm in Fig. 2.11 in Scala using the starting program provided on Coursesite. The table in Fig, 2.12 is included in the file table.txt on Coursesite.ProcedureCreate a folder to hold the project, including the Scala source code file (TableDrivenScanner.scala), the table file (table.txt) and the test file (testexpr.txt).Fill in the comment at the top of the TableDrivenScanner.scala file with your name and email.Fill in the provided starter version of TableDrivenScanner.scala with code to implement the table driven scanner.Your program must be able to be run by typing “sbt run” from the project folder.When your program is working, zip up the folder and upload it to CourseSite.Notes on writing the code (you might want to read this with the book open to page 66):a. state and token at the top of Fig 2.11 are types, not variables. In particular, they are Ints that have a given range of values. The range of values can be ignored in your code.b. The arrays scan_tab and token_tab need to be read in from the file table.txt. Study Fig 2.12 to understand the contents of this file. token_tab is filled in from the last column of the table; scan_tab from the rest of the table. I have already provided keyword_tab already filled as a Scala Map.c. remembered_chars is defined as a “list of char”. You can define this in whatever is most convenient, perhaps a List[Char] or just a String or StringBuffer.d. There are no “repeat” or “loop” structures in Scala (although, as we’ll see later, we could add them to the language!). These are probably best implemented as while loops.e. In addition to a method for reading a char from the input file you need an “unread” method that puts a character back. This could just be a matter of subtracting 1 from the current character index. (see nextchar from the ad hoc scanner)f. What you use for e will depend on what type you use for remembered_chars. Perhaps just an empty string if remembered_chars is a string.g. The columns in the table represent characters, actually character categories, so there needs to be some sort of conversion. For instance, if you read the character ‘5’, this needs to be treated as a digit.h. Rather than the tuple

indicated in Fig 2.11, the return value (from nexttoken) should be the same as the ad hoc parser - one if the case object tokens and in the case of Number and Id it should include the image string. E.g. .234 is returned as Number(.234).Your program will be graded based on correctness, style, and efficiency. There is a 10% penalty off the top for each day that the program is late. On the third day after the due date the submission has no point value. There will be no extensions.本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected] 微信:codehelp QQ:99515681 或邮箱:[email protected] 微信:codehelp

你可能感兴趣的:(Scala代写:CSE262 Table Driven Scanner代写R编程、R语言程序帮写)