Examples of Parser


Examples of us.bpsm.edn.parser.Parser

   *
   * @param ednString
   * @return
   */
  public static AMatrix parse(String ednString) {
    Parser p = Parsers.newParser(getMatrixParserConfig());
    Parseable ps = Parsers.newParseable(ednString);
    @SuppressWarnings("unchecked")
    List<List<Object>> data = (List<List<Object>>) p.nextValue(ps);
    int rc = data.size();
    int cc = (rc == 0) ? 0 : data.get(0).size();
    AMatrix m = newMatrix(rc, cc);
    for (int i = 0; i < rc; i++) {
      List<Object> row=data.get(i);
View Full Code Here

Examples of webit.script.core.Parser

    private TemplateAST parse(boolean force) throws ParseException {
        TemplateAST myAst = this.ast;
        synchronized (this) {
            if (force || myAst == null || this.resource.isModified()) {
                myAst = new Parser().parse(this);
                this.ast = myAst;
                this.lastModified = System.currentTimeMillis();
            }
        }
        return myAst;
View Full Code Here

Examples of weka.core.mathematicalexpression.Parser

   * @throws Exception  if something goes wrong
   */
  public static double evaluate(String expr, HashMap symbols) throws Exception {
    SymbolFactory     sf;
    ByteArrayInputStream   parserInput;
    Parser       parser;
   
    sf          = new DefaultSymbolFactory();
    parserInput = new ByteArrayInputStream(expr.getBytes());
    parser      = new Parser(new Scanner(parserInput, sf), sf);
    parser.setSymbols(symbols);
    parser.parse();
   
    return parser.getResult();
  }
View Full Code Here

Examples of zephyropen.xml.Parser

  /** */
  public void readXML(File file) {

    /** Basic XML parser */
    Parser xmlParser = new XMLParser();

    constants.info("opening: " + file.getName());

    LineNumberReader lnreader = null;
    FileReader freader = null;
    try {

      freader = new FileReader(file);
      lnreader = new LineNumberReader(freader);
      String line = "";
      Command command;

      long start = System.currentTimeMillis();
      while ((line = lnreader.readLine()) != null) {
        command = xmlParser.parse(line);
        if (command != null) {
          if (insert(command))
            counter++;
        }
      }
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.