Examples of span()


Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

        Pos p = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-5)).value;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-3)).value;
        Expr r = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addFunc(o.merge(v.span()), p, n.label, null, null , mult(r), v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Function",29, RESULT);
            }
          return CUP$CompParser$result;

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

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-7)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-6)).value;
        List<Decl> d = (List<Decl>)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        Expr r = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addFunc(o.merge(v.span()), p, n.label, null, d    , mult(r), v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Function",29, RESULT);
            }
          return CUP$CompParser$result;

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

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-7)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-6)).value;
        List<Decl> d = (List<Decl>)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        Expr r = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addFunc(o.merge(v.span()), p, n.label, null, d    , mult(r), v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Function",29, RESULT);
            }
          return CUP$CompParser$result;

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

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

              Object RESULT =null;
        Pos p = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-3)).value;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-2)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-1)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addMacro(o.merge(v.span()), p, n.label, null  , v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Macro",39, RESULT);
            }
          return CUP$CompParser$result;

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

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

              Object RESULT =null;
        Pos p = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-5)).value;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-3)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addMacro(o.merge(v.span()), p, n.label, null  , v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Macro",39, RESULT);
            }
          return CUP$CompParser$result;

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

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

        Pos p = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-6)).value;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-5)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        List<ExprVar> d = (List<ExprVar>)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-2)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addMacro(o.merge(v.span()), p, n.label, d     , v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Macro",39, RESULT);
            }
          return CUP$CompParser$result;

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

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

              Object RESULT =null;
        Pos p = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-5)).value;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-3)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addMacro(o.merge(v.span()), p, n.label, null  , v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Macro",39, RESULT);
            }
          return CUP$CompParser$result;

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

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

        Pos p = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-6)).value;
        Pos o = (Pos)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-5)).value;
        ExprVar n = (ExprVar)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-4)).value;
        List<ExprVar> d = (List<ExprVar>)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.elementAt(CUP$CompParser$top-2)).value;
        Expr v = (Expr)((java_cup_11a.runtime.Symbol) CUP$CompParser$stack.peek()).value;
         nod(n); parser.alloymodule.addMacro(o.merge(v.span()), p, n.label, d     , v);
              CUP$CompParser$result = parser.getSymbolFactory().newSymbol("Macro",39, RESULT);
            }
          return CUP$CompParser$result;

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

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

         if (ff.isPred) newBody = newBody.resolve_as_formula(warns); else newBody = newBody.resolve_as_set(warns);
         errors = errors.make(newBody.errors);
         if (!newBody.errors.isEmpty()) continue;
         try { ff.setBody(newBody); } catch(Err er) {errors = errors.make(er); continue;}
         if (warns!=null && ff.returnDecl.type().hasTuple() && newBody.type().hasTuple() && !newBody.type().intersects(ff.returnDecl.type()))
            warns.add(new ErrorWarning(newBody.span(),
                  "Function return value is disjoint from its return type.\n"
                  +"Function body has type "+newBody.type() + "\n" + "but the return type is "+ff.returnDecl.type()));
         //else if (warns!=null && Version.experimental && !newBody.type.isSubtypeOf(ff.returnDecl.type))
         //  warns.add(new ErrorWarning(newBody.span(),
         //      "Function may return a tuple not in its declared return type.\n"
View Full Code Here

Examples of edu.mit.csail.sdg.alloy4compiler.ast.Expr.span()

    @Override public Object visit(ExprCall x) throws Err {
        final Func f = x.fun;
        final Object candidate = f.count()==0 ? cacheForConstants.get(f) : null;
        if (candidate!=null) return candidate;
        final Expr body = f.getBody();
        if (body.type().arity()<0 || body.type().arity()!=f.returnDecl.type().arity()) throw new ErrorType(body.span(), "Function return value not fully resolved.");
        final int n = f.count();
        int maxRecursion = unrolls;
        for(Func ff:current_function) if (ff==f) {
            if (maxRecursion<0) {
                throw new ErrorSyntax(x.span(), ""+f+" cannot call itself recursively!");
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.