Package java1.util.regex

Examples of java1.util.regex.Pattern$Pos


         globals           = world.globals;
         metaSig           = world.metaSig;
         metaField         = world.metaField;
      }
      this.path = path;
      if (filename!=null && filename.length()>0) this.modulePos=new Pos(filename,1,1);
   }
View Full Code Here


         ans.add(make("<b>"+x.size()+(x.size()>1?" facts</b>":" fact</b>"), x));
      }
      if (asserts.size()>0) {
         x = new ArrayList<Browsable>(asserts.size());
         for(Map.Entry<String,Expr> e: asserts.entrySet()) {
            Pos sp = e.getValue().span();
            x.add(make(sp, sp, "<b>assert</b> "+e.getKey(), e.getValue()));
         }
         ans.add(make("<b>"+x.size()+(x.size()>1?" asserts</b>":" assert</b>"), x));
      }
      return ans;
View Full Code Here

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

   /** Add a sig declaration. */
   Sig addSig(String name, ExprVar par, List<ExprVar> parents, List<Decl> fields, Expr fact, Attr... attributes) throws Err {
      Sig obj;
      Pos pos = Pos.UNKNOWN.merge(WHERE.find(attributes));
      status = 3;
      dup(pos, name, true);
      String full = (path.length()==0) ? "this/"+name : path+"/"+name;
      Pos subset=null, subsig=null;
      boolean exact = false;
      if (par!=null) {
         if (par.label.equals("extends")) { subsig=par.span().merge(parents.get(0).span()); }
         else { exact=!par.label.equals("in"); subset=par.span(); for(ExprVar p:parents) subset=p.span().merge(subset); }
      }
View Full Code Here

   /** The given Sig will now point to a nonnull Sig. */
   private static Sig resolveSig(CompModule res, Set<Object> topo, Sig oldS) throws Err {
      if (res.new2old.containsKey(oldS)) return oldS;
      Sig realSig;
      final Pos pos = oldS.pos;
      final CompModule u = res.sig2module.get(oldS);
      final String name = base(oldS);
      final String fullname = (u.path.length()==0) ? ("this/"+name) : (u.path+"/"+name);
      if (!topo.add(oldS)) throw new ErrorType(pos, "Sig "+oldS+" is involved in a cyclic inheritance.");
      if (oldS instanceof SubsetSig)  {
View Full Code Here

         m.new2old.put(ka, ka);
         m.sigs.put(base(ka), ka);
         hasMetaSig = true;
         Expr allfields = ExprConstant.EMPTYNESS;
         for(Field field: s.getFields()) {
            Pos priv = field.isPrivate; if (priv==null) priv = s.isPrivate;
            PrimSig kb = new PrimSig(s.label+"$"+field.label, root.metaField, Attr.ONE, PRIVATE.makenull(priv), Attr.META);
            field2meta.put(field, kb);
            m.new2old.put(kb, kb);
            m.sigs.put(base(kb), kb);
            hasMetaField = true;
View Full Code Here

      StructPatternHelper.patternMapping.put(struct,
          Pattern.compile(regex));
    }

    Pattern patt = StructPatternHelper.patternMapping.get(struct);
    Matcher matches = patt.matcher(message);
    matches.lookingAt();
    int lastPossition = getLast(matches);
    /*List<String> matchesl = new ArrayList<String>();
    if (matches.matches()) {
      for (int i = 0; i <= matches.groupCount(); i++) {
        matchesl.add(matches.group(i));
View Full Code Here

        StructPatternHelper.patternPureMapping.put(struct,
            Pattern.compile(struct.getRegularExpressionPure()));
      }
      Pattern datePatt = StructPatternHelper.patternPureMapping
          .get(struct);
      Matcher m = datePatt.matcher(field);
      while (m.find()) {
        // struct.setRegularExpression(struct.getRegularExpressionPure());
        String group = m.group();
        if (group == null || "".equals(group))
          continue;
        Element childElement = doUnmarshal(element, group, struct, doc,
            struct.getRegularExpressionPure(),
            new UnmarshalContext(
View Full Code Here

      StructPatternHelper.patternMapping.put(struct,
          Pattern.compile(regex));
    }

    Pattern patt = StructPatternHelper.patternMapping.get(struct);
    Matcher matches = patt.matcher(message);
    matches.lookingAt();
    int lastPossition = getLast(matches);
    /*List<String> matchesl = new ArrayList<String>();
    if (matches.matches()) {
      for (int i = 0; i <= matches.groupCount(); i++) {
        matchesl.add(matches.group(i));
View Full Code Here

        StructPatternHelper.patternPureMapping.put(struct,
            Pattern.compile(struct.getRegularExpressionPure()));
      }
      Pattern datePatt = StructPatternHelper.patternPureMapping
          .get(struct);
      Matcher m = datePatt.matcher(field);
      while (m.find()) {
        // struct.setRegularExpression(struct.getRegularExpressionPure());
        String group = m.group();
        if (group == null || "".equals(group))
          continue;
        Element childElement = doUnmarshal(element, group, struct, doc,
            struct.getRegularExpressionPure(),
            new UnmarshalContext(
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.