graphs: style: use left justification for states

The label text of nodes is centered "by default" (by the use of '\n' as
a line feed). This gives bad readability to the grammar rules shown in
state nodes, a left justification is much nicer. This is done by using '\l'
as the line feed.

In order to allow \l in the DOT file, changes to the quoting system seem
necessary.

* src/print_graph.c (print_core): Escape tokens here, instead of...
* src/graphviz.c (output_node): Here...
(escape): Using this, new.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
Theophile Ranquet
2012-10-08 15:53:44 +00:00
committed by Akim Demaille
parent 2be37f19fe
commit a13121f759
3 changed files with 42 additions and 27 deletions

View File

@@ -46,4 +46,8 @@ void output_edge (int source, int destination, char const *label,
/// \param fout output stream.
void finish_graph (FILE *fout);
/// Escape a lookahead token.
/// \param name the token.
char const *escape (char const *name);
#endif /* ! GRAPHVIZ_H_ */