Package ch.ethz.iks.slp.impl.attr.gen

Examples of ch.ethz.iks.slp.impl.attr.gen.Rule


    if("".equals(input)) {
      return new ArrayList();
    }
    Parser parser = new Parser();
    try {
      Rule parse = parser.parse("attr-list", input);
      AttributeListVisitor visitor = new AttributeListVisitor();
      parse.visit(visitor);
      return visitor.getAttributes();
    } catch (IllegalArgumentException e) {
      throw new ServiceLocationException(ServiceLocationException.PARSE_ERROR, e.getMessage());
    } catch (ParserException e) {
      throw new ServiceLocationException(ServiceLocationException.PARSE_ERROR, e.getMessage());
View Full Code Here


  protected List attributeStringToListLiberal(String input) {
    if("".equals(input)) {
      return new ArrayList();
    }
    Parser parser = new Parser();
    Rule rule = null;
    try {
      rule = parser.parse("attr-list", input);
    } catch (IllegalArgumentException e) {
      SLPCore.platform.logError(e.getMessage(), e);
      return new ArrayList();
      // may never happen!!!
    } catch (ParserException e) {
      SLPCore.platform.logTraceDrop(e.getMessage());
      rule = e.getRule();
    }
    AttributeListVisitor visitor = new AttributeListVisitor();
    rule.visit(visitor);
    return visitor.getAttributes();
  }
View Full Code Here

TOP

Related Classes of ch.ethz.iks.slp.impl.attr.gen.Rule

Copyright © 2018 www.massapicom. 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.