| summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'ast-to-instr/src/VHDLWNode.java')
| -rw-r--r-- | ast-to-instr/src/VHDLWNode.java | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/ast-to-instr/src/VHDLWNode.java b/ast-to-instr/src/VHDLWNode.java index eda4836..4c2b2ee 100644 --- a/ast-to-instr/src/VHDLWNode.java +++ b/ast-to-instr/src/VHDLWNode.java @@ -12,6 +12,7 @@ import java.util.Collection; public class VHDLWNode extends VHDLNode { private static final XPathExpression XPE_FIND_NAMED_ENTITIES; + private static final XPathExpression XPE_FIND_BODY; static { @@ -20,6 +21,12 @@ public class VHDLWNode extends VHDLNode ( "./choice_expression//named_entity" ); + + XPE_FIND_BODY = + XMLManager.compile_or_die + ( + "./associated_chain" + ); } public VHDLWNode @@ -66,7 +73,7 @@ public class VHDLWNode extends VHDLNode handle_predicate_expr_reads(local_id); /** Children ************************************************************/ - //result.add(handle_body(local_id)); + result.add(handle_body(local_id)); return result; } @@ -181,4 +188,37 @@ public class VHDLWNode extends VHDLNode } } } + + /***************************************************************************/ + /** Children ***************************************************************/ + /***************************************************************************/ + + private ParsableXML handle_body + ( + final IDs local_id + ) + throws XPathExpressionException + { + final Node body; + + body = + (Node) XPE_FIND_BODY.evaluate + ( + xml_node, + XPathConstants.NODE + ); + + return + ( + new VHDLSSCNode + ( + parent_id, + body, + local_id, + next_node, + (depth + 1), + new String[] {"COND_WAS_TRUE"} + ) + ); + } } |


