[LLVMdev] LLVM TblGen syntax hightlighter
陳韋任 (Wei-Ren Chen)
chenwj at iis.sinica.edu.tw
Mon Jan 21 17:20:28 PST 2013
Hi all,
LLVM now is using Sphinx to generate it's documentation. For syntax
hightlighting, Sphinx uses Pygments [2]. Pygments already support LLVM
IR syntax, however it doesn't support LLVM tblgen. I wrote up a Pygments
extension that can be incorpreated in Sphinx [3]. After installing the
extension, you can write the code below and get hightlight tblgen
syntax.
.. code-block:: tblgen
def FeatureFPU : SubtargetFeature<"fpu", "fpu", "true",
"Enable FPU">;
Any feedback is welcomed. If possible, I would like to make this
extension upstream to Pygments. :)
Regards,
chenwj
[1] http://sphinx-doc.org/
[2] http://pygments.org/
[3] https://github.com/azru0512/tblgenlexer
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj
More information about the llvm-dev
mailing list