1 #ifndef __PARSER_H__
2 #define __PARSER_H__
3 
4 /* parser.h -- HTML Parser
5 
6   (c) 1998-2007 (W3C) MIT, ERCIM, Keio University
7   See tidy.h for the copyright notice.
8 
9   CVS Info :
10 
11     $Author: arnaud02 $
12     $Date: 2007/05/30 16:47:31 $
13     $Revision: 1.14 $
14 
15 */
16 
17 #include "forward.h"
18 
19 Bool TY_(CheckNodeIntegrity)(Node *node);
20 
21 Bool TY_(TextNodeEndWithSpace)( Lexer *lexer, Node *node );
22 
23 /*
24  used to determine how attributes
25  without values should be printed
26  this was introduced to deal with
27  user defined tags e.g. Cold Fusion
28 */
29 Bool TY_(IsNewNode)(Node *node);
30 
31 void TY_(CoerceNode)(TidyDocImpl* doc, Node *node, TidyTagId tid, Bool obsolete, Bool expected);
32 
33 /* extract a node and its children from a markup tree */
34 Node *TY_(RemoveNode)(Node *node);
35 
36 /* remove node from markup tree and discard it */
37 Node *TY_(DiscardElement)( TidyDocImpl* doc, Node *element);
38 
39 /* insert node into markup tree as the firt element
40  of content of element */
41 void TY_(InsertNodeAtStart)(Node *element, Node *node);
42 
43 /* insert node into markup tree as the last element
44  of content of "element" */
45 void TY_(InsertNodeAtEnd)(Node *element, Node *node);
46 
47 /* insert node into markup tree before element */
48 void TY_(InsertNodeBeforeElement)(Node *element, Node *node);
49 
50 /* insert node into markup tree after element */
51 void TY_(InsertNodeAfterElement)(Node *element, Node *node);
52 
53 Node *TY_(TrimEmptyElement)( TidyDocImpl* doc, Node *element );
54 Node* TY_(DropEmptyElements)(TidyDocImpl* doc, Node* node);
55 
56 
57 /* assumes node is a text node */
58 Bool TY_(IsBlank)(Lexer *lexer, Node *node);
59 
60 Bool TY_(IsJavaScript)(Node *node);
61 
62 /*
63   HTML is the top level element
64 */
65 void TY_(ParseDocument)( TidyDocImpl* doc );
66 
67 
68 
69 /*
70   XML documents
71 */
72 Bool TY_(XMLPreserveWhiteSpace)( TidyDocImpl* doc, Node *element );
73 
74 void TY_(ParseXMLDocument)( TidyDocImpl* doc );
75 
76 #endif /* __PARSER_H__ */
77