Examples of ParserVal


Examples of de.maramuse.soundcomp.parser.SCParser.ParserVal

   * @return the container of the symbol that occupies the name
   */
  public static ParserVal findContainer(String name){
  ParserStateElement current=current();
  while(current!=null){
    ParserVal val=current.getElement(name);
    if(val!=null)return current.val;
    current=up(current);
  }
  return null;
  }
View Full Code Here

Examples of de.maramuse.soundcomp.parser.SCParser.ParserVal

  if(inner.size()!=2)
    throw new InternalError("\"/\" requires two arguments "+getLocationText());
  if(inner.get(0).isConstant()&&inner.get(1).isConstant()){
    if(inner.get(0).getType()==SCParser.NUMBER&&inner.get(1).getType()==SCParser.NUMBER){
    try{
      ParserVal ret=new Number(inner.get(0).asDouble()/inner.get(1).asDouble());
      ret.setFilename(filename);
      ret.setLine(line);
      return ret;
    }catch(NumberFormatException ex){
      throw new IllegalArgumentException("should not happen: number format error", ex);
    }
    }
View Full Code Here

Examples of de.maramuse.soundcomp.parser.SCParser.ParserVal

 
  public NamedSource createTree(TemplateProvider element)
      throws UnknownConnectionException, TypeMismatchException{
  ProcessElement pe=element.getTemplate().clone();
  if(element instanceof FormulaElement3){
    ParserVal v1=((FormulaElement1)element).getInput1Val();
    SourceStore e1=getElement(v1);
    pe.setSource(StandardParameters.IN.i, e1.source, e1.sourceIndex);
    ParserVal v2=((FormulaElement1)element).getInput1Val();
    SourceStore e2=getElement(v2);
    pe.setSource(StandardParameters.LOW.i, e2.source, e2.sourceIndex);
    ParserVal v3=((FormulaElement1)element).getInput1Val();
    SourceStore e3=getElement(v3);
    pe.setSource(StandardParameters.HIGH.i, e3.source, e3.sourceIndex);
  }else
  if(element instanceof FormulaElement1){
    ParserVal v1=((FormulaElement1)element).getInput1Val();
    ProcessElement el=((TemplateProvider)v1).getTemplate();
    pe.setSource(StandardParameters.IN.i, el, StandardParameters.OUT.i);
    if(element instanceof FormulaElement2){
    ParserVal v2=((FormulaElement2)element).getInput2Val();
    ProcessElement e2=((TemplateProvider)v2).getTemplate();
    pe.setSource(StandardParameters.IN_IMAG.i, e2, StandardParameters.OUT.i);
    }
  }
  return pe;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.