Mercurial > ~dholland > hg > ag > index.cgi
comparison tests/agcl/parsifal/good/xml2.h @ 0:13d2b8934445
Import AnaGram (near-)release tree into Mercurial.
author | David A. Holland |
---|---|
date | Sat, 22 Dec 2007 17:52:45 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:13d2b8934445 |
---|---|
1 #ifndef XML2_H | |
2 #define XML2_H | |
3 | |
4 typedef enum { | |
5 xml2_document_token = 1, xml2_prolog_token, xml2_element_token, | |
6 xml2_Misc_token, xml2_SpaceChar_token = 7, xml2_S_token = 9, | |
7 xml2_Name_token = 11, xml2_NameChar_token = 13, xml2_Names_token = 16, | |
8 xml2_Nmtoken_token = 20, xml2_Nmtokens_token, xml2_EntityValue_token = 25, | |
9 xml2_PEReference_token = 28, xml2_Reference_token, | |
10 xml2_AttValue_token = 38, xml2_SystemLiteral_token = 45, | |
11 xml2_PubidLiteral_token = 52, xml2_PubidChar_token, | |
12 xml2_CharData_token = 56, xml2_Comment_token = 60, xml2_Char_token = 62, | |
13 xml2_PI_token = 67, xml2_PITarget_token = 69, xml2_char_token, | |
14 xml2_CDSect_token = 75, xml2_CDStart_token, xml2_CData_token, | |
15 xml2_CDEnd_token, xml2_XMLDecl_token = 81, xml2_doctypedecl_token = 83, | |
16 xml2_VersionInfo_token = 86, xml2_EncodingDecl_token, | |
17 xml2_SDDecl_token = 89, xml2_Eq_token = 93, xml2_VersionNum_token, | |
18 xml2_ExternalID_token = 100, xml2_markupdecl_token = 104, | |
19 xml2_elementdecl_token = 110, xml2_AttlistDecl_token, | |
20 xml2_EntityDecl_token, xml2_NotationDecl_token, xml2_extSubset_token, | |
21 xml2_TextDecl_token, xml2_extSubsetDecl_token = 117, | |
22 xml2_conditionalSect_token, xml2_Language_Id_token = 127, | |
23 xml2_Langcode_token, xml2_Subcode_token = 130, | |
24 xml2_ISO639Code_token = 134, xml2_IanaCode_token, xml2_UserCode_token, | |
25 xml2_EmptyElemTag_token = 142, xml2_STag_token, xml2_content_token, | |
26 xml2_ETag_token, xml2_Attribute_token = 147 | |
27 } xml2_token_type; | |
28 | |
29 typedef struct xml2_pcb_struct{ | |
30 xml2_token_type token_number, reduction_token, error_frame_token; | |
31 int input_code; | |
32 int input_value; | |
33 int line, column; | |
34 int ssx, sn, error_frame_ssx; | |
35 int drt, dssx, dsn; | |
36 int ss[128]; | |
37 int vs[128]; | |
38 int ag_ap; | |
39 const char *error_message; | |
40 char read_flag; | |
41 char exit_flag; | |
42 int bts[128], btsx; | |
43 int lab[11], rx, fx; | |
44 const unsigned char *key_sp; | |
45 int save_index, key_state; | |
46 char ag_msg[82]; | |
47 } xml2_pcb_type; | |
48 | |
49 #ifndef PRULE_CONTEXT | |
50 #define PRULE_CONTEXT(pcb) (&((pcb).cs[(pcb).ssx])) | |
51 #define PERROR_CONTEXT(pcb) ((pcb).cs[(pcb).error_frame_ssx]) | |
52 #define PCONTEXT(pcb) ((pcb).cs[(pcb).ssx]) | |
53 #endif | |
54 | |
55 #ifndef AG_RUNNING_CODE | |
56 /* PCB.exit_flag values */ | |
57 #define AG_RUNNING_CODE 0 | |
58 #define AG_SUCCESS_CODE 1 | |
59 #define AG_SYNTAX_ERROR_CODE 2 | |
60 #define AG_REDUCTION_ERROR_CODE 3 | |
61 #define AG_STACK_ERROR_CODE 4 | |
62 #define AG_SEMANTIC_ERROR_CODE 5 | |
63 #endif | |
64 | |
65 extern xml2_pcb_type xml2_pcb; | |
66 void init_xml2(void); | |
67 void xml2(void); | |
68 #endif | |
69 |