public String toString() { return "" + "'"+_value.getValue()+"'"; }
/** * Sets the {@code _value} child of this {@link ACharLiteralExp} node. * @param value the new {@code _value} child of this {@link ACharLiteralExp} node */ public void setValue(ILexCharacterToken value) { if (this._value != null) { this._value.parent(null); } if (value != null) { if (value.parent() != null) { value.parent().removeChild(value); } value.parent(this); } this._value = value; }
/** * Called by the {@link ACharacterPattern} node from {@link ACharacterPattern#apply(IAnalysis)}. * @param node the calling {@link ACharacterPattern} node */ public void caseACharacterPattern(ACharacterPattern node) throws AnalysisException { _visitedNodes.add(node); inACharacterPattern(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getValue() != null ) { node.getValue().apply(this); } outACharacterPattern(node); }
public PExp caseACharacterPattern(ACharacterPattern node) throws AnalysisException { ACharLiteralExp ch = new ACharLiteralExp(); ch.setValue(node.getValue().clone()); addPossibleType(ch, node); return ch; }
/** * Called by the {@link ACharacterPattern} node from {@link ACharacterPattern#apply(IAnalysis)}. * @param node the calling {@link ACharacterPattern} node */ public void caseACharacterPattern(ACharacterPattern node, Q question) throws AnalysisException { _visitedNodes.add(node); inACharacterPattern(node, question); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } if(node.getValue() != null ) { node.getValue().apply(this, question); } outACharacterPattern(node, question); }
@Override public SPatternIR caseACharacterPattern(ACharacterPattern node, IRInfo question) throws AnalysisException { char value = node.getValue().getValue(); ACharPatternIR charPatternCg = new ACharPatternIR(); charPatternCg.setValue(value); return charPatternCg; }
/** * Called by the {@link ACharacterPattern} node from {@link ACharacterPattern#apply(IPOFAnalysis)}. * @param node the calling {@link ACharacterPattern} node */ public void caseACharacterPattern(ACharacterPattern node) throws AnalysisException { _visitedNodes.add(node); inACharacterPattern(node); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } if(node.getValue() != null ) { node.getValue().apply(this); } outACharacterPattern(node); }
/** * Sets the {@code _value} child of this {@link ACharacterPattern} node. * @param value the new {@code _value} child of this {@link ACharacterPattern} node */ public void setValue(ILexCharacterToken value) { if (this._value != null) { this._value.parent(null); } if (value != null) { if (value.parent() != null) { value.parent().removeChild(value); } value.parent(this); } this._value = value; }
@Override public Value caseACharLiteralExp(ACharLiteralExp node, Context ctxt) throws AnalysisException { BreakpointManager.getBreakpoint(node).check(node.getLocation(), ctxt); return new CharacterValue(node.getValue().getValue()); }
/** * Called by the {@link ACharLiteralExp} node from {@link ACharLiteralExp#apply(IPOFAnalysis)}. * @param node the calling {@link ACharLiteralExp} node */ public void caseACharLiteralExp(ACharLiteralExp node) throws AnalysisException { _visitedNodes.add(node); inACharLiteralExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getValue() != null ) { node.getValue().apply(this); } outACharLiteralExp(node); }
@Override public List<NameValuePairList> caseACharacterPattern( ACharacterPattern pattern, Newquestion question) throws AnalysisException { List<NameValuePairList> result = new Vector<NameValuePairList>(); try { if (question.expval.charValue(question.ctxt) != pattern.getValue().getValue()) { VdmRuntimeError.patternFail(4107, "Character pattern match failed", pattern.getLocation()); } } catch (ValueException e) { VdmRuntimeError.patternFail(e, pattern.getLocation()); } result.add(new NameValuePairList()); return result; }
/** * Called by the {@link ACharLiteralExp} node from {@link ACharLiteralExp#apply(IAnalysis)}. * @param node the calling {@link ACharLiteralExp} node */ public void caseACharLiteralExp(ACharLiteralExp node) throws AnalysisException { _visitedNodes.add(node); inACharLiteralExp(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getValue() != null ) { node.getValue().apply(this); } outACharLiteralExp(node); }
@Override public SExpIR caseACharLiteralExp(ACharLiteralExp node, IRInfo question) throws AnalysisException { PType type = node.getType(); char value = node.getValue().getValue(); STypeIR typeCg = type.apply(question.getTypeVisitor(), question); ACharLiteralExpIR charLitCg = new ACharLiteralExpIR(); charLitCg.setType(typeCg); charLitCg.setValue(value); return charLitCg; }
/** * Called by the {@link ACharLiteralExp} node from {@link ACharLiteralExp#apply(IAnalysis)}. * @param node the calling {@link ACharLiteralExp} node */ public void caseACharLiteralExp(ACharLiteralExp node, Q question) throws AnalysisException { _visitedNodes.add(node); inACharLiteralExp(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getValue() != null ) { node.getValue().apply(this, question); } outACharLiteralExp(node, question); }
/** * Called by the {@link ACharacterPattern} node from {@link ACharacterPattern#apply(IAnalysis)}. * @param node the calling {@link ACharacterPattern} node */ public A caseACharacterPattern(ACharacterPattern node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inACharacterPattern(node)); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this)); } } } if(node.getValue() != null ) { mergeReturns(retVal,node.getValue().apply(this)); } mergeReturns(retVal,outACharacterPattern(node)); return retVal; }
/** * Called by the {@link ACharacterPattern} node from {@link ACharacterPattern#apply(IAnalysis)}. * @param node the calling {@link ACharacterPattern} node */ public A caseACharacterPattern(ACharacterPattern node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inACharacterPattern(node, question)); { List<PDefinition> copy = new ArrayList<PDefinition>(node.getDefinitions()); for( PDefinition e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this, question)); } } } if(node.getValue() != null ) { mergeReturns(retVal,node.getValue().apply(this, question)); } mergeReturns(retVal,outACharacterPattern(node, question)); return retVal; }
/** * Called by the {@link ACharLiteralExp} node from {@link ACharLiteralExp#apply(IAnalysis)}. * @param node the calling {@link ACharLiteralExp} node */ public A caseACharLiteralExp(ACharLiteralExp node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inACharLiteralExp(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getValue() != null ) { mergeReturns(retVal,node.getValue().apply(this)); } mergeReturns(retVal,outACharLiteralExp(node)); return retVal; }
/** * Called by the {@link ACharLiteralExp} node from {@link ACharLiteralExp#apply(IAnalysis)}. * @param node the calling {@link ACharLiteralExp} node */ public A caseACharLiteralExp(ACharLiteralExp node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inACharLiteralExp(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getValue() != null ) { mergeReturns(retVal,node.getValue().apply(this, question)); } mergeReturns(retVal,outACharLiteralExp(node, question)); return retVal; }