Package wycs.io.WyalFileLexer

Examples of wycs.io.WyalFileLexer.Token


  private Expr parseLogicalExpression(WyalFile wf, HashSet<String> generics,
      HashSet<String> environment, boolean terminated) {
    checkNotEof();
    int start = index;
    Expr lhs = parseAndOrExpression(wf, generics, environment, terminated);
    Token lookahead = tryAndMatch(terminated, LogicalImplication,
        LogicalIff);
    if (lookahead != null) {
      switch (lookahead.kind) {

      case LogicalImplication: {
View Full Code Here


      HashSet<String> environment, boolean terminated) {
    checkNotEof();
    int start = index;
    Expr lhs = parseBitwiseOrExpression(wf, generics, environment,
        terminated);
    Token lookahead = tryAndMatch(terminated, LogicalAnd, LogicalOr);
    if (lookahead != null) {
      Expr.Binary.Op bop;
      switch (lookahead.kind) {
      case LogicalAnd:
        bop = Expr.Binary.Op.AND;
View Full Code Here

   */
  private Expr parseConditionExpression(WyalFile wf,
      HashSet<String> generics, HashSet<String> environment,
      boolean terminated) {
    int start = index;
    Token lookahead;

    // First, attempt to parse quantifiers (e.g. some, all, no, etc)
    if ((lookahead = tryAndMatch(terminated, Exists, Forall)) != null) {
      return parseQuantifierExpression(lookahead, wf, generics,
          environment, terminated);
View Full Code Here

      HashSet<String> environment, boolean terminated) {
    int start = index;
    Expr lhs = parseMultiplicativeExpression(wf, generics, environment,
        terminated);

    Token lookahead;
    while ((lookahead = tryAndMatch(terminated, Plus, Minus)) != null) {
      Expr.Binary.Op bop;
      switch (lookahead.kind) {
      case Plus:
        bop = Expr.Binary.Op.ADD;
View Full Code Here

      HashSet<String> generics, HashSet<String> environment,
      boolean terminated) {
    int start = index;
    Expr lhs = parseAccessExpression(wf, generics, environment, terminated);

    Token lookahead = tryAndMatch(terminated, Star, RightSlash, Percent);
    if (lookahead != null) {
      Expr.Binary.Op bop;
      switch (lookahead.kind) {
      case Star:
        bop = Expr.Binary.Op.MUL;
View Full Code Here

   */
  private Expr parseAccessExpression(WyalFile wf, HashSet<String> generics,
      HashSet<String> environment, boolean terminated) {
    int start = index;
    Expr lhs = parseTermExpression(wf, generics, environment, terminated);
    Token token;

    while ((token = tryAndMatchOnLine(LeftSquare)) != null
        || (token = tryAndMatch(terminated, Dot)) != null) {
      switch (token.kind) {
      case LeftSquare:
View Full Code Here

  private Expr parseTermExpression(WyalFile wf, HashSet<String> generics,
      HashSet<String> environment, boolean terminated) {
    checkNotEof();

    int start = index;
    Token token = tokens.get(index);

    switch (token.kind) {
    case LeftBrace:
      return parseBracketedExpression(wf, generics, environment,
          terminated);
View Full Code Here

    // this is a cast or bracketed expression. See JavaDoc comments
    // above for more on this. What we do is first skip any whitespace,
    // and then see what we've got.
    int next = skipLineSpace(index);
    if (next < tokens.size()) {
      Token lookahead = tokens.get(next);

      switch (lookahead.kind) {
      case Null:
      case True:
      case False:
View Full Code Here

      if (!firstTime) {
        match(Comma);
      }
      firstTime = false;
      // Parse field name being constructed
      Token n = match(Identifier);
      // Check field name is unique
      if (keys.contains(n.text)) {
        syntaxError("duplicate tuple key", n);
      }
      match(Colon);
View Full Code Here

      // respect the nesting of generic type lists.
      int count = 1;
      myIndex = myIndex + 1;

      while (myIndex < tokens.size() && count > 0) {
        Token token = tokens.get(myIndex);
        switch(token.kind) {
        case LeftAngle:
          count++;
          break;
        case RightAngle:
View Full Code Here

TOP

Related Classes of wycs.io.WyalFileLexer.Token

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.