Package org.spoofax.jsglr.shared

Examples of org.spoofax.jsglr.shared.SGLRException


      IStrategoTerm toplevelDecl = parseResult.a;
      String rest = input.substring(Math.min(parseResult.b, input.length()));

      if (input.equals(rest))
        if (driver.getParser().getCollectedErrors().isEmpty())
          throw new SGLRException(driver.getParser(), "empty toplevel declaration parse rule");
        else
          throw driver.getParser().getCollectedErrors().iterator().next();
     
//      try {
//        if (!rest.isEmpty())
View Full Code Here


      IStrategoTerm body = ATermCommands.getApplicationSubterm(aterm, "module", 2);
      IStrategoTerm term = ATermCommands.makeTuple(imports, body);

      return new ModuleKey(dependentFiles, SDF_FILE_PATTERN, term);
    } catch (Exception e) {
      throw new SGLRException(parser, "could not parse SDF file " + sdf, e);
    } finally {
      log.endTask();
    }
  }
View Full Code Here

    } catch (ExecutionException e) {
      if (e.getCause() instanceof SGLRException)
        throw (SGLRException) e.getCause();
      throw new RuntimeException("unexpected execution error", e);
    } catch (InterruptedException e) {
      throw new SGLRException(parser, "parser was interrupted", e);
    } catch (TimeoutException e) {
      res.cancel(true);
      throw new SGLRException(parser, "parser timed out, timeout at " + PARSE_TIMEOUT + "ms", e);
    }
  }
View Full Code Here

      aterm = ATermCommands.getApplicationSubterm(aterm, "Module", 1);

      return new ModuleKey(dependentFiles, STR_FILE_PATTERN, aterm);
    } catch (Exception e) {
      throw new SGLRException(strParser, "could not parse STR file " + str, e);
    } finally {
      log.endTask();
    }
   
  }
View Full Code Here

TOP

Related Classes of org.spoofax.jsglr.shared.SGLRException

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.