Is possible draw grammar automata?

 I want draw automata like this on paper parr.phd.thesis.pdf from http://www.antlr.org/papers Figure 4.5 on page 72(61) 
I attach file a.txt (change to a.dot)
How resolve some problems:
- second graph is above, should be below, noting do is I exchange it in text
- how do bigger space between graphs?
- from letters A and B shouldn't be arrow but I want to draw in this position
- arrow to letters should be dotted and go close to letters
----
I found white arrow color and  style = dashed
- how increase label size without increasing circle sizes?
- is possible force to draw arrow as arc instead line?
 
thanks in advance

AttachmentSize
a.txt892 bytes

Is possible draw grammar

just have a look at the excellent zoonek ref book:
 
http:// zoonek2.free.fr /UNIX/33_perl_modules/perl.html#140
 
... Un peu plus haut, nous avons utilisé le module Parse::RecDescent pour lire des fichiers BibTeX : ... 
-> on peut visualiser la grammaire que nous avons écrite de la manière suivante. <- 
 
enjoy !-)

Is possible draw grammar

- second graph is above, should be below, noting do is I exchange it in text
- how do bigger space between graphs?
 
You can do this by drawing the graphs separately and them combining them into a single picture with the desired properties. To achieve this in a single graph, use an invisible chain of edges and dummy nodes between SA and SB.
 
  {rank=same
    node [style=invis]
    SA -> x -> y -> z -> SB[style=invis]}
 
- from letters A and B shouldn't be arrow but I want to draw in this position
 
Make the edge invisible: A -> S3 [style=invis]
 
- arrow to letters should be dotted and go close to letters
 
Reduce the margin, width and height attributes (e.g., A[width=0 height=0 margin=0]), and use style=dashed for the edge
 
- how increase label size without increasing circle sizes?
 
The node boundary will always increase to contain the text. You can reduce the width, height and margin attributes, as mentioned above, or set fixedsize=true.
 
- is possible force to draw arrow as arc instead line?
 
Dot always tries to draw straight lines, as this is the easiest for the reader to follow. In your case, you can probably get what you want by forcing the top chain to be straighter (add weights to the edges: SA -> eps1 [ weight=1000 label = <&epsilon;>]) and then attach the bottom edge to the west port: SA -> eps2:w. Or you can postprocess the graph layout and put in your own arc.
 
 

graphviz.grammar.draw

cfr to the excellent zoonek ref.book
http:// zoonek2.free.fr /UNIX /33_perl_modules/perl.html#140
 
... Un peu plus haut, nous avons utilisé le module Parse::RecDescent pour lire des fichiers BibTeX : ... 
-> on peut visualiser la grammaire que nous avons écrite de la manière suivante.<-
 
enjoy !-)

Is possible draw grammar

 Thanks, all works! What "weight" here means? Big weight enforce horizontal arrow?

Is possible draw grammar

Check the documentation at http://www.graphviz.org/content/attrs#dweight . It makes the edge shorter and more vertical or, in your case, more horizontal.

Recent comments