eignnx / affix-grammar

An affix-grammar format and sentence generator.
Mozilla Public License 2.0
0 stars 0 forks source link

allow multiple rule definitions #6

Open eignnx opened 4 years ago

eignnx commented 4 years ago

Like in Haskell, it would be cool to allow multiple definitions of a rule.

This...

rule start = "foo"
rule start = "bar"

...should be equivalent to this:

rule start = "foo" | "bar"

Further Idea

It would also be kinda cool to allow pattern matching on arguments???

rule they.Person.Number; -- guess you'd need type annotations...

rule they.1st.singular = "I"
rule they.1st.plural = "we"