Ignore:
Timestamp:
Nov 7, 2011, 3:22:00 PM (8 years ago)
Author:
vla24
Message:

SymbolTable?: Update symtab library for dictionary div2 delimiter. Fixed some compile errors for log grouping

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/symtab/pbgs_div_symbol_table.h

    r1653 r1665  
    1010#ifndef PBGS_DIV_SYMBOL_TABLE_H
    1111#define PBGS_DIV_SYMBOL_TABLE_H
    12 
     12//#define XML_PARSER    // Defines this macro if this symbol table is going to be used as
     13                        // a part of an XML parser.
    1314#define DEBUG_PBGS_DIV 0
    14 
    15 // Define either one of grouping functions
    16 //#define USE_LENGTH_SORT       // f(L) = L
    17 //#define USE_LOG_SORT          // f(L) = ceil (log(L))
    18 #define USE_DIV_SORT            // f(L) = floor ((L+1)/2)
    1915
    2016#define TOTAL_GROUPS 10
     
    2723#include "ls_symbol_table_compare.h"
    2824#include "ls_symbol_table_util.h"
     25#include "pbgs_utilities.h"
    2926
    3027#if DEBUG_PBGS_DIV
     
    3229using namespace std;
    3330#endif
    34                            //0     1     2    3     4    5    6    7
    35 static char delimiters[] = {' ', '\0', '\0', ';', '\0', '=', '>', '/'};
    3631
    3732class PBGSDivSymbolTable
     
    5550
    5651    inline int getGroup(int L);
    57     inline bool isDelimiter(const char c);
    5852
    5953    template <int L> inline char* Store_Name(const char* name);
     
    124118
    125119        //Check if the last character is a delimiter
    126         if (isDelimiter(name[L-1]))
     120#ifdef XMLWF
     121        if (isXMLDelimiter(name[L-1]))
     122#else
     123        if (isGeneralDelimiter(name[L-1]))
     124#endif
    127125        {
    128126            //Do another lookup for name with L = L-1
     
    187185}
    188186
    189 
    190 inline bool PBGSDivSymbolTable::isDelimiter(const char c)
    191 {
    192     return c == delimiters[(unsigned int) c & 0x7];
    193 }
    194 
    195187inline int PBGSDivSymbolTable::getGroup(int L)
    196188{
Note: See TracChangeset for help on using the changeset viewer.