Syntax.cxx revision 7c478bd95313f5f23a4c958a745db2134aa03244
// Copyright (c) 1994 James Clark
// See the file COPYING for copying permission.
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __GNUG__
#pragma implementation
#endif
#include "splib.h"
#include "Syntax.h"
#include "Sd.h"
#include "CharsetInfo.h"
#include "ISetIter.h"
#include "macros.h"
#include "MarkupScan.h"
#include "constant.h"
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#endif
const int Syntax::referenceQuantity_[] = {
40,
960,
960,
16,
16,
16,
32,
96,
16,
240,
8,
2,
240,
960,
24
};
: generalSubst_(0),
entitySubst_(0),
multicode_(0),
{
static const char lcletter[] = "abcdefghijklmnopqrstuvwxyz";
static const char ucletter[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int i;
for (i = 0; i < 26; i++) {
if (i < 6) {
}
}
static const char digits[] = "0123456789";
for (i = 0; i < 10; i++) {
set_[minimumData] += c;
set_[significant] += c;
}
static const char special[] = "'()+,-./:=?";
for (i = 0; special[i] != '\0'; i++) {
set_[minimumData] += c;
set_[significant] += c;
}
for (i = 0; wwwSpecial[i] != '\0'; i++) {
WideChar c;
set_[significant] += c;
}
}
}
for (i = 0; i < nQuantity; i++)
quantity_[i] = referenceQuantity_[i];
for (i = 0; i < 3; i++)
standardFunctionValid_[i] = 0;
}
{
}
}
{
}
}
{
}
{
standardFunction_[f] = c;
standardFunctionValid_[f] = 1;
set_[minimumData] += c;
set_[s] += c;
set_[functionChar] += c;
set_[significant] += c;
switch (f) {
case fSPACE:
break;
case fRE:
case fRS:
break;
}
}
void Syntax::enterStandardFunctionNames()
{
};
for (int i = 0; i < 3; i++)
if (standardFunctionValid_[i])
}
{
delimGeneral_[i] = str;
}
{
else
}
const CharsetInfo &charset)
{
do {
specialChars += min;
}
if (simpleCharsPtr != &simpleChars) {
}
}
}
}
{
switch (fun) {
case cFUNCHAR:
break;
case cSEPCHAR:
set_[s] += c;
break;
case cMSOCHAR:
multicode_ = 1;
break;
case cMSICHAR:
// don't need to do anything special if we just have MSICHARs
break;
case cMSSCHAR:
multicode_ = 1;
break;
}
set_[functionChar] += c;
set_[significant] += c;
}
{
}
{
namecaseGeneral_ = b;
}
{
namecaseEntity_ = b;
}
{
}
{
}
ReservedName *result) const
{
if (tem) {
return 1;
}
else
return 0;
}
{
if (p) {
*result = *p;
return 1;
}
else
return 0;
}
#ifdef __GNUG__
#endif
{
if (*cp == c)
return 1;
return 0;
}
{
return 1;
if (str == delimShortrefComplex_[i])
return 1;
return 0;
}
{
do {
}
}
{
do {
Char c;
if (!sd.internalCharsetIsDocCharset()) {
else {
Number n;
// If it's a declared but unknown character,
// then it can't be significant,
base,
type,
n,
lit)
continue;
}
}
else
c = min;
}
}
if (shuncharControls_) {
UnivChar i;
for (i = 0; i < 32; i++)
for (i = 127; i < 160; i++)
}
}
const CharsetInfo &internalCharset,
{
WideChar c;
case 0:
break;
case 1:
set += c;
// fall through
default:
{
do {
break;
&& (!otherSyntax
}
}
}
}
{
result += reservedName(i);
return result;
}
{
return upperSubst_;
}
{
return delimGeneral(dPERO);
}
{
switch (categoryTable_[c]) {
case digitCategory:
return 1;
case nameStartCategory:
break;
default:
return 0;
}
}
{
entityChars_ += c;
}
#ifdef SP_NAMESPACE
}
#endif