Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty <sum> #5

Merged
merged 1 commit into from
May 9, 2021
Merged

Allow empty <sum> #5

merged 1 commit into from
May 9, 2021

Conversation

msakai
Copy link
Owner

@msakai msakai commented May 9, 2021

http://www.cril.univ-artois.fr/PB11/format.pdf defines <sum> as a non-empty sequence of <weightedterm>, but this PR relaxes the grammar to allow empty sequence as well.

This is because we defined Sum type as [WeightedTerm] instead of NonEmpty WeightedTerm and it is possible to accidentally produce files that contain empty <sum>. We will consider preventing the generation of such files separately.

Refs #4

http://www.cril.univ-artois.fr/PB11/format.pdf defines <sum> as a non-empty
sequence of <weightedterm>, but we relax the grammar to allow empty sequence
as well.

This is because we defined 'Sum' type as '[WeightedTerm]' instead of
'NonEmpty WeightedTerm' and it is possible to accidentally produce files
that contain empty <sum>. We will consider preventing the generation of
such files separately.
@msakai msakai force-pushed the feature/allow-empty-sum branch from 7b9d5bc to f3ea509 Compare May 9, 2021 03:09
@msakai msakai merged commit 025912c into master May 9, 2021
@msakai msakai deleted the feature/allow-empty-sum branch May 9, 2021 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant