// Path: src/main/java/uk/ac/susx/tag/gramexp/ast/Node.java
// public interface Node<T extends Node<T>> extends GraphNode<T> {
// 
//     /**
//      * @return the index of the first character in the underlying buffer that is covered by this node 
//      */
//     int getStartIndex();
// 
//     /**
//      * @return the index of the character after the last one in the underlying buffer that is covered by this node
//      */
//     int getEndIndex();
//     
//     void accept(Visitor visitor);
// }


import org.parboiled.*;
import org.parboiled.annotations.BuildParseTree;
import org.parboiled.annotations.SuppressSubnodes;
import org.parboiled.common.Tuple2;
import org.parboiled.errors.ErrorUtils;
import org.parboiled.parserunners.ReportingParseRunner;
import org.parboiled.support.ParsingResult;
import org.parboiled.support.Var;
import uk.ac.susx.tag.gramexp.ast.*;
import uk.ac.susx.tag.gramexp.ast.Node;
import java.io.BufferedReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import static org.parboiled.support.ParseTreeUtils.printNodeTree;
package uk.ac.susx.tag.gramexp;





/**
 * Created by simon on 26/05/16.
 */
@BuildParseTree
public class PegParser extends BaseParser<Object> {


    public GrammarNode parse(String input) {

        ReportingParseRunner runner = new ReportingParseRunner(Grammar());

// Path: src/main/java/uk/ac/susx/tag/gramexp/ast/Node.java
// public interface Node<T extends Node<T>> extends GraphNode<T> {
// 
//     /**
//      * @return the index of the first character in the underlying buffer that is covered by this node 
//      */
//     int getStartIndex();
// 
//     /**
//      * @return the index of the character after the last one in the underlying buffer that is covered by this node
//      */
//     int getEndIndex();
//     
//     void accept(Visitor visitor);
// }


// Path: src/main/java/uk/ac/susx/tag/gramexp/PegParser.java
import org.parboiled.*;
import org.parboiled.annotations.BuildParseTree;
import org.parboiled.annotations.SuppressSubnodes;
import org.parboiled.common.Tuple2;
import org.parboiled.errors.ErrorUtils;
import org.parboiled.parserunners.ReportingParseRunner;
import org.parboiled.support.ParsingResult;
import org.parboiled.support.Var;
import uk.ac.susx.tag.gramexp.ast.*;
import uk.ac.susx.tag.gramexp.ast.Node;
import java.io.BufferedReader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import static org.parboiled.support.ParseTreeUtils.printNodeTree;

package uk.ac.susx.tag.gramexp;





/**
 * Created by simon on 26/05/16.
 */
@BuildParseTree
public class PegParser extends BaseParser<Object> {


    public GrammarNode parse(String input) {

        ReportingParseRunner runner = new ReportingParseRunner(Grammar());

        ParsingResult<Node> result = runner.run(input);