I've publicly committed a rough implementation of a lexer for XQuery for the
Pygments syntax highlighter. It uses regular expressions and state to keep
track of parsing of the XQuery and XPath. It is not perfect yet and has a
bit more work to be done. I remember doing parse trees and compilers as a
computer science course and, yes, it is still loads of fun :)

I've put the code up on github.com (how appropriate since github uses
pygments) and it is available for perusal. I still plan on making it better.
It's a hard problem to solve well. Thanks Michael for the motivation to do
it right.

http://github.com/spig/pygments-xquery-lexer

--
Steve
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to