Re:CSS Vocabulary
by voltagex_ on Wednesday April 16, 2014 @09:37PM
(#7601580)
This is a neat and simple idea. I wonder how difficult it would be to add other languages.
[ Parent
| on HN ]
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.