1 // Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
3 package edu.berkeley.sbp;
4 import edu.berkeley.sbp.util.*;
5 import edu.berkeley.sbp.*;
6 import edu.berkeley.sbp.*;
9 import java.lang.reflect.*;
10 import java.lang.ref.*;
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 {
15 /** sorry, you can't make up new, custom elements */
18 abstract StringBuffer toString(StringBuffer sb);
20 /** returns the Forest resulting from matching this element against the empty string */
21 Forest<?> epsilonForm(Input.Region loc) { throw new Error("element " + this + " has no epsilon form"); }