deimos.python.grammar

Mirror grammar.h

Grammar interface

Members

Functions

PyGrammar_AddAccelerators
void PyGrammar_AddAccelerators(grammar* g)

_

PyGrammar_FindDFA
dfa* PyGrammar_FindDFA(grammar* g, int type)

_

PyGrammar_LabelRepr
char* PyGrammar_LabelRepr(label* lb)

_

PyGrammar_RemoveAccelerators
void PyGrammar_RemoveAccelerators(grammar* )

_

addarc
void addarc(dfa* d, int from, int to, int lbl)

_

adddfa
dfa* adddfa(grammar* g, int type, char* name)

_

addfirstsets
void addfirstsets(grammar* g)

_

addlabel
int addlabel(labellist* ll, int type, char* str)

_

addstate
int addstate(dfa* d)

_

findlabel
int findlabel(labellist* ll, int type, char* str)

_

newgrammar
grammar* newgrammar(int start)

_

printgrammar
void printgrammar(grammar* g, FILE* fp)

_

printnonterminals
void printnonterminals(grammar* g, FILE* fp)

_

translatelabels
void translatelabels(grammar* g)

_

Manifest constants

EMPTY
enum EMPTY;

Label number 0 is by definition the empty label

Structs

arc
struct arc

An arc from one state to another

dfa
struct dfa

A DFA

grammar
struct grammar

A grammar

label
struct label

A label of an arc

labellist
struct labellist

A list of labels

state
struct state

A state in a DFA

Meta