From 29fb671e69f90ad3b04c6fa8d746caf857f89e77 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Tue, 22 Sep 2026 11:25:05 -0700 Subject: Add shared graph viewer to all chapters --- chapter05/docs/05-grammar.md | 4 ---- chapter05/docs/05-graph1.gv | 4 ++-- chapter05/docs/05-graph2.gv | 4 ++-- chapter05/docs/05-graph3.gv | 4 ++-- chapter05/docs/05-graph8.gv | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) (limited to 'chapter05/docs') diff --git a/chapter05/docs/05-grammar.md b/chapter05/docs/05-grammar.md index 65be4bf7..8eba1581 100644 --- a/chapter05/docs/05-grammar.md +++ b/chapter05/docs/05-grammar.md @@ -13,16 +13,12 @@ statement | blockStatment | expressionStatement | ifStatement - | metaStatement ; ifStatement : 'if' '(' expression ')' statement ('else' statement)? ; -metaStatement - : '#showGraph' ';' - ; expressionStatement : IDENTIFIER '=' expression ';' diff --git a/chapter05/docs/05-graph1.gv b/chapter05/docs/05-graph1.gv index 539ee7f2..b5cf8370 100644 --- a/chapter05/docs/05-graph1.gv +++ b/chapter05/docs/05-graph1.gv @@ -5,9 +5,9 @@ if (arg == 1) a = arg+2; else { a = arg-3; - #showGraph; + } -#showGraph; + return a; */ diff --git a/chapter05/docs/05-graph2.gv b/chapter05/docs/05-graph2.gv index 12506e85..a560bc49 100644 --- a/chapter05/docs/05-graph2.gv +++ b/chapter05/docs/05-graph2.gv @@ -5,9 +5,9 @@ if (arg == 1) a = arg+2; else { a = arg-3; - #showGraph; + } -#showGraph; + return a; */ rankdir=BT; diff --git a/chapter05/docs/05-graph3.gv b/chapter05/docs/05-graph3.gv index 277bed48..688c5ca9 100644 --- a/chapter05/docs/05-graph3.gv +++ b/chapter05/docs/05-graph3.gv @@ -5,9 +5,9 @@ if (arg == 1) a = arg+2; else { a = arg-3; - #showGraph; + } -#showGraph; + return a; */ rankdir=BT; diff --git a/chapter05/docs/05-graph8.gv b/chapter05/docs/05-graph8.gv index 2af43847..8f28207c 100644 --- a/chapter05/docs/05-graph8.gv +++ b/chapter05/docs/05-graph8.gv @@ -11,7 +11,7 @@ else if( arg==3 ) else a=5; return a; -#showGraph; + */ rankdir=BT; ordering="in"; -- cgit v1.2.3