slow down spinner
[sbp.git] / src / edu / berkeley / sbp / Element.java
1 // Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
2
3 package edu.berkeley.sbp;
4 import edu.berkeley.sbp.util.*;
5 import edu.berkeley.sbp.*;
6 import edu.berkeley.sbp.*;
7 import java.io.*;
8 import java.util.*;
9 import java.lang.reflect.*;
10 import java.lang.ref.*;
11
12 /** <font color=green>the root superclass for all components of the grammar (terminals, nonterminals, literals, etc)</font> */
13 public abstract class Element implements SequenceOrElement {
14
15     /** sorry, you can't make up new, custom elements */
16     Element() { }
17
18     /** a more verbose version of toString() which should show the entire grammar */
19     abstract StringBuffer toString(StringBuffer sb);
20
21     /** returns the Forest resulting from matching this element against the empty string */
22     Forest<?> epsilonForm(Input.Region loc) { throw new Error("element " + this + " has no epsilon form"); }
23
24 }