function updateReduction() {
    var tableBody = document.getElementById("redTransitions"),
        newRow, newCell,x,key;
    var transitions=getTransitions();
    var redList=reduction();
    console.log(redList);
    // Reset redTransitions table
    tableBody.innerHTML = "";

    // Build redTransitions new table
    var i=0;
    while (i<transitions.length) {
        var first,finish,word;
        first=transitions[i].start;
        finish=transitions[i].finish;
        word=transitions[i].word;
        if (redList.includes(first) && redList.includes(finish)){
            newRow = document.createElement("tr");
            tableBody.appendChild(newRow);
            newCell = document.createElement("td");
            newCell.textContent = first;
            newRow.appendChild(newCell);
            newCell = document.createElement("td");
            newCell.textContent = word;
            newRow.appendChild(newCell);
            newCell = document.createElement("td");
            newCell.textContent = finish;
            newRow.appendChild(newCell);
        }
        i++;
    }
    tableBody = document.getElementById("redStates");
    var etatsFin=getEtatsFin();
    // Reset redStates table
    tableBody.innerHTML = "";

    // Build redStates new table
    var i=0;
    while (i<etatsFin.length) {
        fin=etatsFin[i];
        if (redList.includes(fin)){
            newRow = document.createElement("tr");
            tableBody.appendChild(newRow);
            newCell = document.createElement("td");
            newCell.textContent = fin;
            newRow.appendChild(newCell);
        }
        i++;
    }
    return false;
}
/*remplir la table de transition apres reduction*/
remplir la table de transition apres reduction
remplir la table de transition apres reduction
function updateReduction() {
    var tableBody = document.getElementById("redTransitions"),
        newRow, newCell,x,key;
    var transitions=getTransitions();
    var redList=reduction();
    console.log(redList);
    tableBody.innerHTML = "";
    var i=0;
    while (i<transitions.length) {
        var first,finish,word;
        first=transitions[i].start;
        finish=transitions[i].finish;
        word=transitions[i].word;
        if (redList.includes(first) && redList.includes(finish)){
            newRow = document.createElement("tr");
            tableBody.appendChild(newRow);
            newCell = document.createElement("td");
            newCell.textContent = first;
            newRow.appendChild(newCell);
            newCell = document.createElement("td");
            newCell.textContent = word;
            newRow.appendChild(newCell);
            newCell = document.createElement("td");
            newCell.textContent = finish;
            newRow.appendChild(newCell);
        }
        i++;
    }
    tableBody = document.getElementById("redStates");
    var etatsFin=getEtatsFin();
    tableBody.innerHTML = "";
    var i=0;
    while (i<etatsFin.length) {
        fin=etatsFin[i];
        if (redList.includes(fin)){
            newRow = document.createElement("tr");
            tableBody.appendChild(newRow);
            newCell = document.createElement("td");
            newCell.textContent = fin;
            newRow.appendChild(newCell);
        }
        i++;
    }
    return false;
}
function updateReduction ( ) { var tableBody = document . getElementById ( "redTransitions" ) , newRow , newCell , x , key ; var transitions = getTransitions ( ) ; var redList = reduction ( ) ; console . log ( redList ) ; tableBody . innerHTML = "" ; var i = 0 ; while ( i < transitions . length ) { var first , finish , word ; first = transitions [ i ] . start ; finish = transitions [ i ] . finish ; word = transitions [ i ] . word ; if ( redList . includes ( first ) && redList . includes ( finish ) ) { newRow = document . createElement ( "tr" ) ; tableBody . appendChild ( newRow ) ; newCell = document . createElement ( "td" ) ; newCell . textContent = first ; newRow . appendChild ( newCell ) ; newCell = document . createElement ( "td" ) ; newCell . textContent = word ; newRow . appendChild ( newCell ) ; newCell = document . createElement ( "td" ) ; newCell . textContent = finish ; newRow . appendChild ( newCell ) ; } i ++ ; } tableBody = document . getElementById ( "redStates" ) ; var etatsFin = getEtatsFin ( ) ; tableBody . innerHTML = "" ; var i = 0 ; while ( i < etatsFin . length ) { fin = etatsFin [ i ] ; if ( redList . includes ( fin ) ) { newRow = document . createElement ( "tr" ) ; tableBody . appendChild ( newRow ) ; newCell = document . createElement ( "td" ) ; newCell . textContent = fin ; newRow . appendChild ( newCell ) ; } i ++ ; } return false ; }
remplir la table de transition apres reduction
remplir la table de transition apres reduction
// Reset redTransitions table // Build redTransitions new table // Reset redStates table // Build redStates new table