Io sto costruendo un parser per JS (ma trova anche gli script embedded nei tag HTML), per cui l'analisi dei tag HTML la ho fatta.
Il mio progetto e` scritto in Perl, che gestisce le stringhe meglio del JS, anche JS puo` andare bene (sicuramente meglio del C in questo).
Esempio:codice:var str = "tutta una pagina HTML"; var tags = str.match(/\<.+?\>/g); for (var i=0; i<tags.length; i++) { alert("analizzo il tag "+tags[i]); attrs = tags[i].split(/ /); // potrebbe non essere corretto .... }