From ad58dca2aab6317110d1c778e00eaec68d2671c0 Mon Sep 17 00:00:00 2001 From: Liang Chang Date: Sat, 11 Dec 2021 05:40:20 +0800 Subject: [PATCH] DtMmdb: repair lex source in schema dir. --- cde/programs/dtinfo/DtMmdb/schema/Makefile.am | 14 + .../dtinfo/DtMmdb/schema/object_dict.C | 7 - cde/programs/dtinfo/DtMmdb/schema/sheet.C | 810 ---------- cde/programs/dtinfo/DtMmdb/schema/sheet.tab.h | 64 - .../DtMmdb/schema/{sheet.yacc => sheet.yy} | 6 +- cde/programs/dtinfo/DtMmdb/schema/token.C | 1324 ----------------- .../DtMmdb/schema/{token.lex => token.ll} | 7 +- 7 files changed, 20 insertions(+), 2212 deletions(-) delete mode 100644 cde/programs/dtinfo/DtMmdb/schema/sheet.C delete mode 100644 cde/programs/dtinfo/DtMmdb/schema/sheet.tab.h rename cde/programs/dtinfo/DtMmdb/schema/{sheet.yacc => sheet.yy} (98%) delete mode 100644 cde/programs/dtinfo/DtMmdb/schema/token.C rename cde/programs/dtinfo/DtMmdb/schema/{token.lex => token.ll} (95%) diff --git a/cde/programs/dtinfo/DtMmdb/schema/Makefile.am b/cde/programs/dtinfo/DtMmdb/schema/Makefile.am index c9991baae..5574d3382 100644 --- a/cde/programs/dtinfo/DtMmdb/schema/Makefile.am +++ b/cde/programs/dtinfo/DtMmdb/schema/Makefile.am @@ -7,3 +7,17 @@ libschema_la_CXXFLAGS = -I.. libschema_la_SOURCES = desc.C store_desc.C object_dict.C stored_object_desc.C \ index_desc.C inv_desc.C agent_desc.C container_desc.C \ sheet.C token.C + +AM_YFLAGS = -l -d +AM_LFLAGS = -8 -s + +CLEANFILES = sheet.C \ + sheet.tab.h \ + token.C + +sheet.C: sheet.yy + $(YACC) $(AM_YFLAGS) -p schema -b sheet $< + mv sheet.tab.c $@ + +token.C: token.ll + $(LEX) $(AM_LFLAGS) -P schema -o $@ $< diff --git a/cde/programs/dtinfo/DtMmdb/schema/object_dict.C b/cde/programs/dtinfo/DtMmdb/schema/object_dict.C index 1bb227c89..3f8edddbe 100644 --- a/cde/programs/dtinfo/DtMmdb/schema/object_dict.C +++ b/cde/programs/dtinfo/DtMmdb/schema/object_dict.C @@ -507,13 +507,6 @@ void schemaerror( char* errorstr ) return; } -extern "C" { -int schemawrap() -{ - return( 1 ); -} -} - //void yyerror( char* errorstr ) //{ // extern int linecount; diff --git a/cde/programs/dtinfo/DtMmdb/schema/sheet.C b/cde/programs/dtinfo/DtMmdb/schema/sheet.C deleted file mode 100644 index f65225a1d..000000000 --- a/cde/programs/dtinfo/DtMmdb/schema/sheet.C +++ /dev/null @@ -1,810 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -// $TOG: sheet.C /main/4 1997/12/23 11:20:35 bill $ -#ifndef lint -__attribute__((unused)) -static const char schemasccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/90"; -#endif -#define schemaBYACC 1 - -#include -#include -#include "utility/funcs.h" -#include "schema/store_desc.h" -#include "schema/index_desc.h" -#include "schema/inv_desc.h" -#include "schema/agent_desc.h" -#include "schema/container_desc.h" - -extern desc* desc_ptr; -extern desc* last_desc_ptr; - -#define CAST_TO_STORED_OBJECT(x) ((stored_object_desc*)x) -#define CAST_TO_PAGE_STORE(x) ((page_store_desc*)x) - -#define CAST_TO_INDEX(x) ((index_desc*)x) -#define CAST_TO_MPHF_INDEX(x) ((index_desc*)x) -#define CAST_TO_SMPHF_INDEX(x) ((smphf_index_desc*)x) - -#define CAST_TO_INV(x) ((inv_desc*)x) - -#define CAST_TO_MPHF(x) ((mphf_desc*)x) -#define CAST_TO_SMPHF(x) ((smphf_desc*)x) -#define CAST_TO_BTREE(x) ((btree_desc*)x) - -#define CAST_TO_CONTAINER(x) ((container_desc*)x) - -#undef alloca -#define alloca(x) (malloc(x)) - -extern void schemaerror(char*); -extern int schemalex(); - -#undef schemawrap - -typedef union -{ - char *string; - int integer; - desc* trans; - page_store_desc* ps_trans; -} schemaSTYPE; -#define TOKEN 257 -#define CONTAINER 258 -#define SET 259 -#define LIST 260 -#define INDEX_NAME 261 -#define INV 262 -#define COMPRESS 263 -#define INV_NAME 264 -#define AGENT_NAME 265 -#define STORE_NAME 266 -#define POSITION 267 -#define INDEX 268 -#define MPHF_INDEX 269 -#define SMPHF_INDEX 270 -#define BTREE_INDEX 271 -#define INDEX_AGENT 272 -#define MPHF 273 -#define SMPHF 274 -#define BTREE 275 -#define HUFFMAN 276 -#define DICT 277 -#define EQUAL 278 -#define NUMBER 279 -#define STORE 280 -#define PAGE_STORE 281 -#define NM 282 -#define V_OID 283 -#define MODE 284 -#define PAGE_SZ 285 -#define CACHED_PAGES 286 -#undef BYTE_ORDER -#define BYTE_ORDER 287 -#define SEPARATOR 288 -#define schemaERRCODE 256 -short schemalhs[] = { -1, - 0, 1, 1, 2, 2, 2, 2, 2, 2, 3, - 4, 6, 7, 5, 8, 15, 16, 16, 16, 17, - 18, 18, 19, 19, 19, 20, 20, 9, 9, 10, - 10, 12, 12, 13, 13, 11, 11, 14, 14, 21, - 21, 21, 21, 25, 25, 26, 26, 22, 22, 27, - 27, 27, 23, 23, 24, 24, -}; -short schemalen[] = { 2, - 1, 2, 1, 2, 2, 2, 2, 2, 2, 3, - 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, - 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, - 3, 3, 3, 1, 3, 3, 3, 3, 1, 3, - 3, 1, 3, 1, 3, 1, -}; -short schemadefred[] = { 0, - 0, 0, 0, 0, 0, 0, 0, 1, 0, 26, - 27, 9, 0, 20, 6, 0, 21, 22, 7, 0, - 17, 18, 19, 5, 0, 23, 25, 24, 8, 0, - 16, 4, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 56, 0, 54, 12, 0, - 13, 0, 0, 0, 0, 11, 0, 52, 49, 14, - 0, 0, 0, 0, 0, 10, 0, 40, 44, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 53, 46, 47, - 38, 32, 34, 50, 51, 48, 30, 36, 45, 43, - 41, 42, 28, -}; -short schemadgoto[] = { 7, - 8, 9, 32, 24, 29, 15, 19, 12, 66, 56, - 60, 49, 51, 45, 33, 25, 16, 20, 30, 13, - 67, 57, 46, 47, 68, 48, 59, -}; -short schemasindex[] = { -250, - -206, -260, -221, -219, -254, -272, 0, 0, -250, 0, - 0, 0, -277, 0, 0, -243, 0, 0, 0, -231, - 0, 0, 0, 0, -230, 0, 0, 0, 0, -229, - 0, 0, -228, 0, -251, -249, -249, -241, -249, -247, - -217, -216, -215, -214, 0, 0, -223, 0, 0, -222, - 0, -220, -211, -209, -208, 0, -213, 0, 0, 0, - -212, -207, -205, -204, -201, 0, -210, 0, 0, -185, - -178, -177, -176, -251, -249, -249, -175, -174, -232, -241, - -249, -173, -194, -193, -170, -247, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -}; -short schemarindex[] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, - 0, 14, 0, 0, 0, 0, 16, 0, 0, 0, - 27, 0, 0, 0, 0, 0, 29, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -}; -short schemagindex[] = { 0, - 79, 0, 0, 0, 0, 0, 0, 0, 4, 9, - 10, 17, 18, 19, 0, 0, 0, 0, 0, 0, - 0, 0, -32, 0, 0, -40, 0, -}; -#define schemaTABLESIZE 309 -short schematable[] = { 69, - 39, 14, 33, 50, 52, 58, 61, 1, 31, 41, - 35, 2, 3, 35, 42, 31, 42, 4, 26, 27, - 28, 5, 53, 54, 42, 55, 37, 3, 29, 6, - 43, 44, 43, 44, 43, 44, 62, 63, 64, 65, - 43, 44, 50, 52, 36, 69, 96, 58, 61, 21, - 22, 23, 10, 11, 17, 18, 37, 38, 39, 40, - 70, 71, 72, 73, 74, 75, 77, 76, 78, 79, - 82, 87, 83, 84, 80, 81, 85, 86, 88, 89, - 90, 94, 95, 99, 100, 101, 102, 34, 97, 103, - 98, 92, 91, 93, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, - 33, 0, 39, 39, 33, 33, 0, 0, 39, 0, - 33, 35, 39, 31, 33, 35, 35, 31, 31, 0, - 39, 35, 33, 31, 37, 35, 29, 31, 37, 37, - 29, 29, 0, 35, 37, 31, 29, 0, 37, 0, - 29, 0, 0, 0, 0, 0, 37, 0, 29, -}; -short schemacheck[] = { 40, - 0, 262, 0, 36, 37, 38, 39, 258, 281, 261, - 288, 262, 263, 0, 266, 0, 266, 268, 273, 274, - 275, 272, 264, 265, 266, 267, 0, 0, 0, 280, - 282, 283, 282, 283, 282, 283, 284, 285, 286, 287, - 282, 283, 75, 76, 288, 86, 279, 80, 81, 269, - 270, 271, 259, 260, 276, 277, 288, 288, 288, 288, - 278, 278, 278, 278, 288, 288, 278, 288, 278, 278, - 278, 257, 278, 278, 288, 288, 278, 288, 257, 257, - 257, 257, 257, 257, 279, 279, 257, 9, 80, 86, - 81, 75, 74, 76, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 258, -1, - 258, -1, 262, 263, 262, 263, -1, -1, 268, -1, - 268, 258, 272, 258, 272, 262, 263, 262, 263, -1, - 280, 268, 280, 268, 258, 272, 258, 272, 262, 263, - 262, 263, -1, 280, 268, 280, 268, -1, 272, -1, - 272, -1, -1, -1, -1, -1, 280, -1, 280, -}; -#define schemaFINAL 7 -#ifndef schemaDEBUG -#define schemaDEBUG 0 -#endif -#define schemaMAXTOKEN 288 -#if schemaDEBUG -char * schemaname[] = { -"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"TOKEN","CONTAINER","SET","LIST", -"INDEX_NAME","INV","COMPRESS","INV_NAME","AGENT_NAME","STORE_NAME","POSITION", -"INDEX","MPHF_INDEX","SMPHF_INDEX","BTREE_INDEX","INDEX_AGENT","MPHF","SMPHF", -"BTREE","HUFFMAN","DICT","EQUAL","NUMBER","STORE","PAGE_STORE","NM","V_OID", -"MODE","PAGE_SZ","CACHED_PAGES","BYTE_ORDER","SEPARATOR", -}; -char * schemarule[] = { -"$accept : Sheet", -"Sheet : DescriptionList", -"DescriptionList : Description DescriptionList", -"DescriptionList : Description", -"Description : STORE Store_description", -"Description : INDEX Index_description", -"Description : INV Inv_description", -"Description : COMPRESS Compress_description", -"Description : INDEX_AGENT Index_Agent_description", -"Description : CONTAINER Container_description", -"Store_description : Page_Store_Head SEPARATOR Page_store_descriptions", -"Index_description : Index_Head SEPARATOR MPHF_index_descriptions", -"Inv_description : Inv_Head SEPARATOR Inv_descriptions", -"Compress_description : Compress_Head SEPARATOR Compress_descriptions", -"Index_Agent_description : Index_Agent_Head SEPARATOR Hash_descriptions", -"Container_description : Container_Head SEPARATOR Container_descriptions", -"Page_Store_Head : PAGE_STORE", -"Index_Head : MPHF_INDEX", -"Index_Head : SMPHF_INDEX", -"Index_Head : BTREE_INDEX", -"Inv_Head : INV", -"Compress_Head : HUFFMAN", -"Compress_Head : DICT", -"Index_Agent_Head : MPHF", -"Index_Agent_Head : BTREE", -"Index_Agent_Head : SMPHF", -"Container_Head : SET", -"Container_Head : LIST", -"Page_store_descriptions : Page_Store_Term SEPARATOR Page_store_descriptions", -"Page_store_descriptions : Page_Store_Term", -"MPHF_index_descriptions : MPHF_Index_Term SEPARATOR MPHF_index_descriptions", -"MPHF_index_descriptions : MPHF_Index_Term", -"Inv_descriptions : Stored_Object_Term SEPARATOR Inv_descriptions", -"Inv_descriptions : Stored_Object_Term", -"Compress_descriptions : Stored_Object_Term SEPARATOR Compress_descriptions", -"Compress_descriptions : Stored_Object_Term", -"Hash_descriptions : Stored_Object_Term SEPARATOR Hash_descriptions", -"Hash_descriptions : Stored_Object_Term", -"Container_descriptions : Container_Term SEPARATOR Container_descriptions", -"Container_descriptions : Container_Term", -"Page_Store_Term : Store_Term", -"Page_Store_Term : CACHED_PAGES EQUAL NUMBER", -"Page_Store_Term : BYTE_ORDER EQUAL TOKEN", -"Page_Store_Term : PAGE_SZ EQUAL NUMBER", -"Store_Term : Term", -"Store_Term : MODE EQUAL TOKEN", -"Term : NM EQUAL TOKEN", -"Term : V_OID EQUAL TOKEN", -"MPHF_Index_Term : POSITION EQUAL NUMBER", -"MPHF_Index_Term : Index_Term", -"Index_Term : INV_NAME EQUAL TOKEN", -"Index_Term : AGENT_NAME EQUAL TOKEN", -"Index_Term : Stored_Object_Term", -"Stored_Object_Term : STORE_NAME EQUAL TOKEN", -"Stored_Object_Term : Term", -"Container_Term : INDEX_NAME EQUAL TOKEN", -"Container_Term : Stored_Object_Term", -}; -#endif -#define schemaclearin ( schemachar=(-1)) -#define schemaerrok ( schemaerrflag=0) -#ifdef schemaSTACKSIZE -#ifndef schemaMAXDEPTH -#define schemaMAXDEPTH schemaSTACKSIZE -#endif -#else -#ifdef schemaMAXDEPTH -#define schemaSTACKSIZE schemaMAXDEPTH -#else -#define schemaSTACKSIZE 500 -#define schemaMAXDEPTH 500 -#endif -#endif -int schemadebug; -int schemanerrs; -int schemaerrflag; -int schemachar; -short * schemassp; - schemaSTYPE * schemavsp; - schemaSTYPE schemaval; - schemaSTYPE schemalval; -short schemass[ schemaSTACKSIZE]; - schemaSTYPE schemavs[ schemaSTACKSIZE]; -#define schemastacksize schemaSTACKSIZE -#define schemaABORT goto schemaabort -#define schemaACCEPT goto schemaaccept -#define schemaERROR goto schemaerrlab -#if schemaDEBUG -#ifndef __cplusplus -extern char *getenv(const char *); -#endif -#endif -int - schemaparse() -{ - int schemam, scheman, schemastate; -#if schemaDEBUG - char * schemas; - - if ( schemas = getenv("schemaDEBUG")) - { - scheman = * schemas; - if ( scheman >= '0' && scheman <= '9') - schemadebug = scheman - '0'; - } -#endif - - schemanerrs = 0; - schemaerrflag = 0; - schemachar = (-1); - - schemassp = schemass; - schemavsp = schemavs; - * schemassp = schemastate = 0; - - schemaloop: - if ( (scheman = schemadefred[ schemastate])) goto schemareduce; - if ( schemachar < 0) - { - if (( schemachar = schemalex()) < 0) schemachar = 0; -#if schemaDEBUG - if ( schemadebug) - { - schemas = 0; - if ( schemachar <= schemaMAXTOKEN) schemas = schemaname[ schemachar]; - if (! schemas) schemas = "illegal-symbol"; - printf(" schemadebug: state %d, reading %d (%s)\n", schemastate, - schemachar, schemas); - } -#endif - } - if (( scheman = schemasindex[ schemastate]) && ( scheman += schemachar) >= 0 && - scheman <= schemaTABLESIZE && schemacheck[ scheman] == schemachar) - { -#if schemaDEBUG - if ( schemadebug) - printf(" schemadebug: state %d, shifting to state %d\n", - schemastate, schematable[ scheman]); -#endif - if ( schemassp >= schemass + schemastacksize - 1) - { - goto schemaoverflow; - } - *++ schemassp = schemastate = schematable[ scheman]; - *++ schemavsp = schemalval; - schemachar = (-1); - if ( schemaerrflag > 0) -- schemaerrflag; - goto schemaloop; - } - if (( scheman = schemarindex[ schemastate]) && ( scheman += schemachar) >= 0 && - scheman <= schemaTABLESIZE && schemacheck[ scheman] == schemachar) - { - scheman = schematable[ scheman]; - goto schemareduce; - } - if ( schemaerrflag) goto schemainrecovery; -#if 0 /* remove if needed */ -#ifdef lint - goto schemanewerror; -#endif - schemanewerror: -#endif - schemaerror((char*)"syntax error"); -#if 0 /* remove if needed */ -#ifdef lint - goto schemaerrlab; -#endif - schemaerrlab: -#endif - ++ schemanerrs; - schemainrecovery: - if ( schemaerrflag < 3) - { - schemaerrflag = 3; - for (;;) - { - if (( scheman = schemasindex[* schemassp]) && ( scheman += schemaERRCODE) >= 0 && - scheman <= schemaTABLESIZE && schemacheck[ scheman] == schemaERRCODE) - { -#if schemaDEBUG - if ( schemadebug) - printf(" schemadebug: state %d, error recovery shifting\ - to state %d\n", * schemassp, schematable[ scheman]); -#endif - if ( schemassp >= schemass + schemastacksize - 1) - { - goto schemaoverflow; - } - *++ schemassp = schemastate = schematable[ scheman]; - *++ schemavsp = schemalval; - goto schemaloop; - } - else - { -#if schemaDEBUG - if ( schemadebug) - printf(" schemadebug: error recovery discarding state %d\n", - * schemassp); -#endif - if ( schemassp <= schemass) goto schemaabort; - -- schemassp; - -- schemavsp; - } - } - } - else - { - if ( schemachar == 0) goto schemaabort; -#if schemaDEBUG - if ( schemadebug) - { - schemas = 0; - if ( schemachar <= schemaMAXTOKEN) schemas = schemaname[ schemachar]; - if (! schemas) schemas = "illegal-symbol"; - printf(" schemadebug: state %d, error recovery discards token %d (%s)\n", - schemastate, schemachar, schemas); - } -#endif - schemachar = (-1); - goto schemaloop; - } - schemareduce: -#if schemaDEBUG - if ( schemadebug) - printf(" schemadebug: state %d, reducing by rule %d (%s)\n", - schemastate, scheman, schemarule[ scheman]); -#endif - schemam = schemalen[ scheman]; - schemaval = schemavsp[1- schemam]; - switch ( scheman) - { -case 1: -{ - /*$1 -> asciiOutList(cerr);*/ - desc_ptr = schemavsp[0].trans; - } -break; -case 2: -{ - schemavsp[-1].trans -> set_next_desc( schemavsp[0].trans); - schemaval.trans = schemavsp[-1].trans; - } -break; -case 3: -{ - schemavsp[0].trans -> set_next_desc(0); - last_desc_ptr = schemavsp[0].trans; - schemaval.trans = schemavsp[0].trans; - } -break; -case 4: -{ - schemaval.trans = schemavsp[0].trans; - } -break; -case 5: -{ - schemaval.trans = schemavsp[0].trans; - } -break; -case 6: -{ - schemaval.trans = schemavsp[0].trans; - } -break; -case 7: -{ - schemaval.trans = schemavsp[0].trans; - } -break; -case 8: -{ - schemaval.trans = schemavsp[0].trans; - } -break; -case 9: -{ - schemaval.trans = schemavsp[0].trans; - } -break; -case 10: -{ - schemaval.trans = desc_ptr; - } -break; -case 11: -{ - schemaval.trans = desc_ptr; - } -break; -case 12: -{ - schemaval.trans = desc_ptr; - } -break; -case 13: -{ - schemaval.trans = desc_ptr; - } -break; -case 14: -{ - schemaval.trans = desc_ptr; - } -break; -case 15: -{ - schemaval.trans = desc_ptr; - } -break; -case 16: -{ - desc_ptr = new page_store_desc; - } -break; -case 17: -{ - desc_ptr= new mphf_index_desc; - } -break; -case 18: -{ - desc_ptr= new smphf_index_desc; - } -break; -case 19: -{ - desc_ptr= new btree_index_desc; - } -break; -case 20: -{ - desc_ptr= new inv_desc; - } -break; -case 21: -{ - desc_ptr= new huffman_desc; - } -break; -case 22: -{ - desc_ptr= new dict_desc; - } -break; -case 23: -{ - desc_ptr= new mphf_desc; - } -break; -case 24: -{ - desc_ptr= new btree_desc; - } -break; -case 25: -{ - desc_ptr= new smphf_desc; - } -break; -case 26: -{ - desc_ptr= new set_desc; - } -break; -case 27: -{ - desc_ptr= new list_desc; - } -break; -case 28: -{ - } -break; -case 29: -{ - } -break; -case 30: -{ - } -break; -case 31: -{ - } -break; -case 32: -{ - } -break; -case 33: -{ - } -break; -case 34: -{ - } -break; -case 35: -{ - } -break; -case 36: -{ - } -break; -case 37: -{ - } -break; -case 38: -{ - } -break; -case 39: -{ - } -break; -case 40: -{ - } -break; -case 41: -{ - CAST_TO_PAGE_STORE(desc_ptr) -> set_cached_pages( schemavsp[0].integer); - } -break; -case 42: -{ - CAST_TO_PAGE_STORE(desc_ptr) -> set_order( schemavsp[0].string); - } -break; -case 43: -{ - CAST_TO_PAGE_STORE(desc_ptr) -> set_page_sz( schemavsp[0].integer); - } -break; -case 44: -{ - } -break; -case 45: -{ - CAST_TO_PAGE_STORE(desc_ptr) -> set_mode( schemavsp[0].string); - } -break; -case 46: -{ - desc_ptr -> set_nm( schemavsp[0].string); - } -break; -case 47: -{ - desc_ptr -> set_oid( schemavsp[0].string); - } -break; -case 48: -{ - CAST_TO_MPHF_INDEX(desc_ptr) -> set_position( schemavsp[0].integer); - } -break; -case 49: -{ - } -break; -case 50: -{ - CAST_TO_INDEX(desc_ptr) -> set_inv_nm( schemavsp[0].string); - } -break; -case 51: -{ - CAST_TO_INDEX(desc_ptr) -> set_agent_nm( schemavsp[0].string); - } -break; -case 52: -{ - } -break; -case 53: -{ - CAST_TO_STORED_OBJECT(desc_ptr) -> set_store_nm( schemavsp[0].string); - } -break; -case 54: -{ - } -break; -case 55: -{ - CAST_TO_CONTAINER(desc_ptr) -> set_index_nm( schemavsp[0].string); - } -break; -case 56: -{ - } -break; - } - schemassp -= schemam; - schemastate = * schemassp; - schemavsp -= schemam; - schemam = schemalhs[ scheman]; - if ( schemastate == 0 && schemam == 0) - { -#if schemaDEBUG - if ( schemadebug) - printf(" schemadebug: after reduction, shifting from state 0 to\ - state %d\n", schemaFINAL); -#endif - schemastate = schemaFINAL; - *++ schemassp = schemaFINAL; - *++ schemavsp = schemaval; - if ( schemachar < 0) - { - if (( schemachar = schemalex()) < 0) schemachar = 0; -#if schemaDEBUG - if ( schemadebug) - { - schemas = 0; - if ( schemachar <= schemaMAXTOKEN) schemas = schemaname[ schemachar]; - if (! schemas) schemas = "illegal-symbol"; - printf(" schemadebug: state %d, reading %d (%s)\n", - schemaFINAL, schemachar, schemas); - } -#endif - } - if ( schemachar == 0) goto schemaaccept; - goto schemaloop; - } - if (( scheman = schemagindex[ schemam]) && ( scheman += schemastate) >= 0 && - scheman <= schemaTABLESIZE && schemacheck[ scheman] == schemastate) - schemastate = schematable[ scheman]; - else - schemastate = schemadgoto[ schemam]; -#if schemaDEBUG - if ( schemadebug) - printf(" schemadebug: after reduction, shifting from state %d \ -to state %d\n", * schemassp, schemastate); -#endif - if ( schemassp >= schemass + schemastacksize - 1) - { - goto schemaoverflow; - } - *++ schemassp = schemastate; - *++ schemavsp = schemaval; - goto schemaloop; - schemaoverflow: - schemaerror((char*)"yacc stack overflow"); - schemaabort: - return (1); - schemaaccept: - return (0); -} diff --git a/cde/programs/dtinfo/DtMmdb/schema/sheet.tab.h b/cde/programs/dtinfo/DtMmdb/schema/sheet.tab.h deleted file mode 100644 index ad7fcca37..000000000 --- a/cde/programs/dtinfo/DtMmdb/schema/sheet.tab.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* $XConsortium: sheet.tab.h /main/3 1996/06/11 17:46:46 cde-hal $ */ -#define TOKEN 257 -#define CONTAINER 258 -#define SET 259 -#define LIST 260 -#define INDEX_NAME 261 -#define INV 262 -#define COMPRESS 263 -#define INV_NAME 264 -#define AGENT_NAME 265 -#define STORE_NAME 266 -#define POSITION 267 -#define INDEX 268 -#define MPHF_INDEX 269 -#define SMPHF_INDEX 270 -#define BTREE_INDEX 271 -#define INDEX_AGENT 272 -#define MPHF 273 -#define SMPHF 274 -#define BTREE 275 -#define HUFFMAN 276 -#define DICT 277 -#define EQUAL 278 -#define NUMBER 279 -#define STORE 280 -#define PAGE_STORE 281 -#define NM 282 -#define V_OID 283 -#define MODE 284 -#define PAGE_SZ 285 -#define CACHED_PAGES 286 -#undef BYTE_ORDER -#define BYTE_ORDER 287 -#define SEPARATOR 288 -typedef union -{ - char *string; - int integer; - desc* trans; - page_store_desc* ps_trans; -} YYSTYPE; -extern YYSTYPE schemalval; diff --git a/cde/programs/dtinfo/DtMmdb/schema/sheet.yacc b/cde/programs/dtinfo/DtMmdb/schema/sheet.yy similarity index 98% rename from cde/programs/dtinfo/DtMmdb/schema/sheet.yacc rename to cde/programs/dtinfo/DtMmdb/schema/sheet.yy index 4c6e9e7a6..0003d1994 100644 --- a/cde/programs/dtinfo/DtMmdb/schema/sheet.yacc +++ b/cde/programs/dtinfo/DtMmdb/schema/sheet.yy @@ -54,8 +54,6 @@ extern desc* last_desc_ptr; #define CAST_TO_CONTAINER(x) ((container_desc*)x) -#define alloca(x) (malloc(x)) - extern void yyerror(char*); extern int yylex(); @@ -103,7 +101,7 @@ extern int yylex(); MODE PAGE_SZ CACHED_PAGES - BYTE_ORDER + ENDIANNESS SEPARATOR %type @@ -306,7 +304,7 @@ Page_Store_Term : Store_Term { CAST_TO_PAGE_STORE(desc_ptr) -> set_cached_pages($3); } - | BYTE_ORDER EQUAL TOKEN + | ENDIANNESS EQUAL TOKEN { CAST_TO_PAGE_STORE(desc_ptr) -> set_order($3); } diff --git a/cde/programs/dtinfo/DtMmdb/schema/token.C b/cde/programs/dtinfo/DtMmdb/schema/token.C deleted file mode 100644 index 842ba7497..000000000 --- a/cde/programs/dtinfo/DtMmdb/schema/token.C +++ /dev/null @@ -1,1324 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/* A lexical scanner generated by flex */ - -/* scanner skeleton version: - * $XConsortium: token.cc /main/4 1996/07/05 15:20:12 rws $ - */ - -#define FLEX_SCANNER - -#include - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include - -#if defined(__linux__) || defined(CSRG_BASED) || defined(sun) -#include -#else -#include -#endif - -/* use prototypes in function declarations */ -#define schema_USE_PROTOS - -/* the "const" storage-class-modifier is valid */ -#define schema_USE_CONST - -#else /* ! __cplusplus */ - -#ifdef __STDC__ - -#ifdef __GNUC__ -#include -void *malloc( size_t ); -void free( void* ); -#else -#include -#endif /* __GNUC__ */ - -#define schema_USE_PROTOS -#define schema_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - - -#ifdef __TURBOC__ -#define schema_USE_CONST -#endif - - -#ifndef schema_USE_CONST -#define const -#endif - - -#ifdef schema_USE_PROTOS -#define schema_PROTO(proto) proto -#else -#define schema_PROTO(proto) () -/* we can't get here if it's an ANSI C compiler, or a C++ compiler, - * so it's got to be a K&R compiler, and therefore there's no standard - * place from which to include these definitions - */ -char *malloc(); -int free(); -int read(); -#endif - - -/* amount of stuff to slurp up with each read */ -#ifndef schema_READ_BUF_SIZE -#define schema_READ_BUF_SIZE 8192 -#endif - -/* returned upon end-of-file */ -#define schema_END_TOK 0 - -/* copy whatever the last rule matched to the standard output */ - -/* cast to (char *) is because for 8-bit chars, schematext is (unsigned char *) */ -/* this used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite() - */ -#define ECHO (void) fwrite( (char *) schematext, schemaleng, 1, schemaout ) - -/* gets input and stuffs it into "buf". number of characters read, or schema_NULL, - * is returned in "result". - */ -#define schema_INPUT(buf,result,max_size) \ - if ( (result = read( fileno( schemain), (char *) buf, max_size )) < 0 ) \ - schema_FATAL_ERROR( "read() in flex scanner failed" ); -#define schema_NULL 0 - -/* no semi-colon after return; correct usage is to write " schematerminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#define schematerminate() return ( schema_NULL ) - -/* report a fatal error */ - -/* The funky do-while is used to turn this macro definition into - * a single C statement (which needs a semi-colon terminator). - * This avoids problems with code like: - * - * if ( something_happens ) - * schema_FATAL_ERROR( "oops, the something happened" ); - * else - * everything_okay(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the schema_FATAL_ERROR() call. - */ - -#define schema_FATAL_ERROR(msg) \ - do \ - { \ - (void) fputs( msg, stderr ); \ - (void) putc( '\n', stderr ); \ - exit( 1 ); \ - } \ - while ( 0 ) - -/* default schemawrap function - always treat EOF as an EOF */ -#define schemawrap() 1 - -/* enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN - */ -#define BEGIN schema_start = 1 + 2 * - -/* action number for EOF rule of a given start state */ -#define schema_STATE_EOF(state) ( schema_END_OF_BUFFER + state + 1) - -/* special action meaning "start processing a new file" */ -#define schema_NEW_FILE \ - do \ - { \ - schema_init_buffer( schema_current_buffer, schemain ); \ - schema_load_buffer_state(); \ - } \ - while ( 0 ) - -/* default declaration of generated scanner - a define so the user can - * easily add parameters - */ -#define schema_DECL int schemalex schema_PROTO(( void )) - -/* code executed at the end of each rule */ -#define schema_BREAK break; - -#define schema_END_OF_BUFFER_CHAR 0 - -#ifndef schema_BUF_SIZE -#define schema_BUF_SIZE ( schema_READ_BUF_SIZE * 2) /* size of default input buffer */ -#endif - -typedef struct schema_buffer_state * schema_BUFFER_STATE; - -#define schema_CHAR unsigned char -#define INITIAL 0 -/* -* $XConsortium: token.cc /main/4 1996/07/05 15:20:12 rws $ -* -* Copyright (c) 1993 HAL Computer Systems International, Ltd. -* All rights reserved. Unpublished -- rights reserved under -* the Copyright Laws of the United States. USE OF A COPYRIGHT -* NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION -* OR DISCLOSURE. -* -* THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE -* SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD. USE, -* DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE -* PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS -* INTERNATIONAL, LTD. -* -* RESTRICTED RIGHTS LEGEND -* Use, duplication, or disclosure by the Government is subject -* to the restrictions as set forth in subparagraph (c)(l)(ii) -* of the Rights in Technical Data and Computer Software clause -* at DFARS 252.227-7013. -* -* HAL COMPUTER SYSTEMS INTERNATIONAL, LTD. -* 1315 Dell Avenue -* Campbell, CA 95008 -* -*/ -#include "store_desc.h" -#include "sheet.tab.h" -extern char replace_string[PATHSIZ]; -extern int replace_string_len; - -int linecount = 1; - -/* done after the current pattern has been matched and before the - * corresponding action - sets up schematext - */ -#define schema_DO_BEFORE_ACTION \ - schematext = schema_bp; \ - schemaleng = schema_cp - schema_bp; \ - schema_hold_char = * schema_cp; \ - * schema_cp = '\0'; \ - schema_c_buf_p = schema_cp; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* return all but the first 'n' matched characters back to the input stream */ -#define schemaless(n) \ - do \ - { \ - /* undo effects of setting up schematext */ \ - * schema_cp = schema_hold_char; \ - schema_c_buf_p = schema_cp = schema_bp + n; \ - schema_DO_BEFORE_ACTION; /* set up schematext again */ \ - } \ - while ( 0 ) - -#define unput(c) schemaunput( c, schematext ) - - -struct schema_buffer_state - { - FILE * schema_input_file; - - schema_CHAR * schema_ch_buf; /* input buffer */ - schema_CHAR * schema_buf_pos; /* current position in input buffer */ - - /* size of input buffer in bytes, not including room for EOB characters*/ - int schema_buf_size; - - /* number of characters read into schema_ch_buf, not including EOB characters */ - int schema_n_chars; - - int schema_eof_status; /* whether we've seen an EOF on this buffer */ -#define EOF_NOT_SEEN 0 - /* "pending" happens when the EOF has been seen but there's still - * some text process - */ -#define EOF_PENDING 1 -#define EOF_DONE 2 - }; - -static schema_BUFFER_STATE schema_current_buffer; - -/* we provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state" - */ -#define schema_CURRENT_BUFFER schema_current_buffer - - -/* schema_hold_char holds the character lost when schematext is formed */ -static schema_CHAR schema_hold_char; - -static int schema_n_chars; /* number of characters read into schema_ch_buf */ - - - -#ifndef schema_USER_ACTION -#define schema_USER_ACTION -#endif - -#ifndef schema_USER_INIT -#define schema_USER_INIT -#endif - -extern schema_CHAR * schematext; -extern int schemaleng; -extern FILE * schemain, * schemaout; - - schema_CHAR * schematext; -int schemaleng; - -FILE * schemain = (FILE *) 0, * schemaout = (FILE *) 0; - -#define schema_END_OF_BUFFER 37 -typedef int schema_state_type; -static const short int schema_accept[164] = - { 0, - 0, 0, 37, 36, 32, 31, 35, 34, 30, 29, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 33, 32, 31, 35, 34, 30, 30, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 23, 35, 35, 35, 35, 35, 35, 33, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 5, 35, 35, - 35, 35, 35, 2, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 8, 35, 35, 35, 3, 25, 10, - 35, 35, 35, 35, 35, 35, 11, 35, 35, 35, - 35, 35, 13, 35, 35, 35, 35, 12, 21, 24, - - 35, 35, 35, 35, 35, 35, 35, 35, 17, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 7, 35, 35, 35, 35, 26, 35, 35, 35, 18, - 35, 35, 35, 6, 35, 35, 4, 35, 35, 20, - 35, 19, 35, 35, 35, 1, 35, 35, 35, 35, - 35, 27, 35, 35, 14, 22, 35, 16, 35, 9, - 15, 28, 0 - } ; - -static const schema_CHAR schema_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 1, 4, 5, 1, 1, 1, 1, - 1, 1, 1, 1, 5, 5, 1, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 7, 1, 1, - 8, 1, 1, 1, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 1, 9, 1, 1, 10, 1, 11, 12, 13, 14, - - 15, 16, 17, 18, 19, 5, 5, 20, 21, 22, - 23, 24, 5, 25, 26, 27, 28, 29, 5, 30, - 31, 32, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static const schema_CHAR schema_meta[33] = - { 0, - 1, 1, 2, 1, 3, 3, 1, 1, 1, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3 - } ; - -static const short int schema_base[166] = - { 0, - 0, 174, 177, 179, 174, 172, 0, 168, 30, 179, - 156, 7, 24, 153, 143, 148, 150, 13, 147, 29, - 27, 157, 0, 164, 162, 0, 158, 179, 160, 147, - 136, 133, 146, 22, 145, 141, 27, 130, 141, 136, - 0, 136, 126, 124, 126, 126, 125, 0, 125, 131, - 130, 126, 119, 115, 114, 124, 124, 128, 110, 121, - 119, 119, 114, 0, 114, 106, 111, 102, 113, 117, - 111, 100, 113, 0, 102, 92, 99, 0, 0, 110, - 109, 91, 101, 101, 101, 104, 103, 89, 97, 95, - 90, 97, 97, 85, 86, 78, 84, 92, 91, 0, - - 78, 80, 73, 87, 70, 73, 72, 35, 0, 71, - 18, 69, 72, 68, 68, 66, 73, 62, 59, 69, - 0, 66, 61, 67, 57, 0, 57, 56, 56, 0, - 62, 60, 63, 0, 48, 57, 0, 56, 45, 0, - 55, 0, 53, 42, 49, 0, 43, 34, 48, 47, - 31, 0, 44, 28, 0, 0, 23, 0, 25, 0, - 0, 0, 179, 46, 57 - } ; - -static const short int schema_def[166] = - { 0, - 163, 1, 163, 163, 163, 163, 164, 164, 163, 163, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 165, 163, 163, 164, 164, 163, 163, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 165, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 0, 163, 163 - } ; - -static const short int schema_nxt[212] = - { 0, - 4, 5, 6, 4, 7, 8, 9, 10, 4, 7, - 11, 12, 13, 14, 7, 7, 7, 15, 16, 17, - 18, 19, 7, 20, 7, 21, 7, 7, 22, 7, - 7, 7, 28, 31, 33, 39, 40, 32, 29, 42, - 57, 44, 53, 54, 125, 122, 34, 45, 26, 126, - 162, 43, 161, 46, 160, 58, 123, 48, 159, 48, - 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, - 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, - 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, - 128, 127, 124, 121, 120, 119, 118, 117, 116, 115, - - 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, - 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, - 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, - 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, - 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, - 64, 63, 62, 61, 60, 59, 56, 55, 52, 51, - 50, 49, 28, 27, 25, 24, 47, 41, 38, 37, - 36, 35, 30, 27, 25, 24, 163, 23, 3, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163 - } ; - -static const short int schema_chk[212] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 9, 12, 13, 18, 18, 12, 9, 20, - 37, 21, 34, 34, 111, 108, 13, 21, 164, 111, - 159, 20, 157, 21, 154, 37, 108, 165, 153, 165, - 151, 150, 149, 148, 147, 145, 144, 143, 141, 139, - 138, 136, 135, 133, 132, 131, 129, 128, 127, 125, - 124, 123, 122, 120, 119, 118, 117, 116, 115, 114, - 113, 112, 110, 107, 106, 105, 104, 103, 102, 101, - - 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, - 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, - 77, 76, 75, 73, 72, 71, 70, 69, 68, 67, - 66, 65, 63, 62, 61, 60, 59, 58, 57, 56, - 55, 54, 53, 52, 51, 50, 49, 47, 46, 45, - 44, 43, 42, 40, 39, 38, 36, 35, 33, 32, - 31, 30, 29, 27, 25, 24, 22, 19, 17, 16, - 15, 14, 11, 8, 6, 5, 3, 2, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163 - } ; - -static schema_state_type schema_last_accepting_state; -static schema_CHAR * schema_last_accepting_cpos; - -/* the intent behind this definition is that it'll catch - * any uses of REJECT which flex missed - */ -#define REJECT reject_used_but_not_detected -#define schemamore() schemamore_used_but_not_detected -#define schema_MORE_ADJ 0 - -/* these variables are all declared out here so that section 3 code can - * manipulate them - */ -/* points to current character in buffer */ -static schema_CHAR * schema_c_buf_p = ( schema_CHAR *) 0; -static int schema_init = 1; /* whether we need to initialize */ -static int schema_start = 0; /* start state number */ - -/* flag which is used to allow schemawrap()'s to do buffer switches - * instead of setting up a fresh schemain. A bit of a hack ... - */ -static int schema_did_buffer_switch_on_eof; - -static schema_state_type schema_get_previous_state schema_PROTO(( void )); -static schema_state_type schema_try_NUL_trans schema_PROTO(( schema_state_type current_state )); -static int schema_get_next_buffer schema_PROTO(( void )); -#if 0 -static void schemaunput schema_PROTO(( schema_CHAR c, schema_CHAR *buf_ptr )); -#endif -void schemarestart schema_PROTO(( FILE *input_file )); -void schema_switch_to_buffer schema_PROTO(( schema_BUFFER_STATE new_buffer )); -void schema_load_buffer_state schema_PROTO(( void )); - schema_BUFFER_STATE schema_create_buffer schema_PROTO(( FILE *file, int size )); -void schema_delete_buffer schema_PROTO(( schema_BUFFER_STATE b )); -void schema_init_buffer schema_PROTO(( schema_BUFFER_STATE b, FILE *file )); - -#define schema_new_buffer schema_create_buffer - -#if 0 -#ifdef __cplusplus -static int schemainput schema_PROTO(( void )); -#else -static int input schema_PROTO(( void )); -#endif -#endif - - schema_DECL - { - schema_state_type schema_current_state; - schema_CHAR * schema_cp, * schema_bp; - int schema_act; - - - - - if ( schema_init ) - { - schema_USER_INIT; - - if ( ! schema_start ) - schema_start = 1; /* first start state */ - - if ( ! schemain ) - schemain = stdin; - - if ( ! schemaout ) - schemaout = stdout; - - if ( schema_current_buffer ) - schema_init_buffer( schema_current_buffer, schemain ); - else - schema_current_buffer = schema_create_buffer( schemain, schema_BUF_SIZE ); - - schema_load_buffer_state(); - - schema_init = 0; - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - schema_cp = schema_c_buf_p; - - /* support of schematext */ - * schema_cp = schema_hold_char; - - /* schema_bp points to the position in schema_ch_buf of the start of the - * current run. - */ - schema_bp = schema_cp; - - schema_current_state = schema_start; - if ( schema_bp[-1] == '\n' ) - ++ schema_current_state; - schema_match: - do - { - schema_CHAR schema_c = schema_ec[* schema_cp]; - if ( schema_accept[ schema_current_state] ) - { - schema_last_accepting_state = schema_current_state; - schema_last_accepting_cpos = schema_cp; - } - while ( schema_chk[ schema_base[ schema_current_state] + schema_c] != schema_current_state ) - { - schema_current_state = schema_def[ schema_current_state]; - if ( schema_current_state >= 164 ) - schema_c = schema_meta[ schema_c]; - } - schema_current_state = schema_nxt[ schema_base[ schema_current_state] + schema_c]; - ++ schema_cp; - } - while ( schema_current_state != 163 ); - schema_cp = schema_last_accepting_cpos; - schema_current_state = schema_last_accepting_state; - - schema_find_action: - schema_act = schema_accept[ schema_current_state]; - - schema_DO_BEFORE_ACTION; - schema_USER_ACTION; - -do_action: /* this label is used only to access EOF actions */ - - - switch ( schema_act ) - { - case 0: /* must backtrack */ - /* undo the effects of schema_DO_BEFORE_ACTION */ - * schema_cp = schema_hold_char; - schema_cp = schema_last_accepting_cpos; - schema_current_state = schema_last_accepting_state; - goto schema_find_action; - -case 1: -{ - return(CONTAINER); - } - schema_BREAK -case 2: -{ - return(SET); - } - schema_BREAK -case 3: -{ - return(LIST); - } - schema_BREAK -case 4: -{ - return(INDEX_NAME); - } - schema_BREAK -case 5: -{ - return(INV); - } - schema_BREAK -case 6: -{ - return(COMPRESS); - } - schema_BREAK -case 7: -{ - return(HUFFMAN); - } - schema_BREAK -case 8: -{ - return(DICT); - } - schema_BREAK -case 9: -{ - return(INDEX_AGENT); - } - schema_BREAK -case 10: -{ - return(MPHF); - } - schema_BREAK -case 11: -{ - return(BTREE); - } - schema_BREAK -case 12: -{ - return(SMPHF); - } - schema_BREAK -case 13: -{ - return(INDEX); - } - schema_BREAK -case 14: -{ - return(MPHF_INDEX); - } - schema_BREAK -case 15: -{ - return(SMPHF_INDEX); - } - schema_BREAK -case 16: -{ - return(BTREE_INDEX); - } - schema_BREAK -case 17: -{ - return(INV_NAME); - } - schema_BREAK -case 18: -{ - return(AGENT_NAME); - } - schema_BREAK -case 19: -{ - return(STORE_NAME); - } - schema_BREAK -case 20: -{ - return(POSITION); - } - schema_BREAK -case 21: -{ - return(STORE); - } - schema_BREAK -case 22: -{ - return(PAGE_STORE); - } - schema_BREAK -case 23: -{ - return(NM); - } - schema_BREAK -case 24: -{ - return(V_OID); - } - schema_BREAK -case 25: -{ - return(MODE); - } - schema_BREAK -case 26: -{ - return(PAGE_SZ); - } - schema_BREAK -case 27: -{ - return(BYTE_ORDER); - } - schema_BREAK -case 28: -{ - return(CACHED_PAGES); - } - schema_BREAK -case 29: -{ - return(EQUAL); - } - schema_BREAK -case 30: -{ - return(SEPARATOR); - } - schema_BREAK -case 31: -{ - linecount++; - } - schema_BREAK -case 32: -{ - } - schema_BREAK -case 33: -{ - } - schema_BREAK -case 34: -{ - schemalval.integer = atoi((char*) schematext); - return (NUMBER); - } - schema_BREAK -case 35: -{ - if ( replace_string[0] != 0 && schematext[0] == '$' ) { - int len = MIN(strlen((char*) schematext+1), - (unsigned int)(PATHSIZ - replace_string_len - 1)); - *((char *) memcpy(replace_string + replace_string_len, - (char*) schematext+1, len) + len) = '\0'; - schemalval.string = replace_string; - } else - schemalval.string = (char*) schematext; - return (TOKEN); - } - schema_BREAK -case 36: - schema_FATAL_ERROR( "flex scanner jammed" ); - schema_BREAK -case schema_STATE_EOF(INITIAL): - schematerminate(); - - case schema_END_OF_BUFFER: - { - /* amount of text matched not including the EOB char */ - int schema_amount_of_matched_text = schema_cp - schematext - 1; - - /* undo the effects of schema_DO_BEFORE_ACTION */ - * schema_cp = schema_hold_char; - - /* note that here we test for schema_c_buf_p "<=" to the position - * of the first EOB in the buffer, since schema_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the end- - * of-buffer state). Contrast this with the test in schemainput(). - */ - if ( schema_c_buf_p <= & schema_current_buffer-> schema_ch_buf[ schema_n_chars] ) - /* this was really a NUL */ - { - schema_state_type schema_next_state; - - schema_c_buf_p = schematext + schema_amount_of_matched_text; - - schema_current_state = schema_get_previous_state(); - - /* okay, we're now positioned to make the - * NUL transition. We couldn't have - * schema_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we - * don't want to build jamming into it because - * then it will run more slowly) - */ - - schema_next_state = schema_try_NUL_trans( schema_current_state ); - - schema_bp = schematext + schema_MORE_ADJ; - - if ( schema_next_state ) - { - /* consume the NUL */ - schema_cp = ++ schema_c_buf_p; - schema_current_state = schema_next_state; - goto schema_match; - } - - else - { - schema_cp = schema_last_accepting_cpos; - schema_current_state = schema_last_accepting_state; - goto schema_find_action; - } - } - - else switch ( schema_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - schema_did_buffer_switch_on_eof = 0; - - if ( schemawrap() ) - { - /* note: because we've taken care in - * schema_get_next_buffer() to have set up schematext, - * we can now set up schema_c_buf_p so that if some - * total hoser (like flex itself) wants - * to call the scanner after we return the - * schema_NULL, it'll still work - another schema_NULL - * will get returned. - */ - schema_c_buf_p = schematext + schema_MORE_ADJ; - - schema_act = schema_STATE_EOF(( schema_start - 1) / 2); - goto do_action; - } - - else - { - if ( ! schema_did_buffer_switch_on_eof ) - schema_NEW_FILE; - } - } - break; - - case EOB_ACT_CONTINUE_SCAN: - schema_c_buf_p = schematext + schema_amount_of_matched_text; - - schema_current_state = schema_get_previous_state(); - - schema_cp = schema_c_buf_p; - schema_bp = schematext + schema_MORE_ADJ; - goto schema_match; - - case EOB_ACT_LAST_MATCH: - schema_c_buf_p = - & schema_current_buffer-> schema_ch_buf[ schema_n_chars]; - - schema_current_state = schema_get_previous_state(); - - schema_cp = schema_c_buf_p; - schema_bp = schematext + schema_MORE_ADJ; - goto schema_find_action; - } - break; - } - - default: -#ifdef FLEX_DEBUG - printf( "action # %d\n", schema_act ); -#endif - schema_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } - } - } - - -/* schema_get_next_buffer - try to read in a new buffer - * - * synopsis - * int schema_get_next_buffer(); - * - * returns a code representing an action - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ - -static int schema_get_next_buffer() - - { - schema_CHAR *dest = schema_current_buffer-> schema_ch_buf; - schema_CHAR *source = schematext - 1; /* copy prev. char, too */ - int number_to_move, i; - int ret_val; - - if ( schema_c_buf_p > & schema_current_buffer-> schema_ch_buf[ schema_n_chars + 1] ) - schema_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - /* try to read more data */ - - /* first move last chars to start of buffer */ - number_to_move = schema_c_buf_p - schematext; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( schema_current_buffer-> schema_eof_status != EOF_NOT_SEEN ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - schema_n_chars = 0; - - else - { - int num_to_read = schema_current_buffer-> schema_buf_size - number_to_move - 1; - - if ( num_to_read > schema_READ_BUF_SIZE ) - num_to_read = schema_READ_BUF_SIZE; - - else if ( num_to_read <= 0 ) - schema_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - - /* read in more data */ - schema_INPUT( (& schema_current_buffer-> schema_ch_buf[number_to_move]), - schema_n_chars, num_to_read ); - } - - if ( schema_n_chars == 0 ) - { - if ( number_to_move == 1 ) - { - ret_val = EOB_ACT_END_OF_FILE; - schema_current_buffer-> schema_eof_status = EOF_DONE; - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - schema_current_buffer-> schema_eof_status = EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - schema_n_chars += number_to_move; - schema_current_buffer-> schema_ch_buf[ schema_n_chars] = schema_END_OF_BUFFER_CHAR; - schema_current_buffer-> schema_ch_buf[ schema_n_chars + 1] = schema_END_OF_BUFFER_CHAR; - - /* schematext begins at the second character in schema_ch_buf; the first - * character is the one which preceded it before reading in the latest - * buffer; it needs to be kept around in case it's a newline, so - * schema_get_previous_state() will have with '^' rules active - */ - - schematext = & schema_current_buffer-> schema_ch_buf[1]; - - return ( ret_val ); - } - - -/* schema_get_previous_state - get the state just before the EOB char was reached - * - * synopsis - * schema_state_type schema_get_previous_state(); - */ - -static schema_state_type schema_get_previous_state() - - { - schema_state_type schema_current_state; - schema_CHAR * schema_cp; - - schema_CHAR * schema_bp = schematext; - - schema_current_state = schema_start; - if ( schema_bp[-1] == '\n' ) - ++ schema_current_state; - - for ( schema_cp = schematext + schema_MORE_ADJ; schema_cp < schema_c_buf_p; ++ schema_cp ) - { - schema_CHAR schema_c = (* schema_cp ? schema_ec[* schema_cp] : 1); - if ( schema_accept[ schema_current_state] ) - { - schema_last_accepting_state = schema_current_state; - schema_last_accepting_cpos = schema_cp; - } - while ( schema_chk[ schema_base[ schema_current_state] + schema_c] != schema_current_state ) - { - schema_current_state = schema_def[ schema_current_state]; - if ( schema_current_state >= 164 ) - schema_c = schema_meta[ schema_c]; - } - schema_current_state = schema_nxt[ schema_base[ schema_current_state] + schema_c]; - } - - return ( schema_current_state ); - } - - -/* schema_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = schema_try_NUL_trans( current_state ); - */ - -#ifdef schema_USE_PROTOS -static schema_state_type schema_try_NUL_trans( schema_state_type schema_current_state ) -#else -static schema_state_type schema_try_NUL_trans( schema_current_state ) - schema_state_type schema_current_state; -#endif - - { - int schema_is_jam; - schema_CHAR * schema_cp = schema_c_buf_p; - - schema_CHAR schema_c = 1; - if ( schema_accept[ schema_current_state] ) - { - schema_last_accepting_state = schema_current_state; - schema_last_accepting_cpos = schema_cp; - } - while ( schema_chk[ schema_base[ schema_current_state] + schema_c] != schema_current_state ) - { - schema_current_state = schema_def[ schema_current_state]; - if ( schema_current_state >= 164 ) - schema_c = schema_meta[ schema_c]; - } - schema_current_state = schema_nxt[ schema_base[ schema_current_state] + schema_c]; - schema_is_jam = ( schema_current_state == 163); - - return ( schema_is_jam ? 0 : schema_current_state ); - } - - -#if 0 -#ifdef schema_USE_PROTOS -static void schemaunput( schema_CHAR c, schema_CHAR * schema_bp ) -#else -static void schemaunput( c, schema_bp ) - schema_CHAR c; - schema_CHAR * schema_bp; -#endif - - { - schema_CHAR * schema_cp = schema_c_buf_p; - - /* undo effects of setting up schematext */ - * schema_cp = schema_hold_char; - - if ( schema_cp < schema_current_buffer-> schema_ch_buf + 2 ) - { /* need to shift things up to make room */ - int number_to_move = schema_n_chars + 2; /* +2 for EOB chars */ - schema_CHAR *dest = - & schema_current_buffer-> schema_ch_buf[ schema_current_buffer-> schema_buf_size + 2]; - schema_CHAR *source = - & schema_current_buffer-> schema_ch_buf[number_to_move]; - - while ( source > schema_current_buffer-> schema_ch_buf ) - *--dest = *--source; - - schema_cp += dest - source; - schema_bp += dest - source; - schema_n_chars = schema_current_buffer-> schema_buf_size; - - if ( schema_cp < schema_current_buffer-> schema_ch_buf + 2 ) - schema_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - if ( schema_cp > schema_bp && schema_cp[-1] == '\n' ) - schema_cp[-2] = '\n'; - - *-- schema_cp = c; - - /* note: the formal parameter *must* be called " schema_bp" for this - * macro to now work correctly - */ - schema_DO_BEFORE_ACTION; /* set up schematext again */ - } -#endif - - -#if 0 -#ifdef __cplusplus -static int schemainput() -#else -static int input() -#endif - - { - int c; - schema_CHAR * schema_cp = schema_c_buf_p; - - * schema_cp = schema_hold_char; - - if ( * schema_c_buf_p == schema_END_OF_BUFFER_CHAR ) - { - /* schema_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( schema_c_buf_p < & schema_current_buffer-> schema_ch_buf[ schema_n_chars] ) - /* this was really a NUL */ - * schema_c_buf_p = '\0'; - - else - { /* need more input */ - schematext = schema_c_buf_p; - ++ schema_c_buf_p; - - switch ( schema_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - if ( schemawrap() ) - { - schema_c_buf_p = schematext + schema_MORE_ADJ; - return ( EOF ); - } - - schema_NEW_FILE; - -#ifdef __cplusplus - return ( schemainput() ); -#else - return ( input() ); -#endif - } - break; - - case EOB_ACT_CONTINUE_SCAN: - schema_c_buf_p = schematext + schema_MORE_ADJ; - break; - - case EOB_ACT_LAST_MATCH: -#ifdef __cplusplus - schema_FATAL_ERROR( "unexpected last match in schemainput()" ); -#else - schema_FATAL_ERROR( "unexpected last match in input()" ); -#endif - } - } - } - - c = * schema_c_buf_p; - schema_hold_char = *++ schema_c_buf_p; - - return ( c ); - } -#endif - - -#ifdef schema_USE_PROTOS -void schemarestart( FILE *input_file ) -#else -void schemarestart( input_file ) -FILE *input_file; -#endif - - { - schema_init_buffer( schema_current_buffer, input_file ); - schema_load_buffer_state(); - } - - -#ifdef schema_USE_PROTOS -void schema_switch_to_buffer( schema_BUFFER_STATE new_buffer ) -#else -void schema_switch_to_buffer( new_buffer ) - schema_BUFFER_STATE new_buffer; -#endif - - { - if ( schema_current_buffer == new_buffer ) - return; - - if ( schema_current_buffer ) - { - /* flush out information for old buffer */ - * schema_c_buf_p = schema_hold_char; - schema_current_buffer-> schema_buf_pos = schema_c_buf_p; - schema_current_buffer-> schema_n_chars = schema_n_chars; - } - - schema_current_buffer = new_buffer; - schema_load_buffer_state(); - - /* we don't actually know whether we did this switch during - * EOF ( schemawrap()) processing, but the only time this flag - * is looked at is after schemawrap() is called, so it's safe - * to go ahead and always set it. - */ - schema_did_buffer_switch_on_eof = 1; - } - - -#ifdef schema_USE_PROTOS -void schema_load_buffer_state( void ) -#else -void schema_load_buffer_state() -#endif - - { - schema_n_chars = schema_current_buffer-> schema_n_chars; - schematext = schema_c_buf_p = schema_current_buffer-> schema_buf_pos; - schemain = schema_current_buffer-> schema_input_file; - schema_hold_char = * schema_c_buf_p; - } - - -#ifdef schema_USE_PROTOS - schema_BUFFER_STATE schema_create_buffer( FILE *file, int size ) -#else - schema_BUFFER_STATE schema_create_buffer( file, size ) -FILE *file; -int size; -#endif - - { - schema_BUFFER_STATE b; - - b = ( schema_BUFFER_STATE) malloc( sizeof( struct schema_buffer_state ) ); - - if ( ! b ) - schema_FATAL_ERROR( "out of dynamic memory in schema_create_buffer()" ); - - b-> schema_buf_size = size; - - /* schema_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b-> schema_ch_buf = ( schema_CHAR *) malloc( (unsigned) (b-> schema_buf_size + 2) ); - - if ( ! b-> schema_ch_buf ) - schema_FATAL_ERROR( "out of dynamic memory in schema_create_buffer()" ); - - schema_init_buffer( b, file ); - - return ( b ); - } - - -#ifdef schema_USE_PROTOS -void schema_delete_buffer( schema_BUFFER_STATE b ) -#else -void schema_delete_buffer( b ) - schema_BUFFER_STATE b; -#endif - - { - if ( b == schema_current_buffer ) - schema_current_buffer = ( schema_BUFFER_STATE) 0; - - free( (char *) b-> schema_ch_buf ); - free( (char *) b ); - } - - -#ifdef schema_USE_PROTOS -void schema_init_buffer( schema_BUFFER_STATE b, FILE *file ) -#else -void schema_init_buffer( b, file ) - schema_BUFFER_STATE b; -FILE *file; -#endif - - { - b-> schema_input_file = file; - - /* we put in the '\n' and start reading from [1] so that an - * initial match-at-newline will be true. - */ - - b-> schema_ch_buf[0] = '\n'; - b-> schema_n_chars = 1; - - /* we always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b-> schema_ch_buf[1] = schema_END_OF_BUFFER_CHAR; - b-> schema_ch_buf[2] = schema_END_OF_BUFFER_CHAR; - - b-> schema_buf_pos = &b-> schema_ch_buf[1]; - - b-> schema_eof_status = EOF_NOT_SEEN; - } - diff --git a/cde/programs/dtinfo/DtMmdb/schema/token.lex b/cde/programs/dtinfo/DtMmdb/schema/token.ll similarity index 95% rename from cde/programs/dtinfo/DtMmdb/schema/token.lex rename to cde/programs/dtinfo/DtMmdb/schema/token.ll index 722377a9e..89e319f36 100644 --- a/cde/programs/dtinfo/DtMmdb/schema/token.lex +++ b/cde/programs/dtinfo/DtMmdb/schema/token.ll @@ -25,6 +25,7 @@ * */ +%option noyywrap %a 30000 %e 10000 @@ -175,16 +176,16 @@ int linecount = 1; } [0-9]+ { - yylval.integer = atoi((char*)yytext); + schemalval.integer = atoi((char*)yytext); return (NUMBER); } [a-zA-Z0-9_\-.$]+ { if ( replace_string[0] != 0 && yytext[0] == '$' ) { strcpy(replace_string + replace_string_len, (char*)yytext+1); - yylval.string = replace_string; + schemalval.string = replace_string; } else - yylval.string = (char*)yytext; + schemalval.string = (char*)yytext; return (TOKEN); }