Package org.codehaus.jparsec.error

Examples of org.codehaus.jparsec.error.ParserException


    return (T) ctxt.result;
  }
 
  private ParserException asParserException(Throwable e, ParseContext ctxt) {
    if (e instanceof ParserException) return (ParserException) e;
    return new ParserException(
        e, null, ctxt.module, ctxt.locator.locate(ctxt.getIndex()));
  }
View Full Code Here


  }

  private ParserException asParserException(Throwable e, ParseContext ctxt) {
    if (e instanceof ParserException)
      return (ParserException) e;
    return new ParserException(e, null, ctxt.module, ctxt.locator.locate(ctxt.getIndex()));
  }
View Full Code Here

   */
  static <T> T parse(
      CharSequence src, Parser<T> parser, SourceLocator locator, String module) {
    ScannerState ctxt = new ScannerState(module, src, 0, locator);
    if (!parser.run(ctxt)) {
      throw new ParserException(
          ctxt.renderError(), ctxt.module, locator.locate(ctxt.errorIndex()));
    }
    return parser.getReturn(ctxt);
  }
View Full Code Here

TOP

Related Classes of org.codehaus.jparsec.error.ParserException

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.