Graphviz 13.1.3~dev.20250829.0113
Loading...
Searching...
No Matches
parse.h
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11#pragma once
12
13#include <util/list.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19 typedef enum { Begin =
21
22 typedef struct {
23 int gstart;
24 char *guard;
25 int astart;
26 char *action;
27 } case_info;
28
29typedef LIST(case_info) case_infos_t;
30
31 typedef struct {
33 char *begg_stmt;
34 case_infos_t node_stmts;
35 case_infos_t edge_stmts;
36 } parse_block;
37
38typedef LIST(parse_block) parse_blocks_t;
39
40 typedef struct {
41 char *source;
42 int l_begin, l_end, l_endg;
44 parse_blocks_t blocks;
45 char *endg_stmt;
46 char *end_stmt;
47 } parse_prog;
48
49 extern parse_prog *parseProg(char *, int);
50 extern void freeParseProg (parse_prog *);
51
52#ifdef __cplusplus
53}
54#endif
type-generic dynamically expanding list
#define LIST(type)
Definition list.h:55
parse_prog * parseProg(char *, int)
parses input into gpr sections
Definition parse.c:387
void freeParseProg(parse_prog *)
Definition parse.c:497
case_t
Definition parse.h:19
@ Error
Definition parse.h:20
@ Node
Definition parse.h:20
@ End
Definition parse.h:20
@ Edge
Definition parse.h:20
@ Eof
Definition parse.h:20
@ Begin
Definition parse.h:19
@ BeginG
Definition parse.h:20
@ EndG
Definition parse.h:20
char * guard
Definition parse.h:24
int astart
Definition parse.h:25
char * action
Definition parse.h:26
int gstart
Definition parse.h:23
int l_beging
Definition parse.h:32
case_infos_t node_stmts
Definition parse.h:34
case_infos_t edge_stmts
Definition parse.h:35
char * begg_stmt
Definition parse.h:33
int l_begin
Definition parse.h:42
char * end_stmt
Definition parse.h:46
char * endg_stmt
Definition parse.h:45
char * begin_stmt
Definition parse.h:43
parse_blocks_t blocks
Definition parse.h:44
char * source
Definition parse.h:41