SlideShare a Scribd company logo
1 of 25
Download to read offline
Symbol   Meaning

         Predefined element

         Fixed element

         Path lines
ž Allowable Paths – follow the railroad from
 left to right and follow only one path
ž Eg, letter, sentence, program, variable
 name

                  Variable
ž Reserved words,(Cannot use these words
 as variables (memory allocation) e.g.,
 Dim, -+, 0, 1
                Dim




                 As
ž Eg,   A Boolean Constant

                    T




                    F
ž Eg,   A word




                  Letter
ž Eg, a
      number that can be either positive
 or negative


                              Digit




           _
Were created to make it easier to
                represent syntax
Symbol   Meaning
 :: =    Is defined as

  |      Indicates choice between elements

 <>      Non terminal symbol
BNF is a text based metalanguage that is
read right to left. This way, syntax can be
represented by text, rather than diagrams
ž Invented   to avoid the disadvantages of
 BNF.
ž Easier   to read, and less issues with things
 like repetition and optional elements
Symbol   Meaning
  =      Is defined as

  |      Indicates choice between elements

 <>      Non terminal symbol

  {}     Encloses elements to be repeated

  []     Encloses optional elements
BNF                EBNF
ž ::=             ž =


ž Boolean::=T|F   ž Boolean=T|F
BNF                   EBNF
ž <   >              ž <   >


ž <Digit>::-0|1|2|   ž <Digit>=0|1|2|
ž <Letter>::-a|b|c   ž <Letter>=a|b|c
BNF                  EBNF
ž Written   as is   ž Written   as is

ž Dim               ž Dim
ž If                ž If
ž 0                 ž 0
ž 1                 ž 1
ž k                 ž k
BNF                 EBNF
ž Defined   as |   ž Defined   as |


ž Boolen::-T|F     ž Boolen=T|F
BNF                         EBNF
ž  No
     Optional              ž  [   ]
  Elements, so each
  option must be           ž  Integer=[-]   {<digit>}
  repeated

Integer::- - {<digit>} |
  {<digit>}
BNF                           EBNF

ž  No repetition             ž  Indicated by { }
ž  Repetition through        ž  Word={Letter}
    recursion                 ž  Repeated zero or more
ž  Recursion is repetition       times
    achieved through a        ž  If it needs to be repeated
    process calling itself        one or more times, it is
                                  written as
                              ž  Word=Letter{Letter}
Public



Dim            Variable   As   Data Type
      Privat
        e
Single
Short
Boolean

 Byte
 Char

 Date



Time

Decimal
Double

  Int
 Long
Upper Case
             LowerCase
             UpperCas
                e
               Digit
0

9

8

7

6

5

4

3

2

1
ž Construct
           an EBNF diagram to describe a
 best practice, legal if statement.

ž Should  follow the following structure:
ž If condition Then statements Else else
   statements

More Related Content

What's hot

Regular Expression in Compiler design
Regular Expression in Compiler designRegular Expression in Compiler design
Regular Expression in Compiler designRiazul Islam
 
replacement grammars
replacement grammarsreplacement grammars
replacement grammarsRajendran
 
Regular expression (compiler)
Regular expression (compiler)Regular expression (compiler)
Regular expression (compiler)Jagjit Wilku
 
Literals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiersLiterals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiersTanishq Soni
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C ProgrammingKamal Acharya
 
Data types and variables
Data types and variablesData types and variables
Data types and variablesGhada Shebl
 
Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...rahuldaredia21
 
1.1. the central concepts of automata theory
1.1. the central concepts of automata theory1.1. the central concepts of automata theory
1.1. the central concepts of automata theorySampath Kumar S
 
Enumerated data types in C
Enumerated data types in CEnumerated data types in C
Enumerated data types in CArpana shree
 
Perbandingan
PerbandinganPerbandingan
PerbandinganRadz SL
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingSaranyaK68
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction toolssunilchute1
 

What's hot (20)

25 bnf
25 bnf25 bnf
25 bnf
 
Regular Expression in Compiler design
Regular Expression in Compiler designRegular Expression in Compiler design
Regular Expression in Compiler design
 
replacement grammars
replacement grammarsreplacement grammars
replacement grammars
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Regular expression (compiler)
Regular expression (compiler)Regular expression (compiler)
Regular expression (compiler)
 
Language
LanguageLanguage
Language
 
Literals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiersLiterals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiers
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C Programming
 
Data types and variables
Data types and variablesData types and variables
Data types and variables
 
Regular expression (compiler)
Regular expression (compiler)Regular expression (compiler)
Regular expression (compiler)
 
Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...Data types in java | What is Datatypes in Java | Learning with RD | Created b...
Data types in java | What is Datatypes in Java | Learning with RD | Created b...
 
1.1. the central concepts of automata theory
1.1. the central concepts of automata theory1.1. the central concepts of automata theory
1.1. the central concepts of automata theory
 
C programming unit 01
C programming unit 01C programming unit 01
C programming unit 01
 
Enumerated data types in C
Enumerated data types in CEnumerated data types in C
Enumerated data types in C
 
Perbandingan
PerbandinganPerbandingan
Perbandingan
 
Theory of automata
Theory of automataTheory of automata
Theory of automata
 
Regular Expression
Regular ExpressionRegular Expression
Regular Expression
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Basics of c
Basics of cBasics of c
Basics of c
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction tools
 

More from mary_ramsay

Circumference of a Circle
Circumference of a CircleCircumference of a Circle
Circumference of a Circlemary_ramsay
 
RWG 5 For Mac Training Guide
RWG 5 For Mac Training GuideRWG 5 For Mac Training Guide
RWG 5 For Mac Training Guidemary_ramsay
 
Sdd Testing & Evaluating
Sdd Testing & EvaluatingSdd Testing & Evaluating
Sdd Testing & Evaluatingmary_ramsay
 
The role of the cpu in the operation
The role of the cpu in the operationThe role of the cpu in the operation
The role of the cpu in the operationmary_ramsay
 
Sorting & Extracting Data
Sorting & Extracting DataSorting & Extracting Data
Sorting & Extracting Datamary_ramsay
 
SQL Structure Query Language
SQL Structure Query LanguageSQL Structure Query Language
SQL Structure Query Languagemary_ramsay
 
URL_universal Resourse Locator
URL_universal Resourse LocatorURL_universal Resourse Locator
URL_universal Resourse Locatormary_ramsay
 
IPT Assessment Schedule 2012
IPT Assessment Schedule 2012IPT Assessment Schedule 2012
IPT Assessment Schedule 2012mary_ramsay
 
Normalisation student summary
Normalisation student summaryNormalisation student summary
Normalisation student summarymary_ramsay
 

More from mary_ramsay (11)

Circumference of a Circle
Circumference of a CircleCircumference of a Circle
Circumference of a Circle
 
RWG 5 For Mac Training Guide
RWG 5 For Mac Training GuideRWG 5 For Mac Training Guide
RWG 5 For Mac Training Guide
 
Sdd HSC Summary
Sdd HSC SummarySdd HSC Summary
Sdd HSC Summary
 
Sdd Testing & Evaluating
Sdd Testing & EvaluatingSdd Testing & Evaluating
Sdd Testing & Evaluating
 
The role of the cpu in the operation
The role of the cpu in the operationThe role of the cpu in the operation
The role of the cpu in the operation
 
Sorting & Extracting Data
Sorting & Extracting DataSorting & Extracting Data
Sorting & Extracting Data
 
SQL Structure Query Language
SQL Structure Query LanguageSQL Structure Query Language
SQL Structure Query Language
 
URL_universal Resourse Locator
URL_universal Resourse LocatorURL_universal Resourse Locator
URL_universal Resourse Locator
 
IPT Assessment Schedule 2012
IPT Assessment Schedule 2012IPT Assessment Schedule 2012
IPT Assessment Schedule 2012
 
IPT HSC Summary
IPT HSC SummaryIPT HSC Summary
IPT HSC Summary
 
Normalisation student summary
Normalisation student summaryNormalisation student summary
Normalisation student summary
 

Recently uploaded

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 

Recently uploaded (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

All meta languages

  • 1.
  • 2. Symbol Meaning Predefined element Fixed element Path lines
  • 3. ž Allowable Paths – follow the railroad from left to right and follow only one path
  • 4. ž Eg, letter, sentence, program, variable name Variable
  • 5. ž Reserved words,(Cannot use these words as variables (memory allocation) e.g., Dim, -+, 0, 1 Dim As
  • 6. ž Eg, A Boolean Constant T F
  • 7. ž Eg, A word Letter
  • 8. ž Eg, a number that can be either positive or negative Digit _
  • 9.
  • 10. Were created to make it easier to represent syntax
  • 11. Symbol Meaning :: = Is defined as | Indicates choice between elements <> Non terminal symbol
  • 12. BNF is a text based metalanguage that is read right to left. This way, syntax can be represented by text, rather than diagrams
  • 13. ž Invented to avoid the disadvantages of BNF. ž Easier to read, and less issues with things like repetition and optional elements
  • 14. Symbol Meaning = Is defined as | Indicates choice between elements <> Non terminal symbol {} Encloses elements to be repeated [] Encloses optional elements
  • 15. BNF EBNF ž ::= ž = ž Boolean::=T|F ž Boolean=T|F
  • 16. BNF EBNF ž < > ž < > ž <Digit>::-0|1|2| ž <Digit>=0|1|2| ž <Letter>::-a|b|c ž <Letter>=a|b|c
  • 17. BNF EBNF ž Written as is ž Written as is ž Dim ž Dim ž If ž If ž 0 ž 0 ž 1 ž 1 ž k ž k
  • 18. BNF EBNF ž Defined as | ž Defined as | ž Boolen::-T|F ž Boolen=T|F
  • 19. BNF EBNF ž  No Optional ž  [ ] Elements, so each option must be ž  Integer=[-] {<digit>} repeated Integer::- - {<digit>} | {<digit>}
  • 20. BNF EBNF ž  No repetition ž  Indicated by { } ž  Repetition through ž  Word={Letter} recursion ž  Repeated zero or more ž  Recursion is repetition times achieved through a ž  If it needs to be repeated process calling itself one or more times, it is written as ž  Word=Letter{Letter}
  • 21. Public Dim Variable As Data Type Privat e
  • 22. Single Short Boolean Byte Char Date Time Decimal Double Int Long
  • 23. Upper Case LowerCase UpperCas e Digit
  • 25. ž Construct an EBNF diagram to describe a best practice, legal if statement. ž Should follow the following structure: ž If condition Then statements Else else statements