/* python.dot - Don Yang (uguu.org) Python comments: strings = text quoted by ', ", ''', or """, can contain escaped characters preceded by \ comments = text outside strings, from # until end of line. Note that the above definition is an over simplication. In particular, documentation strings are not recognized. The # syntax is also somewhat compatible with other scripting languages, including Perl, Ruby, sh/bash/csh, awk, etc. Python is the simplest of them all (doesn't have POD and other more complex bits). */ digraph Python { size = "7.5, 9"; ratio = compress; /* Code */ init -> string [label = "\" \'", fontcolor = blue]; init -> comment [label = "#", color = red]; init -> init [label = "any"]; init [peripheries = 2]; /* Single line comment */ comment -> init [label = "\\n"]; comment -> comment [label = "any", color = red]; /* Strings */ string -> string2 [label = "quote"]; string -> escape [label = "\\"]; escape -> string [label = "any"]; string -> string [label = "any"]; string2 -> t_string [label = "quote"]; string2 -> string [label = "\" \'", fontcolor = blue]; string2 -> comment [label = "#", color = red]; string2 -> init [label = "any"]; /* Triple-quoted strings */ t_string -> t_string_end1 [label = "quote"]; t_string -> t_string [label = "any"]; t_string_end1 -> t_string_end2 [label = "quote"]; t_string_end1 -> t_string [label = "any"]; t_string_end2 -> init [label = "quote"]; t_string_end2 -> t_string [label = "any"]; }