dolik-rce / pegof

PEG grammar optimizer and formatter
Other
9 stars 2 forks source link

Inserting pegof's signature/fingerprint(?) #15

Closed masatake closed 5 days ago

masatake commented 3 weeks ago

For verification and debugging build-scripts utilizing pegof, I think pegof should insert the message something like

# Optimized code is generated by Pegof v x.y.z from input-file-name.peg
# Don't edit this file manually.

to at the beginning of the generated files.

dolik-rce commented 3 weeks ago

Sure, that is easy to do. But it should only happen when it runs in the optimization mode. It wouldn't make much sense when using pegof as a formatter. And even for optimization, it should be possible to turn it off via command line option.

masatake commented 3 weeks ago

Oh, I see.

dolik-rce commented 1 week ago

Implemented on the devel branch. There is new option -H/--header that can be used to control the behavior.

dolik-rce commented 5 days ago

Merged to master, the new option is available in pegof 0.5.0.

masatake commented 5 days ago

Thank you. I'll use the option in the ctags side.