Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push model example has wrong re2c invocation, breaks guide #239

mwberry opened this issue Jan 13, 2019 · 1 comment


Copy link

commented Jan 13, 2019

I got frustrated with flex and went looking for a better tool. I found re2c and was glad to see it offered everything flex does and appears to address all the short comings of flex's design. I worked through the examples in order to try to quickly onboard with the re2c syntax and concepts. When I got to the push model example I found it did not compile, complaining about missing declarations for YYPEEK, YYSKIP, etc.

Debugging it was certainly a good exercise and it helped me understand better what state re2c needs to keep track of, but the problem was simply that the wrong arguments are used when invoking re2c. After defining the missing macros, I was surprised to see that YYGETSTATE wasn't being used in the generated output. This is because the example invocation uses --input custom, hence the "missing" macros, instead of --storable-state, hence the lack of YYGETSTATE invocations.

Additionally, there's a typo in the link to the --storage-state documentation. It links to this URL instead of this url, with the typo being s/featires/features/.


This comment has been minimized.

Copy link

commented Jan 13, 2019

@mwberry all fixed, thank you for reporting!

mwberry added a commit to mwberry/re2c that referenced this issue Jan 13, 2019

[skvadrik#239] Uses --storable-state argument in push model example
Fixes issue skvadrik#239. The mistaken '--input custom' argument was replaced
with --storable-state. Additionally a URL typo was fixed

@mwberry mwberry closed this Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.