Closed Llammissar closed 8 years ago
Hi,
Thanks reporting. Recently, Pegged has started using the introspection module, in order to deal with any left-recursion in a grammar. So we should possibly change things a bit: either move introspection.d out of the dev dir or change the README and Makefile.
However, I have discovered that the analysis of left-recursion is sub-optimal for memoizing parsers, and I have to find a way to improve the introspection. I am not yet sure if I will keep using the existing module in dev or write a tailored analysis procedure.
I have not encountered the linking problem myself as I have been using
rdmd -I"path_to\Pegged" my_file.d
so all sources including relevant files from Pegged are compiled at once.
I suppose it will be best to adjust the README, but things might change in the not-so-distant future.
Best, Bastiaan.
Philippe,
In case I decide to continue using introspection.d, do you want it moved out of the dev dir?
Bastiaan.
Philippe,
In case I decide to continue using introspection.d, do you want it moved out of the dev dir?
Yes, that is cleaner that way. Could you move it, please?
Done: #173.
On Fri, Jan 29, 2016 at 10:31 PM, Bastiaan Veelo notifications@github.com wrote:
Done: #173 https://github.com/PhilippeSigaud/Pegged/pull/173.
Thanks!
There, I merged it. Thanks a lot, Bastiaan.
Wyatt, if you fetch it anew, does it work OK now?
Welcome! Note I didn't even look at the Makefile. Should it be mentioned there explicitly to resolve the link error?
Sorry, what should be mentioned in the makefile?
I mean that I am unsure whether this resolves Whyatt's link problem.
Ah, sorry, weekend came and I didn't check my mail at all.
Yeah, the move was probably a good idea, but putting it in the makefile was necessary, or you'd have to build/link the introspection module explicitly; i.e. the library was incomplete. Thanks for addressing this!
Can I close the issue?
I think it's closed already. Isn't it?
On Mon, Feb 1, 2016 at 9:44 PM, Bastiaan Veelo notifications@github.com wrote:
I think it's closed already. Isn't it?
Indeed it is. Move along, nothing to see here. :-)
Using the following code:
Compilation seems to be fine, but the link fails:
If I add the module in question explicitly like so, it works:
dmd arithmeticPeg.d pegged/dev/introspection.d -L-L. -L-lpegged
...As do adding
pegged/dev/introspection.d
to the Pegged makefile and whatever magic is inrdmd arithmeticPeg.d
.My impression from the README is pegged/dev files shouldn't be part of the release build, so I'm not sure what's the right thing to do here.