00001
00002
00003
00004
00005 #define YYBISON 1
00006
00007 #define yyparse ntriples_parse
00008 #define yylex ntriples_lex
00009 #define yyerror ntriples_error
00010 #define yylval ntriples_lval
00011 #define yychar ntriples_char
00012 #define yydebug ntriples_debug
00013 #define yynerrs ntriples_nerrs
00014
00015 #line 1 "ntriples.cpp.y"
00016
00017
00018
00019 static char id[] = "$Id: yacc__out__ntriples_8cpp-source.html,v 1.9 2001/10/10 20:41:00 sandro Exp $";
00020 #include "ntriples.h"
00021 #include "config.h"
00022 #include "NTriplesParser.h"
00023
00024 extern "C" {
00025 #include <malloc.h>
00026 }
00027
00028 int ntriples_error(char* message);
00029 int ntriples_lex();
00030
00031 #include "Symbol.h"
00032
00033 #define YYSTYPE Symbol
00034
00035 #ifndef YYSTYPE
00036 #define YYSTYPE int
00037 #endif
00038 #include <stdio.h>
00039
00040 #ifndef __cplusplus
00041 #ifndef __STDC__
00042 #define const
00043 #endif
00044 #endif
00045
00046
00047
00048 #define YYFINAL 179
00049 #define YYFLAG -32768
00050 #define YYNTBASE 103
00051
00052 #define YYTRANSLATE(x) ((unsigned)(x) <= 338 ? yytranslate[x] : 132)
00053
00054 static const char yytranslate[] = { 0,
00055 2, 2, 2, 2, 2, 2, 2, 2, 2, 5,
00056 2, 2, 6, 2, 2, 2, 2, 2, 2, 2,
00057 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00058 2, 4, 2, 9, 18, 2, 2, 2, 2, 2,
00059 2, 2, 2, 2, 2, 3, 2, 2, 2, 2,
00060 2, 2, 2, 2, 2, 2, 2, 20, 2, 7,
00061 2, 8, 2, 2, 2, 2, 2, 2, 2, 2,
00062 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00063 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00064 12, 10, 13, 17, 19, 11, 2, 2, 2, 2,
00065 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00066 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00067 2, 2, 14, 16, 15, 2, 2, 2, 2, 2,
00068 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00069 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00070 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00071 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00072 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00073 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00074 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00075 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00076 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00077 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00078 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00079 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00080 2, 2, 2, 2, 2, 1, 21, 22, 23, 24,
00081 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
00082 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
00083 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
00084 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
00085 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
00086 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
00087 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
00088 95, 96, 97, 98, 99, 100, 101, 102
00089 };
00090
00091 #if YYDEBUG != 0
00092 static const short yyprhs[] = { 0,
00093 0, 1, 4, 15, 26, 27, 30, 32, 35, 37,
00094 39, 43, 47, 51, 52, 56, 60, 63, 65, 67,
00095 69, 71, 73, 75, 77, 79, 81, 83, 85, 89,
00096 93, 95, 99, 102, 103, 106, 108, 110, 112, 114,
00097 116, 118, 119, 122, 124, 126, 128, 130, 132, 134,
00098 136, 138, 140, 142, 144, 146, 148, 150, 152, 154,
00099 156, 158, 160, 162, 164, 166, 168, 170, 174, 176,
00100 178, 180, 182, 184, 186, 188, 190, 192, 194, 196,
00101 198, 200, 202, 204, 206, 208, 210, 212, 214, 216,
00102 218, 220, 222, 224, 226, 228, 230, 232, 234, 236,
00103 238, 240, 242, 244, 246, 248, 250, 252, 254, 256,
00104 258, 260, 262, 264, 266, 268, 270, 272, 274, 276,
00105 278, 280, 282, 284, 286, 288, 290, 292, 294, 296,
00106 298, 300, 302, 304, 306, 308, 310, 312, 314, 316,
00107 318, 320, 322, 324, 326, 328, 330
00108 };
00109
00110 static const short yyrhs[] = { -1,
00111 104, 103, 0, 105, 108, 106, 108, 106, 108, 105,
00112 3, 105, 107, 0, 105, 108, 106, 108, 106, 109,
00113 105, 3, 105, 107, 0, 0, 4, 105, 0, 4,
00114 0, 4, 106, 0, 5, 0, 6, 0, 7, 112,
00115 8, 0, 7, 113, 8, 0, 9, 110, 9, 0,
00116 0, 10, 9, 110, 0, 10, 10, 110, 0, 111,
00117 110, 0, 121, 0, 11, 0, 12, 0, 13, 0,
00118 14, 0, 15, 0, 16, 0, 7, 0, 8, 0,
00119 17, 0, 115, 0, 115, 18, 119, 0, 19, 20,
00120 114, 0, 119, 0, 116, 20, 120, 0, 128, 117,
00121 0, 0, 118, 117, 0, 128, 0, 131, 0, 21,
00122 0, 22, 0, 23, 0, 120, 0, 0, 121, 120,
00123 0, 122, 0, 123, 0, 125, 0, 24, 0, 25,
00124 0, 26, 0, 27, 0, 28, 0, 29, 0, 30,
00125 0, 21, 0, 31, 0, 32, 0, 127, 0, 124,
00126 0, 22, 0, 33, 0, 23, 0, 34, 0, 35,
00127 0, 36, 0, 37, 0, 38, 0, 39, 0, 40,
00128 126, 126, 0, 131, 0, 41, 0, 42, 0, 43,
00129 0, 44, 0, 45, 0, 46, 0, 47, 0, 48,
00130 0, 49, 0, 50, 0, 51, 0, 52, 0, 128,
00131 0, 131, 0, 129, 0, 130, 0, 47, 0, 48,
00132 0, 49, 0, 50, 0, 51, 0, 52, 0, 53,
00133 0, 54, 0, 55, 0, 56, 0, 57, 0, 58,
00134 0, 59, 0, 60, 0, 61, 0, 62, 0, 63,
00135 0, 64, 0, 65, 0, 66, 0, 67, 0, 68,
00136 0, 69, 0, 70, 0, 71, 0, 72, 0, 41,
00137 0, 42, 0, 43, 0, 44, 0, 45, 0, 46,
00138 0, 73, 0, 74, 0, 75, 0, 76, 0, 77,
00139 0, 78, 0, 79, 0, 80, 0, 81, 0, 82,
00140 0, 83, 0, 84, 0, 85, 0, 86, 0, 87,
00141 0, 88, 0, 89, 0, 90, 0, 91, 0, 92,
00142 0, 93, 0, 94, 0, 95, 0, 96, 0, 97,
00143 0, 98, 0, 99, 0, 100, 0, 101, 0, 102,
00144 0
00145 };
00146
00147 #endif
00148
00149 #if YYDEBUG != 0
00150 static const short yyrline[] = { 0,
00151 25, 26, 29, 33, 39, 40, 43, 44, 47, 48,
00152 53, 54, 57, 60, 62, 63, 64, 67, 68, 68,
00153 68, 68, 68, 68, 68, 68, 68, 71, 72, 75,
00154 77, 83, 86, 89, 90, 93, 93, 93, 93, 93,
00155 97, 100, 101, 108, 108, 108, 109, 109, 109, 109,
00156 109, 109, 109, 109, 109, 110, 111, 111, 112, 112,
00157 112, 112, 112, 112, 112, 112, 113, 115, 116, 116,
00158 116, 116, 116, 116, 116, 116, 117, 117, 117, 117,
00159 117, 119, 119, 120, 120, 122, 122, 122, 122, 122,
00160 122, 122, 122, 122, 122, 123, 123, 123, 123, 123,
00161 123, 123, 123, 123, 124, 124, 124, 124, 124, 124,
00162 124, 125, 125, 125, 125, 125, 125, 125, 125, 125,
00163 125, 126, 126, 126, 126, 126, 126, 126, 126, 126,
00164 127, 127, 127, 127, 127, 127, 127, 128, 128, 128,
00165 128, 128, 128, 128, 128, 128, 129
00166 };
00167 #endif
00168
00169
00170 #if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
00171
00172 static const char * const yytname[] = { "$","error","$undefined.","'.'","' '",
00173 "'\\n'","'\\r'","'<'","'>'","'\\\"'","'\\\\'","'`'","'['","']'","'{'","'}'",
00174 "'|'","'^'","'#'","'_'","':'","\"+\"","\"-\"","\".\"","\";\"","\"/\"","\"?\"",
00175 "\":\"","\"@\"","\"&\"","\"=\"","\"$\"","\",\"","\"_\"","\"!\"","\"~\"","\"*\"",
00176 "\"\\'\"","\"(\"","\")\"","\"%\"","\"A\"","\"B\"","\"C\"","\"D\"","\"E\"","\"F\"",
00177 "\"a\"","\"b\"","\"c\"","\"d\"","\"e\"","\"f\"","\"g\"","\"h\"","\"i\"","\"j\"",
00178 "\"k\"","\"l\"","\"m\"","\"n\"","\"o\"","\"p\"","\"q\"","\"r\"","\"s\"","\"t\"",
00179 "\"u\"","\"v\"","\"w\"","\"x\"","\"y\"","\"z\"","\"G\"","\"H\"","\"I\"","\"J\"",
00180 "\"K\"","\"L\"","\"M\"","\"N\"","\"O\"","\"P\"","\"Q\"","\"R\"","\"S\"","\"T\"",
00181 "\"U\"","\"V\"","\"W\"","\"X\"","\"Y\"","\"Z\"","\"0\"","\"1\"","\"2\"","\"3\"",
00182 "\"4\"","\"5\"","\"6\"","\"7\"","\"8\"","\"9\"","document","statement","ows",
00183 "ws","nl","ident","string_literal","string_contents","notDoubleQuote","absoluteURI_reference",
00184 "existential_term","exi_fragment","absoluteURI","scheme","scheme2","schemeChar",
00185 "fragment","urichars","uric","reserved","unreserved","mark","escaped","hex",
00186 "alphanum","alpha","lowalpha","upalpha","digit", NULL
00187 };
00188 #endif
00189
00190 static const short yyr1[] = { 0,
00191 103, 103, 104, 104, 105, 105, 106, 106, 107, 107,
00192 108, 108, 109, 110, 110, 110, 110, 111, 111, 111,
00193 111, 111, 111, 111, 111, 111, 111, 112, 112, 113,
00194 114, 115, 116, 117, 117, 118, 118, 118, 118, 118,
00195 119, 120, 120, 121, 121, 121, 122, 122, 122, 122,
00196 122, 122, 122, 122, 122, 122, 123, 123, 124, 124,
00197 124, 124, 124, 124, 124, 124, 124, 125, 126, 126,
00198 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
00199 126, 127, 127, 128, 128, 129, 129, 129, 129, 129,
00200 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
00201 129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
00202 129, 130, 130, 130, 130, 130, 130, 130, 130, 130,
00203 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
00204 130, 130, 130, 130, 130, 130, 130, 131, 131, 131,
00205 131, 131, 131, 131, 131, 131, 131
00206 };
00207
00208 static const short yyr2[] = { 0,
00209 0, 2, 10, 10, 0, 2, 1, 2, 1, 1,
00210 3, 3, 3, 0, 3, 3, 2, 1, 1, 1,
00211 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
00212 1, 3, 2, 0, 2, 1, 1, 1, 1, 1,
00213 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
00214 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00215 1, 1, 1, 1, 1, 1, 1, 3, 1, 1,
00216 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00217 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00218 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00219 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00220 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00221 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00222 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00223 1, 1, 1, 1, 1, 1, 1
00224 };
00225
00226 static const short yydefact[] = { 1,
00227 5, 1, 0, 6, 2, 0, 0, 0, 112, 113,
00228 114, 115, 116, 117, 86, 87, 88, 89, 90, 91,
00229 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
00230 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
00231 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
00232 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
00233 0, 0, 28, 0, 34, 84, 85, 7, 0, 42,
00234 11, 12, 42, 42, 38, 39, 40, 138, 139, 140,
00235 141, 142, 143, 144, 145, 146, 147, 33, 34, 36,
00236 37, 8, 0, 54, 59, 61, 47, 48, 49, 50,
00237 51, 52, 53, 55, 56, 60, 62, 63, 64, 65,
00238 66, 67, 0, 30, 31, 41, 42, 44, 45, 58,
00239 46, 57, 82, 83, 29, 32, 35, 0, 70, 71,
00240 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
00241 0, 69, 43, 14, 5, 5, 68, 25, 26, 0,
00242 19, 20, 21, 22, 23, 24, 27, 0, 14, 18,
00243 0, 0, 14, 14, 13, 17, 5, 5, 15, 16,
00244 0, 0, 9, 10, 3, 4, 0, 0, 0
00245 };
00246
00247 static const short yydefgoto[] = { 5,
00248 2, 3, 69, 175, 7, 146, 158, 159, 61, 62,
00249 114, 63, 64, 88, 89, 115, 116, 117, 118, 119,
00250 120, 121, 141, 122, 123, 66, 67, 124
00251 };
00252
00253 static const short yypact[] = { 102,
00254 9, 102, -4,-32768,-32768, 326, 108, 93,-32768,-32768,
00255 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00256 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00257 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00258 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00259 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00260 106, 107, 99, 98, 242,-32768,-32768, 108, -4, 160,
00261 -32768,-32768, 160, 160,-32768,-32768,-32768,-32768,-32768,-32768,
00262 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 242,-32768,
00263 -32768,-32768, 108,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00264 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00265 -32768,-32768, 378,-32768,-32768,-32768, 160,-32768,-32768,-32768,
00266 -32768,-32768,-32768,-32768,-32768,-32768,-32768, 5,-32768,-32768,
00267 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
00268 378,-32768,-32768, -6, 9, 9,-32768,-32768,-32768, 95,
00269 -32768,-32768,-32768,-32768,-32768,-32768,-32768, 110, -6,-32768,
00270 120, 121, -6, -6,-32768,-32768, 9, 9,-32768,-32768,
00271 105, 105,-32768,-32768,-32768,-32768, 125, 126,-32768
00272 };
00273
00274 static const short yypgoto[] = { 128,
00275 -32768, -1, 34, -42, 30,-32768, -56,-32768,-32768,-32768,
00276 -32768,-32768,-32768, 40,-32768, 58, 26, -43,-32768,-32768,
00277 -32768,-32768, -9,-32768, 91,-32768,-32768, 33
00278 };
00279
00280
00281 #define YYLAST 480
00282
00283
00284 static const short yytable[] = { 4,
00285 148, 149, 6, 150, 151, 152, 153, 154, 155, 156,
00286 157, 6, 1, 144, 94, 95, 96, 97, 98, 99,
00287 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
00288 110, 111, 112, 113, 9, 10, 11, 12, 13, 14,
00289 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
00290 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
00291 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
00292 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
00293 55, 56, 57, 58, 59, 60, 78, 79, 80, 81,
00294 82, 83, 84, 85, 86, 87, 65, 91, 93, 126,
00295 160, 92, 166, 163, 164, 1, 169, 170, -5, 173,
00296 174, 68, 70, 71, 72, 160, 73, 74, 165, 160,
00297 160, 91, 167, 168, 178, 179, 128, 177, 127, 176,
00298 125, 147, 0, 0, 0, 0, 0, 0, 0, 0,
00299 0, 0, 143, 161, 162, 142, 0, 0, 0, 0,
00300 0, 0, 0, 0, 0, 90, 0, 145, 0, 0,
00301 0, 0, 0, 0, 0, 171, 172, 0, 0, 0,
00302 0, 0, 0, 142, 0, 0, 0, 0, 0, 90,
00303 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
00304 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
00305 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
00306 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
00307 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
00308 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
00309 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
00310 59, 60, 78, 79, 80, 81, 82, 83, 84, 85,
00311 86, 87, 75, 76, 77, 0, 0, 0, 0, 0,
00312 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00313 0, 0, 9, 10, 11, 12, 13, 14, 15, 16,
00314 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
00315 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
00316 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
00317 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
00318 57, 58, 59, 60, 78, 79, 80, 81, 82, 83,
00319 84, 85, 86, 87, 8, 0, 0, 0, 0, 0,
00320 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00321 0, 0, 0, 0, 0, 0, 9, 10, 11, 12,
00322 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
00323 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
00324 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
00325 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
00326 53, 54, 55, 56, 57, 58, 59, 60, 129, 130,
00327 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
00328 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00329 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00330 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00331 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00332 78, 79, 80, 81, 82, 83, 84, 85, 86, 87
00333 };
00334
00335 static const short yycheck[] = { 1,
00336 7, 8, 7, 10, 11, 12, 13, 14, 15, 16,
00337 17, 7, 4, 9, 21, 22, 23, 24, 25, 26,
00338 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
00339 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
00340 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
00341 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
00342 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
00343 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
00344 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
00345 97, 98, 99, 100, 101, 102, 6, 65, 69, 74,
00346 144, 68, 159, 9, 10, 4, 163, 164, 7, 5,
00347 6, 4, 20, 8, 8, 159, 18, 20, 9, 163,
00348 164, 89, 3, 3, 0, 0, 93, 0, 89, 172,
00349 73, 141, -1, -1, -1, -1, -1, -1, -1, -1,
00350 -1, -1, 117, 145, 146, 113, -1, -1, -1, -1,
00351 -1, -1, -1, -1, -1, 65, -1, 128, -1, -1,
00352 -1, -1, -1, -1, -1, 167, 168, -1, -1, -1,
00353 -1, -1, -1, 141, -1, -1, -1, -1, -1, 89,
00354 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
00355 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
00356 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
00357 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
00358 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
00359 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
00360 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
00361 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
00362 101, 102, 21, 22, 23, -1, -1, -1, -1, -1,
00363 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
00364 -1, -1, 41, 42, 43, 44, 45, 46, 47, 48,
00365 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
00366 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
00367 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
00368 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
00369 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
00370 99, 100, 101, 102, 19, -1, -1, -1, -1, -1,
00371 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
00372 -1, -1, -1, -1, -1, -1, 41, 42, 43, 44,
00373 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
00374 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
00375 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
00376 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
00377 85, 86, 87, 88, 89, 90, 91, 92, 41, 42,
00378 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
00379 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
00380 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
00381 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
00382 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
00383 93, 94, 95, 96, 97, 98, 99, 100, 101, 102
00384 };
00385
00386 #line 3 "/usr/share/misc/bison.simple"
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417 #ifndef YYSTACK_USE_ALLOCA
00418 #ifdef alloca
00419 #define YYSTACK_USE_ALLOCA
00420 #else
00421 #ifdef __GNUC__
00422 #define YYSTACK_USE_ALLOCA
00423 #define alloca __builtin_alloca
00424 #else
00425 #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
00426 #define YYSTACK_USE_ALLOCA
00427 #include <alloca.h>
00428 #else
00429
00430
00431
00432 #if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
00433 #if 0
00434
00435 #include <malloc.h>
00436 #endif
00437 #else
00438 #if defined(_AIX)
00439
00440
00441
00442 #pragma alloca
00443 #define YYSTACK_USE_ALLOCA
00444 #else
00445 #if 0
00446 #ifdef __hpux
00447
00448 #define YYSTACK_USE_ALLOCA
00449 #define alloca __builtin_alloca
00450 #endif
00451 #endif
00452 #endif
00453 #endif
00454 #endif
00455 #endif
00456 #endif
00457 #endif
00458
00459 #ifdef YYSTACK_USE_ALLOCA
00460 #define YYSTACK_ALLOC alloca
00461 #else
00462 #define YYSTACK_ALLOC malloc
00463 #endif
00464
00465
00466
00467
00468
00469 #define yyerrok (yyerrstatus = 0)
00470 #define yyclearin (yychar = YYEMPTY)
00471 #define YYEMPTY -2
00472 #define YYEOF 0
00473 #define YYACCEPT goto yyacceptlab
00474 #define YYABORT goto yyabortlab
00475 #define YYERROR goto yyerrlab1
00476
00477
00478
00479
00480 #define YYFAIL goto yyerrlab
00481 #define YYRECOVERING() (!!yyerrstatus)
00482 #define YYBACKUP(token, value) \
00483 do \
00484 if (yychar == YYEMPTY && yylen == 1) \
00485 { yychar = (token), yylval = (value); \
00486 yychar1 = YYTRANSLATE (yychar); \
00487 YYPOPSTACK; \
00488 goto yybackup; \
00489 } \
00490 else \
00491 { yyerror ("syntax error: cannot back up"); YYERROR; } \
00492 while (0)
00493
00494 #define YYTERROR 1
00495 #define YYERRCODE 256
00496
00497 #ifndef YYPURE
00498 #define YYLEX yylex()
00499 #endif
00500
00501 #ifdef YYPURE
00502 #ifdef YYLSP_NEEDED
00503 #ifdef YYLEX_PARAM
00504 #define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
00505 #else
00506 #define YYLEX yylex(&yylval, &yylloc)
00507 #endif
00508 #else
00509 #ifdef YYLEX_PARAM
00510 #define YYLEX yylex(&yylval, YYLEX_PARAM)
00511 #else
00512 #define YYLEX yylex(&yylval)
00513 #endif
00514 #endif
00515 #endif
00516
00517
00518
00519 #ifndef YYPURE
00520
00521 int yychar;
00522 YYSTYPE yylval;
00523
00524
00525 #ifdef YYLSP_NEEDED
00526 YYLTYPE yylloc;
00527
00528 #endif
00529
00530 int yynerrs;
00531 #endif
00532
00533 #if YYDEBUG != 0
00534 int yydebug;
00535
00536
00537 #endif
00538
00539
00540
00541 #ifndef YYINITDEPTH
00542 #define YYINITDEPTH 200
00543 #endif
00544
00545
00546
00547
00548 #if YYMAXDEPTH == 0
00549 #undef YYMAXDEPTH
00550 #endif
00551
00552 #ifndef YYMAXDEPTH
00553 #define YYMAXDEPTH 10000
00554 #endif
00555
00556
00557
00558
00559
00560
00561 #if __GNUC__ > 1
00562 #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
00563 #else
00564 #ifndef __cplusplus
00565
00566
00567
00568 static void
00569 __yy_memcpy (to, from, count)
00570 char *to;
00571 char *from;
00572 unsigned int count;
00573 {
00574 register char *f = from;
00575 register char *t = to;
00576 register int i = count;
00577
00578 while (i-- > 0)
00579 *t++ = *f++;
00580 }
00581
00582 #else
00583
00584
00585
00586 static void
00587 __yy_memcpy (char *to, char *from, unsigned int count)
00588 {
00589 register char *t = to;
00590 register char *f = from;
00591 register int i = count;
00592
00593 while (i-- > 0)
00594 *t++ = *f++;
00595 }
00596
00597 #endif
00598 #endif
00599
00600 #line 217 "/usr/share/misc/bison.simple"
00601
00602
00603
00604
00605
00606
00607
00608 #ifdef YYPARSE_PARAM
00609 #ifdef __cplusplus
00610 #define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
00611 #define YYPARSE_PARAM_DECL
00612 #else
00613 #define YYPARSE_PARAM_ARG YYPARSE_PARAM
00614 #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
00615 #endif
00616 #else
00617 #define YYPARSE_PARAM_ARG
00618 #define YYPARSE_PARAM_DECL
00619 #endif
00620
00621
00622 #ifdef __GNUC__
00623 #ifdef YYPARSE_PARAM
00624 int yyparse (void *);
00625 #else
00626 int yyparse (void);
00627 #endif
00628 #endif
00629
00630 int
00631 yyparse(YYPARSE_PARAM_ARG)
00632 YYPARSE_PARAM_DECL
00633 {
00634 register int yystate;
00635 register int yyn;
00636 register short *yyssp;
00637 register YYSTYPE *yyvsp;
00638 int yyerrstatus;
00639 int yychar1 = 0;
00640
00641 short yyssa[YYINITDEPTH];
00642 YYSTYPE yyvsa[YYINITDEPTH];
00643
00644 short *yyss = yyssa;
00645 YYSTYPE *yyvs = yyvsa;
00646
00647 #ifdef YYLSP_NEEDED
00648 YYLTYPE yylsa[YYINITDEPTH];
00649 YYLTYPE *yyls = yylsa;
00650 YYLTYPE *yylsp;
00651
00652 #define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
00653 #else
00654 #define YYPOPSTACK (yyvsp--, yyssp--)
00655 #endif
00656
00657 int yystacksize = YYINITDEPTH;
00658 int yyfree_stacks = 0;
00659
00660 #ifdef YYPURE
00661 int yychar;
00662 YYSTYPE yylval;
00663 int yynerrs;
00664 #ifdef YYLSP_NEEDED
00665 YYLTYPE yylloc;
00666 #endif
00667 #endif
00668
00669 YYSTYPE yyval;
00670
00671
00672
00673 int yylen;
00674
00675 #if YYDEBUG != 0
00676 if (yydebug)
00677 fprintf(stderr, "Starting parse\n");
00678 #endif
00679
00680 yystate = 0;
00681 yyerrstatus = 0;
00682 yynerrs = 0;
00683 yychar = YYEMPTY;
00684
00685
00686
00687
00688
00689
00690 yyssp = yyss - 1;
00691 yyvsp = yyvs;
00692 #ifdef YYLSP_NEEDED
00693 yylsp = yyls;
00694 #endif
00695
00696
00697
00698
00699 yynewstate:
00700
00701 *++yyssp = yystate;
00702
00703 if (yyssp >= yyss + yystacksize - 1)
00704 {
00705
00706
00707 YYSTYPE *yyvs1 = yyvs;
00708 short *yyss1 = yyss;
00709 #ifdef YYLSP_NEEDED
00710 YYLTYPE *yyls1 = yyls;
00711 #endif
00712
00713
00714 int size = yyssp - yyss + 1;
00715
00716 #ifdef yyoverflow
00717
00718
00719 #ifdef YYLSP_NEEDED
00720
00721
00722 yyoverflow("parser stack overflow",
00723 &yyss1, size * sizeof (*yyssp),
00724 &yyvs1, size * sizeof (*yyvsp),
00725 &yyls1, size * sizeof (*yylsp),
00726 &yystacksize);
00727 #else
00728 yyoverflow("parser stack overflow",
00729 &yyss1, size * sizeof (*yyssp),
00730 &yyvs1, size * sizeof (*yyvsp),
00731 &yystacksize);
00732 #endif
00733
00734 yyss = yyss1; yyvs = yyvs1;
00735 #ifdef YYLSP_NEEDED
00736 yyls = yyls1;
00737 #endif
00738 #else
00739
00740 if (yystacksize >= YYMAXDEPTH)
00741 {
00742 yyerror("parser stack overflow");
00743 if (yyfree_stacks)
00744 {
00745 free (yyss);
00746 free (yyvs);
00747 #ifdef YYLSP_NEEDED
00748 free (yyls);
00749 #endif
00750 }
00751 return 2;
00752 }
00753 yystacksize *= 2;
00754 if (yystacksize > YYMAXDEPTH)
00755 yystacksize = YYMAXDEPTH;
00756 #ifndef YYSTACK_USE_ALLOCA
00757 yyfree_stacks = 1;
00758 #endif
00759 yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
00760 __yy_memcpy ((char *)yyss, (char *)yyss1,
00761 size * (unsigned int) sizeof (*yyssp));
00762 yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
00763 __yy_memcpy ((char *)yyvs, (char *)yyvs1,
00764 size * (unsigned int) sizeof (*yyvsp));
00765 #ifdef YYLSP_NEEDED
00766 yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
00767 __yy_memcpy ((char *)yyls, (char *)yyls1,
00768 size * (unsigned int) sizeof (*yylsp));
00769 #endif
00770 #endif
00771
00772 yyssp = yyss + size - 1;
00773 yyvsp = yyvs + size - 1;
00774 #ifdef YYLSP_NEEDED
00775 yylsp = yyls + size - 1;
00776 #endif
00777
00778 #if YYDEBUG != 0
00779 if (yydebug)
00780 fprintf(stderr, "Stack size increased to %d\n", yystacksize);
00781 #endif
00782
00783 if (yyssp >= yyss + yystacksize - 1)
00784 YYABORT;
00785 }
00786
00787 #if YYDEBUG != 0
00788 if (yydebug)
00789 fprintf(stderr, "Entering state %d\n", yystate);
00790 #endif
00791
00792 goto yybackup;
00793 yybackup:
00794
00795
00796
00797
00798
00799
00800
00801 yyn = yypact[yystate];
00802 if (yyn == YYFLAG)
00803 goto yydefault;
00804
00805
00806
00807
00808
00809
00810 if (yychar == YYEMPTY)
00811 {
00812 #if YYDEBUG != 0
00813 if (yydebug)
00814 fprintf(stderr, "Reading a token: ");
00815 #endif
00816 yychar = YYLEX;
00817 }
00818
00819
00820
00821 if (yychar <= 0)
00822 {
00823 yychar1 = 0;
00824 yychar = YYEOF;
00825
00826 #if YYDEBUG != 0
00827 if (yydebug)
00828 fprintf(stderr, "Now at end of input.\n");
00829 #endif
00830 }
00831 else
00832 {
00833 yychar1 = YYTRANSLATE(yychar);
00834
00835 #if YYDEBUG != 0
00836 if (yydebug)
00837 {
00838 fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
00839
00840
00841 #ifdef YYPRINT
00842 YYPRINT (stderr, yychar, yylval);
00843 #endif
00844 fprintf (stderr, ")\n");
00845 }
00846 #endif
00847 }
00848
00849 yyn += yychar1;
00850 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
00851 goto yydefault;
00852
00853 yyn = yytable[yyn];
00854
00855
00856
00857
00858
00859
00860
00861
00862 if (yyn < 0)
00863 {
00864 if (yyn == YYFLAG)
00865 goto yyerrlab;
00866 yyn = -yyn;
00867 goto yyreduce;
00868 }
00869 else if (yyn == 0)
00870 goto yyerrlab;
00871
00872 if (yyn == YYFINAL)
00873 YYACCEPT;
00874
00875
00876
00877 #if YYDEBUG != 0
00878 if (yydebug)
00879 fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
00880 #endif
00881
00882
00883 if (yychar != YYEOF)
00884 yychar = YYEMPTY;
00885
00886 *++yyvsp = yylval;
00887 #ifdef YYLSP_NEEDED
00888 *++yylsp = yylloc;
00889 #endif
00890
00891
00892 if (yyerrstatus) yyerrstatus--;
00893
00894 yystate = yyn;
00895 goto yynewstate;
00896
00897
00898 yydefault:
00899
00900 yyn = yydefact[yystate];
00901 if (yyn == 0)
00902 goto yyerrlab;
00903
00904
00905 yyreduce:
00906 yylen = yyr2[yyn];
00907 if (yylen > 0)
00908 yyval = yyvsp[1-yylen];
00909
00910 #if YYDEBUG != 0
00911 if (yydebug)
00912 {
00913 int i;
00914
00915 fprintf (stderr, "Reducing via rule %d (line %d), ",
00916 yyn, yyrline[yyn]);
00917
00918
00919 for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
00920 fprintf (stderr, "%s ", yytname[yyrhs[i]]);
00921 fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
00922 }
00923 #endif
00924
00925
00926 switch (yyn) {
00927
00928 case 3:
00929 #line 30 "ntriples.cpp.y"
00930 {
00931
00932 ;
00933 break;}
00934 case 4:
00935 #line 34 "ntriples.cpp.y"
00936 {
00937
00938 ;
00939 break;}
00940 case 31:
00941 #line 78 "ntriples.cpp.y"
00942 {
00943
00944 ;
00945 break;}
00946 }
00947
00948 #line 543 "/usr/share/misc/bison.simple"
00949
00950 yyvsp -= yylen;
00951 yyssp -= yylen;
00952 #ifdef YYLSP_NEEDED
00953 yylsp -= yylen;
00954 #endif
00955
00956 #if YYDEBUG != 0
00957 if (yydebug)
00958 {
00959 short *ssp1 = yyss - 1;
00960 fprintf (stderr, "state stack now");
00961 while (ssp1 != yyssp)
00962 fprintf (stderr, " %d", *++ssp1);
00963 fprintf (stderr, "\n");
00964 }
00965 #endif
00966
00967 *++yyvsp = yyval;
00968
00969 #ifdef YYLSP_NEEDED
00970 yylsp++;
00971 if (yylen == 0)
00972 {
00973 yylsp->first_line = yylloc.first_line;
00974 yylsp->first_column = yylloc.first_column;
00975 yylsp->last_line = (yylsp-1)->last_line;
00976 yylsp->last_column = (yylsp-1)->last_column;
00977 yylsp->text = 0;
00978 }
00979 else
00980 {
00981 yylsp->last_line = (yylsp+yylen-1)->last_line;
00982 yylsp->last_column = (yylsp+yylen-1)->last_column;
00983 }
00984 #endif
00985
00986
00987
00988
00989
00990
00991 yyn = yyr1[yyn];
00992
00993 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
00994 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
00995 yystate = yytable[yystate];
00996 else
00997 yystate = yydefgoto[yyn - YYNTBASE];
00998
00999 goto yynewstate;
01000
01001 yyerrlab:
01002
01003 if (! yyerrstatus)
01004
01005 {
01006 ++yynerrs;
01007
01008 #ifdef YYERROR_VERBOSE
01009 yyn = yypact[yystate];
01010
01011 if (yyn > YYFLAG && yyn < YYLAST)
01012 {
01013 int size = 0;
01014 char *msg;
01015 int x, count;
01016
01017 count = 0;
01018
01019 for (x = (yyn < 0 ? -yyn : 0);
01020 x < (sizeof(yytname) / sizeof(char *)); x++)
01021 if (yycheck[x + yyn] == x)
01022 size += strlen(yytname[x]) + 15, count++;
01023 msg = (char *) malloc(size + 15);
01024 if (msg != 0)
01025 {
01026 strcpy(msg, "parse error");
01027
01028 if (count < 5)
01029 {
01030 count = 0;
01031 for (x = (yyn < 0 ? -yyn : 0);
01032 x < (sizeof(yytname) / sizeof(char *)); x++)
01033 if (yycheck[x + yyn] == x)
01034 {
01035 strcat(msg, count == 0 ? ", expecting `" : " or `");
01036 strcat(msg, yytname[x]);
01037 strcat(msg, "'");
01038 count++;
01039 }
01040 }
01041 yyerror(msg);
01042 free(msg);
01043 }
01044 else
01045 yyerror ("parse error; also virtual memory exceeded");
01046 }
01047 else
01048 #endif
01049 yyerror("parse error");
01050 }
01051
01052 goto yyerrlab1;
01053 yyerrlab1:
01054
01055 if (yyerrstatus == 3)
01056 {
01057
01058
01059
01060 if (yychar == YYEOF)
01061 YYABORT;
01062
01063 #if YYDEBUG != 0
01064 if (yydebug)
01065 fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
01066 #endif
01067
01068 yychar = YYEMPTY;
01069 }
01070
01071
01072
01073
01074 yyerrstatus = 3;
01075
01076 goto yyerrhandle;
01077
01078 yyerrdefault:
01079
01080 #if 0
01081
01082
01083 yyn = yydefact[yystate];
01084 if (yyn) goto yydefault;
01085 #endif
01086
01087 yyerrpop:
01088
01089 if (yyssp == yyss) YYABORT;
01090 yyvsp--;
01091 yystate = *--yyssp;
01092 #ifdef YYLSP_NEEDED
01093 yylsp--;
01094 #endif
01095
01096 #if YYDEBUG != 0
01097 if (yydebug)
01098 {
01099 short *ssp1 = yyss - 1;
01100 fprintf (stderr, "Error: state stack now");
01101 while (ssp1 != yyssp)
01102 fprintf (stderr, " %d", *++ssp1);
01103 fprintf (stderr, "\n");
01104 }
01105 #endif
01106
01107 yyerrhandle:
01108
01109 yyn = yypact[yystate];
01110 if (yyn == YYFLAG)
01111 goto yyerrdefault;
01112
01113 yyn += YYTERROR;
01114 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
01115 goto yyerrdefault;
01116
01117 yyn = yytable[yyn];
01118 if (yyn < 0)
01119 {
01120 if (yyn == YYFLAG)
01121 goto yyerrpop;
01122 yyn = -yyn;
01123 goto yyreduce;
01124 }
01125 else if (yyn == 0)
01126 goto yyerrpop;
01127
01128 if (yyn == YYFINAL)
01129 YYACCEPT;
01130
01131 #if YYDEBUG != 0
01132 if (yydebug)
01133 fprintf(stderr, "Shifting error token, ");
01134 #endif
01135
01136 *++yyvsp = yylval;
01137 #ifdef YYLSP_NEEDED
01138 *++yylsp = yylloc;
01139 #endif
01140
01141 yystate = yyn;
01142 goto yynewstate;
01143
01144 yyacceptlab:
01145
01146 if (yyfree_stacks)
01147 {
01148 free (yyss);
01149 free (yyvs);
01150 #ifdef YYLSP_NEEDED
01151 free (yyls);
01152 #endif
01153 }
01154 return 0;
01155
01156 yyabortlab:
01157
01158 if (yyfree_stacks)
01159 {
01160 free (yyss);
01161 free (yyvs);
01162 #ifdef YYLSP_NEEDED
01163 free (yyls);
01164 #endif
01165 }
01166 return 1;
01167 }
01168 #line 133 "ntriples.cpp.y"
01169
01170
01171 int ntriples_error(char* message)
01172 {
01173 std::cerr << message;
01174 return 0;
01175 }
01176
01177 int ntriples_lex()
01178 {
01179 char c;
01180 int bytes = ntriples_parser->fifo.read(&c, 1);
01181 if (bytes == 0) return 0;
01182 return c;
01183 }
01184