SourceForge.net Logo

token.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2007 Doxological Ltd.
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef __FAXPP__TOKEN_H
00018 #define __FAXPP__TOKEN_H
00019 
00020 #include "text.h"
00021 
00023 typedef enum {
00024   NO_TOKEN  = 0,
00025 
00026   XML_DECL_VERSION_TOKEN,
00027   XML_DECL_ENCODING_TOKEN,
00028   XML_DECL_STANDALONE_TOKEN,
00029   XML_DECL_END_TOKEN,
00030 
00031   START_ELEMENT_PREFIX_TOKEN,
00032   START_ELEMENT_NAME_TOKEN,
00033   START_ELEMENT_END_TOKEN,
00034   SELF_CLOSING_ELEMENT_TOKEN,
00035 
00036   XMLNS_PREFIX_TOKEN,
00037   XMLNS_NAME_TOKEN,
00038 
00039   XML_PREFIX_TOKEN,
00040 
00041   ATTRIBUTE_PREFIX_TOKEN,
00042   ATTRIBUTE_NAME_TOKEN,
00043   ATTRIBUTE_VALUE_TOKEN,
00044 
00045   END_ELEMENT_PREFIX_TOKEN,
00046   END_ELEMENT_NAME_TOKEN,
00047 
00048   CHARACTERS_TOKEN,
00049   CDATA_TOKEN,
00050   IGNORABLE_WHITESPACE_TOKEN,
00051 
00052   COMMENT_TOKEN,
00053 
00054   PI_NAME_TOKEN,
00055   PI_VALUE_TOKEN,
00056 
00057   AMP_ENTITY_REFERENCE_TOKEN,
00058   APOS_ENTITY_REFERENCE_TOKEN,
00059   GT_ENTITY_REFERENCE_TOKEN,
00060   LT_ENTITY_REFERENCE_TOKEN,
00061   QUOT_ENTITY_REFERENCE_TOKEN,
00062 
00063   ENTITY_REFERENCE_TOKEN,
00064   DEC_CHAR_REFERENCE_TOKEN,
00065   HEX_CHAR_REFERENCE_TOKEN,
00066   PE_REFERENCE_TOKEN,
00067   PE_REFERENCE_IN_MARKUP_TOKEN,
00068 
00069   DOCTYPE_PREFIX_TOKEN,
00070   DOCTYPE_NAME_TOKEN,
00071   DOCTYPE_END_TOKEN,
00072 
00073   SYSTEM_LITERAL_TOKEN,
00074   PUBID_LITERAL_TOKEN,
00075   NDATA_NAME_TOKEN,
00076 
00077   ELEMENTDECL_PREFIX_TOKEN,
00078   ELEMENTDECL_NAME_TOKEN,
00079   ELEMENTDECL_EMPTY_TOKEN,
00080   ELEMENTDECL_ANY_TOKEN,
00081   ELEMENTDECL_PCDATA_TOKEN,
00082   ELEMENTDECL_LPAR_TOKEN,
00083   ELEMENTDECL_RPAR_TOKEN,
00084   ELEMENTDECL_QUESTION_TOKEN,
00085   ELEMENTDECL_STAR_TOKEN,
00086   ELEMENTDECL_PLUS_TOKEN,
00087   ELEMENTDECL_BAR_TOKEN,
00088   ELEMENTDECL_COMMA_TOKEN,
00089   ELEMENTDECL_END_TOKEN,
00090 
00091   ATTLISTDECL_PREFIX_TOKEN,
00092   ATTLISTDECL_NAME_TOKEN,
00093   ATTLISTDECL_ATTDEF_PREFIX_TOKEN,
00094   ATTLISTDECL_ATTDEF_NAME_TOKEN,
00095   ATTLISTDECL_ATTTYPE_ENTITY_TOKEN,
00096   ATTLISTDECL_ATTTYPE_ENTITIES_TOKEN,
00097   ATTLISTDECL_ATTTYPE_NMTOKEN_TOKEN,
00098   ATTLISTDECL_ATTTYPE_NMTOKENS_TOKEN,
00099   ATTLISTDECL_ATTTYPE_ID_TOKEN,
00100   ATTLISTDECL_ATTTYPE_IDREF_TOKEN,
00101   ATTLISTDECL_ATTTYPE_IDREFS_TOKEN,
00102   ATTLISTDECL_ATTTYPE_CDATA_TOKEN,
00103   ATTLISTDECL_NOTATION_NAME_TOKEN,
00104   ATTLISTDECL_ENUMERATION_NAME_TOKEN,
00105   ATTLISTDECL_DEFAULT_IMPLIED_TOKEN,
00106   ATTLISTDECL_DEFAULT_REQUIRED_TOKEN,
00107   ATTLISTDECL_DEFAULT_FIXED_TOKEN,
00108   ATTLISTDECL_END_TOKEN,
00109 
00110   NOTATIONDECL_NAME_TOKEN,
00111   NOTATIONDECL_END_TOKEN,
00112 
00113   ENTITYDECL_NAME_TOKEN,
00114   ENTITYDECL_VALUE_TOKEN,
00115   ENTITYDECL_END_TOKEN,
00116   PARAMENTITYDECL_NAME_TOKEN,
00117 
00118   END_OF_BUFFER_TOKEN = 99
00119 } FAXPP_TokenType;
00120 
00122 typedef struct {
00123   FAXPP_TokenType type; 
00124   FAXPP_Text value;     
00125   unsigned int line;    
00126   unsigned int column;  
00127 } FAXPP_Token;
00128 
00136 const char *FAXPP_token_to_string(const FAXPP_TokenType type);
00137 
00138 #endif

Generated on Thu Mar 20 02:12:09 2008 for Faxpp by  doxygen 1.5.1