}
public void outAConstantValue(AConstantValue node) {
- if(DEBUG) System.out.println("outAConstantValue " + node);
+ if(DEBUG) System.out.println("outAConstantValue " + node); //$NON-NLS-1$
stack.push(Double.valueOf(node.toString()));
}
public void outAStringValue(AStringValue node) {
- if(DEBUG) System.out.println("outAStringValue " + node);
+ if(DEBUG) System.out.println("outAStringValue " + node); //$NON-NLS-1$
String value = node.toString();
stack.push(value.substring(1, value.length() - 2));
}
public void outAAddressValue(AAddressValue node) {
- if(DEBUG) System.out.println("outAAddressValue " + node);
+ if(DEBUG) System.out.println("outAAddressValue " + node); //$NON-NLS-1$
stack.push('&' + node.getRange().toString());
}
@Override
public void outASingleRange(ASingleRange node) {
- if(DEBUG) System.out.println("outASingleRange " + node);
+ if(DEBUG) System.out.println("outASingleRange " + node); //$NON-NLS-1$
}
@Override
public void outARviValue(ARviValue node) {
- if(DEBUG) System.out.println("outARviValue " + node);
+ if(DEBUG) System.out.println("outARviValue " + node); //$NON-NLS-1$
String rvi = node.toString().trim();
stack.push(format(var.getValue(graph)));
} catch (DatabaseException e) {
Logger.defaultLogError(e);
- stack.push("<No value for '" + rvi + "'>");
+ stack.push("<No value for '" + rvi + "'>"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@Override
public void outAVariablePrimary(AVariablePrimary node) {
- if(DEBUG) System.out.println("outAVariablePrimary " + node);
+ if(DEBUG) System.out.println("outAVariablePrimary " + node); //$NON-NLS-1$
String identifier = node.toString().trim();
- if("value".equals(identifier)) {
+ if("value".equals(identifier)) { //$NON-NLS-1$
try {
stack.push(format(variable.getValue(graph)));
} catch (DatabaseException e) {
public void outARangeValue(ARangeValue node) {
- if(DEBUG) System.out.println("outARangeValue " + node);
+ if(DEBUG) System.out.println("outARangeValue " + node); //$NON-NLS-1$
String identifier = node.getRange().toString().trim();
stack.push(identifier);
private String format(Object o) {
if(formatter != null)
return formatter.format(o);
- else return o != null ? o.toString() : "";
+ else return o != null ? o.toString() : ""; //$NON-NLS-1$
}
private double extractValue(Object o) {
public void outAPlusExpression(APlusExpression node) {
- if(DEBUG) System.out.println("outAPlusExpression " + node);
+ if(DEBUG) System.out.println("outAPlusExpression " + node); //$NON-NLS-1$
Object o2 = stack.pop();
Object o1 = stack.pop();
public void outAMultMultiplicative(AMultMultiplicative node) {
- if(DEBUG) System.out.println("outAMultiplicative " + node);
+ if(DEBUG) System.out.println("outAMultiplicative " + node); //$NON-NLS-1$
Object o1 = stack.pop();
Object o2 = stack.pop();
public void outAFunctionPrimary(AFunctionPrimary node) {
- if(DEBUG) System.out.println("outAFunctionPrimary " + node);
+ if(DEBUG) System.out.println("outAFunctionPrimary " + node); //$NON-NLS-1$
try {
- String functionName = node.getFunc().getText().replace("(", "");
+ String functionName = node.getFunc().getText().replace("(", ""); //$NON-NLS-1$ //$NON-NLS-2$
if (DEBUG_APPLICATION)
- System.out.println("function apply " + functionName);
+ System.out.println("function apply " + functionName); //$NON-NLS-1$
Function function = builtins.get(functionName);
if (function != null) {
} else {
//stack.push(null);
- throw new EvaluationException("Function not found in dependencies: '" + functionName + "'");
+ throw new EvaluationException("Function not found in dependencies: '" + functionName + "'"); //$NON-NLS-1$ //$NON-NLS-2$
}