انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

BNF

الكلية كلية العلوم للبنات     القسم قسم الحاسبات     المرحلة 2
أستاذ المادة محمد عبيد مهدي الجبوري       3/18/2011 9:44:07 PM

BNF

 

n     A metalanguage is a language used to talk about a language (usually a different one)

 

n     We can use English as its own metalanguage (e.g. describing English grammar in English)

 

n     It is essential to distinguish between the metalanguage terms and the object language terms

 

n     BNF stands for either Backus-Naur Form or Backus Normal Form

 

n     BNF is a metalanguage used to describe the grammar of a programming language

 

n     BNF is formal and precise

 

n     BNF is essential in compiler construction

 

 

n     < > indicate a nonterminal that needs to be further expanded, e.g. <variable>

 

n     Symbols not enclosed in < > are terminals; they represent themselves, e.g. if, while, (

 

n     The symbol ::= means is defined as

 

n     The symbol  |  means or; it separates alternatives,

 

      e.g. <addop> ::= + | -

 

n     <integer> ::= <digit> | <integer> <digit>
     or
<integer> ::= <digit> | <digit> <integer>

 

n     "Extended BNF" allows repetition as well as recursion

 

n     Repetition is often more efficient when using BNF to construct a compiler

 

n     <digit> ::=
        0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

 

n     <if statement> ::=
        if ( <condition> ) <statement>
     |  if ( <condition> ) <statement>
        else <statement>

 

n     <identifier> ::=
        <letter>
     |  <identifier> <letter>
     |  <identifier> <digit>

 


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .