PATH:
usr
/
include
/
python2.7
/* Grammar interface */ #ifndef Py_GRAMMAR_H #define Py_GRAMMAR_H #ifdef __cplusplus extern "C" { #endif #include "bitset.h" /* Sigh... */ /* A label of an arc */ typedef struct { int lb_type; char *lb_str; } label; #define EMPTY 0 /* Label number 0 is by definition the empty label */ /* A list of labels */ typedef struct { int ll_nlabels; label *ll_label; } labellist; /* An arc from one state to another */ typedef struct { short a_lbl; /* Label of this arc */ short a_arrow; /* State where this arc goes to */ } arc; /* A state in a DFA */ typedef struct { int s_narcs; arc *s_arc; /* Array of arcs */ /* Optional accelerators */ int s_lower; /* Lowest label index */ int s_upper; /* Highest label index */ int *s_accel; /* Accelerator */ int s_accept; /* Nonzero for accepting state */ } state; /* A DFA */ typedef struct { int d_type; /* Non-terminal this represents */ char *d_name; /* For printing */ int d_initial; /* Initial state */ int d_nstates; state *d_state; /* Array of states */ bitset d_first; } dfa; /* A grammar */ typedef struct { int g_ndfas; dfa *g_dfa; /* Array of DFAs */ labellist g_ll; int g_start; /* Start symbol of the grammar */ int g_accel; /* Set if accelerators present */ } grammar; /* FUNCTIONS */ grammar *newgrammar(int start); dfa *adddfa(grammar *g, int type, char *name); int addstate(dfa *d); void addarc(dfa *d, int from, int to, int lbl); dfa *PyGrammar_FindDFA(grammar *g, int type); int addlabel(labellist *ll, int type, char *str); int findlabel(labellist *ll, int type, char *str); char *PyGrammar_LabelRepr(label *lb); void translatelabels(grammar *g); void addfirstsets(grammar *g); void PyGrammar_AddAccelerators(grammar *g); void PyGrammar_RemoveAccelerators(grammar *); void printgrammar(grammar *g, FILE *fp); void printnonterminals(grammar *g, FILE *fp); #ifdef __cplusplus } #endif #endif /* !Py_GRAMMAR_H */
[-] timefuncs.h
[edit]
[-] pystate.h
[edit]
[-] pyexpat.h
[edit]
[-] rangeobject.h
[edit]
[-] eval.h
[edit]
[-] funcobject.h
[edit]
[-] pyfpe.h
[edit]
[-] intrcheck.h
[edit]
[-] pyport.h
[edit]
[-] pythread.h
[edit]
[-] longintrepr.h
[edit]
[-] ceval.h
[edit]
[-] dictobject.h
[edit]
[-] bytesobject.h
[edit]
[-] ast.h
[edit]
[-] object.h
[edit]
[-] modsupport.h
[edit]
[-] floatobject.h
[edit]
[-] enumobject.h
[edit]
[-] cobject.h
[edit]
[-] grammar.h
[edit]
[-] pystrcmp.h
[edit]
[+]
..
[-] pymath.h
[edit]
[-] objimpl.h
[edit]
[-] opcode.h
[edit]
[-] pycapsule.h
[edit]
[-] warnings.h
[edit]
[-] symtable.h
[edit]
[-] dtoa.h
[edit]
[-] longobject.h
[edit]
[-] classobject.h
[edit]
[-] pyconfig-64.h
[edit]
[-] import.h
[edit]
[-] boolobject.h
[edit]
[-] code.h
[edit]
[-] bytes_methods.h
[edit]
[-] pyerrors.h
[edit]
[-] pymactoolbox.h
[edit]
[-] datetime.h
[edit]
[-] traceback.h
[edit]
[-] structmember.h
[edit]
[-] marshal.h
[edit]
[-] osdefs.h
[edit]
[-] fileobject.h
[edit]
[-] genobject.h
[edit]
[-] pyconfig.h
[edit]
[-] pythonrun.h
[edit]
[-] parsetok.h
[edit]
[-] complexobject.h
[edit]
[-] frameobject.h
[edit]
[-] abstract.h
[edit]
[-] descrobject.h
[edit]
[-] sliceobject.h
[edit]
[-] iterobject.h
[edit]
[-] unicodeobject.h
[edit]
[-] metagrammar.h
[edit]
[-] cellobject.h
[edit]
[-] methodobject.h
[edit]
[-] tupleobject.h
[edit]
[-] pgen.h
[edit]
[-] pyctype.h
[edit]
[-] moduleobject.h
[edit]
[-] Python-ast.h
[edit]
[-] pgenheaders.h
[edit]
[-] patchlevel.h
[edit]
[-] errcode.h
[edit]
[-] bitset.h
[edit]
[-] py_curses.h
[edit]
[-] weakrefobject.h
[edit]
[-] intobject.h
[edit]
[-] pymacconfig.h
[edit]
[-] pystrtod.h
[edit]
[-] compile.h
[edit]
[-] listobject.h
[edit]
[-] node.h
[edit]
[-] graminit.h
[edit]
[-] bytearrayobject.h
[edit]
[-] bufferobject.h
[edit]
[-] cStringIO.h
[edit]
[-] stringobject.h
[edit]
[-] memoryobject.h
[edit]
[-] sysmodule.h
[edit]
[-] pygetopt.h
[edit]
[-] pymem.h
[edit]
[-] codecs.h
[edit]
[-] asdl.h
[edit]
[-] structseq.h
[edit]
[-] pydebug.h
[edit]
[-] token.h
[edit]
[-] Python.h
[edit]
[-] pyarena.h
[edit]
[-] setobject.h
[edit]
[-] ucnhash.h
[edit]