thutt / lrstar

Port of lrstar parser generator to Linux
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Dad fix warnings #4

Closed mingodad closed 10 months ago

mingodad commented 10 months ago

And replace ALLOC/REALLOC/FREE by less verbose ones

thutt commented 10 months ago

I have made a large number of significant changes that alter (mostly) the runtime system of the generated parser. The memory leaks should be resolved, and the parser is now, itself, even dynamically allocated.

Would you mind rebasing your changes on top of mine and seeing if any of my changes render your changes unnecessary?

mingodad commented 10 months ago

Right now only using your linux-port I'm getting this when trying to build examples/C:

/tmp/cci74EO1.o: In function `main':
/tmp/lrstar-dad/examples/C/C_user_main.cpp:158: undefined reference to `number(long)'
/tmp/lrstar-dad/examples/C/C_user_main.cpp:159: undefined reference to `number(long)'
/tmp/lrstar-dad/examples/C/C_user_main.cpp:160: undefined reference to `number(long)'
/tmp/lrstar-dad/examples/C/C_user_main.cpp:161: undefined reference to `number(long)'
/tmp/lrstar-dad/examples/C/C_user_main.cpp:133: undefined reference to `read_input(char const*)'
/tmp/lrstar-dad/examples/C/C_user_main.cpp:144: undefined reference to `fatal(int)'
/tmp/lrstar-dad/examples/C/C_user_main.cpp:120: undefined reference to `fatal(int)'
/tmp/lrstar-dad/examples/C/C_user_main.cpp:115: undefined reference to `fatal(int)'
/tmp/lrstar-dad/examples/C/C_user_main.cpp:127: undefined reference to `fatal(int)'
collect2: error: ld returned 1 exit status
mingodad commented 10 months ago

Ok the problem with undefined references was due to not linking lrstar.a.