1 / 6

Bakus-Naur Form

Bakus-Naur Form. What is it?. A formal, mathematical way to describe a language It describes the grammar of a language, so that there is no disagreement or ambiguity as to what is allowed How ….?. Production Rules. Symbol := alternative1 | alternative 2 …

kaveri
Télécharger la présentation

Bakus-Naur Form

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bakus-Naur Form

  2. What is it? • A formal, mathematical way to describe a language • It describes the grammar of a language, so that there is no disagreement or ambiguity as to what is allowed • How ….?

  3. Production Rules • Symbol := alternative1 | alternative 2 … • alternative1 := subsymbol1 | terminal • Terminals are the end of the line, they terminate the production process. • The language described is the set of all the strings you can produce by following the production rules

  4. Example BNF Grammar <S> := ‘-’ <FN> | <FN> <FN> := <DL> | <DL> ‘.’ <DL> <DL> := <D> | <D> <DL> <D> := ‘0’|’1’|’2’|’3’|’4’|’5’ |’6’|’7’|’8’|’9’ S=Start Symbol, FN = Fractional Number, DL = Digit list, D=digit

  5. Syntax Diagrams

More Related