1 // (C) 2006-2007 all rights reserved; see LICENSE file for BSD-style license
3 package edu.berkeley.sbp;
4 import edu.berkeley.sbp.util.*;
8 * an element which matches some set of one-token-long input strings
12 * This class is a topology over itself (yes, this is impredicative).
13 * This means that you can call Atom.union(Atom) and get back an Atom.
14 * If you are interested in the topology of <i>tokens</i> which this
15 * Atom can match, use the <tt>getTokenTopology()</tt> method.
18 public abstract class Atom<Token>
20 implements Topology<Atom<Token>> {
22 /** the set (topology) of tokens that can match this element */
23 public abstract Topology<Token> getTokenTopology();
25 StringBuffer toString(StringBuffer sb) { sb.append(this); return sb; }