digraph G { code; lc [label="plain line\ncomment"]; ls [label="line\nspec"]; bs [label="block\nspec"]; bc [label="plain block\ncomment"]; nlc [label="nested line comment"]; // Code code -> lc [label="//"]; code -> bc [label="/*"]; code -> ls [label="//@"]; code -> bs [label="/*@"]; // Plain line comment lc -> code [label="\\n"]; // Plain block comment bc -> code [label="*/"]; // Spec line comment ls -> code [label="\n"]; ls -> lc [label="//"]; // Spec block comment bs -> code [label="*/ | @*/"]; bs -> bc [label="/*"]; bs -> nlc [label="//"]; nlc -> code [label="*/ | @*/"]; nlc -> bs [label="\\n"]; }