diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2023-06-11 23:33:40 -0700 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2023-06-11 23:33:40 -0700 |
| commit | 43bfe5935b3f1d38775c3bc65262aca5683c0fb5 (patch) | |
| tree | c2290c617bc40cc5f4a33c56d54548a6d9084253 /operetta.c | |
| parent | d063e3c2c6f4b1566c28d0ea92186f356017f99f (diff) | |
added parsing of justifications
Diffstat (limited to 'operetta.c')
| -rw-r--r-- | operetta.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -13,6 +13,8 @@ int main(int argc, char** argv) { lineSet_t lines = parse_lines(content, lineCount); for (int i = 0; i < lines.count; i++) { write_prop(lines.lines[i].proposition); + printf(" BECAUSE: "); + write_just(lines.lines[i].justification); printf("\n"); } free(content); @@ -29,6 +31,12 @@ void write_prop(prop_t prop) { printf(")"); } } +void write_just(just_t just) { + printf("%s", jrtos(just.rule)); + for (int i = 0; i < just.referencesCount; i++) { + printf(" %d", just.references[i]); + } +} char* read_file(char* path) { FILE* file = fopen(path, "r"); if (file == NULL) { |
