lukeparser / pybison

Use Bison directly from Python
https://pypi.org/project/pybison
GNU General Public License v2.0
26 stars 6 forks source link

fix examples by using api.value.type (instead of define YYSTYPE) #38

Closed da-h closed 2 years ago

da-h commented 2 years ago

Most examples did not work properly.

This fix solves this by using the newer bison options for grammar rule return types (%define api.value.type) instead of using the rather low-level #define YYSTYPE.

Without the fix, all examples did crash with a Segmentation Fault error.

With the fix in place the following examples work again: