%3Cp%3EGive%20an%26nbsp%3BEBNF%26nbsp%3Bgrammar%26nbsp%3Bfor%26nbsp%3Bfloating%2
ID: 3549727 • Letter: #
Question
%3Cp%3EGive%20an%26nbsp%3BEBNF%26nbsp%3Bgrammar%26nbsp%3Bfor%26nbsp%3Bfloating%26nbsp%3Bpoint%26nbsp%3Bnumbers%26nbsp%3Bthat%26nbsp%3Bare%26nbsp%3Bmade%26nbsp%3Bup%26nbsp%3Bof%26nbsp%3Ba%3C%2Fp%3E%3Cp%3Efraction%26nbsp%3B(e.g.%26nbsp%3B5.6%26nbsp%3Bor%26nbsp%3B3.123%26nbsp%3Bor%26nbsp%3B-2.5)%26nbsp%3Bfollowed%26nbsp%3Bby%26nbsp%3Ban%26nbsp%3Boptional%26nbsp%3Bexponent%26nbsp%3B(e.g.%26nbsp%3BE10%3C%2Fp%3E%3Cp%3Eor%26nbsp%3BE-10).%26nbsp%3BThe%26nbsp%3Bexponent%2C%26nbsp%3Bif%26nbsp%3Bexists%2C%26nbsp%3Bis%26nbsp%3Bthe%26nbsp%3Bletter%26nbsp%3B%E2%80%9CE%E2%80%9D%26nbsp%3Bfollowed%26nbsp%3Bby%26nbsp%3Ban%26nbsp%3Binteger.%26nbsp%3BFor%3C%2Fp%3E%3Cp%3Eexample%2C%26nbsp%3Bthe%26nbsp%3Bfollowing%26nbsp%3Bare%26nbsp%3Bfloating%26nbsp%3Bpoint%26nbsp%3Bnumbers%3A%26nbsp%3B3.5E3%2C%26nbsp%3B3.125E30%2C%26nbsp%3B-2.5E2%2C%26nbsp%3B-%3C%2Fp%3E%3Cp%3E2.5E-2%2C%26nbsp%3B3.5.%26nbsp%3Bthe%26nbsp%3Bfollowing%26nbsp%3Bare%26nbsp%3Bnot%26nbsp%3Bexamples%26nbsp%3Bof%26nbsp%3Bfloating%26nbsp%3Bpoint%26nbsp%3Bnumbers%3A%26nbsp%3B3.E3%2C%26nbsp%3BE3%2C%3C%2Fp%3E%3Cp%3E3.0E4.5.%3C%2Fp%3E%3Cp%3E1%3C%2Fp%3E%3Cp%3EFor%26nbsp%3Bthis%26nbsp%3Bexercise%2C%26nbsp%3Blet%26nbsp%3Bus%26nbsp%3Bassume%26nbsp%3Bthat%26nbsp%3Bthe%26nbsp%3Bthe%26nbsp%3Btokens%26nbsp%3Bare%26nbsp%3Bindividual%26nbsp%3Bcharacters.%3C%2Fp%3E%3Cp%3ESpecifically%2C%26nbsp%3Bthe%26nbsp%3Balphabet%26nbsp%3Bis%26nbsp%3Bas%26nbsp%3Bfollows%3A%3C%2Fp%3E%3Cp%3E%7B0%2C1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2CE%2C%3F%2C.%7D%3C%2Fp%3E%3Cp%3EYour%26nbsp%3Bgrammar%26nbsp%3Bshould%26nbsp%3Bbe%26nbsp%3Bcomplete%26nbsp%3B(i.e.%26nbsp%3Bit%26nbsp%3Bshould%26nbsp%3Bnot%26nbsp%3Bcount%26nbsp%3Bon%26nbsp%3Bundefined%26nbsp%3Bnon-%3C%2Fp%3E%3Cp%3Eterminals).%3C%2Fp%3E%3Cp%3E%3Cbr%3E%3C%2Fp%3E%3Cp%3Escreenshot%3A%3C%2Fp%3E%3Cp%3Ehttp%3A%2F%2Fs30.postimg.org%2Fl52k5av6p%2FScreenshot_2014_02_02_13_29_00.png%3C%2Fp%3EExplanation / Answer
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
fraction = ".", digit, {digit};
exponent = "E", ["-"], digit, {digit};
float = ["-"], digit, fraction, [exponent];
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.