Package edu.mit.csail.sdg.alloy4

Examples of edu.mit.csail.sdg.alloy4.Pos.merge()


          case 2: // Spec ::= Spec MODULE Name
            {
              Object RESULT =null;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n);         parser.alloymodule.addModelName(o.merge(n.pos) , n.label , new ArrayList<ExprVar>());
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Spec",69, RESULT);
            }
          return CUP$CompParser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
 
View Full Code Here


    /** Returns a Pos object representing the entire span of this expression and all its subexpressions. */
    public Pos span() {
       Pos p = span;
       if (p == null) {
          p = expr.span().merge(disjoint).merge(disjoint2);
          for(ExprHasName n: names) p = p.merge(n.span());
          span = p;
       }
       return p;
    }

View Full Code Here

    /** {@inheritDoc} */
    @Override public Pos span() {
        Pos p=span;
        if (p==null) {
            p=pos;
            for(Expr a:choices) p=p.merge(a.span());
            span=p;
        }
        return p;
    }

View Full Code Here

    /** {@inheritDoc} */
    @Override public Pos span() {
        Pos p=span;
        if (p==null) {
            p=pos.merge(closingBracket);
            for(Expr a:args) p=p.merge(a.span());
            span=p;
        }
        return p;
    }

View Full Code Here

    /** {@inheritDoc} */
    @Override public Pos span() {
        Pos p=span;
        if (p==null) {
            p=pos.merge(closingBracket);
            for(Expr a:args) p=p.merge(a.span());
            span=p;
        }
        return p;
    }

View Full Code Here

    /** {@inheritDoc} */
    @Override public Pos span() {
        Pos p=span;
        if (p==null) {
            p=pos.merge(closingBracket);
            for(Expr a:args) p=p.merge(a.span());
            span=p;
        }
        return p;
    }

View Full Code Here

        if (n!=null) nod(n);
        int bitwidth=(-1), maxseq=(-1), overall=(-1), expects=(c==null ? -1 : c.num);
        Pos p = o.pos.merge(n!=null ? n.span() : e.span());
        for(int i=s.size()-1; i>=0; i--) {
          Sig j=s.get(i).sig;  int k=s.get(i).startingScope;
          p=p.merge(j.pos);
          if (j.label.equals("univ")) { overall=k; s.remove(i); continue; }
          if (j.label.equals("int"))  { if (bitwidth>=0) throw new ErrorSyntax(j.pos, "The bitwidth cannot be specified more than once."); bitwidth=k; s.remove(i); continue; }
          if (j.label.equals("seq"))  { if (maxseq>=0) throw new ErrorSyntax(j.pos, "The maximum sequence length cannot be specified more than once."); maxseq=k; s.remove(i); continue; }
        }
        if (n!=null)
View Full Code Here

          case 346: // BaseExpr ::= AT Name
            {
              Expr RESULT =null;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        ExprVar x = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(x); RESULT = ExprVar.make(o.merge(x.pos), "@"+x.label);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("BaseExpr",2, RESULT);
            }
          return CUP$CompParser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
 
View Full Code Here

          case 102: // Name ::= SEQ SLASH NameHelper
            {
              ExprVar RESULT =null;
        Pos a = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-2)).value;
        ExprVar b = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         RESULT=ExprVar.make(a.merge(b.pos)"seq/"+b.label);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Name",41, RESULT);
            }
          return CUP$CompParser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
 
View Full Code Here

          case 101: // Name ::= THIS SLASH NameHelper
            {
              ExprVar RESULT =null;
        Pos a = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-2)).value;
        ExprVar b = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         RESULT=ExprVar.make(a.merge(b.pos), "this/"+b.label);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Name",41, RESULT);
            }
          return CUP$CompParser$result;

          /*. . . . . . . . . . . . . . . . . . . .*/
 
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.