freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

編譯原理與實踐中英雙語版上ppt(已改無錯字)

2023-03-24 09:48:46 本頁面
  

【正文】 iler. The step of generating Code is as follows. First, create a mechanism for allocating temporaries. In fact, the temporaries should be recycled, that is they should be reused after they are no longer needed in the current subexpression. Second, determine the name of the temporary that uses arguments and return values. So, this section of code generator consists of generating code for a binary operator, generating code for a copy instruction, generating code for an instruction which loads the argument into a register, and then write it onto the new stack frame, including the standard call sequence and the standard return sequence. . 49 ? (ANSI C code generator for the vc piler) 50 51 52 53 54 55 Compiler example 2 for using Flex tool ? The steps of running the Lex tool are: ? 1. Download the source code of Flex tool from the website below. 56 ? Some other websites of piler source code are shown below ? ? ? ? ? ? ? ? ? ? 57 ? 2. Enter the DOS operating system. (start menu→accessory→mand prompt) ? a text file:, the text file content are as below 58 ? the mand of rename : rename ? the piled mand to produce the C piled file : flex ? the mand of TC to pile into : tc ? the key F9 to produce file of ? click on the file to run the flex tool. ? The result of LEX scanner tool is shown by . Chapter 2 Grammar and Formal Language Zhang Jing, Yu SiLiang College of Computer Science amp。 Technology Harbin Engineering University 60 ? The goal of this chapter is to help readers to review some basic knowledge of mathematics that is related with the theory of piler, and understand the mathematics symbolic language—formal language. In specific, we shall talk about the concepts of string, grammar, parser tree, formal language and so on. All the concepts are the basic knowledge for reader and will benefit them to go through the following chapters. 61 String ? – finite character set , and it is nonempty set. For example, A={ a, b, c, … , z } , B={ 0, 1} , A and B are alphabets. ? 2. String String is a sequence of characters, empty string can be represented byε,Usually small letters represent string. 62 For example, If there is alphabet A={ a, b, c} , The characters of it are a, b, c . The strings are a, b, c, ab, ac, aa, abc , … Alphabet B= { 0, 1} , the characters correspond to it are 0,1 The strings are 0, 1, 00, 01, 10, 11, 000, … , 01000, … ? Note: If the character order is not same, the string is different as well. For example, string ―ab‖ and ―ba‖ are not same. 001 and 010 are different string. . 63 ? 3. String Length The length of string is the number of characters. The string is x, the length of string is |x|. Take alphabet B for example, |01|=2, |000|=3,|01000|=5, The length of null string, |ε|=0 ? of string There are strings x and y, write down y after x, namely, ―xy‖, we call ―xy‖ as the connection of string x and y . . If there are x=abc , y=de, then xy=abcde, yx=deabc Note: εx=xε=x 64 ? of string If x is string, then x2=xx x3=xxx …… xn=xx…x=x n1x=xxn1 xn is the n power of x x0=ε There is x=aTb, so the power of x and length of it are as follows. x0=ε | x0|=0 x1= aTb | x1|=3 x2= aTb aTb | x2|=6 x3= aTb aTb aTb | x3|=9 65 ? and tail of string z=xy is string, the head of z is x, the tail of z is y. if y≠ε, we call the x is true head of z. Similarly, if x≠ε, y is the tail of z and it is true tail. . There is string of u = abc, so the heads of u areε、a、 ab、 abc, true head of it are ε、 a、 ab, the tails of u areε、 c、 bc、 abc, true tails of it are ε、 c、bc . . 66 ? of string A and B A and B are strings, the product of them is AB={ xy|(x∈ A)∧ (y∈ B)} This means that AB is the set where x belongs to A and y belongs to B . There are set A={ a, b} , B={ 0,1} , so, AB={ a0, a1, b0, b1} ? Note: { ε} A=A{ ε} =A 67 ? 8. Power set of string A is set of string, the power of the set A is A0={ ε} A1=A …… An=AA…A =AA n1=An1A There is A={ a, b} , then A0={ ε} A2={ a, b}{ a, b} ={ aa, ab, ba, bb} A3={ aaa, aab, aba, abb, baa, bab, bba, bbb} Length of A2 is 4 (namely, 22=4), while length of A3 is 8 (namely, 23=8) 68 ? 9. Positive closure of string set The positive closure of string set can be written as A+=A1∪ A2∪ … ∪ An∪ … If A={ a, b} , then A+={ a, b} ∪ { aa, ab, ba, bb} ∪ … ={ a, b, aa, ab, ba, bb, aaa, … , bbb, … } ? 10. Closure of string set The closure of string set A is written as A* A*=A0∪ A+={ ε} ∪ A+ If A={ a, b} , so A* ={ ε, a, b, aa, ab, ba, bb, aaa, …, bbb, … } 69 Grammar and Formal language ? We know that piling procedure includes scanner, parser, semantic analyzer and so on. How do they work? What is the principle of them? Is there any rule between them
點擊復制文檔內容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1