Package java1.util.regex

Examples of java1.util.regex.Pattern$Pos


    //=============================================================================================================//

    /** {@inheritDoc} */
    @Override public Pos span() {
        Pos p = span;
        if (p==null) span = (p = var.span().merge(expr.span()).merge(sub.span()));
        return p;
    }
View Full Code Here


            Set<String> thispath = new LinkedHashSet<String>();
            if (loaded==null) loaded = new LinkedHashMap<String,String>();
            Map<String,String> fc = new LinkedHashMap<String,String>(loaded);
            loaded.clear();
            List<Object> seenDollar = new ArrayList<Object>();
            CompModule root = parseRecursively(seenDollar, loaded, fc, new Pos(filename,1,1), filename, null, "", thispath, 1);
            root.seenDollar = seenDollar.size()>0;
            return CompModule.resolveAll(rep==null ? A4Reporter.NOP : rep, root);
        } catch(FileNotFoundException ex) {
            throw new ErrorSyntax("File cannot be found.\n"+ex.getMessage(), ex);
        } catch(IOException ex) {
View Full Code Here

            Set<String> thispath = new LinkedHashSet<String>();
            if (loaded==null) loaded = new LinkedHashMap<String,String>();
            Map<String,String> fc = new LinkedHashMap<String,String>(loaded);
            loaded.clear();
            List<Object> seenDollar = new ArrayList<Object>();
            CompModule root = parseRecursively(seenDollar, loaded, fc, new Pos(filename,1,1), filename, null, "", thispath, initialResolutionMode);
            root.seenDollar = seenDollar.size()>0;
            return CompModule.resolveAll(rep==null ? A4Reporter.NOP : rep, root);
        } catch(FileNotFoundException ex) {
            throw new ErrorSyntax("File cannot be found.\n"+ex.getMessage(), ex);
        } catch(IOException ex) {
View Full Code Here

     *
     * @param warnings - the list that will receive any warning we generate; can be null if we wish to ignore warnings
     */
    Expr instantiate(Context cx, List<ErrorWarning> warnings) throws Err {
        if (cx.unrolls<=0) {
            Pos p = span();
            return new ExprBad(p, toString(), new ErrorType(p, "Macro substitution too deep; possibly indicating an infinite recursion."));
        }
        if (params.size() != args.size()) return this;
        Context cx2 = new Context(realModule, warnings, cx.unrolls-1);
        for(int n=params.size(), i=0; i<n; i++) {
View Full Code Here

      super(AttrType.WHERE.find(attributes), type);
      this.attributes = Util.asList(attributes);
      Expr oneof = ExprUnary.Op.ONEOF.make(null, this);
      ExprVar v = ExprVar.make(null, "this", oneof.type);
      this.decl = new Decl(null, null, null, Util.asList(v), oneof);
      Pos isAbstract=null, isLone=null, isOne=null, isSome=null, isSubsig=null, isSubset=null, isPrivate=null, isMeta=null, isEnum=null;
      for(Attr a: attributes) if (a!=null) switch(a.type) {
         case ABSTRACT: isAbstract = a.pos.merge(isAbstract); break;
         case ENUM:     isEnum     = a.pos.merge(isEnum);     break;
         case LONE:     isLone     = a.pos.merge(isLone);     break;
         case META:     isMeta     = a.pos.merge(isMeta);     break;
View Full Code Here

    /** Caches the span() result. */
    private Pos span=null;

    /** {@inheritDoc} */
    @Override public Pos span() {
        Pos p=span;
        if (p==null) span = (p = pos.merge(closingBracket).merge(right.span()).merge(left.span()));
        return p;
    }
View Full Code Here

    ch.put(CompSym.UNIV, "univ");
    ch.put(CompSym.ID, "NAME");
    ch.put(CompSym.NUMBER, "NUMBER");
    ch.put(CompSym.STR, "STRING");
    TreeSet<String> list = new TreeSet<String>();
    Pos p=Pos.UNKNOWN;
    if (x!=null && x.value instanceof Pos) p=(Pos)(x.value);
       else if (x!=null && x.value instanceof Expr) p=((Expr)(x.value)).pos;
       else if (x!=null) p=x.pos;
    if (!stack.empty()) for(Map.Entry<Integer,String> e:ch.entrySet()) {
        int key=e.getKey(), act=get_action(((Symbol)stack.peek()).parse_state, key);
View Full Code Here

            if (sol.satisfiable()) rep.resultSAT(usercommand, System.currentTimeMillis()-start, sol); else rep.resultUNSAT(usercommand, System.currentTimeMillis()-start, sol);
            return sol;
        } catch(CapacityExceededException ex) {
            throw rethrow(ex);
        } catch(HigherOrderDeclException ex) {
            Pos p = tr!=null ? tr.frame.kv2typepos(ex.decl().variable()).b : Pos.UNKNOWN;
            throw new ErrorType(p, "Analysis cannot be performed since it requires higher-order quantification that could not be skolemized.");
        }
    }
View Full Code Here

        } catch(UnsatisfiedLinkError ex) {
            throw new ErrorFatal("The required JNI library cannot be found: "+ex.toString().trim());
        } catch(CapacityExceededException ex) {
            throw rethrow(ex);
        } catch(HigherOrderDeclException ex) {
            Pos p = tr!=null ? tr.frame.kv2typepos(ex.decl().variable()).b : Pos.UNKNOWN;
            throw new ErrorType(p, "Analysis cannot be performed since it requires higher-order quantification that could not be skolemized.");
        } catch(Throwable ex) {
            if (ex instanceof Err) throw (Err)ex; else throw new ErrorFatal("Unknown exception occurred: "+ex, ex);
        }
    }
View Full Code Here

        } catch(UnsatisfiedLinkError ex) {
            throw new ErrorFatal("The required JNI library cannot be found: "+ex.toString().trim());
        } catch(CapacityExceededException ex) {
            throw rethrow(ex);
        } catch(HigherOrderDeclException ex) {
            Pos p = tr!=null ? tr.frame.kv2typepos(ex.decl().variable()).b : Pos.UNKNOWN;
            throw new ErrorType(p, "Analysis cannot be performed since it requires higher-order quantification that could not be skolemized.");
        } catch(Throwable ex) {
            if (ex instanceof Err) throw (Err)ex; else throw new ErrorFatal("Unknown exception occurred: "+ex, ex);
        }
    }
View Full Code Here

TOP

Related Classes of java1.util.regex.Pattern$Pos

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.