1 |
/* VCG description handler for Bison. |
/* VCG description handler for Bison. |
2 |
|
|
3 |
Copyright (C) 2001, 2002 Free Software Foundation, Inc. |
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of Bison, the GNU Compiler Compiler. |
This file is part of Bison, the GNU Compiler Compiler. |
6 |
|
|
210 |
`----------------------------------------------*/ |
`----------------------------------------------*/ |
211 |
|
|
212 |
static const char * |
static const char * |
213 |
get_color_str (enum color c) |
get_color_str (enum color color) |
214 |
{ |
{ |
215 |
switch (c) |
switch (color) |
216 |
{ |
{ |
217 |
case white: return "white"; |
case white: return "white"; |
218 |
case blue: return "blue"; |
case blue: return "blue"; |
251 |
} |
} |
252 |
|
|
253 |
static const char * |
static const char * |
254 |
get_textmode_str (enum textmode t) |
get_textmode_str (enum textmode textmode) |
255 |
{ |
{ |
256 |
switch (t) |
switch (textmode) |
257 |
{ |
{ |
258 |
case centered: return "center"; |
case centered: return "center"; |
259 |
case left_justify: return "left_justify"; |
case left_justify: return "left_justify"; |
263 |
} |
} |
264 |
|
|
265 |
static const char * |
static const char * |
266 |
get_shape_str (enum shape s) |
get_shape_str (enum shape shape) |
267 |
{ |
{ |
268 |
switch (s) |
switch (shape) |
269 |
{ |
{ |
270 |
case box: return "box"; |
case box: return "box"; |
271 |
case rhomb: return "rhomb"; |
case rhomb: return "rhomb"; |
276 |
} |
} |
277 |
|
|
278 |
static const char * |
static const char * |
279 |
get_layoutalgorithm_str (enum layoutalgorithm l) |
get_layoutalgorithm_str (enum layoutalgorithm layoutalgorithm) |
280 |
{ |
{ |
281 |
switch (l) |
switch (layoutalgorithm) |
282 |
{ |
{ |
283 |
case normal: return "normal"; |
case normal: return "normal"; |
284 |
case maxdepth: return "maxdepth"; |
case maxdepth: return "maxdepth"; |
299 |
} |
} |
300 |
|
|
301 |
static const char * |
static const char * |
302 |
get_decision_str (enum decision d) |
get_decision_str (enum decision decision) |
303 |
{ |
{ |
304 |
switch (d) |
switch (decision) |
305 |
{ |
{ |
306 |
case no: return "no"; |
case no: return "no"; |
307 |
case yes: return "yes"; |
case yes: return "yes"; |
310 |
} |
} |
311 |
|
|
312 |
static const char * |
static const char * |
313 |
get_orientation_str (enum orientation o) |
get_orientation_str (enum orientation orientation) |
314 |
{ |
{ |
315 |
switch (o) |
switch (orientation) |
316 |
{ |
{ |
317 |
case top_to_bottom: return "top_to_bottom"; |
case top_to_bottom: return "top_to_bottom"; |
318 |
case bottom_to_top: return "bottom_to_top"; |
case bottom_to_top: return "bottom_to_top"; |
323 |
} |
} |
324 |
|
|
325 |
static const char * |
static const char * |
326 |
get_node_alignment_str (enum alignment a) |
get_node_alignment_str (enum alignment alignment) |
327 |
{ |
{ |
328 |
switch (a) |
switch (alignment) |
329 |
{ |
{ |
330 |
case center: return "center"; |
case center: return "center"; |
331 |
case top: return "top"; |
case top: return "top"; |
335 |
} |
} |
336 |
|
|
337 |
static const char * |
static const char * |
338 |
get_arrow_mode_str (enum arrow_mode a) |
get_arrow_mode_str (enum arrow_mode arrow_mode) |
339 |
{ |
{ |
340 |
switch (a) |
switch (arrow_mode) |
341 |
{ |
{ |
342 |
case fixed: return "fixed"; |
case fixed: return "fixed"; |
343 |
case free_a: return "free"; |
case free_a: return "free"; |
346 |
} |
} |
347 |
|
|
348 |
static const char * |
static const char * |
349 |
get_crossing_type_str (enum crossing_type c) |
get_crossing_type_str (enum crossing_type crossing_type) |
350 |
{ |
{ |
351 |
switch (c) |
switch (crossing_type) |
352 |
{ |
{ |
353 |
case bary: return "bary"; |
case bary: return "bary"; |
354 |
case median: return "median"; |
case median: return "median"; |
359 |
} |
} |
360 |
|
|
361 |
static const char * |
static const char * |
362 |
get_view_str (enum view v) |
get_view_str (enum view view) |
363 |
{ |
{ |
364 |
switch (v) |
switch (view) |
365 |
{ |
{ |
366 |
case normal_view: return "normal_view"; |
case normal_view: return "normal_view"; |
367 |
case cfish: return "cfish"; |
case cfish: return "cfish"; |
373 |
} |
} |
374 |
|
|
375 |
static const char * |
static const char * |
376 |
get_linestyle_str (enum linestyle l) |
get_linestyle_str (enum linestyle linestyle) |
377 |
{ |
{ |
378 |
switch (l) |
switch (linestyle) |
379 |
{ |
{ |
380 |
case continuous: return "continuous"; |
case continuous: return "continuous"; |
381 |
case dashed: return "dashed"; |
case dashed: return "dashed"; |
386 |
} |
} |
387 |
|
|
388 |
static const char * |
static const char * |
389 |
get_arrowstyle_str (enum arrowstyle a) |
get_arrowstyle_str (enum arrowstyle arrowstyle) |
390 |
{ |
{ |
391 |
switch (a) |
switch (arrowstyle) |
392 |
{ |
{ |
393 |
case solid: return "solid"; |
case solid: return "solid"; |
394 |
case line: return "line"; |
case line: return "line"; |