Examples of Noeud


Examples of freegressi.tableur.Noeud

   * @return le noeud correspondant (avec son erreur éventuelle)
   */
  public static Noeud parseNomDeVariable(String nom) {
    String erreurId = "<html>Un nom de variables est composé d'une lettre (ou _) suivie de caractères ou lettres!</html>";
    ArrayList<Noeud> liste = new ArrayList<>();
    Noeud erreur = new Noeud(Sym.ERROR, "");

    try {
      Lexer lex = new Lexer(new java.io.StringReader(nom), liste);
      lex.yylex();
    } catch (Exception e) {
      System.err.println("Erreur interne du lexer! : " + e.getMessage());
      erreur.setTexteErreur("Erreur interne du lexer! Ne devrait pas survenir! : " + e.getMessage());
      return erreur;
    }

    // il doit y avoir au moins un noeud
    if (liste.isEmpty()) {
      return null;
    }

    // il ne doit pas y avoir plus qu'un noeud
    if (liste.size() > 1) {
      liste.get(1).setType(Sym.ERROR);
      liste.get(1).setTexteErreur(erreurId);
      return liste.get(1);
    }

    // Maintenant il y a le bon compte de noeuds
    // vérifions que c'est bien un id
    if (liste.get(0).getType() != Sym.ID) {
      erreur.setTexteErreur(erreurId);
      return erreur;
    }

    return liste.get(0);
  }
View Full Code Here

Examples of freegressi.tableur.Noeud

  /**
   * Appelée à chaque frappe dans le textfieldExpression
   * @param evt
   */
  private void jtfsKeyReleased(java.awt.event.KeyEvent evt) {
    Noeud noeud;
    noeud = Verificateur.parseExpressionTendance(jtfsExpression.getText(), jcX.getSelectedItem().toString());
    if (noeud == null) {
      jlErreur.setText("Vous devez entrer une expression!");
      jtfsExpression.effaceTout();
    } else {
      if (noeud.getType() == Sym.ERROR || noeud.getType() == Sym.PARSER_ERROR || noeud.getType() == Sym.PARSER_COHERENCE_ERROR) {

        jlErreur.setText(noeud.getTexteErreur());
        jtfsExpression.souligne(noeud.getColonne(), noeud.getColonne() + 1);
      } else {
        jlErreur.setText(" ");
        jtfsExpression.effaceTout();
        //remplitTendanceEnCours();
        if (nePasRepondre) {
View Full Code Here

Examples of freegressi.tableur.Noeud

  StringBuffer string = new StringBuffer();
  List liste;


  private void ajouteNoeud(int type, String str){
    liste.add(new Noeud(type, yyline, yycolumn - str.length(), str));
  }
View Full Code Here

Examples of freegressi.tableur.Noeud

  private void ajouteNoeud(int type, String str){
    liste.add(new Noeud(type, yyline, yycolumn - str.length(), str));
  }
  private void ajouteNoeud(int type, int categorie, int priorite) {
    liste.add(new Noeud(type, categorie, priorite, yyline, yycolumn, yytext()));
  }
View Full Code Here

Examples of freegressi.tableur.Noeud

  }
  private void ajouteNoeud(int type, int categorie, int priorite) {
    liste.add(new Noeud(type, categorie, priorite, yyline, yycolumn, yytext()));
  }
  private void ajouteNoeud(int type, int categorie, int priorite, Double valeur) {
    liste.add(new Noeud(type, categorie, priorite, valeur, yyline, yycolumn, yytext()));
  }
View Full Code Here

Examples of freegressi.tableur.Noeud

  }
  private void ajouteNoeud(int type, int categorie, int priorite, Double valeur) {
    liste.add(new Noeud(type, categorie, priorite, valeur, yyline, yycolumn, yytext()));
  }
  private void ajouteNoeud(int type, int categorie, int priorite, String nom) {
    liste.add(new Noeud(type, categorie, priorite, nom, yyline, yycolumn, yytext()));
  }
View Full Code Here

Examples of freegressi.tableur.Noeud

  * @param priorite
  * @param param
  * @return rien
  ************************************************************************* */
  private void ajouteNoeud(int type, int categorie, int priorite, int param) {
    liste.add(new Noeud(type, categorie, priorite, param, yyline, yycolumn, yytext()));
  }
View Full Code Here

Examples of freegressi.tableur.Noeud

      return null;
    }
    int n = 0;
    String resultat = "";
    String nombre = "";
    Noeud noeudPrecedent = null;
    boolean flagParenthese = false;
    for (Noeud noeud : liste) {
      if (noeud.getType() == Sym.ID) {
        if (!noeud.getNom().equals(nomSerieX)) {
          if (params[n] < 0) { // si paramètre négatif
            if (noeudPrecedent != null
                    && noeudPrecedent.getType() == Sym.PLUS) { // si un + précède
              int pos = resultat.length() - 1;
              String str = resultat.substring(0, pos);
              resultat = str;
            } else { // entourer le paramètre de parenthèses
              resultat += "(";
View Full Code Here

Examples of sn.unitech.stock.modal.Noeud

      
       
  public List<Noeud> getNodesGroupProd(){
      List<Noeud> listResult=new ArrayList<Noeud>();
      for(SysGroupProd sysGroupProd:chartM.findGroupProd(readProperties.read("FamilleProduit.jpqlAllGroupProd"),defaultParametter())){
       Noeud parent=new Noeud();
       parent.setId(sysGroupProd.getIdGroupProd()+"");
       parent.setLibelle(sysGroupProd.getLibelle());
       listResult.add(parent);
       for(SysProduit sysProduit:sysGroupProd.getSysProduits()){
         Noeud fils=new Noeud();
       fils.setId(sysProduit.getIdProduit()+"");
       fils.setLibelle(sysProduit.getDesignation());
       parent.getListChildren().add(fils);
       }
       }
       return listResult; 
  }
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.