ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

parserInternals.h
Go to the documentation of this file.
00001 /*
00002  * Summary: internals routines exported by the parser.
00003  * Description: this module exports a number of internal parsing routines
00004  *              they are not really all intended for applications but
00005  *              can prove useful doing low level processing.
00006  *
00007  * Copy: See Copyright for the status of this software.
00008  *
00009  * Author: Daniel Veillard
00010  */
00011 
00012 #ifndef __XML_PARSER_INTERNALS_H__
00013 #define __XML_PARSER_INTERNALS_H__
00014 
00015 #include <libxml/xmlversion.h>
00016 #include <libxml/parser.h>
00017 #include <libxml/HTMLparser.h>
00018 #include <libxml/chvalid.h>
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00031 XMLPUBVAR unsigned int xmlParserMaxDepth;
00032 
00040 #define XML_MAX_TEXT_LENGTH 10000000
00041 
00048 #define XML_MAX_NAMELEN 100
00049 
00056 #define INPUT_CHUNK 250
00057 
00058 /************************************************************************
00059  *                                  *
00060  * UNICODE version of the macros.                       *
00061  *                                  *
00062  ************************************************************************/
00072 #define IS_BYTE_CHAR(c)  xmlIsChar_ch(c)
00073 
00084 #define IS_CHAR(c)   xmlIsCharQ(c)
00085 
00092 #define IS_CHAR_CH(c)  xmlIsChar_ch(c)
00093 
00102 #define IS_BLANK(c)  xmlIsBlankQ(c)
00103 
00110 #define IS_BLANK_CH(c)  xmlIsBlank_ch(c)
00111 
00120 #define IS_BASECHAR(c) xmlIsBaseCharQ(c)
00121 
00130 #define IS_DIGIT(c) xmlIsDigitQ(c)
00131 
00138 #define IS_DIGIT_CH(c)  xmlIsDigit_ch(c)
00139 
00148 #define IS_COMBINING(c) xmlIsCombiningQ(c)
00149 
00156 #define IS_COMBINING_CH(c) 0 
00157 
00169 #define IS_EXTENDER(c) xmlIsExtenderQ(c)
00170 
00177 #define IS_EXTENDER_CH(c)  xmlIsExtender_ch(c)
00178 
00188 #define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
00189 
00199 #define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
00200 
00208 #define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
00209 
00217 #define IS_ASCII_LETTER(c)  (((0x41 <= (c)) && ((c) <= 0x5a)) || \
00218                  ((0x61 <= (c)) && ((c) <= 0x7a)))
00219 
00227 #define IS_ASCII_DIGIT(c)   ((0x30 <= (c)) && ((c) <= 0x39))
00228 
00238 #define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
00239 
00246 #define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
00247 
00254 #define SKIP_EOL(p)                             \
00255     if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; }          \
00256     if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
00257 
00264 #define MOVETO_ENDTAG(p)                        \
00265     while ((*p) && (*(p) != '>')) (p)++
00266 
00273 #define MOVETO_STARTTAG(p)                      \
00274     while ((*p) && (*(p) != '<')) (p)++
00275 
00279 XMLPUBVAR const xmlChar xmlStringText[];
00280 XMLPUBVAR const xmlChar xmlStringTextNoenc[];
00281 XMLPUBVAR const xmlChar xmlStringComment[];
00282 
00283 /*
00284  * Function to finish the work of the macros where needed.
00285  */
00286 XMLPUBFUN int XMLCALL                   xmlIsLetter     (int c);
00287 
00291 XMLPUBFUN xmlParserCtxtPtr XMLCALL  
00292             xmlCreateFileParserCtxt (const char *filename);
00293 XMLPUBFUN xmlParserCtxtPtr XMLCALL  
00294             xmlCreateURLParserCtxt  (const char *filename,
00295                          int options);
00296 XMLPUBFUN xmlParserCtxtPtr XMLCALL  
00297             xmlCreateMemoryParserCtxt(const char *buffer,
00298                          int size);
00299 XMLPUBFUN xmlParserCtxtPtr XMLCALL  
00300             xmlCreateEntityParserCtxt(const xmlChar *URL,
00301                          const xmlChar *ID,
00302                          const xmlChar *base);
00303 XMLPUBFUN int XMLCALL           
00304             xmlSwitchEncoding   (xmlParserCtxtPtr ctxt,
00305                          xmlCharEncoding enc);
00306 XMLPUBFUN int XMLCALL           
00307             xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
00308                      xmlCharEncodingHandlerPtr handler);
00309 XMLPUBFUN int XMLCALL           
00310             xmlSwitchInputEncoding  (xmlParserCtxtPtr ctxt,
00311                          xmlParserInputPtr input,
00312                      xmlCharEncodingHandlerPtr handler);
00313 
00314 #ifdef IN_LIBXML
00315 /* internal error reporting */
00316 XMLPUBFUN void XMLCALL
00317             __xmlErrEncoding    (xmlParserCtxtPtr ctxt,
00318                          xmlParserErrors xmlerr,
00319                          const char *msg,
00320                          const xmlChar * str1,
00321                          const xmlChar * str2);
00322 #endif
00323 
00327 XMLPUBFUN xmlParserInputPtr XMLCALL 
00328             xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
00329                          const xmlChar *buffer);
00330 XMLPUBFUN xmlParserInputPtr XMLCALL 
00331             xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
00332                          xmlEntityPtr entity);
00333 XMLPUBFUN int XMLCALL           
00334             xmlPushInput        (xmlParserCtxtPtr ctxt,
00335                          xmlParserInputPtr input);
00336 XMLPUBFUN xmlChar XMLCALL           
00337             xmlPopInput     (xmlParserCtxtPtr ctxt);
00338 XMLPUBFUN void XMLCALL          
00339             xmlFreeInputStream  (xmlParserInputPtr input);
00340 XMLPUBFUN xmlParserInputPtr XMLCALL 
00341             xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
00342                          const char *filename);
00343 XMLPUBFUN xmlParserInputPtr XMLCALL 
00344             xmlNewInputStream   (xmlParserCtxtPtr ctxt);
00345 
00349 XMLPUBFUN xmlChar * XMLCALL     
00350             xmlSplitQName       (xmlParserCtxtPtr ctxt,
00351                          const xmlChar *name,
00352                          xmlChar **prefix);
00353 
00357 XMLPUBFUN const xmlChar * XMLCALL       
00358             xmlParseName        (xmlParserCtxtPtr ctxt);
00359 XMLPUBFUN xmlChar * XMLCALL     
00360             xmlParseNmtoken     (xmlParserCtxtPtr ctxt);
00361 XMLPUBFUN xmlChar * XMLCALL     
00362             xmlParseEntityValue (xmlParserCtxtPtr ctxt,
00363                          xmlChar **orig);
00364 XMLPUBFUN xmlChar * XMLCALL     
00365             xmlParseAttValue    (xmlParserCtxtPtr ctxt);
00366 XMLPUBFUN xmlChar * XMLCALL     
00367             xmlParseSystemLiteral   (xmlParserCtxtPtr ctxt);
00368 XMLPUBFUN xmlChar * XMLCALL     
00369             xmlParsePubidLiteral    (xmlParserCtxtPtr ctxt);
00370 XMLPUBFUN void XMLCALL          
00371             xmlParseCharData    (xmlParserCtxtPtr ctxt,
00372                          int cdata);
00373 XMLPUBFUN xmlChar * XMLCALL     
00374             xmlParseExternalID  (xmlParserCtxtPtr ctxt,
00375                          xmlChar **publicID,
00376                          int strict);
00377 XMLPUBFUN void XMLCALL          
00378             xmlParseComment     (xmlParserCtxtPtr ctxt);
00379 XMLPUBFUN const xmlChar * XMLCALL       
00380             xmlParsePITarget    (xmlParserCtxtPtr ctxt);
00381 XMLPUBFUN void XMLCALL          
00382             xmlParsePI      (xmlParserCtxtPtr ctxt);
00383 XMLPUBFUN void XMLCALL          
00384             xmlParseNotationDecl    (xmlParserCtxtPtr ctxt);
00385 XMLPUBFUN void XMLCALL          
00386             xmlParseEntityDecl  (xmlParserCtxtPtr ctxt);
00387 XMLPUBFUN int XMLCALL           
00388             xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
00389                          xmlChar **value);
00390 XMLPUBFUN xmlEnumerationPtr XMLCALL 
00391             xmlParseNotationType    (xmlParserCtxtPtr ctxt);
00392 XMLPUBFUN xmlEnumerationPtr XMLCALL 
00393             xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
00394 XMLPUBFUN int XMLCALL           
00395             xmlParseEnumeratedType  (xmlParserCtxtPtr ctxt,
00396                          xmlEnumerationPtr *tree);
00397 XMLPUBFUN int XMLCALL           
00398             xmlParseAttributeType   (xmlParserCtxtPtr ctxt,
00399                          xmlEnumerationPtr *tree);
00400 XMLPUBFUN void XMLCALL          
00401             xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
00402 XMLPUBFUN xmlElementContentPtr XMLCALL  
00403             xmlParseElementMixedContentDecl
00404                         (xmlParserCtxtPtr ctxt,
00405                          int inputchk);
00406 XMLPUBFUN xmlElementContentPtr XMLCALL  
00407             xmlParseElementChildrenContentDecl
00408                         (xmlParserCtxtPtr ctxt,
00409                          int inputchk);
00410 XMLPUBFUN int XMLCALL           
00411             xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
00412                          const xmlChar *name,
00413                          xmlElementContentPtr *result);
00414 XMLPUBFUN int XMLCALL           
00415             xmlParseElementDecl (xmlParserCtxtPtr ctxt);
00416 XMLPUBFUN void XMLCALL          
00417             xmlParseMarkupDecl  (xmlParserCtxtPtr ctxt);
00418 XMLPUBFUN int XMLCALL           
00419             xmlParseCharRef     (xmlParserCtxtPtr ctxt);
00420 XMLPUBFUN xmlEntityPtr XMLCALL      
00421             xmlParseEntityRef   (xmlParserCtxtPtr ctxt);
00422 XMLPUBFUN void XMLCALL          
00423             xmlParseReference   (xmlParserCtxtPtr ctxt);
00424 XMLPUBFUN void XMLCALL          
00425             xmlParsePEReference (xmlParserCtxtPtr ctxt);
00426 XMLPUBFUN void XMLCALL          
00427             xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
00428 #ifdef LIBXML_SAX1_ENABLED
00429 XMLPUBFUN const xmlChar * XMLCALL       
00430             xmlParseAttribute   (xmlParserCtxtPtr ctxt,
00431                          xmlChar **value);
00432 XMLPUBFUN const xmlChar * XMLCALL       
00433             xmlParseStartTag    (xmlParserCtxtPtr ctxt);
00434 XMLPUBFUN void XMLCALL          
00435             xmlParseEndTag      (xmlParserCtxtPtr ctxt);
00436 #endif /* LIBXML_SAX1_ENABLED */
00437 XMLPUBFUN void XMLCALL          
00438             xmlParseCDSect      (xmlParserCtxtPtr ctxt);
00439 XMLPUBFUN void XMLCALL          
00440             xmlParseContent     (xmlParserCtxtPtr ctxt);
00441 XMLPUBFUN void XMLCALL          
00442             xmlParseElement     (xmlParserCtxtPtr ctxt);
00443 XMLPUBFUN xmlChar * XMLCALL     
00444             xmlParseVersionNum  (xmlParserCtxtPtr ctxt);
00445 XMLPUBFUN xmlChar * XMLCALL     
00446             xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
00447 XMLPUBFUN xmlChar * XMLCALL     
00448             xmlParseEncName     (xmlParserCtxtPtr ctxt);
00449 XMLPUBFUN const xmlChar * XMLCALL       
00450             xmlParseEncodingDecl    (xmlParserCtxtPtr ctxt);
00451 XMLPUBFUN int XMLCALL           
00452             xmlParseSDDecl      (xmlParserCtxtPtr ctxt);
00453 XMLPUBFUN void XMLCALL          
00454             xmlParseXMLDecl     (xmlParserCtxtPtr ctxt);
00455 XMLPUBFUN void XMLCALL          
00456             xmlParseTextDecl    (xmlParserCtxtPtr ctxt);
00457 XMLPUBFUN void XMLCALL          
00458             xmlParseMisc        (xmlParserCtxtPtr ctxt);
00459 XMLPUBFUN void XMLCALL          
00460             xmlParseExternalSubset  (xmlParserCtxtPtr ctxt,
00461                          const xmlChar *ExternalID,
00462                          const xmlChar *SystemID); 
00468 #define XML_SUBSTITUTE_NONE 0
00469 
00474 #define XML_SUBSTITUTE_REF  1
00475 
00480 #define XML_SUBSTITUTE_PEREF    2
00481 
00486 #define XML_SUBSTITUTE_BOTH     3
00487 
00488 XMLPUBFUN xmlChar * XMLCALL
00489         xmlStringDecodeEntities     (xmlParserCtxtPtr ctxt,
00490                          const xmlChar *str,
00491                          int what,
00492                          xmlChar end,
00493                          xmlChar  end2,
00494                          xmlChar end3);
00495 XMLPUBFUN xmlChar * XMLCALL
00496         xmlStringLenDecodeEntities  (xmlParserCtxtPtr ctxt,
00497                          const xmlChar *str,
00498                          int len,
00499                          int what,
00500                          xmlChar end,
00501                          xmlChar  end2,
00502                          xmlChar end3);
00503 
00504 /*
00505  * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
00506  */
00507 XMLPUBFUN int XMLCALL           nodePush        (xmlParserCtxtPtr ctxt,
00508                          xmlNodePtr value);
00509 XMLPUBFUN xmlNodePtr XMLCALL        nodePop         (xmlParserCtxtPtr ctxt);
00510 XMLPUBFUN int XMLCALL           inputPush       (xmlParserCtxtPtr ctxt,
00511                          xmlParserInputPtr value);
00512 XMLPUBFUN xmlParserInputPtr XMLCALL inputPop        (xmlParserCtxtPtr ctxt);
00513 XMLPUBFUN const xmlChar * XMLCALL   namePop         (xmlParserCtxtPtr ctxt);
00514 XMLPUBFUN int XMLCALL           namePush        (xmlParserCtxtPtr ctxt,
00515                          const xmlChar *value);
00516 
00517 /*
00518  * other commodities shared between parser.c and parserInternals.
00519  */
00520 XMLPUBFUN int XMLCALL           xmlSkipBlankChars   (xmlParserCtxtPtr ctxt);
00521 XMLPUBFUN int XMLCALL           xmlStringCurrentChar    (xmlParserCtxtPtr ctxt,
00522                          const xmlChar *cur,
00523                          int *len);
00524 XMLPUBFUN void XMLCALL          xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
00525 XMLPUBFUN int XMLCALL           xmlCheckLanguageID  (const xmlChar *lang);
00526 
00527 /*
00528  * Really core function shared with HTML parser.
00529  */
00530 XMLPUBFUN int XMLCALL           xmlCurrentChar      (xmlParserCtxtPtr ctxt,
00531                          int *len);
00532 XMLPUBFUN int XMLCALL       xmlCopyCharMultiByte    (xmlChar *out,
00533                          int val);
00534 XMLPUBFUN int XMLCALL           xmlCopyChar     (int len,
00535                          xmlChar *out,
00536                          int val);
00537 XMLPUBFUN void XMLCALL          xmlNextChar     (xmlParserCtxtPtr ctxt);
00538 XMLPUBFUN void XMLCALL          xmlParserInputShrink    (xmlParserInputPtr in);
00539 
00540 #ifdef LIBXML_HTML_ENABLED
00541 /*
00542  * Actually comes from the HTML parser but launched from the init stuff.
00543  */
00544 XMLPUBFUN void XMLCALL          htmlInitAutoClose   (void);
00545 XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
00546                                              const char *encoding);
00547 #endif
00548 
00549 /*
00550  * Specific function to keep track of entities references
00551  * and used by the XSLT debugger.
00552  */
00553 #ifdef LIBXML_LEGACY_ENABLED
00554 
00563 typedef void    (*xmlEntityReferenceFunc)   (xmlEntityPtr ent,
00564                          xmlNodePtr firstNode,
00565                          xmlNodePtr lastNode);
00566   
00567 XMLPUBFUN void XMLCALL      xmlSetEntityReferenceFunc   (xmlEntityReferenceFunc func);
00568 
00569 XMLPUBFUN xmlChar * XMLCALL     
00570             xmlParseQuotedString    (xmlParserCtxtPtr ctxt);
00571 XMLPUBFUN void XMLCALL
00572                         xmlParseNamespace       (xmlParserCtxtPtr ctxt);
00573 XMLPUBFUN xmlChar * XMLCALL     
00574             xmlNamespaceParseNSDef  (xmlParserCtxtPtr ctxt);
00575 XMLPUBFUN xmlChar * XMLCALL     
00576             xmlScanName     (xmlParserCtxtPtr ctxt);
00577 XMLPUBFUN xmlChar * XMLCALL     
00578             xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
00579 XMLPUBFUN void XMLCALL  xmlParserHandleReference(xmlParserCtxtPtr ctxt);
00580 XMLPUBFUN xmlChar * XMLCALL     
00581             xmlNamespaceParseQName  (xmlParserCtxtPtr ctxt,
00582                          xmlChar **prefix);
00586 XMLPUBFUN xmlChar * XMLCALL
00587         xmlDecodeEntities       (xmlParserCtxtPtr ctxt,
00588                          int len,
00589                          int what,
00590                          xmlChar end,
00591                          xmlChar  end2,
00592                          xmlChar end3);
00593 XMLPUBFUN void XMLCALL          
00594             xmlHandleEntity     (xmlParserCtxtPtr ctxt,
00595                          xmlEntityPtr entity);
00596 
00597 #endif /* LIBXML_LEGACY_ENABLED */
00598 
00599 #ifdef IN_LIBXML
00600 /*
00601  * internal only
00602  */
00603 XMLPUBFUN void XMLCALL
00604     xmlErrMemory        (xmlParserCtxtPtr ctxt,
00605                  const char *extra);
00606 #endif
00607 
00608 #ifdef __cplusplus
00609 }
00610 #endif
00611 #endif /* __XML_PARSER_INTERNALS_H__ */

Generated on Sun May 27 2012 04:33:14 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.