vnmakarov / yaep

Yet Another Earley Parser
Other
135 stars 13 forks source link

Make bison use reentrant #21

Open TheCount opened 5 years ago

TheCount commented 5 years ago

This PR depends on #20.

It makes the use of bison (sgramm.y) reentrant. To this end, it also introduces a method of slipping a pointer to the grammar into the user-provided read_terminal() and read_rule() functions.

It brings the tests somewhat closer to reentrancy (ansic.l and ansic.y), even though it doesn't affect the library itself.

With that, all external dependencies to yaep have been made reentrant. The next steps towards resolving #12 can now concentrate on the core of the library itself.