ModeInfo.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 <limits.h>
#include <stdlib.h>
#include "macros.h"
#include "types.h"
#include "Syntax.h"
#include "token.h"
#include "Sd.h"
#include "Mode.h"
#include "ModeInfo.h"
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#endif
const unsigned REQUIRE_EMPTY_STARTTAG = 01;
const unsigned REQUIRE_EMPTY_ENDTAG = 02;
const unsigned REQUIRE_CONCUR = 04;
const unsigned REQUIRE_LINK_OR_CONCUR = 010;
const unsigned REQUIRE_NOT_KEEPRSRE = 020;
const unsigned REQUIRE_FLAGS = 037;
struct PackedTokenInfo {
unsigned flags;
// terminated by EOM
// a bit vector computed from modes (lo to hi)
void computeModeBits();
};
static PackedTokenInfo tokenTable[] = {
// Delimiters and delimiters in context
// Other tokens
{ refMode,
EOM }},
EOM }},
// Note that character data is recognized in element content,
// and will cause #PCDATA to begin.
};
{
!= 0);
}
void PackedTokenInfo::computeModeBits()
{
}
struct TokenTableIniter {
};
static TokenTableIniter tokenTableIniter;
{
tokenTable[i].computeModeBits();
}
{
if (sd.startTagEmpty())
if (sd.endTagEmpty())
}
{
--count_;
++p_;
unsigned char c = contents[0];
if (c < SET)
switch (t->set) {
case Syntax::s:
break;
default:
break;
}
return 1;
}
else {
return 1;
}
c = contents[1];
if (c == NOTHING) {
return 1;
}
if (c < SET) {
return 1;
}
return 1;
}
abort();
}
return 0;
}
#ifdef SP_NAMESPACE
}
#endif