1 45 46 package edu.rice.cs.util.sexp; 47 48 public class TextAtom implements Atom { 49 protected String _text; 50 51 public TextAtom(String text) { _text = text; } 52 53 public String getText() { return _text; } 54 55 60 public <Ret> Ret accept(SExpVisitor<Ret> v){ 61 return v.forTextAtom(this); 62 } 63 64 69 public String toString() { return _text; } 70 } 71 72 78 class QuotedTextAtom extends TextAtom { 79 80 public QuotedTextAtom(String text) { super(text); } 81 82 public String toString() { 83 return edu.rice.cs.util.StringOps.convertToLiteral(_text); 84 } 85 } | Popular Tags |