Mercurial > hg > Members > kono > PLparser
view src/plparser/PLScanner.java @ 14:1baccfe55597 default tip
pp fix
author | one |
---|---|
date | Fri, 03 Sep 2010 08:21:53 +0900 |
parents | 79d492bce828 |
children |
line wrap: on
line source
package plparser; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.InputStream; import java.io.InputStreamReader; public interface PLScanner<Node> { String filename(); int lineno(); public Token<Node> nextToken(); public boolean hasRemaining(); public PLScanner<Node> pushScannerFile(InputStream newfile, String prompt); PLScanner<Node> prev(); PLScanner<Node> pushScanner(String exp); PLScanner<Node> pushScannerFile(String file) throws FileNotFoundException; PLScanner<Node> popScanner(); public PLScanner<Node> set(String exp); /* * Read From File * We cannot read symbol bigger than Buffersize */ public PLScanner<Node> setFile(String file) throws FileNotFoundException; public PLScanner<Node> set(InputStreamReader file); public void error(String err); public Iterable<Token<Node>> scanToken(String exp); public Iterable<Token<Node>> scanToken(FileReader file); public Dictionary<Node> dictionary(); }