X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmetadata%2Fcreate_V7_mowgli%2FMETADATA%2Fmeta_lex.l;fp=helm%2Fmetadata%2Fcreate_V7_mowgli%2FMETADATA%2Fmeta_lex.l;h=0000000000000000000000000000000000000000;hb=c7514aaa249a96c5fdd39b1123fbdb38d92f20b6;hp=eca7c383d6a1a96568d20a31521b3ca7d82b75c5;hpb=1c7fb836e2af4f2f3d18afd0396701f2094265ff;p=helm.git diff --git a/helm/metadata/create_V7_mowgli/METADATA/meta_lex.l b/helm/metadata/create_V7_mowgli/METADATA/meta_lex.l deleted file mode 100644 index eca7c383d..000000000 --- a/helm/metadata/create_V7_mowgli/METADATA/meta_lex.l +++ /dev/null @@ -1,363 +0,0 @@ - /******************************************************************/ - /* Copyright (C) 2000, HELM Team */ - /* */ - /* This file is part of HELM, an Hypertextual, Electronic */ - /* Library of Mathematics, developed at the Computer Science */ - /* Department, University of Bologna, Italy. */ - /* */ - /* HELM is free software; you can redistribute it and/or */ - /* modify it under the terms of the GNU General Public License */ - /* as published by the Free Software Foundation; either version */ - /* 2 of the License, or (at your option) any later version. */ - /* */ - /* HELM is distributed in the hope that it will be useful, */ - /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ - /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ - /* GNU General Public License for more details. */ - /* */ - /* You should have received a copy of the GNU General Public */ - /* License along with HELM; if not, write to the Free Software */ - /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, */ - /* MA 02111-1307, USA. */ - /* */ - /* For details, see the HELM World-Wide-Web page, */ - /* http://cs.unibo.it/helm/. */ - /******************************************************************/ - - /***************************************************************/ - /* META_LEXAN */ - /* Automatic Metadata Extractor */ - /* First draft 11/12/2001, by Andrea Asperti */ - /* more bugs added by domenico lordi on mon 12/17/2001 */ - /***************************************************************/ - - /***************************************************************/ - /* 1. Inclusion of header files. */ - /***************************************************************/ - -%{ -#include -#include -#include -#include "sthandler.h" -%} - - /***************************************************************/ - /* 2. Constants and Variables Definitions */ - /***************************************************************/ - -%{ -#define NOWHERE 0 -#define CONST 1 -#define MUTIND 2 -#define MUTCONSTRUCT 3 -#define SORT 4 - -#define INBODY 0 -#define MAINHYP 1 -#define INHYP 2 -#define INCONCL 3 -#define MAINCONCL 4 -#define INTYPE 5 -#define NOTFOUND 6 - -#define HERE 0 -#define AFTER 1 - - -int where = NOWHERE; -int found = NOTFOUND; -int position = INBODY; -int first_child = HERE; -int skip = 0; // boolean to skip the insertion of a URI -int no_open_source =0; -int spine_depth = 0; -int depth = 0; -int tmp_n; -char sep = '"'; -char *xpointer = "#xpointer(1/"; -char *uri; -char *tmp; -%} - - /***************************************************************/ - /* 3. Regular definitions. */ - /***************************************************************/ - -uri [^"]+ -digits [0-9]+ -value [^"]+ - - /***************************************************************/ - /* 4. Rules. */ - /***************************************************************/ - - -%% - -"]*">"(" "|\n)*""(" "|\n)*"" | -"\n\n"); -printf(" - - - - ]>\n"); - - printf("\n"); - printf("\t\n"); - print_all(argv[1],outrel,outsort); - printf("\t\n"); - printf("\n"); - fclose(yyin); - } - -search(uri,first_child,position,depth) -char *uri; -int first_child; -int position; -{ - if (position == MAINHYP) - { - if (first_child == HERE) - found = search_bucket(uri,MAINHYP,depth); - else - found = search_bucket(uri,INHYP,0); - } - else if (position == INCONCL) - { - if (first_child == HERE) - found = search_bucket(uri,MAINCONCL,depth); - else - found = search_bucket(uri,INCONCL,0); - } - - else - found = search_bucket(uri,position,depth); - /* if (found == NOTFOUND) - fprintf(stderr,"pos = %d, uri = %s\n", position, uri); */ -} -/* - (first_child == HERE) - { - if (position == MAINHYP) - found = search_bucket(uri,MAINHYP,depth); - else if (position == INCONCL) - found = search_bucket(uri,MAINCONCL,0); - else if (position == INHYP) - found = search_bucket(uri,INHYP,0); - if (found == NOTFOUND) - printf( "pos = %d, uri = %s\n", MAINCONCL, uri); - } - else if ((position == MAINHYP) && (first_child == AFTER)) - found = search_bucket(uri,INHYP,0); - else found = search_bucket(uri,position,0); - if (found == NOTFOUND) - printf( "pos = %d, uri = %s\n", position, uri); - } */ - -int yywrap() { - return 1; - } -