I have used the code mirror library in some of my projects. I love this library. So, I was quite interested by the new approach of the version 6.
As a way to learn the lezer grammar, I have created a grammar to parse the lezer grammar itself. The repository is available at https://bitbucket.org/sboreux/lezer-grammar
Feel free to use or fork it if you want.