0
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         ...
ž 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 isread right to left. This way, syntax can berepresented by text, rather than diagrams
ž Invented   to avoid the disadvantages of BNF.ž Easier   to read, and less issues with things like repetition and optio...
Symbol   Meaning  =      Is defined as  |      Indicates choice between elements <>      Non terminal symbol  {}     Enclo...
BNF                EBNFž ::=             ž =ž Boolean::=T|F   ž Boolean=T|F
BNF                   EBNFž <   >              ž <   >ž <Digit>::-0|1|2|   ž <Digit>=0|1|2|ž <Letter>::-a|b|c   ž <L...
BNF                  EBNFž Written   as is   ž Written   as isž Dim               ž Dimž If                ž Ifž 0 ...
BNF                 EBNFž Defined   as |   ž Defined   as |ž Boolen::-T|F     ž Boolen=T|F
BNF                         EBNFž  No     Optional              ž  [   ]  Elements, so each  option must be           ž...
BNF                           EBNFž  No repetition             ž  Indicated by { }ž  Repetition through        ž  Word...
PublicDim            Variable   As   Data Type      Privat        e
SingleShortBoolean Byte Char DateTimeDecimalDouble  Int Long
Upper Case             LowerCase             UpperCas                e               Digit
0987654321
ž Construct           an EBNF diagram to describe a best practice, legal if statement.ž Should  follow the following str...
All meta languages
All meta languages
Upcoming SlideShare
Loading in...5
×

All meta languages

401

Published on

Published in: Education, Technology
2 Comments
0 Likes
Statistics
Notes
  • small world :)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hey Mary. Might be nice to add a credit to the original creator here. The name on the front of the slide seems to have been taken off. I have absolutely no issue with using stuff....happy to share...hence the stuff being on slideshare, but a credit back to the original would be appreciated.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total Views
401
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
2
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "All meta languages"

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

    Clipping is a handy way to collect important slides you want to go back to later.

×