summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ast-to-instr/src/VHDLProcess.java')
-rw-r--r--ast-to-instr/src/VHDLProcess.java27
1 files changed, 10 insertions, 17 deletions
diff --git a/ast-to-instr/src/VHDLProcess.java b/ast-to-instr/src/VHDLProcess.java
index 4f4ef73..0e26cce 100644
--- a/ast-to-instr/src/VHDLProcess.java
+++ b/ast-to-instr/src/VHDLProcess.java
@@ -5,8 +5,7 @@ import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
-import java.util.ArrayList;
-import java.util.Collection;
+import java.util.Stack;
public class VHDLProcess extends ParsableXML
{
@@ -45,15 +44,15 @@ public class VHDLProcess extends ParsableXML
}
@Override
- public Collection<ParsableXML> parse ()
+ public void parse
+ (
+ final Stack<ParsableXML> waiting_list
+ )
throws XPathExpressionException
{
- final Collection<ParsableXML> result;
final String xml_id;
final IDs local_id;
- result = new ArrayList<ParsableXML>();
-
xml_id = XMLManager.get_attribute(xml_node, "id");
local_id = IDs.get_id_from_xml_id(xml_id, "process");
@@ -84,9 +83,7 @@ public class VHDLProcess extends ParsableXML
handle_predicate_is_accessed_by(local_id);
/** Children ************************************************************/
- result.addAll(handle_child_node(local_id));
-
- return result;
+ handle_child_node(local_id, waiting_list);
}
/***************************************************************************/
@@ -461,14 +458,14 @@ public class VHDLProcess extends ParsableXML
/***************************************************************************/
/** Children ***************************************************************/
/***************************************************************************/
- private Collection<ParsableXML> handle_child_node
+ private void handle_child_node
(
- final IDs local_id
+ final IDs local_id,
+ final Stack<ParsableXML> waiting_list
)
throws XPathExpressionException
{
final Node start_node;
- final Collection<ParsableXML> result;
start_node =
(Node) XPE_FIND_START_NODE.evaluate
@@ -477,9 +474,7 @@ public class VHDLProcess extends ParsableXML
XPathConstants.NODE
);
- result = new ArrayList<ParsableXML>();
-
- result.add
+ waiting_list.push
(
new VHDLSSCNode
(
@@ -491,7 +486,5 @@ public class VHDLProcess extends ParsableXML
new String[0] /* No attributes. */
)
);
-
- return result;
}
}