home *** CD-ROM | disk | FTP | other *** search
- package com.ms.xml.parser;
-
- import com.ms.xml.om.Element;
- import com.ms.xml.util.Atom;
- import com.ms.xml.util.XMLOutputStream;
- import java.io.IOException;
- import java.util.BitSet;
-
- class Closure extends Node {
- Node node;
-
- Closure(Node var1) {
- this.node = var1;
- }
-
- Closure() {
- }
-
- BitSet firstpos(int var1) {
- if (super.first == null) {
- super.first = this.node.firstpos(var1);
- }
-
- return super.first;
- }
-
- BitSet lastpos(int var1) {
- if (super.last == null) {
- super.last = this.node.lastpos(var1);
- }
-
- return super.last;
- }
-
- Element toSchema(int var1, int var2, Element var3) {
- ++var2;
- this.node.toSchema(42, var2, var3);
- --var2;
- return var3;
- }
-
- void save(XMLOutputStream var1, int var2, int var3, Atom var4) throws IOException {
- if (var2 == 63 || var2 == 42) {
- var1.writeChars("(");
- }
-
- ++var3;
- this.node.save(var1, 42, var3, var4);
- --var3;
- var1.write(42);
- if (var2 == 63 || var2 == 42) {
- var1.writeChars(")");
- }
-
- }
-
- Node clone(ContentModel var1) {
- return new Closure(this.node.clone(var1));
- }
-
- void calcfollowpos(BitSet[] var1) {
- this.node.calcfollowpos(var1);
- int var2 = var1.length;
- this.lastpos(var2);
- this.firstpos(var2);
-
- for(int var3 = var1.length - 1; var3 >= 0; --var3) {
- if (super.last.get(var3)) {
- var1[var3].or(super.first);
- }
- }
-
- }
-
- boolean nullable() {
- return true;
- }
- }
-