Package org.apache.uima.ruta.parser

Examples of org.apache.uima.ruta.parser.RutaLexer


  }

  private RutaModule loadScript(String scriptLocation) throws IOException, RecognitionException {
    File scriptFile = new File(scriptLocation);
    CharStream st = new ANTLRFileStream(scriptLocation, scriptEncoding);
    RutaLexer lexer = new RutaLexer(st);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    RutaParser parser = new RutaParser(tokens);
    parser.setExternalFactory(factory);
    parser.setResourcePaths(resourcePaths);
    String name = scriptFile.getName();
View Full Code Here


    InputStream scriptInputStream = getClass().getClassLoader().getResourceAsStream(scriptLocation);
    if (scriptInputStream == null) {
      throw new FileNotFoundException("No script found in location [" + scriptLocation + "]");
    }
    CharStream st = new ANTLRInputStream(scriptInputStream, scriptEncoding);
    RutaLexer lexer = new RutaLexer(st);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    RutaParser parser = new RutaParser(tokens);
    parser.setExternalFactory(factory);
    parser.setResourcePaths(resourcePaths);
    String name = scriptLocation;
View Full Code Here

    this.problemReporter = reporter;

    RutaModuleDeclaration moduleDeclaration = new RutaModuleDeclaration(content.length(), true);

    CharStream st = new ANTLRStringStream(content);
    RutaLexer lexer = new TMLexer(st);

    CommonTokenStream tokens = new CommonTokenStream(lexer);
    this.tokenStream = tokens;

    RutaParser parser = new RutaParser(this.tokenStream);
View Full Code Here

  }

  private RutaModule loadScript(String scriptLocation) throws IOException, RecognitionException {
    File scriptFile = new File(scriptLocation);
    CharStream st = new ANTLRFileStream(scriptLocation, scriptEncoding);
    RutaLexer lexer = new RutaLexer(st);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    RutaParser parser = new RutaParser(tokens);
    parser.setExternalFactory(factory);
    parser.setResourcePaths(resourcePaths);
    parser.setResourceManager(resourceManager);
View Full Code Here

    InputStream scriptInputStream = getClass().getClassLoader().getResourceAsStream(scriptLocation);
    if (scriptInputStream == null) {
      throw new FileNotFoundException("No script found in location [" + scriptLocation + "]");
    }
    CharStream st = new ANTLRInputStream(scriptInputStream, scriptEncoding);
    RutaLexer lexer = new RutaLexer(st);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    RutaParser parser = new RutaParser(tokens);
    parser.setExternalFactory(factory);
    parser.setResourcePaths(resourcePaths);
    String name = scriptLocation;
View Full Code Here

  private RutaModule loadScript(String scriptLocation, TypeSystemDescription localTSD)
          throws IOException, RecognitionException {
    File scriptFile = new File(scriptLocation);
    CharStream st = new ANTLRFileStream(scriptLocation, scriptEncoding);
    RutaLexer lexer = new RutaLexer(st);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    RutaParser parser = new RutaParser(tokens);
    parser.setLocalTSD(localTSD);
    parser.setExternalFactory(factory);
    parser.setResourcePaths(resourcePaths);
View Full Code Here

  private RutaModule loadScriptIS(String scriptLocation, TypeSystemDescription localTSD)
          throws IOException, RecognitionException {
    InputStream scriptInputStream = getClass().getClassLoader().getResourceAsStream(scriptLocation);
    CharStream st = new ANTLRInputStream(scriptInputStream, scriptEncoding);
    RutaLexer lexer = new RutaLexer(st);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    RutaParser parser = new RutaParser(tokens);
    parser.setLocalTSD(localTSD);
    parser.setExternalFactory(factory);
    parser.setResourcePaths(resourcePaths);
View Full Code Here

    RutaModuleDeclaration moduleDeclaration = new RutaModuleDeclaration(content.length(),
            true);

    CharStream st = new ANTLRStringStream(content);
    RutaLexer lexer = new TMLexer(st);

    CommonTokenStream tokens = new CommonTokenStream(lexer);
    this.tokenStream = tokens;

    RutaParser parser = new RutaParser(this.tokenStream);
View Full Code Here

  }

  private RutaModule loadScript(String scriptLocation) throws IOException, RecognitionException {
    File scriptFile = new File(scriptLocation);
    CharStream st = new ANTLRFileStream(scriptLocation, scriptEncoding);
    RutaLexer lexer = new RutaLexer(st);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    RutaParser parser = new RutaParser(tokens);
    parser.setExternalFactory(factory);
    parser.setResourcePaths(resourcePaths);
    String name = scriptFile.getName();
View Full Code Here

    InputStream scriptInputStream = getClass().getClassLoader().getResourceAsStream(scriptLocation);
    if (scriptInputStream == null) {
            throw new FileNotFoundException("No script found in location [" + scriptLocation + "]");
    }
    CharStream st = new ANTLRInputStream(scriptInputStream, scriptEncoding);
    RutaLexer lexer = new RutaLexer(st);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    RutaParser parser = new RutaParser(tokens);
    parser.setExternalFactory(factory);
    parser.setResourcePaths(resourcePaths);
    String name = scriptLocation;
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.parser.RutaLexer

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.