From 66cfd64a7ed0c3809e033b0976c17e95bc6c50ca Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Mon, 24 Jul 2017 13:40:40 +0200 Subject: Centralizes the processing of (read) expressions. --- ast-to-instr/src/VHDLSSASNode.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'ast-to-instr/src/VHDLSSASNode.java') diff --git a/ast-to-instr/src/VHDLSSASNode.java b/ast-to-instr/src/VHDLSSASNode.java index c67c3f2..05d8af0 100644 --- a/ast-to-instr/src/VHDLSSASNode.java +++ b/ast-to-instr/src/VHDLSSASNode.java @@ -22,7 +22,7 @@ public class VHDLSSASNode extends VHDLNode XPE_FIND_SOURCES = XMLManager.compile_or_die ( - "./waveform_chain//named_entity" + "./waveform_chain"/* //named_entity" */ ); XPE_FIND_PREFIXED_NE = XMLManager.compile_or_die("./prefix/named_entity"); @@ -164,22 +164,16 @@ public class VHDLSSASNode extends VHDLNode ) throws XPathExpressionException { - final NodeList sources; - final int sources_count; + final Node sources; sources = - (NodeList) XPE_FIND_SOURCES.evaluate + (Node) XPE_FIND_SOURCES.evaluate ( xml_node, - XPathConstants.NODESET + XPathConstants.NODE ); - sources_count = sources.getLength(); - - for (int i = 0; i < sources_count; ++i) - { - handle_expression("expr_reads", local_id, sources.item(0)); - } + handle_expression(local_id, sources); } private void handle_predicate_expr_writes -- cgit v1.2.3-70-g09d2