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

MixFix Parsing - An idea #3425

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

mattulbrich
Copy link
Member

This PR is meant as a wip - tryout - branch for mixfix parsing in KeY

Related Issue

We want to define syntax for symbols in .key files.
This here allows you to do so.

Intended Change

You can now do this:

\functions {
   int myExp(int, int) \syntax _/30 !! _/30;
   int mySeqGet(Seq, int) \syntax _/100 --> _ <--;
   int myadd(int, int) \syntax _/40 ++ _/40;
}

\problem {
  ~ 3 ++ 3 !! 4 ++ (seqEmpty --> 3 <--) ~ > 0
}

In this experiment branch you need to add ~ to enter mixfix parsing.

Type of pull request

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring (behaviour should not change or only minimally change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • There are changes to the (Java) code
  • There are changes to the taclet rule base
  • There are changes to the deployment/CI infrastructure (gradle, github, ...)
  • Other:

Ensuring quality

It is still WIP.

  • I made sure that introduced/changed code is well documented (javadoc and inline comments).
  • I made sure that new/changed end-user features are well documented (https://github.com/KeYProject/key-docs).
  • I added new test case(s) for new functionality.
  • I have tested the feature as follows: ...
  • I have checked that runtime performance has not deteriorated.

The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.

@wadoon
Copy link
Member

wadoon commented Feb 22, 2024

  • ANTLR side is working.
  • Current test subject is de.uka.ilkd.key.nparser.ExprTest
  • Missing rules for integer & co.

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