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

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 

Recently uploaded (20)

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 

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