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 --- chapter03/docs/03-grammar.md | 4 ---- chapter03/docs/03-graph1.gv | 2 +- chapter03/docs/03-graph2.gv | 2 +- chapter03/docs/03-graph3.gv | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) (limited to 'chapter03/docs') diff --git a/chapter03/docs/03-grammar.md b/chapter03/docs/03-grammar.md index 14a7d5fa..1d36b532 100644 --- a/chapter03/docs/03-grammar.md +++ b/chapter03/docs/03-grammar.md @@ -12,12 +12,8 @@ statement | declStatement | blockStatment | expressionStatement - | metaStatement ; -metaStatement - : '#showGraph' ';' - ; expressionStatement : IDENTIFIER '=' expression ';' diff --git a/chapter03/docs/03-graph1.gv b/chapter03/docs/03-graph1.gv index 2bdca351..7008a44e 100644 --- a/chapter03/docs/03-graph1.gv +++ b/chapter03/docs/03-graph1.gv @@ -1,6 +1,6 @@ digraph chapter03 { /* -int a=1; int b=2; int c=0; { int b=3; c=a+b; #showGraph; } return c; #showGraph; +int a=1; int b=2; int c=0; { int b=3; c=a+b; } return c; */ rankdir=BT; ordering="in"; diff --git a/chapter03/docs/03-graph2.gv b/chapter03/docs/03-graph2.gv index 460b63c8..cafa7f25 100644 --- a/chapter03/docs/03-graph2.gv +++ b/chapter03/docs/03-graph2.gv @@ -1,6 +1,6 @@ digraph chapter03 { /* -int a=1; int b=2; int c=0; { int b=3; c=a+b; #showGraph; } return c; #showGraph; +int a=1; int b=2; int c=0; { int b=3; c=a+b; } return c; */ rankdir=BT; ordering="in"; diff --git a/chapter03/docs/03-graph3.gv b/chapter03/docs/03-graph3.gv index 50cb6d27..791a7dc1 100644 --- a/chapter03/docs/03-graph3.gv +++ b/chapter03/docs/03-graph3.gv @@ -1,6 +1,6 @@ digraph chapter03 { /* -int x0=1; int y0=2; int x1=3; int y1=4; return (x0-x1)*(x0-x1) + (y0-y1)*(y0-y1); #showGraph; +int x0=1; int y0=2; int x1=3; int y1=4; return (x0-x1)*(x0-x1) + (y0-y1)*(y0-y1); */ rankdir=BT; ordering="in"; -- cgit v1.2.3