Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

xkbcomp/parser: enable Bison detailed syntax error #644

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bluetech
Copy link
Member

@bluetech bluetech commented Feb 4, 2025

It's not much, but instead of

xkbcommon: ERROR: [XKB-769] (unknown file):5:25: syntax error

we get

xkbcommon: ERROR: [XKB-769] (unknown file):5:25: syntax error, unexpected +, expecting INTEGER

which is at least a little helpful.

TODO: byacc

It's not much, but instead of

xkbcommon: ERROR: [XKB-769] (unknown file):5:25: syntax error

we get

xkbcommon: ERROR: [XKB-769] (unknown file):5:25: syntax error, unexpected +, expecting INTEGER

which is at least a little helpful.

TODO: byacc

Signed-off-by: Ran Benita <ran@unusedvar.com>
@wismill
Copy link
Member

wismill commented Feb 5, 2025

I did not find a byacc equivalent for this feature. Maybe we need to guard it with a bison check?

@wismill wismill added the compile-keymap Indicates a need for improvements or additions to keymap compilation label Feb 5, 2025
@bluetech
Copy link
Member Author

bluetech commented Feb 7, 2025

I did not find a byacc equivalent for this feature. Maybe we need to guard it with a bison check?

Yeah but it'd be a bit of a hassle, I think we'd need to template parser.y :( Then we'd also need to make the test/log snapshot tests conditional.

Alternatives are to drop this change, drop byacc, or ask byacc to add this feature (unlikely, but Thomas Dickey did add a feature to byacc in the past when I asked nicely).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
compile-keymap Indicates a need for improvements or additions to keymap compilation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants