I've kept working on my parser assembler, but it's moving slow thanks to actually having a day job to do... However tonight I mostly finished a parser for Turtle - a subset of N3 that allows convenient specification of RDF triples.
It ended up at about 1KB of bytecode, which is quite reasonable. I still need to add some error handling, and then I can start writing some code to actually do some useful stuff with it.
The current code uses an instruction to trigger callbacks from the VM on specific events, and it's proven to work very well. I'm still considering whether or not to add higher level constructs, or possibly replacing a couple of the current instructions, but I want to get more experience with it first.
The current Turtle parser just trigger on each subject, verb and object, and on prefix directives.
I'm about to add """triple quoting""" like python to Turtle, you might like to try adding that. It's the same as the normal strings except only a triple-quote ends the string; handy for multi-line strings such as descriptions. I will add some tests for it when I add it.
Posted by: Dave Beckett at April 9, 2005 05:16 PM
Thanks for the feedback. I'll certainly take a stab at that. I really like Turtle - it's nice and small and clean, and I always really appreciate specs that contains proper grammars and references to test cases :) The tests have saved me tons of debugging time already...
Posted by: Vidar Hokstad at April 9, 2005 09:12 PM