Examples of SyntaxError


Examples of wycc.lang.SyntaxError

    Attribute.Source loc = e.attribute(Attribute.Source.class);
    throw new SyntaxError(msg, filename, loc.start, loc.end);
  }

  private void syntaxError(String msg, Token t) {
    throw new SyntaxError(msg, filename, t.start, t.start + t.text.length()
        - 1);
  }
View Full Code Here

Examples of wycc.lang.SyntaxError

   *            --- message to raise.
   * @param index
   *            --- index position to associate the error with.
   */
  private void syntaxError(String msg, int index) {
    throw new SyntaxError(msg, filename, index, index);
  }
View Full Code Here

Examples of wycc.lang.SyntaxError

   * called from contexts where we are expecting something to follow.
   */
  private void checkNotEof() {
    skipWhiteSpace();
    if (index >= tokens.size()) {
      throw new SyntaxError("unexpected end-of-file", filename,
          index - 1, index - 1);
    }
  }
View Full Code Here

Examples of wycc.lang.SyntaxError

    return new Attribute.Source(t1.start, t2.end(), 0);
  }

  private void syntaxError(String msg, SyntacticElement e) {
    Attribute.Source loc = e.attribute(Attribute.Source.class);
    throw new SyntaxError(msg, filename, loc.start, loc.end);
  }
View Full Code Here

Examples of wycc.lang.SyntaxError

    Attribute.Source loc = e.attribute(Attribute.Source.class);
    throw new SyntaxError(msg, filename, loc.start, loc.end);
  }

  private void syntaxError(String msg, Token t) {
    throw new SyntaxError(msg, filename, t.start, t.start + t.text.length()
        - 1);
  }
View Full Code Here

Examples of wycc.lang.SyntaxError

   *            --- message to raise.
   * @param index
   *            --- index position to associate the error with.
   */
  private void syntaxError(String msg, int index) {
    throw new SyntaxError(msg, filename, index, index);
  }
View Full Code Here

Examples of xbird.xquery.parser.SyntaxError

    public XQueryModule parse(Reader r, URI baseUri) throws XQueryException {
        final XQueryParser parser;
        try {
            parser = new XQueryParser(r);
        } catch (TokenMgrError e) {
            throw new SyntaxError("err:XPST0003", e);
        }
        if(_statEnv != null) {
            parser.setStaticContext(_statEnv);
        } else {
            this._statEnv = parser.getStaticContext();
View Full Code Here

Examples of xbird.xquery.parser.SyntaxError

        return _bodyExpression.eval(argv, dynEnv);
    }

    public static void checkAsPredefinedFunction(String nsuri) throws XQueryException {
        if(nsuri == null || nsuri.length() == 0) {
            throw new SyntaxError("err:XQST0060");
        }
        if(XQueryConstants.XML_URI.equals(nsuri) || XQueryConstants.XS_URI.equals(nsuri)
                || XQueryConstants.XSI_URI.equals(nsuri) || XQueryConstants.FN_URI.equals(nsuri)
                || XQueryConstants.XDT_URI.equals(nsuri)) {
            throw new SyntaxError("err:XQST0045");
        }
    }
View Full Code Here

Examples of xbird.xquery.parser.SyntaxError

    }

    public static UserFunction createUserFunction(Module declaredModule, QualifiedName funcName, List<ParametricVariable> parameters, Type returnType)
            throws XQueryException {
        if(declaredModule.lookupFunction(funcName, parameters) != null) {
            throw new SyntaxError("err:XPST0017");
        }
        final UserFunction func = new UserFunction(declaredModule, funcName, parameters, returnType);
        declaredModule.declareLocalFunction(func);
        return func;
    }
View Full Code Here

Examples of xbird.xquery.parser.SyntaxError

            }
            final URI uri;
            try {
                uri = new URI(baseURIString);
            } catch (URISyntaxException e) {
                throw new SyntaxError("err:XQST0046", e);
            }
            this.baseURI = uri;
            return uri;
        }
    }
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.