On Fri, Oct 18, 2024 at 09:49:00PM +0100, Gavin Smith wrote: > /opt/csw/bin/perl ./../../maintain/generate_code_convert_data.pl \ > < ./main/command_data.c \ > ./../Data/default_css_element_class_styles.csv \ > ./../Data/default_direction_strings.csv \ > ./../Data/default_special_unit_info.csv \ > ./../Data/html_style_commands_element.csv \ > C ./main/conversion_data.c \ > ./main/conversion_data.h > > I guess "continue;" should have been "next;"? I have never looked at > this Perl program before and don't know what it is for.
Actually, if you have time it could be good if you had a look at this code. I have started using CSV files for 'data' that is converted to code both for C and Perl. Previously, I used the Perl structures to generate C. All the code generation is done by tp/maintain/generate_code_convert_data.pl, with the target language (C or perl) given in argument. The CSV files are in tp/Texinfo/Data/*.csv. The generated Perl code is in tp/Texinfo/Data.pm. The generated C code is in tp/Texinfo/XS/main/conversion_data.*. Is the design ok? If so, I could add more, converting Perl structures to CSV files and previous code generating C from Perl to code generating both C and Perl. -- Pat