X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2Fchr%2FCharParser.java;h=b5e6dfcda264b6a68f91fdaa15db9d5cf68cbdfd;hb=0ddfec9ac2783f59115205dc0f3806137265c59c;hp=9bdadbc1e90697c54588c3d7b292287b1e5fd9bc;hpb=82f9b8d4a2fadb14cb004e5cc9f14944458f2e6c;p=sbp.git diff --git a/src/edu/berkeley/sbp/chr/CharParser.java b/src/edu/berkeley/sbp/chr/CharParser.java index 9bdadbc..b5e6dfc 100644 --- a/src/edu/berkeley/sbp/chr/CharParser.java +++ b/src/edu/berkeley/sbp/chr/CharParser.java @@ -1,3 +1,5 @@ +// Copyright 2006 all rights reserved; see LICENSE file for BSD-style license + package edu.berkeley.sbp.chr; import java.io.*; import java.util.*; @@ -12,6 +14,7 @@ public class CharParser extends Parser { public Forest parse(InputStream is) throws IOException, ParseFailed { return super.parse(new CharInput(is)); } public Forest parse(Reader r) throws IOException, ParseFailed { return super.parse(new CharInput(r)); } + public Forest parse(String s) throws IOException, ParseFailed { return parse(new StringReader(s)); } public CharParser(Union u) { super(u, new CharTopology()); } @@ -19,7 +22,7 @@ public class CharParser extends Parser { public Forest shiftToken(Character ct, Location newloc) { if (oldloc==null) oldloc = newloc; - Forest ret = Forest.create(oldloc.createRegion(newloc), ct.toString(), null, false); + Forest ret = Forest.create(oldloc.createRegion(newloc), ct.toString(), null); oldloc = newloc; return ret; }