Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import net.percederberg.grammatica.parser.*;
- import java.io.*;
- public class Parsuj{
- public static void main(String[] args) throws ParserCreationException, ParserLogException{
- Parsuj parsuj = new Parsuj();
- Node node = parsuj.parseArithmetic(System.in);
- node.printTo(System.out);
- }
- private Node parseArithmetic(InputStream input) throws ParserCreationException, ParserLogException{
- Parser parser = null;
- parser = new Plik1Parser(new InputStreamReader(input));
- return parser.parse();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement