1 // Copyright (c) 1996 James Clark
2 // See the file copying.txt for copying permission.
5 #define Insn2_INCLUDED 1
11 #ifdef DSSSL_NAMESPACE
12 namespace DSSSL_NAMESPACE {
15 class CheckSosofoInsn : public Insn {
17 CheckSosofoInsn(const Location &loc, InsnPtr next) : loc_(loc), next_(next) { }
18 const Insn *execute(VM &vm) const;
24 class CheckStyleInsn : public Insn {
26 CheckStyleInsn(const Location &loc, InsnPtr next) : loc_(loc), next_(next) { }
27 const Insn *execute(VM &vm) const;
35 class PushModeInsn : public Insn {
37 PushModeInsn(const ProcessingMode *mode, InsnPtr next)
38 : mode_(mode), next_(next) { }
39 const Insn *execute(VM &) const;
41 const ProcessingMode *mode_;
45 class PopModeInsn : public Insn {
47 PopModeInsn(InsnPtr next) : next_(next) { }
48 const Insn *execute(VM &) const;
53 // This creates a SetNonInheritedCsSosofo
54 // displayLength_ vars are on the top of the stack.
57 class SetNonInheritedCsSosofoInsn : public Insn {
59 SetNonInheritedCsSosofoInsn(InsnPtr code, int displayLength, InsnPtr next);
60 const Insn *execute(VM &) const;
67 class CopyFlowObjInsn : public Insn {
69 CopyFlowObjInsn(FlowObj *, InsnPtr);
70 const Insn *execute(VM &) const;
76 // Value for characteristic is on top of the stack
77 // Flow object is next down.
79 class SetPseudoNonInheritedCInsn : public Insn {
81 SetPseudoNonInheritedCInsn(const Identifier *, const Location &, InsnPtr);
82 const Insn *execute(VM &) const;
85 const Identifier *nic_;
89 class SetNonInheritedCInsn : public SetPseudoNonInheritedCInsn {
91 SetNonInheritedCInsn(const Identifier *, const Location &, InsnPtr);
92 const Insn *execute(VM &) const;
95 class SetImplicitCharInsn : public Insn {
97 SetImplicitCharInsn(const Location &, InsnPtr);
98 const Insn *execute(VM &) const;
104 // sosofo with content is on top of the stack
105 // flow object is next
107 class SetContentInsn : public Insn {
109 SetContentInsn(const CompoundFlowObj *, InsnPtr next);
110 const Insn *execute(VM &vm) const;
113 const CompoundFlowObj *flowObj_;
116 class SetDefaultContentInsn : public Insn {
118 SetDefaultContentInsn(const CompoundFlowObj *, const Location &loc, InsnPtr next);
119 const Insn *execute(VM &vm) const;
123 const CompoundFlowObj *flowObj_;
126 class MakeDefaultContentInsn : public Insn {
128 MakeDefaultContentInsn(const Location &loc, InsnPtr next);
129 const Insn *execute(VM &vm) const;
135 class SosofoAppendInsn : public Insn {
137 SosofoAppendInsn(size_t, InsnPtr);
138 const Insn *execute(VM &vm) const;
144 // This creates a VarStyleObj.
145 // displayLength vars are on the top, then the use StyleObj is there is one.
147 class VarStyleInsn : public Insn {
149 VarStyleInsn(const ConstPtr<StyleSpec> &, unsigned, bool, InsnPtr);
150 const Insn *execute(VM &vm) const;
152 unsigned displayLength_;
154 ConstPtr<StyleSpec> styleSpec_;
158 // BasicStyleObj is on top of stack.
159 // If there is a current overriding style,
160 // replace it by an OverridenStyleObj.
162 class MaybeOverrideStyleInsn : public Insn {
164 MaybeOverrideStyleInsn(InsnPtr next);
165 const Insn *execute(VM &vm) const;
170 // StyleObj is on top
171 // FlowObj is next down
172 // calls set style on the flowobj
174 class SetStyleInsn : public Insn {
176 SetStyleInsn(InsnPtr next);
177 const Insn *execute(VM &vm) const;
184 // label is on the top
185 // content is next down
187 class LabelSosofoInsn : public Insn {
189 LabelSosofoInsn(const Location &, InsnPtr next);
190 const Insn *execute(VM &) const;
196 // Constructs a ContentMapSosofo
197 // content-map is on top
198 // content is next down
200 class ContentMapSosofoInsn : public Insn {
202 ContentMapSosofoInsn(const Location &loc, InsnPtr next);
203 const Insn *execute(VM &) const;
209 #ifdef DSSSL_NAMESPACE
213 #endif /* not Insn2_INCLUDED */