Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/python3....
File: grammar.h
[0] Fix | Delete
/* Grammar interface */
[1] Fix | Delete
[2] Fix | Delete
#ifndef Py_GRAMMAR_H
[3] Fix | Delete
#define Py_GRAMMAR_H
[4] Fix | Delete
#ifdef __cplusplus
[5] Fix | Delete
extern "C" {
[6] Fix | Delete
#endif
[7] Fix | Delete
[8] Fix | Delete
#include "bitset.h" /* Sigh... */
[9] Fix | Delete
[10] Fix | Delete
/* A label of an arc */
[11] Fix | Delete
[12] Fix | Delete
typedef struct {
[13] Fix | Delete
int lb_type;
[14] Fix | Delete
char *lb_str;
[15] Fix | Delete
} label;
[16] Fix | Delete
[17] Fix | Delete
#define EMPTY 0 /* Label number 0 is by definition the empty label */
[18] Fix | Delete
[19] Fix | Delete
/* A list of labels */
[20] Fix | Delete
[21] Fix | Delete
typedef struct {
[22] Fix | Delete
int ll_nlabels;
[23] Fix | Delete
label *ll_label;
[24] Fix | Delete
} labellist;
[25] Fix | Delete
[26] Fix | Delete
/* An arc from one state to another */
[27] Fix | Delete
[28] Fix | Delete
typedef struct {
[29] Fix | Delete
short a_lbl; /* Label of this arc */
[30] Fix | Delete
short a_arrow; /* State where this arc goes to */
[31] Fix | Delete
} arc;
[32] Fix | Delete
[33] Fix | Delete
/* A state in a DFA */
[34] Fix | Delete
[35] Fix | Delete
typedef struct {
[36] Fix | Delete
int s_narcs;
[37] Fix | Delete
arc *s_arc; /* Array of arcs */
[38] Fix | Delete
[39] Fix | Delete
/* Optional accelerators */
[40] Fix | Delete
int s_lower; /* Lowest label index */
[41] Fix | Delete
int s_upper; /* Highest label index */
[42] Fix | Delete
int *s_accel; /* Accelerator */
[43] Fix | Delete
int s_accept; /* Nonzero for accepting state */
[44] Fix | Delete
} state;
[45] Fix | Delete
[46] Fix | Delete
/* A DFA */
[47] Fix | Delete
[48] Fix | Delete
typedef struct {
[49] Fix | Delete
int d_type; /* Non-terminal this represents */
[50] Fix | Delete
char *d_name; /* For printing */
[51] Fix | Delete
int d_initial; /* Initial state */
[52] Fix | Delete
int d_nstates;
[53] Fix | Delete
state *d_state; /* Array of states */
[54] Fix | Delete
bitset d_first;
[55] Fix | Delete
} dfa;
[56] Fix | Delete
[57] Fix | Delete
/* A grammar */
[58] Fix | Delete
[59] Fix | Delete
typedef struct {
[60] Fix | Delete
int g_ndfas;
[61] Fix | Delete
dfa *g_dfa; /* Array of DFAs */
[62] Fix | Delete
labellist g_ll;
[63] Fix | Delete
int g_start; /* Start symbol of the grammar */
[64] Fix | Delete
int g_accel; /* Set if accelerators present */
[65] Fix | Delete
} grammar;
[66] Fix | Delete
[67] Fix | Delete
/* FUNCTIONS */
[68] Fix | Delete
[69] Fix | Delete
grammar *newgrammar(int start);
[70] Fix | Delete
void freegrammar(grammar *g);
[71] Fix | Delete
dfa *adddfa(grammar *g, int type, const char *name);
[72] Fix | Delete
int addstate(dfa *d);
[73] Fix | Delete
void addarc(dfa *d, int from, int to, int lbl);
[74] Fix | Delete
dfa *PyGrammar_FindDFA(grammar *g, int type);
[75] Fix | Delete
[76] Fix | Delete
int addlabel(labellist *ll, int type, const char *str);
[77] Fix | Delete
int findlabel(labellist *ll, int type, const char *str);
[78] Fix | Delete
const char *PyGrammar_LabelRepr(label *lb);
[79] Fix | Delete
void translatelabels(grammar *g);
[80] Fix | Delete
[81] Fix | Delete
void addfirstsets(grammar *g);
[82] Fix | Delete
[83] Fix | Delete
void PyGrammar_AddAccelerators(grammar *g);
[84] Fix | Delete
void PyGrammar_RemoveAccelerators(grammar *);
[85] Fix | Delete
[86] Fix | Delete
void printgrammar(grammar *g, FILE *fp);
[87] Fix | Delete
void printnonterminals(grammar *g, FILE *fp);
[88] Fix | Delete
[89] Fix | Delete
#ifdef __cplusplus
[90] Fix | Delete
}
[91] Fix | Delete
#endif
[92] Fix | Delete
#endif /* !Py_GRAMMAR_H */
[93] Fix | Delete
[94] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function