eaburns / toaq

Tools for the constructed, logical language Toaq.
8 stars 1 forks source link

"kùı shí ra kùı gú ra kùı sáq" doesn't parse #19

Closed acotis closed 5 years ago

acotis commented 5 years ago

"kùı shí ra kùı gú ra kùı sáq" should parse like "(kùı shí) ra (kùı gú) ra (kùı sáq)" but it doesn't parse at all.

eaburns commented 5 years ago

This bug seems to exist in the original toaq.org/parser too.

eaburns commented 5 years ago

I think that the bug is here: https://github.com/eaburns/toaq/blob/master/ast/toaq.peggy#L217. Afterthought connectors connect two prepositional_phrase_1s, but those cannot in turn contain an afterthought CoP, thus you can only have two.

I think the right argument of afterthought_cop<prepositional_phrase_1, prepositional_phrase_1> (linked above) should be prepositional_phrase, not prepositional_phrase_1.

Note, the same problem likely occurs with relative clauses. See https://github.com/eaburns/toaq/blob/master/ast/toaq.peggy#L162.

We should also have unit tests verifying that we can connect N>2 elements for all afterthought connectors.