| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-21 09:37:26 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-21 09:37:26 +0200 |
| commit | bee770032c7bf22eb897085f516f440a72dc3a9a (patch) | |
| tree | 3404215bb51fa0ba8a2376ee5f20179ac4fd6f2c | |
| parent | b4935b361bd16648044526efba818fb6839e0ca9 (diff) | |
Completes When Node parsing.
| -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"} + ) + ); + } } |


