I think I will try to write more about my experiments. Hopefully my english won't hurt anyone ! :)

This time, I wanted to fool around by working on a parser using PEG.js. I knew it well, having used it on some other projects, but creating the grammar was still a pain : the only editor around here is the online one, and is not very user-friendly. Specifically, it does not have syntaxic coloration, does not save grammars, and can hang if you happen to write a bad grammar (which can happen unexpectedly while you are still typing).

To solve this issue, I've worked on an improved IDE which is now done. It uses Angular and CodeMirror for the frontend, and Express and SQLite for the backend. It's main features are :

  • Syntaxic highlighting on both PEG.js grammar files[1] and JSON output
  • Snippets can be easily saved (either ctrl+s or the big Save button) and shared (the page URL will automatically be updated after sucessful save)
  • The generated parsers will hopefully never hang. Try for example this grammar, your browser will detect the infinite loop and timeout the process (Web Workers).

I'm open to any suggestion and bug report, please feel free to post them on the project repository.

Some examples :

[1] Let's thanks Forbes Lindesay for doing the CodeMirror mode a few days before I start this project ! I have made a PEG.js Ace mode a bit before, but I wasn't really fond of Ace due to its undocumented way to add new modes without recompiling the whole thing, so I was really looking forward to using CodeMirror.