Closed mr-martian closed 4 years ago
Is Transducer::show()
used in any downstream project? If so, this would be a major version bump.
Adding the new param to the end should be preferred, and the only cost is passing explicit 0
in your new code.
show()
is used: https://github.com/apertium/apertium-lex-tools/blob/master/src/lrx_compiler.cc#L978 and https://github.com/apertium/apertium-lex-tools/blob/master/src/lrx_compiler.cc#L986
We can avoid a major version bump by adding an overload. Keep the old show(Alphabet, FILE*, int)
, but forward it to the extended version with bool=false.
I've moved the new parameter to the end.
Also, the epsilon_tag
parameter is completely ignored.
Merged, with a minor addition to keep binary compat.
This PR adds a
-H
/--hfst
option tolt-print
to print transducers with character escapes that can be read byhfst-txt2fst
. It also adds this option totransducer.show()
.(In case anyone wonders, the argument order on
show()
is because if thehfst
parameter is last and you try to pass in abool
, it gets casted to anint
and interpreted asepsilon_tag
.)