Next: Lexical Considerations Up: The Proteus NS Grammar Previous: Contents


The goals for the design of the Proteus 2 grammar were:

  1. The grammar should have no conflicts when using a bison-like parser generator (LALR(1) with precedence).
  2. The grammar should be simplified as much as possible to allow easy parsing and implementation of the Proteus language
  3. Several constructs of the old Proteus grammer should be preserved:
  4. The set and sequence generator will have have the form:

    ``[ Iterator | Predicate : expr ]''

    where the ``| Predicate'' clause is optional.

    This change makes the ordering of the items in a generator more like the ordering of a for statement in other languages. This make nested generators easier for programmers to read.
Wed Aug 31 15:43:33 EDT 1994