1 package edu.berkeley.sbp.chr;
4 import java.lang.reflect.*;
5 import java.lang.ref.*;
6 import edu.berkeley.sbp.*;
7 import edu.berkeley.sbp.util.*;
8 import edu.berkeley.sbp.misc.*;
9 import edu.berkeley.sbp.Input.Location;
11 public class CharParser extends Parser<Character,String> {
13 public Forest<String> parse(InputStream is) throws IOException, ParseFailed { return super.parse(new CharInput(is)); }
14 public Forest<String> parse(Reader r) throws IOException, ParseFailed { return super.parse(new CharInput(r)); }
16 public CharParser(Union u) { super(u, new CharTopology()); }
18 public Forest<String> shiftToken(Character ct, Location loc) {
19 return Forest.create(loc, ct.toString(), null, null, false, false, null);