Cov txheej txheem:

Yuav ua li cas hloov BNF rau EBNF?
Yuav ua li cas hloov BNF rau EBNF?

Video: Yuav ua li cas hloov BNF rau EBNF?

Video: Yuav ua li cas hloov BNF rau EBNF?
Video: ASoC: Supporting Audio on an Embedded Board 2024, Hlis ntuj nqeg
Anonim

Tab sis nws yooj yim los hloov EBNF Cov Qauv Qauv rau BNF:

  1. Hloov txhua qhov rov ua dua {E } mus rau qhov tshiab tsis yog lub davhlau ya nyob twg X thiab ntxiv.
  2. Hloov txhua qhov kev xaiv [E] mus rau qhov tshiab uas tsis yog-terminal X thiab ntxiv.
  3. Hloov txhua pab pawg (E) mus rau ib qho tshiab uas tsis yog-terminal X thiab ntxiv.

Ntawm no, qhov txawv ntawm BNF thiab Ebnf yog dab tsi?

Tsis muaj ib qho tshwj xeeb ntawm BNF . EBNF txhais tau tias Extended BNF . Tsis muaj ib leeg EBNF , tab sis txhua tus sau los yog qhov kev pab cuam txhais lawv tus kheej variant uas yog me ntsis txawv . ABNF (augmented BNF ) yog ib qho yooj yim heev txawv format tias BNF , tab sis yog ntau standardized.

Tsis tas li ntawd, BNF cov cai yog dab tsi? Hauv computer science, Backus-Naur daim ntawv lossis Backus ib txwm daim ntawv ( BNF ) yog cov txheej txheem sau tseg rau cov ntsiab lus tsis muaj cov qauv sau ntawv, feem ntau siv los piav qhia cov lus sib dhos ntawm cov lus siv hauv kev suav, xws li computer programming lus, hom ntawv, cov lus qhia thiab kev sib txuas lus.

Yog li ntawd, Ebnf yog dab tsi?

Hauv computer science, txuas ntxiv Backus-Naur daim ntawv ( EBNF ) yog ib tsev neeg ntawm cov ntawv sau metasyntax, ib qho twg tuaj yeem siv los qhia cov ntsiab lus tsis muaj qauv sau ntawv. EBNF yog siv los ua ib qho kev piav qhia ntawm ib hom lus xws li computer programming language.

Dab tsi yog BNF sau piav qhia nws nrog piv txwv?

Backus-Naur Form ( BNF ) sau ntawv Thaum piav txog hom lus, Backus-Naur daim ntawv ( BNF ) yog formal sau ntawv rau encoding grammars npaj rau tib neeg noj. Muaj ntau hom lus programming, raws tu qauv lossis hom ntawv muaj a BNF piav qhia nyob rau hauv lawv specification. Lub cim::= txhais tau tias "yuav nthuav mus rau" thiab "yuav hloov nrog."

Pom zoo: