// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final int ENDLESS = 1000;
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String FRED = "fred:";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String NULL = "Null";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String PIVOT = "Pivot";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String TOP = "top";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String VN_ROLE = "vn.role:";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String AMR_ARG = ":arg.";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String AMR_ARG0 = ":arg0";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String AMR_ARG1 = ":arg1";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String AMR_ARG2 = ":arg2";


import static amr2fred.Glossary.AMR_ARG1;
import static amr2fred.Glossary.AMR_ARG2;
import static amr2fred.Glossary.ENDLESS;
import static amr2fred.Glossary.FRED;
import static amr2fred.Glossary.NULL;
import static amr2fred.Glossary.PIVOT;
import static amr2fred.Glossary.TOP;
import static amr2fred.Glossary.VN_ROLE;
import static amr2fred.Glossary.NodeStatus.AMR;
import static amr2fred.Glossary.NodeStatus.OK;
import static amr2fred.Glossary.NodeStatus.REMOVE;
import static amr2fred.Glossary.NodeType.VERB;
import java.util.ArrayList;
import java.util.Iterator;
import static amr2fred.Glossary.AMR_ARG;
import static amr2fred.Glossary.AMR_ARG0;
    }

    /**
     * Return the list of node removed becouse of errors
     *
     * @return ArrayList of Node
     */
    public ArrayList<Node> getRemoved() {
        return removed;
    }

    /**
     * Parse AMR string and returns Fred root node
     *
     * @param amr String in amr format
     * @return Node Fred root node
     */
    public Node parse(String amr) {
        /*
        Il nodo root contiene la struttura dati che si ottiene
        passando la stringa amr al metodo string2Array e passando 
        il vettore ottenuto al metodo getNodes insieme alla relazione 
        speciale per il nodo radice.
         */
        Node root = getNodes(TOP, string2Array(amr));

        if (root != null) {
            endless = 0;
            this.rootCopy = root.getCopy();
            //verifica errore per ricorsione
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final int ENDLESS = 1000;
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String FRED = "fred:";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String NULL = "Null";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String PIVOT = "Pivot";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String TOP = "top";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String VN_ROLE = "vn.role:";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String AMR_ARG = ":arg.";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String AMR_ARG0 = ":arg0";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String AMR_ARG1 = ":arg1";
// 
// Path: amr2Fred/src/amr2fred/Glossary.java
// public static final String AMR_ARG2 = ":arg2";


// Path: amr2Fred/src/amr2fred/Parser.java
import static amr2fred.Glossary.AMR_ARG1;
import static amr2fred.Glossary.AMR_ARG2;
import static amr2fred.Glossary.ENDLESS;
import static amr2fred.Glossary.FRED;
import static amr2fred.Glossary.NULL;
import static amr2fred.Glossary.PIVOT;
import static amr2fred.Glossary.TOP;
import static amr2fred.Glossary.VN_ROLE;
import static amr2fred.Glossary.NodeStatus.AMR;
import static amr2fred.Glossary.NodeStatus.OK;
import static amr2fred.Glossary.NodeStatus.REMOVE;
import static amr2fred.Glossary.NodeType.VERB;
import java.util.ArrayList;
import java.util.Iterator;
import static amr2fred.Glossary.AMR_ARG;
import static amr2fred.Glossary.AMR_ARG0;

    }

    /**
     * Return the list of node removed becouse of errors
     *
     * @return ArrayList of Node
     */
    public ArrayList<Node> getRemoved() {
        return removed;
    }

    /**
     * Parse AMR string and returns Fred root node
     *
     * @param amr String in amr format
     * @return Node Fred root node
     */
    public Node parse(String amr) {
        /*
        Il nodo root contiene la struttura dati che si ottiene
        passando la stringa amr al metodo string2Array e passando 
        il vettore ottenuto al metodo getNodes insieme alla relazione 
        speciale per il nodo radice.
         */
        Node root = getNodes(TOP, string2Array(amr));

        if (root != null) {
            endless = 0;
            this.rootCopy = root.getCopy();
            //verifica errore per ricorsione
            if (endless > ENDLESS) {