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

Overhaul of build & testing system; bugfixes #19

Merged
merged 32 commits into from
Nov 30, 2018

Conversation

TheCount
Copy link

@TheCount TheCount commented Nov 7, 2018

This pull request mainly addresses #17.

About the GNU coding standards: I tried to use them once I saw your comment #16 (comment), but older commits may be broken in this respect; sorry.

I've rebased my changes against your master, so it should apply cleanly.

Here is a list of changes:

  • Switched to CMake. Works on GNU/Linux and OSX with both gcc and clang. With some restrictions, it also works on Windows with Visual Studio 2017. Removed the old build system.
  • Removed legacy code not needed in ANSI-C compatible environments.
  • Moved docs to separate directory.
  • Split up the *.tst.in files into separate test files.
  • Massive deduplication in test code.
  • Fixed a bug where a visitation flag would be undone in every other traversal (22ac876).
  • Fixed an uninitialised memory bug (e346117).
  • Fixed an invalid memory access bug (c362150).

Still open:

  • The test CMakeLists.txt are quite bulky. I'd like to rename the tests to speaking names instead of just test42.c before addressing this.
  • Reliance on bash, so not all tests can be run on Windows.
  • With Visual Studio, there is a bug where sometimes the dependency on sgramm.c is not resolved. I have no idea what causes this. Can be fixed by building the sgramm_c target explicitly first.
  • Docs could maybe be generated instead of just lying around.

I think these still open issues have lower priority and I would leave them for later.

Remove everything that is either not used at all or guaranteed by C90
anyway.
Tickers are used for testing/benchmarking only, so they can go into a
separate directory.
Break up compare_parsers.tst.in into separate test directory
Break up yaep.tst.in into individual files and create individual tests.
Break up yaep++.tst.in into individual files and create individual
tests.
Deduplicate standard yaep_parse_grammar() type tests.
Deduplicate standard yaep_read_grammar() type tests.
Deduplicate most more complex mains.
Perform analogous deduplications as in
52a15f0,
b931e20,
8e37c71,
a649673,
99e6bb4, and
37d7b4a.
Avoid out-of-bounds access of symb_code_trans_vect when an unknown
terminal appears in the input (see test19).
@TheCount TheCount mentioned this pull request Nov 10, 2018
@vnmakarov vnmakarov merged commit c362150 into vnmakarov:master Nov 30, 2018
@sanssecours sanssecours mentioned this pull request Dec 3, 2018
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 this pull request may close these issues.

2 participants