Here is a short peg.js parser of morphology of Lojban words.
Features:
1. only checks for morphology of words, the rest is thrown away. Hence, you don't need much prettification, a simple
'[["cmavo","coi"],["cmavo","do"],["cmavo","mi"],["gismu","tavla"],["cmavo","do"]]'
is returned.
2. when you need a parser of minimal size.
morfologi.js file, the compiled parser ready to use by _javascript_-compatible apps is under 30 kilobytes of uncompressed (but minified) _javascript_.
4. can help restore omitted spaces within compound cmavo and similar (so that you can apply your writing conventions)
5. somewhat faster than the full grammar parser when you run numerous queries. E.g. this parser is now used in
la sutysisku app to automatically determine to which word class a given dictionary entry belongs.
6. doesn't support zoi ... zoi quotations (a separate preprocessor needed).