You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
therefore to unify DSL and mermaid grammar, there should be 5 attribute in DSL (take the union):
id
value
color
arrow
hidden
so as former discussed, the DSL grammar would be like:
data:
arrayarr= {
structure: [[unit1],[unit1,unit2],[unit1,unit2,unit3], *] # unit_id, requiredvalue: [[1], [1,2], [1,2,3], [1,2,3] ] # value, optionalcolor: [["blue"], [null,null],[], *] # color, optionalarrow: [[],[null,"cur"],[null,null,"cur"]] # arrow, optionalhidden: [[], [False, True], [False]] # hidden, optional
}
draw:
pagep:= [0,2] {
showarr[p]
}
# value/color/arrow/hidden data doesn't need to aligh to structure data# it is correct on grammar but maybe incorrect in rendering# e.g in structure [[1],[1,2],[1,2,3]] if i want to only color unit "3"# all of this color data can work: # [[],[],[null, null, blue]]# [[null,null,null,null,null], * ,[null, null, blue]]# [[null,null,null,null,null], [] ,[null, null, blue]]
TO-DO list
DSL example
all 6 types of components' (array/matrix/tree/graph/linkedlist/stack) attributes are:
therefore to unify DSL and mermaid grammar, there should be 5 attribute in DSL (take the union):
so as former discussed, the DSL grammar would be like:
a simplified example of DSL
Do you think this grammar reasonable?
The text was updated successfully, but these errors were encountered: