You are on page 1of 11
Mesias racommamded for best xparonce Moodle - Learning Management System (LMS) Dashboard / My courses / 2¢S7O1 / 265701 /IT794 Cc Sessional on 11-10-2021 / 211701 / 1794 C¢ Sessional on 11-10-2021 Started on Monday, 17 October 2021, 11:47 AM State Finished Completed on Monday, 17 Ociober 2021, 1230 PM Time taken 43 mine 29 ce Grade 30.0 cut of 35.0 86%) asin “Among simple LR (SLR, canonical LR, an look-ahead R (LALRY, which ofthe following pls dently the method that is coe ‘very easy to implement and the method that isthe most powerful in hat order? Select one: SLR canonical LR w Canonical LR ALR SIR LAR UALR canonical ‘The correct answer i SLR canonical LR canon? Solec the dettion relate to tm Ye veoust | Pattern ia description ofthe frm that the exemes of token may take ¥ Token ia pair consisting ofa name and an optional atibut value Leteme isa sequence of caractesin the source program that matches the pater for token ‘The correct answer is Pater +s a description ofthe form that the lxemes of token may tate, Token ia pale esfoll cob ‘The grammoris LU), Tre Fle Selet one 2 The grammars Lu) The Grammar left recursive ‘The grammaris ambiguous The Grammar i not LL) The correct answers ae: The Gamat isnot L(t}, The grammar is ambiguous Specialized bering techniques have been developed to reduce the amount of averhead requires to process single input character. Selet one Tey Falke ‘The corect sree is "re ‘compiler is program that can rea a program in one guage called 35 and transltet into an ‘equivalent program in another language. Select one target nnguage source lnguage ¥ «machin language ‘The corect answers: source inguage sion 18 Which one ofthe folosing ststements is FALSE? vio ost | Select one " 1 Type checking is done before parsing. W b.Arguments to funeon canbe passed sng the program sack €. Contest te grammar can be used t spect both land prac. 4. High-tevel language programs canbe trandated to ferent termediate Representations “The correc answer i Type checking done before parsing ‘ccsin 19 | dent the language or flowing regular expression barat vet tvodat | Select one " | All strings of a's and b's begin and end with a B.A sings of sand b's Al ings of with just thee bs none ‘ne cores ananer es All singe of with st three bi son 20 [inherited tibut san atrbte whose vale a parse ree node not depend on oto secon 2. Atibutes a parent nade on b. Atte tthe sng ony cc Aiba chitan nodes only 4. None of he above, The corel ansneris: Atbutes at chien nodes ony cumin | nich one rom the folowing ile? vik outst | Sect one LR parser i etter up parser Db .LALR parsers botom up parser LU) the 1 indicates that there isa one system ook = head AAVApuls no surtable for predictve-parsing because the grammar i Select one: an operator grammar b ambiguous x «left ecursve right recursive ‘The corect snsier is lft recursive Which of the floning i FALSE? Select one: 2 Pasor generator tools UX SLR is powerfulthan LALR {c YACC tools a9 LALRIT parser generator 4. An LL) pases top-down parser ‘The corect answer is SLRs powerful han LALR an 30 ion 3 euanan 32 ‘Abottom-up parser generates Select one: 4 Lefumest detvation in revere .Letmeost derivation £Right-most derivation 4 Right-most derivation in reverse wt ‘The corect answer is ight-most deration in reverse wit espect to compiler design, vecusve descent is ___ parsing technique that read the inputs fom Selet one: 2 Bottom up, lett ight Bottom up, right to let «Top-down et to right «Top-down right tet ‘Tre corect ansier is Top-down lft ight Consider the folowing wansation scheme, saiR R= torn? DL Eo Fe Eiprint' oF F = 6) id printidvaleya Here iis token that represents an integer and idvalue represents the cotesponding integer vale, Foran input'2 «3 +4; his ranationseheme pins Select one 23d bevesa casey aaasae The conect answer is: 23.4 4° an 38, cen 34 Selec the conect definition Scanner produce lvical analyzers from aregular-expression description ofthe tokens of a language. generators Poser automatically produce syntax analyzers from a grammatical description ofa programming language. gerentes Syntax: sdrected produce colectons of routines for walking a parse tee and generating intermediate code, reanelation v engines ‘Te correct ansner i: Sener generators ~ produc level analyzers fom a regusr-expressiondescriotion of the tokens ‘of language, Parser generators ~ automatically produce syntak analyzers from a grammatical description of a programming language, Sytax-dveted wansation engines ~- produce colections of rotines for walking a patse tree ‘and generating intermediate code Is below given syntax dvected defini sid (lookuphdenty it Gdiype = NULL) In correct to vetfy Variable re-dedaraton error? Print ror type = ype.eror ke Esype «lookup fini) > Select one: Thue Fase v ‘The corect arsine is False! ‘Which production wil come under the cell“7?in LL) parsing fr given grammar A> mse hPa be Select one: or b Ase «Na production wl come in 7? cll The correct answer is ADE z + 265701 /17794 CC Class Test 31-8- mere Innovative Assignment Submission Link = 2021 submission Link

You might also like