From 8095c50f846699f7570bdea4c6517653c5795c2e Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sat, 21 Dec 2024 16:43:03 -0800 Subject: All parsing null to be TFP or TMP Insert a TypePtr/TypeNil around TypeMemPtr and TypeFunPtr in the lattice; allows the parsing of "null" to mean either a TMP or TFP null. Cleanup Type null checks and several prints. Drop Type.lub, Type.makeInit. Add a Parser NIL & ZERO. Clean up parser errors, track line numbers for future parser errors. --- chapter18/docs/lattice.gv | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'chapter18/docs/lattice.gv') diff --git a/chapter18/docs/lattice.gv b/chapter18/docs/lattice.gv index 4a8b1d4c..f8af5718 100644 --- a/chapter18/docs/lattice.gv +++ b/chapter18/docs/lattice.gv @@ -3,7 +3,8 @@ digraph Lattice { // Define nodes splines=false; node [shape=circle, style=filled]; - nodesep=0.6; + nodesep=0.2; + ranksep=0.2; TOP [label=<⊤>, fillcolor=black, fontcolor=white]; BOT [label=<⊥>, fillcolor=black, fontcolor=white]; @@ -22,13 +23,13 @@ digraph Lattice { INT_TOP [label=<⊤:int>, fillcolor=lightblue, shape=oval]; INT_BOT [label=<⊥:int>, fillcolor=lightblue, shape=oval]; - INT_HI [label="max < min" , fillcolor=lightblue, shape=oval]; - INT_XBOOL [label="1...0", fillcolor=lightblue, shape=oval]; + INT_HI [label="[min>max]" , fillcolor=lightblue, shape=oval]; + INT_XBOOL [label="[1...0]", fillcolor=lightblue, shape=oval]; INT_CON [label="constants", fillcolor=lightblue, shape=oval]; INT_CON0 [label="0", fillcolor=lightblue]; INT_CON1 [label="1", fillcolor=lightblue]; - INT_BOOL [label="0...1", fillcolor=lightblue,shape=oval]; - INT_LO [label="max > min" , fillcolor=lightblue, shape=oval]; + INT_BOOL [label="[0...1]", fillcolor=lightblue,shape=oval]; + INT_LO [label="[min INT_TOP; INT_TOP -> INT_HI; -- cgit v1.2.3