Closed rhmccullough closed 9 years ago
Should I do this in stages? Maybe do serializer changes separately -- that's probably where the conflicts are. Parser has lots of new files - mkr_parser.y, mkr_sentence.c, mkrtype.h, mkr.h + new tests.
This is too large to review. Skimming the commits - you duplicate code with turtle lexer. You've committed flex/bison-generated files (mkr_parser.c etc.)
I don't understand mkr parser for rasqal.
I'm also concerned you seem to be changing your language specification often. Is there a versioned specification with tests? If raptor provides a parser for a changing language, it must be clear which language, which version.
Just a couple of remarks about why I made some coding changes:
To solve the problem of putting "[" "]" around single terms which are not lists, I wrote two new procedures: raptor_mkr_emit_subject_properties() and raptor_mkr_emit_po(). While I was doing that, I used the Turtle grouping of subject properties, and I used the "rel" property for relations (including the rs:ResultSet). This allows fewer changes to your original raptor_turtle_emit_subject().
I also used the "ho" for hierarchy relations, and the hoVerbs for hierarchies, and the prepositions for definitions and action/commands. Prepositions in definitions and actions are simply a convenient notation for nested blankNodes. But, like SPARQL commands, when/if mKR commands are used, order is important and we really have sentenceList instead of sentenceSet. The difference between mKR views and RDF graphs is the difference between List and Set.
\2. Using the Turtle lexer is complicated by the fact that the Turtle parser and lexer are the very first programs to be compiled. So I have to put mKR tokens and lexer interface in the Turtle parser. I also noticed that you have changed the Turtle parser since I started coding the mKR parser.
I suggest the following approach.
closing this pull request and opening new pull request for revised mKR serializer.