Syntax.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1994 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef Syntax_INCLUDED
#define Syntax_INCLUDED 1
#ifdef __GNUG__
#pragma interface
#endif
#include "types.h"
#include "Boolean.h"
#include "ISet.h"
#include "StringC.h"
#include "SubstTable.h"
#include "HashTable.h"
#include "Vector.h"
#include "Resource.h"
#include "XcharMap.h"
#include "EntityCatalog.h"
#ifdef SP_NAMESPACE
#endif
enum ReservedName {
rALL,
rANY,
rID,
rMD,
rMS,
rO,
rPI,
rRE,
rRS,
};
enum Quantity {
};
enum { unlimited = 100000000 };
enum DelimGeneral {
dAND,
dCOM,
dCRO,
dDSC,
dDSO,
dERO,
dHCRO, // WWW TC addition
dLIT,
dMDC,
dMDO,
dMSC,
dNET,
dNESTC, // WWW TC addition
dOPT,
dOR,
dPIC,
dPIO,
dREP,
dRNI,
dSEQ,
};
enum StandardFunction {
fRE,
fRS,
};
enum FunctionClass {
};
enum Set {
nmchar, // LCNMCHAR or UCNMCHAR
s,
functionChar, // function character
};
enum Category {
otherCategory = 0,
sCategory = 01,
nameStartCategory = 02,
digitCategory = 04,
otherNameCategory = 010
};
Char standardFunction(int) const;
Boolean namecaseGeneral() const;
Boolean namecaseEntity() const;
const StringC &delimGeneral(int) const;
int nDelimShortrefComplex() const;
Boolean hasShortrefs() const;
void enterStandardFunctionNames();
void setNamecaseGeneral(Boolean);
void setNamecaseEntity(Boolean);
void setDelimGeneral(int, const StringC &);
const CharsetInfo &charset);
void addShunchar(Char);
void setShuncharControls();
void setQuantity(int, Number);
void implySgmlChar(const Sd &);
// :: is for Watcom 10.0a
void checkSgmlChar(const Sd &,
const;
static int referenceQuantity(Quantity);
const XcharMap<unsigned char> &markupScanTable() const;
const CharsetInfo &docCharset,
XcharMap<unsigned char> categoryTable_;
XcharMap<unsigned char> markupScanTable_;
static const int referenceQuantity_[];
};
{
return quantity_[q];
}
{
quantity_[i] = n;
}
{
return generalSubst_;
}
{
return entitySubst_;
}
inline int Syntax::nDelimShortrefComplex() const
{
return int(delimShortrefComplex_.size());
}
{
return delimGeneral_[i];
}
{
return delimShortrefComplex_[i];
}
{
return delimShortrefSimple_;
}
{
}
{
return standardFunction_[i];
}
{
if (standardFunctionValid_[i]) {
result = standardFunction_[i];
return 1;
}
else
return 0;
}
{
return &set_[i];
}
{
return categoryTable_[c] >= nameStartCategory;
}
{
return categoryTable_[c] == nameStartCategory;
}
{
return categoryTable_[c] == digitCategory;
}
{
return categoryTable_[c] == sCategory;
}
{
return (categoryTable_[c] == sCategory
}
{
return Category(categoryTable_[c]);
}
{
}
{
return names_[i];
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
return referenceQuantity_[i];
}
inline void Syntax::setShuncharControls()
{
shuncharControls_ = 1;
}
{
return markupScanTable_;
}
{
return multicode_;
}
{
return namecaseGeneral_;
}
{
return namecaseEntity_;
}
{
return entityNames_.size();
}
{
return entityNames_[i];
}
{
return entityChars_[i];
}
#ifdef SP_NAMESPACE
}
#endif
#endif /* Syntax_INCLUDED */