Menu

#10 use of %define parser_class_name results in m4eof text in output file  Edit

1.0
closed
nobody
None
2019-12-31
2019-12-17
Rich S
No

If the following define is used:

%define parser_class_name "ReactionParser"

in a win_bison input file, then a warning is generated:

warning: deprecated directive, use '%define api.parser.class {ReactionParser}' [-Wdeprecated]

AND this text is appended to the end of the output file:

'_m4eof'
_m4eof

which makes the file un-compilable.

This is not the behavior of bison under unix/linux on this same code. A workaound is to update the bison input to the new format "define api.parser.class" but that makes the file incompatable with older versions of bison.

Any suggestions? The attached file is from the open source project Xyce, an electrical circuit simulator (xyce.sandia.gov)

1 Attachments

Discussion

  • Alex Zhondin

    Alex Zhondin - 2019-12-18

    Thank you for report.
    I have reproduced this.
    Will look into it.

     

    Last edit: Alex Zhondin 2019-12-18
  • Alex Zhondin

    Alex Zhondin - 2019-12-21

    could you tell me which version of M4 tool was used in Linux that successfully works?

     
  • Alex Zhondin

    Alex Zhondin - 2019-12-21

    It seems I managed to fix it. Please test win_bison executable attached.

     
  • Rich S

    Rich S - 2019-12-23

    I tried the new binary you posted and it fixes the problem!

    Thanks for looking into this.
    Rich

     
  • Alex Zhondin

    Alex Zhondin - 2019-12-31
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB