g2glab / pg

PG Tools
MIT License
6 stars 1 forks source link

Omitting node lines #30

Closed ryotayamanaka closed 8 months ago

ryotayamanaka commented 3 years ago

Is it ok to have one line as below?

a -> b :label prop:val

instead of:

a
b
a -> b :label prop:val
ryotayamanaka commented 3 years ago

Similar to the "blank node" in the RDF world?

a -> b :has

b -> b1
b -> b2
b -> b3
ryotayamanaka commented 9 months ago

Is this (explicitly) allowed/disallowed in the current PG syntax spec? @hchiba1

hchiba1 commented 9 months ago

It is not treated at the PEG level. We could explicitly allow/disallow at the application level. It is a good idea to complement implicit nodes after parsing.

hchiba1 commented 8 months ago

followed by the discussion: https://github.com/orgs/pg-format/discussions/16