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

Option to ignore conflicts and accept the default resolution #3

Closed
dabrahams opened this issue Mar 24, 2021 · 2 comments · Fixed by #4
Closed

Option to ignore conflicts and accept the default resolution #3

dabrahams opened this issue Mar 24, 2021 · 2 comments · Fixed by #4

Comments

@dabrahams
Copy link
Contributor

dabrahams commented Mar 24, 2021

I have a grammar with shift/reduce conflicts I've been unable to resolve using associativity and precedence. The default behavior of citron is to resolve them in the way I want, but when I integrate running citron into my build, the build step that includes generating the .swift file always fails. That's problematic for integration into a larger workflow. I'd like a command line option that lets citron exit with status 0 even when there are conflicts.

@dabrahams
Copy link
Contributor Author

I'm currently using this in my makefile as a workaround:

${GRAMMAR}.swift: ${CITRON} ${GRAMMAR}.citron
	if ${CITRON} ${GRAMMAR}.citron -o $@ 2>&1 | grep -E -v '[0-9]+ parsing conflicts.' ; then rm $@; exit 1; fi

@roop
Copy link
Owner

roop commented Mar 25, 2021

@dabrahams I've added an "-i" flag to exit with 0 status code even when there were parsing conflicts.

(Thrilled to know you're trying this out, btw.)

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 a pull request may close this issue.

2 participants