exip
Alpha 0.5.4
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
src
grammar
include
grammars.h
Go to the documentation of this file.
1
/*==================================================================*\
2
| EXIP - Embeddable EXI Processor in C |
3
|--------------------------------------------------------------------|
4
| This work is licensed under BSD 3-Clause License |
5
| The full license terms and conditions are located in LICENSE.txt |
6
\===================================================================*/
7
17
#ifndef GRAMMARS_H_
18
#define GRAMMARS_H_
19
20
#include "errorHandle.h"
21
#include "procTypes.h"
22
#include "contentHandler.h"
23
24
// Defines the initial dimension of the dynamic array - production
25
#define DEFAULT_PROD_ARRAY_DIM 10
26
32
#define GET_ELEM_GRAMMAR_QNAMEID(schema, qnameID) GET_LN_URI_QNAME((schema)->uriTable, qnameID).elemGrammar == INDEX_MAX?NULL:&((schema)->grammarTable.grammar[GET_LN_URI_QNAME((schema)->uriTable, qnameID).elemGrammar])
33
39
#define GET_TYPE_GRAMMAR_QNAMEID(schema, qnameID) GET_LN_URI_QNAME((schema)->uriTable, qnameID).typeGrammar == INDEX_MAX?NULL:&((schema)->grammarTable.grammar[GET_LN_URI_QNAME((schema)->uriTable, qnameID).typeGrammar])
40
49
errorCode
pushGrammar
(
EXIGrammarStack
** gStack,
QNameID
currQNameID
,
EXIGrammar
*
grammar
);
50
56
void
popGrammar
(
EXIGrammarStack
** gStack);
57
69
errorCode
createDocGrammar
(
EXIPSchema
* schema,
QNameID
* elQnameArr,
Index
qnameCount);
70
82
errorCode
createFragmentGrammar
(
EXIPSchema
* schema,
QNameID
* elQnameArr,
Index
qnameCount);
83
84
#if BUILD_IN_GRAMMARS_USE
85
92
errorCode
createBuiltInElementGrammar(
EXIGrammar
* elementGrammar,
EXIStream
* strm);
93
107
errorCode
insertZeroProduction(
DynGrammarRule
* rule,
EventType
evnt,
SmallIndex
nonTermID,
QNameID
* qname,
boolean
hasSecondLevelProd);
108
#endif
109
117
unsigned
int
getBitsFirstPartCode
(
EXIStream
* strm,
Index
prodCount,
SmallIndex
currentRuleIndx);
118
119
#if EXIP_DEBUG == ON
120
128
errorCode
printGrammarRule
(
SmallIndex
nonTermID,
GrammarRule
* rule,
EXIPSchema
*schema);
129
130
#endif // EXIP_DEBUG
131
132
#endif
/* GRAMMARS_H_ */
Generated on Thu Nov 27 2014 10:56:08 for exip by
1.8.4