CSCI3136留学生作业代做、代写symbol denotes作业、代写Java语言作业、Java编程语言作业调试代写留学生Prolog|代做R语言编程

CSCI3136Assignment 5�1. [40 marks] Write a recursive descent parser for the language generated by the grammar:Figure 1: A grammar for the Splat language.The terminal int denotes an integer, string denotes a double quoted string, e.g., helloworld and the terminal symbol denotes a symbol, e.g., myVar.�CS-2100 CSCI3136 Summer 2019 Assignment 5You should use the scanner that you built (or the solution provided) as the front end to theparser. That is, the scanner will take input from stdin and generate tokens, which the parserwill then use. See the provided test cases for examples of input.The output of your parser should be the list of productions being applied (in order) as theparser parses the input. If the token stream to your parser represents a valid program, theparser should terminate after all productions have been applied (and printed). If the parsercannot finish parsing (the token stream does not represent a valid program, the last line ofoutput should be: Syntax ErrorThe format of the productions that are to printed by the parser as they are being appliedare of the form: LHS -> RHS where the LHS is a variable as shown in Figure 1 and the RHSconsists of terminals and and variables, where terminals are depicted in single quotes, exceptfor integers, strings, and symbols.symbol is denoted by symbol(x) where x is the symbol name, e.g., symbol(myVar)integer is denoted by int(v) where v is the integer value, e.g., int(42)string is denoted by string(s) where s is the string in double quotes, e.g.,string(Hello World)For example, the outputs for the following the programProgram: Hello + myVar Program: 42 +S -> E_LISTE_LIST -> EXPR E_TAILEXPR -> SEXPRSEXPR -> ANDOP S_TAILAMDOP -> RELOP A_TAILRELOP -> TERM R_TAILTERM -> FACTOR T_TAILFACTOR -> VALUE F_TAILVALUE -> LITERALLITERAL -> string(Hello)F_TAIL -> epsilonT_TAIL -> ’+’ TERMTERM -> FACTOR T_TAILFACTOR -> VALUE F_TAILVALUE -> SYMBOLSYMBOL -> symbol(myVar)F_TAIL -> epsilonT_TAIL -> epsilonR_TAIL -> epsilonA_TAIL -> epsilonS_TAIL -> epsilonE_TAIL -> epsilonS -> E_LISTE_LIST -> EXPR E_TAILEXPR -> SEXPRSEXPR -> ANDOP S_TAILAMDOP -> RELOP A_TAILRELOP -> TERM R_TAILTERM -> FACTOR T_TAILFACTOR -> VALUE F_TAILVALUE -> LITERALLITERAL -> int(42)F_TAIL -> epsilonT_TAIL -> ’+’ TERMTERM -> FACTOR T_TAILFACTOR -> VALUE F_TAILSyntax ErrorA set of test cases is provided on Brightspace in the file tests_5.zip The sample solutiontakes about 160 lines of code (not counting the scanner).2CSCI3136 Summer 2019 Assignment 5You may implement your parser in any language that you wish, but it must be runnable onthe bluenose server. Since the choice of language is up to you, you must provide a standardscript called runme.sh to run your parser. For example the script for a Java solution lookslike:#!/bin/sh# if your implementation requires compilation include the command herejavac SplatParser.java# Command to run your programjava SplatParserPlease submit your code, along with a runme.sh script via brightspace.2. [10 marks] Give a PDA (Pushdown Automata) that recognizes the languageL = {σ ∈ {x, y, z}| 2|σ|x = |σ|y ∨ 2|σ|y = |σ|z}You can choose whether your PDA accepts by empty stack or final state, but make sure youclearly note, which acceptance is assumed.3CSCI3136: Assignment 5Summer 2019Student Name Login ID Student Number Student SignatureMarkQuestion 1 /40Functionality /20Structure /20Question 2 /10Total /50Comments:Assignments are due by 9:00am on the due date. Assignments must be submitted electronicallyvia Brightspace. Please submit zip file of the code and a PDF for the written work. You cando your work on paper and then scan in and submit the assignment.Plagiarism in assignment answers will not be tolerated. By submitting their answers to thisassignment, the authors named above declare that its content is their original work and thatthey did not use any sources for its preparation other than the class notes, the textbook, andones explicitly acknowledged in the answers. Any suspected act of plagiarism will be reportedto the Facultys Academic Integrity Officer and possibly to the Senate Discipline Committee.The penalty for academic dishonesty may range from failing the course to expulsion from theuniversity, in accordance with Dalhousie Universitys regulations regarding academic integrity.本团队核心人员组成主要包括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

你可能感兴趣的:(CSCI3136留学生作业代做、代写symbol denotes作业、代写Java语言作业、Java编程语言作业调试代写留学生Prolog|代做R语言编程)