RSL


  1. Intro
    1. Resources
    2. RSL is an extension language
      1. Embedded
      2. Standalone
    3. Why not Java?

  2. A first look
    1. Example 0: Tradition
    2. Example 1: Sort a list
    3. Example 2: List & String manipulations

  3. Language Overview
    1. Statements
      1. Declarations
      2. Requests
        1. General: resource . message ( arguments )
        2. Operators

      3. Procedure calls

    2. Special Constructs
      1. if-then-else
      2. while

    3. Details
      1. Literals
      2. exit keyword
      3. Parameter tags
      4. Capitalization

  4. Appendices
    1. Grammatical relationship to C++
    2. Using standalone RSL
    3. Table of gobal resources
    4. Complex operator expressions: Boolean example

  1. Intro
    1. Resources
    2. A resource is a C++ object which has a special interface layer which allows it to plug into the RSL envivronment.

      Contents

    3. RSL is an extension language
    4. RSL is designed to extend other systems by scripting the underlying components of the system. RSL has generic data resources such as String, Integer, and List which provide basic data types found in almost any language.

      1. Embedded
      2. RSL may be used to extend a system by providing a resource interface to the core components of the system, which allows the system to be configured, customized, and even controlled by RSL scripts.

        Components of a system

        Resource layer added, allowing components to interact in new ways

        Contents

      3. Standalone
      4. RSL has been embedded in a simple wrapper program under UNIX to allow it to operate as a basic "shell script" programming language, which is useful for learning the language, writing test programs, and for basic web CGI programming. See Using Standalone RSL in the appendix for information.

      Contents

    5. Why not Java?
    6. Destiny has developed an object messaging bus architecture which underlies the RSL language, rather than a proprietary interpreted language.

      It is a collection of interacting objects: the interface between the objects is what is important, not the particular language in which the objects are written, or even what machine the objects reside on. Destiny realizes the importance of Java and has definite plans to provide support for it in the near future.

      The current rsl syntax is just one way of visualizing and expressing resource - message interactions.

      Contents

  2. A first look
    1. Example 0: Tradition
    2. This is the traditional "intro to the programming language" example:
      Main
      {
      	out.print("Hello, World");
      }
      

      Contents

    3. Example 1: Sort a list
    4. Main
      {
      List unsortedl, sortedl;
      
      	unsortedl.append("a", "f", "zz", "Xy", "A", "c");
      	out.print("UNSORTED:", unsortedl);
      	
      	sortedl = unsortedl.Sort();
      	out.print("SORTED: ", sortedl);
      }
      

      The output of this program is:

      UNSORTED: a f zz Xy A c
      SORTED: A Xy a c f zz
      

  3. Example 2: List & String manipulations
  4. 
    // split.rsl
    // Demo of the "split" method of String
    // - takes a String or an Integer
    // - it returns a List of the elements of the String separated by
    //   the argument (in this demo, "$" - could just as well be "\n"
    //   for example)
    // - a String argument is a delimiter
    // - an Integer argument indicates a size
    // - also note assignment to a List
    //
    // Demo of the "distribute" methods of String:
    // - two versions: DistributeType, DistributeAll
    // - DistributeType(type, method, arg1, ..)
    //     - apply method, args only to resources of type type
    // - DistributeAll(method, arg1, ..)
    //     - apply method, args to all resources.
    //
    // RFH 11/27/95
    //
    
    Main
    {
    	String a;
    	List x, y;
    
    	a = "This is part 1.$This is part 2.$This is part 3.";
    
    	// break the String into sub-strings at each "$".
    	// b will then contain three new String resources.
    	x = a.split("$");
    
    	// To each String in the new List (there will be 3)
    	// send the message "prepend" with argument "> "
    	x.distributeType(String, "prepend", "> ");
    
    	out.print(x, endp); 	// print the List
    
    	// break the String into sub-strings, each of length 4
    	y = a.split(4);
    
    	// For all resources in the List (no matter what type)
    	// call the method "prepend" with "> " as the argument.
    	// In this case, there are only Strings in the List, so
    	// this is identical to the previous use of DistributeType.
    	// Just a different way to do it.
    	y.distributeAll("prepend", "> ");
    	out.print(y, endp); 	// print the List
    }
    
    

Contents

On to Statements in RSL