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/VHDLCSNode.java | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'ast-to-instr/src/VHDLCSNode.java') diff --git a/ast-to-instr/src/VHDLCSNode.java b/ast-to-instr/src/VHDLCSNode.java index ebc1b52..7989c67 100644 --- a/ast-to-instr/src/VHDLCSNode.java +++ b/ast-to-instr/src/VHDLCSNode.java @@ -19,7 +19,7 @@ public class VHDLCSNode extends VHDLNode XPE_FIND_SOURCES = XMLManager.compile_or_die ( - "./expression//named_entity" + "./expression"/*//named_entity"*/ ); XPE_FIND_OTHERS_BRANCH = @@ -172,38 +172,16 @@ public class VHDLCSNode extends VHDLNode ) throws XPathExpressionException { - final NodeList named_entities; - final int named_entities_count; + final Node sources; - named_entities = - (NodeList) XPE_FIND_SOURCES.evaluate + sources = + (Node) XPE_FIND_SOURCES.evaluate ( xml_node, - XPathConstants.NODESET + XPathConstants.NODE ); - named_entities_count = named_entities.getLength(); - - for (int i = 0; i < named_entities_count; ++i) - { - final String ref; - - ref = XMLManager.get_attribute(named_entities.item(0), "ref"); - - if (!Main.node_is_function_or_literal(ref)) - { - Predicates.add_entry - ( - output, - "expr_reads", - local_id, - Waveforms.get_associated_waveform_id - ( - IDs.get_id_from_xml_id(ref, (String) null) - ) - ); - } - } + handle_expression(local_id, sources); } /***************************************************************************/ -- cgit v1.2.3-70-g09d2