Hello World!

The SerializeLayer has a buffer of the text of the model and each SerializeFacet maps between positions in the buffer and their associated parse nodes. The ParseLayer represents the tree produced from parsing. As you can see from the graph on the right, each ParseFacet knows what kind of node (Word, Operator, Root, etc...) was parsed at the position recorded in the associated SerializeFacet.
The SerializeLayer and ParseLayer have a somewhat incestuous relationship (there is a circular dependency between them) and they could be collapsed into one. For now I am keeping them separate because I think it's a little simpler to deal with and it makes for more interesting pictures.
Speaking of interesting pictures, here is a more elaborate model:

The input text of the above model is:
foo (bar {baz} 'abc ~{123}' xyz )The difference between Figures and Sites isn't relevant for the SerializeLayer and ParseLayer so notice that the Sites have been omitted here to simplify the graphs.
0 comments:
Post a Comment