编译原理课件PPT 第2章.ppt1、AlphabetNon-emptysetofsymbols,usuallyexpressedin、VorOtherUpper-caseGreeceLetter2、Symbol(Character)Elementsinalphabet,finestelementsinalanguage3、:Null-stringisstringwithoutanysymbol,writtenas。Chapter2Language&SyntaxDescriptionSection1Alphabet&StringChapter2Language&SyntaxDescriptionSection1Alphabet&String4、SentenceAsetofstringsbasedonsymbolsintheAlphabetincertainconstructionrules5、:Byconvention,asymbolisexpressedasa,b,c,…;astringisexpressedas,,,…;asetofstringsisexpressedinA,B,C,….Chapter2Language&SyntaxDescriptionSection1Alphabet&String6、Operationsonthesetsofstrings1)、Concatenate(Product)OperationLetthestringsetA={1,2,…},B={1,2,...},then(Cartesian)ProductABisdefinedasAB={|AandB}Notes:1)Stringsetproductonselfiscalledaspowerofthestringset2)A0={}3)npowersofAlphabetAisthesetofallstringswithnlengthChapter2Language&SyntaxDescriptionSection1Alphabet&String6、Operationsonthesetsofstrings2)、Closureandpositiveclosurea)ClosureA*=A0A1A2…ItismeantbythesetofallstringsonAlphabetA(Includingnull-string)b)PositiveclosureA+=A1A2…=A*-{}Notes:&SyntaxDescriptionSection2Grammar&Language1、onceptsa、:1)Syntaxelementsincludesentencesandwordsinsentences,)Theformofaproductionruleisasfollowing:left-sideright-side(thatcanbereadas“left-sideisdefinedasright-side”,“left-sidederivesright-side”,or“left-sideproducesright-side”,itexpressestherelationbetweenthetwosides)b、Non-terminalsymbolAsymbolthatappearsintheleftofarule,isbracketedin<>-terminalsymbolsisexpressedinVNc、posed(includingstringsofsinglecharacters),:&SyntaxDescriptionSection2Grammar&Language1、onceptsChapter2Language&SyntaxDescriptionSection2G
编译原理课件PPT 第2章 来自淘豆网www.taodocs.com转载请标明出处.