LoggingPreprocessor/Preprocessor
Thomas Wilkie 388533acb5 Fixed table of command line arguments 2023-12-05 01:24:56 +09:00
..
GetArguments.c Changed from "[filepath].[ext].[temp]" to "[filepath].[temp].[ext]" so file extensions are preserved. 2023-12-04 23:57:20 +09:00
GetArguments.h Changed from "[filepath].[ext].[temp]" to "[filepath].[temp].[ext]" so file extensions are preserved. 2023-12-04 23:57:20 +09:00
README.md Fixed table of command line arguments 2023-12-05 01:24:56 +09:00
main.c Merge branch 'multiple_file_inputs' 2023-12-04 23:59:39 +09:00

README.md

Preprocessor

This is the program which scans through the code and changes the debug tokens to the desired system call while saving the message externally and associating it with a unique value.

Usage

Runs over the files passed in and outputs to a reference file. There are optional arguments with defaults given below. Any argument not before a "-O/D/R/..." marker will be taken as an input file path.

Keep in mind that (in Windows 10 powershell) if you pass in a path with a wildcard, i.e. "src/*.c" then that path will be expanded by Powershell before being passed to the app. I.e. the app will automatically receive multiple arguments of the expanded file paths.

Keep in mind that the executable's file search is from the directory it is called from and not the directory the executable is located in.

NOTE The Debug("Message") must be indented by at least one space or tab character for everything to work. To Do: Fix this.

Can be compiled and ran using make build_ppsr and make run_ppsr. To Do: Temp file directory and temp file append are not implemented yet.

Option Argument Default Description
Output File -O References.txt Path to output references file
Debug Token -D DEBUG Token to to mark debug statement
Replacement Token -R Send Replacement token for debug to send data
Temp File Append -T .temp String to append to files to mark them as temp files

[1] If this is not specified then temp files are created at the same directory as their corresponding input files. If it is specified then all the temp files will be put into that directory.