Skip to content

Fix reserved parser keyword error reporting#869

Merged
ArquintL merged 2 commits intomasterfrom
reserved-proof-keyword
Feb 28, 2025
Merged

Fix reserved parser keyword error reporting#869
ArquintL merged 2 commits intomasterfrom
reserved-proof-keyword

Conversation

@ArquintL
Copy link
Member

This PR addresses a bug discovered by @felixlinker where our parser just reports "no viable alternative at input '(proof'
func test(proof ProofType)" for the following input, thus, making it hard to spot that proof is a reserved word. While our parse error listener already supports pointing out reserved words, the list of reserved words was outdated. I hope to prevent similar bugs in the future by corresponding notes in GobraLexer.g4.

package main

func test(proof ProofType)

@ArquintL ArquintL requested a review from jcp19 February 28, 2025 10:21
@ArquintL ArquintL force-pushed the reserved-proof-keyword branch from 16fd1a8 to bc9b699 Compare February 28, 2025 10:59
Copy link
Contributor

@jcp19 jcp19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I just have a question about an assumption that the code makes

@ArquintL ArquintL merged commit 6727731 into master Feb 28, 2025
3 checks passed
@ArquintL ArquintL deleted the reserved-proof-keyword branch February 28, 2025 12:50
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