[Ometa] OMeta in Qute, an experimental text editor

Felix Breuer felix at fbreuer.de
Tue Mar 13 13:55:15 PDT 2012


Hello everyone!

Qute <http://www.inkcode.net/qute> is an experimental text editor that I
have been working on from time to time. The idea behind Qute is that you
edit your document in a text based markup language, but what you see most
of the time is a fully typeset rendering of it. (Pictures explain it
better.<http://blog.felixbreuer.net/2011/06/30/qute.html>)
Up to now, Markdown has been the only markup language available in Qute. My
goal, however, is to allow users to define and use their own markup
languages, right inside the document they are working on. And to that end I
want to use OMeta.


I released Qute 0.4.1 on Sunday, including rudimentary OMeta integration.
Qute 0.4.1 allows you to

* define OMeta grammars within Markdown documents, and
* write individual paragraphs in your custom language and then use the
OMeta grammar to transform it into a fully typeset rendering.

You can use several different grammars in parallel and some very basic form
of parse error reporting is included. Again, pictures explain it
better.<http://blog.felixbreuer.net/2012/03/11/qute.html>


For this feature to be truly useful, I plan to include some useful OMeta
grammars (and transformers) that users can extend in OMeta. The idea is
that users can extend, e.g., Markdown syntax with custom commands and
environments (just as users can do in LaTeX). However, I am not set on
Markdown as a base language. So:

* Do you know of any Markdown parser written in OMeta? Do you have
experience with implementing parsers for lightweight markup languages of
this type? I have found this
PEG<https://github.com/jgm/peg-markdown/blob/master/markdown_parser.leg>for
Markdown, but as it is pretty big, I am not sure this is the right
point to start.
* What markup languages (of any kind) would you like to use in an editor
such as Qute?


The next thing I wanted to ask is: What features would the OMeta community
like to see in an editor such as Qute? Obviously, Qute is not intended to
evolve into a full-fleged IDE for parsers and transformers, but still there
are ways in which Qute might make working with OMeta more pleasant. Two
such features I could think of are a) more convenient error reporting and
b) pretty-printing of OMeta code. Both would essentially boil down to
writing an OMeta transformer that maps an OMeta AST to a useful and
visually appealing HTML snippet. Are there any pretty-printers that take
OMeta code and produce HTML out there? Also Qute might serve as a literate
programming environment for OMeta.


Finally, I want to ask for general feedback. Qute is still very rough
around the edges - especially the OMeta integration is more of a
proof-of-concept than a finished product. (In fact, I plan to rewrite Qute
from the ground up sometime in the future in order to include basic stuff
such as undo/redo.) Nonetheless, I am curious to hear about any suggestions
that you may have!


Best,
Felix



-- 
http://www.felixbreuer.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vpri.org/pipermail/ometa/attachments/20120313/7574fd8e/attachment.html>


More information about the OMeta mailing list