Using virtual machine for compliant markdown interpreter? Viable?

Back in the infocom days, text based games were often compiled into
byte codes that are run in a virtual machine. This allows for multiple
machines of different architecture to support an interactive fiction
as long as it ran the same interpreter.

I wonder if the same approach for promoting standardized markdown
could be done with this approach.

Say, write the 'gold standard' markdown in C, and compile it into a
distributable file that can be ran via an interpreter in multiple
different languages like python, javascript, ruby, php, go, etc...

The benefit to this approach is that updating the markdown engine is
just a case of switching the bytecodes.

Virtual machines is more suitable for 'gold standard' markdown,
compared to other applications because a markdown program is
essentially an stdin --> stdio (markdown text in --> html out).

Plus if you want to 'extend markdown' but have it available on all
platform, you could just replace the bytecode as well. Heck it may not
even have to be markdown, could be asciidoc or something else.

Is this a viable approach? And if so, is there an existing minimal
interpreter that can efficiently deal with textual processing with
minimal overhead?

-----
Brian Khuu

Received on Sunday, 6 July 2014 18:54:37 UTC