Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think it could be possible for any context-free language, through outputting the parse tree with ranges wrapped with class="symbol-type". CSS's grammar being like this (for those not familiar with the idea): http://www.w3.org/TR/CSS21/grammar.html, and JS's being like this: http://www-archive.mozilla.org/js/language/grammar14.html. You might want to have a black/white list of foundational grammar rules to ignore.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: