From 668040f6c61f55b061665185c97eaa19c0d96555 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Mon, 19 Sep 2022 13:22:31 -0700 Subject: [PATCH] Add a flowchart for the interpreter. Using PlantUML. --- README.md | 3 +++ docs/_joy_interpreter_flowchart_url.txt | 1 + docs/html/index.html | 1 + docs/html/joy_interpreter_flowchart.svg | 32 +++++++++++++++++++++++++ joy_interpreter_flowchart.svg | 32 +++++++++++++++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 docs/_joy_interpreter_flowchart_url.txt create mode 100644 docs/html/joy_interpreter_flowchart.svg create mode 100644 joy_interpreter_flowchart.svg diff --git a/README.md b/README.md index f6149a8..00b6a9e 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,9 @@ available functions of the Joy system. Together the stack, expression, and dict are the entire state of the Joy interpreter. +![joy_interpreter_flowchart.svg](/joy_interpreter_flowchart.svg) + + ### Stack / Quote / List / Sequence When talking about Joy we use the terms "stack", "quote", "sequence", diff --git a/docs/_joy_interpreter_flowchart_url.txt b/docs/_joy_interpreter_flowchart_url.txt new file mode 100644 index 0000000..ffa48ab --- /dev/null +++ b/docs/_joy_interpreter_flowchart_url.txt @@ -0,0 +1 @@ +//www.plantuml.com/plantuml/png/NP0xRiCm38PtdO905sTe3Y0FpIMApafCruGbqg3e9hvz6Jj2WIuIXVy1yRjKIsfhoM4VGhXFb14wV2oAjP8mK3sVpoU_e6FXTooBRQS04B_HWF5XOAW5HfK2Vx7U7JH2zzHQXKt8qDMjN2K_6mx7yGPY6EXc7aswVJGpos44U5CSeYQg29yyizpvItJeN-fLCStxZDaTtOQr1MCMcTS5nfNt-XQ9-9FocWp_ASW3ZQ4LPV8DqkkxSLdhTAmhR0BEx3RteMNyRFWEI26oQ4dPkP3rZbYMS76Ny_u5 \ No newline at end of file diff --git a/docs/html/index.html b/docs/html/index.html index 3d9741e..59d5da3 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -112,6 +112,7 @@ Functions receive the current stack, expression, and dictionary and return the n

The dictionary associates symbols (strings) with Joy expressions that define the available functions of the Joy system. Together the stack, expression, and dictionary are the entire state of the Joy interpreter.

+

joy_interpreter_flowchart.svg

Stack / Quote / List / Sequence

When talking about Joy we use the terms "stack", "quote", "sequence", "list", and others to mean the same thing: a simple linear datatype that diff --git a/docs/html/joy_interpreter_flowchart.svg b/docs/html/joy_interpreter_flowchart.svg new file mode 100644 index 0000000..c7d9030 --- /dev/null +++ b/docs/html/joy_interpreter_flowchart.svg @@ -0,0 +1,32 @@ + +get next term from expressionterm is...symbolliteralsymbol in dictionary?noyesraise UnknownWordlookup functionevaluate functionpush term onto stacknon-emptyexpression is...emptynormal exit \ No newline at end of file diff --git a/joy_interpreter_flowchart.svg b/joy_interpreter_flowchart.svg new file mode 100644 index 0000000..c7d9030 --- /dev/null +++ b/joy_interpreter_flowchart.svg @@ -0,0 +1,32 @@ + +get next term from expressionterm is...symbolliteralsymbol in dictionary?noyesraise UnknownWordlookup functionevaluate functionpush term onto stacknon-emptyexpression is...emptynormal exit \ No newline at end of file