1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
|
// Copyright (c) 1996 James Clark
// See the file copying.txt for copying permission.
#ifndef Insn2_INCLUDED
#define Insn2_INCLUDED 1
#include "Insn.h"
#include "SosofoObj.h"
#include "Style.h"
#ifdef DSSSL_NAMESPACE
namespace DSSSL_NAMESPACE {
#endif
class CheckSosofoInsn : public Insn {
public:
CheckSosofoInsn(const Location &loc, InsnPtr next) : loc_(loc), next_(next) { }
const Insn *execute(VM &vm) const;
private:
Location loc_;
InsnPtr next_;
};
class CheckStyleInsn : public Insn {
public:
CheckStyleInsn(const Location &loc, InsnPtr next) : loc_(loc), next_(next) { }
const Insn *execute(VM &vm) const;
private:
Location loc_;
InsnPtr next_;
};
class ProcessingMode;
class PushModeInsn : public Insn {
public:
PushModeInsn(const ProcessingMode *mode, InsnPtr next)
: mode_(mode), next_(next) { }
const Insn *execute(VM &) const;
private:
const ProcessingMode *mode_;
InsnPtr next_;
};
class PopModeInsn : public Insn {
public:
PopModeInsn(InsnPtr next) : next_(next) { }
const Insn *execute(VM &) const;
private:
InsnPtr next_;
};
// This creates a SetNonInheritedCsSosofo
// displayLength_ vars are on the top of the stack.
// flowObj is next.
class SetNonInheritedCsSosofoInsn : public Insn {
public:
SetNonInheritedCsSosofoInsn(InsnPtr code, int displayLength, InsnPtr next);
const Insn *execute(VM &) const;
private:
InsnPtr code_;
int displayLength_;
InsnPtr next_;
};
class CopyFlowObjInsn : public Insn {
public:
CopyFlowObjInsn(FlowObj *, const Location &, InsnPtr);
const Insn *execute(VM &) const;
private:
FlowObj *flowObj_;
InsnPtr next_;
Location loc_;
};
// Value for characteristic is on top of the stack
// Flow object is next down.
class SetPseudoNonInheritedCInsn : public Insn {
public:
SetPseudoNonInheritedCInsn(const Identifier *, const Location &, InsnPtr);
const Insn *execute(VM &) const;
private:
Location loc_;
const Identifier *nic_;
InsnPtr next_;
};
class SetNonInheritedCInsn : public SetPseudoNonInheritedCInsn {
public:
SetNonInheritedCInsn(const Identifier *, const Location &, InsnPtr);
const Insn *execute(VM &) const;
};
class SetImplicitCharInsn : public Insn {
public:
SetImplicitCharInsn(const Location &, InsnPtr);
const Insn *execute(VM &) const;
private:
Location loc_;
InsnPtr next_;
};
// sosofo with content is on top of the stack
// flow object is next
class SetContentInsn : public Insn {
public:
SetContentInsn(const CompoundFlowObj *, const Location &, InsnPtr next);
const Insn *execute(VM &vm) const;
private:
InsnPtr next_;
const CompoundFlowObj *flowObj_;
Location loc_;
};
class SetDefaultContentInsn : public Insn {
public:
SetDefaultContentInsn(const CompoundFlowObj *, const Location &loc, InsnPtr next);
const Insn *execute(VM &vm) const;
private:
Location loc_;
InsnPtr next_;
const CompoundFlowObj *flowObj_;
};
class MakeDefaultContentInsn : public Insn {
public:
MakeDefaultContentInsn(const Location &loc, InsnPtr next);
const Insn *execute(VM &vm) const;
private:
Location loc_;
InsnPtr next_;
};
class SosofoAppendInsn : public Insn {
public:
SosofoAppendInsn(size_t, InsnPtr);
const Insn *execute(VM &vm) const;
private:
size_t n_;
InsnPtr next_;
};
// This creates a VarStyleObj.
// displayLength vars are on the top, then the use StyleObj is there is one.
class VarStyleInsn : public Insn {
public:
VarStyleInsn(const ConstPtr<StyleSpec> &, unsigned, bool, InsnPtr);
const Insn *execute(VM &vm) const;
private:
unsigned displayLength_;
bool hasUse_;
ConstPtr<StyleSpec> styleSpec_;
InsnPtr next_;
};
// BasicStyleObj is on top of stack.
// If there is a current overriding style,
// replace it by an OverridenStyleObj.
class MaybeOverrideStyleInsn : public Insn {
public:
MaybeOverrideStyleInsn(InsnPtr next);
const Insn *execute(VM &vm) const;
private:
InsnPtr next_;
};
// StyleObj is on top
// FlowObj is next down
// calls set style on the flowobj
class SetStyleInsn : public Insn {
public:
SetStyleInsn(InsnPtr next);
const Insn *execute(VM &vm) const;
private:
InsnPtr next_;
};
class Expression;
// label is on the top
// content is next down
class LabelSosofoInsn : public Insn {
public:
LabelSosofoInsn(const Location &, InsnPtr next);
const Insn *execute(VM &) const;
private:
Location loc_;
InsnPtr next_;
};
// Constructs a ContentMapSosofo
// content-map is on top
// content is next down
class ContentMapSosofoInsn : public Insn {
public:
ContentMapSosofoInsn(const Location &loc, InsnPtr next);
const Insn *execute(VM &) const;
private:
Location loc_;
InsnPtr next_;
};
#ifdef DSSSL_NAMESPACE
}
#endif
#endif /* not Insn2_INCLUDED */
|