checkpoint
[sbp.git] / src / edu / berkeley / sbp / chr / CharParser.java
1 package edu.berkeley.sbp.chr;
2 import java.io.*;
3 import java.util.*;
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;
10
11 public class CharParser extends Parser<Character,String> {
12
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)); }
15
16     public CharParser(Union u) { super(u, new CharTopology()); }
17
18     public Forest<String> shiftToken(Character ct, Location loc) {
19         return Forest.create(loc, ct.toString(), null, null, false, false, null);
20     }
21
22 }