ComparisonWithPygments » History » Version 1
Version 1/6
-
Next ยป -
Current version
Kornelius Kalnbach, 12/05/2010 02:55 AM
Comparison with Pygments¶
General sifferences¶
- CodeRay is a Ruby library, Pygments is written in Python.
- CodeRay supports 19 languages, while Pygments supports over 90.
- CodeRay has handwritten scanners. In Pygments, scanners are defined with a scanner DSL.
Handwritten vs. DSL, Pro & Contra¶
The last two differences in the list above are very much related.
Pro: handwritten scanners (CodeRay)¶
- faster
- lots of fine tuning is possible
- no overhead for DSL transformation and interpretation
- more flexible
Pro: scanner definition (Pygments)¶
- easier to write, read, and maintain
- less code
- DSL interpreter can be optimized/changed independently
- porting scanners is easier
- use of higher-level features (like token groups) is simple