diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index 04f29390e..2af76f112 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -139,6 +139,7 @@ import com.jpexs.decompiler.graph.GraphSourceItemContainer; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.LocalData; +import com.jpexs.helpers.ByteArrayRange; import com.jpexs.helpers.Cache; import com.jpexs.helpers.CancellableWorker; import com.jpexs.helpers.Helper; @@ -282,7 +283,7 @@ public final class SWF implements SWFContainerItem, Timelined { max = characterId; } } - + return max + 1; } @@ -294,7 +295,7 @@ public final class SWF implements SWFContainerItem, Timelined { if (checkAll || tag.isModified()) { Set needed = new HashSet<>(); tag.getNeededCharacters(needed); - boolean moved = false; + boolean moved = false; for (Integer id : needed) { if (!addedCharacterIds.contains(id)) { CharacterTag neededCharacter = characters.get(id); @@ -310,7 +311,7 @@ public final class SWF implements SWFContainerItem, Timelined { moved = true; } } - + if (moved) { i--; continue; @@ -321,7 +322,7 @@ public final class SWF implements SWFContainerItem, Timelined { } } } - + public void resetTimelines(Timelined timelined) { timelined.getTimeline().reset(); for (Tag t : timelined.getTimeline().tags) { @@ -439,7 +440,7 @@ public final class SWF implements SWFContainerItem, Timelined { public void saveTo(OutputStream os, SWFCompression compression) throws IOException { try { fixCharactersOrder(false); - + ByteArrayOutputStream baos = new ByteArrayOutputStream(); SWFOutputStream sos = new SWFOutputStream(baos, version); sos.writeRECT(displayRect); @@ -1065,7 +1066,7 @@ public final class SWF implements SWFContainerItem, Timelined { } } } - + private final HashSet listeners = new HashSet<>(); public final void addEventListener(EventListener listener) { @@ -1093,15 +1094,14 @@ public final class SWF implements SWFContainerItem, Timelined { } public static boolean hasErrorHeader(byte[] data) { - if (data.length > 4) { - if ((data[0] & 0xff) == 0xff) { - if ((data[1] & 0xff) == 0xd9) { - if ((data[2] & 0xff) == 0xff) { - if ((data[3] & 0xff) == 0xd8) { - return true; - } - } - } + return hasErrorHeader(new ByteArrayRange(data)); + } + + public static boolean hasErrorHeader(ByteArrayRange data) { + if (data.getLength() > 4) { + if ((data.get(0) & 0xff) == 0xff && (data.get(1) & 0xff) == 0xd9 + && (data.get(2) & 0xff) == 0xff && (data.get(3) & 0xff) == 0xd8) { + return true; } } return false; @@ -1772,7 +1772,7 @@ public final class SWF implements SWFContainerItem, Timelined { if (tag instanceof SymbolClassTag) { SymbolClassTag sc = (SymbolClassTag) tag; for (int i = 0; i < sc.names.length; i++) { - String newname = deobfuscation.deobfuscateNameWithPackage(true,sc.names[i], deobfuscated, renameType, deobfuscated); + String newname = deobfuscation.deobfuscateNameWithPackage(true, sc.names[i], deobfuscated, renameType, deobfuscated); if (newname != null) { sc.names[i] = newname; } @@ -1780,7 +1780,7 @@ public final class SWF implements SWFContainerItem, Timelined { sc.setModified(true); } } - deobfuscation.deobfuscateInstanceNames(true,deobfuscated, renameType, tags, new HashMap()); + deobfuscation.deobfuscateInstanceNames(true, deobfuscated, renameType, tags, new HashMap()); return deobfuscated.size(); } @@ -1872,7 +1872,7 @@ public final class SWF implements SWFContainerItem, Timelined { if (fun.calculatedFunctionName instanceof DirectValueActionItem) { DirectValueActionItem dvf = (DirectValueActionItem) fun.calculatedFunctionName; String fname = dvf.toStringNoH(null); - String changed = deobfuscation.deobfuscateName(false,fname, false, "method", deobfuscated, renameType, selected); + String changed = deobfuscation.deobfuscateName(false, fname, false, "method", deobfuscated, renameType, selected); if (changed != null) { deobfuscated.put(fname, changed); } @@ -1891,7 +1891,7 @@ public final class SWF implements SWFContainerItem, Timelined { if (gti instanceof DirectValueActionItem) { DirectValueActionItem dvf = (DirectValueActionItem) gti; String vname = dvf.toStringNoH(null); - String changed = deobfuscation.deobfuscateName(false,vname, false, "attribute", deobfuscated, renameType, selected); + String changed = deobfuscation.deobfuscateName(false, vname, false, "attribute", deobfuscated, renameType, selected); if (changed != null) { deobfuscated.put(vname, changed); } @@ -1924,7 +1924,7 @@ public final class SWF implements SWFContainerItem, Timelined { if (classNameParts != null) { changedNameStr = classNameParts[classNameParts.length - 1 - pos]; } - String changedNameStr2 = deobfuscation.deobfuscateName(false,changedNameStr, pos == 0, pos == 0 ? "class" : "package", deobfuscated, renameType, selected); + String changedNameStr2 = deobfuscation.deobfuscateName(false, changedNameStr, pos == 0, pos == 0 ? "class" : "package", deobfuscated, renameType, selected); if (changedNameStr2 != null) { changedNameStr = changedNameStr2; } @@ -1948,7 +1948,7 @@ public final class SWF implements SWFContainerItem, Timelined { if (classNameParts != null) { changedNameStr = classNameParts[classNameParts.length - 1 - pos]; } - String changedNameStr2 = deobfuscation.deobfuscateName(false,changedNameStr, pos == 0, pos == 0 ? "class" : "package", deobfuscated, renameType, selected); + String changedNameStr2 = deobfuscation.deobfuscateName(false, changedNameStr, pos == 0, pos == 0 ? "class" : "package", deobfuscated, renameType, selected); if (changedNameStr2 != null) { changedNameStr = changedNameStr2; } @@ -1970,7 +1970,7 @@ public final class SWF implements SWFContainerItem, Timelined { if (f.functionName.isEmpty()) { //anonymous function, leave as is continue; } - String changed = deobfuscation.deobfuscateName(false,f.functionName, false, "function", deobfuscated, renameType, selected); + String changed = deobfuscation.deobfuscateName(false, f.functionName, false, "function", deobfuscated, renameType, selected); if (changed != null) { f.replacedFunctionName = changed; ret++; @@ -1981,7 +1981,7 @@ public final class SWF implements SWFContainerItem, Timelined { if (f.functionName.isEmpty()) { //anonymous function, leave as is continue; } - String changed = deobfuscation.deobfuscateName(false,f.functionName, false, "function", deobfuscated, renameType, selected); + String changed = deobfuscation.deobfuscateName(false, f.functionName, false, "function", deobfuscated, renameType, selected); if (changed != null) { f.replacedFunctionName = changed; ret++; @@ -2004,7 +2004,7 @@ public final class SWF implements SWFContainerItem, Timelined { for (MyEntry it : allVariableNames) { vc++; String name = it.getKey().toStringNoH(it.getValue()); - String changed = deobfuscation.deobfuscateName(false,name, false, usageTypes.get(it.getKey()), deobfuscated, renameType, selected); + String changed = deobfuscation.deobfuscateName(false, name, false, usageTypes.get(it.getKey()), deobfuscated, renameType, selected); if (changed != null) { boolean addNew = false; String h = System.identityHashCode(it.getKey()) + "_" + name; @@ -2042,7 +2042,7 @@ public final class SWF implements SWFContainerItem, Timelined { src.setActions(actionsMap.get(src)); src.setModified(); } - deobfuscation.deobfuscateInstanceNames(false,deobfuscated, renameType, tags, selected); + deobfuscation.deobfuscateInstanceNames(false, deobfuscated, renameType, tags, selected); return ret; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFContainerItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFContainerItem.java index 2831af965..babe29c89 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFContainerItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFContainerItem.java @@ -23,5 +23,5 @@ import com.jpexs.decompiler.flash.treeitems.TreeItem; * @author JPEXS */ public interface SWFContainerItem extends TreeItem { - + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java index ca4108e65..c7746a634 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -696,6 +696,25 @@ public class SWFInputStream implements AutoCloseable { return ret; } + /** + * Reads byte range from the stream + * + * @param count Number of bytes to read + * @param name + * @return ByteArrayRange object + * @throws IOException + */ + public ByteArrayRange readByteRangeEx(long count, String name) throws IOException { + if (count <= 0) { + return ByteArrayRange.EMPTY; + } + newDumpLevel(name, "bytes"); + int startPos = (int) getPos(); + skipBytesEx(count); + endDumpLevel(); + return new ByteArrayRange(swf.uncompressedData, startPos, (int) count); + } + /** * Reads bytes from the stream * @@ -718,6 +737,19 @@ public class SWFInputStream implements AutoCloseable { return ret; } + /** + * Skip bytes from the stream + * + * @param count Number of bytes to skip + * @throws IOException + */ + public void skipBytesEx(long count) throws IOException { + bitPos = 0; + for (int i = 0; i < count; i++) { + readNoBitReset(); + } + } + /** * Skip bytes from the stream * @@ -726,10 +758,7 @@ public class SWFInputStream implements AutoCloseable { */ public void skipBytes(long count) throws IOException { try { - bitPos = 0; - for (int i = 0; i < count; i++) { - readNoBitReset(); - } + skipBytesEx(count); } catch (EOFException | EndOfStreamException ex) { logger.log(Level.SEVERE, null, ex); } @@ -769,7 +798,7 @@ public class SWFInputStream implements AutoCloseable { InflaterInputStream dis = new InflaterInputStream(new ByteArrayInputStream(data)); ByteArrayOutputStream baos = new ByteArrayOutputStream(); if (count > 0) { - byte[] buf = new byte[4096]; + byte[] buf = new byte[4096]; int c = 0; while ((c = dis.read(buf)) > 0) { baos.write(buf, 0, c); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java index 8c080301b..91a07dca6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java @@ -75,6 +75,7 @@ import com.jpexs.decompiler.flash.types.shaperecords.EndShapeRecord; import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; +import com.jpexs.helpers.ByteArrayRange; import com.jpexs.helpers.utf8.Utf8Helper; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -131,6 +132,12 @@ public class SWFOutputStream extends OutputStream { pos += b.length; } + public void write(ByteArrayRange b) throws IOException { + alignByte(); + os.write(b.getArray(), b.getPos(), b.getLength()); + pos += b.getLength(); + } + private void alignByte() throws IOException { if (bitPos > 0) { bitPos = 0; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index d277042ec..1498ffab5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -1712,17 +1712,16 @@ public class AVM2Code implements Cloneable { } } } - - + /* - //undeclare registers at the end of the block? - for(int reg:nowdeclaredRegs){ - declaredRegisters[reg] = false; - } + //undeclare registers at the end of the block? + for(int reg:nowdeclaredRegs){ + declaredRegisters[reg] = false; + } - for(Slot s:nowdeclaredSlots){ - declaredSlots.remove(s); - }*/ + for(Slot s:nowdeclaredSlots){ + declaredSlots.remove(s); + }*/ } public List toGraphTargetItems(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, AVM2ConstantPool constants, List method_info, MethodBody body, HashMap localRegNames, ScopeStack scopeStack, boolean isStaticInitializer, List fullyQualifiedNames, Traits initTraits, int staticOperation, HashMap localRegAssigmentIps, HashMap> refs) throws InterruptedException { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index d157e87ba..07e7b2e72 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -667,7 +667,7 @@ public class AVM2Graph extends Graph { WhileItem w = (WhileItem) loopItem; if ((!w.expression.isEmpty()) && (w.expression.get(w.expression.size() - 1) instanceof HasNextAVM2Item)) { - HasNextAVM2Item hn=(HasNextAVM2Item)w.expression.get(w.expression.size() - 1); + HasNextAVM2Item hn = (HasNextAVM2Item) w.expression.get(w.expression.size() - 1); if (((HasNextAVM2Item) w.expression.get(w.expression.size() - 1)).collection != null) { if (((HasNextAVM2Item) w.expression.get(w.expression.size() - 1)).collection.getNotCoerced().getThroughRegister() instanceof FilteredCheckAVM2Item) { //GraphTargetItem gti = ((HasNextAVM2Item) ((HasNextAVM2Item) w.expression.get(w.expression.size() - 1))).collection.getNotCoerced().getThroughRegister(); @@ -704,7 +704,7 @@ public class AVM2Graph extends Graph { if (gti instanceof NextValueAVM2Item) { return new ForEachInAVM2Item(w.src, w.loop, new InAVM2Item(hn.instruction, sti.getObject(), ((HasNextAVM2Item) w.expression.get(w.expression.size() - 1)).collection), w.commands); } else if (gti instanceof NextNameAVM2Item) { - return new ForInAVM2Item(w.src, w.loop, new InAVM2Item(hn.instruction,sti.getObject(), ((HasNextAVM2Item) w.expression.get(w.expression.size() - 1)).collection), w.commands); + return new ForInAVM2Item(w.src, w.loop, new InAVM2Item(hn.instruction, sti.getObject(), ((HasNextAVM2Item) w.expression.get(w.expression.size() - 1)).collection), w.commands); } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java index 3d74aabbc..d039ffca4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/localregs/GetLocalTypeIns.java @@ -41,10 +41,10 @@ public abstract class GetLocalTypeIns extends InstructionDefinition { @Override public void translate(boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, AVM2ConstantPool constants, AVM2Instruction ins, List method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path, HashMap regAssignCount, int ip, HashMap> refs, AVM2Code code) { - + int regId = getRegisterId(ins); - - if(regId == 0){ + + if (regId == 0) { if ((classIndex >= abc.instance_info.size()) || classIndex < 0) { stack.push(new ScriptAVM2Item(scriptIndex)); return; @@ -56,7 +56,7 @@ public abstract class GetLocalTypeIns extends InstructionDefinition { } return; } - + GraphTargetItem computedValue = localRegs.get(regId); int assignCount = 0; if (regAssignCount.containsKey(regId)) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java index 2539c13da..00fbe6cb0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/AVM2Item.java @@ -40,8 +40,8 @@ public abstract class AVM2Item extends GraphTargetItem { public AVM2Item(GraphSourceItem instruction, int precedence) { super(instruction, precedence); - if(instruction instanceof AVM2Instruction){ - this.instruction = (AVM2Instruction)instruction; + if (instruction instanceof AVM2Instruction) { + this.instruction = (AVM2Instruction) instruction; } } @@ -81,11 +81,11 @@ public abstract class AVM2Item extends GraphTargetItem { } } } - + if (empty) { return propertyName.toString(writer, localData); } - if (propertyName instanceof FullMultinameAVM2Item) { + if (propertyName instanceof FullMultinameAVM2Item) { if (((FullMultinameAVM2Item) propertyName).name != null) { return propertyName.toString(writer, localData); } else { @@ -101,7 +101,7 @@ public abstract class AVM2Item extends GraphTargetItem { public static String localRegName(HashMap localRegNames, int reg) { if (localRegNames.containsKey(reg)) { - return IdentifiersDeobfuscation.printIdentifier(true,localRegNames.get(reg)); + return IdentifiersDeobfuscation.printIdentifier(true, localRegNames.get(reg)); } else { if (reg == 0) { return "this"; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java index 4c428231b..9c4c91aef 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/FullMultinameAVM2Item.java @@ -18,7 +18,6 @@ package com.jpexs.decompiler.flash.abc.avm2.model; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; -import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.abc.types.Namespace; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.GraphTargetItem; @@ -26,14 +25,13 @@ import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import java.util.HashMap; import java.util.List; -import java.util.Map; public class FullMultinameAVM2Item extends AVM2Item { public int multinameIndex; public GraphTargetItem name; public GraphTargetItem namespace; - + public FullMultinameAVM2Item(AVM2Instruction instruction, int multinameIndex, GraphTargetItem name) { super(instruction, PRECEDENCE_PRIMARY); this.multinameIndex = multinameIndex; @@ -155,10 +153,10 @@ public class FullMultinameAVM2Item extends AVM2Item { return false; } return true; - } - + } + @Override - public GraphTargetItem returnType() { + public GraphTargetItem returnType() { return TypeItem.UNBOUNDED; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java index 3b553bb51..9ae1a9adb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetLexAVM2Item.java @@ -34,9 +34,9 @@ public class GetLexAVM2Item extends AVM2Item { @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { - - String localName = propertyName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false); - srcData.put("localName",localName); + + String localName = propertyName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false); + srcData.put("localName", localName); return writer.append(propertyName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java index 0fd34cc9c..9d2ce1a48 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSlotAVM2Item.java @@ -40,21 +40,21 @@ public class GetSlotAVM2Item extends AVM2Item { return writer.append("/*UnknownSlot*/"); } srcData.put("localName", getNameAsStr(localData)); - + return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false)); } - public String getNameAsStr(LocalData localData){ + public String getNameAsStr(LocalData localData) { return slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false); } - - public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) { + + public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) { if (slotName == null) { return writer.append("/*UnknownSlot*/"); } return writer.append(slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false)); } - + @Override public GraphTargetItem returnType() { return TypeItem.UNBOUNDED; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java index 1f7872a92..56ec452a9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/LocalRegAVM2Item.java @@ -55,7 +55,7 @@ public class LocalRegAVM2Item extends AVM2Item { computedResult = null; } } - this.computedValue = computedValue; + this.computedValue = computedValue; } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java index f05d982c8..51e375a5f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewFunctionAVM2Item.java @@ -61,7 +61,7 @@ public class NewFunctionAVM2Item extends AVM2Item { public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { MethodBody body = abc.findBody(methodIndex); writer.append("function"); - writer.startMethod(methodIndex); + writer.startMethod(methodIndex); writer.append((!functionName.isEmpty() ? " " + functionName : "")); writer.appendNoHilight("("); methodInfo.get(methodIndex).getParamStr(writer, constants, body, abc, fullyQualifiedNames); @@ -71,7 +71,7 @@ public class NewFunctionAVM2Item extends AVM2Item { writer.appendNoHilight(abc.findBodyIndex(methodIndex)); writer.newLine(); } - methodInfo.get(methodIndex).getReturnTypeStr(writer, constants, fullyQualifiedNames); + methodInfo.get(methodIndex).getReturnTypeStr(writer, constants, fullyQualifiedNames); writer.startBlock(); if (body != null) { if (writer instanceof NulWriter) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java index 478329c90..7bf87a93e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetLocalAVM2Item.java @@ -42,7 +42,7 @@ public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assig public SetLocalAVM2Item(AVM2Instruction instruction, int regIndex, GraphTargetItem value) { super(instruction, PRECEDENCE_ASSIGMENT); this.regIndex = regIndex; - this.value = value; + this.value = value; } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java index bd3655dd1..4db39faed 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSlotAVM2Item.java @@ -35,7 +35,7 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign super(instruction, PRECEDENCE_ASSIGMENT); this.slotName = slotName; this.value = value; - this.scope = scope; + this.scope = scope; } @Override @@ -51,11 +51,11 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign return value.toString(writer, localData); } - public String getNameAsStr(LocalData localData){ + public String getNameAsStr(LocalData localData) { return slotName.getName(localData.constantsAvm2, localData.fullyQualifiedNames, false); } - - public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) { + + public GraphTextWriter getName(GraphTextWriter writer, LocalData localData) { if (slotName == null) { return writer.append("/*UnknownSlot*/"); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java index 8a82c4b12..68a53e995 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ThisAVM2Item.java @@ -33,7 +33,7 @@ public class ThisAVM2Item extends AVM2Item { public Multiname className; - public ThisAVM2Item(GraphSourceItem instruction,Multiname className) { + public ThisAVM2Item(GraphSourceItem instruction, Multiname className) { super(instruction, PRECEDENCE_PRIMARY); this.className = className; srcData.put("localName", "this"); @@ -45,7 +45,7 @@ public class ThisAVM2Item extends AVM2Item { } @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { return writer.append("this"); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java index 3231ecf86..f23325115 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/DeclarationAVM2Item.java @@ -16,7 +16,6 @@ */ package com.jpexs.decompiler.flash.abc.avm2.model.clauses; -import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.CoerceAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.ConvertAVM2Item; @@ -24,13 +23,10 @@ import com.jpexs.decompiler.flash.abc.avm2.model.GetSlotAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.SetLocalAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.SetSlotAVM2Item; -import com.jpexs.decompiler.flash.abc.types.InstanceInfo; -import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; -import java.util.ArrayList; /** * @@ -49,38 +45,38 @@ public class DeclarationAVM2Item extends AVM2Item { public DeclarationAVM2Item(GraphTargetItem assignment) { this(assignment, null); - } + } @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - - if(assignment instanceof LocalRegAVM2Item){ //for..in - LocalRegAVM2Item lti=(LocalRegAVM2Item)assignment; + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + + if (assignment instanceof LocalRegAVM2Item) { //for..in + LocalRegAVM2Item lti = (LocalRegAVM2Item) assignment; String localName = localRegName(localData.localRegNames, lti.regIndex); - srcData.put("localName",localName); + srcData.put("localName", localName); srcData.put("declaration", "true"); srcData.put("declaredType", "*"); writer.append("var "); writer.append(localName); return writer; } - - if(assignment instanceof GetSlotAVM2Item){ //for..in - GetSlotAVM2Item sti=(GetSlotAVM2Item)assignment; - srcData.put("localName",sti.getNameAsStr(localData)); + + if (assignment instanceof GetSlotAVM2Item) { //for..in + GetSlotAVM2Item sti = (GetSlotAVM2Item) assignment; + srcData.put("localName", sti.getNameAsStr(localData)); srcData.put("declaration", "true"); srcData.put("declaredType", "*"); writer.append("var "); sti.getName(writer, localData); return writer; } - - if (assignment instanceof SetLocalAVM2Item) { + + if (assignment instanceof SetLocalAVM2Item) { SetLocalAVM2Item lti = (SetLocalAVM2Item) assignment; String localName = localRegName(localData.localRegNames, lti.regIndex); - srcData.put("localName",localName); + srcData.put("localName", localName); srcData.put("declaration", "true"); - + GraphTargetItem coerType = TypeItem.UNBOUNDED; if (lti.value instanceof CoerceAVM2Item) { coerType = ((CoerceAVM2Item) lti.value).typeObj; @@ -88,23 +84,23 @@ public class DeclarationAVM2Item extends AVM2Item { if (lti.value instanceof ConvertAVM2Item) { coerType = ((ConvertAVM2Item) lti.value).type; } - srcData.put("declaredType", (coerType instanceof TypeItem)?((TypeItem)coerType).fullTypeName:"*"); + srcData.put("declaredType", (coerType instanceof TypeItem) ? ((TypeItem) coerType).fullTypeName : "*"); writer.append("var "); writer.append(localName); - writer.append(":"); + writer.append(":"); coerType.appendTo(writer, localData); writer.append(" = "); return lti.value.toString(writer, localData); } if (assignment instanceof SetSlotAVM2Item) { SetSlotAVM2Item ssti = (SetSlotAVM2Item) assignment; - srcData.put("localName",ssti.getNameAsStr(localData)); + srcData.put("localName", ssti.getNameAsStr(localData)); srcData.put("declaration", "true"); - srcData.put("declaredType", (type instanceof TypeItem)?((TypeItem)type).fullTypeName:"*"); + srcData.put("declaredType", (type instanceof TypeItem) ? ((TypeItem) type).fullTypeName : "*"); writer.append("var "); ssti.getName(writer, localData); - writer.append(":"); - + writer.append(":"); + type.appendTo(writer, localData); writer.append(" = "); return ssti.value.toString(writer, localData); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java index f4874e94e..6cc12bb7a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/TryAVM2Item.java @@ -79,16 +79,16 @@ public class TryAVM2Item extends AVM2Item implements Block { writer.newLine(); writer.append("catch("); String localName = catchExceptions.get(e).getVarName(localData.constantsAvm2, localData.fullyQualifiedNames); - Map data=new HashMap<>(); + Map data = new HashMap<>(); data.put("localName", localName); data.put("declaration", "true"); - - int eti= catchExceptions.get(e).type_index; - - data.put("declaredType", eti<=0?"*":localData.constantsAvm2.constant_multiname.get(eti).getNameWithNamespace(localData.constantsAvm2, true)); - writer.hilightSpecial(localName, "try.name",e,data); + + int eti = catchExceptions.get(e).type_index; + + data.put("declaredType", eti <= 0 ? "*" : localData.constantsAvm2.constant_multiname.get(eti).getNameWithNamespace(localData.constantsAvm2, true)); + writer.hilightSpecial(localName, "try.name", e, data); writer.append(":"); - writer.hilightSpecial(catchExceptions.get(e).getTypeName(localData.constantsAvm2, localData.fullyQualifiedNames),"try.type",e); + writer.hilightSpecial(catchExceptions.get(e).getTypeName(localData.constantsAvm2, localData.fullyQualifiedNames), "try.type", e); writer.append(")"); writer.startBlock(); List commands = catchCommands.get(e); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java index 7dbd7c103..1ae0ea7ec 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java @@ -17,992 +17,1031 @@ * along with this program. If not, see . */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; + import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException; import java.io.StringReader; import java.util.ArrayList; import java.util.List; import java.util.Stack; - /** - * This class is a scanner generated by - * JFlex 1.6.0 - * from the specification file actionscript.flex + * This class is a scanner generated by + * JFlex 1.6.0 from the specification file + * actionscript.flex */ public final class ActionScriptLexer { - /** This character denotes the end of file */ - public static final int YYEOF = -1; + /** + * This character denotes the end of file + */ + public static final int YYEOF = -1; - /** initial size of the lookahead buffer */ - private static final int ZZ_BUFFERSIZE = 16384; + /** + * initial size of the lookahead buffer + */ + private static final int ZZ_BUFFERSIZE = 16384; - /** lexical states */ - public static final int YYINITIAL = 0; - public static final int STRING = 2; - public static final int CHARLITERAL = 4; - public static final int XMLOPENTAG = 6; - public static final int XMLOPENTAGATTRIB = 8; - public static final int XMLINSTROPENTAG = 10; - public static final int XMLINSTRATTRIB = 12; - public static final int XMLCDATA = 14; - public static final int XMLCOMMENT = 16; - public static final int XML = 18; - public static final int OIDENTIFIER = 20; + /** + * lexical states + */ + public static final int YYINITIAL = 0; + public static final int STRING = 2; + public static final int CHARLITERAL = 4; + public static final int XMLOPENTAG = 6; + public static final int XMLOPENTAGATTRIB = 8; + public static final int XMLINSTROPENTAG = 10; + public static final int XMLINSTRATTRIB = 12; + public static final int XMLCDATA = 14; + public static final int XMLCOMMENT = 16; + public static final int XML = 18; + public static final int OIDENTIFIER = 20; - /** - * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l - * at the beginning of a line - * l is of the form l = 2*k, k a non negative integer - */ - private static final int ZZ_LEXSTATE[] = { - 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, - 8, 8, 9, 9, 10, 10 - }; + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, + 8, 8, 9, 9, 10, 10 + }; - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED = - "\11\0\1\13\1\2\1\112\1\3\1\1\22\0\1\13\1\14\1\33"+ - "\1\0\1\6\1\110\1\105\1\34\1\76\1\77\1\5\1\45\1\103"+ - "\1\15\1\11\1\4\1\35\3\41\4\42\2\21\1\17\1\102\1\12"+ - "\1\32\1\16\1\23\1\111\1\27\1\20\1\25\1\26\1\43\1\20"+ - "\2\10\1\74\4\10\1\75\5\10\1\30\3\10\1\37\2\10\1\24"+ - "\1\46\1\31\1\107\1\10\1\0\1\52\1\50\1\54\1\63\1\44"+ - "\1\40\1\73\1\66\1\61\1\10\1\53\1\64\1\71\1\57\1\56"+ - "\1\67\1\10\1\51\1\55\1\60\1\62\1\72\1\65\1\36\1\70"+ - "\1\10\1\100\1\106\1\101\1\104\6\0\1\112\41\0\1\47\2\0"+ - "\1\6\12\0\1\6\1\0\1\22\2\0\1\6\5\0\2\6\1\113"+ - "\24\6\1\0\37\6\1\0\u01ca\6\4\0\14\6\16\0\5\6\7\0"+ - "\1\6\1\0\1\6\21\0\160\7\5\6\1\0\2\6\2\0\4\6"+ - "\1\0\1\6\6\0\1\6\1\0\3\6\1\0\1\6\1\0\24\6"+ - "\1\0\123\6\1\0\213\6\1\0\5\7\2\0\246\6\1\0\46\6"+ - "\2\0\1\6\7\0\47\6\11\0\55\7\1\0\1\7\1\0\2\7"+ - "\1\0\2\7\1\0\1\7\10\0\33\6\5\0\3\6\35\0\13\7"+ - "\5\0\53\6\37\7\4\0\2\6\1\7\143\6\1\0\1\6\7\7"+ - "\2\0\6\7\2\6\2\7\1\0\4\7\2\6\12\7\3\6\2\0"+ - "\1\6\20\0\1\6\1\7\36\6\33\7\2\0\131\6\13\7\1\6"+ - "\16\0\12\7\41\6\11\7\2\6\4\0\1\6\5\0\26\6\4\7"+ - "\1\6\11\7\1\6\3\7\1\6\5\7\22\0\31\6\3\7\104\0"+ - "\23\6\61\0\40\7\66\6\3\7\1\6\22\7\1\6\7\7\12\6"+ - "\2\7\2\0\12\7\1\0\20\6\3\7\1\0\10\6\2\0\2\6"+ - "\2\0\26\6\1\0\7\6\1\0\1\6\3\0\4\6\2\0\1\7"+ - "\1\6\7\7\2\0\2\7\2\0\3\7\1\6\10\0\1\7\4\0"+ - "\2\6\1\0\3\6\2\7\2\0\12\7\2\6\17\0\3\7\1\0"+ - "\6\6\4\0\2\6\2\0\26\6\1\0\7\6\1\0\2\6\1\0"+ - "\2\6\1\0\2\6\2\0\1\7\1\0\5\7\4\0\2\7\2\0"+ - "\3\7\3\0\1\7\7\0\4\6\1\0\1\6\7\0\14\7\3\6"+ - "\1\7\13\0\3\7\1\0\11\6\1\0\3\6\1\0\26\6\1\0"+ - "\7\6\1\0\2\6\1\0\5\6\2\0\1\7\1\6\10\7\1\0"+ - "\3\7\1\0\3\7\2\0\1\6\17\0\2\6\2\7\2\0\12\7"+ - "\21\0\3\7\1\0\10\6\2\0\2\6\2\0\26\6\1\0\7\6"+ - "\1\0\2\6\1\0\5\6\2\0\1\7\1\6\7\7\2\0\2\7"+ - "\2\0\3\7\10\0\2\7\4\0\2\6\1\0\3\6\2\7\2\0"+ - "\12\7\1\0\1\6\20\0\1\7\1\6\1\0\6\6\3\0\3\6"+ - "\1\0\4\6\3\0\2\6\1\0\1\6\1\0\2\6\3\0\2\6"+ - "\3\0\3\6\3\0\14\6\4\0\5\7\3\0\3\7\1\0\4\7"+ - "\2\0\1\6\6\0\1\7\16\0\12\7\20\0\4\7\1\0\10\6"+ - "\1\0\3\6\1\0\27\6\1\0\20\6\3\0\1\6\7\7\1\0"+ - "\3\7\1\0\4\7\7\0\2\7\1\0\2\6\6\0\2\6\2\7"+ - "\2\0\12\7\21\0\3\7\1\0\10\6\1\0\3\6\1\0\27\6"+ - "\1\0\12\6\1\0\5\6\2\0\1\7\1\6\7\7\1\0\3\7"+ - "\1\0\4\7\7\0\2\7\7\0\1\6\1\0\2\6\2\7\2\0"+ - "\12\7\1\0\2\6\16\0\3\7\1\0\10\6\1\0\3\6\1\0"+ - "\51\6\2\0\1\6\7\7\1\0\3\7\1\0\4\7\1\6\10\0"+ - "\1\7\10\0\2\6\2\7\2\0\12\7\12\0\6\6\2\0\2\7"+ - "\1\0\22\6\3\0\30\6\1\0\11\6\1\0\1\6\2\0\7\6"+ - "\3\0\1\7\4\0\6\7\1\0\1\7\1\0\10\7\6\0\12\7"+ - "\2\0\2\7\15\0\60\6\1\7\2\6\7\7\5\0\7\6\10\7"+ - "\1\0\12\7\47\0\2\6\1\0\1\6\2\0\2\6\1\0\1\6"+ - "\2\0\1\6\6\0\4\6\1\0\7\6\1\0\3\6\1\0\1\6"+ - "\1\0\1\6\2\0\2\6\1\0\4\6\1\7\2\6\6\7\1\0"+ - "\2\7\1\6\2\0\5\6\1\0\1\6\1\0\6\7\2\0\12\7"+ - "\2\0\4\6\40\0\1\6\27\0\2\7\6\0\12\7\13\0\1\7"+ - "\1\0\1\7\1\0\1\7\4\0\2\7\10\6\1\0\44\6\4\0"+ - "\24\7\1\0\2\7\5\6\13\7\1\0\44\7\11\0\1\7\71\0"+ - "\53\6\24\7\1\6\12\7\6\0\6\6\4\7\4\6\3\7\1\6"+ - "\3\7\2\6\7\7\3\6\4\7\15\6\14\7\1\6\17\7\2\0"+ - "\46\6\1\0\1\6\5\0\1\6\2\0\53\6\1\0\u014d\6\1\0"+ - "\4\6\2\0\7\6\1\0\1\6\1\0\4\6\2\0\51\6\1\0"+ - "\4\6\2\0\41\6\1\0\4\6\2\0\7\6\1\0\1\6\1\0"+ - "\4\6\2\0\17\6\1\0\71\6\1\0\4\6\2\0\103\6\2\0"+ - "\3\7\40\0\20\6\20\0\125\6\14\0\u026c\6\2\0\21\6\1\0"+ - "\32\6\5\0\113\6\3\0\3\7\10\6\7\0\15\6\1\0\4\6"+ - "\3\7\13\0\22\6\3\7\13\0\22\6\2\7\14\0\15\6\1\0"+ - "\3\6\1\0\2\7\14\0\64\6\40\7\3\0\1\6\4\0\1\6"+ - "\1\7\2\0\12\7\41\0\3\7\2\0\12\7\6\0\130\6\10\0"+ - "\51\6\1\7\1\6\5\0\106\6\12\0\37\6\1\0\14\7\4\0"+ - "\14\7\12\0\12\7\36\6\2\0\5\6\13\0\54\6\4\0\21\7"+ - "\7\6\2\7\6\0\12\7\46\0\27\6\5\7\4\0\65\6\12\7"+ - "\1\0\35\7\2\0\13\7\6\0\12\7\15\0\1\6\10\0\16\7"+ - "\102\0\5\7\57\6\21\7\7\6\4\0\12\7\21\0\11\7\14\0"+ - "\3\7\36\6\15\7\2\6\12\7\54\6\16\7\14\0\44\6\24\7"+ - "\10\0\12\7\3\0\3\6\12\7\44\6\122\0\3\7\1\0\25\7"+ - "\4\6\1\7\4\6\3\7\2\6\1\0\2\7\6\0\300\6\66\7"+ - "\6\0\4\7\u0116\6\2\0\6\6\2\0\46\6\2\0\6\6\2\0"+ - "\10\6\1\0\1\6\1\0\1\6\1\0\1\6\1\0\37\6\2\0"+ - "\65\6\1\0\7\6\1\0\1\6\3\0\3\6\1\0\7\6\3\0"+ - "\4\6\2\0\6\6\4\0\15\6\5\0\3\6\1\0\7\6\3\0"+ - "\14\0\2\0\32\0\1\112\1\112\25\0\2\7\23\0\1\7\33\0"+ - "\1\0\1\6\15\0\1\6\20\0\15\6\63\0\15\7\4\0\1\7"+ - "\3\0\14\7\21\0\1\6\4\0\1\6\2\0\12\6\1\0\1\6"+ - "\3\0\5\6\6\0\1\6\1\0\1\6\1\0\1\6\1\0\4\6"+ - "\1\0\13\6\2\0\4\6\5\0\5\6\4\0\1\6\21\0\43\7"+ - "\2\6\4\7\7\0\u0a70\0\57\6\1\0\57\6\1\0\205\6\6\0"+ - "\4\6\3\7\2\6\14\0\46\6\1\0\1\6\5\0\1\6\2\0"+ - "\70\6\7\0\1\6\17\0\1\7\27\6\11\0\7\6\1\0\7\6"+ - "\1\0\7\6\1\0\7\6\1\0\7\6\1\0\7\6\1\0\7\6"+ - "\1\0\7\6\1\0\40\7\57\0\1\6\u01c0\0\21\0\4\0\2\6"+ - "\1\7\31\0\17\7\1\0\5\6\2\0\3\7\2\6\4\0\126\6"+ - "\2\0\2\7\2\0\3\6\1\0\132\6\1\0\4\6\5\0\51\6"+ - "\3\0\136\6\21\0\33\6\65\0\20\6\u0200\0\u19b6\6\112\0\u51cd\6"+ - "\63\0\u048d\6\103\0\56\6\2\0\u010d\6\3\0\20\6\12\7\2\6"+ - "\24\0\57\6\1\7\4\0\12\7\1\0\37\6\1\0\1\7\106\6"+ - "\14\7\45\0\11\6\2\0\147\6\2\0\4\6\1\0\36\6\2\0"+ - "\2\6\105\0\13\6\1\7\3\6\1\7\4\6\1\7\27\6\5\7"+ - "\30\0\64\6\14\0\2\7\62\6\21\7\13\0\12\7\6\0\22\7"+ - "\6\6\3\0\1\6\4\0\12\7\34\6\10\7\2\0\27\6\15\7"+ - "\14\0\35\6\3\0\4\7\57\6\16\7\16\0\1\6\12\7\6\0"+ - "\5\6\1\7\12\6\12\7\5\6\1\0\51\6\16\7\11\0\3\6"+ - "\1\7\10\6\2\7\2\0\12\7\6\0\27\6\3\0\1\6\3\7"+ - "\62\6\1\7\1\6\3\7\2\6\2\7\5\6\2\7\1\6\1\7"+ - "\1\6\30\0\3\6\2\0\13\6\5\7\2\0\3\6\2\7\12\0"+ - "\6\6\2\0\6\6\2\0\6\6\11\0\7\6\1\0\7\6\1\0"+ - "\53\6\1\0\4\6\4\0\2\6\132\0\43\6\10\7\1\0\2\7"+ - "\2\0\12\7\6\0\u2ba4\6\14\0\27\6\4\0\61\6\4\0\u1800\0"+ - "\u0900\0\u016e\6\2\0\152\6\46\0\7\6\14\0\5\6\5\0\1\6"+ - "\1\7\12\6\1\0\15\6\1\0\5\6\1\0\1\6\1\0\2\6"+ - "\1\0\2\6\1\0\154\6\41\0\u016b\6\22\0\100\6\2\0\66\6"+ - "\10\0\40\0\14\6\4\0\20\7\20\0\16\7\5\0\2\7\30\0"+ - "\3\7\40\0\5\6\1\0\207\6\23\0\12\7\7\0\32\6\4\0"+ - "\1\7\1\0\32\6\13\0\131\6\3\0\6\6\2\0\6\6\2\0"+ - "\6\6\2\0\3\6\41\0\2\0\14\6\1\0\32\6\1\0\23\6"+ - "\1\0\2\6\1\0\17\6\2\0\16\6\42\0\173\6\105\0\65\7"+ - "\210\0\1\7\202\0\35\6\3\0\61\6\17\0\1\7\37\0\40\6"+ - "\20\0\21\6\1\7\10\6\1\7\5\0\46\6\5\7\5\0\36\6"+ - "\2\0\44\6\4\0\10\6\1\0\5\7\52\0\236\6\2\0\12\7"+ - "\126\0\50\6\10\0\64\6\234\0\u0137\6\11\0\26\6\12\0\10\6"+ - "\230\0\6\6\2\0\1\6\1\0\54\6\1\0\2\6\3\0\1\6"+ - "\2\0\27\6\12\0\27\6\11\0\37\6\141\0\26\6\12\0\32\6"+ - "\106\0\70\6\6\0\2\6\100\0\1\6\3\7\1\0\2\7\5\0"+ - "\4\7\4\6\1\0\3\6\1\0\33\6\4\0\3\7\4\0\1\7"+ - "\40\0\35\6\3\0\35\6\43\0\10\6\1\0\34\6\2\7\31\0"+ - "\66\6\12\0\26\6\12\0\23\6\15\0\22\6\156\0\111\6\u03b7\0"+ - "\3\7\65\6\17\7\37\0\12\7\17\0\4\7\55\6\13\7\25\0"+ - "\31\6\7\0\12\7\6\0\3\7\44\6\16\7\1\0\12\7\20\0"+ - "\43\6\1\7\2\0\1\6\11\0\3\7\60\6\16\7\4\6\13\0"+ - "\12\7\1\6\45\0\22\6\1\0\31\6\14\7\170\0\57\6\14\7"+ - "\5\0\12\7\7\0\3\7\1\0\10\6\2\0\2\6\2\0\26\6"+ - "\1\0\7\6\1\0\2\6\1\0\5\6\2\0\1\7\1\6\7\7"+ - "\2\0\2\7\2\0\3\7\11\0\1\7\5\0\5\6\2\7\2\0"+ - "\7\7\3\0\5\7\u010b\0\60\6\24\7\2\6\1\0\1\6\10\0"+ - "\12\7\246\0\57\6\7\7\2\0\11\7\77\0\60\6\21\7\3\0"+ - "\1\6\13\0\12\7\46\0\53\6\15\7\10\0\12\7\u01d6\0\100\6"+ - "\12\7\25\0\1\6\u01c0\0\71\6\u0507\0\u0399\6\147\0\157\7\u0b91\0"+ - "\u042f\6\u33d1\0\u0239\6\7\0\37\6\1\0\12\7\146\0\36\6\2\0"+ - "\5\7\13\0\60\6\7\7\11\0\4\6\14\0\12\7\11\0\25\6"+ - "\5\0\23\6\u0370\0\105\6\13\0\1\6\56\7\20\0\4\7\15\6"+ - "\u4060\0\2\6\u0bfe\0\153\6\5\0\15\6\3\0\11\6\7\0\12\6"+ - "\3\0\2\7\u14c6\0\5\7\3\0\6\7\10\0\10\7\2\0\7\7"+ - "\36\0\4\7\224\0\3\7\u01bb\0\125\6\1\0\107\6\1\0\2\6"+ - "\2\0\1\6\2\0\2\6\2\0\4\6\1\0\14\6\1\0\1\6"+ - "\1\0\7\6\1\0\101\6\1\0\4\6\2\0\10\6\1\0\7\6"+ - "\1\0\34\6\1\0\4\6\1\0\5\6\1\0\1\6\3\0\7\6"+ - "\1\0\u0154\6\2\0\31\6\1\0\31\6\1\0\37\6\1\0\31\6"+ - "\1\0\37\6\1\0\31\6\1\0\37\6\1\0\31\6\1\0\37\6"+ - "\1\0\31\6\1\0\10\6\2\0\62\7\u1000\0\305\6\13\0\7\7"+ - "\u0529\0\4\6\1\0\33\6\1\0\2\6\1\0\1\6\2\0\1\6"+ - "\1\0\12\6\1\0\4\6\1\0\1\6\1\0\1\6\6\0\1\6"+ - "\4\0\1\6\1\0\1\6\1\0\1\6\1\0\3\6\1\0\2\6"+ - "\1\0\1\6\2\0\1\6\1\0\1\6\1\0\1\6\1\0\1\6"+ - "\1\0\1\6\1\0\2\6\1\0\1\6\2\0\4\6\1\0\7\6"+ - "\1\0\4\6\1\0\4\6\1\0\1\6\1\0\12\6\1\0\21\6"+ - "\5\0\3\6\1\0\5\6\1\0\21\6\u1144\0\ua6d7\6\51\0\u1035\6"+ - "\13\0\336\6\u3fe2\0\u021e\6\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\u06ed\0"+ - "\360\7\uffff\0\uffff\0\ufe12\0"; + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED + = "\11\0\1\13\1\2\1\112\1\3\1\1\22\0\1\13\1\14\1\33" + + "\1\0\1\6\1\110\1\105\1\34\1\76\1\77\1\5\1\45\1\103" + + "\1\15\1\11\1\4\1\35\3\41\4\42\2\21\1\17\1\102\1\12" + + "\1\32\1\16\1\23\1\111\1\27\1\20\1\25\1\26\1\43\1\20" + + "\2\10\1\74\4\10\1\75\5\10\1\30\3\10\1\37\2\10\1\24" + + "\1\46\1\31\1\107\1\10\1\0\1\52\1\50\1\54\1\63\1\44" + + "\1\40\1\73\1\66\1\61\1\10\1\53\1\64\1\71\1\57\1\56" + + "\1\67\1\10\1\51\1\55\1\60\1\62\1\72\1\65\1\36\1\70" + + "\1\10\1\100\1\106\1\101\1\104\6\0\1\112\41\0\1\47\2\0" + + "\1\6\12\0\1\6\1\0\1\22\2\0\1\6\5\0\2\6\1\113" + + "\24\6\1\0\37\6\1\0\u01ca\6\4\0\14\6\16\0\5\6\7\0" + + "\1\6\1\0\1\6\21\0\160\7\5\6\1\0\2\6\2\0\4\6" + + "\1\0\1\6\6\0\1\6\1\0\3\6\1\0\1\6\1\0\24\6" + + "\1\0\123\6\1\0\213\6\1\0\5\7\2\0\246\6\1\0\46\6" + + "\2\0\1\6\7\0\47\6\11\0\55\7\1\0\1\7\1\0\2\7" + + "\1\0\2\7\1\0\1\7\10\0\33\6\5\0\3\6\35\0\13\7" + + "\5\0\53\6\37\7\4\0\2\6\1\7\143\6\1\0\1\6\7\7" + + "\2\0\6\7\2\6\2\7\1\0\4\7\2\6\12\7\3\6\2\0" + + "\1\6\20\0\1\6\1\7\36\6\33\7\2\0\131\6\13\7\1\6" + + "\16\0\12\7\41\6\11\7\2\6\4\0\1\6\5\0\26\6\4\7" + + "\1\6\11\7\1\6\3\7\1\6\5\7\22\0\31\6\3\7\104\0" + + "\23\6\61\0\40\7\66\6\3\7\1\6\22\7\1\6\7\7\12\6" + + "\2\7\2\0\12\7\1\0\20\6\3\7\1\0\10\6\2\0\2\6" + + "\2\0\26\6\1\0\7\6\1\0\1\6\3\0\4\6\2\0\1\7" + + "\1\6\7\7\2\0\2\7\2\0\3\7\1\6\10\0\1\7\4\0" + + "\2\6\1\0\3\6\2\7\2\0\12\7\2\6\17\0\3\7\1\0" + + "\6\6\4\0\2\6\2\0\26\6\1\0\7\6\1\0\2\6\1\0" + + "\2\6\1\0\2\6\2\0\1\7\1\0\5\7\4\0\2\7\2\0" + + "\3\7\3\0\1\7\7\0\4\6\1\0\1\6\7\0\14\7\3\6" + + "\1\7\13\0\3\7\1\0\11\6\1\0\3\6\1\0\26\6\1\0" + + "\7\6\1\0\2\6\1\0\5\6\2\0\1\7\1\6\10\7\1\0" + + "\3\7\1\0\3\7\2\0\1\6\17\0\2\6\2\7\2\0\12\7" + + "\21\0\3\7\1\0\10\6\2\0\2\6\2\0\26\6\1\0\7\6" + + "\1\0\2\6\1\0\5\6\2\0\1\7\1\6\7\7\2\0\2\7" + + "\2\0\3\7\10\0\2\7\4\0\2\6\1\0\3\6\2\7\2\0" + + "\12\7\1\0\1\6\20\0\1\7\1\6\1\0\6\6\3\0\3\6" + + "\1\0\4\6\3\0\2\6\1\0\1\6\1\0\2\6\3\0\2\6" + + "\3\0\3\6\3\0\14\6\4\0\5\7\3\0\3\7\1\0\4\7" + + "\2\0\1\6\6\0\1\7\16\0\12\7\20\0\4\7\1\0\10\6" + + "\1\0\3\6\1\0\27\6\1\0\20\6\3\0\1\6\7\7\1\0" + + "\3\7\1\0\4\7\7\0\2\7\1\0\2\6\6\0\2\6\2\7" + + "\2\0\12\7\21\0\3\7\1\0\10\6\1\0\3\6\1\0\27\6" + + "\1\0\12\6\1\0\5\6\2\0\1\7\1\6\7\7\1\0\3\7" + + "\1\0\4\7\7\0\2\7\7\0\1\6\1\0\2\6\2\7\2\0" + + "\12\7\1\0\2\6\16\0\3\7\1\0\10\6\1\0\3\6\1\0" + + "\51\6\2\0\1\6\7\7\1\0\3\7\1\0\4\7\1\6\10\0" + + "\1\7\10\0\2\6\2\7\2\0\12\7\12\0\6\6\2\0\2\7" + + "\1\0\22\6\3\0\30\6\1\0\11\6\1\0\1\6\2\0\7\6" + + "\3\0\1\7\4\0\6\7\1\0\1\7\1\0\10\7\6\0\12\7" + + "\2\0\2\7\15\0\60\6\1\7\2\6\7\7\5\0\7\6\10\7" + + "\1\0\12\7\47\0\2\6\1\0\1\6\2\0\2\6\1\0\1\6" + + "\2\0\1\6\6\0\4\6\1\0\7\6\1\0\3\6\1\0\1\6" + + "\1\0\1\6\2\0\2\6\1\0\4\6\1\7\2\6\6\7\1\0" + + "\2\7\1\6\2\0\5\6\1\0\1\6\1\0\6\7\2\0\12\7" + + "\2\0\4\6\40\0\1\6\27\0\2\7\6\0\12\7\13\0\1\7" + + "\1\0\1\7\1\0\1\7\4\0\2\7\10\6\1\0\44\6\4\0" + + "\24\7\1\0\2\7\5\6\13\7\1\0\44\7\11\0\1\7\71\0" + + "\53\6\24\7\1\6\12\7\6\0\6\6\4\7\4\6\3\7\1\6" + + "\3\7\2\6\7\7\3\6\4\7\15\6\14\7\1\6\17\7\2\0" + + "\46\6\1\0\1\6\5\0\1\6\2\0\53\6\1\0\u014d\6\1\0" + + "\4\6\2\0\7\6\1\0\1\6\1\0\4\6\2\0\51\6\1\0" + + "\4\6\2\0\41\6\1\0\4\6\2\0\7\6\1\0\1\6\1\0" + + "\4\6\2\0\17\6\1\0\71\6\1\0\4\6\2\0\103\6\2\0" + + "\3\7\40\0\20\6\20\0\125\6\14\0\u026c\6\2\0\21\6\1\0" + + "\32\6\5\0\113\6\3\0\3\7\10\6\7\0\15\6\1\0\4\6" + + "\3\7\13\0\22\6\3\7\13\0\22\6\2\7\14\0\15\6\1\0" + + "\3\6\1\0\2\7\14\0\64\6\40\7\3\0\1\6\4\0\1\6" + + "\1\7\2\0\12\7\41\0\3\7\2\0\12\7\6\0\130\6\10\0" + + "\51\6\1\7\1\6\5\0\106\6\12\0\37\6\1\0\14\7\4\0" + + "\14\7\12\0\12\7\36\6\2\0\5\6\13\0\54\6\4\0\21\7" + + "\7\6\2\7\6\0\12\7\46\0\27\6\5\7\4\0\65\6\12\7" + + "\1\0\35\7\2\0\13\7\6\0\12\7\15\0\1\6\10\0\16\7" + + "\102\0\5\7\57\6\21\7\7\6\4\0\12\7\21\0\11\7\14\0" + + "\3\7\36\6\15\7\2\6\12\7\54\6\16\7\14\0\44\6\24\7" + + "\10\0\12\7\3\0\3\6\12\7\44\6\122\0\3\7\1\0\25\7" + + "\4\6\1\7\4\6\3\7\2\6\1\0\2\7\6\0\300\6\66\7" + + "\6\0\4\7\u0116\6\2\0\6\6\2\0\46\6\2\0\6\6\2\0" + + "\10\6\1\0\1\6\1\0\1\6\1\0\1\6\1\0\37\6\2\0" + + "\65\6\1\0\7\6\1\0\1\6\3\0\3\6\1\0\7\6\3\0" + + "\4\6\2\0\6\6\4\0\15\6\5\0\3\6\1\0\7\6\3\0" + + "\14\0\2\0\32\0\1\112\1\112\25\0\2\7\23\0\1\7\33\0" + + "\1\0\1\6\15\0\1\6\20\0\15\6\63\0\15\7\4\0\1\7" + + "\3\0\14\7\21\0\1\6\4\0\1\6\2\0\12\6\1\0\1\6" + + "\3\0\5\6\6\0\1\6\1\0\1\6\1\0\1\6\1\0\4\6" + + "\1\0\13\6\2\0\4\6\5\0\5\6\4\0\1\6\21\0\43\7" + + "\2\6\4\7\7\0\u0a70\0\57\6\1\0\57\6\1\0\205\6\6\0" + + "\4\6\3\7\2\6\14\0\46\6\1\0\1\6\5\0\1\6\2\0" + + "\70\6\7\0\1\6\17\0\1\7\27\6\11\0\7\6\1\0\7\6" + + "\1\0\7\6\1\0\7\6\1\0\7\6\1\0\7\6\1\0\7\6" + + "\1\0\7\6\1\0\40\7\57\0\1\6\u01c0\0\21\0\4\0\2\6" + + "\1\7\31\0\17\7\1\0\5\6\2\0\3\7\2\6\4\0\126\6" + + "\2\0\2\7\2\0\3\6\1\0\132\6\1\0\4\6\5\0\51\6" + + "\3\0\136\6\21\0\33\6\65\0\20\6\u0200\0\u19b6\6\112\0\u51cd\6" + + "\63\0\u048d\6\103\0\56\6\2\0\u010d\6\3\0\20\6\12\7\2\6" + + "\24\0\57\6\1\7\4\0\12\7\1\0\37\6\1\0\1\7\106\6" + + "\14\7\45\0\11\6\2\0\147\6\2\0\4\6\1\0\36\6\2\0" + + "\2\6\105\0\13\6\1\7\3\6\1\7\4\6\1\7\27\6\5\7" + + "\30\0\64\6\14\0\2\7\62\6\21\7\13\0\12\7\6\0\22\7" + + "\6\6\3\0\1\6\4\0\12\7\34\6\10\7\2\0\27\6\15\7" + + "\14\0\35\6\3\0\4\7\57\6\16\7\16\0\1\6\12\7\6\0" + + "\5\6\1\7\12\6\12\7\5\6\1\0\51\6\16\7\11\0\3\6" + + "\1\7\10\6\2\7\2\0\12\7\6\0\27\6\3\0\1\6\3\7" + + "\62\6\1\7\1\6\3\7\2\6\2\7\5\6\2\7\1\6\1\7" + + "\1\6\30\0\3\6\2\0\13\6\5\7\2\0\3\6\2\7\12\0" + + "\6\6\2\0\6\6\2\0\6\6\11\0\7\6\1\0\7\6\1\0" + + "\53\6\1\0\4\6\4\0\2\6\132\0\43\6\10\7\1\0\2\7" + + "\2\0\12\7\6\0\u2ba4\6\14\0\27\6\4\0\61\6\4\0\u1800\0" + + "\u0900\0\u016e\6\2\0\152\6\46\0\7\6\14\0\5\6\5\0\1\6" + + "\1\7\12\6\1\0\15\6\1\0\5\6\1\0\1\6\1\0\2\6" + + "\1\0\2\6\1\0\154\6\41\0\u016b\6\22\0\100\6\2\0\66\6" + + "\10\0\40\0\14\6\4\0\20\7\20\0\16\7\5\0\2\7\30\0" + + "\3\7\40\0\5\6\1\0\207\6\23\0\12\7\7\0\32\6\4\0" + + "\1\7\1\0\32\6\13\0\131\6\3\0\6\6\2\0\6\6\2\0" + + "\6\6\2\0\3\6\41\0\2\0\14\6\1\0\32\6\1\0\23\6" + + "\1\0\2\6\1\0\17\6\2\0\16\6\42\0\173\6\105\0\65\7" + + "\210\0\1\7\202\0\35\6\3\0\61\6\17\0\1\7\37\0\40\6" + + "\20\0\21\6\1\7\10\6\1\7\5\0\46\6\5\7\5\0\36\6" + + "\2\0\44\6\4\0\10\6\1\0\5\7\52\0\236\6\2\0\12\7" + + "\126\0\50\6\10\0\64\6\234\0\u0137\6\11\0\26\6\12\0\10\6" + + "\230\0\6\6\2\0\1\6\1\0\54\6\1\0\2\6\3\0\1\6" + + "\2\0\27\6\12\0\27\6\11\0\37\6\141\0\26\6\12\0\32\6" + + "\106\0\70\6\6\0\2\6\100\0\1\6\3\7\1\0\2\7\5\0" + + "\4\7\4\6\1\0\3\6\1\0\33\6\4\0\3\7\4\0\1\7" + + "\40\0\35\6\3\0\35\6\43\0\10\6\1\0\34\6\2\7\31\0" + + "\66\6\12\0\26\6\12\0\23\6\15\0\22\6\156\0\111\6\u03b7\0" + + "\3\7\65\6\17\7\37\0\12\7\17\0\4\7\55\6\13\7\25\0" + + "\31\6\7\0\12\7\6\0\3\7\44\6\16\7\1\0\12\7\20\0" + + "\43\6\1\7\2\0\1\6\11\0\3\7\60\6\16\7\4\6\13\0" + + "\12\7\1\6\45\0\22\6\1\0\31\6\14\7\170\0\57\6\14\7" + + "\5\0\12\7\7\0\3\7\1\0\10\6\2\0\2\6\2\0\26\6" + + "\1\0\7\6\1\0\2\6\1\0\5\6\2\0\1\7\1\6\7\7" + + "\2\0\2\7\2\0\3\7\11\0\1\7\5\0\5\6\2\7\2\0" + + "\7\7\3\0\5\7\u010b\0\60\6\24\7\2\6\1\0\1\6\10\0" + + "\12\7\246\0\57\6\7\7\2\0\11\7\77\0\60\6\21\7\3\0" + + "\1\6\13\0\12\7\46\0\53\6\15\7\10\0\12\7\u01d6\0\100\6" + + "\12\7\25\0\1\6\u01c0\0\71\6\u0507\0\u0399\6\147\0\157\7\u0b91\0" + + "\u042f\6\u33d1\0\u0239\6\7\0\37\6\1\0\12\7\146\0\36\6\2\0" + + "\5\7\13\0\60\6\7\7\11\0\4\6\14\0\12\7\11\0\25\6" + + "\5\0\23\6\u0370\0\105\6\13\0\1\6\56\7\20\0\4\7\15\6" + + "\u4060\0\2\6\u0bfe\0\153\6\5\0\15\6\3\0\11\6\7\0\12\6" + + "\3\0\2\7\u14c6\0\5\7\3\0\6\7\10\0\10\7\2\0\7\7" + + "\36\0\4\7\224\0\3\7\u01bb\0\125\6\1\0\107\6\1\0\2\6" + + "\2\0\1\6\2\0\2\6\2\0\4\6\1\0\14\6\1\0\1\6" + + "\1\0\7\6\1\0\101\6\1\0\4\6\2\0\10\6\1\0\7\6" + + "\1\0\34\6\1\0\4\6\1\0\5\6\1\0\1\6\3\0\7\6" + + "\1\0\u0154\6\2\0\31\6\1\0\31\6\1\0\37\6\1\0\31\6" + + "\1\0\37\6\1\0\31\6\1\0\37\6\1\0\31\6\1\0\37\6" + + "\1\0\31\6\1\0\10\6\2\0\62\7\u1000\0\305\6\13\0\7\7" + + "\u0529\0\4\6\1\0\33\6\1\0\2\6\1\0\1\6\2\0\1\6" + + "\1\0\12\6\1\0\4\6\1\0\1\6\1\0\1\6\6\0\1\6" + + "\4\0\1\6\1\0\1\6\1\0\1\6\1\0\3\6\1\0\2\6" + + "\1\0\1\6\2\0\1\6\1\0\1\6\1\0\1\6\1\0\1\6" + + "\1\0\1\6\1\0\2\6\1\0\1\6\2\0\4\6\1\0\7\6" + + "\1\0\4\6\1\0\4\6\1\0\1\6\1\0\12\6\1\0\21\6" + + "\5\0\3\6\1\0\5\6\1\0\21\6\u1144\0\ua6d7\6\51\0\u1035\6" + + "\13\0\336\6\u3fe2\0\u021e\6\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\u06ed\0" + + "\360\7\uffff\0\uffff\0\ufe12\0"; - /** - * Translates characters to character classes - */ - private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + /** + * Translates characters to character classes + */ + private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - /** - * Translates DFA states to action switch labels. - */ - private static final int [] ZZ_ACTION = zzUnpackAction(); + /** + * Translates DFA states to action switch labels. + */ + private static final int[] ZZ_ACTION = zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 = - "\13\0\1\1\2\2\1\3\1\4\1\5\1\6\1\7"+ - "\1\10\1\11\1\12\1\13\1\14\1\15\1\16\1\17"+ - "\1\20\1\21\1\22\1\23\1\15\2\6\1\24\1\25"+ - "\21\6\1\26\1\27\1\30\1\31\1\32\1\33\1\34"+ - "\1\35\1\36\1\37\1\40\1\41\1\42\2\43\1\44"+ - "\1\1\1\42\2\45\1\42\2\1\1\46\1\47\1\1"+ - "\1\50\2\1\1\51\1\1\1\52\2\42\2\53\1\42"+ - "\1\54\1\42\1\1\1\55\1\3\1\0\1\56\1\57"+ - "\1\60\1\61\1\62\1\63\1\64\1\65\1\66\1\67"+ - "\1\70\1\71\1\72\1\73\1\74\1\75\1\0\1\76"+ - "\1\62\1\77\1\0\2\77\7\6\1\100\1\101\2\6"+ - "\1\102\16\6\1\103\1\104\1\105\4\6\1\106\13\6"+ - "\1\107\1\110\1\111\1\112\1\113\1\114\1\115\1\116"+ - "\1\117\1\120\1\121\1\120\1\122\1\123\1\124\1\125"+ - "\1\126\1\127\1\0\1\130\1\0\1\131\1\0\1\132"+ - "\1\133\1\0\1\134\4\0\1\135\2\0\1\136\1\115"+ - "\2\3\2\0\1\137\1\140\1\141\1\142\1\143\1\0"+ - "\1\62\1\144\2\145\1\77\1\6\1\146\13\6\1\147"+ - "\4\6\1\150\4\6\1\151\6\6\1\152\12\6\1\153"+ - "\1\6\1\154\1\6\1\155\1\120\1\0\1\134\1\156"+ - "\1\157\1\0\1\160\2\0\1\161\1\162\1\163\1\0"+ - "\1\164\1\145\1\77\4\6\1\165\1\166\2\6\1\167"+ - "\12\6\1\170\1\171\1\6\1\172\11\6\1\173\5\6"+ - "\1\174\1\6\1\0\1\175\1\176\1\0\1\145\1\77"+ - "\1\177\1\200\2\6\1\201\1\6\1\202\1\203\1\6"+ - "\1\204\1\6\1\205\4\6\1\206\11\6\1\207\5\6"+ - "\1\0\1\145\1\77\3\6\1\210\1\6\1\211\1\212"+ - "\1\6\1\213\1\6\1\214\3\6\1\215\3\6\1\216"+ - "\4\6\1\217\1\6\1\0\1\145\1\77\1\220\1\6"+ - "\1\221\10\6\1\222\1\223\1\6\1\224\1\225\1\6"+ - "\1\0\1\145\1\77\1\226\1\227\1\230\3\6\1\231"+ - "\3\6\1\232\1\0\1\145\1\77\1\233\1\6\1\234"+ - "\1\6\1\235\1\236\1\237\1\145\1\77\1\240\1\241"+ - "\6\77"; + private static final String ZZ_ACTION_PACKED_0 + = "\13\0\1\1\2\2\1\3\1\4\1\5\1\6\1\7" + + "\1\10\1\11\1\12\1\13\1\14\1\15\1\16\1\17" + + "\1\20\1\21\1\22\1\23\1\15\2\6\1\24\1\25" + + "\21\6\1\26\1\27\1\30\1\31\1\32\1\33\1\34" + + "\1\35\1\36\1\37\1\40\1\41\1\42\2\43\1\44" + + "\1\1\1\42\2\45\1\42\2\1\1\46\1\47\1\1" + + "\1\50\2\1\1\51\1\1\1\52\2\42\2\53\1\42" + + "\1\54\1\42\1\1\1\55\1\3\1\0\1\56\1\57" + + "\1\60\1\61\1\62\1\63\1\64\1\65\1\66\1\67" + + "\1\70\1\71\1\72\1\73\1\74\1\75\1\0\1\76" + + "\1\62\1\77\1\0\2\77\7\6\1\100\1\101\2\6" + + "\1\102\16\6\1\103\1\104\1\105\4\6\1\106\13\6" + + "\1\107\1\110\1\111\1\112\1\113\1\114\1\115\1\116" + + "\1\117\1\120\1\121\1\120\1\122\1\123\1\124\1\125" + + "\1\126\1\127\1\0\1\130\1\0\1\131\1\0\1\132" + + "\1\133\1\0\1\134\4\0\1\135\2\0\1\136\1\115" + + "\2\3\2\0\1\137\1\140\1\141\1\142\1\143\1\0" + + "\1\62\1\144\2\145\1\77\1\6\1\146\13\6\1\147" + + "\4\6\1\150\4\6\1\151\6\6\1\152\12\6\1\153" + + "\1\6\1\154\1\6\1\155\1\120\1\0\1\134\1\156" + + "\1\157\1\0\1\160\2\0\1\161\1\162\1\163\1\0" + + "\1\164\1\145\1\77\4\6\1\165\1\166\2\6\1\167" + + "\12\6\1\170\1\171\1\6\1\172\11\6\1\173\5\6" + + "\1\174\1\6\1\0\1\175\1\176\1\0\1\145\1\77" + + "\1\177\1\200\2\6\1\201\1\6\1\202\1\203\1\6" + + "\1\204\1\6\1\205\4\6\1\206\11\6\1\207\5\6" + + "\1\0\1\145\1\77\3\6\1\210\1\6\1\211\1\212" + + "\1\6\1\213\1\6\1\214\3\6\1\215\3\6\1\216" + + "\4\6\1\217\1\6\1\0\1\145\1\77\1\220\1\6" + + "\1\221\10\6\1\222\1\223\1\6\1\224\1\225\1\6" + + "\1\0\1\145\1\77\1\226\1\227\1\230\3\6\1\231" + + "\3\6\1\232\1\0\1\145\1\77\1\233\1\6\1\234" + + "\1\6\1\235\1\236\1\237\1\145\1\77\1\240\1\241" + + "\6\77"; - private static int [] zzUnpackAction() { - int [] result = new int[437]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); + private static int[] zzUnpackAction() { + int[] result = new int[437]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; } - return j; - } + private static int zzUnpackAction(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ - /** - * Translates a state to a row index in the transition table - */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); + int j = offset; /* index in unpacked array */ - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\114\0\230\0\344\0\u0130\0\u017c\0\u01c8\0\u0214"+ - "\0\u0260\0\u02ac\0\u02f8\0\u0344\0\u0390\0\u0344\0\u03dc\0\u0428"+ - "\0\u0474\0\u04c0\0\u050c\0\u0558\0\u05a4\0\u05f0\0\u063c\0\u0688"+ - "\0\u06d4\0\u0344\0\u0344\0\u0344\0\u0720\0\u0344\0\u0344\0\u076c"+ - "\0\u07b8\0\u0804\0\u0850\0\u0344\0\u089c\0\u08e8\0\u0934\0\u0980"+ - "\0\u09cc\0\u0a18\0\u0a64\0\u0ab0\0\u0afc\0\u0b48\0\u0b94\0\u0be0"+ - "\0\u0c2c\0\u0c78\0\u0cc4\0\u0d10\0\u0d5c\0\u0344\0\u0344\0\u0344"+ - "\0\u0344\0\u0344\0\u0344\0\u0344\0\u0da8\0\u0df4\0\u0e40\0\u0e8c"+ - "\0\u0344\0\u0ed8\0\u0f24\0\u0344\0\u0344\0\u0f70\0\u0fbc\0\u1008"+ - "\0\u0344\0\u1054\0\u10a0\0\u10ec\0\u0344\0\u0344\0\u1138\0\u0344"+ - "\0\u1184\0\u11d0\0\u0344\0\u121c\0\u0344\0\u0344\0\u1268\0\u0344"+ - "\0\u12b4\0\u1300\0\u0344\0\u134c\0\u1398\0\u0344\0\u13e4\0\u1430"+ - "\0\u0344\0\u0344\0\u147c\0\u0344\0\u14c8\0\u0344\0\u1514\0\u1560"+ - "\0\u0344\0\u0344\0\u15ac\0\u0344\0\u0344\0\u15f8\0\u0344\0\u0344"+ - "\0\u1644\0\u1690\0\u16dc\0\u1728\0\u1774\0\u17c0\0\u180c\0\u1858"+ - "\0\u18a4\0\u18f0\0\u193c\0\u1988\0\u19d4\0\u1a20\0\u0344\0\u0344"+ - "\0\u1a6c\0\u1ab8\0\u04c0\0\u1b04\0\u1b50\0\u1b9c\0\u1be8\0\u1c34"+ - "\0\u1c80\0\u1ccc\0\u1d18\0\u1d64\0\u1db0\0\u1dfc\0\u1e48\0\u1e94"+ - "\0\u1ee0\0\u04c0\0\u04c0\0\u1f2c\0\u1f78\0\u1fc4\0\u2010\0\u205c"+ - "\0\u04c0\0\u20a8\0\u20f4\0\u2140\0\u218c\0\u21d8\0\u2224\0\u2270"+ - "\0\u22bc\0\u2308\0\u2354\0\u23a0\0\u0344\0\u0344\0\u0344\0\u0344"+ - "\0\u0344\0\u0344\0\u0344\0\u0344\0\u0344\0\u23ec\0\u0344\0\u2438"+ - "\0\u0344\0\u0344\0\u0344\0\u0344\0\u0344\0\u0344\0\u10ec\0\u0344"+ - "\0\u1138\0\u0344\0\u1184\0\u0344\0\u0344\0\u121c\0\u2484\0\u24d0"+ - "\0\u251c\0\u2568\0\u25b4\0\u2600\0\u264c\0\u2698\0\u0344\0\u26e4"+ - "\0\u2730\0\u0344\0\u277c\0\u27c8\0\u0344\0\u0344\0\u0344\0\u2814"+ - "\0\u0344\0\u2860\0\u2860\0\u0344\0\u28ac\0\u1774\0\u28f8\0\u2944"+ - "\0\u04c0\0\u2990\0\u29dc\0\u2a28\0\u2a74\0\u2ac0\0\u2b0c\0\u2b58"+ - "\0\u2ba4\0\u2bf0\0\u2c3c\0\u2c88\0\u04c0\0\u2cd4\0\u2d20\0\u2d6c"+ - "\0\u2db8\0\u04c0\0\u2e04\0\u2e50\0\u2e9c\0\u2ee8\0\u04c0\0\u2f34"+ - "\0\u2f80\0\u2fcc\0\u3018\0\u3064\0\u30b0\0\u04c0\0\u30fc\0\u3148"+ - "\0\u3194\0\u31e0\0\u322c\0\u3278\0\u32c4\0\u3310\0\u335c\0\u33a8"+ - "\0\u04c0\0\u33f4\0\u04c0\0\u3440\0\u04c0\0\u0344\0\u2484\0\u0344"+ - "\0\u0344\0\u0344\0\u348c\0\u0344\0\u34d8\0\u3524\0\u3570\0\u0344"+ - "\0\u0344\0\u35bc\0\u0344\0\u3608\0\u3654\0\u36a0\0\u36ec\0\u3738"+ - "\0\u3784\0\u04c0\0\u04c0\0\u37d0\0\u381c\0\u04c0\0\u3868\0\u38b4"+ - "\0\u3900\0\u394c\0\u3998\0\u39e4\0\u3a30\0\u3a7c\0\u3ac8\0\u3b14"+ - "\0\u04c0\0\u04c0\0\u3b60\0\u04c0\0\u3bac\0\u3bf8\0\u3c44\0\u3c90"+ - "\0\u3cdc\0\u3d28\0\u3d74\0\u3dc0\0\u3e0c\0\u04c0\0\u3e58\0\u3ea4"+ - "\0\u3ef0\0\u3f3c\0\u3f88\0\u04c0\0\u3fd4\0\u4020\0\u0344\0\u0344"+ - "\0\u406c\0\u40b8\0\u4104\0\u04c0\0\u4150\0\u419c\0\u41e8\0\u04c0"+ - "\0\u4234\0\u04c0\0\u04c0\0\u4280\0\u04c0\0\u42cc\0\u04c0\0\u4318"+ - "\0\u4364\0\u43b0\0\u43fc\0\u04c0\0\u4448\0\u4494\0\u44e0\0\u452c"+ - "\0\u4578\0\u45c4\0\u4610\0\u465c\0\u46a8\0\u04c0\0\u46f4\0\u4740"+ - "\0\u478c\0\u47d8\0\u4824\0\u4870\0\u48bc\0\u4908\0\u4954\0\u49a0"+ - "\0\u49ec\0\u04c0\0\u4a38\0\u04c0\0\u04c0\0\u4a84\0\u04c0\0\u4ad0"+ - "\0\u04c0\0\u4b1c\0\u4b68\0\u4bb4\0\u04c0\0\u4c00\0\u4c4c\0\u4c98"+ - "\0\u04c0\0\u4ce4\0\u4d30\0\u4d7c\0\u4dc8\0\u04c0\0\u4e14\0\u4e60"+ - "\0\u4eac\0\u4ef8\0\u04c0\0\u4f44\0\u04c0\0\u4f90\0\u4fdc\0\u5028"+ - "\0\u5074\0\u50c0\0\u510c\0\u5158\0\u51a4\0\u04c0\0\u04c0\0\u51f0"+ - "\0\u04c0\0\u04c0\0\u523c\0\u5288\0\u52d4\0\u5320\0\u04c0\0\u04c0"+ - "\0\u04c0\0\u536c\0\u53b8\0\u5404\0\u04c0\0\u5450\0\u549c\0\u54e8"+ - "\0\u04c0\0\u5534\0\u5580\0\u55cc\0\u04c0\0\u5618\0\u04c0\0\u5664"+ - "\0\u04c0\0\u04c0\0\u0344\0\u0344\0\u56b0\0\u04c0\0\u04c0\0\u56fc"+ - "\0\u5748\0\u5794\0\u57e0\0\u582c\0\u16dc"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[437]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; } - return j; - } - /** - * The transition table of the DFA - */ - private static final int [] ZZ_TRANS = zzUnpackTrans(); + /** + * Translates a state to a row index in the transition table + */ + private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - private static final String ZZ_TRANS_PACKED_0 = - "\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\14"+ - "\1\22\1\23\1\24\1\17\1\25\1\26\1\27\1\30"+ - "\1\22\1\31\1\14\1\32\1\33\4\22\1\34\1\35"+ - "\1\36\1\37\1\40\2\22\1\41\2\31\1\22\1\42"+ - "\1\43\1\14\1\44\1\45\1\46\1\47\1\22\1\50"+ - "\1\51\1\52\1\53\1\54\1\55\1\56\1\57\1\22"+ - "\1\60\1\22\1\61\2\22\1\62\1\63\1\64\1\65"+ - "\1\66\1\67\1\70\1\71\1\72\1\73\1\74\1\75"+ - "\1\76\1\77\1\100\1\101\1\0\1\22\1\102\1\103"+ - "\1\104\30\102\1\105\12\102\1\106\45\102\1\107\1\103"+ - "\1\104\31\107\1\105\11\107\1\106\45\107\1\14\1\110"+ - "\1\111\1\112\1\113\3\14\1\114\2\14\1\112\2\14"+ - "\1\115\2\114\4\14\4\114\5\14\3\114\2\14\2\114"+ - "\3\14\26\114\2\14\1\116\11\14\1\0\2\14\1\0"+ - "\1\14\1\0\27\14\1\117\44\14\1\120\11\14\1\0"+ - "\2\14\1\110\1\111\1\112\4\14\1\121\2\14\1\112"+ - "\3\14\2\121\2\14\1\122\1\14\4\121\5\14\3\121"+ - "\2\14\2\121\3\14\26\121\2\14\1\123\11\14\1\0"+ - "\2\14\1\0\1\14\1\0\27\14\1\124\44\14\1\125"+ - "\11\14\1\0\1\14\1\126\1\110\1\111\1\0\25\126"+ - "\1\127\60\126\1\0\1\126\1\130\1\110\1\111\1\0"+ - "\11\130\1\131\74\130\1\0\1\130\1\126\1\110\1\111"+ - "\1\0\6\126\1\132\65\126\1\133\11\126\1\0\1\126"+ - "\1\134\1\103\1\104\43\134\1\135\1\136\44\134\116\0"+ - "\1\16\114\0\1\17\7\0\1\17\104\0\1\137\1\140"+ - "\24\0\1\141\113\0\1\142\67\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\26\22\15\0\1\22"+ - "\11\0\1\143\1\144\6\0\1\145\13\0\1\145\3\0"+ - "\2\145\33\0\1\146\25\0\1\147\1\0\1\150\4\0"+ - "\2\147\4\0\4\147\1\0\1\151\3\0\3\147\2\0"+ - "\2\147\3\0\26\147\2\0\1\152\45\0\1\153\76\0"+ - "\1\154\14\0\1\155\77\0\1\156\13\0\1\157\100\0"+ - "\1\160\105\0\1\145\7\0\1\31\13\0\1\31\3\0"+ - "\2\31\2\161\101\0\1\162\72\0\1\145\7\0\1\163"+ - "\13\0\1\164\2\165\1\0\1\166\1\167\2\161\55\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\2\22\1\170\3\22\1\171\2\22\1\172\1\173\13\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\1\22\1\174\6\22\3\0\2\22\1\175\11\22"+ - "\1\176\11\22\15\0\1\22\32\0\1\177\12\0\1\200"+ - "\54\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\1\22\1\201\24\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\7\22\1\202\3\0"+ - "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\5\22\1\203\20\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\2\22\1\204\3\22\1\205\5\22\1\206"+ - "\11\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\7\22\1\207\3\0\10\22\1\210\1\22"+ - "\1\211\2\22\1\212\10\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\22\22"+ - "\1\213\3\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\7\22\1\214\3\0\2\22\1\215"+ - "\7\22\1\216\13\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\1\22\1\217"+ - "\14\22\1\220\1\22\1\221\5\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\3\22\1\222"+ - "\4\22\3\0\5\22\1\223\1\22\1\224\11\22\1\225"+ - "\4\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\5\22\1\226\1\22\1\227"+ - "\16\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\7\22\1\230\3\0\6\22\1\231\11\22"+ - "\1\232\5\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\11\22\1\233\4\22"+ - "\1\234\7\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\1\22\1\235\1\236"+ - "\7\22\1\237\13\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\2\22\1\240"+ - "\3\22\1\241\17\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\7\22\1\242\3\0\26\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\7\22\1\243\16\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\2\22\1\244\23\22\15\0\1\22\32\0\1\245"+ - "\52\0\1\246\40\0\1\247\53\0\1\250\37\0\1\251"+ - "\113\0\1\252\61\0\1\102\2\0\30\102\1\0\12\102"+ - "\1\0\45\102\2\0\1\104\111\0\1\253\3\0\27\253"+ - "\1\254\1\255\1\256\2\253\1\257\1\256\1\260\3\253"+ - "\1\261\1\253\1\262\1\263\5\253\1\264\1\265\31\253"+ - "\1\0\1\253\1\107\2\0\31\107\1\0\11\107\1\0"+ - "\45\107\2\0\1\111\114\0\1\112\7\0\1\112\116\0"+ - "\1\266\105\0\2\267\3\0\1\267\1\0\4\267\2\0"+ - "\4\267\1\0\1\270\2\0\10\267\3\0\26\267\16\0"+ - "\1\271\2\0\30\271\1\272\60\271\10\0\2\273\3\0"+ - "\1\273\1\0\4\273\2\0\4\273\1\0\1\274\2\0"+ - "\10\273\3\0\26\273\34\0\1\275\75\0\1\276\2\0"+ - "\30\276\1\277\1\300\57\276\31\0\1\301\77\0\1\302"+ - "\102\0\1\303\3\0\1\304\3\0\1\305\2\0\2\304"+ - "\2\0\1\306\1\0\4\304\5\0\3\304\2\0\2\304"+ - "\3\0\26\304\2\0\1\307\13\0\1\134\2\0\43\134"+ - "\2\0\44\134\1\253\3\0\34\253\1\257\5\253\1\261"+ - "\1\253\1\262\1\263\5\253\1\264\1\265\31\253\1\0"+ - "\1\310\1\137\1\311\1\312\111\137\5\313\1\314\106\313"+ - "\11\0\1\315\123\0\1\145\13\0\1\145\3\0\2\145"+ - "\2\161\57\0\2\147\3\0\1\147\1\0\4\147\2\0"+ - "\4\147\4\0\10\147\3\0\26\147\50\0\1\316\113\0"+ - "\1\317\77\0\1\320\13\0\1\321\76\0\1\322\3\0"+ - "\1\323\13\0\1\323\3\0\2\323\2\0\1\322\100\0"+ - "\1\324\72\0\1\145\7\0\1\163\13\0\1\163\3\0"+ - "\2\163\2\161\60\0\1\145\7\0\1\163\13\0\1\164"+ - "\3\0\1\166\1\167\2\161\67\0\2\325\3\0\3\325"+ - "\5\0\1\326\2\0\5\325\3\0\1\325\1\0\1\325"+ - "\1\0\1\325\6\0\1\325\41\0\1\145\7\0\1\163"+ - "\13\0\1\167\3\0\2\167\2\161\60\0\1\145\7\0"+ - "\1\163\13\0\1\327\3\0\2\327\2\161\55\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\14\22"+ - "\1\330\11\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\1\22\1\331\24\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\7\22\1\332\16\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\7\22\1\333\16\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\10\22"+ - "\1\334\15\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\4\22\1\335\21\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\5\22\1\336\20\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\7\22"+ - "\1\337\3\0\26\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\10\22\1\340"+ - "\15\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\5\22\1\341\2\22\1\342"+ - "\15\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\7\22\1\343\16\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\2\22\1\344\23\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\10\22\1\345\15\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\2\22\1\346"+ - "\23\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\17\22\1\347\6\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\11\22\1\350\14\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\7\22\1\351"+ - "\3\0\26\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\15\22\1\352\10\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\10\22\1\353\10\22\1\354\4\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\14\22\1\355\11\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\12\22\1\356\5\22\1\357\5\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\1\22\1\360\7\22\1\361\14\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\17\22\1\362\6\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\5\22"+ - "\1\363\2\22\1\364\15\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\17\22"+ - "\1\365\6\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\7\22\1\366\3\0\26\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\13\22\1\367\12\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\3\22\1\370"+ - "\4\22\3\0\14\22\1\371\11\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\7\22\1\372\16\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\10\22\1\373"+ - "\15\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\11\22\1\374\14\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\6\22\1\375\2\22\1\376\14\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\4\22\1\377\21\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\1\u0100\25\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\1\22\1\u0101\24\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\11\22\1\u0102\14\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\10\22\1\u0103\15\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\3\22\1\u0104\4\22"+ - "\3\0\26\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\25\22\1\u0105\15\0"+ - "\1\22\35\0\1\260\3\0\2\260\106\0\1\u0106\3\0"+ - "\2\u0106\51\0\1\u0107\2\0\30\u0107\1\277\1\0\57\u0107"+ - "\1\300\2\0\30\300\1\u0108\60\300\16\0\1\u0109\113\0"+ - "\1\u010a\105\0\1\u010b\6\0\2\u010b\4\0\4\u010b\5\0"+ - "\3\u010b\2\0\2\u010b\3\0\26\u010b\2\0\1\u010c\23\0"+ - "\2\304\3\0\1\304\1\0\4\304\2\0\4\304\4\0"+ - "\10\304\3\0\26\304\33\0\1\u010d\6\0\1\u010e\77\0"+ - "\1\u010f\6\0\2\u010f\4\0\4\u010f\5\0\3\u010f\2\0"+ - "\2\u010f\3\0\26\u010f\2\0\1\u0110\62\0\1\u0111\46\0"+ - "\1\312\111\0\5\313\1\u0112\106\313\4\0\1\312\1\314"+ - "\140\0\1\u0113\102\0\1\323\13\0\1\323\3\0\2\323"+ - "\71\0\2\u0114\3\0\3\u0114\5\0\1\u0114\2\0\5\u0114"+ - "\3\0\1\u0114\1\0\1\u0114\1\0\1\u0114\6\0\1\u0114"+ - "\41\0\1\145\7\0\1\163\13\0\1\u0115\3\0\2\u0115"+ - "\2\161\55\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\5\22\1\u0116\20\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\2\22\1\u0117\23\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\4\22\1\u0118"+ - "\21\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\7\22\1\u0119\3\0\26\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\16\22\1\u011a\7\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\7\22\1\u011b\3\0"+ - "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\2\22\1\u011c\23\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\12\22\1\u011d\13\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\7\22\1\u011e"+ - "\3\0\26\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\4\22\1\u011f\21\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\5\22\1\u0120\2\22\1\u0121\15\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\5\22\1\u0122\20\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\10\22\1\u0123\15\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\7\22\1\u0124\3\0"+ - "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\10\22\1\u0125\15\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\1\22\1\u0126\24\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\11\22\1\u0127\14\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\7\22\1\u0128\3\0\26\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\14\22\1\u0129\11\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\7\22"+ - "\1\u012a\3\0\26\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\6\22\1\u012b"+ - "\17\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\5\22\1\u012c\20\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\7\22\1\u012d\3\0\26\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\10\22"+ - "\1\u012e\15\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\7\22\1\u012f\3\0\26\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\6\22\1\u0130\5\22\1\u0131\11\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\7\22\1\u0132\3\0\26\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\2\22"+ - "\1\u0133\23\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\7\22\1\u0134\3\0\26\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\2\22\1\u0135\23\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\16\22\1\u0136\7\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\14\22\1\u0137"+ - "\11\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\10\22\1\u0138\15\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\22\22\1\u0139\3\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\3\22\1\u013a\22\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\14\22\1\u013b"+ - "\11\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\13\22\1\u013c\12\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\11\22\1\u013d\14\22\15\0\1\22\1\0"+ - "\2\u013e\5\0\2\u010b\1\0\1\u013e\1\0\1\u010b\1\u013f"+ - "\4\u010b\2\0\4\u010b\4\0\10\u010b\3\0\26\u010b\33\0"+ - "\1\u0140\123\0\1\u0141\76\0\2\u010f\3\0\1\u010f\1\0"+ - "\4\u010f\2\0\4\u010f\4\0\10\u010f\3\0\26\u010f\16\0"+ - "\4\313\1\312\1\u0112\106\313\20\0\2\u0142\3\0\3\u0142"+ - "\5\0\1\u0142\2\0\5\u0142\3\0\1\u0142\1\0\1\u0142"+ - "\1\0\1\u0142\6\0\1\u0142\41\0\1\145\7\0\1\163"+ - "\13\0\1\u0143\3\0\2\u0143\2\161\55\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\7\22\1\u0144\3\0\26\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\14\22\1\u0145\11\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\10\22\1\u0146\15\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\7\22"+ - "\1\u0147\16\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\3\22\1\u0148\22\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\1\22\1\u0149\24\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\16\22\1\u014a\7\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\10\22"+ - "\1\u014b\15\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\11\22\1\u014c\14\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\5\22\1\u014d\20\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\11\22\1\u014e\14\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\1\22"+ - "\1\u014f\24\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\4\22\1\u0150\21\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\1\22\1\u0151\24\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\22\22\1\u0152\3\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\5\22"+ - "\1\u0153\20\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\15\22\1\u0154\10\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\6\22\1\u0155\17\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\2\22\1\u0156\23\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\1\22"+ - "\1\u0157\24\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\1\22\1\u0158\24\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\7\22\1\u0159\3\0\26\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\3\22\1\u015a"+ - "\4\22\3\0\26\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\12\22\1\u015b"+ - "\13\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\10\22\1\u015c\15\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\21\22\1\u015d\4\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\7\22\1\u015e"+ - "\3\0\26\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\7\22\1\u015f\3\0\26\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\2\22\1\u0160\23\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\2\22\1\u0161\23\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\11\22\1\u0162"+ - "\14\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\7\22\1\u0163\16\22\15\0"+ - "\1\22\1\0\2\u013e\10\0\1\u013e\2\0\1\u013f\123\0"+ - "\1\u0164\105\0\2\u0165\3\0\3\u0165\5\0\1\u0165\2\0"+ - "\5\u0165\3\0\1\u0165\1\0\1\u0165\1\0\1\u0165\6\0"+ - "\1\u0165\41\0\1\145\7\0\1\163\13\0\1\u0166\3\0"+ - "\2\u0166\2\161\55\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\14\22\1\u0167\11\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\11\22\1\u0168\14\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\13\22"+ - "\1\u0169\12\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\7\22\1\u016a\16\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\7\22\1\u016b\16\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\4\22\1\u016c\21\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\16\22"+ - "\1\u016d\7\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\11\22\1\u016e\14\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\7\22\1\u016f\3\0\26\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\17\22\1\u0170\6\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\3\22\1\u0171\4\22\3\0"+ - "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\7\22\1\u0172\16\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\3\22\1\u0173\4\22\3\0\7\22\1\u0174\16\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\10\22\1\u0175\15\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\21\22\1\u0176\4\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\11\22\1\u0177"+ - "\14\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\14\22\1\u0178\11\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\7\22\1\u0179\3\0\26\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\11\22"+ - "\1\u017a\14\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\4\22\1\u017b\21\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\10\22\1\u017c\15\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\23\22\1\u017d\2\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\4\22"+ - "\1\u017e\21\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\11\22\1\u017f\14\22"+ - "\15\0\1\22\27\0\1\u0180\104\0\2\u0181\3\0\3\u0181"+ - "\5\0\1\u0181\2\0\5\u0181\3\0\1\u0181\1\0\1\u0181"+ - "\1\0\1\u0181\6\0\1\u0181\41\0\1\145\7\0\1\163"+ - "\13\0\1\u0182\3\0\2\u0182\2\161\55\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\20\22\1\u0183"+ - "\5\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\6\22\1\u0184\17\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\5\22\1\u0185\20\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\12\22\1\u0186\13\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\13\22\1\u0187"+ - "\12\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\2\22\1\u0188\23\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\4\22\1\u0189\21\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\2\22\1\u018a\23\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\10\22\3\0\2\22\1\u018b"+ - "\23\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\7\22\1\u018c\3\0\26\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\7\22\1\u018d\16\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\10\22"+ - "\1\u018e\15\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\4\22\1\u018f\21\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\10\22\1\u0190\15\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\7\22"+ - "\1\u0191\3\0\26\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\7\22\1\u0192\3\0\26\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\10\22\1\u0193\15\22\15\0\1\22"+ - "\30\0\1\u0194\103\0\2\u0195\3\0\3\u0195\5\0\1\u0195"+ - "\2\0\5\u0195\3\0\1\u0195\1\0\1\u0195\1\0\1\u0195"+ - "\6\0\1\u0195\41\0\1\145\7\0\1\163\13\0\1\u0196"+ - "\3\0\2\u0196\2\161\55\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\7\22\1\u0197\16\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\7\22\1\u0198\3\0\26\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\7\22\1\u0199\3\0"+ - "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\4\22\1\u019a\21\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\7\22\1\u019b\3\0\26\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\4\22"+ - "\1\u019c\21\22\15\0\1\22\6\0\3\22\7\0\2\22"+ - "\3\0\4\22\4\0\10\22\3\0\14\22\1\u019d\11\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\7\22\1\u019e\16\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\7\22"+ - "\1\u019f\3\0\26\22\15\0\1\22\6\0\3\22\7\0"+ - "\2\22\3\0\4\22\4\0\7\22\1\u01a0\3\0\26\22"+ - "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22"+ - "\4\0\10\22\3\0\20\22\1\u01a1\5\22\15\0\1\22"+ - "\27\0\1\u01a2\104\0\2\u01a3\3\0\3\u01a3\5\0\1\u01a3"+ - "\2\0\5\u01a3\3\0\1\u01a3\1\0\1\u01a3\1\0\1\u01a3"+ - "\6\0\1\u01a3\41\0\1\145\7\0\1\163\13\0\1\u01a4"+ - "\3\0\2\u01a4\2\161\55\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\7\22\1\u01a5\3\0\26\22\15\0\1\22"+ - "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22"+ - "\3\0\6\22\1\u01a6\17\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\7\22\1\u01a7\3\0"+ - "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0"+ - "\4\22\4\0\10\22\3\0\10\22\1\u01a8\15\22\15\0"+ - "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0"+ - "\10\22\3\0\13\22\1\u01a9\12\22\15\0\1\22\6\0"+ - "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0"+ - "\13\22\1\u01aa\12\22\15\0\1\22\24\0\1\u01ab\107\0"+ - "\2\u01ac\3\0\3\u01ac\5\0\1\u01ac\2\0\5\u01ac\3\0"+ - "\1\u01ac\1\0\1\u01ac\1\0\1\u01ac\6\0\1\u01ac\41\0"+ - "\1\145\7\0\1\163\13\0\1\u01ad\3\0\2\u01ad\2\161"+ - "\55\0\3\22\7\0\2\22\3\0\4\22\4\0\3\22"+ - "\1\u01ae\4\22\3\0\26\22\15\0\1\22\6\0\3\22"+ - "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\5\22"+ - "\1\u01af\20\22\15\0\1\22\11\0\1\145\7\0\1\163"+ - "\13\0\1\u01b0\3\0\2\u01b0\2\161\60\0\1\145\7\0"+ - "\1\163\13\0\1\u01b1\3\0\2\u01b1\2\161\60\0\1\145"+ - "\7\0\1\163\13\0\1\u01b2\3\0\2\u01b2\2\161\60\0"+ - "\1\145\7\0\1\163\13\0\1\u01b3\3\0\2\u01b3\2\161"+ - "\60\0\1\145\7\0\1\163\13\0\1\u01b4\3\0\2\u01b4"+ - "\2\161\60\0\1\145\7\0\1\163\13\0\1\u01b5\3\0"+ - "\2\u01b5\2\161\47\0"; + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\114\0\230\0\344\0\u0130\0\u017c\0\u01c8\0\u0214" + + "\0\u0260\0\u02ac\0\u02f8\0\u0344\0\u0390\0\u0344\0\u03dc\0\u0428" + + "\0\u0474\0\u04c0\0\u050c\0\u0558\0\u05a4\0\u05f0\0\u063c\0\u0688" + + "\0\u06d4\0\u0344\0\u0344\0\u0344\0\u0720\0\u0344\0\u0344\0\u076c" + + "\0\u07b8\0\u0804\0\u0850\0\u0344\0\u089c\0\u08e8\0\u0934\0\u0980" + + "\0\u09cc\0\u0a18\0\u0a64\0\u0ab0\0\u0afc\0\u0b48\0\u0b94\0\u0be0" + + "\0\u0c2c\0\u0c78\0\u0cc4\0\u0d10\0\u0d5c\0\u0344\0\u0344\0\u0344" + + "\0\u0344\0\u0344\0\u0344\0\u0344\0\u0da8\0\u0df4\0\u0e40\0\u0e8c" + + "\0\u0344\0\u0ed8\0\u0f24\0\u0344\0\u0344\0\u0f70\0\u0fbc\0\u1008" + + "\0\u0344\0\u1054\0\u10a0\0\u10ec\0\u0344\0\u0344\0\u1138\0\u0344" + + "\0\u1184\0\u11d0\0\u0344\0\u121c\0\u0344\0\u0344\0\u1268\0\u0344" + + "\0\u12b4\0\u1300\0\u0344\0\u134c\0\u1398\0\u0344\0\u13e4\0\u1430" + + "\0\u0344\0\u0344\0\u147c\0\u0344\0\u14c8\0\u0344\0\u1514\0\u1560" + + "\0\u0344\0\u0344\0\u15ac\0\u0344\0\u0344\0\u15f8\0\u0344\0\u0344" + + "\0\u1644\0\u1690\0\u16dc\0\u1728\0\u1774\0\u17c0\0\u180c\0\u1858" + + "\0\u18a4\0\u18f0\0\u193c\0\u1988\0\u19d4\0\u1a20\0\u0344\0\u0344" + + "\0\u1a6c\0\u1ab8\0\u04c0\0\u1b04\0\u1b50\0\u1b9c\0\u1be8\0\u1c34" + + "\0\u1c80\0\u1ccc\0\u1d18\0\u1d64\0\u1db0\0\u1dfc\0\u1e48\0\u1e94" + + "\0\u1ee0\0\u04c0\0\u04c0\0\u1f2c\0\u1f78\0\u1fc4\0\u2010\0\u205c" + + "\0\u04c0\0\u20a8\0\u20f4\0\u2140\0\u218c\0\u21d8\0\u2224\0\u2270" + + "\0\u22bc\0\u2308\0\u2354\0\u23a0\0\u0344\0\u0344\0\u0344\0\u0344" + + "\0\u0344\0\u0344\0\u0344\0\u0344\0\u0344\0\u23ec\0\u0344\0\u2438" + + "\0\u0344\0\u0344\0\u0344\0\u0344\0\u0344\0\u0344\0\u10ec\0\u0344" + + "\0\u1138\0\u0344\0\u1184\0\u0344\0\u0344\0\u121c\0\u2484\0\u24d0" + + "\0\u251c\0\u2568\0\u25b4\0\u2600\0\u264c\0\u2698\0\u0344\0\u26e4" + + "\0\u2730\0\u0344\0\u277c\0\u27c8\0\u0344\0\u0344\0\u0344\0\u2814" + + "\0\u0344\0\u2860\0\u2860\0\u0344\0\u28ac\0\u1774\0\u28f8\0\u2944" + + "\0\u04c0\0\u2990\0\u29dc\0\u2a28\0\u2a74\0\u2ac0\0\u2b0c\0\u2b58" + + "\0\u2ba4\0\u2bf0\0\u2c3c\0\u2c88\0\u04c0\0\u2cd4\0\u2d20\0\u2d6c" + + "\0\u2db8\0\u04c0\0\u2e04\0\u2e50\0\u2e9c\0\u2ee8\0\u04c0\0\u2f34" + + "\0\u2f80\0\u2fcc\0\u3018\0\u3064\0\u30b0\0\u04c0\0\u30fc\0\u3148" + + "\0\u3194\0\u31e0\0\u322c\0\u3278\0\u32c4\0\u3310\0\u335c\0\u33a8" + + "\0\u04c0\0\u33f4\0\u04c0\0\u3440\0\u04c0\0\u0344\0\u2484\0\u0344" + + "\0\u0344\0\u0344\0\u348c\0\u0344\0\u34d8\0\u3524\0\u3570\0\u0344" + + "\0\u0344\0\u35bc\0\u0344\0\u3608\0\u3654\0\u36a0\0\u36ec\0\u3738" + + "\0\u3784\0\u04c0\0\u04c0\0\u37d0\0\u381c\0\u04c0\0\u3868\0\u38b4" + + "\0\u3900\0\u394c\0\u3998\0\u39e4\0\u3a30\0\u3a7c\0\u3ac8\0\u3b14" + + "\0\u04c0\0\u04c0\0\u3b60\0\u04c0\0\u3bac\0\u3bf8\0\u3c44\0\u3c90" + + "\0\u3cdc\0\u3d28\0\u3d74\0\u3dc0\0\u3e0c\0\u04c0\0\u3e58\0\u3ea4" + + "\0\u3ef0\0\u3f3c\0\u3f88\0\u04c0\0\u3fd4\0\u4020\0\u0344\0\u0344" + + "\0\u406c\0\u40b8\0\u4104\0\u04c0\0\u4150\0\u419c\0\u41e8\0\u04c0" + + "\0\u4234\0\u04c0\0\u04c0\0\u4280\0\u04c0\0\u42cc\0\u04c0\0\u4318" + + "\0\u4364\0\u43b0\0\u43fc\0\u04c0\0\u4448\0\u4494\0\u44e0\0\u452c" + + "\0\u4578\0\u45c4\0\u4610\0\u465c\0\u46a8\0\u04c0\0\u46f4\0\u4740" + + "\0\u478c\0\u47d8\0\u4824\0\u4870\0\u48bc\0\u4908\0\u4954\0\u49a0" + + "\0\u49ec\0\u04c0\0\u4a38\0\u04c0\0\u04c0\0\u4a84\0\u04c0\0\u4ad0" + + "\0\u04c0\0\u4b1c\0\u4b68\0\u4bb4\0\u04c0\0\u4c00\0\u4c4c\0\u4c98" + + "\0\u04c0\0\u4ce4\0\u4d30\0\u4d7c\0\u4dc8\0\u04c0\0\u4e14\0\u4e60" + + "\0\u4eac\0\u4ef8\0\u04c0\0\u4f44\0\u04c0\0\u4f90\0\u4fdc\0\u5028" + + "\0\u5074\0\u50c0\0\u510c\0\u5158\0\u51a4\0\u04c0\0\u04c0\0\u51f0" + + "\0\u04c0\0\u04c0\0\u523c\0\u5288\0\u52d4\0\u5320\0\u04c0\0\u04c0" + + "\0\u04c0\0\u536c\0\u53b8\0\u5404\0\u04c0\0\u5450\0\u549c\0\u54e8" + + "\0\u04c0\0\u5534\0\u5580\0\u55cc\0\u04c0\0\u5618\0\u04c0\0\u5664" + + "\0\u04c0\0\u04c0\0\u0344\0\u0344\0\u56b0\0\u04c0\0\u04c0\0\u56fc" + + "\0\u5748\0\u5794\0\u57e0\0\u582c\0\u16dc"; - private static int [] zzUnpackTrans() { - int [] result = new int[22648]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do result[j++] = value; while (--count > 0); + private static int[] zzUnpackRowMap() { + int[] result = new int[437]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; } - return j; - } + private static int zzUnpackRowMap(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; + int j = offset; /* index in unpacked array */ - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); - - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\13\0\1\11\1\1\1\11\13\1\3\11\1\1\2\11"+ - "\4\1\1\11\21\1\7\11\4\1\1\11\2\1\2\11"+ - "\3\1\1\11\3\1\2\11\1\1\1\11\2\1\1\11"+ - "\1\1\2\11\1\1\1\11\2\1\1\11\2\1\1\11"+ - "\1\1\1\0\2\11\1\1\1\11\1\1\1\11\2\1"+ - "\2\11\1\1\2\11\1\1\2\11\1\0\3\1\1\0"+ - "\11\1\2\11\44\1\11\11\1\1\1\11\1\1\6\11"+ - "\1\0\1\11\1\0\1\11\1\0\2\11\1\0\1\1"+ - "\4\0\1\1\2\0\1\11\2\1\1\11\2\0\3\11"+ - "\1\1\1\11\1\0\1\1\1\11\61\1\1\11\1\0"+ - "\3\11\1\0\1\11\2\0\1\1\2\11\1\0\1\11"+ - "\52\1\1\0\2\11\1\0\42\1\1\0\33\1\1\0"+ - "\23\1\1\0\15\1\1\0\10\1\2\11\11\1"; - - private static int [] zzUnpackAttribute() { - int [] result = new int[437]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; } - return j; - } - /** the input device */ - private java.io.Reader zzReader; + /** + * The transition table of the DFA + */ + private static final int[] ZZ_TRANS = zzUnpackTrans(); - /** the current state of the DFA */ - private int zzState; + private static final String ZZ_TRANS_PACKED_0 + = "\1\14\1\15\1\16\1\17\1\20\1\21\1\22\1\14" + + "\1\22\1\23\1\24\1\17\1\25\1\26\1\27\1\30" + + "\1\22\1\31\1\14\1\32\1\33\4\22\1\34\1\35" + + "\1\36\1\37\1\40\2\22\1\41\2\31\1\22\1\42" + + "\1\43\1\14\1\44\1\45\1\46\1\47\1\22\1\50" + + "\1\51\1\52\1\53\1\54\1\55\1\56\1\57\1\22" + + "\1\60\1\22\1\61\2\22\1\62\1\63\1\64\1\65" + + "\1\66\1\67\1\70\1\71\1\72\1\73\1\74\1\75" + + "\1\76\1\77\1\100\1\101\1\0\1\22\1\102\1\103" + + "\1\104\30\102\1\105\12\102\1\106\45\102\1\107\1\103" + + "\1\104\31\107\1\105\11\107\1\106\45\107\1\14\1\110" + + "\1\111\1\112\1\113\3\14\1\114\2\14\1\112\2\14" + + "\1\115\2\114\4\14\4\114\5\14\3\114\2\14\2\114" + + "\3\14\26\114\2\14\1\116\11\14\1\0\2\14\1\0" + + "\1\14\1\0\27\14\1\117\44\14\1\120\11\14\1\0" + + "\2\14\1\110\1\111\1\112\4\14\1\121\2\14\1\112" + + "\3\14\2\121\2\14\1\122\1\14\4\121\5\14\3\121" + + "\2\14\2\121\3\14\26\121\2\14\1\123\11\14\1\0" + + "\2\14\1\0\1\14\1\0\27\14\1\124\44\14\1\125" + + "\11\14\1\0\1\14\1\126\1\110\1\111\1\0\25\126" + + "\1\127\60\126\1\0\1\126\1\130\1\110\1\111\1\0" + + "\11\130\1\131\74\130\1\0\1\130\1\126\1\110\1\111" + + "\1\0\6\126\1\132\65\126\1\133\11\126\1\0\1\126" + + "\1\134\1\103\1\104\43\134\1\135\1\136\44\134\116\0" + + "\1\16\114\0\1\17\7\0\1\17\104\0\1\137\1\140" + + "\24\0\1\141\113\0\1\142\67\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\26\22\15\0\1\22" + + "\11\0\1\143\1\144\6\0\1\145\13\0\1\145\3\0" + + "\2\145\33\0\1\146\25\0\1\147\1\0\1\150\4\0" + + "\2\147\4\0\4\147\1\0\1\151\3\0\3\147\2\0" + + "\2\147\3\0\26\147\2\0\1\152\45\0\1\153\76\0" + + "\1\154\14\0\1\155\77\0\1\156\13\0\1\157\100\0" + + "\1\160\105\0\1\145\7\0\1\31\13\0\1\31\3\0" + + "\2\31\2\161\101\0\1\162\72\0\1\145\7\0\1\163" + + "\13\0\1\164\2\165\1\0\1\166\1\167\2\161\55\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\2\22\1\170\3\22\1\171\2\22\1\172\1\173\13\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\1\22\1\174\6\22\3\0\2\22\1\175\11\22" + + "\1\176\11\22\15\0\1\22\32\0\1\177\12\0\1\200" + + "\54\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\1\22\1\201\24\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\7\22\1\202\3\0" + + "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\5\22\1\203\20\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\2\22\1\204\3\22\1\205\5\22\1\206" + + "\11\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\7\22\1\207\3\0\10\22\1\210\1\22" + + "\1\211\2\22\1\212\10\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\22\22" + + "\1\213\3\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\7\22\1\214\3\0\2\22\1\215" + + "\7\22\1\216\13\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\1\22\1\217" + + "\14\22\1\220\1\22\1\221\5\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\3\22\1\222" + + "\4\22\3\0\5\22\1\223\1\22\1\224\11\22\1\225" + + "\4\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\5\22\1\226\1\22\1\227" + + "\16\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\7\22\1\230\3\0\6\22\1\231\11\22" + + "\1\232\5\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\11\22\1\233\4\22" + + "\1\234\7\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\1\22\1\235\1\236" + + "\7\22\1\237\13\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\2\22\1\240" + + "\3\22\1\241\17\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\7\22\1\242\3\0\26\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\7\22\1\243\16\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\2\22\1\244\23\22\15\0\1\22\32\0\1\245" + + "\52\0\1\246\40\0\1\247\53\0\1\250\37\0\1\251" + + "\113\0\1\252\61\0\1\102\2\0\30\102\1\0\12\102" + + "\1\0\45\102\2\0\1\104\111\0\1\253\3\0\27\253" + + "\1\254\1\255\1\256\2\253\1\257\1\256\1\260\3\253" + + "\1\261\1\253\1\262\1\263\5\253\1\264\1\265\31\253" + + "\1\0\1\253\1\107\2\0\31\107\1\0\11\107\1\0" + + "\45\107\2\0\1\111\114\0\1\112\7\0\1\112\116\0" + + "\1\266\105\0\2\267\3\0\1\267\1\0\4\267\2\0" + + "\4\267\1\0\1\270\2\0\10\267\3\0\26\267\16\0" + + "\1\271\2\0\30\271\1\272\60\271\10\0\2\273\3\0" + + "\1\273\1\0\4\273\2\0\4\273\1\0\1\274\2\0" + + "\10\273\3\0\26\273\34\0\1\275\75\0\1\276\2\0" + + "\30\276\1\277\1\300\57\276\31\0\1\301\77\0\1\302" + + "\102\0\1\303\3\0\1\304\3\0\1\305\2\0\2\304" + + "\2\0\1\306\1\0\4\304\5\0\3\304\2\0\2\304" + + "\3\0\26\304\2\0\1\307\13\0\1\134\2\0\43\134" + + "\2\0\44\134\1\253\3\0\34\253\1\257\5\253\1\261" + + "\1\253\1\262\1\263\5\253\1\264\1\265\31\253\1\0" + + "\1\310\1\137\1\311\1\312\111\137\5\313\1\314\106\313" + + "\11\0\1\315\123\0\1\145\13\0\1\145\3\0\2\145" + + "\2\161\57\0\2\147\3\0\1\147\1\0\4\147\2\0" + + "\4\147\4\0\10\147\3\0\26\147\50\0\1\316\113\0" + + "\1\317\77\0\1\320\13\0\1\321\76\0\1\322\3\0" + + "\1\323\13\0\1\323\3\0\2\323\2\0\1\322\100\0" + + "\1\324\72\0\1\145\7\0\1\163\13\0\1\163\3\0" + + "\2\163\2\161\60\0\1\145\7\0\1\163\13\0\1\164" + + "\3\0\1\166\1\167\2\161\67\0\2\325\3\0\3\325" + + "\5\0\1\326\2\0\5\325\3\0\1\325\1\0\1\325" + + "\1\0\1\325\6\0\1\325\41\0\1\145\7\0\1\163" + + "\13\0\1\167\3\0\2\167\2\161\60\0\1\145\7\0" + + "\1\163\13\0\1\327\3\0\2\327\2\161\55\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\14\22" + + "\1\330\11\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\1\22\1\331\24\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\7\22\1\332\16\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\7\22\1\333\16\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\10\22" + + "\1\334\15\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\4\22\1\335\21\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\5\22\1\336\20\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\7\22" + + "\1\337\3\0\26\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\10\22\1\340" + + "\15\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\5\22\1\341\2\22\1\342" + + "\15\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\7\22\1\343\16\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\2\22\1\344\23\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\10\22\1\345\15\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\2\22\1\346" + + "\23\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\17\22\1\347\6\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\11\22\1\350\14\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\7\22\1\351" + + "\3\0\26\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\15\22\1\352\10\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\10\22\1\353\10\22\1\354\4\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\14\22\1\355\11\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\12\22\1\356\5\22\1\357\5\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\1\22\1\360\7\22\1\361\14\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\17\22\1\362\6\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\5\22" + + "\1\363\2\22\1\364\15\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\17\22" + + "\1\365\6\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\7\22\1\366\3\0\26\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\13\22\1\367\12\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\3\22\1\370" + + "\4\22\3\0\14\22\1\371\11\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\7\22\1\372\16\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\10\22\1\373" + + "\15\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\11\22\1\374\14\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\6\22\1\375\2\22\1\376\14\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\4\22\1\377\21\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\1\u0100\25\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\1\22\1\u0101\24\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\11\22\1\u0102\14\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\10\22\1\u0103\15\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\3\22\1\u0104\4\22" + + "\3\0\26\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\25\22\1\u0105\15\0" + + "\1\22\35\0\1\260\3\0\2\260\106\0\1\u0106\3\0" + + "\2\u0106\51\0\1\u0107\2\0\30\u0107\1\277\1\0\57\u0107" + + "\1\300\2\0\30\300\1\u0108\60\300\16\0\1\u0109\113\0" + + "\1\u010a\105\0\1\u010b\6\0\2\u010b\4\0\4\u010b\5\0" + + "\3\u010b\2\0\2\u010b\3\0\26\u010b\2\0\1\u010c\23\0" + + "\2\304\3\0\1\304\1\0\4\304\2\0\4\304\4\0" + + "\10\304\3\0\26\304\33\0\1\u010d\6\0\1\u010e\77\0" + + "\1\u010f\6\0\2\u010f\4\0\4\u010f\5\0\3\u010f\2\0" + + "\2\u010f\3\0\26\u010f\2\0\1\u0110\62\0\1\u0111\46\0" + + "\1\312\111\0\5\313\1\u0112\106\313\4\0\1\312\1\314" + + "\140\0\1\u0113\102\0\1\323\13\0\1\323\3\0\2\323" + + "\71\0\2\u0114\3\0\3\u0114\5\0\1\u0114\2\0\5\u0114" + + "\3\0\1\u0114\1\0\1\u0114\1\0\1\u0114\6\0\1\u0114" + + "\41\0\1\145\7\0\1\163\13\0\1\u0115\3\0\2\u0115" + + "\2\161\55\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\5\22\1\u0116\20\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\2\22\1\u0117\23\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\4\22\1\u0118" + + "\21\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\7\22\1\u0119\3\0\26\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\16\22\1\u011a\7\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\7\22\1\u011b\3\0" + + "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\2\22\1\u011c\23\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\12\22\1\u011d\13\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\7\22\1\u011e" + + "\3\0\26\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\4\22\1\u011f\21\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\5\22\1\u0120\2\22\1\u0121\15\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\5\22\1\u0122\20\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\10\22\1\u0123\15\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\7\22\1\u0124\3\0" + + "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\10\22\1\u0125\15\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\1\22\1\u0126\24\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\11\22\1\u0127\14\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\7\22\1\u0128\3\0\26\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\14\22\1\u0129\11\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\7\22" + + "\1\u012a\3\0\26\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\6\22\1\u012b" + + "\17\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\5\22\1\u012c\20\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\7\22\1\u012d\3\0\26\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\10\22" + + "\1\u012e\15\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\7\22\1\u012f\3\0\26\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\6\22\1\u0130\5\22\1\u0131\11\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\7\22\1\u0132\3\0\26\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\2\22" + + "\1\u0133\23\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\7\22\1\u0134\3\0\26\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\2\22\1\u0135\23\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\16\22\1\u0136\7\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\14\22\1\u0137" + + "\11\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\10\22\1\u0138\15\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\22\22\1\u0139\3\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\3\22\1\u013a\22\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\14\22\1\u013b" + + "\11\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\13\22\1\u013c\12\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\11\22\1\u013d\14\22\15\0\1\22\1\0" + + "\2\u013e\5\0\2\u010b\1\0\1\u013e\1\0\1\u010b\1\u013f" + + "\4\u010b\2\0\4\u010b\4\0\10\u010b\3\0\26\u010b\33\0" + + "\1\u0140\123\0\1\u0141\76\0\2\u010f\3\0\1\u010f\1\0" + + "\4\u010f\2\0\4\u010f\4\0\10\u010f\3\0\26\u010f\16\0" + + "\4\313\1\312\1\u0112\106\313\20\0\2\u0142\3\0\3\u0142" + + "\5\0\1\u0142\2\0\5\u0142\3\0\1\u0142\1\0\1\u0142" + + "\1\0\1\u0142\6\0\1\u0142\41\0\1\145\7\0\1\163" + + "\13\0\1\u0143\3\0\2\u0143\2\161\55\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\7\22\1\u0144\3\0\26\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\14\22\1\u0145\11\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\10\22\1\u0146\15\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\7\22" + + "\1\u0147\16\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\3\22\1\u0148\22\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\1\22\1\u0149\24\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\16\22\1\u014a\7\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\10\22" + + "\1\u014b\15\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\11\22\1\u014c\14\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\5\22\1\u014d\20\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\11\22\1\u014e\14\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\1\22" + + "\1\u014f\24\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\4\22\1\u0150\21\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\1\22\1\u0151\24\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\22\22\1\u0152\3\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\5\22" + + "\1\u0153\20\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\15\22\1\u0154\10\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\6\22\1\u0155\17\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\2\22\1\u0156\23\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\1\22" + + "\1\u0157\24\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\1\22\1\u0158\24\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\7\22\1\u0159\3\0\26\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\3\22\1\u015a" + + "\4\22\3\0\26\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\12\22\1\u015b" + + "\13\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\10\22\1\u015c\15\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\21\22\1\u015d\4\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\7\22\1\u015e" + + "\3\0\26\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\7\22\1\u015f\3\0\26\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\2\22\1\u0160\23\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\2\22\1\u0161\23\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\11\22\1\u0162" + + "\14\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\7\22\1\u0163\16\22\15\0" + + "\1\22\1\0\2\u013e\10\0\1\u013e\2\0\1\u013f\123\0" + + "\1\u0164\105\0\2\u0165\3\0\3\u0165\5\0\1\u0165\2\0" + + "\5\u0165\3\0\1\u0165\1\0\1\u0165\1\0\1\u0165\6\0" + + "\1\u0165\41\0\1\145\7\0\1\163\13\0\1\u0166\3\0" + + "\2\u0166\2\161\55\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\14\22\1\u0167\11\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\11\22\1\u0168\14\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\13\22" + + "\1\u0169\12\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\7\22\1\u016a\16\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\7\22\1\u016b\16\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\4\22\1\u016c\21\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\16\22" + + "\1\u016d\7\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\11\22\1\u016e\14\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\7\22\1\u016f\3\0\26\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\17\22\1\u0170\6\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\3\22\1\u0171\4\22\3\0" + + "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\7\22\1\u0172\16\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\3\22\1\u0173\4\22\3\0\7\22\1\u0174\16\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\10\22\1\u0175\15\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\21\22\1\u0176\4\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\11\22\1\u0177" + + "\14\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\14\22\1\u0178\11\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\7\22\1\u0179\3\0\26\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\11\22" + + "\1\u017a\14\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\4\22\1\u017b\21\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\10\22\1\u017c\15\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\23\22\1\u017d\2\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\4\22" + + "\1\u017e\21\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\11\22\1\u017f\14\22" + + "\15\0\1\22\27\0\1\u0180\104\0\2\u0181\3\0\3\u0181" + + "\5\0\1\u0181\2\0\5\u0181\3\0\1\u0181\1\0\1\u0181" + + "\1\0\1\u0181\6\0\1\u0181\41\0\1\145\7\0\1\163" + + "\13\0\1\u0182\3\0\2\u0182\2\161\55\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\20\22\1\u0183" + + "\5\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\6\22\1\u0184\17\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\5\22\1\u0185\20\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\12\22\1\u0186\13\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\13\22\1\u0187" + + "\12\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\2\22\1\u0188\23\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\4\22\1\u0189\21\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\2\22\1\u018a\23\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\10\22\3\0\2\22\1\u018b" + + "\23\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\7\22\1\u018c\3\0\26\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\7\22\1\u018d\16\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\10\22" + + "\1\u018e\15\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\4\22\1\u018f\21\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\10\22\1\u0190\15\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\7\22" + + "\1\u0191\3\0\26\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\7\22\1\u0192\3\0\26\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\10\22\1\u0193\15\22\15\0\1\22" + + "\30\0\1\u0194\103\0\2\u0195\3\0\3\u0195\5\0\1\u0195" + + "\2\0\5\u0195\3\0\1\u0195\1\0\1\u0195\1\0\1\u0195" + + "\6\0\1\u0195\41\0\1\145\7\0\1\163\13\0\1\u0196" + + "\3\0\2\u0196\2\161\55\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\7\22\1\u0197\16\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\7\22\1\u0198\3\0\26\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\7\22\1\u0199\3\0" + + "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\4\22\1\u019a\21\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\7\22\1\u019b\3\0\26\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\4\22" + + "\1\u019c\21\22\15\0\1\22\6\0\3\22\7\0\2\22" + + "\3\0\4\22\4\0\10\22\3\0\14\22\1\u019d\11\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\7\22\1\u019e\16\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\7\22" + + "\1\u019f\3\0\26\22\15\0\1\22\6\0\3\22\7\0" + + "\2\22\3\0\4\22\4\0\7\22\1\u01a0\3\0\26\22" + + "\15\0\1\22\6\0\3\22\7\0\2\22\3\0\4\22" + + "\4\0\10\22\3\0\20\22\1\u01a1\5\22\15\0\1\22" + + "\27\0\1\u01a2\104\0\2\u01a3\3\0\3\u01a3\5\0\1\u01a3" + + "\2\0\5\u01a3\3\0\1\u01a3\1\0\1\u01a3\1\0\1\u01a3" + + "\6\0\1\u01a3\41\0\1\145\7\0\1\163\13\0\1\u01a4" + + "\3\0\2\u01a4\2\161\55\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\7\22\1\u01a5\3\0\26\22\15\0\1\22" + + "\6\0\3\22\7\0\2\22\3\0\4\22\4\0\10\22" + + "\3\0\6\22\1\u01a6\17\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\7\22\1\u01a7\3\0" + + "\26\22\15\0\1\22\6\0\3\22\7\0\2\22\3\0" + + "\4\22\4\0\10\22\3\0\10\22\1\u01a8\15\22\15\0" + + "\1\22\6\0\3\22\7\0\2\22\3\0\4\22\4\0" + + "\10\22\3\0\13\22\1\u01a9\12\22\15\0\1\22\6\0" + + "\3\22\7\0\2\22\3\0\4\22\4\0\10\22\3\0" + + "\13\22\1\u01aa\12\22\15\0\1\22\24\0\1\u01ab\107\0" + + "\2\u01ac\3\0\3\u01ac\5\0\1\u01ac\2\0\5\u01ac\3\0" + + "\1\u01ac\1\0\1\u01ac\1\0\1\u01ac\6\0\1\u01ac\41\0" + + "\1\145\7\0\1\163\13\0\1\u01ad\3\0\2\u01ad\2\161" + + "\55\0\3\22\7\0\2\22\3\0\4\22\4\0\3\22" + + "\1\u01ae\4\22\3\0\26\22\15\0\1\22\6\0\3\22" + + "\7\0\2\22\3\0\4\22\4\0\10\22\3\0\5\22" + + "\1\u01af\20\22\15\0\1\22\11\0\1\145\7\0\1\163" + + "\13\0\1\u01b0\3\0\2\u01b0\2\161\60\0\1\145\7\0" + + "\1\163\13\0\1\u01b1\3\0\2\u01b1\2\161\60\0\1\145" + + "\7\0\1\163\13\0\1\u01b2\3\0\2\u01b2\2\161\60\0" + + "\1\145\7\0\1\163\13\0\1\u01b3\3\0\2\u01b3\2\161" + + "\60\0\1\145\7\0\1\163\13\0\1\u01b4\3\0\2\u01b4" + + "\2\161\60\0\1\145\7\0\1\163\13\0\1\u01b5\3\0" + + "\2\u01b5\2\161\47\0"; - /** the current lexical state */ - private int zzLexicalState = YYINITIAL; + private static int[] zzUnpackTrans() { + int[] result = new int[22648]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; + private static int zzUnpackTrans(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ - /** the textposition at the last accepting state */ - private int zzMarkedPos; + int j = offset; /* index in unpacked array */ - /** the current text position in the buffer */ - private int zzCurrentPos; + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } - /** startRead marks the beginning of the yytext() string in the buffer */ - private int zzStartRead; - /** endRead marks the last character in the buffer, that has been read - from input */ - private int zzEndRead; + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; - /** number of newlines encountered up to the start of the matched text */ - private int yyline; + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; - /** the number of characters up to the start of the matched text */ - private int yychar; + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - private int yycolumn; + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\13\0\1\11\1\1\1\11\13\1\3\11\1\1\2\11" + + "\4\1\1\11\21\1\7\11\4\1\1\11\2\1\2\11" + + "\3\1\1\11\3\1\2\11\1\1\1\11\2\1\1\11" + + "\1\1\2\11\1\1\1\11\2\1\1\11\2\1\1\11" + + "\1\1\1\0\2\11\1\1\1\11\1\1\1\11\2\1" + + "\2\11\1\1\2\11\1\1\2\11\1\0\3\1\1\0" + + "\11\1\2\11\44\1\11\11\1\1\1\11\1\1\6\11" + + "\1\0\1\11\1\0\1\11\1\0\2\11\1\0\1\1" + + "\4\0\1\1\2\0\1\11\2\1\1\11\2\0\3\11" + + "\1\1\1\11\1\0\1\1\1\11\61\1\1\11\1\0" + + "\3\11\1\0\1\11\2\0\1\1\2\11\1\0\1\11" + + "\52\1\1\0\2\11\1\0\42\1\1\0\33\1\1\0" + + "\23\1\1\0\15\1\1\0\10\1\2\11\11\1"; - /** - * zzAtBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean zzAtBOL = true; + private static int[] zzUnpackAttribute() { + int[] result = new int[437]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } - /** zzAtEOF == true <=> the scanner is at the EOF */ - private boolean zzAtEOF; + private static int zzUnpackAttribute(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ - /** denotes if the user-EOF-code has already been executed */ - private boolean zzEOFDone; - - /** - * The number of occupied positions in zzBuffer beyond zzEndRead. - * When a lead/high surrogate has been read from the input stream - * into the final zzBuffer position, this will have a value of 1; - * otherwise, it will have a value of 0. - */ - private int zzFinalHighSurrogate = 0; + int j = offset; /* index in unpacked array */ - /* user code: */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } + /** + * the input device + */ + private java.io.Reader zzReader; + + /** + * the current state of the DFA + */ + private int zzState; + + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; + + /** + * this buffer contains the current text to be matched and is the source of + * the yytext() string + */ + private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; + + /** + * the textposition at the last accepting state + */ + private int zzMarkedPos; + + /** + * the current text position in the buffer + */ + private int zzCurrentPos; + + /** + * startRead marks the beginning of the yytext() string in the buffer + */ + private int zzStartRead; + + /** + * endRead marks the last character in the buffer, that has been read from + * input + */ + private int zzEndRead; + + /** + * number of newlines encountered up to the start of the matched text + */ + private int yyline; + + /** + * the number of characters up to the start of the matched text + */ + private int yychar; + + /** + * the number of characters from the last newline up to the start of the + * matched text + */ + private int yycolumn; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** + * zzAtEOF == true <=> the scanner is at the EOF + */ + private boolean zzAtEOF; + + /** + * denotes if the user-EOF-code has already been executed + */ + private boolean zzEOFDone; + + /** + * The number of occupied positions in zzBuffer beyond zzEndRead. When a + * lead/high surrogate has been read from the input stream into the final + * zzBuffer position, this will have a value of 1; otherwise, it will have a + * value of 0. + */ + private int zzFinalHighSurrogate = 0; + + /* user code: */ private String sourceCode; - public ActionScriptLexer(String sourceCode){ + public ActionScriptLexer(String sourceCode) { this(new StringReader(sourceCode)); - this.sourceCode = sourceCode; + this.sourceCode = sourceCode; } - public void yypushbackstr(String s, int state) - { - sourceCode=s+sourceCode.substring(yychar+yylength()); + public void yypushbackstr(String s, int state) { + sourceCode = s + sourceCode.substring(yychar + yylength()); yyreset(new StringReader(sourceCode)); yybegin(state); } - public void yypushbackstr(String s) - { - yypushbackstr(s,YYINITIAL); + public void yypushbackstr(String s) { + yypushbackstr(s, YYINITIAL); } StringBuffer string = new StringBuffer(); - private static String xmlTagName=""; + private static String xmlTagName = ""; public int yychar() { return yychar; } - private Stack pushedBack=new Stack<>(); + private Stack pushedBack = new Stack<>(); public int yyline() { - return yyline+1; + return yyline + 1; } - private List listeners=new ArrayList<>(); + private List listeners = new ArrayList<>(); - public void addListener(LexListener listener){ + public void addListener(LexListener listener) { listeners.add(listener); } - public void removeListener(LexListener listener){ + public void removeListener(LexListener listener) { listeners.remove(listener); } - public void informListenersLex(ParsedSymbol s){ - for(LexListener l:listeners){ + public void informListenersLex(ParsedSymbol s) { + for (LexListener l : listeners) { l.onLex(s); } } - public void informListenersPushBack(ParsedSymbol s){ - for(LexListener l:listeners){ + public void informListenersPushBack(ParsedSymbol s) { + for (LexListener l : listeners) { l.onPushBack(s); } } @@ -1013,1098 +1052,1267 @@ public final class ActionScriptLexer { informListenersPushBack(symb); } ParsedSymbol last; - public ParsedSymbol lex() throws java.io.IOException, AVM2ParseException{ - ParsedSymbol ret=null; - if(!pushedBack.isEmpty()){ + + public ParsedSymbol lex() throws java.io.IOException, AVM2ParseException { + ParsedSymbol ret = null; + if (!pushedBack.isEmpty()) { ret = last = pushedBack.pop(); - }else{ + } else { ret = last = yylex(); } informListenersLex(ret); return ret; } - - - /** - * Creates a new scanner - * - * @param in the java.io.Reader to read input from. - */ - public ActionScriptLexer(java.io.Reader in) { - this.zzReader = in; - } - - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char [] zzUnpackCMap(String packed) { - char [] map = new char[0x110000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 3140) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do map[j++] = value; while (--count > 0); - } - return map; - } - - - /** - * Refills the input buffer. - * - * @return false, iff there was new input. - * - * @exception java.io.IOException if any I/O-Error occurs - */ - private boolean zzRefill() throws java.io.IOException { - - /* first: make room (if you can) */ - if (zzStartRead > 0) { - zzEndRead += zzFinalHighSurrogate; - zzFinalHighSurrogate = 0; - System.arraycopy(zzBuffer, zzStartRead, - zzBuffer, 0, - zzEndRead-zzStartRead); - - /* translate stored positions */ - zzEndRead-= zzStartRead; - zzCurrentPos-= zzStartRead; - zzMarkedPos-= zzStartRead; - zzStartRead = 0; + /** + * Creates a new scanner + * + * @param in the java.io.Reader to read input from. + */ + public ActionScriptLexer(java.io.Reader in) { + this.zzReader = in; } - /* is the buffer big enough? */ - if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) { - /* if not: blow it up */ - char newBuffer[] = new char[zzBuffer.length*2]; - System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); - zzBuffer = newBuffer; - zzEndRead += zzFinalHighSurrogate; - zzFinalHighSurrogate = 0; - } + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char[] zzUnpackCMap(String packed) { + char[] map = new char[0x110000]; + int i = 0; /* index in packed string */ - /* fill the buffer with new input */ - int requested = zzBuffer.length - zzEndRead; - int totalRead = 0; - while (totalRead < requested) { - int numRead = zzReader.read(zzBuffer, zzEndRead + totalRead, requested - totalRead); - if (numRead == -1) { - break; - } - totalRead += numRead; - } + int j = 0; /* index in unpacked array */ - if (totalRead > 0) { - zzEndRead += totalRead; - if (totalRead == requested) { /* possibly more input available */ - if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { - --zzEndRead; - zzFinalHighSurrogate = 1; + while (i < 3140) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do { + map[j++] = value; + } while (--count > 0); } - } - return false; + return map; } - // totalRead = 0: End of stream - return true; - } + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { - - /** - * Closes the input stream. - * @throws java.io.IOException - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ + /* first: make room (if you can) */ + if (zzStartRead > 0) { + zzEndRead += zzFinalHighSurrogate; + zzFinalHighSurrogate = 0; + System.arraycopy(zzBuffer, zzStartRead, + zzBuffer, 0, + zzEndRead - zzStartRead); - if (zzReader != null) - zzReader.close(); - } + /* translate stored positions */ + zzEndRead -= zzStartRead; + zzCurrentPos -= zzStartRead; + zzMarkedPos -= zzStartRead; + zzStartRead = 0; + } + /* is the buffer big enough? */ + if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) { + /* if not: blow it up */ + char newBuffer[] = new char[zzBuffer.length * 2]; + System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); + zzBuffer = newBuffer; + zzEndRead += zzFinalHighSurrogate; + zzFinalHighSurrogate = 0; + } - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to ZZ_INITIAL. - * - * Internal scan buffer is resized down to its initial length, if it has grown. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; - zzEOFDone = false; - zzEndRead = zzStartRead = 0; - zzCurrentPos = zzMarkedPos = 0; - zzFinalHighSurrogate = 0; - yyline = yychar = yycolumn = 0; - zzLexicalState = YYINITIAL; - if (zzBuffer.length > ZZ_BUFFERSIZE) - zzBuffer = new char[ZZ_BUFFERSIZE]; - } + /* fill the buffer with new input */ + int requested = zzBuffer.length - zzEndRead; + int totalRead = 0; + while (totalRead < requested) { + int numRead = zzReader.read(zzBuffer, zzEndRead + totalRead, requested - totalRead); + if (numRead == -1) { + break; + } + totalRead += numRead; + } + if (totalRead > 0) { + zzEndRead += totalRead; + if (totalRead == requested) { /* possibly more input available */ - /** - * Returns the current lexical state. - * @return - */ - public final int yystate() { - return zzLexicalState; - } + if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { + --zzEndRead; + zzFinalHighSurrogate = 1; + } + } + return false; + } - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - public final void yybegin(int newState) { - zzLexicalState = newState; - } - - - /** - * Returns the text matched by the current regular expression. - * @return - */ - public final String yytext() { - return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); - } - - - /** - * Returns the character at position pos from the - * matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead+pos]; - } - - - /** - * Returns the length of the matched text region. - * @return - */ - public final int yylength() { - return zzMarkedPos-zzStartRead; - } - - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } - catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + // totalRead = 0: End of stream + return true; } - throw new Error(message); - } + /** + * Closes the input stream. + * + * @throws java.io.IOException + */ + public final void yyclose() throws java.io.IOException { + zzAtEOF = true; /* indicate end of file */ + zzEndRead = zzStartRead; /* invalidate buffer */ - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! - */ - public void yypushback(int number) { - if ( number > yylength() ) - zzScanError(ZZ_PUSHBACK_2BIG); + if (zzReader != null) { + zzReader.close(); + } + } - zzMarkedPos -= number; - } + /** + * Resets the scanner to read from a new input stream. Does not close the + * old reader. + * + * All internal variables are reset, the old input stream + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. + * + * Internal scan buffer is resized down to its initial length, if it has + * grown. + * + * @param reader the new input stream + */ + public final void yyreset(java.io.Reader reader) { + zzReader = reader; + zzAtBOL = true; + zzAtEOF = false; + zzEOFDone = false; + zzEndRead = zzStartRead = 0; + zzCurrentPos = zzMarkedPos = 0; + zzFinalHighSurrogate = 0; + yyline = yychar = yycolumn = 0; + zzLexicalState = YYINITIAL; + if (zzBuffer.length > ZZ_BUFFERSIZE) { + zzBuffer = new char[ZZ_BUFFERSIZE]; + } + } + /** + * Returns the current lexical state. + * + * @return + */ + public final int yystate() { + return zzLexicalState; + } - /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - * @throws com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException - */ - public ParsedSymbol yylex() throws java.io.IOException, AVM2ParseException { - int zzInput; - int zzAction; + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char [] zzBufferL = zzBuffer; - char [] zzCMapL = ZZ_CMAP; + /** + * Returns the text matched by the current regular expression. + * + * @return + */ + public final String yytext() { + return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); + } - int [] zzTransL = ZZ_TRANS; - int [] zzRowMapL = ZZ_ROWMAP; - int [] zzAttrL = ZZ_ATTRIBUTE; + /** + * Returns the character at position pos from the matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer[zzStartRead + pos]; + } - while (true) { - zzMarkedPosL = zzMarkedPos; + /** + * Returns the length of the matched text region. + * + * @return + */ + public final int yylength() { + return zzMarkedPos - zzStartRead; + } - yychar+= zzMarkedPosL-zzStartRead; + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done in error + * fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } - zzAction = -1; + throw new Error(message); + } - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = ZZ_LEXSTATE[zzLexicalState]; + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! + */ + public void yypushback(int number) { + if (number > yylength()) { + zzScanError(ZZ_PUSHBACK_2BIG); + } - // set up zzAction for empty match case: - int zzAttributes = zzAttrL[zzState]; - if ( (zzAttributes & 1) == 1 ) { - zzAction = zzState; - } + zzMarkedPos -= number; + } + /** + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + * @throws com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException + */ + public ParsedSymbol yylex() throws java.io.IOException, AVM2ParseException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + char[] zzBufferL = zzBuffer; + char[] zzCMapL = ZZ_CMAP; + + int[] zzTransL = ZZ_TRANS; + int[] zzRowMapL = ZZ_ROWMAP; + int[] zzAttrL = ZZ_ATTRIBUTE; - zzForAction: { while (true) { - - if (zzCurrentPosL < zzEndReadL) { - zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL); - zzCurrentPosL += Character.charCount(zzInput); - } - else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } - else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } - else { - zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL); - zzCurrentPosL += Character.charCount(zzInput); - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; - if (zzNext == -1) break zzForAction; - zzState = zzNext; + zzMarkedPosL = zzMarkedPos; - zzAttributes = zzAttrL[zzState]; - if ( (zzAttributes & 1) == 1 ) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ( (zzAttributes & 8) == 8 ) break zzForAction; - } + yychar += zzMarkedPosL - zzStartRead; + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + // set up zzAction for empty match case: + int zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) { + zzAction = zzState; + } + + zzForAction: + { + while (true) { + + if (zzCurrentPosL < zzEndReadL) { + zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL); + zzCurrentPosL += Character.charCount(zzInput); + } else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } else { + zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL); + zzCurrentPosL += Character.charCount(zzInput); + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; + if (zzNext == -1) { + break zzForAction; + } + zzState = zzNext; + + zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ((zzAttributes & 8) == 8) { + break zzForAction; + } + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 1: { + } + case 162: + break; + case 2: { + yyline++; + } + case 163: + break; + case 3: { /*ignore*/ + + } + case 164: + break; + case 4: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DIVIDE, yytext()); + } + case 165: + break; + case 5: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MULTIPLY, yytext()); + } + case 166: + break; + case 6: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.IDENTIFIER, yytext()); + } + case 167: + break; + case 7: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DOT, yytext()); + } + case 168: + break; + case 8: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.LOWER_THAN, yytext()); + } + case 169: + break; + case 9: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NOT, yytext()); + } + case 170: + break; + case 10: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MINUS, yytext()); + } + case 171: + break; + case 11: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.GREATER_THAN, yytext()); + } + case 172: + break; + case 12: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.COLON, yytext()); + } + case 173: + break; + case 13: { + return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Long.parseLong((yytext()))); + } + case 174: + break; + case 14: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.TERNAR, yytext()); + } + case 175: + break; + case 15: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BRACKET_OPEN, yytext()); + } + case 176: + break; + case 16: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BRACKET_CLOSE, yytext()); + } + case 177: + break; + case 17: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN, yytext()); + } + case 178: + break; + case 18: { + string.setLength(0); + yybegin(STRING); + } + case 179: + break; + case 19: { + string.setLength(0); + yybegin(CHARLITERAL); + } + case 180: + break; + case 20: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PLUS, yytext()); + } + case 181: + break; + case 21: { + string.setLength(0); + yybegin(OIDENTIFIER); + } + case 182: + break; + case 22: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PARENT_OPEN, yytext()); + } + case 183: + break; + case 23: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PARENT_CLOSE, yytext()); + } + case 184: + break; + case 24: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.CURLY_OPEN, yytext()); + } + case 185: + break; + case 25: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.CURLY_CLOSE, yytext()); + } + case 186: + break; + case 26: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SEMICOLON, yytext()); + } + case 187: + break; + case 27: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.COMMA, yytext()); + } + case 188: + break; + case 28: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NEGATE, yytext()); + } + case 189: + break; + case 29: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BITAND, yytext()); + } + case 190: + break; + case 30: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BITOR, yytext()); + } + case 191: + break; + case 31: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.XOR, yytext()); + } + case 192: + break; + case 32: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MODULO, yytext()); + } + case 193: + break; + case 33: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ATTRIBUTE, yytext()); + } + case 194: + break; + case 34: { + string.append(yytext()); + } + case 195: + break; + case 35: { + yybegin(YYINITIAL); + yyline++; + } + case 196: + break; + case 36: { + yybegin(YYINITIAL); + // length also includes the trailing quote + return new ParsedSymbol(SymbolGroup.STRING, SymbolType.STRING, string.toString()); + } + case 197: + break; + case 37: { + string.append(yytext()); + yyline++; + } + case 198: + break; + case 38: { + yybegin(XML); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTTAG_END, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 199: + break; + case 39: { + yybegin(YYINITIAL); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRNAMEVAR_BEGIN, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 200: + break; + case 40: { + yybegin(YYINITIAL); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRVALVAR_BEGIN, yytext()); + } + case 201: + break; + case 41: { + yybegin(YYINITIAL); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_INSTRATTRNAMEVAR_BEGIN, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 202: + break; + case 42: { + yybegin(YYINITIAL); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_INSTRATTRVALVAR_BEGIN, yytext()); + } + case 203: + break; + case 43: { + string.append(yytext()); + } + case 204: + break; + case 44: { + yybegin(YYINITIAL); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_VAR_BEGIN, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 205: + break; + case 45: { + yybegin(YYINITIAL); + // length also includes the trailing quote + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.IDENTIFIER, string.toString()); + } + case 206: + break; + case 46: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_DIVIDE, yytext()); + } + case 207: + break; + case 47: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_MULTIPLY, yytext()); + } + case 208: + break; + case 48: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DESCENDANTS, yytext()); + } + case 209: + break; + case 49: { + return new ParsedSymbol(SymbolGroup.TYPENAME, SymbolType.TYPENAME, yytext()); + } + case 210: + break; + case 50: { + return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, Double.parseDouble((yytext()))); + } + case 211: + break; + case 51: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.FILTER, yytext()); + } + case 212: + break; + case 52: { + yybegin(XMLOPENTAG); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTTAG_BEGIN, yytext()); + } + case 213: + break; + case 53: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SHIFT_LEFT, yytext()); + } + case 214: + break; + case 54: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.LOWER_EQUAL, yytext()); + } + case 215: + break; + case 55: { + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTVARTAG_BEGIN, yytext()); + } + case 216: + break; + case 56: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NOT_EQUAL, yytext()); + } + case 217: + break; + case 57: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DECREMENT, yytext()); + } + case 218: + break; + case 58: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_MINUS, yytext()); + } + case 219: + break; + case 59: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SHIFT_RIGHT, yytext()); + } + case 220: + break; + case 60: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.GREATER_EQUAL, yytext()); + } + case 221: + break; + case 61: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NAMESPACE_OP, yytext()); + } + case 222: + break; + case 62: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.EQUALS, yytext()); + } + case 223: + break; + case 63: { + return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Long.parseLong(yytext(), 8)); + } + case 224: + break; + case 64: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_PLUS, yytext()); + } + case 225: + break; + case 65: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.INCREMENT, yytext()); + } + case 226: + break; + case 66: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.AS, yytext()); + } + case 227: + break; + case 67: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IF, yytext()); + } + case 228: + break; + case 68: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.IS, yytext()); + } + case 229: + break; + case 69: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IN, yytext()); + } + case 230: + break; + case 70: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.DO, yytext()); + } + case 231: + break; + case 71: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_BITAND, yytext()); + } + case 232: + break; + case 72: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.AND, yytext()); + } + case 233: + break; + case 73: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_BITOR, yytext()); + } + case 234: + break; + case 74: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.OR, yytext()); + } + case 235: + break; + case 75: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_XOR, yytext()); + } + case 236: + break; + case 76: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_MODULO, yytext()); + } + case 237: + break; + case 77: { + throw new AVM2ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); + } + case 238: + break; + case 78: { + string.append('\"'); + } + case 239: + break; + case 79: { + string.append('\''); + } + case 240: + break; + case 80: { + char val = (char) Integer.parseInt(yytext().substring(1), 8); + string.append(val); + } + case 241: + break; + case 81: { + string.append('\f'); + } + case 242: + break; + case 82: { + string.append('\\'); + } + case 243: + break; + case 83: { + string.append('\b'); + } + case 244: + break; + case 84: { + string.append('\r'); + } + case 245: + break; + case 85: { + string.append('\n'); + } + case 246: + break; + case 86: { + string.append('\t'); + } + case 247: + break; + case 87: { + yybegin(XML); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTFINISHTAG_END, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 248: + break; + case 88: { + yybegin(XMLOPENTAGATTRIB); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRIBUTENAME, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 249: + break; + case 89: { + yybegin(XMLOPENTAG); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRIBUTEVALUE, yytext()); + } + case 250: + break; + case 90: { + yybegin(XMLINSTRATTRIB); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRIBUTENAME, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 251: + break; + case 91: { + yybegin(XML); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_INSTR_END, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 252: + break; + case 92: { + yybegin(XMLINSTROPENTAG); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRIBUTEVALUE, yytext()); + } + case 253: + break; + case 93: { + yybegin(XMLOPENTAG); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTTAG_BEGIN, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 254: + break; + case 94: { + yybegin(YYINITIAL); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTVARTAG_BEGIN, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 255: + break; + case 95: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.REST, yytext()); + } + case 256: + break; + case 96: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_SHIFT_LEFT, yytext()); + } + case 257: + break; + case 97: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.STRICT_NOT_EQUAL, yytext()); + } + case 258: + break; + case 98: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.USHIFT_RIGHT, yytext()); + } + case 259: + break; + case 99: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_SHIFT_RIGHT, yytext()); + } + case 260: + break; + case 100: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.STRICT_EQUALS, yytext()); + } + case 261: + break; + case 101: { + return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Long.parseLong(yytext().substring(2), 16)); + } + case 262: + break; + case 102: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FOR, yytext()); + } + case 263: + break; + case 103: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.SET, yytext()); + } + case 264: + break; + case 104: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NEW, yytext()); + } + case 265: + break; + case 105: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.TRY, yytext()); + } + case 266: + break; + case 106: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.USE, yytext()); + } + case 267: + break; + case 107: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.VAR, yytext()); + } + case 268: + break; + case 108: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.GET, yytext()); + } + case 269: + break; + case 109: { + return new ParsedSymbol(SymbolGroup.GLOBALCONST, SymbolType.NAN, yytext()); + } + case 270: + break; + case 110: { + string.append(yytext()); + yybegin(XML); + String ret = string.toString(); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_CDATA, ret); + } + case 271: + break; + case 111: { + string.append(yytext()); + yybegin(XML); + String ret = string.toString(); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_COMMENT, ret); + } + case 272: + break; + case 112: { + yybegin(YYINITIAL); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_FINISHVARTAG_BEGIN, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 273: + break; + case 113: { + yybegin(XMLINSTROPENTAG); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_INSTR_BEGIN, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 274: + break; + case 114: { + yybegin(YYINITIAL); + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_INSTRVARTAG_BEGIN, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 275: + break; + case 115: { + string.append('\u00A7'); + } + case 276: + break; + case 116: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_USHIFT_RIGHT, yytext()); + } + case 277: + break; + case 117: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.EACH, yytext()); + } + case 278: + break; + case 118: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.ELSE, yytext()); + } + case 279: + break; + case 119: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CASE, yytext()); + } + case 280: + break; + case 120: { + return new ParsedSymbol(SymbolGroup.GLOBALCONST, SymbolType.NULL, yytext()); + } + case 281: + break; + case 121: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.TRUE, yytext()); + } + case 282: + break; + case 122: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.THIS, yytext()); + } + case 283: + break; + case 123: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.WITH, yytext()); + } + case 284: + break; + case 124: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.VOID, yytext()); + } + case 285: + break; + case 125: { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_FINISHTAG, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 286: + break; + case 126: { + String ret = string.toString(); + string.setLength(0); + string.append(yytext()); + yybegin(XMLCOMMENT); + if (!ret.isEmpty()) { + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, ret); + } + } + case 287: + break; + case 127: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FALSE, yytext()); + } + case 288: + break; + case 128: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.FINAL, yytext()); + } + case 289: + break; + case 129: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.BREAK, yytext()); + } + case 290: + break; + case 130: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CATCH, yytext()); + } + case 291: + break; + case 131: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CONST, yytext()); + } + case 292: + break; + case 132: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CLASS, yytext()); + } + case 293: + break; + case 133: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.SUPER, yytext()); + } + case 294: + break; + case 134: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.THROW, yytext()); + } + case 295: + break; + case 135: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.WHILE, yytext()); + } + case 296: + break; + case 136: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.RETURN, yytext()); + } + case 297: + break; + case 137: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.STATIC, yytext()); + } + case 298: + break; + case 138: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.SWITCH, yytext()); + } + case 299: + break; + case 139: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.NATIVE, yytext()); + } + case 300: + break; + case 140: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.TYPEOF, yytext()); + } + case 301: + break; + case 141: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IMPORT, yytext()); + } + case 302: + break; + case 142: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DELETE, yytext()); + } + case 303: + break; + case 143: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PUBLIC, yytext()); + } + case 304: + break; + case 144: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FINALLY, yytext()); + } + case 305: + break; + case 145: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.EXTENDS, yytext()); + } + case 306: + break; + case 146: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.DEFAULT, yytext()); + } + case 307: + break; + case 147: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.DYNAMIC, yytext()); + } + case 308: + break; + case 148: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PRIVATE, yytext()); + } + case 309: + break; + case 149: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PACKAGE, yytext()); + } + case 310: + break; + case 150: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FUNCTION, yytext()); + } + case 311: + break; + case 151: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CONTINUE, yytext()); + } + case 312: + break; + case 152: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.OVERRIDE, yytext()); + } + case 313: + break; + case 153: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.INTERNAL, yytext()); + } + case 314: + break; + case 154: { + return new ParsedSymbol(SymbolGroup.GLOBALCONST, SymbolType.INFINITY, yytext()); + } + case 315: + break; + case 155: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.NAMESPACE, yytext()); + } + case 316: + break; + case 156: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.INTERFACE, yytext()); + } + case 317: + break; + case 157: { + return new ParsedSymbol(SymbolGroup.GLOBALCONST, SymbolType.UNDEFINED, yytext()); + } + case 318: + break; + case 158: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PROTECTED, yytext()); + } + case 319: + break; + case 159: { + String ret = string.toString(); + string.setLength(0); + string.append(yytext()); + yybegin(XMLCDATA); + if (!ret.isEmpty()) { + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, ret); + } + } + case 320: + break; + case 160: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.INSTANCEOF, yytext()); + } + case 321: + break; + case 161: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IMPLEMENTS, yytext()); + } + case 322: + break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + { + return new ParsedSymbol(SymbolGroup.EOF, SymbolType.EOF, null); + } + } else { + zzScanError(ZZ_NO_MATCH); + } + } } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 1: - { - } - case 162: break; - case 2: - { yyline++; - } - case 163: break; - case 3: - { /*ignore*/ - } - case 164: break; - case 4: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DIVIDE, yytext()); - } - case 165: break; - case 5: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.MULTIPLY, yytext()); - } - case 166: break; - case 6: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.IDENTIFIER, yytext()); - } - case 167: break; - case 7: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DOT, yytext()); - } - case 168: break; - case 8: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.LOWER_THAN, yytext()); - } - case 169: break; - case 9: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NOT, yytext()); - } - case 170: break; - case 10: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.MINUS, yytext()); - } - case 171: break; - case 11: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.GREATER_THAN, yytext()); - } - case 172: break; - case 12: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.COLON, yytext()); - } - case 173: break; - case 13: - { return new ParsedSymbol(SymbolGroup.INTEGER,SymbolType.INTEGER,Long.parseLong((yytext()))); - } - case 174: break; - case 14: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.TERNAR, yytext()); - } - case 175: break; - case 15: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.BRACKET_OPEN, yytext()); - } - case 176: break; - case 16: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.BRACKET_CLOSE, yytext()); - } - case 177: break; - case 17: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN, yytext()); - } - case 178: break; - case 18: - { string.setLength(0); - yybegin(STRING); - } - case 179: break; - case 19: - { string.setLength(0); - yybegin(CHARLITERAL); - } - case 180: break; - case 20: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.PLUS, yytext()); - } - case 181: break; - case 21: - { string.setLength(0); - yybegin(OIDENTIFIER); - } - case 182: break; - case 22: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.PARENT_OPEN, yytext()); - } - case 183: break; - case 23: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.PARENT_CLOSE, yytext()); - } - case 184: break; - case 24: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.CURLY_OPEN, yytext()); - } - case 185: break; - case 25: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.CURLY_CLOSE, yytext()); - } - case 186: break; - case 26: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.SEMICOLON, yytext()); - } - case 187: break; - case 27: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.COMMA, yytext()); - } - case 188: break; - case 28: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NEGATE, yytext()); - } - case 189: break; - case 29: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.BITAND, yytext()); - } - case 190: break; - case 30: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.BITOR, yytext()); - } - case 191: break; - case 31: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.XOR, yytext()); - } - case 192: break; - case 32: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.MODULO, yytext()); - } - case 193: break; - case 33: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ATTRIBUTE, yytext()); - } - case 194: break; - case 34: - { string.append( yytext() ); - } - case 195: break; - case 35: - { yybegin(YYINITIAL); yyline++; - } - case 196: break; - case 36: - { yybegin(YYINITIAL); - // length also includes the trailing quote - return new ParsedSymbol(SymbolGroup.STRING,SymbolType.STRING,string.toString()); - } - case 197: break; - case 37: - { string.append( yytext() ); yyline++; - } - case 198: break; - case 38: - { yybegin(XML); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_STARTTAG_END, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 199: break; - case 39: - { yybegin(YYINITIAL); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_ATTRNAMEVAR_BEGIN, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 200: break; - case 40: - { yybegin(YYINITIAL); - return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_ATTRVALVAR_BEGIN, yytext()); - } - case 201: break; - case 41: - { yybegin(YYINITIAL); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_INSTRATTRNAMEVAR_BEGIN, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 202: break; - case 42: - { yybegin(YYINITIAL); - return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_INSTRATTRVALVAR_BEGIN, yytext()); - } - case 203: break; - case 43: - { string.append(yytext()); - } - case 204: break; - case 44: - { yybegin(YYINITIAL); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_VAR_BEGIN, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 205: break; - case 45: - { yybegin(YYINITIAL); - // length also includes the trailing quote - return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.IDENTIFIER,string.toString()); - } - case 206: break; - case 46: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_DIVIDE, yytext()); - } - case 207: break; - case 47: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_MULTIPLY, yytext()); - } - case 208: break; - case 48: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DESCENDANTS, yytext()); - } - case 209: break; - case 49: - { return new ParsedSymbol(SymbolGroup.TYPENAME,SymbolType.TYPENAME, yytext()); - } - case 210: break; - case 50: - { return new ParsedSymbol(SymbolGroup.DOUBLE,SymbolType.DOUBLE,Double.parseDouble((yytext()))); - } - case 211: break; - case 51: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.FILTER, yytext()); - } - case 212: break; - case 52: - { yybegin(XMLOPENTAG); - string.setLength(0); - return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_STARTTAG_BEGIN, yytext()); - } - case 213: break; - case 53: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.SHIFT_LEFT,yytext()); - } - case 214: break; - case 54: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.LOWER_EQUAL, yytext()); - } - case 215: break; - case 55: - { return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_STARTVARTAG_BEGIN, yytext()); - } - case 216: break; - case 56: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NOT_EQUAL, yytext()); - } - case 217: break; - case 57: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DECREMENT, yytext()); - } - case 218: break; - case 58: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_MINUS, yytext()); - } - case 219: break; - case 59: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.SHIFT_RIGHT, yytext()); - } - case 220: break; - case 60: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.GREATER_EQUAL, yytext()); - } - case 221: break; - case 61: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NAMESPACE_OP, yytext()); - } - case 222: break; - case 62: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.EQUALS, yytext()); - } - case 223: break; - case 63: - { return new ParsedSymbol(SymbolGroup.INTEGER,SymbolType.INTEGER,Long.parseLong(yytext(),8)); - } - case 224: break; - case 64: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_PLUS, yytext()); - } - case 225: break; - case 65: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.INCREMENT, yytext()); - } - case 226: break; - case 66: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.AS, yytext()); - } - case 227: break; - case 67: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.IF, yytext()); - } - case 228: break; - case 68: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.IS, yytext()); - } - case 229: break; - case 69: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.IN, yytext()); - } - case 230: break; - case 70: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.DO, yytext()); - } - case 231: break; - case 71: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_BITAND, yytext()); - } - case 232: break; - case 72: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.AND, yytext()); - } - case 233: break; - case 73: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_BITOR, yytext()); - } - case 234: break; - case 74: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.OR, yytext()); - } - case 235: break; - case 75: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_XOR, yytext()); - } - case 236: break; - case 76: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_MODULO, yytext()); - } - case 237: break; - case 77: - { throw new AVM2ParseException("Illegal escape sequence \""+yytext()+"\"",yyline+1); - } - case 238: break; - case 78: - { string.append( '\"' ); - } - case 239: break; - case 79: - { string.append( '\'' ); - } - case 240: break; - case 80: - { char val = (char) Integer.parseInt(yytext().substring(1),8); - string.append( val ); - } - case 241: break; - case 81: - { string.append( '\f' ); - } - case 242: break; - case 82: - { string.append( '\\' ); - } - case 243: break; - case 83: - { string.append( '\b' ); - } - case 244: break; - case 84: - { string.append( '\r' ); - } - case 245: break; - case 85: - { string.append( '\n' ); - } - case 246: break; - case 86: - { string.append( '\t' ); - } - case 247: break; - case 87: - { yybegin(XML); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_STARTFINISHTAG_END, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 248: break; - case 88: - { yybegin(XMLOPENTAGATTRIB); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_ATTRIBUTENAME, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 249: break; - case 89: - { yybegin(XMLOPENTAG); - return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_ATTRIBUTEVALUE, yytext()); - } - case 250: break; - case 90: - { yybegin(XMLINSTRATTRIB); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_ATTRIBUTENAME, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 251: break; - case 91: - { yybegin(XML); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_INSTR_END, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 252: break; - case 92: - { yybegin(XMLINSTROPENTAG); - return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_ATTRIBUTEVALUE, yytext()); - } - case 253: break; - case 93: - { yybegin(XMLOPENTAG); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_STARTTAG_BEGIN, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 254: break; - case 94: - { yybegin(YYINITIAL); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_STARTVARTAG_BEGIN, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 255: break; - case 95: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.REST, yytext()); - } - case 256: break; - case 96: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_SHIFT_LEFT, yytext()); - } - case 257: break; - case 97: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.STRICT_NOT_EQUAL, yytext()); - } - case 258: break; - case 98: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.USHIFT_RIGHT, yytext()); - } - case 259: break; - case 99: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_SHIFT_RIGHT, yytext()); - } - case 260: break; - case 100: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.STRICT_EQUALS, yytext()); - } - case 261: break; - case 101: - { return new ParsedSymbol(SymbolGroup.INTEGER,SymbolType.INTEGER,Long.parseLong(yytext().substring(2),16)); - } - case 262: break; - case 102: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.FOR, yytext()); - } - case 263: break; - case 103: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.SET, yytext()); - } - case 264: break; - case 104: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.NEW, yytext()); - } - case 265: break; - case 105: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.TRY, yytext()); - } - case 266: break; - case 106: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.USE, yytext()); - } - case 267: break; - case 107: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.VAR, yytext()); - } - case 268: break; - case 108: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.GET, yytext()); - } - case 269: break; - case 109: - { return new ParsedSymbol(SymbolGroup.GLOBALCONST,SymbolType.NAN, yytext()); - } - case 270: break; - case 110: - { string.append(yytext()); - yybegin(XML); - String ret = string.toString(); - string.setLength(0); - return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_CDATA, ret); - } - case 271: break; - case 111: - { string.append(yytext()); - yybegin(XML); - String ret = string.toString(); - string.setLength(0); - return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_COMMENT, ret); - } - case 272: break; - case 112: - { yybegin(YYINITIAL); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_FINISHVARTAG_BEGIN, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 273: break; - case 113: - { yybegin(XMLINSTROPENTAG); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_INSTR_BEGIN, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 274: break; - case 114: - { yybegin(YYINITIAL); - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_INSTRVARTAG_BEGIN, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 275: break; - case 115: - { string.append( '\u00A7' ); - } - case 276: break; - case 116: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ASSIGN_USHIFT_RIGHT, yytext()); - } - case 277: break; - case 117: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.EACH, yytext()); - } - case 278: break; - case 118: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.ELSE, yytext()); - } - case 279: break; - case 119: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CASE, yytext()); - } - case 280: break; - case 120: - { return new ParsedSymbol(SymbolGroup.GLOBALCONST,SymbolType.NULL, yytext()); - } - case 281: break; - case 121: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.TRUE, yytext()); - } - case 282: break; - case 122: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.THIS, yytext()); - } - case 283: break; - case 123: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.WITH, yytext()); - } - case 284: break; - case 124: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.VOID, yytext()); - } - case 285: break; - case 125: - { pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_FINISHTAG, yytext())); - if(string.length()>0){ - pushback(new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 286: break; - case 126: - { String ret=string.toString(); string.setLength(0); string.append(yytext()); yybegin(XMLCOMMENT); - if(!ret.isEmpty()) return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT,ret); - } - case 287: break; - case 127: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.FALSE, yytext()); - } - case 288: break; - case 128: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.FINAL, yytext()); - } - case 289: break; - case 129: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.BREAK, yytext()); - } - case 290: break; - case 130: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CATCH, yytext()); - } - case 291: break; - case 131: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CONST, yytext()); - } - case 292: break; - case 132: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CLASS, yytext()); - } - case 293: break; - case 133: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.SUPER, yytext()); - } - case 294: break; - case 134: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.THROW, yytext()); - } - case 295: break; - case 135: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.WHILE, yytext()); - } - case 296: break; - case 136: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.RETURN, yytext()); - } - case 297: break; - case 137: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.STATIC, yytext()); - } - case 298: break; - case 138: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.SWITCH, yytext()); - } - case 299: break; - case 139: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.NATIVE, yytext()); - } - case 300: break; - case 140: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.TYPEOF, yytext()); - } - case 301: break; - case 141: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.IMPORT, yytext()); - } - case 302: break; - case 142: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DELETE, yytext()); - } - case 303: break; - case 143: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.PUBLIC, yytext()); - } - case 304: break; - case 144: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.FINALLY, yytext()); - } - case 305: break; - case 145: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.EXTENDS, yytext()); - } - case 306: break; - case 146: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.DEFAULT, yytext()); - } - case 307: break; - case 147: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.DYNAMIC, yytext()); - } - case 308: break; - case 148: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.PRIVATE, yytext()); - } - case 309: break; - case 149: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.PACKAGE, yytext()); - } - case 310: break; - case 150: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.FUNCTION, yytext()); - } - case 311: break; - case 151: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.CONTINUE, yytext()); - } - case 312: break; - case 152: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.OVERRIDE, yytext()); - } - case 313: break; - case 153: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.INTERNAL, yytext()); - } - case 314: break; - case 154: - { return new ParsedSymbol(SymbolGroup.GLOBALCONST,SymbolType.INFINITY, yytext()); - } - case 315: break; - case 155: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER,SymbolType.NAMESPACE, yytext()); - } - case 316: break; - case 156: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.INTERFACE, yytext()); - } - case 317: break; - case 157: - { return new ParsedSymbol(SymbolGroup.GLOBALCONST,SymbolType.UNDEFINED, yytext()); - } - case 318: break; - case 158: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.PROTECTED, yytext()); - } - case 319: break; - case 159: - { String ret=string.toString(); string.setLength(0); string.append(yytext() ); yybegin(XMLCDATA); - if(!ret.isEmpty()) return new ParsedSymbol(SymbolGroup.XML,SymbolType.XML_TEXT,ret); - } - case 320: break; - case 160: - { return new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.INSTANCEOF, yytext()); - } - case 321: break; - case 161: - { return new ParsedSymbol(SymbolGroup.KEYWORD,SymbolType.IMPLEMENTS, yytext()); - } - case 322: break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - { - return new ParsedSymbol(SymbolGroup.EOF,SymbolType.EOF,null); - } - } - else { - zzScanError(ZZ_NO_MATCH); - } - } } - } - } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java index 2fa7b7276..4b4fa7b83 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java @@ -350,7 +350,7 @@ public class ActionScriptParser { name = null; } s = lex(); - } + } GraphTargetItem ret = null; if (name != null) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java index 26c9a33de..2b19d05d3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/InstanceInfo.java @@ -53,11 +53,11 @@ public class InstanceInfo { return "name_index=" + abc.constants.getMultiname(name_index).toString(abc.constants, fullyQualifiedNames) + " super_index=" + supIndexStr + " flags=" + flags + " protectedNS=" + protectedNS + " interfaces=" + Helper.intArrToString(interfaces) + " method_index=" + iinit_index + "\r\n" + instance_traits.toString(abc, fullyQualifiedNames); } - public GraphTextWriter getClassHeaderStr(GraphTextWriter writer,ABC abc, List fullyQualifiedNames, boolean allowPrivate) { + public GraphTextWriter getClassHeaderStr(GraphTextWriter writer, ABC abc, List fullyQualifiedNames, boolean allowPrivate) { String modifiers; Namespace ns = abc.constants.getMultiname(name_index).getNamespace(abc.constants); modifiers = ns.getPrefix(abc); - if(!allowPrivate && modifiers.equals("private")){ + if (!allowPrivate && modifiers.equals("private")) { modifiers = ""; } if (!modifiers.isEmpty()) { @@ -74,16 +74,14 @@ public class InstanceInfo { if (isInterface()) { objType = "interface "; } - + writer.appendNoHilight(modifiers + objType); - writer.hilightSpecial(abc.constants.getMultiname(name_index).getName(abc.constants, new ArrayList()/* No full names here*/, false),"classname"); - - - + writer.hilightSpecial(abc.constants.getMultiname(name_index).getName(abc.constants, new ArrayList()/* No full names here*/, false), "classname"); + if (super_index > 0) { String typeName = abc.constants.getMultiname(super_index).getNameWithNamespace(abc.constants, true); writer.appendNoHilight(" extends "); - writer.hilightSpecial(abc.constants.getMultiname(super_index).getName(abc.constants, fullyQualifiedNames, false),"typename",typeName); + writer.hilightSpecial(abc.constants.getMultiname(super_index).getName(abc.constants, fullyQualifiedNames, false), "typename", typeName); } if (interfaces.length > 0) { if (isInterface()) { @@ -96,10 +94,10 @@ public class InstanceInfo { writer.append(", "); } String typeName = abc.constants.getMultiname(interfaces[i]).getNameWithNamespace(abc.constants, true); - writer.hilightSpecial(abc.constants.getMultiname(interfaces[i]).getName(abc.constants, fullyQualifiedNames, false),"typename",typeName); + writer.hilightSpecial(abc.constants.getMultiname(interfaces[i]).getName(abc.constants, fullyQualifiedNames, false), "typename", typeName); } } - + return writer; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java index 68a5fb0fe..9f7531139 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodInfo.java @@ -269,33 +269,32 @@ public class MethodInfo { public GraphTextWriter getParamStr(GraphTextWriter writer, AVM2ConstantPool constants, MethodBody body, ABC abc, List fullyQualifiedNames) { Map localRegNames = new HashMap<>(); - if (body != null && Configuration.getLocalNamesFromDebugInfo.get()) { - localRegNames = body.getCode().getLocalRegNamesFromDebug(abc); + if (body != null && Configuration.getLocalNamesFromDebugInfo.get()) { + localRegNames = body.getCode().getLocalRegNamesFromDebug(abc); } - Map pdata; - + Map pdata; + for (int i = 0; i < param_types.length; i++) { if (i > 0) { writer.appendNoHilight(", "); } String ptype = "*"; if (param_types[i] > 0) { - ptype = constants.getMultiname(param_types[i]).getNameWithNamespace(constants,false); + ptype = constants.getMultiname(param_types[i]).getNameWithNamespace(constants, false); } - - - pdata=new HashMap<>(); - pdata.put("declaration", "true"); + + pdata = new HashMap<>(); + pdata.put("declaration", "true"); pdata.put("declaredType", ptype); if (!localRegNames.isEmpty()) { pdata.put("localName", localRegNames.get(i + 1)); //assuming it is a slot - writer.hilightSpecial(IdentifiersDeobfuscation.printIdentifier(true,localRegNames.get(i + 1)),"paramname",i,pdata); + writer.hilightSpecial(IdentifiersDeobfuscation.printIdentifier(true, localRegNames.get(i + 1)), "paramname", i, pdata); } else if ((paramNames.length > i) && (paramNames[i] != 0) && Configuration.paramNamesEnable.get()) { - pdata.put("localName", constants.getString(paramNames[i])); - writer.hilightSpecial(IdentifiersDeobfuscation.printIdentifier(true,constants.getString(paramNames[i])),"paramname",i,pdata); + pdata.put("localName", constants.getString(paramNames[i])); + writer.hilightSpecial(IdentifiersDeobfuscation.printIdentifier(true, constants.getString(paramNames[i])), "paramname", i, pdata); } else { - pdata.put("localName","param"+(i+1)); - writer.hilightSpecial("param" + (i + 1),"paramname",i,pdata); + pdata.put("localName", "param" + (i + 1)); + writer.hilightSpecial("param" + (i + 1), "paramname", i, pdata); } writer.appendNoHilight(":"); if (param_types[i] == 0) { @@ -323,21 +322,21 @@ public class MethodInfo { } else { restName = "rest"; } - pdata=new HashMap<>(); + pdata = new HashMap<>(); pdata.put("declaration", "true"); pdata.put("declaredType", "*"); - pdata.put("localName",restName); + pdata.put("localName", restName); writer.append(restAdd); - writer.hilightSpecial(restName, "flag.NEED_REST",0,pdata); + writer.hilightSpecial(restName, "flag.NEED_REST", 0, pdata); } return writer; } public GraphTextWriter getReturnTypeStr(GraphTextWriter writer, AVM2ConstantPool constants, List fullyQualifiedNames) { String rname = "*"; - if(ret_type>0){ - rname = IdentifiersDeobfuscation.printIdentifier(true,constants.getMultiname(ret_type).getName(constants, fullyQualifiedNames, true),"void"); - } + if (ret_type > 0) { + rname = IdentifiersDeobfuscation.printIdentifier(true, constants.getMultiname(ret_type).getName(constants, fullyQualifiedNames, true), "void"); + } return writer.hilightSpecial(rname, "returns"); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java index b09d152e0..3124f7e6e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Multiname.java @@ -264,7 +264,7 @@ public class Multiname { if ((fullyQualifiedNames != null) && fullyQualifiedNames.contains(name)) { return getNameWithNamespace(constants, raw); } - return (isAttribute() ? "@" : "") + (raw ? name : IdentifiersDeobfuscation.printIdentifier(true,name)); + return (isAttribute() ? "@" : "") + (raw ? name : IdentifiersDeobfuscation.printIdentifier(true, name)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Namespace.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Namespace.java index ebd5e62c3..59b326db8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Namespace.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/Namespace.java @@ -104,7 +104,7 @@ public class Namespace { if (raw) { return constants.getString(name_index); } - return IdentifiersDeobfuscation.printNamespace(true,constants.getString(name_index)); + return IdentifiersDeobfuscation.printNamespace(true, constants.getString(name_index)); } public boolean hasName(String name, AVM2ConstantPool constants) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java index 2c4a7d1b0..fde7ea4be 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitClass.java @@ -348,7 +348,7 @@ public class TraitClass extends Trait implements TraitWithSlot { @Override public GraphTextWriter toStringHeader(Trait parent, String path, List abcTags, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, GraphTextWriter writer, List fullyQualifiedNames, boolean parallel) { - abc.instance_info.get(class_info).getClassHeaderStr(writer,abc, fullyQualifiedNames,false); + abc.instance_info.get(class_info).getClassHeaderStr(writer, abc, fullyQualifiedNames, false); return writer; } @@ -447,7 +447,7 @@ public class TraitClass extends Trait implements TraitWithSlot { } //class header - abc.instance_info.get(class_info).getClassHeaderStr(writer,abc, fullyQualifiedNames,false); + abc.instance_info.get(class_info).getClassHeaderStr(writer, abc, fullyQualifiedNames, false); writer.startBlock(); int bodyIndex = abc.findBodyIndex(abc.class_info.get(class_info).cinit_index); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java index e928c5567..122382e3b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java @@ -93,7 +93,7 @@ import java.util.logging.Logger; * Represents one ACTIONRECORD, also has some static method to work with Actions */ public class Action implements GraphSourceItem { - + private boolean ignored = false; /** * Action type identifier @@ -103,7 +103,7 @@ public class Action implements GraphSourceItem { * Length of action data */ public int actionLength; - private long address; + private long address; /** * Names of ActionScript properties @@ -880,7 +880,7 @@ public class Action implements GraphSourceItem { "", " * " + AppResources.translate("decompilationError"), " * " + AppResources.translate("decompilationError.obfuscated"), - Helper.decompilationErrorAdd==null?null:" * "+Helper.decompilationErrorAdd, + Helper.decompilationErrorAdd == null ? null : " * " + Helper.decompilationErrorAdd, " * " + AppResources.translate("decompilationError.errorType") + ": " + ex2.getClass().getSimpleName(), ""})); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java index f93e0bdfa..fff60f636 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallFunctionActionItem.java @@ -49,7 +49,7 @@ public class CallFunctionActionItem extends ActionItem { @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { String paramStr = ""; - writer.append(IdentifiersDeobfuscation.printIdentifier(false,((DirectValueActionItem) functionName).toStringNoQuotes(localData))); + writer.append(IdentifiersDeobfuscation.printIdentifier(false, ((DirectValueActionItem) functionName).toStringNoQuotes(localData))); writer.spaceBeforeCallParenthesies(arguments.size()); writer.append("("); for (int t = 0; t < arguments.size(); t++) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java index 9a7020e20..7eec17e60 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CallMethodActionItem.java @@ -73,7 +73,7 @@ public class CallMethodActionItem extends ActionItem { scriptObject.toString(writer, localData); } writer.append("."); - writer.append(IdentifiersDeobfuscation.printIdentifier(false,methodName.toStringNoQuotes(localData))); + writer.append(IdentifiersDeobfuscation.printIdentifier(false, methodName.toStringNoQuotes(localData))); } else { scriptObject.toString(writer, localData); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java index 11f8bbd5c..9a50f7d07 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DefineLocalActionItem.java @@ -76,7 +76,7 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { writer.append("var "); - if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!IdentifiersDeobfuscation.isValidName(false,((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) { + if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!IdentifiersDeobfuscation.isValidName(false, ((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) { writer.append(IdentifiersDeobfuscation.makeObfuscatedIdentifier(((DirectValueActionItem) name).toStringNoQuotes(localData))); } else { stripQuotes(name, localData, writer); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java index 0212104da..24a8ca9ab 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FunctionActionItem.java @@ -83,14 +83,14 @@ public class FunctionActionItem extends ActionItem { if (calculatedFunctionName != null) { writer.append(" "); String fname = calculatedFunctionName.toStringNoQuotes(localData); - if (!IdentifiersDeobfuscation.isValidName(false,fname)) { + if (!IdentifiersDeobfuscation.isValidName(false, fname)) { writer.append(IdentifiersDeobfuscation.makeObfuscatedIdentifier(fname)); } else { calculatedFunctionName.appendToNoQuotes(writer, localData); } } else if (!functionName.isEmpty()) { writer.append(" "); - if (!IdentifiersDeobfuscation.isValidName(false,functionName)) { + if (!IdentifiersDeobfuscation.isValidName(false, functionName)) { writer.append(IdentifiersDeobfuscation.makeObfuscatedIdentifier(functionName)); } else { writer.append(functionName); @@ -107,7 +107,7 @@ public class FunctionActionItem extends ActionItem { if (pname == null || pname.isEmpty()) { pname = new RegisterNumber(regStart + p).translate(); } - if (!IdentifiersDeobfuscation.isValidName(false,pname)) { + if (!IdentifiersDeobfuscation.isValidName(false, pname)) { writer.append(IdentifiersDeobfuscation.makeObfuscatedIdentifier(pname)); } writer.append(pname); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java index 2e0a9deb0..0623fc829 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetMemberActionItem.java @@ -50,7 +50,7 @@ public class GetMemberActionItem extends ActionItem { @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { object.toString(writer, localData); - if ((!(memberName instanceof DirectValueActionItem)) || (!((DirectValueActionItem) memberName).isString()) || (!IdentifiersDeobfuscation.isValidName(false,((DirectValueActionItem) memberName).toStringNoQuotes(localData)))) { + if ((!(memberName instanceof DirectValueActionItem)) || (!((DirectValueActionItem) memberName).isString()) || (!IdentifiersDeobfuscation.isValidName(false, ((DirectValueActionItem) memberName).toStringNoQuotes(localData)))) { writer.append("["); memberName.toString(writer, localData); return writer.append("]"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java index 8796352da..01119f3be 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVariableActionItem.java @@ -59,7 +59,7 @@ public class GetVariableActionItem extends ActionItem { @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!IdentifiersDeobfuscation.isValidName(false,((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) { + if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!IdentifiersDeobfuscation.isValidName(false, ((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) { return writer.append(IdentifiersDeobfuscation.makeObfuscatedIdentifier(((DirectValueActionItem) name).toStringNoQuotes(localData))); } else if ((!(name instanceof DirectValueActionItem)) || (!((DirectValueActionItem) name).isString())) { writer.append("eval("); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java index 6707715de..565e3f878 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetMemberActionItem.java @@ -85,7 +85,7 @@ public class SetMemberActionItem extends ActionItem implements SetTypeActionItem public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { object.toString(writer, localData); - if ((!(objectName instanceof DirectValueActionItem)) || (!((DirectValueActionItem) objectName).isString()) || (!IdentifiersDeobfuscation.isValidName(false,((DirectValueActionItem) objectName).toStringNoQuotes(localData)))) { + if ((!(objectName instanceof DirectValueActionItem)) || (!((DirectValueActionItem) objectName).isString()) || (!IdentifiersDeobfuscation.isValidName(false, ((DirectValueActionItem) objectName).toStringNoQuotes(localData)))) { writer.append("["); objectName.toString(writer, localData); writer.append("]"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java index 72542980d..c34577822 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetVariableActionItem.java @@ -73,7 +73,7 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { - if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!IdentifiersDeobfuscation.isValidName(false,((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) { + if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!IdentifiersDeobfuscation.isValidName(false, ((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) { writer.append(IdentifiersDeobfuscation.makeObfuscatedIdentifier(((DirectValueActionItem) name).toStringNoQuotes(localData))); writer.append(" = "); return value.toString(writer, localData); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java index 453d25395..b548e0da6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -193,7 +193,7 @@ public class Configuration { public static final ConfigurationItem decompilationTimeoutSingleMethod = null; @ConfigurationDefaultInt(1) public static final ConfigurationItem lastRenameType = null; - + @ConfigurationDefaultString(".") public static final ConfigurationItem lastSaveDir = null; @@ -340,32 +340,31 @@ public class Configuration { public static final ConfigurationItem pluginPath = null; - @ConfigurationDefaultInt(55556) - @ConfigurationCategory("script") + @ConfigurationCategory("script") public static final ConfigurationItem debuggerPort = null; - + @ConfigurationDefaultBoolean(false) - @ConfigurationCategory("script") + @ConfigurationCategory("script") public static final ConfigurationItem randomDebuggerPackage = null; - + @ConfigurationDefaultBoolean(true) public static final ConfigurationItem displayDebuggerInfo = null; - + @ConfigurationDefaultString("debugConsole") public static final ConfigurationItem lastDebuggerReplaceFunction = null; - + @ConfigurationDefaultBoolean(true) @ConfigurationCategory("script") - public static final ConfigurationItem getLocalNamesFromDebugInfo = null; - - @ConfigurationDefaultBoolean(false) - @ConfigurationCategory("ui") - public static final ConfigurationItem tagTreeShowEmptyFolders = null; + public static final ConfigurationItem getLocalNamesFromDebugInfo = null; @ConfigurationDefaultBoolean(false) @ConfigurationCategory("ui") - public static final ConfigurationItem autoLoadEmbeddedSwfs = null; + public static final ConfigurationItem tagTreeShowEmptyFolders = null; + + @ConfigurationDefaultBoolean(false) + @ConfigurationCategory("ui") + public static final ConfigurationItem autoLoadEmbeddedSwfs = null; private enum OSId { @@ -494,7 +493,7 @@ public class Configuration { } return result; } - + public static void addFontPair(String fileName, int fontId, String fontName, String installedName) { String key = fileName + "_" + fontId + "_" + fontName; Map fontPairs = getFontToNameMap(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MovieExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MovieExporter.java index de2d27238..f5c6fe043 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MovieExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/MovieExporter.java @@ -12,7 +12,8 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library. */ + * License along with this library. + */ package com.jpexs.decompiler.flash.exporters; import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler; @@ -101,7 +102,7 @@ public class MovieExporter { if ((videoStream.codecID == DefineVideoStreamTag.CODEC_VP6) || (videoStream.codecID == DefineVideoStreamTag.CODEC_VP6_ALPHA)) { - SWFInputStream sis = new SWFInputStream(swf, tag.videoData); + SWFInputStream sis = new SWFInputStream(swf, tag.videoData.getRangeData()); if (videoStream.codecID == DefineVideoStreamTag.CODEC_VP6_ALPHA) { sis.readUI24("offsetToAlpha"); //offsetToAlpha } @@ -135,7 +136,7 @@ public class MovieExporter { sos.writeUB(4, verticalAdjustment); } if (videoStream.codecID == DefineVideoStreamTag.CODEC_SORENSON_H263) { - SWFInputStream sis = new SWFInputStream(swf, tag.videoData); + SWFInputStream sis = new SWFInputStream(swf, tag.videoData.getRangeData()); sis.readUB(17, "pictureStartCode");//pictureStartCode sis.readUB(5, "version"); //version sis.readUB(8, "temporalReference"); //temporalReference @@ -162,7 +163,7 @@ public class MovieExporter { } } - baos.write(tag.videoData); + baos.write(tag.videoData.getRangeData()); flv.writeTag(new FLVTAG((int) Math.floor(i * 1000.0f / ((float) swf.frameRate)), new VIDEODATA(frameType, videoStream.codecID, baos.toByteArray()))); } return fos.toByteArray(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/SoundExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/SoundExporter.java index cbc4e8728..24b60989e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/SoundExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/SoundExporter.java @@ -139,7 +139,7 @@ public class SoundExporter { int ms = (int) (1000.0f / ((float) ((Tag) st).getSwf().frameRate)); for (int b = 0; b < blocks.size(); b++) { - byte[] data = blocks.get(b).streamSoundData; + byte[] data = blocks.get(b).streamSoundData.getRangeData(); if (st.getSoundFormatId() == 2) { //MP3 data = Arrays.copyOfRange(data, 4, data.length); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java index 55831d76c..2424f2cf0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/commonshape/PointInt.java @@ -23,15 +23,15 @@ package com.jpexs.decompiler.flash.exporters.commonshape; public class PointInt { public static final PointInt MAX = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); - - private int x; - private int y; + + private final int x; + private final int y; public PointInt(int x, int y) { this.x = x; this.y = y; } - + public int getX() { return x; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/AS2ScriptExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/AS2ScriptExporter.java index b6b2e0932..425ac0dd9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/AS2ScriptExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/script/AS2ScriptExporter.java @@ -52,7 +52,7 @@ import java.util.logging.Logger; * @author JPEXS */ public class AS2ScriptExporter { - + public List exportAS2ScriptsTimeout(final AbortRetryIgnoreHandler handler, final String outdir, final Collection asms, final ScriptExportMode exportMode, final EventListener ev) throws IOException { try { List result = CancellableWorker.call(new Callable>() { @@ -73,15 +73,15 @@ public class AS2ScriptExporter { if (!outdir.endsWith(File.separator)) { outdir += File.separator; } - + outdir += "scripts" + File.separator; - + Map> existingNamesMap = new HashMap<>(); AtomicInteger cnt = new AtomicInteger(1); for (ASMSource asm : asms) { - String currentOutDir = outdir + getFilePath(asm) + File.separator; + String currentOutDir = outdir + getFilePath(asm) + File.separator; currentOutDir = new File(currentOutDir).getParentFile().toString() + File.separator; - + List existingNames = existingNamesMap.get(currentOutDir); if (existingNames == null) { existingNames = new ArrayList<>(); @@ -102,10 +102,10 @@ public class AS2ScriptExporter { ret.add(f); } } - + return ret; } - + private File exportAS2Script(AbortRetryIgnoreHandler handler, String outdir, ASMSource asm, ScriptExportMode exportMode, EventListener ev, AtomicInteger index, int count, String name) throws IOException { boolean retry; do { @@ -172,10 +172,10 @@ public class AS2ScriptExporter { } } } while (retry); - + return null; } - + // todo: honfika: get the path from the tree private String getFilePath(ASMSource asm) { if (asm instanceof DoInitActionTag) { @@ -192,11 +192,11 @@ public class AS2ScriptExporter { path += Helper.makeFileName(pathElement); } - + return path; } - } - + } + if (!(asm instanceof Tag)) { return Helper.makeFileName(asm.getSourceTag().getExportFileName()) + File.separator + Helper.makeFileName(asm.getExportFileName()); } else { @@ -205,13 +205,13 @@ public class AS2ScriptExporter { if (timelined instanceof Tag) { result += Helper.makeFileName(((Tag) timelined).getExportFileName()) + File.separator; } - + Timeline timeline = timelined.getTimeline(); int frame = timeline.getFrameForAction(asm); if (frame != -1) { result += "frame_" + (frame + 1) + File.separator; } - + return result + Helper.makeFileName(asm.getExportFileName()); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java index d5f69467f..4f9290848 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/shape/BitmapExporter.java @@ -373,11 +373,11 @@ public class BitmapExporter extends ShapeExporterBase { thickness *= Math.max(graphics.getTransform().getScaleX(), graphics.getTransform().getScaleY()); break; } - + if (thickness < 0) { thickness = -thickness; } - + if (joinStyle == BasicStroke.JOIN_MITER) { lineStroke = new BasicStroke((float) thickness, capStyle, joinStyle, miterLimit); } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java index 02e89608a..816eaf346 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/FileTextWriter.java @@ -71,8 +71,6 @@ public class FileTextWriter extends GraphTextWriter implements AutoCloseable { writeToFile(str); return this; } - - @Override public FileTextWriter append(String str, long offset) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java index 3c2228c3d..b02123676 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphSourceItemPosition.java @@ -28,6 +28,6 @@ public class GraphSourceItemPosition { public GraphSourceItem graphSourceItem; public int position; - public Map data; + public Map data; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java index 5aaf474a5..0522e42ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/GraphTextWriter.java @@ -52,7 +52,7 @@ public abstract class GraphTextWriter { * @param data * @return GraphTextWriter */ - public GraphTextWriter startOffset(GraphSourceItem src, int pos, Map data) { + public GraphTextWriter startOffset(GraphSourceItem src, int pos, Map data) { return this; } @@ -105,21 +105,20 @@ public abstract class GraphTextWriter { public GraphTextWriter hilightSpecial(String text, String type) { return hilightSpecial(text, type, "0"); } - + public GraphTextWriter hilightSpecial(String text, String type, int index) { - return hilightSpecial(text, type, ""+index); + return hilightSpecial(text, type, "" + index); } public GraphTextWriter hilightSpecial(String text, String type, String index) { return hilightSpecial(text, type, "0", new HashMap()); } - - - public GraphTextWriter hilightSpecial(String text, String type, int index, Map data) { - return hilightSpecial(text, type, ""+index, data); + + public GraphTextWriter hilightSpecial(String text, String type, int index, Map data) { + return hilightSpecial(text, type, "" + index, data); } - - public GraphTextWriter hilightSpecial(String text, String type, String index, Map data) { + + public GraphTextWriter hilightSpecial(String text, String type, String index, Map data) { return this; } @@ -127,8 +126,8 @@ public abstract class GraphTextWriter { return ""; } - public abstract GraphTextWriter appendWithData(String str, Map data); - + public abstract GraphTextWriter appendWithData(String str, Map data); + public abstract GraphTextWriter append(String str); public abstract GraphTextWriter append(String str, long offset); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java index c8170e100..2c51c27ea 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/HilightedTextWriter.java @@ -73,7 +73,7 @@ public class HilightedTextWriter extends GraphTextWriter { * @return HilightedTextWriter */ @Override - public HilightedTextWriter startOffset(GraphSourceItem src, int pos, Map data) { + public HilightedTextWriter startOffset(GraphSourceItem src, int pos, Map data) { GraphSourceItemPosition itemPos = new GraphSourceItemPosition(); itemPos.graphSourceItem = src; itemPos.position = pos; @@ -157,30 +157,26 @@ public class HilightedTextWriter extends GraphTextWriter { Map ndata = new HashMap<>(); ndata.putAll(data); ndata.put("subtype", type); - ndata.put("index", index); + ndata.put("index", index); start(ndata, HilightType.SPECIAL); appendNoHilight(text); return end(HilightType.SPECIAL); } - - - - @Override public HilightedTextWriter append(String str) { return appendWithData(str, new HashMap()); } - + @Override - public HilightedTextWriter appendWithData(String str, Map data) { + public HilightedTextWriter appendWithData(String str, Map data) { Highlighting h = null; if (!offsets.empty()) { GraphSourceItemPosition itemPos = offsets.peek(); GraphSourceItem src = itemPos.graphSourceItem; int pos = itemPos.position; if (src != null && hilight) { - Map ndata=new HashMap<>(); + Map ndata = new HashMap<>(); ndata.putAll(itemPos.data); ndata.putAll(data); ndata.put("offset", Long.toString(src.getOffset() + pos + 1)); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/NulWriter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/NulWriter.java index b2c30357f..75f10144e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/NulWriter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/NulWriter.java @@ -109,8 +109,6 @@ public class NulWriter extends GraphTextWriter { stringAdded = true; return this; } - - @Override public NulWriter append(String str) { @@ -123,8 +121,6 @@ public class NulWriter extends GraphTextWriter { stringAdded = true; return this; } - - @Override public NulWriter append(String str, long offset) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java index 3474b5fa8..e046ebf11 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/helpers/hilight/Highlighting.java @@ -59,8 +59,6 @@ public class Highlighting implements Serializable { return new HashMap<>(properties); } - - public String getPropertyString(String key) { return properties.get(key); } @@ -72,27 +70,29 @@ public class Highlighting implements Serializable { public static Highlighting search(List list, String property, String value) { return search(list, -1, property, value, -1, -1); } - - public static Highlighting search(List list, Map properties) { + + public static Highlighting search(List list, Map properties) { return search(list, -1, properties, -1, -1); } public static Highlighting search(List list, String property, String value, int from, int to) { return search(list, -1, property, value, from, to); } - - public static Highlighting search(List list, Map properties, int from, int to) { + + public static Highlighting search(List list, Map properties, int from, int to) { return search(list, -1, properties, from, to); } - + public static Highlighting search(List list, long pos, String property, String value, long from, long to) { - Map map= new HashMap<>(); + Map map = new HashMap<>(); map.put(property, value); return search(list, pos, map, from, to); } - public static Highlighting search(List list, long pos, Map properties, long from, long to) { + + public static Highlighting search(List list, long pos, Map properties, long from, long to) { Highlighting ret = null; - looph:for (Highlighting h : list) { + looph: + for (Highlighting h : list) { if (from > -1) { if (h.startPos < from) { continue; @@ -103,7 +103,7 @@ public class Highlighting implements Serializable { continue; } } - for(String property:properties.keySet()){ + for (String property : properties.keySet()) { if (property != null) { String v = h.getPropertyString(property); String value = properties.get(property); @@ -118,7 +118,7 @@ public class Highlighting implements Serializable { } } } - + if (pos == -1 || (pos >= h.startPos && (pos < h.startPos + h.len))) { if (ret == null || h.startPos > ret.startPos) { //get the closest one ret = h; @@ -163,13 +163,13 @@ public class Highlighting implements Serializable { continue; } } - if (pos == -1 ||(pos >= h.startPos && (pos < h.startPos + h.len))) { + if (pos == -1 || (pos >= h.startPos && (pos < h.startPos + h.len))) { //if (ret == null || h.startPos > ret.startPos) { //get the closest one - ret.add(h); + ret.add(h); //} } //if (pos == -1) { - // return ret; + // return ret; //} } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java index 5574c7f82..a112e256b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/CSMTextSettingsTag.java @@ -85,6 +85,7 @@ public class CSMTextSettingsTag extends Tag { /** * Constructor + * * @param swf */ public CSMTextSettingsTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java index 42d55b448..5f51fc1c4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DebugIDTag.java @@ -58,6 +58,7 @@ public class DebugIDTag extends Tag { /** * Constructor + * * @param swf */ public DebugIDTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java index 6bf3ccaa5..dfba8769e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBinaryDataTag.java @@ -48,7 +48,7 @@ public class DefineBinaryDataTag extends CharacterTag { @Internal public SWF innerSwf; - + /** * Gets data bytes * @@ -71,6 +71,7 @@ public class DefineBinaryDataTag extends CharacterTag { /** * Constructor + * * @param swf */ public DefineBinaryDataTag(SWF swf) { @@ -90,6 +91,7 @@ public class DefineBinaryDataTag extends CharacterTag { SWF bswf = new SWF(new ByteArrayInputStream(binaryData), Configuration.parallelSpeedUp.get()); bswf.fileTitle = "(SWF Data)"; innerSwf = bswf; + bswf.binaryData = this; } catch (IOException | InterruptedException ex) { //ignore } @@ -100,7 +102,7 @@ public class DefineBinaryDataTag extends CharacterTag { public int getCharacterId() { return tag; } - + public boolean isSwfData() { try { if (binaryData.length > 8) { @@ -117,7 +119,7 @@ public class DefineBinaryDataTag extends CharacterTag { } } catch (Exception ex) { } - + return false; } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java index 1abc2ca3f..25336d705 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG2Tag.java @@ -39,7 +39,7 @@ public class DefineBitsJPEG2Tag extends ImageTag implements AloneTag { public int characterID; @SWFType(BasicType.UI8) - public byte[] imageData; + public ByteArrayRange imageData; public static final int ID = 21; @@ -56,9 +56,9 @@ public class DefineBitsJPEG2Tag extends ImageTag implements AloneTag { @Override public InputStream getImageData() { if (SWF.hasErrorHeader(imageData)) { - return new ByteArrayInputStream(imageData, 4, imageData.length - 4); + return new ByteArrayInputStream(imageData.getArray(), imageData.getPos() + 4, imageData.getLength() - 4); } - return new ByteArrayInputStream(imageData); + return new ByteArrayInputStream(imageData.getArray(), imageData.getPos(), imageData.getLength()); } @Override @@ -73,29 +73,30 @@ public class DefineBitsJPEG2Tag extends ImageTag implements AloneTag { /** * Constructor + * * @param swf */ public DefineBitsJPEG2Tag(SWF swf) { super(swf, ID, "DefineBitsJPEG2", null); characterID = swf.getNextCharacterId(); - imageData = new byte[0]; + imageData = ByteArrayRange.EMPTY; } public DefineBitsJPEG2Tag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineBitsJPEG2", data); characterID = sis.readUI16("characterID"); - imageData = sis.readBytesEx(sis.available(), "imageData"); + imageData = sis.readByteRangeEx(sis.available(), "imageData"); } public DefineBitsJPEG2Tag(SWF swf, ByteArrayRange data, int characterID, byte[] imageData) throws IOException { super(swf, ID, "DefineBitsJPEG2", data); this.characterID = characterID; - this.imageData = imageData; + this.imageData = new ByteArrayRange(imageData); } @Override public void setImage(byte[] data) { - imageData = data; + imageData = new ByteArrayRange(data); setModified(true); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java index 36493f0b5..628c47618 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG3Tag.java @@ -39,7 +39,7 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { public int characterID; @SWFType(BasicType.UI8) - public byte[] imageData; + public ByteArrayRange imageData; @SWFType(BasicType.UI8) public byte[] bitmapAlphaData; @@ -63,7 +63,7 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { } else { bitmapAlphaData = new byte[0]; } - imageData = data; + imageData = new ByteArrayRange(data); setModified(true); } @@ -86,9 +86,9 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { try { InputStream stream; if (SWF.hasErrorHeader(imageData)) { - stream = new ByteArrayInputStream(imageData, 4, imageData.length - 4); + stream = new ByteArrayInputStream(imageData.getArray(), imageData.getPos() + 4, imageData.getLength() - 4); } else { - stream = new ByteArrayInputStream(imageData); + stream = new ByteArrayInputStream(imageData.getArray(), imageData.getPos(), imageData.getLength()); } BufferedImage image = ImageIO.read(stream); SerializableImage img = image == null ? null : new SerializableImage(image); @@ -112,12 +112,13 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { /** * Constructor + * * @param swf */ public DefineBitsJPEG3Tag(SWF swf) { super(swf, ID, "DefineBitsJPEG3", null); characterID = swf.getNextCharacterId(); - imageData = new byte[0]; + imageData = ByteArrayRange.EMPTY; bitmapAlphaData = new byte[0]; } @@ -125,7 +126,7 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { super(sis.getSwf(), ID, "DefineBitsJPEG3", data); characterID = sis.readUI16("characterID"); long alphaDataOffset = sis.readUI32("alphaDataOffset"); - imageData = sis.readBytesEx(alphaDataOffset, "imageData"); + imageData = sis.readByteRangeEx(alphaDataOffset, "imageData"); bitmapAlphaData = sis.readBytesZlib(sis.available(), "bitmapAlphaData"); } @@ -141,7 +142,7 @@ public class DefineBitsJPEG3Tag extends ImageTag implements AloneTag { SWFOutputStream sos = new SWFOutputStream(os, getVersion()); try { sos.writeUI16(characterID); - sos.writeUI32(imageData.length); + sos.writeUI32(imageData.getLength()); sos.write(imageData); sos.writeBytesZlib(bitmapAlphaData); } catch (IOException e) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java index 7ed066c76..c20974535 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsJPEG4Tag.java @@ -47,10 +47,10 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { public int deblockParam; @SWFType(BasicType.UI8) - public byte[] imageData; + public ByteArrayRange imageData; @SWFType(BasicType.UI8) - public byte[] bitmapAlphaData; + public ByteArrayRange bitmapAlphaData; public static final int ID = 90; @@ -70,16 +70,16 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { @Override public void setImage(byte[] data) { - imageData = data; + imageData = new ByteArrayRange(data); if (ImageTag.getImageFormat(data).equals("jpg")) { SerializableImage image = getImage(); byte[] ba = new byte[image.getWidth() * image.getHeight()]; for (int i = 0; i < ba.length; i++) { ba[i] = (byte) 255; } - bitmapAlphaData = ba; + bitmapAlphaData = new ByteArrayRange(ba); } else { - bitmapAlphaData = new byte[0]; + bitmapAlphaData = ByteArrayRange.EMPTY; } setModified(true); } @@ -92,16 +92,16 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { @Override public SerializableImage getImage() { try { - BufferedImage image = ImageIO.read(new ByteArrayInputStream(imageData)); + BufferedImage image = ImageIO.read(new ByteArrayInputStream(imageData.getArray(), imageData.getPos(), imageData.getLength())); SerializableImage img = image == null ? null : new SerializableImage(image); - if (bitmapAlphaData.length == 0) { + if (bitmapAlphaData.getLength() == 0) { return img; } SerializableImage img2 = new SerializableImage(img.getWidth(), img.getHeight(), SerializableImage.TYPE_INT_ARGB); for (int y = 0; y < img.getHeight(); y++) { for (int x = 0; x < img.getWidth(); x++) { int val = img.getRGB(x, y); - int a = bitmapAlphaData[x + y * img.getWidth()] & 0xff; + int a = bitmapAlphaData.get(x + y * img.getWidth()) & 0xff; val = (val & 0xffffff) | (a << 24); img2.setRGB(x, y, colorToInt(multiplyAlpha(intToColor(val)))); } @@ -124,7 +124,7 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { SWFOutputStream sos = new SWFOutputStream(os, getVersion()); try { sos.writeUI16(characterID); - sos.writeUI32(imageData.length); + sos.writeUI32(imageData.getLength()); sos.writeUI16(deblockParam); sos.write(imageData); sos.write(bitmapAlphaData); @@ -136,13 +136,14 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { /** * Constructor + * * @param swf */ public DefineBitsJPEG4Tag(SWF swf) { super(swf, ID, "DefineBitsJPEG4", null); characterID = swf.getNextCharacterId(); - imageData = new byte[0]; - bitmapAlphaData = new byte[0]; + imageData = ByteArrayRange.EMPTY; + bitmapAlphaData = ByteArrayRange.EMPTY; } /** @@ -157,7 +158,7 @@ public class DefineBitsJPEG4Tag extends ImageTag implements AloneTag { characterID = sis.readUI16("characterID"); long alphaDataOffset = sis.readUI32("alphaDataOffset"); deblockParam = sis.readUI16("deblockParam"); - imageData = sis.readBytesEx(alphaDataOffset, "imageData"); - bitmapAlphaData = sis.readBytesEx(sis.available(), "bitmapAlphaData"); + imageData = sis.readByteRangeEx(alphaDataOffset, "imageData"); + bitmapAlphaData = sis.readByteRangeEx(sis.available(), "bitmapAlphaData"); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java index 8163c86b3..1a01e4782 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLossless2Tag.java @@ -59,7 +59,7 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { @Conditional(value = "bitmapFormat", options = {FORMAT_8BIT_COLORMAPPED}) public int bitmapColorTableSize; - public byte[] zlibBitmapData; //TODO: Parse ALPHACOLORMAPDATA,ALPHABITMAPDATA + public ByteArrayRange zlibBitmapData; //TODO: Parse ALPHACOLORMAPDATA,ALPHABITMAPDATA public static final int FORMAT_8BIT_COLORMAPPED = 3; public static final int FORMAT_32BIT_ARGB = 5; @@ -125,13 +125,14 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { ByteArrayOutputStream zlibOS = new ByteArrayOutputStream(); SWFOutputStream sos2 = new SWFOutputStream(zlibOS, getVersion()); sos2.writeBytesZlib(bitmapDataOS.toByteArray()); - zlibBitmapData = zlibOS.toByteArray(); + zlibBitmapData = new ByteArrayRange(zlibOS.toByteArray()); decompressed = false; setModified(true); } /** * Constructor + * * @param swf */ public DefineBitsLossless2Tag(SWF swf) { @@ -140,7 +141,7 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { bitmapFormat = DefineBitsLossless2Tag.FORMAT_32BIT_ARGB; bitmapWidth = 1; bitmapHeight = 1; - zlibBitmapData = createEmptyImage(); + zlibBitmapData = new ByteArrayRange(createEmptyImage()); } public DefineBitsLossless2Tag(SWFInputStream sis, ByteArrayRange data) throws IOException { @@ -152,7 +153,7 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { if (bitmapFormat == FORMAT_8BIT_COLORMAPPED) { bitmapColorTableSize = sis.readUI8("bitmapColorTableSize"); } - zlibBitmapData = sis.readBytesEx(sis.available(), "zlibBitmapData"); + zlibBitmapData = sis.readByteRangeEx(sis.available(), "zlibBitmapData"); } private ALPHACOLORMAPDATA colorMapData; private ALPHABITMAPDATA bitmapData; @@ -174,7 +175,7 @@ public class DefineBitsLossless2Tag extends ImageTag implements AloneTag { private void uncompressData() { try { - SWFInputStream sis = new SWFInputStream(swf, Helper.readStream(new InflaterInputStream(new ByteArrayInputStream(zlibBitmapData)))); + SWFInputStream sis = new SWFInputStream(swf, Helper.readStream(new InflaterInputStream(new ByteArrayInputStream(zlibBitmapData.getArray(), zlibBitmapData.getPos(), zlibBitmapData.getLength())))); if (bitmapFormat == FORMAT_8BIT_COLORMAPPED) { colorMapData = sis.readALPHACOLORMAPDATA(bitmapColorTableSize, bitmapWidth, bitmapHeight, "colorMapData"); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java index 00fca1a52..82b866924 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsLosslessTag.java @@ -61,7 +61,7 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { @Conditional(value = "bitmapFormat", options = {FORMAT_8BIT_COLORMAPPED}) public int bitmapColorTableSize; - public byte[] zlibBitmapData; //TODO: Parse COLORMAPDATA,BITMAPDATA + public ByteArrayRange zlibBitmapData; //TODO: Parse COLORMAPDATA,BITMAPDATA public static final int FORMAT_8BIT_COLORMAPPED = 3; public static final int FORMAT_15BIT_RGB = 4; public static final int FORMAT_24BIT_RGB = 5; @@ -124,7 +124,7 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { ByteArrayOutputStream zlibOS = new ByteArrayOutputStream(); SWFOutputStream sos2 = new SWFOutputStream(zlibOS, getVersion()); sos2.writeBytesZlib(bitmapDataOS.toByteArray()); - zlibBitmapData = zlibOS.toByteArray(); + zlibBitmapData = new ByteArrayRange(zlibOS.toByteArray()); decompressed = false; setModified(true); } @@ -192,7 +192,7 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { private void uncompressData() { try { - SWFInputStream sis = new SWFInputStream(swf, Helper.readStream(new InflaterInputStream(new ByteArrayInputStream(zlibBitmapData)))); + SWFInputStream sis = new SWFInputStream(swf, Helper.readStream(new InflaterInputStream(new ByteArrayInputStream(zlibBitmapData.getArray(), zlibBitmapData.getPos(), zlibBitmapData.getLength())))); if (bitmapFormat == FORMAT_8BIT_COLORMAPPED) { colorMapData = sis.readCOLORMAPDATA(bitmapColorTableSize, bitmapWidth, bitmapHeight, "colorMapData"); } @@ -206,6 +206,7 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { /** * Constructor + * * @param swf */ public DefineBitsLosslessTag(SWF swf) { @@ -214,7 +215,7 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { bitmapFormat = DefineBitsLosslessTag.FORMAT_24BIT_RGB; bitmapWidth = 1; bitmapHeight = 1; - zlibBitmapData = createEmptyImage(); + zlibBitmapData = new ByteArrayRange(createEmptyImage()); } public DefineBitsLosslessTag(SWFInputStream sis, ByteArrayRange data) throws IOException { @@ -226,7 +227,7 @@ public class DefineBitsLosslessTag extends ImageTag implements AloneTag { if (bitmapFormat == FORMAT_8BIT_COLORMAPPED) { bitmapColorTableSize = sis.readUI8("bitmapColorTableSize"); } - zlibBitmapData = sis.readBytesEx(sis.available(), "zlibBitmapData"); + zlibBitmapData = sis.readByteRangeEx(sis.available(), "zlibBitmapData"); } /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java index 8099602b9..93ac590a4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineBitsTag.java @@ -38,7 +38,7 @@ public class DefineBitsTag extends ImageTag { public int characterID; @SWFType(BasicType.UI8) - public byte[] jpegData; + public ByteArrayRange jpegData; @Internal private JPEGTablesTag jtt = null; @@ -57,18 +57,19 @@ public class DefineBitsTag extends ImageTag { /** * Constructor + * * @param swf */ public DefineBitsTag(SWF swf) { super(swf, ID, "DefineBits", null); characterID = swf.getNextCharacterId(); - jpegData = new byte[0]; + jpegData = ByteArrayRange.EMPTY; } public DefineBitsTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DefineBits", data); characterID = sis.readUI16("characterID"); - jpegData = sis.readBytesEx(sis.available(), "jpegData"); + jpegData = sis.readByteRangeEx(sis.available(), "jpegData"); } private void getJPEGTables() { @@ -94,10 +95,11 @@ public class DefineBitsTag extends ImageTag { try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { byte[] jttdata = jtt.jpegData; if (jttdata.length != 0) { - baos.write(jttdata, SWF.hasErrorHeader(jttdata) ? 4 : 0, jttdata.length - (SWF.hasErrorHeader(jttdata) ? 6 : 2)); - baos.write(jpegData, SWF.hasErrorHeader(jpegData) ? 6 : 2, jpegData.length - (SWF.hasErrorHeader(jttdata) ? 6 : 2)); + boolean jttError = SWF.hasErrorHeader(jttdata); + baos.write(jttdata, jttError ? 4 : 0, jttdata.length - (jttError ? 6 : 2)); + baos.write(jpegData.getArray(), jpegData.getPos() + (SWF.hasErrorHeader(jpegData) ? 6 : 2), jpegData.getLength() - (jttError ? 6 : 2)); } else { - baos.write(jpegData, 0, jpegData.length); + baos.write(jpegData.getArray(), jpegData.getPos(), jpegData.getLength()); } return new SerializableImage(ImageIO.read(new ByteArrayInputStream(baos.toByteArray()))); } catch (IOException ex) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java index acb9e3a0e..b7c8b361a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButton2Tag.java @@ -96,6 +96,7 @@ public class DefineButton2Tag extends ButtonTag implements Container { /** * Constructor + * * @param swf */ public DefineButton2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java index c978eea46..9dcb9b66e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonCxformTag.java @@ -60,6 +60,7 @@ public class DefineButtonCxformTag extends Tag { /** * Constructor + * * @param swf */ public DefineButtonCxformTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java index 5f406be10..bd132a014 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonSoundTag.java @@ -100,6 +100,7 @@ public class DefineButtonSoundTag extends CharacterIdTag { /** * Constructor + * * @param swf */ public DefineButtonSoundTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java index 3c869a804..2b492113a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineButtonTag.java @@ -96,6 +96,7 @@ public class DefineButtonTag extends ButtonTag implements ASMSource { /** * Constructor + * * @param swf */ public DefineButtonTag(SWF swf) { @@ -116,13 +117,7 @@ public class DefineButtonTag extends ButtonTag implements ASMSource { super(sis.getSwf(), ID, "DefineButton", data); buttonId = sis.readUI16("buttonId"); characters = sis.readBUTTONRECORDList(false, "characters"); - int pos = (int) sis.getPos(); - byte[] bytes = sis.readBytesEx(sis.available(), "actionBytes"); - if (data != null) { - actionBytes = new ByteArrayRange(data.getArray(), pos, bytes.length); - } else { - actionBytes = new ByteArrayRange(bytes, 0, bytes.length); - } + actionBytes = sis.readByteRangeEx(sis.available(), "actionBytes"); } /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java index f937732cb..5d36004b7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineEditTextTag.java @@ -703,6 +703,7 @@ public class DefineEditTextTag extends TextTag { /** * Constructor + * * @param swf */ public DefineEditTextTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java index e341d8b12..25740d9eb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont2Tag.java @@ -193,6 +193,7 @@ public class DefineFont2Tag extends FontTag { /** * Constructor + * * @param swf */ public DefineFont2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java index 7e4c22801..4bf9e1023 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont3Tag.java @@ -113,6 +113,7 @@ public class DefineFont3Tag extends FontTag { /** * Constructor + * * @param swf */ public DefineFont3Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java index ef42b5b83..acf239278 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFont4Tag.java @@ -50,6 +50,7 @@ public class DefineFont4Tag extends CharacterTag { /** * Constructor + * * @param swf */ public DefineFont4Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java index 1b8a57ab0..0cd5107f5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontAlignZonesTag.java @@ -46,6 +46,7 @@ public class DefineFontAlignZonesTag extends Tag { /** * Constructor + * * @param swf */ public DefineFontAlignZonesTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java index 153e98784..9f8c5d6e0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfo2Tag.java @@ -28,7 +28,6 @@ import com.jpexs.helpers.utf8.Utf8Helper; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; -import java.util.AbstractList; import java.util.ArrayList; import java.util.List; @@ -90,6 +89,7 @@ public class DefineFontInfo2Tag extends Tag { /** * Constructor + * * @param swf */ public DefineFontInfo2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java index f668076f2..a9b648541 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontInfoTag.java @@ -90,6 +90,7 @@ public class DefineFontInfoTag extends Tag { /** * Constructor + * * @param swf */ public DefineFontInfoTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java index 116e50ea9..9e325ced5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontNameTag.java @@ -36,6 +36,7 @@ public class DefineFontNameTag extends Tag { /** * Constructor + * * @param swf */ public DefineFontNameTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java index 8c210d526..f995848f9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineFontTag.java @@ -138,6 +138,7 @@ public class DefineFontTag extends FontTag { /** * Constructor + * * @param swf */ public DefineFontTag(SWF swf) { @@ -145,7 +146,7 @@ public class DefineFontTag extends FontTag { fontId = swf.getNextCharacterId(); glyphShapeTable = new ArrayList<>(); } - + /** * Constructor * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java index aa54cb4ed..f83a30abd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java @@ -152,6 +152,7 @@ public class DefineMorphShape2Tag extends CharacterTag implements MorphShapeTag /** * Constructor + * * @param swf */ public DefineMorphShape2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java index 2030d7bef..18382ea7c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java @@ -130,6 +130,7 @@ public class DefineMorphShapeTag extends CharacterTag implements MorphShapeTag { /** * Constructor + * * @param swf */ public DefineMorphShapeTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java index b6e80da3d..a56d3118f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineScalingGridTag.java @@ -39,6 +39,7 @@ public class DefineScalingGridTag extends Tag { /** * Constructor + * * @param swf */ public DefineScalingGridTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java index 65dd8848a..369866ee4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSceneAndFrameLabelDataTag.java @@ -79,13 +79,14 @@ public class DefineSceneAndFrameLabelDataTag extends Tag { /** * Constructor + * * @param swf */ public DefineSceneAndFrameLabelDataTag(SWF swf) { super(swf, ID, "DefineSceneAndFrameLabelData", null); sceneOffsets = new long[0]; sceneNames = new String[0]; - frameNums= new long[0]; + frameNums = new long[0]; frameNames = new String[0]; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java index fc6eb4b42..2ab8fe7ae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java @@ -60,7 +60,7 @@ public class DefineShape2Tag extends ShapeTag { Logger.getLogger(DefineShape2Tag.class.getName()).log(Level.SEVERE, null, ex); } } - + return shapes; } @@ -90,6 +90,7 @@ public class DefineShape2Tag extends ShapeTag { /** * Constructor + * * @param swf */ public DefineShape2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java index 96d9e8b36..aba844420 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java @@ -60,7 +60,7 @@ public class DefineShape3Tag extends ShapeTag { Logger.getLogger(DefineShape3Tag.class.getName()).log(Level.SEVERE, null, ex); } } - + return shapes; } @@ -90,6 +90,7 @@ public class DefineShape3Tag extends ShapeTag { /** * Constructor + * * @param swf */ public DefineShape3Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java index fd780512c..071afab03 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java @@ -68,7 +68,7 @@ public class DefineShape4Tag extends ShapeTag { Logger.getLogger(DefineShape4Tag.class.getName()).log(Level.SEVERE, null, ex); } } - + return shapes; } @@ -98,6 +98,7 @@ public class DefineShape4Tag extends ShapeTag { /** * Constructor + * * @param swf */ public DefineShape4Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java index 9086c9935..51010b0fe 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java @@ -39,7 +39,7 @@ public class DefineShapeTag extends ShapeTag { public RECT shapeBounds; public SHAPEWITHSTYLE shapes; public static final int ID = 2; - + private ByteArrayRange shapeData; @Override @@ -59,7 +59,7 @@ public class DefineShapeTag extends ShapeTag { Logger.getLogger(DefineShapeTag.class.getName()).log(Level.SEVERE, null, ex); } } - + return shapes; } @@ -84,6 +84,7 @@ public class DefineShapeTag extends ShapeTag { /** * Constructor + * * @param swf */ public DefineShapeTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java index 94b3bda83..5a9df42ae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSoundTag.java @@ -63,7 +63,7 @@ public class DefineSoundTag extends CharacterTag implements SoundTag { @SWFType(BasicType.UI32) public long soundSampleCount; - public byte[] soundData; + public ByteArrayRange soundData; public static final int ID = 14; @Override @@ -98,12 +98,13 @@ public class DefineSoundTag extends CharacterTag implements SoundTag { /** * Constructor + * * @param swf */ public DefineSoundTag(SWF swf) { super(swf, ID, "DefineSound", null); soundId = swf.getNextCharacterId(); - soundData = new byte[] {0}; + soundData = ByteArrayRange.EMPTY; } /** @@ -121,7 +122,7 @@ public class DefineSoundTag extends CharacterTag implements SoundTag { soundSize = sis.readUB(1, "soundSize") == 1; soundType = sis.readUB(1, "soundType") == 1; soundSampleCount = sis.readUI32("soundSampleCount"); - soundData = sis.readBytesEx(sis.available(), "soundData"); + soundData = sis.readByteRangeEx(sis.available(), "soundData"); } @Override @@ -290,7 +291,7 @@ public class DefineSoundTag extends CharacterTag implements SoundTag { this.soundSize = newSoundSize; this.soundRate = newSoundRate; this.soundSampleCount = newSoundSampleCount; - this.soundData = newSoundData; + this.soundData = new ByteArrayRange(newSoundData); this.soundType = newSoundType; this.soundFormat = newSoundFormat; setModified(true); @@ -319,10 +320,11 @@ public class DefineSoundTag extends CharacterTag implements SoundTag { public List getRawSoundData() { List ret = new ArrayList<>(); if (soundFormat == SoundFormat.FORMAT_MP3) { - ret.add(Arrays.copyOfRange(soundData, 2, soundData.length)); + ret.add(soundData.getRangeData(2, soundData.getLength() - 2)); return ret; } - ret.add(soundData); + + ret.add(soundData.getRangeData()); return ret; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java index cb734e730..7ea1c2ae2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineSpriteTag.java @@ -191,6 +191,7 @@ public class DefineSpriteTag extends CharacterTag implements Container, Drawable /** * Constructor + * * @param swf */ public DefineSpriteTag(SWF swf) { @@ -314,7 +315,7 @@ public class DefineSpriteTag extends CharacterTag implements Container, Drawable public int getNumFrames() { return frameCount; } - + private int getRealFrameCount() { int cnt = 1; List frames = getTimeline().getFrames(); @@ -323,7 +324,7 @@ public class DefineSpriteTag extends CharacterTag implements Container, Drawable cnt++; } } - + return cnt; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java index 01285adcf..1b97d1c5f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineText2Tag.java @@ -475,6 +475,7 @@ public class DefineText2Tag extends TextTag { /** * Constructor + * * @param swf */ public DefineText2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java index ceabc393d..681dd4369 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineTextTag.java @@ -436,6 +436,7 @@ public class DefineTextTag extends TextTag { /** * Constructor + * * @param swf */ public DefineTextTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java index f2d445d82..843e9984f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DefineVideoStreamTag.java @@ -100,6 +100,7 @@ public class DefineVideoStreamTag extends CharacterTag implements BoundedTag { /** * Constructor + * * @param swf */ public DefineVideoStreamTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java index 22a7a2f73..4428aabc0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCDefineTag.java @@ -67,6 +67,7 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag { /** * Constructor + * * @param swf */ public DoABCDefineTag(SWF swf) { @@ -89,7 +90,7 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag { ABCInputStream ais = new ABCInputStream(sis.getBaseStream()); // put it to the dumpview: - sis.readBytesEx(sis.available(), "abcBytes"); + sis.readByteRangeEx(sis.available(), "abcBytes"); abc = new ABC(ais, swf, this); } @@ -99,8 +100,6 @@ public class DoABCDefineTag extends Tag implements ABCContainerTag { abc.swf = swf; } - - /** * Gets data bytes * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java index 7309ed887..2430c36a2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoABCTag.java @@ -54,6 +54,7 @@ public class DoABCTag extends Tag implements ABCContainerTag { /** * Constructor + * * @param swf */ public DoABCTag(SWF swf) { @@ -73,7 +74,7 @@ public class DoABCTag extends Tag implements ABCContainerTag { ABCInputStream ais = new ABCInputStream(sis.getBaseStream()); // put it to the dumpview: - sis.readBytesEx(sis.available(), "abcBytes"); + sis.readByteRangeEx(sis.available(), "abcBytes"); abc = new ABC(ais, swf, this); } @@ -109,6 +110,5 @@ public class DoABCTag extends Tag implements ABCContainerTag { super.setSwf(swf); abc.swf = swf; } - - + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java index 3608a8e2d..6d541d7f2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoActionTag.java @@ -50,6 +50,7 @@ public class DoActionTag extends Tag implements ASMSource { /** * Constructor + * * @param swf */ public DoActionTag(SWF swf) { @@ -65,9 +66,7 @@ public class DoActionTag extends Tag implements ASMSource { */ public DoActionTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DoAction", data); - int pos = (int) sis.getPos(); - byte[] bytes = sis.readBytesEx(sis.available(), "actionBytes"); - actionBytes = new ByteArrayRange(data.getArray(), pos, bytes.length); + actionBytes = sis.readByteRangeEx(sis.available(), "actionBytes"); } /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java index 0b1844419..ffef311cf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/DoInitActionTag.java @@ -56,6 +56,7 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { /** * Constructor + * * @param swf */ public DoInitActionTag(SWF swf) { @@ -72,9 +73,7 @@ public class DoInitActionTag extends CharacterIdTag implements ASMSource { public DoInitActionTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "DoInitAction", data); spriteId = sis.readUI16("spriteId"); - int pos = (int) sis.getPos(); - byte[] bytes = sis.readBytesEx(sis.available(), "actionBytes"); - actionBytes = new ByteArrayRange(data.getArray(), pos, bytes.length); + actionBytes = sis.readByteRangeEx(sis.available(), "actionBytes"); } /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java index 97ddb1d6a..09ef57403 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebugger2Tag.java @@ -65,6 +65,7 @@ public class EnableDebugger2Tag extends Tag { /** * Constructor + * * @param swf */ public EnableDebugger2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java index d6589275e..b8de542a5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableDebuggerTag.java @@ -59,6 +59,7 @@ public class EnableDebuggerTag extends Tag { /** * Constructor + * * @param swf */ public EnableDebuggerTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java index 4548708d2..86293f94a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EnableTelemetryTag.java @@ -68,6 +68,7 @@ public class EnableTelemetryTag extends Tag { /** * Constructor + * * @param swf */ public EnableTelemetryTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java index fccc4fcf4..16c6884fb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/EndTag.java @@ -41,6 +41,7 @@ public class EndTag extends Tag { /** * Constructor + * * @param swf */ public EndTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java index 42308430b..7cf454446 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ExportAssetsTag.java @@ -49,6 +49,7 @@ public class ExportAssetsTag extends Tag { /** * Constructor + * * @param swf */ public ExportAssetsTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java index d1d3c8b80..7de201370 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FileAttributesTag.java @@ -47,6 +47,7 @@ public class FileAttributesTag extends Tag { /** * Constructor + * * @param swf */ public FileAttributesTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java index 3ab804f6f..7d21af288 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/FrameLabelTag.java @@ -40,6 +40,7 @@ public class FrameLabelTag extends Tag { /** * Constructor + * * @param swf */ public FrameLabelTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java index 196e124b5..cedd49586 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java @@ -59,6 +59,7 @@ public class ImportAssets2Tag extends Tag implements ImportTag { /** * Constructor + * * @param swf */ public ImportAssets2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java index 523becd6e..4252b2035 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java @@ -52,6 +52,7 @@ public class ImportAssetsTag extends Tag implements ImportTag { /** * Constructor + * * @param swf */ public ImportAssetsTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java index 3f8199252..512b377a1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/JPEGTablesTag.java @@ -33,6 +33,7 @@ public class JPEGTablesTag extends Tag { /** * Constructor + * * @param swf */ public JPEGTablesTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java index 1af4c2fa7..a822de6f5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/MetadataTag.java @@ -33,6 +33,7 @@ public class MetadataTag extends Tag { /** * Constructor + * * @param swf */ public MetadataTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java index 4ce680208..d1c8d741f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject2Tag.java @@ -194,6 +194,7 @@ public class PlaceObject2Tag extends CharacterIdTag implements Container, PlaceO /** * Constructor + * * @param swf */ public PlaceObject2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java index eda405650..c4b2bd08f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject3Tag.java @@ -299,6 +299,7 @@ public class PlaceObject3Tag extends CharacterIdTag implements Container, PlaceO /** * Constructor + * * @param swf */ public PlaceObject3Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java index 43bc9651d..c202a312e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObject4Tag.java @@ -301,6 +301,7 @@ public class PlaceObject4Tag extends CharacterIdTag implements Container, PlaceO /** * Constructor + * * @param swf */ public PlaceObject4Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java index dc1fce7cc..4d2b403ba 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/PlaceObjectTag.java @@ -100,6 +100,7 @@ public class PlaceObjectTag extends CharacterIdTag implements PlaceObjectTypeTag /** * Constructor + * * @param swf */ public PlaceObjectTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java index 3e9b185ba..c1bbd94f7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProductInfoTag.java @@ -48,6 +48,7 @@ public class ProductInfoTag extends Tag { /** * Constructor + * * @param swf */ public ProductInfoTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java index 6bd70a8ef..ced91b2f3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ProtectTag.java @@ -59,6 +59,7 @@ public class ProtectTag extends Tag { /** * Constructor + * * @param swf */ public ProtectTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java index aa6a380ab..7abb10c1e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObject2Tag.java @@ -35,6 +35,7 @@ public class RemoveObject2Tag extends Tag implements RemoveTag { /** * Constructor + * * @param swf */ public RemoveObject2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java index eb6587e12..d67b7ed91 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/RemoveObjectTag.java @@ -68,6 +68,7 @@ public class RemoveObjectTag extends CharacterIdTag implements RemoveTag { /** * Constructor + * * @param swf */ public RemoveObjectTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java index 0361e57f8..49ad2053f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ScriptLimitsTag.java @@ -38,6 +38,7 @@ public class ScriptLimitsTag extends Tag { /** * Constructor + * * @param swf */ public ScriptLimitsTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java index 66f391632..94a1186c5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetBackgroundColorTag.java @@ -31,6 +31,7 @@ public class SetBackgroundColorTag extends Tag { /** * Constructor + * * @param swf */ public SetBackgroundColorTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java index 2c987d996..50168c29b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SetTabIndexTag.java @@ -66,6 +66,7 @@ public class SetTabIndexTag extends Tag { /** * Constructor + * * @param swf */ public SetTabIndexTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java index 774179c7c..77f3c1d67 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java @@ -50,6 +50,7 @@ public class ShowFrameTag extends Tag { /** * Constructor + * * @param swf */ public ShowFrameTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java index ea93070d9..26dbaa1fe 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamBlockTag.java @@ -35,15 +35,16 @@ public class SoundStreamBlockTag extends Tag { public static final int ID = 19; @Internal - public byte[] streamSoundData; + public ByteArrayRange streamSoundData; /** * Constructor + * * @param swf */ public SoundStreamBlockTag(SWF swf) { super(swf, ID, "SoundStreamBlock", null); - streamSoundData = new byte[0]; + streamSoundData = ByteArrayRange.EMPTY; } /** @@ -56,7 +57,7 @@ public class SoundStreamBlockTag extends Tag { public SoundStreamBlockTag(SWFInputStream sis, ByteArrayRange data) throws IOException { super(sis.getSwf(), ID, "SoundStreamBlock", data); //all data is streamSoundData - streamSoundData = sis.readBytesEx(sis.available(), "streamSoundData"); + streamSoundData = sis.readByteRangeEx(sis.available(), "streamSoundData"); } /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java index 4ea2caa3c..fcd876bae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHead2Tag.java @@ -33,7 +33,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; /** @@ -139,6 +138,7 @@ public class SoundStreamHead2Tag extends CharacterIdTag implements SoundStreamHe /** * Constructor + * * @param swf */ public SoundStreamHead2Tag(SWF swf) { @@ -212,9 +212,9 @@ public class SoundStreamHead2Tag extends CharacterIdTag implements SoundStreamHe List blocks = getBlocks(); for (SoundStreamBlockTag block : blocks) { if (streamSoundCompression == SoundFormat.FORMAT_MP3) { - ret.add(Arrays.copyOfRange(block.streamSoundData, 4, block.streamSoundData.length)); + ret.add(block.streamSoundData.getRangeData(4, block.streamSoundData.getLength() - 4)); } else { - ret.add(block.streamSoundData); + ret.add(block.streamSoundData.getRangeData()); } } return ret; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java index 78d5dc31c..55d98916b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SoundStreamHeadTag.java @@ -35,7 +35,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; /** @@ -132,6 +131,7 @@ public class SoundStreamHeadTag extends CharacterIdTag implements SoundStreamHea /** * Constructor + * * @param swf */ public SoundStreamHeadTag(SWF swf) { @@ -228,9 +228,9 @@ public class SoundStreamHeadTag extends CharacterIdTag implements SoundStreamHea List blocks = getBlocks(); for (SoundStreamBlockTag block : blocks) { if (streamSoundCompression == SoundFormat.FORMAT_MP3) { - ret.add(Arrays.copyOfRange(block.streamSoundData, 4, block.streamSoundData.length)); + ret.add(block.streamSoundData.getRangeData(4, block.streamSoundData.getLength() - 4)); } else { - ret.add(block.streamSoundData); + ret.add(block.streamSoundData.getRangeData()); } } return ret; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java index 34ac2dab9..73470124e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSound2Tag.java @@ -57,6 +57,7 @@ public class StartSound2Tag extends Tag { /** * Constructor + * * @param swf */ public StartSound2Tag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java index bfc3fdab8..4838964c5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/StartSoundTag.java @@ -60,6 +60,7 @@ public class StartSoundTag extends Tag { /** * Constructor + * * @param swf */ public StartSoundTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java index 31273e4f7..e155ff6a5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/SymbolClassTag.java @@ -38,6 +38,7 @@ public class SymbolClassTag extends Tag { /** * Constructor + * * @param swf */ public SymbolClassTag(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java index 318f32192..5528d033f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/Tag.java @@ -358,8 +358,9 @@ public abstract class Tag implements NeedsCharacters, Exportable, ContainerItem, } /** - * Returns the original inner data of the tag, without the 2-6 bytes length header - * Call this method only from debug codes + * Returns the original inner data of the tag, without the 2-6 bytes length + * header Call this method only from debug codes + * * @return The data */ public final byte[] getOriginalData() { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java index 0dbcc9e08..da1b78d8c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/VideoFrameTag.java @@ -37,7 +37,7 @@ public class VideoFrameTag extends Tag { public int streamID; @SWFType(BasicType.UI16) public int frameNum; - public byte[] videoData; + public ByteArrayRange videoData; public static final int ID = 61; /** @@ -62,11 +62,12 @@ public class VideoFrameTag extends Tag { /** * Constructor + * * @param swf */ public VideoFrameTag(SWF swf) { super(swf, ID, "VideoFrame", null); - videoData = new byte[0]; + videoData = ByteArrayRange.EMPTY; } /** @@ -80,6 +81,6 @@ public class VideoFrameTag extends Tag { super(sis.getSwf(), ID, "VideoFrame", data); streamID = sis.readUI16("streamID"); frameNum = sis.readUI16("frameNum"); - videoData = sis.readBytesEx(sis.available(), "videoData"); //TODO: Parse video packets + videoData = sis.readByteRangeEx(sis.available(), "videoData"); //TODO: Parse video packets } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/FontTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/FontTag.java index ab726875c..e2ca3ce5c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/FontTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/FontTag.java @@ -104,25 +104,25 @@ public abstract class FontTag extends CharacterTag implements AloneTag, Drawable public abstract int getDescent(); public abstract int getLeading(); - - public String getFontName(){ - DefineFontNameTag fontNameTag = getFontNameTag(); - if(fontNameTag == null){ + + public String getFontName() { + DefineFontNameTag fontNameTag = getFontNameTag(); + if (fontNameTag == null) { return getFontNameIntag(); } return fontNameTag.fontName; } - - public String getFontCopyright(){ + + public String getFontCopyright() { DefineFontNameTag fontNameTag = getFontNameTag(); - if(fontNameTag == null){ + if (fontNameTag == null) { return ""; } return fontNameTag.fontCopyright; } public static Map> installedFontsByFamily; - public static Map installedFontsByName; + public static Map installedFontsByName; public static String defaultFontName; @@ -226,13 +226,13 @@ public abstract class FontTag extends CharacterTag implements AloneTag, Drawable public static void reload() { installedFontsByFamily = FontHelper.getInstalledFonts(); installedFontsByName = new HashMap<>(); - - for(String fam:installedFontsByFamily.keySet()){ - for(String nam:installedFontsByFamily.get(fam).keySet()){ + + for (String fam : installedFontsByFamily.keySet()) { + for (String nam : installedFontsByFamily.get(fam).keySet()) { installedFontsByName.put(nam, installedFontsByFamily.get(fam).get(nam)); } } - + if (installedFontsByFamily.containsKey("Times New Roman")) { defaultFontName = "Times New Roman"; } else if (installedFontsByFamily.containsKey("Arial")) { @@ -368,5 +368,5 @@ public abstract class FontTag extends CharacterTag implements AloneTag, Drawable public FontTag toClassicFont() { return this; - } + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java index 89b08b3d8..512df49a5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ImageTag.java @@ -67,17 +67,21 @@ public abstract class ImageTag extends CharacterTag implements DrawableTag { } public static String getImageFormat(byte[] data) { + return getImageFormat(new ByteArrayRange(data)); + } + + public static String getImageFormat(ByteArrayRange data) { if (SWF.hasErrorHeader(data)) { return "jpg"; } - if (data.length > 2 && ((data[0] & 0xff) == 0xff) && ((data[1] & 0xff) == 0xd8)) { + if (data.getLength() > 2 && ((data.get(0) & 0xff) == 0xff) && ((data.get(1) & 0xff) == 0xd8)) { return "jpg"; } - if (data.length > 6 && ((data[0] & 0xff) == 0x47) && ((data[1] & 0xff) == 0x49) && ((data[2] & 0xff) == 0x46) && ((data[3] & 0xff) == 0x38) && ((data[4] & 0xff) == 0x39) && ((data[5] & 0xff) == 0x61)) { + if (data.getLength() > 6 && ((data.get(0) & 0xff) == 0x47) && ((data.get(1) & 0xff) == 0x49) && ((data.get(2) & 0xff) == 0x46) && ((data.get(3) & 0xff) == 0x38) && ((data.get(4) & 0xff) == 0x39) && ((data.get(5) & 0xff) == 0x61)) { return "gif"; } - if (data.length > 8 && ((data[0] & 0xff) == 0x89) && ((data[1] & 0xff) == 0x50) && ((data[2] & 0xff) == 0x4e) && ((data[3] & 0xff) == 0x47) && ((data[4] & 0xff) == 0x0d) && ((data[5] & 0xff) == 0x0a) && ((data[6] & 0xff) == 0x1a) && ((data[7] & 0xff) == 0x0a)) { + if (data.getLength() > 8 && ((data.get(0) & 0xff) == 0x89) && ((data.get(1) & 0xff) == 0x50) && ((data.get(2) & 0xff) == 0x4e) && ((data.get(3) & 0xff) == 0x47) && ((data.get(4) & 0xff) == 0x0d) && ((data.get(5) & 0xff) == 0x0a) && ((data.get(6) & 0xff) == 0x1a) && ((data.get(7) & 0xff) == 0x0a)) { return "png"; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java index b4b2131a4..3095df306 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/ShapeTag.java @@ -46,7 +46,7 @@ import java.util.Set; public abstract class ShapeTag extends CharacterTag implements DrawableTag { private final int markerSize = 10; - + public ShapeTag(SWF swf, int id, String name, ByteArrayRange data) { super(swf, id, name, data); } @@ -68,7 +68,7 @@ public abstract class ShapeTag extends CharacterTag implements DrawableTag { double[] coords = new double[6]; AffineTransform at = transformation.toTransform(); at.preConcatenate(AffineTransform.getScaleInstance(1 / SWF.unitDivisor, 1 / SWF.unitDivisor)); - + // get the graphics from the inner image object, because it creates a new Graphics object Graphics2D graphics = (Graphics2D) image.getBufferedImage().getGraphics(); graphics.setPaint(Color.black); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java index 67f26b7b6..58cc2fcc3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java @@ -83,6 +83,7 @@ public final class DefineCompactedFont extends FontTag implements DrawableTag { /** * Constructor + * * @param swf */ public DefineCompactedFont(SWF swf) { @@ -92,7 +93,7 @@ public final class DefineCompactedFont extends FontTag implements DrawableTag { fonts = new ArrayList<>(); FontType ft = new FontType(); fonts.add(ft); - + rebuildShapeCache(); } @@ -403,7 +404,7 @@ public final class DefineCompactedFont extends FontTag implements DrawableTag { kr.fontKerningCode1 = ft.kerning.get(i).char1; kr.fontKerningCode2 = ft.kerning.get(i).char2; ret.fontKerningTable.add(kr); - } + } return ret; } @@ -412,6 +413,5 @@ public final class DefineCompactedFont extends FontTag implements DrawableTag { public boolean hasLayout() { return true; } - - + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS2Package.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS2Package.java index f1aed4f09..c9079d4cf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS2Package.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS2Package.java @@ -31,9 +31,9 @@ public class AS2Package implements TreeItem { private final SWF swf; private final String name; private final AS2Package parent; - + public Map subPackages = new TreeMap<>(); - + public Map scripts = new TreeMap<>(); public AS2Package(String name, AS2Package parent, SWF swf) { @@ -53,11 +53,11 @@ public class AS2Package implements TreeItem { if (index == 0) { return subPackage; } - + index--; } } - + index -= subPackages.size(); for (ASMSource pack : scripts.values()) { @@ -94,9 +94,10 @@ public class AS2Package implements TreeItem { } res++; } - + return res; } + @Override public String toString() { return name; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS3Package.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS3Package.java index 847add9ff..ac8a0c29f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS3Package.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/AS3Package.java @@ -50,11 +50,11 @@ public class AS3Package extends AS3ClassTreeItem { if (index == 0) { return subPackage; } - + index--; } } - + index -= subPackages.size(); for (ScriptPack pack : scripts.values()) { @@ -91,7 +91,7 @@ public class AS3Package extends AS3ClassTreeItem { } res++; } - + return res; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/FrameScript.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/FrameScript.java index fd4938a1f..6066a26d9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/FrameScript.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/FrameScript.java @@ -32,11 +32,11 @@ public class FrameScript implements TreeItem { this.swf = swf; this.frame = frame; } - + public Frame getFrame() { return frame; } - + @Override public SWF getSwf() { return swf; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/TagScript.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/TagScript.java index 0307b13b6..468109272 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/TagScript.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/TagScript.java @@ -26,7 +26,7 @@ import java.util.List; * @author JPEXS */ public class TagScript implements TreeItem { - + private final SWF swf; private final Tag tag; private final List frames; @@ -36,15 +36,15 @@ public class TagScript implements TreeItem { this.tag = tag; this.frames = frames; } - + public Tag getTag() { return tag; } - + public List getFrames() { return frames; } - + @Override public SWF getSwf() { return swf; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java index 889d7ae04..58b4bbb05 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/timeline/Timeline.java @@ -76,22 +76,22 @@ public class Timeline { initialized = true; } } - + public List getFrames() { ensureInitialized(); return frames; } - + public AS2Package getAS2RootPackage() { ensureInitialized(); return as2RootPackage; } - + public Map getDepthMaxFrame() { ensureInitialized(); return depthMaxFrame; } - + public void reset() { initialized = false; frames.clear(); @@ -101,12 +101,12 @@ public class Timeline { otherTags.clear(); as2RootPackage = new AS2Package(null, null, swf); } - + public final int getMaxDepth() { ensureInitialized(); return getMaxDepthInternal(); } - + public final int getMaxDepthInternal() { int max_depth = 0; for (Frame f : frames) { @@ -125,13 +125,13 @@ public class Timeline { public int getFrameCount() { return getFrames().size(); } - + public int getFrameForAction(ASMSource asm) { Integer frame = actionFrames.get(asm); if (frame == null) { return -1; } - + return frame; } @@ -149,7 +149,7 @@ public class Timeline { this.tags = tags; as2RootPackage = new AS2Package(null, null, swf); } - + private void initialize() { int frameIdx = 0; Frame frame = new Frame(this, frameIdx++); @@ -249,10 +249,9 @@ public class Timeline { if (tagAdded) { frames.add(frame); } - + // todo: enable again after TweenDetector.detectRanges implemented //detectTweens(); - int maxDepth = getMaxDepthInternal(); for (int d = 1; d <= maxDepth; d++) { for (int f = frames.size() - 1; f >= 0; f--) { @@ -262,9 +261,9 @@ public class Timeline { } } } - + createASPackages(); - + initialized = true; } @@ -313,7 +312,7 @@ public class Timeline { if (path == null || path.isEmpty()) { path = initAction.getExportFileName(); } - + String[] pathParts = path.contains(".") ? path.split("\\.") : new String[]{path}; AS2Package pkg = as2RootPackage; for (int pos = 0; pos < pathParts.length - 1; pos++) { @@ -323,15 +322,15 @@ public class Timeline { subPkg = new AS2Package(pathPart, pkg, swf); pkg.subPackages.put(pathPart, subPkg); } - + pkg = subPkg; } - + pkg.scripts.put(pathParts[pathParts.length - 1], asm); } } } - + public void getNeededCharacters(Set usedCharacters) { for (int i = 0; i < getFrameCount(); i++) { getNeededCharacters(i, usedCharacters); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3ClassTreeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3ClassTreeItem.java index d53faeb40..686aa55a4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3ClassTreeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/AS3ClassTreeItem.java @@ -21,7 +21,7 @@ package com.jpexs.decompiler.flash.treeitems; * @author JPEXS */ public abstract class AS3ClassTreeItem implements TreeItem { - + private final String name; private final String path; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/SWFList.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/SWFList.java index 3aa9a4549..4a540a307 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/SWFList.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/SWFList.java @@ -46,7 +46,7 @@ public class SWFList implements List, SWFContainerItem { public String toString() { return name; } - + @Override public Iterator iterator() { return swfs.iterator(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/ScriptContainer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/ScriptContainer.java index 1042c0477..5fb0ea35e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/ScriptContainer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/treeitems/ScriptContainer.java @@ -3,7 +3,6 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ - package com.jpexs.decompiler.flash.treeitems; import java.util.Map; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java index 270270458..6d05d188e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/KERNINGRECORD.java @@ -56,8 +56,5 @@ public class KERNINGRECORD implements Serializable { fontKerningCode2 = char2; fontKerningAdjustment = FontHelper.getFontCharsKerning(font, char1, char2); } - - - } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPE.java index ad9fc0015..2057c11ca 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPE.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPE.java @@ -42,7 +42,7 @@ public class SHAPE implements NeedsCharacters, Serializable { public List shapeRecords; private Shape cachedOutline; - + @Override public void getNeededCharacters(Set needed) { for (SHAPERECORD r : shapeRecords) { @@ -67,7 +67,7 @@ public class SHAPE implements NeedsCharacters, Serializable { if (cachedOutline != null) { return cachedOutline; } - + List paths = PathExporter.export(this); Area area = new Area(); for (GeneralPath path : paths) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java index 54d729ff9..28090f307 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/SHAPEWITHSTYLE.java @@ -51,7 +51,7 @@ public class SHAPEWITHSTYLE extends SHAPE implements NeedsCharacters, Serializab } return modified; } - + public static SHAPEWITHSTYLE createEmpty(int shapeNum) { SHAPEWITHSTYLE ret = new SHAPEWITHSTYLE(); ret.shapeRecords = new ArrayList<>(); @@ -64,7 +64,7 @@ public class SHAPEWITHSTYLE extends SHAPE implements NeedsCharacters, Serializab } else if (shapeNum == 4) { ret.lineStyles.lineStyles = new LINESTYLE2[0]; } - + return ret; } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FontType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FontType.java index dc0e60923..f85425eb9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FontType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/gfx/FontType.java @@ -47,7 +47,7 @@ public class FontType implements Serializable { kerning = new ArrayList<>(); glyphs = new ArrayList<>(); } - + public FontType(GFxInputStream sis) throws IOException { long offset = sis.getPos(); fontName = sis.readString("fontName"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java index c3a79498d..c76d876e8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/shaperecords/SHAPERECORD.java @@ -233,13 +233,13 @@ public abstract class SHAPERECORD implements Cloneable, NeedsCharacters, Seriali } public static SHAPE systemFontCharacterToSHAPE(Font font, int fontSize, char character) { - return fontCharacterToSHAPE(font,fontSize, character); + return fontCharacterToSHAPE(font, fontSize, character); } public static SHAPE fontCharacterToSHAPE(final Font font, float fontSize, char character) { int multiplier = 1; if (fontSize > 1024) { - multiplier = (int)(fontSize / 1024); + multiplier = (int) (fontSize / 1024); fontSize = 1024; } List retList = new ArrayList<>(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java index a35e4fb66..d04791ddc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/xfl/XFLConverter.java @@ -1395,7 +1395,7 @@ public class XFLConverter { for (Tag t : tags) { if (found && (t instanceof SoundStreamBlockTag)) { SoundStreamBlockTag bl = (SoundStreamBlockTag) t; - soundData = bl.streamSoundData; + soundData = bl.streamSoundData.getRangeData(); break; } if (t == symbol) { @@ -1407,7 +1407,7 @@ public class XFLConverter { soundFormat = sound.soundFormat; soundRate = sound.soundRate; soundType = sound.soundType; - soundData = sound.soundData; + soundData = sound.soundData.getRangeData(); soundSize = sound.soundSize; soundSampleCount = sound.soundSampleCount; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java index bdf687240..5d99fdbde 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java @@ -59,7 +59,7 @@ public abstract class GraphTargetItem implements Serializable { public List moreSrc = new ArrayList<>(); public GraphPart firstPart; public GraphTargetItem value; - protected Map srcData = new HashMap<>(); + protected Map srcData = new HashMap<>(); public GraphPart getFirstPart() { if (value == null) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java index abdfb9724..a8793f26c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/TypeItem.java @@ -18,16 +18,11 @@ package com.jpexs.decompiler.graph; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; -import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.abc.types.InstanceInfo; -import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.decompiler.graph.model.UnboundedTypeItem; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Objects; /** @@ -74,17 +69,16 @@ public class TypeItem extends GraphTargetItem { return true; } - @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { if (localData.fullyQualifiedNames.contains(fullTypeName)) { - writer.hilightSpecial(IdentifiersDeobfuscation.printNamespace(localData.constantsAvm2!=null, fullTypeName),"typename",fullTypeName); + writer.hilightSpecial(IdentifiersDeobfuscation.printNamespace(localData.constantsAvm2 != null, fullTypeName), "typename", fullTypeName); } else { String simpleName = fullTypeName; if (simpleName.contains(".")) { simpleName = simpleName.substring(simpleName.lastIndexOf('.') + 1); } - writer.hilightSpecial(IdentifiersDeobfuscation.printNamespace(localData.constantsAvm2!=null, simpleName),"typename",fullTypeName); + writer.hilightSpecial(IdentifiersDeobfuscation.printNamespace(localData.constantsAvm2 != null, simpleName), "typename", fullTypeName); } return writer; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java index aa2e8e25d..2ea55cbc9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/model/CommentItem.java @@ -42,7 +42,7 @@ public class CommentItem extends GraphTargetItem { public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) { writer.append("/* "); for (int i = 0; i < commentLines.length; i++) { - if(commentLines[i]==null){ + if (commentLines[i] == null) { continue; } writer.append(commentLines[i]); diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/ByteArrayRange.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/ByteArrayRange.java index ff108e560..cda94c0e7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/ByteArrayRange.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/ByteArrayRange.java @@ -23,7 +23,7 @@ package com.jpexs.helpers; public class ByteArrayRange { public static final ByteArrayRange EMPTY = new ByteArrayRange(new byte[0]); - + private final byte[] array; private final int pos; private final int length; @@ -43,18 +43,28 @@ public class ByteArrayRange { public byte[] getArray() { return array; } - + public int getPos() { return pos; } - + public int getLength() { return length; } - + + public byte get(int index) { + return array[pos + index]; + } + public byte[] getRangeData() { byte[] data = new byte[length]; System.arraycopy(array, pos, data, 0, length); return data; } + + public byte[] getRangeData(int pos, int length) { + byte[] data = new byte[length]; + System.arraycopy(array, this.pos + pos, data, 0, length); + return data; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java b/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java index 527477637..3fb4e32ab 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java +++ b/libsrc/ffdec_lib/src/com/jpexs/helpers/Helper.java @@ -61,7 +61,6 @@ public class Helper { public static String newLine = System.getProperty("line.separator"); public static String decompilationErrorAdd = null; - /** * Converts array of int values to string * @@ -809,7 +808,7 @@ public class Helper { writer.appendNoHilight("/*").newLine(); writer.appendNoHilight(" * ").appendNoHilight(AppResources.translate("decompilationError")).newLine(); writer.appendNoHilight(" * ").appendNoHilight(AppResources.translate("decompilationError.obfuscated")).newLine(); - if(decompilationErrorAdd!=null){ + if (decompilationErrorAdd != null) { writer.appendNoHilight(" * ").appendNoHilight(decompilationErrorAdd).newLine(); } writer.appendNoHilight(" * ").appendNoHilight(AppResources.translate("decompilationError.errorType")). diff --git a/src/com/jpexs/decompiler/flash/gui/BinaryPanel.java b/src/com/jpexs/decompiler/flash/gui/BinaryPanel.java index 492ab273d..8b0ce7fb6 100644 --- a/src/com/jpexs/decompiler/flash/gui/BinaryPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/BinaryPanel.java @@ -18,7 +18,6 @@ package com.jpexs.decompiler.flash.gui; import com.jpexs.decompiler.flash.gui.hexview.HexView; import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag; -import com.jpexs.helpers.utf8.Utf8Helper; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; @@ -27,7 +26,6 @@ import java.awt.event.ComponentEvent; import java.awt.event.ComponentListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.util.Arrays; import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JPanel; diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index 7e5cfaa2d..ea45c3472 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -32,7 +32,6 @@ import com.jpexs.decompiler.flash.abc.types.Namespace; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.console.CommandLineArgumentParser; import com.jpexs.decompiler.flash.console.ContextMenuTools; -import static com.jpexs.decompiler.flash.console.ContextMenuTools.getAppDir; import com.jpexs.decompiler.flash.gui.debugger.Debugger; import com.jpexs.decompiler.flash.gui.proxy.ProxyFrame; import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin; @@ -820,7 +819,7 @@ public class Main { if (GraphicsEnvironment.isHeadless()) { //No GUI in OS return; } - if (!Configuration.locale.hasValue()){ + if (!Configuration.locale.hasValue()) { if (Platform.isWindows()) { //Load from Installer String uninstKey = "{E618D276-6596-41F4-8A98-447D442A77DB}_is1"; @@ -833,30 +832,30 @@ public class Main { char buf[] = new char[9]; int cnt = Kernel32.INSTANCE.GetLocaleInfo(lcid, Kernel32.LOCALE_SISO639LANGNAME, buf, 9); String langCode = new String(buf, 0, cnt).trim().toLowerCase(); - + cnt = Kernel32.INSTANCE.GetLocaleInfo(lcid, Kernel32.LOCALE_SISO3166CTRYNAME, buf, 9); String countryCode = new String(buf, 0, cnt).trim().toLowerCase(); - - List langs=Arrays.asList(SelectLanguageDialog.getAvailableLanguages()); - for(int i=0;i langs = Arrays.asList(SelectLanguageDialog.getAvailableLanguages()); + for (int i = 0; i < langs.size(); i++) { langs.set(i, langs.get(i).toLowerCase()); } - + String selectedLang = null; - - if(langs.contains(langCode+"-"+countryCode)){ - selectedLang = SelectLanguageDialog.getAvailableLanguages()[langs.indexOf(langCode+"-"+countryCode)]; - }else if(langs.contains(langCode)){ + + if (langs.contains(langCode + "-" + countryCode)) { + selectedLang = SelectLanguageDialog.getAvailableLanguages()[langs.indexOf(langCode + "-" + countryCode)]; + } else if (langs.contains(langCode)) { selectedLang = SelectLanguageDialog.getAvailableLanguages()[langs.indexOf(langCode)]; } - if(selectedLang!=null){ + if (selectedLang != null) { Configuration.locale.set(selectedLang); } } } } catch (Exception ex) { //ignore - } + } } } Locale.setDefault(Locale.forLanguageTag(Configuration.locale.get())); diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 017642b68..257afc0c4 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -127,7 +127,6 @@ import com.jpexs.decompiler.flash.types.MATRIX; import com.jpexs.decompiler.flash.types.RECT; import com.jpexs.decompiler.flash.types.sound.SoundFormat; import com.jpexs.decompiler.flash.xfl.FLAVersion; -import com.jpexs.helpers.Cache; import com.jpexs.helpers.CancellableWorker; import com.jpexs.helpers.Helper; import com.jpexs.helpers.Path; @@ -140,7 +139,6 @@ import java.awt.Component; import java.awt.Desktop; import java.awt.FlowLayout; import java.awt.Font; -import java.awt.Image; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; @@ -2234,6 +2232,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec }, Configuration.parallelSpeedUp.get()); bswf.fileTitle = "(SWF Data)"; binaryDataTag.innerSwf = bswf; + bswf.binaryData = binaryDataTag; } catch (IOException | InterruptedException ex) { //ignore } diff --git a/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java b/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java index d3fce3a25..eb969ada5 100644 --- a/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java @@ -73,7 +73,7 @@ public class NewVersionDialog extends AppDialog implements ActionListener { changesStr += "
"; } first = false; - changesStr += "" + translate("version") + " " + v.versionName + (v.nightly ? " nightly":"") + "
"; + changesStr += "" + translate("version") + " " + v.versionName + (v.nightly ? " nightly" : "") + "
"; String releaseDate = v.releaseDate; try { Date date = serverFormatter.parse(releaseDate); @@ -100,7 +100,7 @@ public class NewVersionDialog extends AppDialog implements ActionListener { } changesText.setContentType("text/html"); changesText.setText("" + changesStr + ""); - JLabel newAvailableLabel = new JLabel("
" + translate("newversionavailable") + " " + latestVersion.appName + " " + translate("version") + " " + latestVersion.versionName + (latestVersion.nightly ? " nightly":"") + "
", SwingConstants.CENTER); + JLabel newAvailableLabel = new JLabel("
" + translate("newversionavailable") + " " + latestVersion.appName + " " + translate("version") + " " + latestVersion.versionName + (latestVersion.nightly ? " nightly" : "") + "
", SwingConstants.CENTER); newAvailableLabel.setAlignmentX(JLabel.CENTER_ALIGNMENT); cnt.add(newAvailableLabel); diff --git a/src/com/jpexs/decompiler/flash/gui/TextPanel.java b/src/com/jpexs/decompiler/flash/gui/TextPanel.java index f150b5b5b..e1a6e274f 100644 --- a/src/com/jpexs/decompiler/flash/gui/TextPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/TextPanel.java @@ -28,7 +28,6 @@ import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JScrollPane; -import jsyntaxpane.DefaultSyntaxKit; /** * @@ -49,7 +48,6 @@ public class TextPanel extends JPanel implements ActionListener { public TextPanel(MainPanel mainPanel) { super(new BorderLayout()); - this.mainPanel = mainPanel; textSearchPanel = new SearchPanel<>(new FlowLayout(), mainPanel); diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 7857e15f9..a7a18399b 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -360,10 +360,10 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se Helper.emptyObject(this); } - public ABCPanel(MainPanel mainPanel) { + public ABCPanel(MainPanel mainPanel) { DefaultSyntaxKit.initKit(); - + this.mainPanel = mainPanel; setLayout(new BorderLayout()); @@ -373,12 +373,12 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se @Override public boolean isLink(Token token) { - return hasDeclaration(token.length==1?token.start:token.start+1); + return hasDeclaration(token.length == 1 ? token.start : token.start + 1); } @Override public void handleLink(Token token) { - gotoDeclaration(token.length==1?token.start:token.start+1); + gotoDeclaration(token.length == 1 ? token.start : token.start + 1); } @Override @@ -543,25 +543,24 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se } private boolean hasDeclaration(int pos) { - - SyntaxDocument sd = (SyntaxDocument)decompiledTextArea.getDocument(); + + SyntaxDocument sd = (SyntaxDocument) decompiledTextArea.getDocument(); Token t = sd.getTokenAt(pos); - if(t==null || (t.type != TokenType.IDENTIFIER && t.type!=TokenType.KEYWORD && t.type!=TokenType.REGEX)){ + if (t == null || (t.type != TokenType.IDENTIFIER && t.type != TokenType.KEYWORD && t.type != TokenType.REGEX)) { return false; } - Reference abcIndex=new Reference<>(0); - Reference classIndex=new Reference<>(0); - Reference traitIndex=new Reference<>(0); - Reference multinameIndexRef=new Reference<>(0); - Reference classTrait=new Reference<>(false); - - - if(decompiledTextArea.getPropertyTypeAtPos(pos, abcIndex, classIndex, traitIndex, classTrait,multinameIndexRef)){ + Reference abcIndex = new Reference<>(0); + Reference classIndex = new Reference<>(0); + Reference traitIndex = new Reference<>(0); + Reference multinameIndexRef = new Reference<>(0); + Reference classTrait = new Reference<>(false); + + if (decompiledTextArea.getPropertyTypeAtPos(pos, abcIndex, classIndex, traitIndex, classTrait, multinameIndexRef)) { return true; } int multinameIndex = decompiledTextArea.getMultinameAtPos(pos); if (multinameIndex > -1) { - if(multinameIndex == 0){ + if (multinameIndex == 0) { return false; } List usages = abc.findMultinameDefinition(swf.abcList, multinameIndex); @@ -585,21 +584,20 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se if (!usages.isEmpty()) { return true; } - } + } - return decompiledTextArea.getLocalDeclarationOfPos(pos,new Reference<>("")) != -1; + return decompiledTextArea.getLocalDeclarationOfPos(pos, new Reference<>("")) != -1; } private void gotoDeclaration(int pos) { - Reference abcIndex=new Reference<>(0); - Reference classIndex=new Reference<>(0); - Reference traitIndex=new Reference<>(0); - Reference classTrait=new Reference<>(false); - Reference multinameIndexRef=new Reference<>(0); - - - if(decompiledTextArea.getPropertyTypeAtPos(pos, abcIndex, classIndex, traitIndex, classTrait,multinameIndexRef)){ - UsageFrame.gotoUsage(ABCPanel.this, new TraitMultinameUsage(swf.abcList, swf.abcList.get(abcIndex.getVal()).getABC(), multinameIndexRef.getVal(),classIndex.getVal(), traitIndex.getVal(), classTrait.getVal(), null, -1) { + Reference abcIndex = new Reference<>(0); + Reference classIndex = new Reference<>(0); + Reference traitIndex = new Reference<>(0); + Reference classTrait = new Reference<>(false); + Reference multinameIndexRef = new Reference<>(0); + + if (decompiledTextArea.getPropertyTypeAtPos(pos, abcIndex, classIndex, traitIndex, classTrait, multinameIndexRef)) { + UsageFrame.gotoUsage(ABCPanel.this, new TraitMultinameUsage(swf.abcList, swf.abcList.get(abcIndex.getVal()).getABC(), multinameIndexRef.getVal(), classIndex.getVal(), traitIndex.getVal(), classTrait.getVal(), null, -1) { }); return; } @@ -632,12 +630,12 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se return; } } - - int dpos = decompiledTextArea.getLocalDeclarationOfPos(pos,new Reference<>("")); + + int dpos = decompiledTextArea.getLocalDeclarationOfPos(pos, new Reference<>("")); if (dpos > -1) { decompiledTextArea.setCaretPosition(dpos); } - + } private class CtrlClickHandler extends KeyAdapter implements MouseListener, MouseMotionListener { @@ -860,7 +858,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se } setDecompiledEditMode(false); reload(); - View.showMessageDialog(this, AppStrings.translate("message.action.saved")); + View.showMessageDialog(this, AppStrings.translate("message.action.saved")); } catch (AVM2ParseException ex) { abc.script_info.get(oldIndex).delete(abc, false); decompiledTextArea.gotoLine((int) ex.line); diff --git a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index bae99b95a..e55a43133 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -241,34 +241,34 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL return getMultinameAtPos(getCaretPosition()); } - public int getLocalDeclarationOfPos(int pos,Reference type) { + public int getLocalDeclarationOfPos(int pos, Reference type) { Highlighting sh = Highlighting.search(specialHighlights, pos); Highlighting h = Highlighting.search(highlights, pos); if (h == null) { return -1; } - + List tms = Highlighting.searchAll(methodHighlights, pos, null, null, -1, -1); if (tms.isEmpty()) { return -1; } for (Highlighting tm : tms) { - List tm_tms = Highlighting.searchAll(methodHighlights, -1, "index", tm.getPropertyString("index"), -1, -1); + List tm_tms = Highlighting.searchAll(methodHighlights, -1, "index", tm.getPropertyString("index"), -1, -1); //is it already declaration? if ("true".equals(h.getPropertyString("declaration")) || (sh != null && "true".equals(sh.getPropertyString("declaration")))) { return -1; //no jump } - String lname=h.getPropertyString("localName"); - if("this".equals(lname)){ - Highlighting ch= Highlighting.search(classHighlights, pos); - int cindex=(int)(long)ch.getPropertyLong("index"); - type.setVal(abc.instance_info.get(cindex).getName(abc.constants).getNameWithNamespace(abc.constants, true)); + String lname = h.getPropertyString("localName"); + if ("this".equals(lname)) { + Highlighting ch = Highlighting.search(classHighlights, pos); + int cindex = (int) (long) ch.getPropertyLong("index"); + type.setVal(abc.instance_info.get(cindex).getName(abc.constants).getNameWithNamespace(abc.constants, true)); return ch.startPos; } - + Map search = h.getProperties(); search.remove("index"); search.remove("subtype"); @@ -293,50 +293,51 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL return -1; } - public boolean getPropertyTypeAtPos(int pos, Reference abcIndex,Reference classIndex, Reference traitIndex, Reference classTrait, Reference multinameIndex){ - - int m = getMultinameAtPos(pos,true); + public boolean getPropertyTypeAtPos(int pos, Reference abcIndex, Reference classIndex, Reference traitIndex, Reference classTrait, Reference multinameIndex) { + + int m = getMultinameAtPos(pos, true); if (m <= 0) { return false; } - SyntaxDocument sd=(SyntaxDocument)getDocument(); - Token t = sd.getTokenAt(pos+1); + SyntaxDocument sd = (SyntaxDocument) getDocument(); + Token t = sd.getTokenAt(pos + 1); Token lastToken = t; - Token prev = null; - while(t.type == TokenType.IDENTIFIER || t.type == TokenType.KEYWORD || t.type == TokenType.REGEX){ + Token prev = null; + while (t.type == TokenType.IDENTIFIER || t.type == TokenType.KEYWORD || t.type == TokenType.REGEX) { prev = sd.getPrevToken(t); - if(prev!=null){ - if(!".".equals(prev.getString(sd))){ - break; + if (prev != null) { + if (!".".equals(prev.getString(sd))) { + break; } t = sd.getPrevToken(prev); - }else{ + } else { break; - } + } } - if(t.type != TokenType.IDENTIFIER && t.type != TokenType.KEYWORD || t.type == TokenType.REGEX){ + if (t.type != TokenType.IDENTIFIER && t.type != TokenType.KEYWORD || t.type == TokenType.REGEX) { return false; - } - Reference locTypeRef = new Reference<>(""); - getLocalDeclarationOfPos(t.start,locTypeRef); - String currentType=locTypeRef.getVal(); - if(currentType.equals("*")){ - return false; } - boolean found=false; + Reference locTypeRef = new Reference<>(""); + getLocalDeclarationOfPos(t.start, locTypeRef); + String currentType = locTypeRef.getVal(); + if (currentType.equals("*")) { + return false; + } + boolean found = false; t = sd.getNextToken(t); - while(t!=lastToken && !currentType.equals("*")){ + while (t != lastToken && !currentType.equals("*")) { t = sd.getNextToken(t); - String ident=t.getString(sd); + String ident = t.getString(sd); found = false; - loopi:for(int i=0;i-1){ + int cindex = a.findClassByName(currentType); + if (cindex > -1) { InstanceInfo ii = a.instance_info.get(cindex); - for(int j=0;j(), false /*NOT RAW!*/))){ + if (ident.equals(tr.getName(a).getName(a.constants, new ArrayList(), false /*NOT RAW!*/))) { classIndex.setVal(cindex); abcIndex.setVal(i); traitIndex.setVal(j); @@ -347,11 +348,11 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL break loopi; } } - + ClassInfo ci = a.class_info.get(cindex); - for(int j=0;j(), false /*NOT RAW!*/))){ + if (ident.equals(tr.getName(a).getName(a.constants, new ArrayList(), false /*NOT RAW!*/))) { classIndex.setVal(cindex); abcIndex.setVal(i); traitIndex.setVal(j); @@ -364,22 +365,22 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL } } } - if(!found){ + if (!found) { return false; } - + t = sd.getNextToken(t); - if(!".".equals(t.getString(sd))){ + if (!".".equals(t.getString(sd))) { break; } - } + } return true; } - + public int getMultinameAtPos(int pos) { return getMultinameAtPos(pos, false); } - + public int getMultinameAtPos(int pos, boolean codeOnly) { Highlighting tm = Highlighting.search(methodHighlights, pos); Trait currentTrait = null; @@ -408,11 +409,11 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL lastIns = ins; } if (selIns != null) { - if (!codeOnly && ((selIns.definition instanceof ConstructSuperIns) || (selIns.definition instanceof CallSuperIns)|| (selIns.definition instanceof CallSuperVoidIns))) { + if (!codeOnly && ((selIns.definition instanceof ConstructSuperIns) || (selIns.definition instanceof CallSuperIns) || (selIns.definition instanceof CallSuperVoidIns))) { Highlighting tc = Highlighting.search(classHighlights, pos); - if(tc!=null){ - int cindex = (int)(long)tc.getPropertyLong("index"); - if(cindex>-1){ + if (tc != null) { + int cindex = (int) (long) tc.getPropertyLong("index"); + if (cindex > -1) { return abc.instance_info.get(cindex).super_index; } } @@ -425,21 +426,20 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL } } } - - } - if(codeOnly){ + + } + if (codeOnly) { return -1; } - + Highlighting ch = Highlighting.search(classHighlights, pos); - if(ch!=null){ + if (ch != null) { Highlighting th = Highlighting.search(traitHighlights, pos); if (th != null) { - currentTrait = abc.findTraitByTraitId((int) (long) ch.getPropertyLong("index"), (int) (long) th.getPropertyLong("index")); + currentTrait = abc.findTraitByTraitId((int) (long) ch.getPropertyLong("index"), (int) (long) th.getPropertyLong("index")); } - } - - + } + if (currentTrait instanceof TraitMethodGetterSetter) { currentMethod = ((TraitMethodGetterSetter) currentTrait).method_info; } diff --git a/src/com/jpexs/decompiler/flash/gui/abc/MyMarkers.java b/src/com/jpexs/decompiler/flash/gui/abc/MyMarkers.java index 3fbc5e41b..0fc4830b9 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/MyMarkers.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/MyMarkers.java @@ -32,10 +32,10 @@ import jsyntaxpane.actions.ActionUtils; public class MyMarkers { /** - * Removes only our private highlights - * This is public so that we can remove the highlights when the editorKit - * is unregistered. SimpleMarker can be null, in which case all instances of - * our Markers are removed. + * Removes only our private highlights This is public so that we can remove + * the highlights when the editorKit is unregistered. SimpleMarker can be + * null, in which case all instances of our Markers are removed. + * * @param component the text component whose markers are to be removed * @param marker the SimpleMarker to remove */ diff --git a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java index 8d4659469..af5f686a2 100644 --- a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java @@ -152,7 +152,7 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene SyntaxDocument sDoc = ActionUtils.getSyntaxDocument(decompiledEditor); if (sDoc != null) { - Token t = sDoc.getTokenAt(pos+1); + Token t = sDoc.getTokenAt(pos + 1); String ident = null; //It should be identifier or obfuscated identifier if (t != null && (t.type == TokenType.IDENTIFIER || t.type == TokenType.REGEX)) { diff --git a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTree.java b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTree.java index e2e0ca5bc..9d64e9f7b 100644 --- a/src/com/jpexs/decompiler/flash/gui/tagtree/TagTree.java +++ b/src/com/jpexs/decompiler/flash/gui/tagtree/TagTree.java @@ -167,11 +167,11 @@ public class TagTree extends JTree implements ActionListener { public class TagTreeCellRenderer extends DefaultTreeCellRenderer { private Font plainFont; - + private Font boldFont; - - private Map icons; - + + private final Map icons; + public TagTreeCellRenderer() { setUI(new BasicLabelUI()); setOpaque(false); @@ -187,7 +187,7 @@ public class TagTree extends JTree implements ActionListener { } } } - + @Override public Component getTreeCellRendererComponent( JTree tree, @@ -204,7 +204,7 @@ public class TagTree extends JTree implements ActionListener { hasFocus); TreeItem val = (TreeItem) value; TreeNodeType type = getTreeNodeType(val); - + if (type == TreeNodeType.FOLDER && expanded) { type = TreeNodeType.FOLDER_OPEN; } diff --git a/src/com/sun/jna/platform/win32/Advapi32Util.java b/src/com/sun/jna/platform/win32/Advapi32Util.java index 3e22761ee..a1f3744fa 100644 --- a/src/com/sun/jna/platform/win32/Advapi32Util.java +++ b/src/com/sun/jna/platform/win32/Advapi32Util.java @@ -144,7 +144,7 @@ public abstract class Advapi32Util { */ public static String registryGetStringValue(HKEY root, String key, String value) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -184,7 +184,7 @@ public abstract class Advapi32Util { */ public static String registryGetExpandableStringValue(HKEY root, String key, String value) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -224,7 +224,7 @@ public abstract class Advapi32Util { */ public static String[] registryGetStringArray(HKEY root, String key, String value) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -272,7 +272,7 @@ public abstract class Advapi32Util { */ public static byte[] registryGetBinaryValue(HKEY root, String key, String value) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -312,7 +312,7 @@ public abstract class Advapi32Util { */ public static int registryGetIntValue(HKEY root, String key, String value) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, key, 0, WinNT.KEY_READ | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -417,7 +417,7 @@ public abstract class Advapi32Util { */ public static void registrySetIntValue(HKEY root, String keyPath, String name, int value) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -457,7 +457,7 @@ public abstract class Advapi32Util { */ public static void registrySetStringValue(HKEY root, String keyPath, String name, String value) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -497,7 +497,7 @@ public abstract class Advapi32Util { */ public static void registrySetExpandableStringValue(HKEY root, String keyPath, String name, String value) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -551,7 +551,7 @@ public abstract class Advapi32Util { */ public static void registrySetStringArray(HKEY root, String keyPath, String name, String[] arr) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -589,7 +589,7 @@ public abstract class Advapi32Util { */ public static void registrySetBinaryValue(HKEY root, String keyPath, String name, byte[] data) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -625,7 +625,7 @@ public abstract class Advapi32Util { */ public static void registryDeleteKey(HKEY root, String keyPath, String keyName) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -661,7 +661,7 @@ public abstract class Advapi32Util { */ public static void registryDeleteValue(HKEY root, String keyPath, String valueName) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WRITE | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -712,7 +712,7 @@ public abstract class Advapi32Util { */ public static String[] registryGetKeys(HKEY root, String keyPath) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } @@ -803,7 +803,7 @@ public abstract class Advapi32Util { */ public static TreeMap registryGetValues(HKEY root, String keyPath) { HKEYByReference phkKey = new HKEYByReference(); - int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ| WinNT.KEY_WOW64_32KEY, phkKey); + int rc = Advapi32.INSTANCE.RegOpenKeyEx(root, keyPath, 0, WinNT.KEY_READ | WinNT.KEY_WOW64_32KEY, phkKey); if (rc != W32Errors.ERROR_SUCCESS) { throw new Win32Exception(rc); } diff --git a/src/com/sun/jna/platform/win32/Kernel32.java b/src/com/sun/jna/platform/win32/Kernel32.java index c0e7408cf..72082e7d8 100644 --- a/src/com/sun/jna/platform/win32/Kernel32.java +++ b/src/com/sun/jna/platform/win32/Kernel32.java @@ -299,9 +299,9 @@ public interface Kernel32 extends WinNT { DWORD QueryDosDevice(String lpDeviceName, char[] lpTargetPath, int lenght); boolean VirtualProtectEx(HANDLE hProcess, LPVOID lpAddress, SIZE_T dwSize, int flNewProtect, IntByReference lpflOldProtect); - - + public static final int LOCALE_SISO3166CTRYNAME = 90; public static final int LOCALE_SISO639LANGNAME = 89; - int GetLocaleInfo (int Locale, int LCType, char[] lpLCData, int cchData); + + int GetLocaleInfo(int Locale, int LCType, char[] lpLCData, int cchData); }