insituparsing.dot 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. digraph {
  2. compound=true
  3. fontname="Inconsolata, Consolas"
  4. fontsize=10
  5. margin="0,0"
  6. ranksep=0.2
  7. penwidth=0.5
  8. node [fontname="Inconsolata, Consolas", fontsize=10, penwidth=0.5]
  9. edge [fontname="Inconsolata, Consolas", fontsize=10, arrowhead=normal]
  10. {
  11. node [shape=record, fontsize="8", margin="0.04", height=0.2, color=gray]
  12. oldjson [label="\{|\"|m|s|g|\"|:|\"|H|e|l|l|o|\\|n|W|o|r|l|d|!|\"|,|\"|\\|u|0|0|7|3|t|a|r|s|\"|:|1|0|\}", xlabel="Before Parsing"]
  13. //newjson [label="\{|\"|<a>m|s|g|\\0|:|\"|<b>H|e|l|l|o|\\n|W|o|r|l|d|!|\\0|\"|,|\"|<c>s|t|a|r|s|\\0|t|a|r|s|:|1|0|\}", xlabel="After Parsing"]
  14. newjson [shape=plaintext, label=<
  15. <table BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="2"><tr>
  16. <td>{</td>
  17. <td>"</td><td port="a">m</td><td>s</td><td>g</td><td bgcolor="yellow">\\0</td>
  18. <td>:</td>
  19. <td>"</td><td port="b">H</td><td>e</td><td>l</td><td>l</td><td>o</td><td bgcolor="yellow">\\n</td><td bgcolor="yellow">W</td><td bgcolor="yellow">o</td><td bgcolor="yellow">r</td><td bgcolor="yellow">l</td><td bgcolor="yellow">d</td><td bgcolor="yellow">!</td><td bgcolor="yellow">\\0</td><td>"</td>
  20. <td>,</td>
  21. <td>"</td><td port="c" bgcolor="yellow">s</td><td bgcolor="yellow">t</td><td bgcolor="yellow">a</td><td bgcolor="yellow">r</td><td bgcolor="yellow">s</td><td bgcolor="yellow">\\0</td><td>t</td><td>a</td><td>r</td><td>s</td>
  22. <td>:</td>
  23. <td>1</td><td>0</td>
  24. <td>}</td>
  25. </tr></table>
  26. >, xlabel="After Parsing"]
  27. }
  28. subgraph cluster1 {
  29. margin="10,10"
  30. labeljust="left"
  31. label = "Document by In situ Parsing"
  32. style=filled
  33. fillcolor=gray95
  34. node [shape=Mrecord, style=filled, colorscheme=spectral7]
  35. root [label="{object|}", fillcolor=3]
  36. {
  37. msg [label="{string|<a>}", fillcolor=5]
  38. helloworld [label="{string|<a>}", fillcolor=5]
  39. stars [label="{string|<a>}", fillcolor=5]
  40. ten [label="{number|10}", fillcolor=6]
  41. }
  42. }
  43. oldjson -> root [label=" ParseInsitu()" lhead="cluster1"]
  44. edge [arrowhead=vee]
  45. root -> { msg; stars }
  46. edge [arrowhead="none"]
  47. msg -> helloworld
  48. stars -> ten
  49. {
  50. edge [arrowhead=vee, arrowtail=dot, arrowsize=0.5, dir=both, tailclip=false]
  51. msg:a:c -> newjson:a
  52. helloworld:a:c -> newjson:b
  53. stars:a:c -> newjson:c
  54. }
  55. //oldjson -> newjson [style=invis]
  56. }