1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
28 #ifndef YY_ALWAYS_INTERACTIVE
29 #ifndef YY_NEVER_INTERACTIVE
30 extern int isatty YY_PROTO(( int ));
35 /* Use prototypes in function declarations. */
38 /* The "const" storage-class-modifier is valid. */
41 #else /* ! __cplusplus */
49 #endif /* ! __cplusplus */
68 #define YY_PROTO(proto) proto
70 #define YY_PROTO(proto) ()
73 /* Returned upon end-of-file. */
76 /* Promotes a possibly negative, possibly signed char to an unsigned
77 * integer for use as an array index. If the signed char is negative,
78 * we want to instead treat it as an 8-bit unsigned char, hence the
81 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
83 /* Enter a start condition. This macro really ought to take a parameter,
84 * but we do it the disgusting crufty way forced on us by the ()-less
85 * definition of BEGIN.
87 #define BEGIN yy_start = 1 + 2 *
89 /* Translate the current start state into a value that can be later handed
90 * to BEGIN to return to the state. The YYSTATE alias is for lex
93 #define YY_START ((yy_start - 1) / 2)
94 #define YYSTATE YY_START
96 /* Action number for EOF rule of a given start state. */
97 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
99 /* Special action meaning "start processing a new file". */
100 #define YY_NEW_FILE yyrestart( yyin )
102 #define YY_END_OF_BUFFER_CHAR 0
104 /* Size of default input buffer. */
105 #define YY_BUF_SIZE 16384
107 typedef struct yy_buffer_state *YY_BUFFER_STATE;
110 extern FILE *yyin, *yyout;
112 #define EOB_ACT_CONTINUE_SCAN 0
113 #define EOB_ACT_END_OF_FILE 1
114 #define EOB_ACT_LAST_MATCH 2
116 /* The funky do-while in the following #define is used to turn the definition
117 * int a single C statement (which needs a semi-colon terminator). This
118 * avoids problems with code like:
120 * if ( condition_holds )
123 * do_something_else();
125 * Prior to using the do-while the compiler would get upset at the
126 * "else" because it interpreted the "if" statement as being all
127 * done when it reached the ';' after the yyless() call.
130 /* Return all but the first 'n' matched characters back to the input stream. */
135 /* Undo effects of setting up yytext. */ \
136 *yy_cp = yy_hold_char; \
137 YY_RESTORE_YY_MORE_OFFSET \
138 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
139 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
143 #define unput(c) yyunput( c, yytext_ptr )
145 /* The following is because we cannot portably get our hands on size_t
146 * (without autoconf's help, which isn't available because we want
147 * flex-generated scanners to compile on their own).
149 typedef unsigned int yy_size_t;
152 struct yy_buffer_state
156 char *yy_ch_buf; /* input buffer */
157 char *yy_buf_pos; /* current position in input buffer */
159 /* Size of input buffer in bytes, not including room for EOB
162 yy_size_t yy_buf_size;
164 /* Number of characters read into yy_ch_buf, not including EOB
169 /* Whether we "own" the buffer - i.e., we know we created it,
170 * and can realloc() it to grow it, and should free() it to
173 int yy_is_our_buffer;
175 /* Whether this is an "interactive" input source; if so, and
176 * if we're using stdio for input, then we want to use getc()
177 * instead of fread(), to make sure we stop fetching input after
180 int yy_is_interactive;
182 /* Whether we're considered to be at the beginning of a line.
183 * If so, '^' rules will be active on the next match, otherwise
188 /* Whether to try to fill the input buffer when we reach the
193 int yy_buffer_status;
194 #define YY_BUFFER_NEW 0
195 #define YY_BUFFER_NORMAL 1
196 /* When an EOF's been seen but there's still some text to process
197 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
198 * shouldn't try reading from the input source any more. We might
199 * still have a bunch of tokens to match, though, because of
200 * possible backing-up.
202 * When we actually see the EOF, we change the status to "new"
203 * (via yyrestart()), so that the user can continue scanning by
204 * just pointing yyin at a new input file.
206 #define YY_BUFFER_EOF_PENDING 2
209 static YY_BUFFER_STATE yy_current_buffer = 0;
211 /* We provide macros for accessing buffer states in case in the
212 * future we want to put the buffer states in a more general
215 #define YY_CURRENT_BUFFER yy_current_buffer
218 /* yy_hold_char holds the character lost when yytext is formed. */
219 static char yy_hold_char;
221 static int yy_n_chars; /* number of characters read into yy_ch_buf */
226 /* Points to current character in buffer. */
227 static char *yy_c_buf_p = (char *) 0;
228 static int yy_init = 1; /* whether we need to initialize */
229 static int yy_start = 0; /* start state number */
231 /* Flag which is used to allow yywrap()'s to do buffer switches
232 * instead of setting up a fresh yyin. A bit of a hack ...
234 static int yy_did_buffer_switch_on_eof;
236 void yyrestart YY_PROTO(( FILE *input_file ));
238 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
239 void yy_load_buffer_state YY_PROTO(( void ));
240 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
241 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
242 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
243 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
244 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
246 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
247 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
248 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
250 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
251 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
252 static void yy_flex_free YY_PROTO(( void * ));
254 #define yy_new_buffer yy_create_buffer
256 #define yy_set_interactive(is_interactive) \
258 if ( ! yy_current_buffer ) \
259 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
260 yy_current_buffer->yy_is_interactive = is_interactive; \
263 #define yy_set_bol(at_bol) \
265 if ( ! yy_current_buffer ) \
266 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
267 yy_current_buffer->yy_at_bol = at_bol; \
270 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
272 typedef unsigned char YY_CHAR;
273 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
274 typedef int yy_state_type;
276 #define yytext_ptr yytext
278 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
279 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
280 static int yy_get_next_buffer YY_PROTO(( void ));
281 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
283 /* Done after the current pattern has been matched and before the
284 * corresponding action - sets up yytext.
286 #define YY_DO_BEFORE_ACTION \
287 yytext_ptr = yy_bp; \
288 yyleng = (int) (yy_cp - yy_bp); \
289 yy_hold_char = *yy_cp; \
293 #define YY_NUM_RULES 20
294 #define YY_END_OF_BUFFER 21
295 static yyconst short int yy_accept[110] =
297 0, 0, 21, 7, 7, 7, 7, 0, 0, 0,
298 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
299 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
300 0, 0, 0, 0, 11, 0, 0, 9, 13, 0,
301 0, 4, 0, 0, 0, 0, 0, 6, 0, 0,
302 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
303 12, 14, 0, 0, 0, 0, 0, 0, 0, 17,
304 0, 5, 8, 0, 0, 15, 0, 0, 0, 0,
305 0, 10, 0, 0, 0, 0, 0, 0, 0, 0,
306 18, 0, 0, 0, 0, 0, 0, 0, 0, 0,
308 19, 2, 0, 0, 16, 0, 0, 1, 0
311 static yyconst int yy_ec[256] =
313 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
314 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
316 1, 3, 1, 4, 1, 1, 1, 1, 1, 1,
317 1, 1, 1, 1, 1, 1, 5, 6, 6, 6,
318 6, 6, 6, 6, 6, 6, 6, 1, 1, 7,
319 8, 9, 1, 1, 10, 11, 12, 13, 14, 15,
320 1, 1, 16, 1, 1, 17, 18, 19, 20, 1,
321 1, 21, 22, 23, 24, 25, 1, 26, 1, 1,
322 1, 1, 1, 1, 1, 1, 27, 28, 29, 30,
324 31, 32, 1, 1, 33, 1, 1, 34, 1, 35,
325 36, 37, 1, 38, 39, 40, 41, 1, 1, 1,
326 42, 1, 1, 1, 1, 1, 1, 1, 1, 1,
327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
328 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
330 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
331 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
336 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
338 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
343 static yyconst int yy_meta[43] =
345 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,
346 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
347 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
348 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
352 static yyconst short int yy_base[113] =
354 0, 1, 136, 137, 38, 99, 96, 0, 113, 116,
355 121, 106, 115, 0, 97, 0, 94, 90, 94, 0,
356 98, 105, 99, 104, 99, 81, 0, 82, 75, 108,
357 85, 2, 98, 91, 137, 101, 1, 137, 137, 78,
358 76, 137, 74, 71, 103, 64, 71, 137, 78, 80,
359 89, 1, 82, 73, 137, 60, 67, 0, 88, 87,
360 137, 137, 85, 72, 74, 79, 63, 50, 81, 0,
361 2, 137, 137, 74, 65, 137, 52, 47, 80, 37,
362 43, 137, 59, 50, 72, 73, 36, 56, 67, 71,
363 68, 36, 43, 57, 44, 59, 33, 49, 55, 32,
365 48, 137, 29, 13, 137, 18, 3, 137, 137, 68,
369 static yyconst short int yy_def[113] =
371 110, 110, 109, 109, 109, 109, 109, 109, 109, 109,
372 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
373 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
374 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
375 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
376 109, 109, 109, 109, 109, 109, 109, 111, 109, 109,
377 109, 109, 109, 109, 109, 109, 109, 109, 109, 111,
378 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
379 109, 109, 109, 109, 109, 109, 109, 109, 112, 109,
380 109, 109, 109, 112, 109, 109, 109, 109, 109, 109,
382 109, 109, 109, 109, 109, 109, 109, 109, 0, 109,
386 static yyconst short int yy_nxt[180] =
388 70, 109, 109, 80, 80, 109, 5, 5, 81, 25,
389 64, 28, 52, 109, 33, 109, 53, 109, 34, 109,
390 65, 109, 29, 109, 109, 109, 26, 18, 41, 19,
391 47, 42, 109, 48, 6, 6, 109, 109, 80, 80,
392 7, 7, 8, 81, 108, 99, 99, 107, 106, 9,
393 100, 105, 10, 101, 11, 12, 99, 99, 13, 104,
394 103, 100, 14, 102, 101, 95, 98, 15, 4, 4,
395 94, 94, 97, 91, 96, 95, 93, 92, 91, 90,
396 89, 88, 87, 86, 85, 84, 83, 82, 79, 78,
397 77, 76, 75, 74, 73, 72, 71, 69, 68, 67,
399 66, 63, 62, 61, 60, 59, 58, 57, 56, 55,
400 54, 51, 50, 49, 46, 45, 44, 43, 40, 39,
401 38, 37, 36, 35, 32, 31, 30, 27, 24, 23,
402 22, 21, 20, 17, 16, 109, 3, 109, 109, 109,
403 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
404 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
405 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
406 109, 109, 109, 109, 109, 109, 109, 109, 109
409 static yyconst short int yy_chk[180] =
411 111, 0, 0, 71, 71, 0, 1, 2, 71, 14,
412 52, 16, 37, 0, 20, 0, 37, 0, 20, 0,
413 52, 0, 16, 0, 0, 0, 14, 8, 27, 8,
414 32, 27, 0, 32, 1, 2, 0, 0, 80, 80,
415 1, 2, 5, 80, 107, 95, 95, 106, 104, 5,
416 95, 103, 5, 101, 5, 5, 99, 99, 5, 100,
417 98, 99, 5, 97, 96, 94, 93, 5, 110, 110,
418 112, 112, 92, 91, 90, 89, 88, 87, 86, 85,
419 84, 83, 81, 79, 78, 77, 75, 74, 69, 68,
420 67, 66, 65, 64, 63, 60, 59, 57, 56, 54,
422 53, 51, 50, 49, 47, 46, 45, 44, 43, 41,
423 40, 36, 34, 33, 31, 30, 29, 28, 26, 25,
424 24, 23, 22, 21, 19, 18, 17, 15, 13, 12,
425 11, 10, 9, 7, 6, 3, 109, 109, 109, 109,
426 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
427 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
428 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
429 109, 109, 109, 109, 109, 109, 109, 109, 109
432 static yy_state_type yy_last_accepting_state;
433 static char *yy_last_accepting_cpos;
435 /* The intent behind this definition is that it'll catch
436 * any uses of REJECT which flex missed.
438 #define REJECT reject_used_but_not_detected
439 #define yymore() yymore_used_but_not_detected
440 #define YY_MORE_ADJ 0
441 #define YY_RESTORE_YY_MORE_OFFSET
445 /******************************************************************/
446 /* Copyright (C) 2000, HELM Team */
448 /* This file is part of HELM, an Hypertextual, Electronic */
449 /* Library of Mathematics, developed at the Computer Science */
450 /* Department, University of Bologna, Italy. */
452 /* HELM is free software; you can redistribute it and/or */
453 /* modify it under the terms of the GNU General Public License */
454 /* as published by the Free Software Foundation; either version */
455 /* 2 of the License, or (at your option) any later version. */
457 /* HELM is distributed in the hope that it will be useful, */
458 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
459 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
460 /* GNU General Public License for more details. */
462 /* You should have received a copy of the GNU General Public */
463 /* License along with HELM; if not, write to the Free Software */
464 /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, */
465 /* MA 02111-1307, USA. */
467 /* For details, see the HELM World-Wide-Web page, */
468 /* http://cs.unibo.it/helm/. */
469 /******************************************************************/
470 /***************************************************************/
472 /* Automatic Metadata Extractor */
473 /* First draft 11/12/2001, by Andrea Asperti */
474 /* more bugs added by domenico lordi on mon 12/17/2001 */
475 /***************************************************************/
476 /***************************************************************/
477 /* 1. Inclusion of header files. */
478 /***************************************************************/
479 #line 39 "meta_lex.l"
482 #include <sys/stat.h>
483 #include "sthandler.h"
484 /***************************************************************/
485 /* 2. Constants and Variables Definitions */
486 /***************************************************************/
487 #line 50 "meta_lex.l"
491 #define MUTCONSTRUCT 3
506 int found = NOTFOUND;
507 int position = INBODY;
508 int first_child = HERE;
509 int skip = 0; // boolean to skip the insertion of a URI
510 int no_open_source =0;
513 char *xpointer = "#xpointer(1/";
516 /***************************************************************/
517 /* 3. Regular definitions. */
518 /***************************************************************/
519 /***************************************************************/
521 /***************************************************************/
524 /* Macros after this point can all be overridden by user definitions in
528 #ifndef YY_SKIP_YYWRAP
530 extern "C" int yywrap YY_PROTO(( void ));
532 extern int yywrap YY_PROTO(( void ));
537 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
541 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
544 #ifdef YY_NEED_STRLEN
545 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
550 static int yyinput YY_PROTO(( void ));
552 static int input YY_PROTO(( void ));
557 static int yy_start_stack_ptr = 0;
558 static int yy_start_stack_depth = 0;
559 static int *yy_start_stack = 0;
560 #ifndef YY_NO_PUSH_STATE
561 static void yy_push_state YY_PROTO(( int new_state ));
563 #ifndef YY_NO_POP_STATE
564 static void yy_pop_state YY_PROTO(( void ));
566 #ifndef YY_NO_TOP_STATE
567 static int yy_top_state YY_PROTO(( void ));
571 #define YY_NO_PUSH_STATE 1
572 #define YY_NO_POP_STATE 1
573 #define YY_NO_TOP_STATE 1
576 #ifdef YY_MALLOC_DECL
584 /* Just try to get by without declaring the routines. This will fail
585 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
586 * or sizeof(void*) != sizeof(int).
591 /* Amount of stuff to slurp up with each read. */
592 #ifndef YY_READ_BUF_SIZE
593 #define YY_READ_BUF_SIZE 8192
596 /* Copy whatever the last rule matched to the standard output. */
599 /* This used to be an fputs(), but since the string might contain NUL's,
600 * we now use fwrite().
602 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
605 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
606 * is returned in "result".
609 #define YY_INPUT(buf,result,max_size) \
610 if ( yy_current_buffer->yy_is_interactive ) \
613 for ( n = 0; n < max_size && \
614 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
617 buf[n++] = (char) c; \
618 if ( c == EOF && ferror( yyin ) ) \
619 YY_FATAL_ERROR( "input in flex scanner failed" ); \
625 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
627 if( errno != EINTR) \
629 YY_FATAL_ERROR( "input in flex scanner failed" ); \
638 /* No semi-colon after return; correct usage is to write "yyterminate();" -
639 * we don't want an extra ';' after the "return" because that will cause
640 * some compilers to complain about unreachable statements.
643 #define yyterminate() return YY_NULL
646 /* Number of entries by which start-condition stack grows. */
647 #ifndef YY_START_STACK_INCR
648 #define YY_START_STACK_INCR 25
651 /* Report a fatal error. */
652 #ifndef YY_FATAL_ERROR
653 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
656 /* Default declaration of generated scanner - a define so the user can
657 * easily add parameters.
660 #define YY_DECL int yylex YY_PROTO(( void ))
663 /* Code executed at the beginning of each rule, after yytext and yyleng
666 #ifndef YY_USER_ACTION
667 #define YY_USER_ACTION
670 /* Code executed at the end of each rule. */
672 #define YY_BREAK break;
675 #define YY_RULE_SETUP \
680 register yy_state_type yy_current_state;
681 register char *yy_cp, *yy_bp;
684 #line 92 "meta_lex.l"
698 yy_start = 1; /* first start state */
706 if ( ! yy_current_buffer )
708 yy_create_buffer( yyin, YY_BUF_SIZE );
710 yy_load_buffer_state();
713 while ( 1 ) /* loops until end-of-file is reached */
717 /* Support of yytext. */
718 *yy_cp = yy_hold_char;
720 /* yy_bp points to the position in yy_ch_buf of the start of
725 yy_current_state = yy_start;
729 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
730 if ( yy_accept[yy_current_state] )
732 yy_last_accepting_state = yy_current_state;
733 yy_last_accepting_cpos = yy_cp;
735 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
737 yy_current_state = (int) yy_def[yy_current_state];
738 if ( yy_current_state >= 110 )
739 yy_c = yy_meta[(unsigned int) yy_c];
741 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
744 while ( yy_base[yy_current_state] != 137 );
747 yy_act = yy_accept[yy_current_state];
749 { /* have to back up */
750 yy_cp = yy_last_accepting_cpos;
751 yy_current_state = yy_last_accepting_state;
752 yy_act = yy_accept[yy_current_state];
758 do_action: /* This label is used only to access EOF actions. */
762 { /* beginning of action switch */
763 case 0: /* must back up */
764 /* undo the effects of YY_DO_BEFORE_ACTION */
765 *yy_cp = yy_hold_char;
766 yy_cp = yy_last_accepting_cpos;
767 yy_current_state = yy_last_accepting_state;
772 #line 94 "meta_lex.l"
774 position = INBODY; // Variables have both a body and a type
779 #line 98 "meta_lex.l"
781 position = INTYPE; // Variables have both a body and a type
785 #line 103 "meta_lex.l"
788 #line 103 "meta_lex.l"
790 if ((position == INTYPE) ||
797 #line 111 "meta_lex.l"
800 #line 111 "meta_lex.l"
802 if (position == INHYP)
805 if (no_open_source == 0)
807 first_child = HERE; };
813 #line 122 "meta_lex.l"
818 #line 126 "meta_lex.l"
820 #line 127 "meta_lex.l"
822 #line 128 "meta_lex.l"
824 #line 129 "meta_lex.l"
827 #line 129 "meta_lex.l"
834 #line 133 "meta_lex.l"
842 #line 138 "meta_lex.l"
844 if (position == INTYPE) /* CONST on the spine */
851 #line 144 "meta_lex.l"
853 if (position == INTYPE) /* MUTIND on the spine */
860 #line 150 "meta_lex.l"
862 if (position == INTYPE) /* MUTCONSTRUCT on the spine */
864 where = MUTCONSTRUCT;
869 #line 156 "meta_lex.l"
872 uri=(char *)malloc((sizeof('a')*200));
877 search(uri,first_child,position);
887 #line 171 "meta_lex.l"
889 if ((where == MUTIND) || (where == MUTCONSTRUCT))
890 { strsep(&yytext,&sep);
891 tmp=(char *)malloc((sizeof(sep)*(strlen(yytext)+1)));
894 sprintf(tmp,"%d",tmp_n);
895 strcat(uri,"#xpointer(1/");
901 search(uri,first_child,position);
905 first_child = AFTER;};
910 #line 191 "meta_lex.l"
912 if (where == MUTCONSTRUCT)
913 { strsep(&yytext,&sep);
914 tmp=(char *)malloc((sizeof(sep)*(strlen(yytext)+1)));
919 search(uri,first_child,position);
923 first_child = AFTER;};
928 #line 208 "meta_lex.l"
932 case YY_STATE_EOF(INITIAL):
935 case YY_END_OF_BUFFER:
937 /* Amount of text matched not including the EOB char. */
938 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
940 /* Undo the effects of YY_DO_BEFORE_ACTION. */
941 *yy_cp = yy_hold_char;
942 YY_RESTORE_YY_MORE_OFFSET
944 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
946 /* We're scanning a new file or input source. It's
947 * possible that this happened because the user
948 * just pointed yyin at a new source and called
949 * yylex(). If so, then we have to assure
950 * consistency between yy_current_buffer and our
951 * globals. Here is the right place to do so, because
952 * this is the first action (other than possibly a
953 * back-up) that will match for the new input source.
955 yy_n_chars = yy_current_buffer->yy_n_chars;
956 yy_current_buffer->yy_input_file = yyin;
957 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
960 /* Note that here we test for yy_c_buf_p "<=" to the position
961 * of the first EOB in the buffer, since yy_c_buf_p will
962 * already have been incremented past the NUL character
963 * (since all states make transitions on EOB to the
964 * end-of-buffer state). Contrast this with the test
967 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
968 { /* This was really a NUL. */
969 yy_state_type yy_next_state;
971 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
973 yy_current_state = yy_get_previous_state();
975 /* Okay, we're now positioned to make the NUL
976 * transition. We couldn't have
977 * yy_get_previous_state() go ahead and do it
978 * for us because it doesn't know how to deal
979 * with the possibility of jamming (and we don't
980 * want to build jamming into it because then it
981 * will run more slowly).
984 yy_next_state = yy_try_NUL_trans( yy_current_state );
986 yy_bp = yytext_ptr + YY_MORE_ADJ;
990 /* Consume the NUL. */
991 yy_cp = ++yy_c_buf_p;
992 yy_current_state = yy_next_state;
1003 else switch ( yy_get_next_buffer() )
1005 case EOB_ACT_END_OF_FILE:
1007 yy_did_buffer_switch_on_eof = 0;
1011 /* Note: because we've taken care in
1012 * yy_get_next_buffer() to have set up
1013 * yytext, we can now set up
1014 * yy_c_buf_p so that if some total
1015 * hoser (like flex itself) wants to
1016 * call the scanner after we return the
1017 * YY_NULL, it'll still work - another
1018 * YY_NULL will get returned.
1020 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1022 yy_act = YY_STATE_EOF(YY_START);
1028 if ( ! yy_did_buffer_switch_on_eof )
1034 case EOB_ACT_CONTINUE_SCAN:
1036 yytext_ptr + yy_amount_of_matched_text;
1038 yy_current_state = yy_get_previous_state();
1041 yy_bp = yytext_ptr + YY_MORE_ADJ;
1044 case EOB_ACT_LAST_MATCH:
1046 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1048 yy_current_state = yy_get_previous_state();
1051 yy_bp = yytext_ptr + YY_MORE_ADJ;
1052 goto yy_find_action;
1059 "fatal flex scanner internal error--no action found" );
1060 } /* end of action switch */
1061 } /* end of scanning one token */
1062 } /* end of yylex */
1065 /* yy_get_next_buffer - try to read in a new buffer
1067 * Returns a code representing an action:
1068 * EOB_ACT_LAST_MATCH -
1069 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1070 * EOB_ACT_END_OF_FILE - end of file
1073 static int yy_get_next_buffer()
1075 register char *dest = yy_current_buffer->yy_ch_buf;
1076 register char *source = yytext_ptr;
1077 register int number_to_move, i;
1080 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1082 "fatal flex scanner internal error--end of buffer missed" );
1084 if ( yy_current_buffer->yy_fill_buffer == 0 )
1085 { /* Don't try to fill the buffer, so this is an EOF. */
1086 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1088 /* We matched a single character, the EOB, so
1089 * treat this as a final EOF.
1091 return EOB_ACT_END_OF_FILE;
1096 /* We matched some text prior to the EOB, first
1099 return EOB_ACT_LAST_MATCH;
1103 /* Try to read more data. */
1105 /* First move last chars to start of buffer. */
1106 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1108 for ( i = 0; i < number_to_move; ++i )
1109 *(dest++) = *(source++);
1111 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1112 /* don't do the read, it's not guaranteed to return an EOF,
1115 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1120 yy_current_buffer->yy_buf_size - number_to_move - 1;
1122 while ( num_to_read <= 0 )
1123 { /* Not enough room in the buffer - grow it. */
1124 #ifdef YY_USES_REJECT
1126 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1129 /* just a shorter name for the current buffer */
1130 YY_BUFFER_STATE b = yy_current_buffer;
1132 int yy_c_buf_p_offset =
1133 (int) (yy_c_buf_p - b->yy_ch_buf);
1135 if ( b->yy_is_our_buffer )
1137 int new_size = b->yy_buf_size * 2;
1139 if ( new_size <= 0 )
1140 b->yy_buf_size += b->yy_buf_size / 8;
1142 b->yy_buf_size *= 2;
1144 b->yy_ch_buf = (char *)
1145 /* Include room in for 2 EOB chars. */
1146 yy_flex_realloc( (void *) b->yy_ch_buf,
1147 b->yy_buf_size + 2 );
1150 /* Can't grow it, we don't own it. */
1153 if ( ! b->yy_ch_buf )
1155 "fatal error - scanner input buffer overflow" );
1157 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1159 num_to_read = yy_current_buffer->yy_buf_size -
1164 if ( num_to_read > YY_READ_BUF_SIZE )
1165 num_to_read = YY_READ_BUF_SIZE;
1167 /* Read in more data. */
1168 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1169 yy_n_chars, num_to_read );
1171 yy_current_buffer->yy_n_chars = yy_n_chars;
1174 if ( yy_n_chars == 0 )
1176 if ( number_to_move == YY_MORE_ADJ )
1178 ret_val = EOB_ACT_END_OF_FILE;
1184 ret_val = EOB_ACT_LAST_MATCH;
1185 yy_current_buffer->yy_buffer_status =
1186 YY_BUFFER_EOF_PENDING;
1191 ret_val = EOB_ACT_CONTINUE_SCAN;
1193 yy_n_chars += number_to_move;
1194 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1195 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1197 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1203 /* yy_get_previous_state - get the state just before the EOB char was reached */
1205 static yy_state_type yy_get_previous_state()
1207 register yy_state_type yy_current_state;
1208 register char *yy_cp;
1210 yy_current_state = yy_start;
1212 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1214 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1215 if ( yy_accept[yy_current_state] )
1217 yy_last_accepting_state = yy_current_state;
1218 yy_last_accepting_cpos = yy_cp;
1220 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1222 yy_current_state = (int) yy_def[yy_current_state];
1223 if ( yy_current_state >= 110 )
1224 yy_c = yy_meta[(unsigned int) yy_c];
1226 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1229 return yy_current_state;
1233 /* yy_try_NUL_trans - try to make a transition on the NUL character
1236 * next_state = yy_try_NUL_trans( current_state );
1239 #ifdef YY_USE_PROTOS
1240 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1242 static yy_state_type yy_try_NUL_trans( yy_current_state )
1243 yy_state_type yy_current_state;
1246 register int yy_is_jam;
1247 register char *yy_cp = yy_c_buf_p;
1249 register YY_CHAR yy_c = 1;
1250 if ( yy_accept[yy_current_state] )
1252 yy_last_accepting_state = yy_current_state;
1253 yy_last_accepting_cpos = yy_cp;
1255 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1257 yy_current_state = (int) yy_def[yy_current_state];
1258 if ( yy_current_state >= 110 )
1259 yy_c = yy_meta[(unsigned int) yy_c];
1261 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1262 yy_is_jam = (yy_current_state == 109);
1264 return yy_is_jam ? 0 : yy_current_state;
1269 #ifdef YY_USE_PROTOS
1270 static void yyunput( int c, register char *yy_bp )
1272 static void yyunput( c, yy_bp )
1274 register char *yy_bp;
1277 register char *yy_cp = yy_c_buf_p;
1279 /* undo effects of setting up yytext */
1280 *yy_cp = yy_hold_char;
1282 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1283 { /* need to shift things up to make room */
1284 /* +2 for EOB chars. */
1285 register int number_to_move = yy_n_chars + 2;
1286 register char *dest = &yy_current_buffer->yy_ch_buf[
1287 yy_current_buffer->yy_buf_size + 2];
1288 register char *source =
1289 &yy_current_buffer->yy_ch_buf[number_to_move];
1291 while ( source > yy_current_buffer->yy_ch_buf )
1292 *--dest = *--source;
1294 yy_cp += (int) (dest - source);
1295 yy_bp += (int) (dest - source);
1296 yy_current_buffer->yy_n_chars =
1297 yy_n_chars = yy_current_buffer->yy_buf_size;
1299 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1300 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1303 *--yy_cp = (char) c;
1307 yy_hold_char = *yy_cp;
1310 #endif /* ifndef YY_NO_UNPUT */
1314 static int yyinput()
1321 *yy_c_buf_p = yy_hold_char;
1323 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1325 /* yy_c_buf_p now points to the character we want to return.
1326 * If this occurs *before* the EOB characters, then it's a
1327 * valid NUL; if not, then we've hit the end of the buffer.
1329 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1330 /* This was really a NUL. */
1334 { /* need more input */
1335 int offset = yy_c_buf_p - yytext_ptr;
1338 switch ( yy_get_next_buffer() )
1340 case EOB_ACT_LAST_MATCH:
1341 /* This happens because yy_g_n_b()
1342 * sees that we've accumulated a
1343 * token and flags that we need to
1344 * try matching the token before
1345 * proceeding. But for input(),
1346 * there's no matching to consider.
1347 * So convert the EOB_ACT_LAST_MATCH
1348 * to EOB_ACT_END_OF_FILE.
1351 /* Reset buffer status. */
1356 case EOB_ACT_END_OF_FILE:
1361 if ( ! yy_did_buffer_switch_on_eof )
1370 case EOB_ACT_CONTINUE_SCAN:
1371 yy_c_buf_p = yytext_ptr + offset;
1377 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1378 *yy_c_buf_p = '\0'; /* preserve yytext */
1379 yy_hold_char = *++yy_c_buf_p;
1386 #ifdef YY_USE_PROTOS
1387 void yyrestart( FILE *input_file )
1389 void yyrestart( input_file )
1393 if ( ! yy_current_buffer )
1394 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1396 yy_init_buffer( yy_current_buffer, input_file );
1397 yy_load_buffer_state();
1401 #ifdef YY_USE_PROTOS
1402 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1404 void yy_switch_to_buffer( new_buffer )
1405 YY_BUFFER_STATE new_buffer;
1408 if ( yy_current_buffer == new_buffer )
1411 if ( yy_current_buffer )
1413 /* Flush out information for old buffer. */
1414 *yy_c_buf_p = yy_hold_char;
1415 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1416 yy_current_buffer->yy_n_chars = yy_n_chars;
1419 yy_current_buffer = new_buffer;
1420 yy_load_buffer_state();
1422 /* We don't actually know whether we did this switch during
1423 * EOF (yywrap()) processing, but the only time this flag
1424 * is looked at is after yywrap() is called, so it's safe
1425 * to go ahead and always set it.
1427 yy_did_buffer_switch_on_eof = 1;
1431 #ifdef YY_USE_PROTOS
1432 void yy_load_buffer_state( void )
1434 void yy_load_buffer_state()
1437 yy_n_chars = yy_current_buffer->yy_n_chars;
1438 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1439 yyin = yy_current_buffer->yy_input_file;
1440 yy_hold_char = *yy_c_buf_p;
1444 #ifdef YY_USE_PROTOS
1445 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1447 YY_BUFFER_STATE yy_create_buffer( file, size )
1454 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1456 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1458 b->yy_buf_size = size;
1460 /* yy_ch_buf has to be 2 characters longer than the size given because
1461 * we need to put in 2 end-of-buffer characters.
1463 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1464 if ( ! b->yy_ch_buf )
1465 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1467 b->yy_is_our_buffer = 1;
1469 yy_init_buffer( b, file );
1475 #ifdef YY_USE_PROTOS
1476 void yy_delete_buffer( YY_BUFFER_STATE b )
1478 void yy_delete_buffer( b )
1485 if ( b == yy_current_buffer )
1486 yy_current_buffer = (YY_BUFFER_STATE) 0;
1488 if ( b->yy_is_our_buffer )
1489 yy_flex_free( (void *) b->yy_ch_buf );
1491 yy_flex_free( (void *) b );
1498 #ifndef YY_ALWAYS_INTERACTIVE
1499 #ifndef YY_NEVER_INTERACTIVE
1500 extern int isatty YY_PROTO(( int ));
1505 #ifdef YY_USE_PROTOS
1506 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1508 void yy_init_buffer( b, file )
1515 yy_flush_buffer( b );
1517 b->yy_input_file = file;
1518 b->yy_fill_buffer = 1;
1520 #if YY_ALWAYS_INTERACTIVE
1521 b->yy_is_interactive = 1;
1523 #if YY_NEVER_INTERACTIVE
1524 b->yy_is_interactive = 0;
1526 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1532 #ifdef YY_USE_PROTOS
1533 void yy_flush_buffer( YY_BUFFER_STATE b )
1535 void yy_flush_buffer( b )
1545 /* We always need two end-of-buffer characters. The first causes
1546 * a transition to the end-of-buffer state. The second causes
1547 * a jam in that state.
1549 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1550 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1552 b->yy_buf_pos = &b->yy_ch_buf[0];
1555 b->yy_buffer_status = YY_BUFFER_NEW;
1557 if ( b == yy_current_buffer )
1558 yy_load_buffer_state();
1562 #ifndef YY_NO_SCAN_BUFFER
1563 #ifdef YY_USE_PROTOS
1564 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1566 YY_BUFFER_STATE yy_scan_buffer( base, size )
1574 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1575 base[size-1] != YY_END_OF_BUFFER_CHAR )
1576 /* They forgot to leave room for the EOB's. */
1579 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1581 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1583 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1584 b->yy_buf_pos = b->yy_ch_buf = base;
1585 b->yy_is_our_buffer = 0;
1586 b->yy_input_file = 0;
1587 b->yy_n_chars = b->yy_buf_size;
1588 b->yy_is_interactive = 0;
1590 b->yy_fill_buffer = 0;
1591 b->yy_buffer_status = YY_BUFFER_NEW;
1593 yy_switch_to_buffer( b );
1600 #ifndef YY_NO_SCAN_STRING
1601 #ifdef YY_USE_PROTOS
1602 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1604 YY_BUFFER_STATE yy_scan_string( yy_str )
1605 yyconst char *yy_str;
1609 for ( len = 0; yy_str[len]; ++len )
1612 return yy_scan_bytes( yy_str, len );
1617 #ifndef YY_NO_SCAN_BYTES
1618 #ifdef YY_USE_PROTOS
1619 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1621 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1622 yyconst char *bytes;
1631 /* Get memory for full buffer, including space for trailing EOB's. */
1633 buf = (char *) yy_flex_alloc( n );
1635 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1637 for ( i = 0; i < len; ++i )
1640 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1642 b = yy_scan_buffer( buf, n );
1644 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1646 /* It's okay to grow etc. this buffer, and we should throw it
1647 * away when we're done.
1649 b->yy_is_our_buffer = 1;
1656 #ifndef YY_NO_PUSH_STATE
1657 #ifdef YY_USE_PROTOS
1658 static void yy_push_state( int new_state )
1660 static void yy_push_state( new_state )
1664 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1668 yy_start_stack_depth += YY_START_STACK_INCR;
1669 new_size = yy_start_stack_depth * sizeof( int );
1671 if ( ! yy_start_stack )
1672 yy_start_stack = (int *) yy_flex_alloc( new_size );
1675 yy_start_stack = (int *) yy_flex_realloc(
1676 (void *) yy_start_stack, new_size );
1678 if ( ! yy_start_stack )
1680 "out of memory expanding start-condition stack" );
1683 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1690 #ifndef YY_NO_POP_STATE
1691 static void yy_pop_state()
1693 if ( --yy_start_stack_ptr < 0 )
1694 YY_FATAL_ERROR( "start-condition stack underflow" );
1696 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1701 #ifndef YY_NO_TOP_STATE
1702 static int yy_top_state()
1704 return yy_start_stack[yy_start_stack_ptr - 1];
1708 #ifndef YY_EXIT_FAILURE
1709 #define YY_EXIT_FAILURE 2
1712 #ifdef YY_USE_PROTOS
1713 static void yy_fatal_error( yyconst char msg[] )
1715 static void yy_fatal_error( msg )
1719 (void) fprintf( stderr, "%s\n", msg );
1720 exit( YY_EXIT_FAILURE );
1725 /* Redefine yyless() so it works in section 3 code. */
1731 /* Undo effects of setting up yytext. */ \
1732 yytext[yyleng] = yy_hold_char; \
1733 yy_c_buf_p = yytext + n; \
1734 yy_hold_char = *yy_c_buf_p; \
1735 *yy_c_buf_p = '\0'; \
1741 /* Internal utility routines. */
1744 #ifdef YY_USE_PROTOS
1745 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1747 static void yy_flex_strncpy( s1, s2, n )
1754 for ( i = 0; i < n; ++i )
1759 #ifdef YY_NEED_STRLEN
1760 #ifdef YY_USE_PROTOS
1761 static int yy_flex_strlen( yyconst char *s )
1763 static int yy_flex_strlen( s )
1768 for ( n = 0; s[n]; ++n )
1776 #ifdef YY_USE_PROTOS
1777 static void *yy_flex_alloc( yy_size_t size )
1779 static void *yy_flex_alloc( size )
1783 return (void *) malloc( size );
1786 #ifdef YY_USE_PROTOS
1787 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1789 static void *yy_flex_realloc( ptr, size )
1794 /* The cast to (char *) in the following accommodates both
1795 * implementations that use char* generic pointers, and those
1796 * that use void* generic pointers. It works with the latter
1797 * because both ANSI C and C++ allow castless assignment from
1798 * any pointer type to void*, and deal with argument conversions
1799 * as though doing an assignment.
1801 return (void *) realloc( (char *) ptr, size );
1804 #ifdef YY_USE_PROTOS
1805 static void yy_flex_free( void *ptr )
1807 static void yy_flex_free( ptr )
1821 #line 208 "meta_lex.l"
1824 /***************************************************************/
1825 /* 6. Auxiliary functions. */
1826 /***************************************************************/
1828 main(int argc, char *argv[])
1831 init_symbol_table();
1833 // We process the body
1834 if (!stat("tmp/body.xml",&buf)) {
1835 yyin = fopen("tmp/body.xml", "r");
1841 // We process the type
1842 yyin = fopen("tmp/type.xml", "r");
1847 printf("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n");
1848 printf("<rdf:RDF xml:lang=\"en\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:h=\"http://www.cs.unibo.it/helm/schemas/mattone.rdf#\">\n");
1849 printf("\t<h:Object rdf:about=\"");
1850 printf("%s",argv[1]);
1853 printf("\t</h:Object>\n");
1854 printf("</rdf:RDF>\n");
1858 search(uri,first_child,position)
1863 if (first_child == HERE)
1865 if (position == INHYP)
1866 found = search_bucket(uri,MAINHYP);
1867 else if (position == INCONCL)
1868 found = search_bucket(uri,MAINCONCL);
1869 /* if (found == NOTFOUND)
1870 printf( "pos = %d, uri = %s\n", MAINCONCL, uri); */
1872 else found = search_bucket(uri,position);
1873 /* if (found == NOTFOUND)
1874 printf( "pos = %d, uri = %s\n", position, uri); */