summaryrefslogtreecommitdiff
path: root/operetta.c
diff options
context:
space:
mode:
Diffstat (limited to 'operetta.c')
-rw-r--r--operetta.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/operetta.c b/operetta.c
index 2c4f555..c72a979 100644
--- a/operetta.c
+++ b/operetta.c
@@ -4,6 +4,7 @@
#include "lexer.h"
#include "parse.h"
#include "proposition.h"
+#include "eval.h"
int main(int argc, char** argv) {
/* read file */
@@ -12,12 +13,15 @@ int main(int argc, char** argv) {
int lineCount = count_lines(content);
lineSet_t lines = parse_lines(content, lineCount);
for (int i = 0; i < lines.count; i++) {
- for (int j = 0; j < lines.lines[i].aLevel; j++) {
+ line_t line = lines.lines[i];
+ printf("%d. ", i + 1);
+ for (int j = 0; j < line.aLevel; j++) {
printf(" > ");
}
- write_prop(lines.lines[i].proposition);
+ write_prop(line.proposition);
printf(" BECAUSE: ");
- write_just(lines.lines[i].justification);
+ write_just(line.justification);
+ printf(just_is_sound(line.proposition, line.justification, lines) ? " <SOUND>" : " <UNSOUND>");
printf("\n");
}
free(content);