BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
586 stars 165 forks source link

Add end position information to BNFC'Position #463

Open aabounegm opened 1 year ago

aabounegm commented 1 year ago

I made an attempt at implementing the feature I asked for. Please let me know if there is anything I can improve on or some style I'm not strictly following (nitpicks are welcome 😄).

Resolves #461

aabounegm commented 1 year ago

I have tried running the doctests locally but failed for some reason. stack test doesn't seem to run them (I don't have cabal), and installing manually (using stack install doctest) and then running doctest source/src gives me a bunch of errors I couldn't fix, like so:

source\src\BNFC\License.hs:7:1: error:
    Could not find module ‘Data.String.QQ’
    Perhaps you meant Data.String (from base-4.18.1.0)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.

source\src\BNFC\CF.hs:38:1: error:
    Could not find module ‘BNFC.Par’
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.

source\src\BNFC\CF.hs:39:1: error:
    Could not find module ‘BNFC.Lex’
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.

which also caused a lot of variable not in scope errors. Do you have any suggestions for how to run the doctests?

aabounegm commented 1 year ago

I believe the tests should be fixed now. @andreasabel when do you think you can take a look?

aabounegm commented 9 months ago

Hello @andreasabel, sorry to bother you again, but do you have an estimate for when you might have time to review this?

aabounegm commented 4 months ago

Thanks for the review, you've raised some good points indeed. Unfortunately, I have gotten rather busy lately and don't think I will be able to address them relatively soon. About the addition of a new flag, it felt somewhat redundant to have 2 flags with very similar functionality, except one has more information than the other. Wouldn't a major version update be more suitable in your opinion?