Package wycs.io.WyalFileLexer

Examples of wycs.io.WyalFileLexer.Token.end()


  private Attribute.Source sourceAttr(int start, int end) {
    Token t1 = tokens.get(start);
    Token t2 = tokens.get(end);
    // FIXME: problem here with the line numbering ?
    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


        SyntacticType type = new SyntacticType.Function(ret,
            throwsType, paramTypes, sourceAttr(start, index - 1));

        return new Pair<SyntacticType, Expr.Variable>(type,
            new Expr.Variable(id.text, sourceAttr(id.start,
                id.end())));
      } else {
        // In this case, we failed to match a mixed type. Therefore, we
        // backtrack and parse as two separate items (i.e. type
        // identifier).
        index = start; // backtrack
View Full Code Here

    // This is the normal case, where we expect an identifier to follow the
    // type.
    SyntacticType type = parseType(generics);
    Token id = match(Identifier);
    return new Pair<SyntacticType, Expr.Variable>(type, new Expr.Variable(
        id.text, sourceAttr(id.start, id.end())));
  }

  public boolean mustParseAsMixedType() {
    int start = index;
    if (tryAndMatch(true, Function) != null
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.