diff options
author | elioat <elioat@tilde.institute> | 2025-01-12 13:46:31 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2025-01-12 13:46:31 -0500 |
commit | c07fb1c546b8161c0d67ef0e721c66a614b963fb (patch) | |
tree | e8f156ea5b58e90ec9b6185e0fcd6ad3283bafcb | |
parent | 6191c494abc1dbdba850c9ae9cd327197a86bdc9 (diff) | |
download | tour-c07fb1c546b8161c0d67ef0e721c66a614b963fb.tar.gz |
*
-rwxr-xr-x | awk/forth/f.awk | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/awk/forth/f.awk b/awk/forth/f.awk index 4894b34..16de171 100755 --- a/awk/forth/f.awk +++ b/awk/forth/f.awk @@ -59,7 +59,7 @@ function repl() { function interpret(line) { gsub(/\(.*\)/, "", line) # Remove everything from ( to ) - gsub(/\\.*$/, "", line) # Remove backslash comments + gsub(/\\.*$/, "", line) # Remove backslash comments, too n = split(line, words, /[ \t]+/) @@ -67,7 +67,7 @@ function interpret(line) { word = words[i] if (word == "") continue - # print "Processing word: " word # Debugging output (commented out) + # print "Processing word: " word if (word == ":") { compiling = 1 @@ -119,7 +119,7 @@ function execute_word(word) { else if (word == "/") math_div() else if (word == ".") stack_print() else if (word == ".s") { - # print "Executing .s command" # Debugging output + # print "Executing .s command" stack_show() } else if (word == "dup") stack_dup() @@ -230,11 +230,11 @@ function stack_show() { printf "%s ", stack[i] } print "" - # print "Stack state after .s: " # Debugging output + # print "Stack state after .s: " # for (i = 0; i < stack_ptr; i++) { # print stack[i] # } - # print "" # Add a newline for better readability + # print "" } function stack_dup() { |