rita
Class RiGrammar

java.lang.Object
  extended by rita.RiObject
      extended by rita.RiGrammar
All Implemented Interfaces:
processing.core.PConstants, RiGrammarIF, RiConstants

public class RiGrammar
extends RiObject
implements RiGrammarIF

Implementation of a (probabilistic) context-free grammar (with specific literary extensions) that performs generation from user-specified grammars.

 
    RiGrammar rg = new RiGrammar(this, "mygrammar.g");
    System.out.println(rg.expand());
RiTa grammar files are plain text files (generally ending with the '.g' extension and residing in the 'data' folder) that follow the format below:
    {
      <start>
      <rule1> | <rule2> | <rule3>
    }

    {
      <rule2>
      terminal1 | 
      terminal2 | <rule1>
      # this is a comment 
    }
    ...
Primary methods of interest: Other items of note: