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

Directly typed parsing #14

Merged
merged 9 commits into from
Nov 13, 2024

Conversation

maxkurze1
Copy link

Again, more reworks on parsing

The previous level (89) of match branches was below the level of the
sequence (;), thus one almost always had to wrap the value of match
branches in braces. I see no need for this restriction, as match
branches are clearly seperated by '|' characters.
This notation works like an if but with a lower precedence. It will
check the given condition and wrap the whole remaining block into the
'true'-branch, thus making sure the condition holds for the current
block. A block can be understood intuitively as everything that may
possibly belong to the assert. A block only ends if something is closed
that was started before the assert e.g. a paranthesis or a match arm
end.

This precedence gives the assert the ability to de-nest code as the
'true'-block after the condition does not have to be indented, making
code more redable.
The bit vector syntax defined in Vect.v for constr and the syntax
defined in Parsing.v for koika are very similar. However, for some
reason the koika syntax does not support 'Ob' for an empty bitvector. I
see no reason why it shouldn't exists, so I added it.
This commit brings the notations into a more logical order
@maxkurze1 maxkurze1 force-pushed the directly_typed_parsing branch from d28c678 to f4af9a3 Compare November 13, 2024 00:37
@maxkurze1 maxkurze1 force-pushed the directly_typed_parsing branch from c974525 to 18ce599 Compare November 13, 2024 08:25
@sertel sertel merged commit 19b174c into Barkhausen-Institut:master Nov 13, 2024
1 check passed
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.

2 participants