From: Akim Demaille Date: Thu, 1 Aug 2013 09:19:05 +0000 (+0200) Subject: doc: prefer the ".gv" extension to ".dot" X-Git-Tag: v3.0.1~39 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/b97bbbaed7f4e377e8f3535f1af94e38ab881349 doc: prefer the ".gv" extension to ".dot" See http://marc.info/?l=graphviz-devel&m=129418103126092 for the motivation (basically, some word processor now uses *.dot). * doc/figs/example-reduce.dot: Rename as... * doc/figs/example-reduce.gv: this. * doc/figs/example-shift.dot: Rename as... * doc/figs/example-shift.gv: this. * doc/figs/example.dot: Rename as... * doc/figs/example.gv: this. * doc/local.mk: Adjust. --- diff --git a/doc/figs/example-reduce.dot b/doc/figs/example-reduce.dot deleted file mode 100644 index fdd99c5d..00000000 --- a/doc/figs/example-reduce.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph "reduce.y" -{ - node [fontname=courier shape=box] - edge [fontname=courier] - - 1 [label="State 1\n 3 a: \"0\" . [\".\"]\l 4 b: \"0\" . [\";\"]\l"] - 1 -> "1R3" [label="" style=solid] - "1R3" [style=filled shape=diamond fillcolor=yellowgreen label="R3"] - 1 -> "1R4" [label="[\";\"]" style=solid] - "1R4" [style=filled shape=diamond fillcolor=yellowgreen label="R4"] -} diff --git a/doc/figs/example-reduce.gv b/doc/figs/example-reduce.gv new file mode 100644 index 00000000..fdd99c5d --- /dev/null +++ b/doc/figs/example-reduce.gv @@ -0,0 +1,11 @@ +digraph "reduce.y" +{ + node [fontname=courier shape=box] + edge [fontname=courier] + + 1 [label="State 1\n 3 a: \"0\" . [\".\"]\l 4 b: \"0\" . [\";\"]\l"] + 1 -> "1R3" [label="" style=solid] + "1R3" [style=filled shape=diamond fillcolor=yellowgreen label="R3"] + 1 -> "1R4" [label="[\";\"]" style=solid] + "1R4" [style=filled shape=diamond fillcolor=yellowgreen label="R4"] +} diff --git a/doc/figs/example-shift.dot b/doc/figs/example-shift.dot deleted file mode 100644 index 995ba0e4..00000000 --- a/doc/figs/example-shift.dot +++ /dev/null @@ -1,9 +0,0 @@ -digraph "shift.y" -{ - node [fontname=courier shape=box] - edge [fontname=courier] - - 3 [label="State 3\n 1 exp: a . \".\"\l"] - 3 -> 6 [style=solid label="\".\""] - 6 [label="State 6\n 1 exp: a \".\" .\l"] -} diff --git a/doc/figs/example-shift.gv b/doc/figs/example-shift.gv new file mode 100644 index 00000000..995ba0e4 --- /dev/null +++ b/doc/figs/example-shift.gv @@ -0,0 +1,9 @@ +digraph "shift.y" +{ + node [fontname=courier shape=box] + edge [fontname=courier] + + 3 [label="State 3\n 1 exp: a . \".\"\l"] + 3 -> 6 [style=solid label="\".\""] + 6 [label="State 6\n 1 exp: a \".\" .\l"] +} diff --git a/doc/figs/example.dot b/doc/figs/example.dot deleted file mode 100644 index 94fff855..00000000 --- a/doc/figs/example.dot +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by GNU Bison 2.6.90. -// Report bugs to . -// Home page: . - -digraph "/tmp/fo.y" -{ - node [fontname = courier, shape = box, colorscheme = paired6] - edge [fontname = courier] - - 0 [label="State 0\n\l 0 $accept: . exp $end\l 1 exp: . a \";\"\l 2 | . b \".\"\l 3 a: . \"0\"\l 4 b: . \"0\"\l"] - 0 -> 1 [style=solid label="\"0\""] - 0 -> 2 [style=dashed label="exp"] - 0 -> 3 [style=dashed label="a"] - 0 -> 4 [style=dashed label="b"] - 1 [label="State 1\n\l 3 a: \"0\" . [\";\"]\l 4 b: \"0\" . [\".\"]\l"] - 1 -> "1R3" [style=solid] - "1R3" [label="R3", fillcolor=3, shape=diamond, style=filled] - 1 -> "1R4" [label="[\".\"]", style=solid] - "1R4" [label="R4", fillcolor=3, shape=diamond, style=filled] - 2 [label="State 2\n\l 0 $accept: exp . $end\l"] - 2 -> 5 [style=solid label="$end"] - 3 [label="State 3\n\l 1 exp: a . \";\"\l"] - 3 -> 6 [style=solid label="\";\""] - 4 [label="State 4\n\l 2 exp: b . \".\"\l"] - 4 -> 7 [style=solid label="\".\""] - 5 [label="State 5\n\l 0 $accept: exp $end .\l"] - 5 -> "5R0" [style=solid] - "5R0" [label="Acc", fillcolor=1, shape=diamond, style=filled] - 6 [label="State 6\n\l 1 exp: a \";\" .\l"] - 6 -> "6R1" [style=solid] - "6R1" [label="R1", fillcolor=3, shape=diamond, style=filled] - 7 [label="State 7\n\l 2 exp: b \".\" .\l"] - 7 -> "7R2" [style=solid] - "7R2" [label="R2", fillcolor=3, shape=diamond, style=filled] -} diff --git a/doc/figs/example.gv b/doc/figs/example.gv new file mode 100644 index 00000000..94fff855 --- /dev/null +++ b/doc/figs/example.gv @@ -0,0 +1,35 @@ +// Generated by GNU Bison 2.6.90. +// Report bugs to . +// Home page: . + +digraph "/tmp/fo.y" +{ + node [fontname = courier, shape = box, colorscheme = paired6] + edge [fontname = courier] + + 0 [label="State 0\n\l 0 $accept: . exp $end\l 1 exp: . a \";\"\l 2 | . b \".\"\l 3 a: . \"0\"\l 4 b: . \"0\"\l"] + 0 -> 1 [style=solid label="\"0\""] + 0 -> 2 [style=dashed label="exp"] + 0 -> 3 [style=dashed label="a"] + 0 -> 4 [style=dashed label="b"] + 1 [label="State 1\n\l 3 a: \"0\" . [\";\"]\l 4 b: \"0\" . [\".\"]\l"] + 1 -> "1R3" [style=solid] + "1R3" [label="R3", fillcolor=3, shape=diamond, style=filled] + 1 -> "1R4" [label="[\".\"]", style=solid] + "1R4" [label="R4", fillcolor=3, shape=diamond, style=filled] + 2 [label="State 2\n\l 0 $accept: exp . $end\l"] + 2 -> 5 [style=solid label="$end"] + 3 [label="State 3\n\l 1 exp: a . \";\"\l"] + 3 -> 6 [style=solid label="\";\""] + 4 [label="State 4\n\l 2 exp: b . \".\"\l"] + 4 -> 7 [style=solid label="\".\""] + 5 [label="State 5\n\l 0 $accept: exp $end .\l"] + 5 -> "5R0" [style=solid] + "5R0" [label="Acc", fillcolor=1, shape=diamond, style=filled] + 6 [label="State 6\n\l 1 exp: a \";\" .\l"] + 6 -> "6R1" [style=solid] + "6R1" [label="R1", fillcolor=3, shape=diamond, style=filled] + 7 [label="State 7\n\l 2 exp: b \".\" .\l"] + 7 -> "7R2" [style=solid] + "7R2" [label="R2", fillcolor=3, shape=diamond, style=filled] +} diff --git a/doc/local.mk b/doc/local.mk index afd50dd1..c3a35d3b 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -23,9 +23,9 @@ doc_bison_TEXINFOS = \ # Cannot express dependencies directly on file names because of Automake. # Obfuscate with a variable. doc_bison = doc/bison -$(doc_bison).dvi: $(FIGS_DOT:.dot=.eps) -$(doc_bison).pdf: $(FIGS_DOT:.dot=.pdf) -$(doc_bison).html: $(FIGS_DOT:.dot=.png) +$(doc_bison).dvi: $(FIGS_GV:.gv=.eps) +$(doc_bison).pdf: $(FIGS_GV:.gv=.pdf) +$(doc_bison).html: $(FIGS_GV:.gv=.png) TEXI2DVI = texi2dvi --build-dir=doc/bison.t2d -I doc CLEANDIRS = doc/bison.t2d @@ -124,25 +124,25 @@ nodist_man_MANS = doc/yacc.1 ## ----------------------------- ## CLEANDIRS += doc/figs -FIGS_DOT = \ - doc/figs/example.dot \ - doc/figs/example-reduce.dot doc/figs/example-shift.dot -EXTRA_DIST += \ - $(FIGS_DOT) \ - $(FIGS_DOT:.dot=.eps) $(FIGS_DOT:.dot=.pdf) $(FIGS_DOT:.dot=.png) -SUFFIXES += .dot .eps .pdf .png - -.dot.eps: +FIGS_GV = \ + doc/figs/example.gv \ + doc/figs/example-reduce.gv doc/figs/example-shift.gv +EXTRA_DIST += \ + $(FIGS_GV) \ + $(FIGS_GV:.gv=.eps) $(FIGS_GV:.gv=.pdf) $(FIGS_GV:.gv=.png) +SUFFIXES += .gv .eps .pdf .png + +.gv.eps: $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'` $(AM_V_at) $(DOT) -Gmargin=0 -Teps $< >$@.tmp $(AM_V_at) mv $@.tmp $@ -.dot.pdf: +.gv.pdf: $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'` $(AM_V_at) $(DOT) -Gmargin=0 -Tpdf $< >$@.tmp $(AM_V_at) mv $@.tmp $@ -.dot.png: +.gv.png: $(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'` $(AM_V_at) $(DOT) -Gmargin=0 -Tpng $< >$@.tmp $(AM_V_at) mv $@.tmp $@