Examples of Parser


Examples of bsh.Parser

      putValue(Action.NAME, EditorExpressionsMessages.getString("BeanShellScriptingExpressionEditor.Validation"));
    }

    public void actionPerformed(final ActionEvent e)
    {
      final Parser parser = new Parser(new StringReader(getText()));
      parser.setRetainComments(true);
      setStatus(" ");
      try
      {
        //noinspection StatementWithEmptyBody
        while (!parser.Line())
        {
          ;
        }
        setStatus(EditorExpressionsMessages.getString("BeanShellScriptingExpressionEditor.ValidationComplete"));
      }
View Full Code Here

Examples of ca.uhn.hl7v2.parser.Parser

        // Helper class
    }

    @Converter
    public static String toString(Message message) throws HL7Exception {
        Parser parser = new PipeParser();
        String encoded = parser.encode(message);
        return encoded;
    }
View Full Code Here

Examples of cc.concurrent.mango.runtime.parser.Parser

        }
        String sql = sqlAnno.value();
        if (Strings.isNullOrEmpty(sql)) {
            throw new IncorrectSqlException("sql is null or empty");
        }
        ASTRootNode rootNode = new Parser(sql).parse().reduce();
        SQLType sqlType = getSQLType(sql);

        Class<?> returnType = method.getReturnType();
        if (sqlType == SQLType.SELECT) { // 查
            return new QueryOperator(rootNode, method, sqlType);
View Full Code Here

Examples of cc.redberry.core.parser.Parser

        kroneckerName = contextSettings.getKronecker();
        //Optional
        regim = contextSettings.getRegim();
        metricName = contextSettings.getMetricName();
        //Creating parser
        parser = new Parser(contextSettings.getParsers());
        //Creating symbol converter
        symbolConverter = new IndexConverterManager(contextSettings.getConverters());
        metricTypes = contextSettings.getMetricTypes();
        nameManager = new NameManager(this, contextSettings.getNameManagerSeed());
        nameManager.registerNewNameDescriptorListener(new MetricKroneckerListener());
View Full Code Here

Examples of cfdict.parser.Parser

           
            Download dl = new Download(config);
            dl.process();
            Decompress dp = new Decompress(config);
            dp.process();
            Parser p = new Parser(config);
            Generator g;
            if (config.getMode().equals("INSERT"))
                g = new InsertGenerator(config, p.process());
            else
                g = new UpdateGenerator(config, p.process());           
            g.process();
           
           
           
View Full Code Here

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

   */
  protected List attributeStringToList(String input) throws ServiceLocationException {
    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());
View Full Code Here

Examples of ch.pollet.jzic.parser.Parser

            System.out.println(jsap.getHelp());
            System.exit(0);
        }

        Database database = new Database();
        Parser parser     = new Parser(database);
        Compiler compiler = new Compiler(database);
        Writer writer = new Writer(database);

        parser.parse(config.getStringArray("inputFiles"));

        //todo: implement
//        compiler.setMinYear(config.getInt("minYear"));
//        compiler.setMaxYear(config.getInt("maxYear"));
        compiler.compile();
View Full Code Here

Examples of ch.qos.logback.core.pattern.parser.Parser

    DynamicConverter.startConverters(this.headTokenConverter);
  }

  void parse() {
    try {
      Parser p = new Parser(pattern);
      p.setStatusManager(getStatusManager());
      Node t = p.parse();
      this.headTokenConverter = p.compile(t, CONVERTER_MAP);

    } catch (ScanException sce) {
      addError("Failed to parse pattern \"" + pattern + "\".", sce);
    }
  }
View Full Code Here

Examples of cn.edu.hfut.dmic.webcollector.parser.Parser

                        String contentType = response.getContentType();

                        if (parsing) {
                            try {
                                Parser parser = parserFactory.createParser(url, contentType);
                                if (parser != null) {
                                    ParseResult parseresult = parser.getParse(page);
                                    page.setParseResult(parseresult);
                                }
                            } catch (Exception ex) {
                                LogUtils.getLogger().info("Exception", ex);
                            }
View Full Code Here

Examples of com.aliasi.corpus.Parser

  Logger logger = Logger.getLogger(TrainPOSTagger.class.getName());
  logger.debug("Started POS tagged model generation");

  //*-- set up parser with estimator as handler
  HmmCharLmEstimator estimator = new HmmCharLmEstimator(N_GRAM, NUM_CHARS, LAMBDA_FACTOR);
  Parser parser = new BrownPosParser();
  parser.setHandler(estimator);

  //*-- train on files in data directory ending in "txt"
  if (!TRAINING_DIR.isDirectory())
  { logger.fatal("Could not find training directory=" + TRAINING_DIR); }
  File[] files = TRAINING_DIR.listFiles(new FileExtensionFilter("txt"));
  for (int i = 0; i < files.length; ++i)
  { logger.debug("Training on file: " + files[i]); parser.parse(files[i]); }

  //*-- write output to file
  File modelFile = new File(MUSTRU_HOME + File.separator + "data" + File.separator + "training" + File.separator + "pos" + File.separator + "pos_tagger");
  ObjectOutputStream objOut = new ObjectOutputStream(new FileOutputStream(modelFile));
  estimator.compileTo(objOut);
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.