← Top stories Declare is a UI language for you and your AI ↗ (opens external site) 127 points by ilamont 5 days ago | davidtemkin.github.io | 98 comments on HN ↗ View full thread · View on Hacker News Comment thread (1) joddystreet | 5 days ago | parent | reply This was take 2```document = { template } ;template = "@template", identifier, newline, { node }, "@end", line-end ;node = group | row ;group = "<", identifier, ">", newline, { node }, "</", identifier, ">", line-end ;row = atom, { "|", atom }, line-end ;atom = reference | component | spacer ;reference = "[[", identifier, "]]" ;component = "[", label, [ "|", identifier, { "|", property } ], "]" ;property = identifier, "=", value ;value = json-scalar | binding ;label = label-part, { label-part } ;label-part = literal-text | escape | binding ;binding = "{", identifier, { ".", identifier }, "}" ;spacer = "..." ;line-end = newline | end-of-file ;```Still evolving.Core idea is to be able to define interfaces in a minimal language, without going into too much details about attributes, say height, width, etc
```
document = { template } ;
template = "@template", identifier, newline, { node }, "@end", line-end ;
node = group | row ;
group = "<", identifier, ">", newline, { node }, "</", identifier, ">", line-end ;
row = atom, { "|", atom }, line-end ;
atom = reference | component | spacer ;
reference = "[[", identifier, "]]" ;
component = "[", label, [ "|", identifier, { "|", property } ], "]" ;
property = identifier, "=", value ;
value = json-scalar | binding ;
label = label-part, { label-part } ;
label-part = literal-text | escape | binding ;
binding = "{", identifier, { ".", identifier }, "}" ;
spacer = "..." ;
line-end = newline | end-of-file ;
```
Still evolving.
Core idea is to be able to define interfaces in a minimal language, without going into too much details about attributes, say height, width, etc