checkpoint
[sbp.git] / src / edu / berkeley / sbp / Element.java
1 package edu.berkeley.sbp;
2 import edu.berkeley.sbp.util.*;
3 import edu.berkeley.sbp.*;
4 import edu.berkeley.sbp.*;
5 import java.io.*;
6 import java.util.*;
7 import java.lang.reflect.*;
8 import java.lang.ref.*;
9
10 /** <font color=green>the root superclass for all components of the grammar (terminals, nonterminals, literals, etc)</font> */
11 public abstract class Element {
12
13     /** sorry, you can't make up new, custom elements */
14     Element() { }
15
16     abstract StringBuffer toString(StringBuffer sb);
17
18     /** returns the Forest resulting from matching this element against the empty string */
19     Forest epsilonForm() { throw new Error("element " + this + " has no epsilon form"); }
20
21 }