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

Support for --header-file #1

Open
firasuke opened this issue Nov 17, 2024 · 2 comments
Open

Support for --header-file #1

firasuke opened this issue Nov 17, 2024 · 2 comments

Comments

@firasuke
Copy link

firasuke commented Nov 17, 2024

Hey there Mr. Thomas,

Thank you for your time and effort on all your amazing projects!

I recently switched to reflex as the main lex implementation on my system, and things have been smooth until I stumbled upon this missing flag --header-file when attempting to build kbd.

Attempting to ./configure then make on kbd throws the following error:

...
  LEX      analyze.c                                                                                                                                                          
invalid option: --header-file=/tmp/kbd-2.6.4/src/libkeymap/analyze.hflex [options] [file ...]                                                                   
                                                                                                                                                                              
Options:                                                                                                                                                                      
 ...

It appears to be complaining about a missing flag --header-file that flex supports.

Is this intended behavior?

Thanks again for your time!

@ThomasDickey
Copy link
Owner

I never thought about that. It wouldn't help with the main use I make for lexers (in vile). Some thoughts:

  • it would have been nice to use the same option letters that yacc uses, but flex's -d and yacc's -d are already assigned
  • on the other hand, I'd prefer to not lock into long options for various reasons
  • aside from dithering over option assignments, there's the question of how it might be used. I see you're using some bison-specific %option lines. Perhaps (with the header option) reflex might not work in that application. (If it does, generating the header is not a big effort).

@firasuke
Copy link
Author

Thank you for youe time Mr. Thomas.

I have opened an issue in the kbd repository to track this.

I was wondering if it could be solved without having to drop the header-file option.

I am willing to test any changes you see fit.

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

No branches or pull requests

2 participants