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

Several ADT improvements #687

Merged
merged 5 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ lazy val gobra = (project in file("."))
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.9", // for SystemUtils
libraryDependencies += "org.apache.commons" % "commons-text" % "1.9", // for escaping strings in parser preprocessor
libraryDependencies += "commons-codec" % "commons-codec" % "1.15", // for obtaining the hex encoding of a string
libraryDependencies += "org.antlr" % "antlr4-runtime" % "4.12.0",
libraryDependencies += "org.antlr" % "antlr4-runtime" % "4.13.0",
libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.3.7", // used for EitherT

scalacOptions ++= Seq(
Expand Down
4 changes: 3 additions & 1 deletion src/main/antlr4/GobraParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ domainClause: FUNC IDENTIFIER signature | AXIOM L_CURLY expression eos R_CURLY;

adtType: ADT L_CURLY (adtClause eos)* R_CURLY;

adtClause: IDENTIFIER L_CURLY (fieldDecl eos)* R_CURLY;
adtClause: IDENTIFIER L_CURLY (adtFieldDecl eos)* R_CURLY;

adtFieldDecl: identifierList? type_;

ghostSliceType: GHOST L_BRACKET R_BRACKET elementType;

Expand Down
634 changes: 319 additions & 315 deletions src/main/java/viper/gobra/frontend/GobraLexer.java

Large diffs are not rendered by default.

Loading
Loading