Lecture 10 Notes

A a int a 4 3

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: is a list of integers. We can write this as another instance of the second rule for List-of-Int .   List-of-Int List-of-Int ¡ ¢  ¡ ¢   A     ¢A Int ¢    ¢       ¡ £      ¡ £ A ¤ ¥ is a list of integers, because of property 2, since is a integer and is a list of integers. Once more we can write this as an instance of the second rule for List-of-Int . ¢   ¢    ¡ ¢    ¡ ¢ A ¡ ¢    A Int    A    ¤ ¦      4.  ¡ ¢     3. ¢ Int List-of-Int List-of-Int ¤ ¥ ¤ ¦ ¢  5. Nothing is a list of integers unless it is built in this fashion. 8 1.4 Defining Sets Using Grammars Normally use grammars to define sets of strings, but can use them to define sets as well.  List-of-Int Int    List-of-Int :: List-of-Int :: two rules, corresponding to the two properties in Definition 5 above. In this definition we have Nonterminal Symbols. These are the names of the sets being defined. In this case there is only one such set, but in general, there might be several sets being defined. These sets are...
View Full Document

This document was uploaded on 03/17/2014 for the course CSG 111 at Northeastern.

Ask a homework question - tutors are online