BenHanson / parsertl14

C++14 version of parsertl
32 stars 4 forks source link

Includes from lexertl14 assume a particular project structure #10

Closed musicinmybrain closed 10 months ago

musicinmybrain commented 10 months ago

Where parsertl14 includes headers from lexertl14, it uses relative paths that assume a particular project structure, e.g.:

https://github.com/BenHanson/parsertl14/blob/9a2b12a22efb6551462f74a9eb3e91dd8289d0ef/include/parsertl/serialise.hpp#L10

Obviously, these would have to be rewritten to something like

#include "lexertl/serialise.hpp"

or

#include <lexertl/serialise.hpp>

to use the headers in a system-wide installation.

Would it be better to change the paths in this repository as described above, and to expect library users to set the include path with compiler flags (-I/path/to/headers) as needed? I would be happy to prepare a PR for this.

mingodad commented 10 months ago

That's what I did on my fork:

https://github.com/mingodad/parsertl-playground/blob/2061bfe57057d60b94c3e8a08be70c0a6a1411a7/parsertl/serialise.hpp#L10

https://github.com/mingodad/parsertl-playground/blob/2061bfe57057d60b94c3e8a08be70c0a6a1411a7/parsertl/iterator.hpp#L9

https://github.com/mingodad/parsertl-playground/blob/2061bfe57057d60b94c3e8a08be70c0a6a1411a7/parsertl/rules.hpp#L13

https://github.com/mingodad/parsertl-playground/blob/2061bfe57057d60b94c3e8a08be70c0a6a1411a7/parsertl/search_iterator.hpp#L10

BenHanson commented 10 months ago

I have switched over to #include <lexertl/...> format.