eignnx / rellog

0 stars 0 forks source link

DCG Syntax #41

Open eignnx opened 5 months ago

eignnx commented 5 months ago

I really want DCGs to be easy to write and easy to read. This example fails the 2nd condition:

[story]
    - "Once upon a time there was a"
    - [Subject]
    - "who was very hungry."

Wouldn't it be better to write:

[story] {
    "Once upon a time there was a" [Subject] "who was very hungry."
}

I guess this is solved by text template literals:

[story]
    "Once upon a time there was a [[Subject]] who was very hungry."