Scanner Termination. Multi Character Lookahead
|
|
- Agnes Beatrix Harrington
- 5 years ago
- Views:
Transcription
1 If d.doublevlue() represents vlid integer, (int) d.doublevlue() will crete the pproprite integer vlue. If string representtion of n integer begins with ~ we cn strip the ~, convert to double nd then negte the resulting vlue. Scnner Termintion A scnner reds input chrcters nd prtitions them into tokens. Wht hppens when the end of the input file is reched? It my be useful to crete n Eof pseudochrcter when this occurs. In Jv, for exmple, InputStrem.red(), which reds single byte, returns - 1 when end of file is reched. A constnt, EOF, defined s - 1 cn be treted s n extended ASCII chrcter. This chrcter then llows the definition of n Eof token tht cn be pssed bck to the prser. An Eof token is useful becuse it llows the prser to verify tht the logicl end of progrm corresponds to its physicl end Most prsers require n end of file token. Lex nd Jlex utomticlly crete n Eof token when the scnner they build tries to scn n EOF chrcter (or tries to scn when eof() is true). Multi Chrcter Lookhed We my llow finite utomt to look beyond the next input chrcter. This feture is necessry to implement scnner for FORTRAN. In FORTRAN, the sttement DO 10 J = 1,100 specifies loop, with index J rnging from 1 to 100. The sttement DO 10 J = is n ssignment to the vrible DO10J. (Blnks re not significnt except in strings.) A FORTRAN scnner decides whether the O is the lst chrcter of DO token only fter reding s fr s the comm (or period)
2 A milder form of extended lookhed problem occurs in Pscl nd Ad. The token is rel literl, wheres is three different tokens. We need two- chrcter lookhed fter the 10 prefix to decide whether we re to return 10 (n integer literl) or ( rel literl). Suppose we use the following FA. D. D.. Given we scn three chrcters nd stop in nonccepting stte. Whenever we stop reding in non- ccepting stte, we bck up long ccepted chrcters until n ccepting stte is found. Chrcters we bck up over re rescnned to form lter tokens. If no ccepting stte is reched during bckup, we hve lexicl error. D D Performnce Considertions Becuse scnners do so much chrcter- level processing, they cn be rel performnce bottleneck in production compilers. Speed is not concern in our project, but let s see why scnning speed cn be concern in production compilers. Let s ssume we wnt to compile t rte of 5000 lines/sec. (so tht most progrms compile in just few seconds). Assuming 30 chrcters/line (on verge), we need to scn 150,000 chr/sec. A key to efficient scnning is to group chrcter- level opertions whenever possible. It is better to do one opertion on n chrcters rther thn n opertions on single chrcters. In our exmples we ve red input one chrcter s time. A subroutine cll cn cost hundreds or thousnds of instructions to execute fr too much to spend on single chrcter. We prefer routines tht do block reds, putting n entire block of chrcters directly into buffer. Specilized scnner genertors cn produce prticulrly fst scnners. The GLA scnner genertor clims tht the scnners it produces run s fst s:
3 } while(c!= Eof) { c = getchr(); Lexicl Error Recovery A chrcter sequence tht cn t be scnned into ny vlid token is lexicl error. Lexicl errors re uncommon, but they still must be hndled by scnner. We won t stop compiltion becuse of so minor n error. Approches to lexicl error hndling include: Delete the chrcters red so fr nd restrt scnning t the next unred chrcter. Delete the first chrcter red by the scnner nd resume scnning t the chrcter following it. Both of these pproches re resonble The first is esy to do. We just reset the scnner nd begin scnning new. The second is bit hrder but lso is bit sfer (less is immeditely deleted). It cn be implemented using scnner bckup. Usully, lexicl error is cused by the ppernce of some illegl chrcter, mostly t the beginning of token. (Why t the beginning?) In these cse, the two pproches re equivlent. The effects of lexicl error recovery might well crete lter syntx error, hndled by the prser. Consider...for$tnight... The $ termintes scnning of for. Since no vlid token begins with $, it is deleted. Then tnight is scnned s n identifier. In effect we get...for tnight... which will cuse syntx error. Such flse errors re unvoidble, though syntctic error- repir my help
4 Error Tokens Certin lexicl errors require specil cre. In prticulr, runwy strings nd runwy comments ought to receive specil error messges. In Jv strings my not cross line boundries, so runwy string is detected when n end of line is red within the string body. Ordinry recovery rules re inpproprite for this error. In prticulr, deleting the first chrcter (the double quote chrcter) nd restrting scnning is bd decision. It will lmost certinly led to cscde of flse errors s the string text is inppropritely scnned s ordinry input. One wy to hndle runwy strings is to define n error token. An error token is not vlid token; it is never returned to the prser. Rther, it is pttern for n error condition tht needs specil hndling. We cn define n error token tht represents string terminted by n end of line rther thn double quote chrcter. For vlid string, in which internl double quotes nd bck slshes re escped (nd no other escped chrcters re llowed), we cn use " ( Not( " Eol \ ) \" \\ )* " For runwy string we use " ( Not( " Eol \ ) \" \\ )* Eol (Eol is the end of line chrcter.) When runwy string token is recognized, specil error messge should be issued. Further, the string my be repired into correct string by returning n ordinry string token with the closing Eol replced by double quote. This repir my or my not be correct. If the closing double quote is truly missing, the repir will be good; if it is present on succeeding line, cscde of inpproprite lexicl nd syntctic errors will follow. Still, we hve told the progrmmer exctly wht is wrong, nd tht is our primry gol. In lnguges like C, C+ +, Jv nd CSX, which llow multiline comments, improperly terminted (runwy) comments present similr problem. A runwy comment is not detected until the scnner finds close comment symbol (possibly belonging to some other comment) or until the end of file is reched. Clerly specil, detiled error messge is required. Let s look t Pscl- style comments tht begin with { nd end with }. Comments tht begin nd end with pir of chrcters, like /* nd */ in Jv, C nd C+ +, re bit trickier
5 Correct Pscl comments re defined quite simply: { Not( } )* } To hndle comments terminted by Eof, this error token cn be used: { Not( } )* Eof We wnt to hndle comments unexpectedly closed by close comment belonging to nother comment: {... missing close comment... { norml comment }... We will issue wrning (this form of comment is lexiclly legl). Any comment contining n open comment symbol in its body is most probbly missing } error. We split our legl comment definition into two token definitions. The definition tht ccepts n open comment in its body cuses wrning messge ("Possible unclosed comment") to be printed. We now use: { Not( { } )* } nd { (Not( { } )* { Not( { } )* )+ } The first definition mtches correct comments tht do not contin n open comment in their body. The second definition mtches correct, but suspect, comments tht contin t lest one open comment in their body Single line comments, found in Jv, CSX nd C+ +, re terminted by Eol. They cn fll prey to more subtle error wht if the lst line hs no Eol t its end? The solution? Another error token for single line comments: // Not(Eol) * This rule will only be used for comments tht don t end with n Eol, since scnners lwys mtch the longest rule possible. Regulr Expressions nd Finite Automt Regulr expressions re fully equivlent to finite utomt. The min job of scnner genertor like JLex is to trnsform regulr expression definition into n equivlent finite utomton. It first trnsforms regulr expression into nondeterministic finite utomton (NFA). Unlike ordinry deterministic finite utomt, n NFA need not mke unique (deterministic) choice of successor stte to visit. As shown below, n NFA is llowed to hve stte tht hs two trnsitions (rrows) coming
6 out of it, lbeled by the sme symbol. An NFA my lso hve trnsitions lbeled with. trnsition lbeled or first follow the trnsition (you cn lwys find wherever you look for it) nd then follow n trnsition. FAs tht contin no trnsitions nd tht lwys hve unique successor sttes for ny symbol re deterministic. Trnsitions re normlly lbeled with individul chrcters in Σ, nd lthough is string (the string with no chrcters in it), it is definitely not chrcter. In the bove exmple, when the utomton is in the stte t the left nd the next input chrcter is, it my choose to use the Building Finite Automt From Regulr Expressions We mke n FA from regulr expression in two steps: Trnsform the regulr expression into n NFA. Trnsform the NFA into deterministic FA. The first step is esy. Regulr expressions re ll built out of the tomic regulr expressions (where is chrcter in Σ) nd by using the three opertions A B nd A B nd A *. Other opertions (like A + ) re just bbrevitions for combintions of these. NFAs for nd re trivil: Suppose we hve NFAs for A nd B nd wnt one for A B. We construct the NFA shown below: Finite Automton for A A Finite Automton for B B
7 The sttes lbeled A nd B were the ccepting sttes of the utomt for A nd B; we crete new ccepting stte for the combined utomton. A pth through the top utomton ccepts strings in A, nd pth through the bottom utomtion ccepts strings in B, so the whole utomton mtches A B. The construction for A B is even esier. The ccepting stte of the combined utomton is the sme stte tht ws the ccepting stte of B. We must follow pth through A s utomton, then through B s utomton, so overll A B is mtched. We could lso just merge the ccepting stte of A with the initil stte of B. We chose not to only becuse the picture would be more difficult to drw. Finite Automton for A Finite Automton for B A Finlly, let s look t the NFA for A *. The strt stte reches n ccepting stte vi, so is ccepted. Alterntively, we cn follow pth through the FA for A one or more times, so zero or more strings tht belong to A re mtched. Finite Automton for A A Creting Deterministic Automt The trnsformtion from n NFA N to n equivlent DFA D works by wht is sometimes clled the subset construction. Ech stte of D corresponds to set of sttes of N. The ide is tht D will be in stte {x, y, z} fter reding given input string if nd only if N could be in ny one of the sttes x, y, or z, depending on the trnsitions it chooses. Thus D keeps trck of ll the possible routes N might tke nd runs them simultneously. Becuse N is finite utomton, it hs only finite number of sttes. The number of subsets of N s sttes is lso finite, which mkes
8 trcking vrious sets of sttes fesible. An ccepting stte of D will be ny set contining n ccepting stte of N, reflecting the convention tht N ccepts if there is ny wy it could get to its ccepting stte by choosing the right trnsitions. The strt stte of D is the set of ll sttes tht N could be in without reding ny input chrcters tht is, the set of sttes rechble from the strt stte of N following only trnsitions. Algorithm close computes those sttes tht cn be reched following only trnsitions. Once the strt stte of D is built, we begin to crete successor sttes: We tke ech stte S of D, nd ech chrcter c, nd compute S s successor under c. S is identified with some set of N s sttes, {n 1, n 2,...}. We find ll the possible successor sttes to {n 1, n 2,...} under c, obtining set {m 1, m 2,...}. Finlly, we compute T = CLOSE({ m 1, m 2,...}). T becomes stte in D, nd trnsition from S to T lbeled with c is dded to D. We continue dding sttes nd trnsitions to D until ll possible successors to existing sttes re dded. Becuse ech stte corresponds to finite subset of N s sttes, the process of dding new sttes to D must eventully terminte. Here is the lgorithm for - closure, clled close. It strts with set of NFA sttes, S, nd dds to S ll sttes rechble from S using only trnsitions. void close(nfaset S) { while (x in S nd x y nd y notin S) { S = S U {y} }} Using close, we cn define the construction of DFA, D, from n NFA, N: DFA MkeDeterministic(NFA N) { DFA D ; NFASet T D.StrtStte = { N.StrtStte } close(d.strtstte) D.Sttes = { D.StrtStte } while (sttes or trnsitions cn be dded to D) { Choose ny stte S in D.Sttes nd ny chrcter c in Alphbet T = {y in N.Sttes such tht x c y for some x in S} close(t); if (T notin D.Sttes) { D.Sttes = D.Sttes U {T} D.Trnsitions = D.Trnsitions U {the trnsition S c T} } } D.AcceptingSttes = { S in D.Sttes such tht n ccepting stte of N in S} }
9 Exmple To see how the subset construction opertes, consider the following NFA: b 1 2 b b Stte 1 hs itself s successor under b. When stte 1 s - successor, 2, is included, {1,2} s successor is {1,2}. {3,4,5} s successors under nd b re {5} nd {4,5}. {4,5} s successor under b is {5}. Accepting sttes of D re those stte sets tht contin N s ccepting stte which is 5. The resulting DFA is: We strt with stte 1, the strt stte of N, nd dd stte 2 its - successor. D s strt stte is {1,2}. Under, {1,2} s successor is {3,4,5}. b 1,2 3,4,5 5 b 4,5 b It is not too difficult to estblish tht the DFA constructed by MkeDeterministic is equivlent to the originl NFA. The ide is tht ech pth to n ccepting stte in the originl NFA hs corresponding pth in the DFA. Similrly, ll pths through the constructed DFA correspond to pths in the originl NFA. Wht is less obvious is the fct tht the DFA tht is built cn sometimes be much lrger thn the originl NFA. Sttes of the DFA re identified with sets of NFA sttes. If the NFA hs n sttes, there re 2 n distinct sets of NFA sttes, nd hence the DFA my hve s mny s 2 n sttes. Certin NFAs ctully exhibit this exponentil blowup in size when mde deterministic. Fortuntely, the NFAs built from the kind of regulr expressions used to specify progrmming lnguge tokens do not exhibit this problem when they re mde deterministic. As rule, DFAs used for scnning re simple nd compct. If creting DFA is imprcticl (becuse of size or speed- ofgenertion concerns), we cn scn using n NFA. Ech possible pth through n NFA is trcked, nd rechble ccepting sttes re identified. Scnning is slower using this pproch, so it is used only when construction of DFA is not prcticl
10 Optimizing Finite Automt We cn improve the DFA creted by MkeDeterministic. Sometimes DFA will hve more sttes thn necessry. For every DFA there is unique smllest equivlent DFA (fewest sttes possible). Some DFA s contin unrechble sttes tht cnnot be reched from the strt stte. Other DFA s my contin ded sttes tht cnnot rech ny ccepting stte. It is cler tht neither unrechble sttes nor ded sttes cn prticipte in scnning ny vlid token. We therefore eliminte ll such sttes s prt of our optimiztion process. We optimize DFA by merging together sttes we know to be equivlent. For exmple, two ccepting sttes tht hve no trnsitions t ll out of them re equivlent. Why? Becuse they behve exctly the sme wy they ccept the string red so fr, but will ccept no dditionl chrcters. If two sttes, s 1 nd s 2, re equivlent, then ll trnsitions to s 2 cn be replced with trnsitions to s 1. In effect, the two sttes re merged together into one common stte. How do we decide wht sttes to merge together? We tke greedy pproch nd try the most optimistic merger of sttes. By definition, ccepting nd non- ccepting sttes re distinct, so we initilly try to crete only two sttes: one representing the merger of ll ccepting sttes nd the other representing the merger of ll non- ccepting sttes. This merger into only two sttes is lmost certinly too optimistic. In prticulr, ll the constituents of merged stte must gree on the sme trnsition for ech possible chrcter. Tht is, for chrcter c ll the merged sttes must hve no successor under c or they must ll go to single (possibly merged) stte. If ll constituents of merged stte do not gree on the trnsition to follow for some chrcter, the merged stte is split into two or more smller sttes tht do gree. As n exmple, ssume we strt with the following utomton: b c d b c Initilly we hve merged nonccepting stte {1,2,3,5,6} nd merged ccepting stte {4,7}. A merger is legl if nd only if ll constituent sttes gree on the sme successor stte for ll chrcters. For exmple, sttes 3 nd 6 would go to n ccepting stte given chrcter c; sttes 1, 2, 5 would not, so split must occur
11 We will dd n error stte s E to the originl DFA tht is the successor stte under ny illegl chrcter. (Thus reching s E becomes equivlent to detecting n illegl token.) s E is not rel stte; rther it llows us to ssume every stte hs successor under every chrcter. s E is never merged with ny rel stte. Algorithm Split, shown below, splits merged sttes whose constituents do not gree on common successor stte for ll chrcters. When Split termintes, we know tht the sttes tht remin merged re equivlent in tht they lwys gree on common successors. Split(FASet StteSet) { repet for(ech merged stte S in StteSet) { Let S correspond to {s 1,...,s n } for(ech chr c in Alphbet){ Let t 1,...,t n be the successor sttes to s 1,...,s n under c if(t 1,...,t n do not ll belong to the sme merged stte){ Split S into two or more new sttes such tht s i nd s j remin in the sme merged stte if nd only if t i nd t j re in the sme merged stte} } until no more splits re possible } Returning to our exmple, we initilly hve sttes {1,2,3,5,6} nd {4,7}. Invoking Split, we first observe tht sttes 3 nd 6 hve common successor under c, nd sttes 1, 2, nd 5 hve no successor under c (equivlently, hve the error stte s E s successor). This forces split, yielding {1,2,5}, {3,6} nd {4,7}. Now, for chrcter b, sttes 2 nd 5 would go to the merged stte {3,6}, but stte 1 would not, so nother split occurs. We now hve: {1}, {2,5}, {3,6} nd {4,7}. At this point we re done, s ll constituents of merged sttes gree on the sme successor for ech input symbol. Once Split is executed, we re essentilly done. Trnsitions between merged sttes re the sme s the trnsitions between sttes in the originl DFA. Thus, if there ws trnsition between stte s i nd s j under chrcter c, there is now trnsition under c from the merged stte contining s i to the merged stte contining s j. The strt stte is tht merged stte contining the originl strt stte. Accepting sttes re those merged sttes contining ccepting sttes (recll tht ccepting nd non- ccepting sttes re never merged)
12 Returning to our exmple, the minimum stte utomton we obtin is Properties of Regulr Expressions nd Finite Automt d b c 1 2,5 3,6 4,7 Some token ptterns cn t be defined s regulr expressions or finite utomt. Consider the set of blnced brckets of the form [ [ [ ] ] ]. This set is defined formlly s { [ m ] m m 1 }. This set is not regulr. No finite utomton tht recognizes exctly this set cn exist. Why? Consider the inputs [, [[, [[[,... For two different counts (cll them i nd j) [ i nd [ j must rech the sme stte of given FA! (Why?) Once tht hppens, we know tht if [ i ] i is ccepted (s it should be), the [ j ] i will lso be ccepted (nd tht should not hppen) R = V* - R is regulr if R is. Why? Build finite utomton for R. Be creful to include trnsitions to n error stte s E for illegl chrcters. Now invert finl nd non- finl sttes. Wht ws previously ccepted is now rejected, nd wht ws rejected is now ccepted. Tht is, R is ccepted by the modified utomton. Not ll subsets of regulr set re themselves regulr. The regulr expression [ + ] + hs subset tht isn t regulr. (Wht is tht subset?) Let R be set of strings. Define R rev s ll strings in R, in reversed (bckwrd) chrcter order. Thus if R = {bc, def} then R rev = {cb, fed}. If R is regulr, then R rev is too. Why? Build finite utomton for R. Mke sure the utomton hs only one finl stte. Now reverse the direction of ll trnsitions, nd interchnge the strt nd finl sttes. Wht does the modified utomtion ccept?
13 If R 1 nd R 2 re both regulr, then R 1 R 2 is lso regulr. We cn show this two different wys: 1. Build two finite utomt, one for R1 nd one for R2. Pir together sttes of the two utomt to mtch R1 nd R2 simultneously. The piredstte utomton ccepts only if both R1 nd R2 would, so R1 R2 is mtched. 2. We cn use the fct tht R1 R2 Reding Assignment Red Chpter 4 of Crfting Compiler is = R 1 R 2 We lredy know union nd complementtion re regulr Context Free Grmmrs Exmple A context- free grmmr (CFG) is defined s: A finite terminl set V t ; these re the tokens produced by the scnner. A set of intermedite symbols, clled non- terminls, V n. Prog { Stmts } Stmts Stmts ; Stmt Stmts Stmt Stmt id = Expr Expr id Expr Expr + id A strt symbol, designted nonterminl, tht strts ll derivtions. A set of productions (sometimes clled rewriting rules) of the form A X 1... X m X 1 to X m my be ny combintion of terminls nd non- terminls. If m = 0 we hve A which is vlid production
Scanner Termination. Multi Character Lookahead. to its physical end. Most parsers require an end of file token. Lex and Jlex automatically create an
Scnner Termintion A scnner reds input chrcters nd prtitions them into tokens. Wht hppens when the end of the input file is reched? It my be useful to crete n Eof pseudo-chrcter when this occurs. In Jv,
More informationAssignment 4. Due 09/18/17
Assignment 4. ue 09/18/17 1. ). Write regulr expressions tht define the strings recognized by the following finite utomt: b d b b b c c b) Write FA tht recognizes the tokens defined by the following regulr
More informationIn the last lecture, we discussed how valid tokens may be specified by regular expressions.
LECTURE 5 Scnning SYNTAX ANALYSIS We know from our previous lectures tht the process of verifying the syntx of the progrm is performed in two stges: Scnning: Identifying nd verifying tokens in progrm.
More informationCS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5
CS 536 Introduction to Programming Languages and Compilers Charles N. Fischer Lecture 5 CS 536 Spring 2015 1 Multi Character Lookahead We may allow finite automata to look beyond the next input character.
More informationCS321 Languages and Compiler Design I. Winter 2012 Lecture 5
CS321 Lnguges nd Compiler Design I Winter 2012 Lecture 5 1 FINITE AUTOMATA A non-deterministic finite utomton (NFA) consists of: An input lphet Σ, e.g. Σ =,. A set of sttes S, e.g. S = {1, 3, 5, 7, 11,
More informationFig.25: the Role of LEX
The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing
More informationDr. D.M. Akbar Hussain
Dr. D.M. Akr Hussin Lexicl Anlysis. Bsic Ide: Red the source code nd generte tokens, it is similr wht humns will do to red in; just tking on the input nd reking it down in pieces. Ech token is sequence
More informationDefinition of Regular Expression
Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll
More informationCS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis
CS143 Hndout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexicl Anlysis In this first written ssignment, you'll get the chnce to ply round with the vrious constructions tht come up when doing lexicl
More informationLexical analysis, scanners. Construction of a scanner
Lexicl nlysis scnners (NB. Pges 4-5 re for those who need to refresh their knowledge of DFAs nd NFAs. These re not presented during the lectures) Construction of scnner Tools: stte utomt nd trnsition digrms.
More informationCS412/413. Introduction to Compilers Tim Teitelbaum. Lecture 4: Lexical Analyzers 28 Jan 08
CS412/413 Introduction to Compilers Tim Teitelum Lecture 4: Lexicl Anlyzers 28 Jn 08 Outline DFA stte minimiztion Lexicl nlyzers Automting lexicl nlysis Jlex lexicl nlyzer genertor CS 412/413 Spring 2008
More informationReducing a DFA to a Minimal DFA
Lexicl Anlysis - Prt 4 Reducing DFA to Miniml DFA Input: DFA IN Assume DFA IN never gets stuck (dd ded stte if necessry) Output: DFA MIN An equivlent DFA with the minimum numer of sttes. Hrry H. Porter,
More informationLexical Error Recovery
Lexical Error Recovery A character sequence that can t be scanned into any valid token is a lexical error. Lexical errors are uncommon, but they still must be handled by a scanner. We won t stop compilation
More informationCS 432 Fall Mike Lam, Professor a (bc)* Regular Expressions and Finite Automata
CS 432 Fll 2017 Mike Lm, Professor (c)* Regulr Expressions nd Finite Automt Compiltion Current focus "Bck end" Source code Tokens Syntx tree Mchine code chr dt[20]; int min() { flot x = 42.0; return 7;
More informationLexical Analysis: Constructing a Scanner from Regular Expressions
Lexicl Anlysis: Constructing Scnner from Regulr Expressions Gol Show how to construct FA to recognize ny RE This Lecture Convert RE to n nondeterministic finite utomton (NFA) Use Thompson s construction
More informationCS 430 Spring Mike Lam, Professor. Parsing
CS 430 Spring 2015 Mike Lm, Professor Prsing Syntx Anlysis We cn now formlly descrie lnguge's syntx Using regulr expressions nd BNF grmmrs How does tht help us? Syntx Anlysis We cn now formlly descrie
More information2014 Haskell January Test Regular Expressions and Finite Automata
0 Hskell Jnury Test Regulr Expressions nd Finite Automt This test comprises four prts nd the mximum mrk is 5. Prts I, II nd III re worth 3 of the 5 mrks vilble. The 0 Hskell Progrmming Prize will be wrded
More informationCSE 401 Midterm Exam 11/5/10 Sample Solution
Question 1. egulr expressions (20 points) In the Ad Progrmming lnguge n integer constnt contins one or more digits, but it my lso contin embedded underscores. Any underscores must be preceded nd followed
More informationΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών
ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop
More informationECE 468/573 Midterm 1 September 28, 2012
ECE 468/573 Midterm 1 September 28, 2012 Nme:! Purdue emil:! Plese sign the following: I ffirm tht the nswers given on this test re mine nd mine lone. I did not receive help from ny person or mteril (other
More informationFinite Automata. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 21, 2015
Finite Automt Lecture 4 Sections 3.6-3.7 Ro T. Koether Hmpden-Sydney College Wed, Jn 21, 2015 Ro T. Koether (Hmpden-Sydney College) Finite Automt Wed, Jn 21, 2015 1 / 23 1 Nondeterministic Finite Automt
More informationTopic 2: Lexing and Flexing
Topic 2: Lexing nd Flexing COS 320 Compiling Techniques Princeton University Spring 2016 Lennrt Beringer 1 2 The Compiler Lexicl Anlysis Gol: rek strem of ASCII chrcters (source/input) into sequence of
More informationCSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011
CSCI 3130: Forml Lnguges nd utomt Theory Lecture 12 The Chinese University of Hong Kong, Fll 2011 ndrej Bogdnov In progrmming lnguges, uilding prse trees is significnt tsk ecuse prse trees tell us the
More informationLanguages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) *
Pln for Tody nd Beginning Next week Interpreter nd Compiler Structure, or Softwre Architecture Overview of Progrmming Assignments The MeggyJv compiler we will e uilding. Regulr Expressions Finite Stte
More informationLexical Error Recovery
Lexical Error Recovery A character sequence that can t be scanned into any valid token is a lexical error. Lexical errors are uncommon, but they still must be handled by a scanner. We won t stop compilation
More informationCS201 Discussion 10 DRAWTREE + TRIES
CS201 Discussion 10 DRAWTREE + TRIES DrwTree First instinct: recursion As very generic structure, we could tckle this problem s follows: drw(): Find the root drw(root) drw(root): Write the line for the
More informationLR Parsing, Part 2. Constructing Parse Tables. Need to Automatically Construct LR Parse Tables: Action and GOTO Table
TDDD55 Compilers nd Interpreters TDDB44 Compiler Construction LR Prsing, Prt 2 Constructing Prse Tles Prse tle construction Grmmr conflict hndling Ctegories of LR Grmmrs nd Prsers Peter Fritzson, Christoph
More informationCMSC 331 First Midterm Exam
0 00/ 1 20/ 2 05/ 3 15/ 4 15/ 5 15/ 6 20/ 7 30/ 8 30/ 150/ 331 First Midterm Exm 7 October 2003 CMC 331 First Midterm Exm Nme: mple Answers tudent ID#: You will hve seventy-five (75) minutes to complete
More informationCSCE 531, Spring 2017, Midterm Exam Answer Key
CCE 531, pring 2017, Midterm Exm Answer Key 1. (15 points) Using the method descried in the ook or in clss, convert the following regulr expression into n equivlent (nondeterministic) finite utomton: (
More informationLexical Analysis. Amitabha Sanyal. (www.cse.iitb.ac.in/ as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay
Lexicl Anlysis Amith Snyl (www.cse.iit.c.in/ s) Deprtment of Computer Science nd Engineering, Indin Institute of Technology, Bomy Septemer 27 College of Engineering, Pune Lexicl Anlysis: 2/6 Recp The input
More informationCS 321 Programming Languages and Compilers. Bottom Up Parsing
CS 321 Progrmming nguges nd Compilers Bottom Up Prsing Bottom-up Prsing: Shift-reduce prsing Grmmr H: fi ; fi b Input: ;;b hs prse tree ; ; b 2 Dt for Shift-reduce Prser Input string: sequence of tokens
More information10/12/17. Motivating Example. Lexical and Syntax Analysis (2) Recursive-Descent Parsing. Recursive-Descent Parsing. Recursive-Descent Parsing
Motivting Exmple Lexicl nd yntx Anlysis (2) In Text: Chpter 4 Consider the grmmr -> cad A -> b Input string: w = cd How to build prse tree top-down? 2 Initilly crete tree contining single node (the strt
More informationScanning Theory and Practice
CHAPTER 3 Scnning Theory nd Prctice 3.1 Overview The primry function of scnner is to red in chrcters from source file nd group them into tokens. A scnner is sometimes clled lexicl nlyzer or lexer. The
More informationTheory of Computation CSE 105
$ $ $ Theory of Computtion CSE 105 Regulr Lnguges Study Guide nd Homework I Homework I: Solutions to the following problems should be turned in clss on July 1, 1999. Instructions: Write your nswers clerly
More informationCompiler Construction D7011E
Compiler Construction D7011E Lecture 3: Lexer genertors Viktor Leijon Slides lrgely y John Nordlnder with mteril generously provided y Mrk P. Jones. 1 Recp: Hndwritten Lexers: Don t require sophisticted
More informationCompilers Spring 2013 PRACTICE Midterm Exam
Compilers Spring 2013 PRACTICE Midterm Exm This is full length prctice midterm exm. If you wnt to tke it t exm pce, give yourself 7 minutes to tke the entire test. Just like the rel exm, ech question hs
More informationCSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona
CSc 453 Compilers nd Systems Softwre 4 : Lexicl Anlysis II Deprtment of Computer Science University of Arizon collerg@gmil.com Copyright c 2009 Christin Collerg Implementing Automt NFAs nd DFAs cn e hrd-coded
More informationCOMP 423 lecture 11 Jan. 28, 2008
COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring
More informationΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών. Lecture 3b Lexical Analysis Elias Athanasopoulos
ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy RecogniNon of Tokens if expressions nd relnonl opertors if è if then è then else è else relop è
More informationDeterministic. Finite Automata. And Regular Languages. Fall 2018 Costas Busch - RPI 1
Deterministic Finite Automt And Regulr Lnguges Fll 2018 Costs Busch - RPI 1 Deterministic Finite Automton (DFA) Input Tpe String Finite Automton Output Accept or Reject Fll 2018 Costs Busch - RPI 2 Trnsition
More informationControl-Flow Analysis and Loop Detection
! Control-Flow Anlysis nd Loop Detection!Lst time! PRE!Tody! Control-flow nlysis! Loops! Identifying loops using domintors! Reducibility! Using loop identifiction to identify induction vribles CS553 Lecture
More informationEliminating left recursion grammar transformation. The transformed expression grammar
Eliminting left recursion grmmr trnsformtion Originl! rnsformed! 0 0! 0 α β α α α α α α α α β he two grmmrs generte the sme lnguge, but the one on the right genertes the rst, nd then string of s, using
More informationSome Thoughts on Grad School. Undergraduate Compilers Review and Intro to MJC. Structure of a Typical Compiler. Lexing and Parsing
Undergrdute Compilers Review nd Intro to MJC Announcements Miling list is in full swing Tody Some thoughts on grd school Finish prsing Semntic nlysis Visitor pttern for bstrct syntx trees Some Thoughts
More informationCS 241. Fall 2017 Midterm Review Solutions. October 24, Bits and Bytes 1. 3 MIPS Assembler 6. 4 Regular Languages 7.
CS 241 Fll 2017 Midterm Review Solutions Octoer 24, 2017 Contents 1 Bits nd Bytes 1 2 MIPS Assemly Lnguge Progrmming 2 3 MIPS Assemler 6 4 Regulr Lnguges 7 5 Scnning 9 1 Bits nd Bytes 1. Give two s complement
More informationMidterm 2 Sample solution
Nme: Instructions Midterm 2 Smple solution CMSC 430 Introduction to Compilers Fll 2012 November 28, 2012 This exm contins 9 pges, including this one. Mke sure you hve ll the pges. Write your nme on the
More informationMidterm I Solutions CS164, Spring 2006
Midterm I Solutions CS164, Spring 2006 Februry 23, 2006 Plese red ll instructions (including these) crefully. Write your nme, login, SID, nd circle the section time. There re 8 pges in this exm nd 4 questions,
More informationFall Compiler Principles Lecture 1: Lexical Analysis. Roman Manevich Ben-Gurion University
Fll 2014-2015 Compiler Principles Lecture 1: Lexicl Anlysis Romn Mnevich Ben-Gurion University Agend Understnd role of lexicl nlysis in compiler Lexicl nlysis theory Implementing professionl scnner vi
More informationIf you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.
Lecture 5 Wlks, Trils, Pths nd Connectedness Reding: Some of the mteril in this lecture comes from Section 1.2 of Dieter Jungnickel (2008), Grphs, Networks nd Algorithms, 3rd edition, which is ville online
More informationSection 3.1: Sequences and Series
Section.: Sequences d Series Sequences Let s strt out with the definition of sequence: sequence: ordered list of numbers, often with definite pttern Recll tht in set, order doesn t mtter so this is one
More informationMATH 25 CLASS 5 NOTES, SEP
MATH 25 CLASS 5 NOTES, SEP 30 2011 Contents 1. A brief diversion: reltively prime numbers 1 2. Lest common multiples 3 3. Finding ll solutions to x + by = c 4 Quick links to definitions/theorems Euclid
More informationFall Compiler Principles Lecture 1: Lexical Analysis. Roman Manevich Ben-Gurion University of the Negev
Fll 2016-2017 Compiler Principles Lecture 1: Lexicl Anlysis Romn Mnevich Ben-Gurion University of the Negev Agend Understnd role of lexicl nlysis in compiler Regulr lnguges reminder Lexicl nlysis lgorithms
More informationImplementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona
Implementing utomt Sc 5 ompilers nd Systems Softwre : Lexicl nlysis II Deprtment of omputer Science University of rizon collerg@gmil.com opyright c 009 hristin ollerg NFs nd DFs cn e hrd-coded using this
More information12-B FRACTIONS AND DECIMALS
-B Frctions nd Decimls. () If ll four integers were negtive, their product would be positive, nd so could not equl one of them. If ll four integers were positive, their product would be much greter thn
More informationCS 340, Fall 2014 Dec 11 th /13 th Final Exam Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string.
CS 340, Fll 2014 Dec 11 th /13 th Finl Exm Nme: Note: in ll questions, the specil symol ɛ (epsilon) is used to indicte the empty string. Question 1. [5 points] Consider the following regulr expression;
More informationINTRODUCTION TO SIMPLICIAL COMPLEXES
INTRODUCTION TO SIMPLICIAL COMPLEXES CASEY KELLEHER AND ALESSANDRA PANTANO 0.1. Introduction. In this ctivity set we re going to introduce notion from Algebric Topology clled simplicil homology. The min
More informationExample: Source Code. Lexical Analysis. The Lexical Structure. Tokens. What do we really care here? A Sample Toy Program:
Lexicl Anlysis Red source progrm nd produce list of tokens ( liner nlysis) source progrm The lexicl structure is specified using regulr expressions Other secondry tsks: (1) get rid of white spces (e.g.,
More informationLexical Analysis and Lexical Analyzer Generators
1 Lexicl Anlysis nd Lexicl Anlyzer Genertors Chpter 3 COP5621 Compiler Construction Copyright Roert vn Engelen, Florid Stte University, 2007-2009 2 The Reson Why Lexicl Anlysis is Seprte Phse Simplifies
More informationCompilation
Compiltion 0368-3133 Lecture 2: Lexicl Anlysis Nom Rinetzky 1 2 Lexicl Anlysis Modern Compiler Design: Chpter 2.1 3 Conceptul Structure of Compiler Compiler Source text txt Frontend Semntic Representtion
More informationMid-term exam. Scores. Fall term 2012 KAIST EE209 Programming Structures for EE. Thursday Oct 25, Student's name: Student ID:
Fll term 2012 KAIST EE209 Progrmming Structures for EE Mid-term exm Thursdy Oct 25, 2012 Student's nme: Student ID: The exm is closed book nd notes. Red the questions crefully nd focus your nswers on wht
More informationDigital Design. Chapter 6: Optimizations and Tradeoffs
Digitl Design Chpter 6: Optimiztions nd Trdeoffs Slides to ccompny the tetbook Digitl Design, with RTL Design, VHDL, nd Verilog, 2nd Edition, by Frnk Vhid, John Wiley nd Sons Publishers, 2. http://www.ddvhid.com
More informationHomework. Context Free Languages III. Languages. Plan for today. Context Free Languages. CFLs and Regular Languages. Homework #5 (due 10/22)
Homework Context Free Lnguges III Prse Trees nd Homework #5 (due 10/22) From textbook 6.4,b 6.5b 6.9b,c 6.13 6.22 Pln for tody Context Free Lnguges Next clss of lnguges in our quest! Lnguges Recll. Wht
More informationRegular Expressions and Automata using Miranda
Regulr Expressions nd Automt using Mirnd Simon Thompson Computing Lortory Univerisity of Kent t Cnterury My 1995 Contents 1 Introduction ::::::::::::::::::::::::::::::::: 1 2 Regulr Expressions :::::::::::::::::::::::::::::
More informationProblem Set 2 Fall 16 Due: Wednesday, September 21th, in class, before class begins.
Problem Set 2 Fll 16 Due: Wednesdy, September 21th, in clss, before clss begins. 1. LL Prsing For the following sub-problems, consider the following context-free grmmr: S T$ (1) T A (2) T bbb (3) A T (4)
More informationCMPSC 470: Compiler Construction
CMPSC 47: Compiler Construction Plese complete the following: Midterm (Type A) Nme Instruction: Mke sure you hve ll pges including this cover nd lnk pge t the end. Answer ech question in the spce provided.
More informationMIPS I/O and Interrupt
MIPS I/O nd Interrupt Review Floting point instructions re crried out on seprte chip clled coprocessor 1 You hve to move dt to/from coprocessor 1 to do most common opertions such s printing, clling functions,
More informationLecture 10 Evolutionary Computation: Evolution strategies and genetic programming
Lecture 10 Evolutionry Computtion: Evolution strtegies nd genetic progrmming Evolution strtegies Genetic progrmming Summry Negnevitsky, Person Eduction, 2011 1 Evolution Strtegies Another pproch to simulting
More informationstack of states and grammar symbols Stack-Bottom marker C. Kessler, IDA, Linköpings universitet. 1. <list> -> <list>, <element> 2.
TDDB9 Compilers nd Interpreters TDDB44 Compiler Construction LR Prsing Updted/New slide mteril 007: Pushdown Automton for LR-Prsing Finite-stte pushdown utomton contins lterntingly sttes nd symols in NUΣ
More informationCS 241 Week 4 Tutorial Solutions
CS 4 Week 4 Tutoril Solutions Writing n Assemler, Prt & Regulr Lnguges Prt Winter 8 Assemling instrutions utomtilly. slt $d, $s, $t. Solution: $d, $s, nd $t ll fit in -it signed integers sine they re 5-it
More informationPointwise convergence need not behave well with respect to standard properties such as continuity.
Chpter 3 Uniform Convergence Lecture 9 Sequences of functions re of gret importnce in mny res of pure nd pplied mthemtics, nd their properties cn often be studied in the context of metric spces, s in Exmples
More informationsuch that the S i cover S, or equivalently S
MATH 55 Triple Integrls Fll 16 1. Definition Given solid in spce, prtition of consists of finite set of solis = { 1,, n } such tht the i cover, or equivlently n i. Furthermore, for ech i, intersects i
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology
More informationJava CUP. Java CUP Specifications. User Code Additions. Package and Import Specifications
Jv CUP Jv CUP is prser-genertion tool, similr to Ycc. CUP uilds Jv prser for LALR(1) grmmrs from production rules nd ssocited Jv code frgments. When prticulr production is recognized, its ssocited code
More informationOperator Precedence. Java CUP. E E + T T T * P P P id id id. Does a+b*c mean (a+b)*c or
Opertor Precedence Most progrmming lnguges hve opertor precedence rules tht stte the order in which opertors re pplied (in the sence of explicit prentheses). Thus in C nd Jv nd CSX, +*c mens compute *c,
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology
More informationPrinciples of Programming Languages
Principles of Progrmming Lnguges h"p://www.di.unipi.it/~ndre/did2c/plp- 14/ Prof. Andre Corrdini Deprtment of Computer Science, Pis Lesson 5! Gener;on of Lexicl Anlyzers Creting Lexicl Anlyzer with Lex
More information12 <= rm <digit> 2 <= rm <no> 2 <= rm <no> <digit> <= rm <no> <= rm <number>
DDD16 Compilers nd Interpreters DDB44 Compiler Construction R Prsing Prt 1 R prsing concept Using prser genertor Prse ree Genertion Wht is R-prsing? eft-to-right scnning R Rigthmost derivtion in reverse
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology
More informationthis grammar generates the following language: Because this symbol will also be used in a later step, it receives the
LR() nlysis Drwcks of LR(). Look-hed symols s eplined efore, concerning LR(), it is possile to consult the net set to determine, in the reduction sttes, for which symols it would e possile to perform reductions.
More informationLING/C SC/PSYC 438/538. Lecture 21 Sandiway Fong
LING/C SC/PSYC 438/538 Lecture 21 Sndiwy Fong Tody's Topics Homework 8 Review Optionl Homework 9 (mke up on Homework 7) Homework 8 Review Question1: write Prolog regulr grmmr for the following lnguge:
More informationMA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork
MA1008 Clculus nd Liner Algebr for Engineers Course Notes for Section B Stephen Wills Deprtment of Mthemtics University College Cork s.wills@ucc.ie http://euclid.ucc.ie/pges/stff/wills/teching/m1008/ma1008.html
More informationLecture T4: Pattern Matching
Introduction to Theoreticl CS Lecture T4: Pttern Mtching Two fundmentl questions. Wht cn computer do? How fst cn it do it? Generl pproch. Don t tlk bout specific mchines or problems. Consider miniml bstrct
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology
More informationWhat are suffix trees?
Suffix Trees 1 Wht re suffix trees? Allow lgorithm designers to store very lrge mount of informtion out strings while still keeping within liner spce Allow users to serch for new strings in the originl
More informationAn Efficient Divide and Conquer Algorithm for Exact Hazard Free Logic Minimization
An Efficient Divide nd Conquer Algorithm for Exct Hzrd Free Logic Minimiztion J.W.J.M. Rutten, M.R.C.M. Berkelr, C.A.J. vn Eijk, M.A.J. Kolsteren Eindhoven University of Technology Informtion nd Communiction
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology
More informationAlignment of Long Sequences. BMI/CS Spring 2012 Colin Dewey
Alignment of Long Sequences BMI/CS 776 www.biostt.wisc.edu/bmi776/ Spring 2012 Colin Dewey cdewey@biostt.wisc.edu Gols for Lecture the key concepts to understnd re the following how lrge-scle lignment
More informationEECS 281: Homework #4 Due: Thursday, October 7, 2004
EECS 28: Homework #4 Due: Thursdy, October 7, 24 Nme: Emil:. Convert the 24-bit number x44243 to mime bse64: QUJD First, set is to brek 8-bit blocks into 6-bit blocks, nd then convert: x44243 b b 6 2 9
More information2 Computing all Intersections of a Set of Segments Line Segment Intersection
15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design
More informationbox Boxes and Arrows 3 true 7.59 'X' An object is drawn as a box that contains its data members, for example:
Boxes nd Arrows There re two kinds of vriles in Jv: those tht store primitive vlues nd those tht store references. Primitive vlues re vlues of type long, int, short, chr, yte, oolen, doule, nd flot. References
More information1 Quad-Edge Construction Operators
CS48: Computer Grphics Hndout # Geometric Modeling Originl Hndout #5 Stnford University Tuesdy, 8 December 99 Originl Lecture #5: 9 November 99 Topics: Mnipultions with Qud-Edge Dt Structures Scribe: Mike
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology
More informationacronyms possibly used in this test: CFG :acontext free grammar CFSM :acharacteristic finite state machine DFA :adeterministic finite automata
EE573 Fll 2002, Exm open book, if question seems mbiguous, sk me to clrify the question. If my nswer doesn t stisfy you, plese stte your ssumptions. cronyms possibly used in this test: CFG :context free
More informationFall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications.
15-112 Fll 2018 Midterm 1 October 11, 2018 Nme: Andrew ID: Recittion Section: ˆ You my not use ny books, notes, extr pper, or electronic devices during this exm. There should be nothing on your desk or
More informationCS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig
CS311H: Discrete Mthemtics Grph Theory IV Instructor: Işıl Dillig Instructor: Işıl Dillig, CS311H: Discrete Mthemtics Grph Theory IV 1/25 A Non-plnr Grph Regions of Plnr Grph The plnr representtion of
More informationSample Midterm Solutions COMS W4115 Programming Languages and Translators Monday, October 12, 2009
Deprtment of Computer cience Columbi University mple Midterm olutions COM W4115 Progrmming Lnguges nd Trnsltors Mondy, October 12, 2009 Closed book, no ids. ch question is worth 20 points. Question 5(c)
More informationSmall Business Networking
Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology
More informationFrom Dependencies to Evaluation Strategies
From Dependencies to Evlution Strtegies Possile strtegies: 1 let the user define the evlution order 2 utomtic strtegy sed on the dependencies: use locl dependencies to determine which ttriutes to compute
More informationAllocator Basics. Dynamic Memory Allocation in the Heap (malloc and free) Allocator Goals: malloc/free. Internal Fragmentation
Alloctor Bsics Dynmic Memory Alloction in the Hep (mlloc nd free) Pges too corse-grined for llocting individul objects. Insted: flexible-sized, word-ligned blocks. Allocted block (4 words) Free block (3
More informationIntegration. September 28, 2017
Integrtion September 8, 7 Introduction We hve lerned in previous chpter on how to do the differentition. It is conventionl in mthemtics tht we re supposed to lern bout the integrtion s well. As you my
More information