99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代做COP 3402、代寫Python/c++語(yǔ)言程序
代做COP 3402、代寫Python/c++語(yǔ)言程序

時(shí)間:2025-02-14  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



University of Central Florida
School of Electrical Engineering & Computer Science
COP 3402: System Software
Spring 2025

Homework #2 (Lexical Analyzer)
 
Due Sunday, February 16th, 2025 by 11:59 p.m. 
Goal:
In this assignment your team have to implement a lexical analyzer for the programming language PL/0. Your program must be capable to read in a source program written in PL/0, identify some errors, and produce, as output, the source program, the source program lexeme table, and the token list. For an example of input and output refer to Appendix A. In the next page we show you the grammar for the programming language PL/0 using the extended Backus-Naur Form (EBNF).

You will use the given Context Free Grammar (see next page) to identify all symbols the programming language provides you with.  These symbols are shown below:

Reserved Words: const, var, procedure, call, begin, end, if, fi, then, else, while, do, read, write.        
Special Symbols: ‘+’, ‘-‘, ‘*’, ‘/’, ‘(‘, ‘)’, ‘=’, ’,’ , ‘.’, ‘ <’, ‘>’,  ‘;’ , ’:’ .
Identifiers: identsym = letter (letter | digit)* 
Numbers: numbersym = (digit)+
Invisible Characters: tab, white spaces, newline
Comments denoted by: /* . . .   */

Refer to Appendix B for a declaration of the token symbols that may be useful.


In this assignment, you will not check syntax.


Example1: program written in PL/0:

var x, y;
x := y * 2.

Use these rules to read PL/0 grammar expressed in EBNF.

1.- [ ] means an optional item, 
2.- { } means repeat 0 or more times.
3.- Terminal symbols are enclosed in quote marks.
4.- Symbols without quotes are called no-terminals or a syntactic class.
5.-A period is used to indicate the end of the definition of a syntactic class.
6.-The symbol ‘::=’ is read as ‘is defined as’; for example, the following syntactic class:

program ::= block ".".  

must be read as follows: 
a program    is defined as    a block followed by a   dot.
   program             ::=                   block                                ".".  

Context Free Grammar for PL/0 expressed in EBNF.

