summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-07-24 13:40:40 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-07-24 13:40:40 +0200
commit66cfd64a7ed0c3809e033b0976c17e95bc6c50ca (patch)
tree0c136b72a6084115013643f4a5ebf6af6e758494 /ast-to-instr/src/VHDLWNode.java
parentfb0882b5e3622b762812f4ffe4688c7a344a02cd (diff)
Centralizes the processing of (read) expressions.
Diffstat (limited to 'ast-to-instr/src/VHDLWNode.java')
-rw-r--r--ast-to-instr/src/VHDLWNode.java38
1 files changed, 8 insertions, 30 deletions
diff --git a/ast-to-instr/src/VHDLWNode.java b/ast-to-instr/src/VHDLWNode.java
index 06a903c..66d0c00 100644
--- a/ast-to-instr/src/VHDLWNode.java
+++ b/ast-to-instr/src/VHDLWNode.java
@@ -10,15 +10,15 @@ import java.util.Stack;
/* When Node */
public class VHDLWNode extends VHDLNode
{
- private static final XPathExpression XPE_FIND_NAMED_ENTITIES;
+ private static final XPathExpression XPE_FIND_SOURCES;
private static final XPathExpression XPE_FIND_BODY;
static
{
- XPE_FIND_NAMED_ENTITIES =
+ XPE_FIND_SOURCES =
XMLManager.compile_or_die
(
- "./choice_expression//named_entity"
+ "./choice_expression" /* //named_entity" */
);
XPE_FIND_BODY =
@@ -159,38 +159,16 @@ public class VHDLWNode extends VHDLNode
)
throws XPathExpressionException
{
- final NodeList named_entities;
- final int named_entities_count;
+ final Node sources;
- named_entities =
- (NodeList) XPE_FIND_NAMED_ENTITIES.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);
}
/***************************************************************************/