Episteme - dmlc - Presentation Symbols

Extracting Presentational Symbols

Usually a compiler deals with just one language but DML encompasses two types of languages keyed to each other by variable id. The compiler walks the syntax tree of the diagram template and produces another symbol table containing presentational variables, their type, and corresponding initialized presentational object. Here is the presentational markup corresponding to the logical primitives in the previous example and the resultant presentational symbol table.

	<!-- presentation for 'o', a tlg1799.tlg001:point and tlg0552.tlg008:center_of_earth -->
	  <epix:point id='o' diapre:param_id='0'>
	    <epix:x>0</epix:x>  <!-- world coordinates -->
	  <!-- Notice the elliptical_arc depends upon 'a', 'd' and 'ul_abcd' to be defined -->
	  <epix:elliptical_arc id='abcd'>
	    <epix:circle ref='ul_abcd'/>
	    <epix:point ref='d'/>
	    <epix:point ref='a'/>
oepix:point0.0 0.0 0.0
aepix:point-2.49 -2.49 0.0
depix:point2.49 2.49 0.0
abcdepix:elliptical_arcEllipticalArc: ...

Extracting View and Style Information

During this time, the dmlc also parses the diapre:view information and stores this for the next step in the pipeline. In addition, the diapre:styles are also parsed and put into a table. This table is useful because it records any diagramming conventions in a nice tabular format. Here is some styling markup along with the corresponding code for the primitives in the symbol table above.

	<diapre:style ref='o'>
	  <!-- Label styling -->
	<!-- similar styling for 'a' and 'd' -->