program ::= block "." . 
block ::= const-declaration  var-declaration  proc-declaration statement.    
const-declaration ::= [ “const” ident "=" number {"," ident "=" number} “;"].    
var-declaration  ::= [ "var" ident {"," ident} “;"].
proc-declaration::= {"procedure" ident ";" block ";" } .
statement   ::= [ ident ":=" expression
| "call" ident
              | "begin" statement { ";" statement } "end" 
              | "if" condition "then" statement "fi"
        | "if" condition "then" statement “else" statement fi"
             | "while" condition "do" statement
        | “read” ident
| “write” ident
              | empty ] . 
 
condition ::=  expression  rel-op  expression.
  
rel-op ::= "="|“<>"|"<"|"<="|">"|">=“.
expression ::= term { ("+"|"-") term}.
term ::= factor {("*"|"/") factor}. 
factor ::= ident | number | "(" expression ")“.

In this assignment, you will identify valid PL/0 symbols and then translate them into an internal representation called “Tokens”.

Lexical Grammar for PL/0 expressed in EBNF.

ident ::= letter {letter | digit}.
letter ::= "a" | "b" | … | "y" | "z" | "A" | "B" | ... | "Y" | "Z".
number ::= digit {digit}.
digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9“.
Lexical Conventions for PL/0:
A numerical value is assigned to each token (internal representation) as follows: 
skipsym = 1, identsym = 2, numbersym = 3, plussym = 4, minussym = 5, 
multsym = 6,  slashsym = 7, fisym = 8,  eqlsym = 9, neqsym = 10, lessym = 11, leqsym = 12, gtrsym = 13, geqsym = 14, lparentsym = 15, rparentsym = 16, commasym = 17, semicolonsym = 18, periodsym = 19, becomessym = 20, 
beginsym = 21, endsym = 22, ifsym = 23, thensym = 24, whilesym = 25, dosym = 26, callsym = 27, constsym = 28, varsym = 29, procsym = 30, writesym = 31, 
readsym = 32, elsesym = 33.


Example2: program written in PL/0:

var w, x;
read w;
begin
   x:= 4;
   if w > x then
    w:= w + 1
   else
    w:= x;
   fi
end
write w. 


Remember, in this assignment, you will not check syntax.

For the scanner 
x := y + 7;          and          + 7 ; x y :=   are valid inputs
Constraints:
Input:
1.Identifiers can be a maximum of 11 characters in length.
2.Numbers can be a maximum of 5 digits in length.
3.Comments should be ignored and not tokenized.
4.Invisible Characters should be ignored and not tokenized.

Output:
1.The token separator in the output's Lexeme List (Refer to Appendix A) can be either a space or a bar ('|').
2.In your output's Lexeme List, identifiers must show the token and the variable name separated by a space or bar.
3.In your output's Token list, numbers must show the token and the value separated by a space or bar. The value must be transformed into ASCII Representation.
4.Be consistent in output. Choose either bars or spaces and stick with them.
5.The token representation of the Token list will be used in the Parser (HW3). So, PLAN FOR IT!

Detect the Following Lexical Errors:

1.Number too long.
2.Name too long.
3.Invalid symbols.

Hint: You could create a transition diagram (DFS) to recognize each lexeme on the source program and once accepted generate the token, otherwise emit an error message.
 
Submission Instructions:
Submit to Webcourse:
1. Source code. (lex.c) 
2. Instructions to use the program in a readme document.
3. One run containing the input file (Source Program), and output file. The output file must show:  
 (Source,  Lexeme Table(lexeme-token), Token List)

Appendix A:

If the input is:
var x, y;
begin
    y := 3;
    x := y + 56;
end.

The output will be:
Source Program:
var x, y;
begin
    y := 3;
    x := y + 56;
end.

Lexeme Table:

lexeme    token type     
var        29        
x        2
,        17        
y        2
;        18
begin        21
y        2
:=        20
3        3
;        18
x        2
:=          20        
y        2
+        4
56        3
;        18
end         22
.        19

Token List:
29 2 x 17 2 y 18 21 2 y 20 3 3 18 2 x 20 2 y 4 3 56 18 22 19
 
Appendix B:

Declaration of Token Types:
typedef enum { 
skipsym = 1, identsym, numbersym, plussym, minussym,
multsym,  slashsym, fisym, eqsym, neqsym, lessym, leqsym,
gtrsym, geqsym, lparentsym, rparentsym, commasym, semicolonsym,
periodsym, becomessym, beginsym, endsym, ifsym, thensym, 
whilesym, dosym, callsym, constsym, varsym, procsym, writesym,
readsym , elsesym} token_type;


Example of Token Representation:
“29  2 x  17  2 y 18  21  2 x 21  2 y 4  3 56 18  22  19”

Is Equivalent:
varsym identsym  x  commasym  identsym  y  semicolonsym  beginsym  identsym  x
becomessym identsym y plussym numbersym 56 semicolonsym endsym periodsym

 
Appendix C:

Example of a PL/0 program: 
const m = 7, n = 85;  
var  i,x,y,z,q,r;  
procedure mult; 
   var a, b;  
  begin 
     a := x;  b := y; z := 0;   
     while b > 0 do    
     begin 
        if x =1 then z := z+a fi;       
        a := 2*a; 
        b := b/2;     
     end   
  end;

begin
  x := m;
  y := n;
  call mult;
end.


Find out the output for this example!


Rubric:

Integrity:
Plagiarism or Resubmission of Old Programs: -100 points
Compilation & Execution:
Programs That Don't Compile: -100 points
Program Cannot Reproduce any output in the terminal: -10 points
Program is white-space dependent: -10 points
For example, a+b should be properly tokenized.
For example, 4hello is two tokens: a number and an identifier.
Submission Files:
Missing lex.c: -100 points
Missing readme File: -5 points
Missing Input or Output File: -5 points
Partial Missing: -2.5 points for either input or output file
Lexical Error Detection:
Not Detecting All Three Lexical Errors: -15 points
Each lexical error detection is worth 5 points.
Output Formatting:
Output Significantly Unaligned with Appendix A: -5 points
Late Submissions:
One Day Late: -10 points
Two Days Late: -20 points

No email submission will be accepted. 

請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp




 

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:CP414編程代寫、代做Java/Python程序
  • 下一篇:代做Operating Systems 、代寫C++程序語(yǔ)言
  • 無(wú)相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評(píng)軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計(jì)優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開(kāi)團(tuán)工具
    出評(píng) 開(kāi)團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
  • 短信驗(yàn)證碼 目錄網(wǎng) 排行網(wǎng)

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                成人av网站免费| 国内精品伊人久久久久av一坑| 欧美大白屁股肥臀xxxxxx| 99视频精品全部免费在线| 国产一区视频网站| 国产在线观看免费一区| 蜜臀久久99精品久久久久久9| 亚洲尤物视频在线| 亚洲一卡二卡三卡四卡五卡| 亚洲制服丝袜在线| 亚洲一区免费在线观看| 亚洲午夜一区二区三区| 亚洲国产日韩一区二区| 日韩电影在线免费| 美洲天堂一区二卡三卡四卡视频| 久色婷婷小香蕉久久| 国内精品视频一区二区三区八戒 | 91亚洲精品乱码久久久久久蜜桃| 成人免费黄色在线| av一区二区三区黑人| 一本到不卡精品视频在线观看| 97精品久久久午夜一区二区三区 | 欧美三级在线视频| 日韩三级中文字幕| 国产无遮挡一区二区三区毛片日本| 久久久久国产成人精品亚洲午夜 | av动漫一区二区| 欧美在线999| 日韩午夜电影在线观看| 久久久久久久久蜜桃| 国产精品丝袜在线| 亚洲v日本v欧美v久久精品| 99精品黄色片免费大全| 色综合久久六月婷婷中文字幕| 欧美性生活影院| 久久蜜桃av一区精品变态类天堂| 中文字幕中文字幕一区| 亚洲第一av色| 国产精品一区二区x88av| 91浏览器打开| 欧美大片日本大片免费观看| 国产精品青草综合久久久久99| 一区二区三区日韩欧美精品| 七七婷婷婷婷精品国产| 91在线视频免费观看| 日韩欧美中文字幕精品| 亚洲免费高清视频在线| 激情综合网av| 欧美日韩一区不卡| 久久精品人人做人人爽人人| 亚洲综合一二区| 成人免费高清在线| 26uuu色噜噜精品一区| 亚洲欧洲综合另类| 成人在线视频一区二区| 精品伦理精品一区| 日韩在线观看一区二区| zzijzzij亚洲日本少妇熟睡| 欧美一级爆毛片| 一区二区三区在线免费视频| 国产又黄又大久久| 欧美日韩国产中文| 一区二区三区日韩| 91年精品国产| 最新不卡av在线| 成人污视频在线观看| 久久综合久久综合久久综合| 无吗不卡中文字幕| 在线亚洲一区观看| 亚洲色图在线看| av电影天堂一区二区在线 | 色一情一乱一乱一91av| 国产精品久久毛片a| 国产精品99久久久久久似苏梦涵| 日韩片之四级片| 日本一区中文字幕 | 久久亚洲精精品中文字幕早川悠里 | 欧美乱妇15p| 亚洲综合无码一区二区| 色丁香久综合在线久综合在线观看| 国产免费成人在线视频| 国产精品一区二区在线观看不卡 | 国产最新精品免费| 国产婷婷色一区二区三区在线| 久久国产精品区| 精品国产乱码久久| 国产精品一区二区三区网站| 精品成人在线观看| 国产一区二区三区不卡在线观看| www国产成人| 国产精品亚洲一区二区三区在线| 久久精品人人做人人爽人人| 国产成人无遮挡在线视频| 久久蜜桃av一区精品变态类天堂| 国产精品 欧美精品| 欧美激情综合在线| 色综合久久88色综合天天免费| 成人免费在线视频| 欧美三级资源在线| 久久99精品国产91久久来源| 国产亚洲一区二区三区四区| 成人性视频免费网站| 一区二区三区在线视频免费观看 | 麻豆精品国产91久久久久久| 精品久久五月天| 91视频在线看| 久久精品国产久精国产爱| 欧美激情在线看| 欧美猛男男办公室激情| 韩国视频一区二区| 中文字幕一区二区三区av| 欧美日本一区二区三区| 久久66热偷产精品| 亚洲视频狠狠干| 日韩欧美黄色影院| 日本韩国精品在线| 国产一区在线观看视频| 亚洲美女少妇撒尿| 久久久久久久综合日本| 欧美性大战久久| 国产麻豆欧美日韩一区| 亚洲高清视频的网址| 国产精品萝li| 日韩欧美自拍偷拍| 欧美色手机在线观看| 国产原创一区二区| 日韩va亚洲va欧美va久久| 国产精品第四页| 精品国产一区二区亚洲人成毛片| 不卡一区在线观看| 国产在线视频一区二区| 一二三区精品视频| 亚洲视频图片小说| 国产午夜亚洲精品理论片色戒 | 99精品国产91久久久久久| 蜜臀va亚洲va欧美va天堂| 一区二区三区**美女毛片| 久久久久亚洲综合| 日韩亚洲欧美综合| 欧美日韩另类国产亚洲欧美一级| 岛国一区二区三区| 国产资源在线一区| 老司机一区二区| 天天射综合影视| 午夜a成v人精品| 亚洲二区在线观看| ...中文天堂在线一区| 国内精品自线一区二区三区视频| 欧美日韩日本视频| 亚洲精品久久久蜜桃| 欧美大片一区二区三区| 欧美视频中文一区二区三区在线观看| 成人免费视频一区二区| 国产成人在线网站| 国产精品一区专区| eeuss鲁片一区二区三区在线看| 韩国成人精品a∨在线观看| 久久99这里只有精品| 激情成人午夜视频| 国产在线一区二区综合免费视频| 精品亚洲免费视频| 国产主播一区二区三区| 国产成人av一区二区三区在线 | 国产精品久久久久久久久免费桃花 | 日本最新不卡在线| 国产一区二区福利视频| 国产精品一区一区三区| 成人综合在线视频| 色吊一区二区三区| 91精品国产麻豆| 精品国产免费久久| 国产精品五月天| 一区二区三区在线视频观看| 午夜精品爽啪视频| 国产在线日韩欧美| www.在线欧美| 欧美美女视频在线观看| 日韩一区二区中文字幕| 国产日韩欧美麻豆| 亚洲国产精品一区二区久久| 日韩一区精品字幕| 国产成人免费视频网站高清观看视频 | 欧美激情艳妇裸体舞| 亚洲国产一区二区三区青草影视| 日韩经典一区二区| 国产成人久久精品77777最新版本| 91视视频在线观看入口直接观看www | 中文字幕免费不卡在线| 亚洲一区二区影院| 精彩视频一区二区| 色www精品视频在线观看| 欧美高清视频在线高清观看mv色露露十八| 日韩欧美一二三四区| 中文字幕不卡一区| 免费观看久久久4p| 在线免费观看一区| 中文乱码免费一区二区| 天天影视色香欲综合网老头| 丁香六月综合激情| 欧美成人三级在线|