exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions
protoGrammars.h File Reference

Definitions and utility functions for EXI Proto-Grammars. More...

#include "procTypes.h"

Go to the source code of this file.

Data Structures

struct  ProtoRuleEntry
 Productions in a rule with the same number of parts in their event codes. More...
 
struct  ProtoGrammar
 
struct  ProtoGrammarArray
 

Typedefs

typedef struct ProtoRuleEntry ProtoRuleEntry
 
typedef struct ProtoGrammar ProtoGrammar
 
typedef struct ProtoGrammarArray ProtoGrammarArray
 

Functions

errorCode createProtoGrammar (Index rulesDim, ProtoGrammar *pg)
 Creates and allocates memory for new proto grammar. More...
 
void destroyProtoGrammar (ProtoGrammar *pg)
 Frees the allocated memory for a proto grammar. More...
 
errorCode addProtoRule (ProtoGrammar *pg, Index prodDim, ProtoRuleEntry **ruleEntry)
 Add an empty rule to a proto grammar. More...
 
errorCode addProduction (ProtoRuleEntry *ruleEntry, EventType eventType, Index typeId, QNameID qnameID, SmallIndex nonTermID)
 Add a production to a particular proto rule. More...
 
errorCode convertProtoGrammar (AllocList *memlist, ProtoGrammar *pg, EXIGrammar *exiGrammar)
 Create a new EXI grammar from existing proto grammar. More...
 
errorCode cloneProtoGrammar (ProtoGrammar *src, ProtoGrammar *dest)
 Clones a proto grammar instance. More...
 
errorCode printProtoGrammarRule (SmallIndex nonTermID, ProtoRuleEntry *rule)
 
errorCode printProtoGrammar (ProtoGrammar *pgr)
 

Detailed Description

Date
May 11, 2011
Author
Rumen Kyusakov
Version
0.5
[Revision] $Id$

Definition in file protoGrammars.h.

Typedef Documentation

typedef struct ProtoGrammar ProtoGrammar

Definition at line 49 of file protoGrammars.h.

Definition at line 60 of file protoGrammars.h.

Definition at line 34 of file protoGrammars.h.

Function Documentation

errorCode addProduction ( ProtoRuleEntry ruleEntry,
EventType  eventType,
Index  typeId,
QNameID  qnameID,
SmallIndex  nonTermID 
)
Parameters
[in,out]ruleEntrythe rule to which the production is added
[in]eventTypeevent type of the production
[in]typeIdindex of the type of the production in the simple type table
[in]qnameIDqnameId of the production
[in]nonTermIDof the production
Returns
Error handling code

Definition at line 42 of file protoGrammars.c.

errorCode addProtoRule ( ProtoGrammar pg,
Index  prodDim,
ProtoRuleEntry **  ruleEntry 
)
Parameters
[in,out]pgthe proto grammar
[in]prodDiminitial number of productions in the rule
[in]ruleEntrypointer to the rule entry
Returns
Error handling code

Definition at line 32 of file protoGrammars.c.

errorCode cloneProtoGrammar ( ProtoGrammar src,
ProtoGrammar dest 
)
Parameters
[in]srcthe source proto-grammar
[out]desta pointer to the newly created proto grammar
Returns
Error handling code

Definition at line 103 of file protoGrammars.c.

errorCode convertProtoGrammar ( AllocList memlist,
ProtoGrammar pg,
EXIGrammar exiGrammar 
)
Parameters
[in,out]memlistA list storing the memory allocations for the new EXI grammar
[in]pgthe source proto-grammar
[out]exiGrammara pointer to the newly created EXI grammar
Returns
Error handling code

Definition at line 58 of file protoGrammars.c.

errorCode createProtoGrammar ( Index  rulesDim,
ProtoGrammar pg 
)
Parameters
[in]rulesDiminitial number of the rules in the protogrammar
[out]pgan empty proto-grammar
Returns
Error handling code

Definition at line 25 of file protoGrammars.c.

void destroyProtoGrammar ( ProtoGrammar pg)
Parameters
[out]pgthe proto-grammar to be removed

Definition at line 127 of file protoGrammars.c.

errorCode printProtoGrammar ( ProtoGrammar pgr)

Definition at line 220 of file protoGrammars.c.

errorCode printProtoGrammarRule ( SmallIndex  nonTermID,
ProtoRuleEntry rule 
)

Definition at line 139 of file protoGrammars.c.