Graphviz 12.0.1~dev.20240716.0800
|
#include <ast/ast.h>
#include <ast/error.h>
#include <cgraph/agxbuf.h>
#include <cgraph/alloc.h>
#include <cgraph/gv_ctype.h>
#include <cgraph/unreachable.h>
#include <gvpr/parse.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Go to the source code of this file.
Macros | |
#define | BSIZE 8 |
Functions | |
static char * | caseStr (case_t cs) |
static int | eol (FILE *str) |
static int | readc (FILE *str, agxbuf *ostr) |
static void | unreadc (FILE *str, int c) |
static int | skipWS (FILE *str) |
static void | parseID (FILE *str, int c, char *buf, size_t bsize) |
static case_t | parseKind (FILE *str) |
static int | endString (FILE *ins, agxbuf *outs, char ec) |
static int | endBracket (FILE *ins, agxbuf *outs, char bc, char ec) |
static char * | parseBracket (FILE *str, agxbuf *buf, int bc, int ec) |
static char * | parseAction (FILE *str, agxbuf *buf) |
static char * | parseGuard (FILE *str, agxbuf *buf) |
static case_t | parseCase (FILE *str, char **guard, int *gline, char **action, int *aline) |
static parse_block * | addBlock (parse_block *last, char *stmt, int line, size_t n_nstmts, case_info *nodelist, size_t n_estmts, case_info *edgelist) |
static case_info * | addCase (case_info *last, char *guard, int gline, char *action, int line, size_t *cnt) |
static void | bindAction (case_t cs, char *action, int aline, char **ap, int *lp) |
parse_prog * | parseProg (char *input, int isFile) |
static void | freeCaseList (case_info *ip) |
static void | freeBlocks (parse_block *ip) |
void | freeParseProg (parse_prog *prog) |
Variables | |
static int | lineno = 1 |
static int | col0 = 1 |
static int | startLine = 1 |
static int | kwLine = 1 |
static char * | case_str [] |
|
static |
Definition at line 378 of file parse.c.
References gv_alloc(), and last.
Referenced by parseProg().
|
static |
Definition at line 399 of file parse.c.
References error(), ERROR_WARNING, guard, gv_alloc(), kwLine, last, and NULL.
Referenced by parseProg().
|
static |
Definition at line 427 of file parse.c.
References caseStr(), error(), ERROR_ERROR, ERROR_WARNING, and kwLine.
Referenced by parseProg().
|
static |
Definition at line 48 of file parse.c.
References case_str.
Referenced by bindAction().
|
static |
Definition at line 260 of file parse.c.
References agxbputc(), endBracket(), endString(), ins(), and readc().
Referenced by endBracket(), and parseBracket().
|
static |
Definition at line 232 of file parse.c.
References agxbputc(), error(), ERROR_ERROR, ins(), and lineno.
Referenced by endBracket().
|
static |
|
static |
Definition at line 577 of file parse.c.
References _parse_block::begg_stmt, _parse_block::edge_stmts, free(), freeCaseList(), _parse_block::next, and _parse_block::node_stmts.
Referenced by freeParseProg().
|
static |
Definition at line 564 of file parse.c.
References _case_info::action, free(), _case_info::guard, and _case_info::next.
Referenced by freeBlocks().
void freeParseProg | ( | parse_prog * | prog | ) |
Definition at line 590 of file parse.c.
References parse_prog::begin_stmt, parse_prog::blocks, parse_prog::end_stmt, parse_prog::endg_stmt, free(), and freeBlocks().
Referenced by gvpr(), and parseProg().
|
static |
Definition at line 312 of file parse.c.
References parseBracket(), and str.
Referenced by parseCase().
|
static |
Definition at line 287 of file parse.c.
References agxbdisown(), endBracket(), error(), ERROR_ERROR, getErrorErrors(), lineno, skipWS(), startLine, str, and unreadc().
Referenced by parseAction(), and parseGuard().
|
static |
Definition at line 334 of file parse.c.
References agxbfree(), Begin, BeginG, End, EndG, Eof, Error, getErrorErrors(), guard, kind, parseAction(), parseGuard(), parseKind(), startLine, str, and UNREACHABLE.
Referenced by parseProg().
|
static |
Definition at line 318 of file parse.c.
References parseBracket(), and str.
Referenced by parseCase().
|
static |
Definition at line 164 of file parse.c.
References gv_isalpha(), readc(), str, and unreadc().
Referenced by parseKind().
|
static |
parse_prog * parseProg | ( | char * | input, |
int | isFile | ||
) |
Definition at line 444 of file parse.c.
References addBlock(), addCase(), Begin, parse_prog::begin_stmt, BeginG, bindAction(), parse_prog::blocks, col0, End, parse_prog::end_stmt, EndG, parse_prog::endg_stmt, Eof, error(), Error, ERROR_ERROR, free(), freeParseProg(), getErrorErrors(), guard, kwLine, parse_prog::l_begin, parse_prog::l_end, parse_prog::l_endg, lineno, parse_prog::n_blocks, NULL, parseCase(), parse_prog::source, startLine, str, and UNREACHABLE.
Referenced by gvpr_core().
|
static |
Definition at line 74 of file parse.c.
References agxbputc(), col0, eol(), lineno, and str.
Referenced by endBracket(), parseID(), and skipWS().
|
static |
Definition at line 149 of file parse.c.
References gv_isspace(), readc(), and str.
Referenced by parseBracket(), and parseKind().
|
static |
|
static |
|
static |
Definition at line 30 of file parse.c.
Referenced by eol(), parseProg(), and readc().
|
static |
Definition at line 32 of file parse.c.
Referenced by addCase(), bindAction(), parseKind(), and parseProg().
|
static |
Definition at line 29 of file parse.c.
Referenced by endString(), eol(), parseBracket(), parseKind(), parseProg(), ppDirective(), ppDirective(), readc(), and unreadc().
|
static |
Definition at line 31 of file parse.c.
Referenced by parseBracket(), parseCase(), and parseProg().