0
Kelly Bauer<br />Meta Languages<br />
Why?	<br />Describes the syntax of a computer language<br />Rules that govern the arrangement of elements in a language<br...
Why not just learn the language?<br />Programming languages are very complex. You cant possibly know every way to do every...
2 Basic Forms		<br />Railroad diagram (aka syntax structure diagrams)<br />BNF/EBNF<br />
Railroad diagrams<br />
Elements<br />Allowable Paths<br />
Pre defined langauge elements	<br />Eg, letter, sentence, program, variable name<br />Variable<br />
Fixed Elements	<br />Reserved words, eg, Dim, -+, 0, 1<br />Dim<br />As<br />
The elements can be combined to give options<br />Eg,  A Boolean Constant<br />T<br />F<br />
Or to repeat elements<br />Eg,  A word<br />Letter<br />
And these can then be combined<br />Eg, a number that can be either positive or negative<br />Digit<br />_<br />
Textbook	<br />Pg 168 Defines the Winston language in railroad diagrams<br />Is the following legitimate conditions<br />A...
Abcd  =  +99<br />Abcd is a legitimate identifier, because it starts with an uppercase followed by a number of lower case<...
Complete 2nd activity on pg 168<br />TEXT ACTIVITY<br />
an example<br />
In Visual Basic	<br />Construct a railroad diagram to describe a best practice, legal variable declaration. <br />Should f...
Data type	<br />In Visual Basic, this can be Boolean, Byte, Char, Date, Time, Decimal, Double, Int, Long, Object, Short, S...
Variables in VB<br />Must begin with an uppercase letter<br />Can be lower or upper case or digits after first letter<br />
0<br />9<br />8<br />7<br />6<br />5<br />4<br />3<br />2<br />1<br />
Construct a railroad diagram of a legal if statement for Visual Basic<br />HW<br />
Syllabus Sections?<br />
Images from	<br />http://www.trs-80.com/trs80-mag-books.htm<br />http://homepages.cwi.nl/~dik/english/codes/punched.html<b...
Upcoming SlideShare
Loading in...5
×

Meta Languages Railroad Diagrams Student Version

640

Published on

Student Version of Meta Languages Railroad diagrams for uploading to wiki, without answers.

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
640
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Meta Languages Railroad Diagrams Student Version"

  1. 1. Kelly Bauer<br />Meta Languages<br />
  2. 2. Why? <br />Describes the syntax of a computer language<br />Rules that govern the arrangement of elements in a language<br />eg. The ran cat<br /> OR<br /> The cat ran<br />
  3. 3. Why not just learn the language?<br />Programming languages are very complex. You cant possibly know every way to do everything that you want. <br />The likelihood is that you won’t program in the language you learn. <br />Allows language specifications be understood by programmers and allows more learnability between languages<br />
  4. 4. 2 Basic Forms <br />Railroad diagram (aka syntax structure diagrams)<br />BNF/EBNF<br />
  5. 5. Railroad diagrams<br />
  6. 6. Elements<br />Allowable Paths<br />
  7. 7. Pre defined langauge elements <br />Eg, letter, sentence, program, variable name<br />Variable<br />
  8. 8. Fixed Elements <br />Reserved words, eg, Dim, -+, 0, 1<br />Dim<br />As<br />
  9. 9. The elements can be combined to give options<br />Eg, A Boolean Constant<br />T<br />F<br />
  10. 10. Or to repeat elements<br />Eg, A word<br />Letter<br />
  11. 11. And these can then be combined<br />Eg, a number that can be either positive or negative<br />Digit<br />_<br />
  12. 12. Textbook <br />Pg 168 Defines the Winston language in railroad diagrams<br />Is the following legitimate conditions<br />Abcd = +99<br />
  13. 13. Abcd = +99<br />Abcd is a legitimate identifier, because it starts with an uppercase followed by a number of lower case<br />+99 is a legitimate constant because it is a negative followed by a number of digits<br />The statement follows the correct order of <br /> Identifier condition constant<br />Davis, Sam (2008) Software Design and Development: The Preliminary Course, Parramatta Education Centre, Sydney<br />
  14. 14. Complete 2nd activity on pg 168<br />TEXT ACTIVITY<br />
  15. 15. an example<br />
  16. 16. In Visual Basic <br />Construct a railroad diagram to describe a best practice, legal variable declaration. <br />Should follow the following structure: <br />Dim Public or Private Variable Name As Data Type<br />
  17. 17. Data type <br />In Visual Basic, this can be Boolean, Byte, Char, Date, Time, Decimal, Double, Int, Long, Object, Short, Single<br />
  18. 18. Variables in VB<br />Must begin with an uppercase letter<br />Can be lower or upper case or digits after first letter<br />
  19. 19. 0<br />9<br />8<br />7<br />6<br />5<br />4<br />3<br />2<br />1<br />
  20. 20. Construct a railroad diagram of a legal if statement for Visual Basic<br />HW<br />
  21. 21. Syllabus Sections?<br />
  22. 22. Images from <br />http://www.trs-80.com/trs80-mag-books.htm<br />http://homepages.cwi.nl/~dik/english/codes/punched.html<br />http://www.borislavdopudja.net/en/writings/cheating_google/<br />
  1. A particular slide catching your eye?

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

×