const answer = document.getElementById('answer'); function cls() { answer.value = ''; } function append(c) { answer.value += c; } function lex() { var lexed = []; var builder = ""; var flush = ()=>{ if(builder.length > 0) { lexed.push(builder); builder = ""; } } var val = answer.value; for(i=0;i