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

Remove untested parts of BNFC [#265] #307

Merged
merged 15 commits into from
Oct 19, 2020
Merged

Remove untested parts of BNFC [#265] #307

merged 15 commits into from
Oct 19, 2020

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Oct 14, 2020

Remove untested parts of BNFC [#265].

This PR is not supposed to be merged. It just gathers the patches that remove the untested components of BNFC 2.8.4:

  • multiview grammars (undocumented, unconnected)
  • alex1/2 and sharedstrings
  • C# backend
  • profiles backend
  • other dead code (GF.hs, SkelBNF.hs)...

Those will be excluded from BNFC 2.9.

This experimental feature has never been integrated into BNFC.
It is dead code from the point of view of BNFC.
There was some dedicated driver `MultiView.hs` not part of the
compilation process or the testsuite.

This feature, should interest exist, could be maintained in a fork
of BNFC.
Alex 1 has long disappeared, it is not even on hackage.
This backend has not been untested for a long time.
It is just a burden to keep it compilable when refactorings happen.
Alex version 2 does not support unicode and requires GHC <= 7.0 to
build.  It is unlikely that Alex 2 is still used actively.

The --alex2 backend has not been tested for a while.
(BNFC requires now GHC >= 7.10.)
This option has been untested for a long time.
The code produced by this module does not readily compile with GHC.
There is only one Alex backend left: Alex3.
This backend hasn't had a maintainer and has never been covered by the
testsuite.  Alternative language-agnostic tools to generate C# parsers
exist, e.g. https://www.npmjs.com/package/syntax-cli .
This module might have been used in isolation, or it was the start of
a project to add a GF backend.
Tool https://hackage.haskell.org/package/weeder suggested some unused
functions of which I removed some.
Profiles were documented but not tested and did not work out of the
box.  The profile mode was not really core functionality of BNFC, and
design never progressed over the initial stage.  (The syntax
remained ad-hoc: lists/tuples, no nice syntax for the default cases.)

Profiles could be maintained on a fork of BNFC.
Labels can only be identifiers since profiles have been removed.
This BNFC-generated file is not needed to compile BNFC (in the same
way as TestBNF is not needed and not in the repo).
@andreasabel andreasabel marked this pull request as draft October 14, 2020 19:01
@andreasabel andreasabel changed the title Issue265 Remove untested parts of BNFC [#265] Oct 14, 2020
@andreasabel andreasabel added the C# label Oct 14, 2020
@andreasabel andreasabel self-assigned this Oct 14, 2020
@andreasabel andreasabel added this to the 2.9 milestone Oct 14, 2020
@andreasabel andreasabel merged commit bf21e46 into master Oct 19, 2020
@andreasabel andreasabel deleted the issue265 branch August 26, 2021 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant