diff --git a/antlib/checkstyle-10.12.4-all.jar b/antlib/checkstyle-10.12.4-all.jar new file mode 100644 index 000000000..940791e0e Binary files /dev/null and b/antlib/checkstyle-10.12.4-all.jar differ diff --git a/build.xml b/build.xml index 94fc8df40..936729920 100644 --- a/build.xml +++ b/build.xml @@ -5,7 +5,9 @@ - + + + @@ -20,8 +22,8 @@ - - + + @@ -73,7 +75,17 @@ - + + + + + + + + + + + @@ -539,7 +551,7 @@ - + diff --git a/checkstyle.xml b/checkstyle.xml new file mode 100644 index 000000000..07446ab48 --- /dev/null +++ b/checkstyle.xml @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libsrc/ffdec_lib/lexers/actionscript3_methodinfo.flex b/libsrc/ffdec_lib/lexers/actionscript3_methodinfo.flex index e5cfa0973..aadfa1859 100644 --- a/libsrc/ffdec_lib/lexers/actionscript3_methodinfo.flex +++ b/libsrc/ffdec_lib/lexers/actionscript3_methodinfo.flex @@ -15,7 +15,7 @@ * License along with this library. */ /* Method info lexer specification */ -package com.jpexs.decompiler.flash.abc.methodinfo_parser; +package com.jpexs.decompiler.flash.abc.methodinfoparser; %% diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java index 117e4c306..8b0d0d389 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/BaseLocalData.java @@ -29,8 +29,8 @@ import java.util.Set; public abstract class BaseLocalData { public GraphSourceItem lineStartInstruction; - + public Set allSwitchParts = new HashSet<>(); - + public SecondPassData secondPassData = null; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DecompilerPool.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DecompilerPool.java index 7677de53f..cfbaf5f81 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DecompilerPool.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DecompilerPool.java @@ -207,8 +207,7 @@ public class DecompilerPool { public void shutdown() throws InterruptedException { executor.shutdown(); - if (!executor.awaitTermination(100, TimeUnit.SECONDS)) { - } + executor.awaitTermination(100, TimeUnit.SECONDS); } public void destroySwf(SWF swf) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DeobfuscationListener.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DeobfuscationListener.java index 66a00481f..ee3e30f54 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DeobfuscationListener.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/DeobfuscationListener.java @@ -21,5 +21,6 @@ package com.jpexs.decompiler.flash; * @author JPEXS */ public interface DeobfuscationListener { + public void itemDeobfuscated(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/HarmanDecryption.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/HarmanDecryption.java index c6a4a379e..002428e7c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/HarmanDecryption.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/HarmanDecryption.java @@ -17,7 +17,6 @@ package com.jpexs.decompiler.flash; import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; @@ -67,7 +66,7 @@ public class HarmanDecryption { return ret & 0xffffffffL; } - private static long unpack(byte data[], int start) { + private static long unpack(byte[] data, int start) { return (data[start] & 0xff) + ((long) (data[start + 1] & 0xff) << 8) + ((long) (data[start + 2] & 0xff) << 16) @@ -82,7 +81,7 @@ public class HarmanDecryption { //get the length DataInputStream dais = new DataInputStream(is); - byte encryptedLengthBytes[] = new byte[4]; + byte[] encryptedLengthBytes = new byte[4]; dais.readFully(encryptedLengthBytes); long encryptedLength = unpack(encryptedLengthBytes, 0); int decryptedLength = (int) (encryptedLength ^ key); @@ -91,7 +90,7 @@ public class HarmanDecryption { int paddedLength = (int) (decryptedLength + 0x1F) & ~0x1F; //aes iv - byte aesIV[] = new byte[16]; + byte[] aesIV = new byte[16]; System.arraycopy(header, 0, aesIV, 0, header.length); //header System.arraycopy(encryptedLengthBytes, 0, aesIV, 8, 4); //encrypted length aesIV[12] = (byte) (key & 0xff); @@ -105,11 +104,11 @@ public class HarmanDecryption { // aes key // this one is stored at the end of the file - byte aesKey[] = new byte[32]; - byte data[] = new byte[paddedLength]; + byte[] aesKey = new byte[32]; + byte[] data = new byte[paddedLength]; dais.readFully(data); - byte aesKeyData[] = new byte[32]; + byte[] aesKeyData = new byte[32]; dais.readFully(aesKeyData); for (int i = 0; i < 32; i += 4) { @@ -129,7 +128,7 @@ public class HarmanDecryption { Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, new IvParameterSpec(aesIV)); - byte decryptedData[] = cipher.doFinal(data); + byte[] decryptedData = cipher.doFinal(data); return new ByteArrayInputStream(Arrays.copyOfRange(decryptedData, 0, decryptedLength)); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java index e42014076..03bba6c5d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java @@ -276,7 +276,7 @@ public class IdentifiersDeobfuscation { public static boolean isValidNameWithSlash(String s, String... exceptions) { if (s.contains(":")) { - String pathVar[] = s.split(":"); + String[] pathVar = s.split(":"); if (!isValidSlashPath(pathVar[0], exceptions)) { return false; } @@ -393,7 +393,7 @@ public class IdentifiersDeobfuscation { * @param s Identifier * @param validExceptions Exceptions which are valid (e.g. some reserved * words) - * @return + * @return Printable identifier */ public static String printIdentifier(boolean as3, String s, String... validExceptions) { if (s == null || s.isEmpty()) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/OpenableSourceInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/OpenableSourceInfo.java index bdac5ba65..8e0c75f73 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/OpenableSourceInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/OpenableSourceInfo.java @@ -37,9 +37,9 @@ public class OpenableSourceInfo { private String fileTitle; private final boolean detectBundle; - + private boolean empty = false; - + private OpenableSourceKind kind; public OpenableSourceInfo(String fileTitle) { @@ -49,11 +49,12 @@ public class OpenableSourceInfo { public boolean isEmpty() { return empty; - } - + } + public OpenableSourceInfo(InputStream inputStream, String file, String fileTitle) { this(inputStream, file, fileTitle, true); } + public OpenableSourceInfo(InputStream inputStream, String file, String fileTitle, boolean detectBundle) { this.inputStream = inputStream; this.file = file; @@ -64,7 +65,7 @@ public class OpenableSourceInfo { public OpenableSourceKind getKind() { return kind; - } + } private void detectKind() { if (isBundle()) { @@ -75,7 +76,7 @@ public class OpenableSourceInfo { kind = OpenableSourceKind.SWF; } } - + public InputStream getInputStream() { return inputStream; } @@ -89,7 +90,7 @@ public class OpenableSourceInfo { detectKind(); empty = false; } - + public void setFileTitle(String fileTitle) { this.fileTitle = fileTitle; } @@ -110,7 +111,7 @@ public class OpenableSourceInfo { return file; } - public boolean isBundle() { + public boolean isBundle() { if (inputStream == null && file != null) { File fileObj = new File(file); String fileName = fileObj.getName(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOExResult.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOExResult.java index 537922be6..5fbfb258e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOExResult.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/RunnableIOExResult.java @@ -18,7 +18,7 @@ package com.jpexs.decompiler.flash; /** * - * @param + * @param Type of result * @author JPEXS */ public abstract class RunnableIOExResult implements RunnableIOEx { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWC.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWC.java index 58bbf62dc..2b6c3b498 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWC.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWC.java @@ -69,7 +69,7 @@ public class SWC extends ZippedBundle { }; saxParser.parse(zip, handler); } catch (Exception ex) { - + //ignored } return; } 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 167d332b3..0f85541ca 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -52,7 +52,6 @@ import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; import com.jpexs.decompiler.flash.action.model.FunctionActionItem; import com.jpexs.decompiler.flash.action.model.GetMemberActionItem; import com.jpexs.decompiler.flash.action.model.GetVariableActionItem; -import com.jpexs.decompiler.flash.action.model.SetMemberActionItem; import com.jpexs.decompiler.flash.action.model.clauses.ClassActionItem; import com.jpexs.decompiler.flash.action.model.clauses.InterfaceActionItem; import com.jpexs.decompiler.flash.action.swf4.ActionEquals; @@ -414,8 +413,8 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { private AbcIndexing abcIndex; private int numAbcIndexDependencies = 0; - - private Map> uninitializedAs2ClassTraits = null; + + private volatile Map> uninitializedAs2ClassTraits = null; private static AbcIndexing playerGlobalAbcIndex; @@ -1110,7 +1109,6 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { * Saves this SWF into new file * * @param os OutputStream to save SWF in - * @throws IOException */ @Override public void saveTo(OutputStream os) throws IOException { @@ -1165,16 +1163,16 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { return ret; } - private byte[] saveToByteArray(boolean includeImported) throws IOException { - return saveToByteArray(gfx, includeImported); - } - private void checkCharset() { if (version > 5) { charset = Utf8Helper.charsetName; } } + private byte[] saveToByteArray(boolean includeImported) throws IOException { + return saveToByteArray(gfx, includeImported); + } + private byte[] saveToByteArray(boolean gfx, boolean includeImported) throws IOException { byte[] data; try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); SWFOutputStream sos = new SWFOutputStream(baos, version, charset)) { @@ -1201,109 +1199,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { } return data; - } - - /** - * Compress SWF file - * - * @param is InputStream - * @param os OutputStream to save SWF in - * @param compression - * @param lzmaProperties - * @throws IOException - */ - private static void compress(InputStream is, OutputStream os, SWFCompression compression, byte[] lzmaProperties) throws IOException { - byte[] hdr = new byte[8]; - - is.mark(8); - - // SWFheader: signature, version and fileSize - if (is.read(hdr) != 8) { - throw new SwfOpenException("SWF header is too short"); - } - - boolean uncompressed = hdr[0] == 'F' || hdr[0] == 'G'; // FWS or GFX - if (!uncompressed) { - // fisrt decompress, then compress to the given format - is.reset(); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - decompress(is, baos, false); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - compress(bais, os, compression, lzmaProperties); - return; - } - - boolean gfx = hdr[1] == 'F' && hdr[2] == 'X'; - int version = hdr[3]; - long fileSize; - try (SWFInputStream sis = new SWFInputStream(null, Arrays.copyOfRange(hdr, 4, 8), 4, 4)) { - fileSize = sis.readUI32("fileSize"); - } - - SWFOutputStream sos = new SWFOutputStream(os, version, Utf8Helper.charsetName); - sos.write(getHeaderBytes(compression, gfx)); - sos.writeUI8(version); - sos.writeUI32(fileSize); - - if (compression == SWFCompression.LZMA || compression == SWFCompression.LZMA_ABC) { - long uncompressedLength = fileSize - 8; - Encoder enc = new Encoder(); - if (lzmaProperties == null) { - // todo: the bytes are from a sample swf - lzmaProperties = new byte[]{93, 0, 0, 32, 0}; - } - - int val = lzmaProperties[0] & 0xFF; - int lc = val % 9; - int remainder = val / 9; - int lp = remainder % 5; - int pb = remainder / 5; - int dictionarySize = 0; - for (int i = 0; i < 4; i++) { - dictionarySize += ((int) (lzmaProperties[1 + i]) & 0xFF) << (i * 8); - } - if (Configuration.lzmaFastBytes.get() > 0) { - enc.SetNumFastBytes(Configuration.lzmaFastBytes.get()); - } - enc.SetDictionarySize(dictionarySize); - enc.SetLcLpPb(lc, lp, pb); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - enc.SetEndMarkerMode(true); - enc.Code(is, baos, -1, -1, null); - byte[] data = baos.toByteArray(); - if (compression == SWFCompression.LZMA) { - byte[] udata = new byte[4]; - udata[0] = (byte) (data.length & 0xFF); - udata[1] = (byte) ((data.length >> 8) & 0xFF); - udata[2] = (byte) ((data.length >> 16) & 0xFF); - udata[3] = (byte) ((data.length >> 24) & 0xFF); - os.write(udata); - } - enc.WriteCoderProperties(os); - if (compression == SWFCompression.LZMA_ABC) { - byte[] udata = new byte[8]; - udata[0] = (byte) (uncompressedLength & 0xFF); - udata[1] = (byte) ((uncompressedLength >> 8) & 0xFF); - udata[2] = (byte) ((uncompressedLength >> 16) & 0xFF); - udata[3] = (byte) ((uncompressedLength >> 24) & 0xFF); - udata[4] = (byte) ((uncompressedLength >> 32) & 0xFF); - udata[5] = (byte) ((uncompressedLength >> 40) & 0xFF); - udata[6] = (byte) ((uncompressedLength >> 48) & 0xFF); - udata[7] = (byte) ((uncompressedLength >> 56) & 0xFF); - os.write(udata); - } - os.write(data); - } else if (compression == SWFCompression.ZLIB) { - DeflaterOutputStream dos = new DeflaterOutputStream(os); - try { - Helper.copyStream(is, dos); - } finally { - dos.finish(); - } - } else { - Helper.copyStream(is, os); - } - } + } @Override public boolean isModified() { @@ -1366,8 +1262,6 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { * * @param is Stream to read SWF from * @param parallelRead Use parallel threads? - * @throws IOException - * @throws java.lang.InterruptedException */ public SWF(InputStream is, boolean parallelRead) throws IOException, InterruptedException { this(is, null, null, null, parallelRead, false, true); @@ -1382,9 +1276,6 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { * * @param is Stream to read SWF from * @param parallelRead Use parallel threads? - * @param lazy - * @throws IOException - * @throws java.lang.InterruptedException */ public SWF(InputStream is, boolean parallelRead, boolean lazy) throws IOException, InterruptedException { this(is, null, null, null, parallelRead, false, lazy); @@ -1401,8 +1292,6 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { * @param file Path to the file * @param fileTitle Title of the SWF * @param parallelRead Use parallel threads? - * @throws IOException - * @throws java.lang.InterruptedException */ public SWF(InputStream is, String file, String fileTitle, boolean parallelRead) throws IOException, InterruptedException { this(is, file, fileTitle, null, parallelRead, false, true); @@ -1416,10 +1305,8 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { * Construct SWF from stream * * @param is Stream to read SWF from - * @param listener + * @param listener Progress listener * @param parallelRead Use parallel threads? - * @throws IOException - * @throws java.lang.InterruptedException */ public SWF(InputStream is, ProgressListener listener, boolean parallelRead) throws IOException, InterruptedException { this(is, null, null, listener, parallelRead, false, true); @@ -1435,10 +1322,8 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { * @param is Stream to read SWF from * @param file Path to the file * @param fileTitle Title of the SWF - * @param listener + * @param listener Progress listener * @param parallelRead Use parallel threads? - * @throws IOException - * @throws java.lang.InterruptedException */ public SWF(InputStream is, String file, String fileTitle, ProgressListener listener, boolean parallelRead) throws IOException, InterruptedException { this(is, file, fileTitle, listener, parallelRead, false, true); @@ -1450,9 +1335,6 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { /** * Faster constructor to check SWF only - * - * @param is - * @throws java.io.IOException */ public SWF(InputStream is) throws IOException { decompress(is, new NulStream(), true); @@ -1471,23 +1353,23 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { } public SWF(InputStream is, String file, String fileTitle, ProgressListener listener, boolean parallelRead, boolean checkOnly, boolean lazy, UrlResolver resolver, String charset) throws IOException, InterruptedException { - this(is, file, fileTitle, listener, parallelRead,checkOnly, lazy, resolver, charset, true); - } + this(is, file, fileTitle, listener, parallelRead, checkOnly, lazy, resolver, charset, true); + } + /** * Construct SWF from stream * * @param is Stream to read SWF from * @param file Path to the file * @param fileTitle Title of the SWF - * @param listener + * @param listener Progress listener * @param parallelRead Use parallel threads? * @param checkOnly Check only file validity - * @param lazy + * @param lazy Lazy load * @param resolver Resolver for imported tags * @param charset Character set for all texts (for older SWF versions) - * @param allowRenameIdentifiers Allow auto renaming identifiers when enabled - * @throws IOException - * @throws java.lang.InterruptedException + * @param allowRenameIdentifiers Allow auto renaming identifiers when + * enabled */ public SWF(InputStream is, String file, String fileTitle, ProgressListener listener, boolean parallelRead, boolean checkOnly, boolean lazy, UrlResolver resolver, String charset, boolean allowRenameIdentifiers) throws IOException, InterruptedException { this.file = file; @@ -1539,7 +1421,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { assignClassesToSymbols(); if (Configuration.autoLoadEmbeddedSwfs.get()) { loadAllEmbeddedSwfs(); - } + } SWFDecompilerPlugin.fireSwfParsed(this); } else { boolean hasNonUnknownTag = false; @@ -1567,8 +1449,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { getASMs(true); // Add scriptNames to ASMs } - private void loadAllEmbeddedSwfs() - { + private void loadAllEmbeddedSwfs() { for (Tag t : getTags()) { if (t instanceof DefineBinaryDataTag) { DefineBinaryDataTag binaryData = (DefineBinaryDataTag) t; @@ -1576,7 +1457,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { } } } - + private void resolveImported(UrlResolver resolver) { for (int p = 0; p < tags.size(); p++) { Tag t = tags.get(p); @@ -1835,9 +1716,8 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { /** * Gets title of this SWF incuding parent nodes like SwfList and - * DefineBinaryData + * DefineBinaryData. * - * @return */ @Override public String getShortPathTitle() { @@ -1854,9 +1734,8 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { /** * Gets full path title of this SWF incuding parent nodes like SwfList and - * DefineBinaryData + * DefineBinaryData. * - * @return */ @Override public String getFullPathTitle() { @@ -1889,6 +1768,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { } } } catch (SecurityException sex) { + //ignored } return new Date(); @@ -1934,16 +1814,16 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { public void assignClassesToSymbols() { HashMap> classes = new HashMap<>(); - + for (int ch : importedTagToClassesMapping.keySet()) { classes.put(ch, new LinkedHashSet<>(importedTagToClassesMapping.get(ch))); } - + Set uniqueClasses = new HashSet<>(); for (Tag t : getTags()) { if (t instanceof SymbolClassTag) { SymbolClassTag sct = (SymbolClassTag) t; - for (int i = 0; i < sct.tags.size(); i++) { + for (int i = 0; i < sct.tags.size(); i++) { if (!classes.containsKey(sct.tags.get(i))) { classes.put(sct.tags.get(i), new LinkedHashSet<>()); } @@ -1964,25 +1844,124 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { continue; } if (classes.containsKey(ct.getCharacterId())) { - ct.setClassNames(classes.get((Integer)ct.getCharacterId())); + ct.setClassNames(classes.get((Integer) ct.getCharacterId())); } } } classToCharacter.clear(); for (int ch : classes.keySet()) { - for (String cls:classes.get(ch)) { + for (String cls : classes.get(ch)) { classToCharacter.put(cls, ch); } } } + + /** + * Compress SWF file + * + * @param is InputStream + * @param os OutputStream to save SWF in + */ + private static void compress(InputStream is, OutputStream os, SWFCompression compression, byte[] lzmaProperties) throws IOException { + byte[] hdr = new byte[8]; + + is.mark(8); + + // SWFheader: signature, version and fileSize + if (is.read(hdr) != 8) { + throw new SwfOpenException("SWF header is too short"); + } + + boolean uncompressed = hdr[0] == 'F' || hdr[0] == 'G'; // FWS or GFX + if (!uncompressed) { + // fisrt decompress, then compress to the given format + is.reset(); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + decompress(is, baos, false); + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + compress(bais, os, compression, lzmaProperties); + return; + } + + boolean gfx = hdr[1] == 'F' && hdr[2] == 'X'; + int version = hdr[3]; + long fileSize; + try (SWFInputStream sis = new SWFInputStream(null, Arrays.copyOfRange(hdr, 4, 8), 4, 4)) { + fileSize = sis.readUI32("fileSize"); + } + + SWFOutputStream sos = new SWFOutputStream(os, version, Utf8Helper.charsetName); + sos.write(getHeaderBytes(compression, gfx)); + sos.writeUI8(version); + sos.writeUI32(fileSize); + + if (compression == SWFCompression.LZMA || compression == SWFCompression.LZMA_ABC) { + long uncompressedLength = fileSize - 8; + Encoder enc = new Encoder(); + if (lzmaProperties == null) { + // todo: the bytes are from a sample swf + lzmaProperties = new byte[]{93, 0, 0, 32, 0}; + } + + int val = lzmaProperties[0] & 0xFF; + int lc = val % 9; + int remainder = val / 9; + int lp = remainder % 5; + int pb = remainder / 5; + int dictionarySize = 0; + for (int i = 0; i < 4; i++) { + dictionarySize += ((int) (lzmaProperties[1 + i]) & 0xFF) << (i * 8); + } + if (Configuration.lzmaFastBytes.get() > 0) { + enc.SetNumFastBytes(Configuration.lzmaFastBytes.get()); + } + enc.SetDictionarySize(dictionarySize); + enc.SetLcLpPb(lc, lp, pb); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + enc.SetEndMarkerMode(true); + enc.Code(is, baos, -1, -1, null); + byte[] data = baos.toByteArray(); + if (compression == SWFCompression.LZMA) { + byte[] udata = new byte[4]; + udata[0] = (byte) (data.length & 0xFF); + udata[1] = (byte) ((data.length >> 8) & 0xFF); + udata[2] = (byte) ((data.length >> 16) & 0xFF); + udata[3] = (byte) ((data.length >> 24) & 0xFF); + os.write(udata); + } + enc.WriteCoderProperties(os); + if (compression == SWFCompression.LZMA_ABC) { + byte[] udata = new byte[8]; + udata[0] = (byte) (uncompressedLength & 0xFF); + udata[1] = (byte) ((uncompressedLength >> 8) & 0xFF); + udata[2] = (byte) ((uncompressedLength >> 16) & 0xFF); + udata[3] = (byte) ((uncompressedLength >> 24) & 0xFF); + udata[4] = (byte) ((uncompressedLength >> 32) & 0xFF); + udata[5] = (byte) ((uncompressedLength >> 40) & 0xFF); + udata[6] = (byte) ((uncompressedLength >> 48) & 0xFF); + udata[7] = (byte) ((uncompressedLength >> 56) & 0xFF); + os.write(udata); + } + os.write(data); + } else if (compression == SWFCompression.ZLIB) { + DeflaterOutputStream dos = new DeflaterOutputStream(os); + try { + Helper.copyStream(is, dos); + } finally { + dos.finish(); + } + } else { + Helper.copyStream(is, os); + } + } /** * Compress SWF file * * @param fis Input stream * @param fos Output stream - * @param compression + * @param compression Compression type * @return True on success */ public static boolean compress(InputStream fis, OutputStream fos, SWFCompression compression) { @@ -1992,23 +1971,11 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { return false; } return true; - } - - public static boolean decompress(InputStream fis, OutputStream fos) { - try { - decompress(fis, fos, false); - return true; - } catch (IOException ex) { - return false; - } - } + } /** * Decrypts Harman AIR encryption - * @param is - * @param os - * @return - * @throws IOException + * */ public static boolean decrypt(InputStream is, OutputStream os) throws IOException { byte[] hdr = new byte[8]; @@ -2017,9 +1984,9 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { if (is.read(hdr) != 8) { throw new SwfOpenException(AppResources.translate("error.swf.headerTooShort")); } - + decodeHeader(hdr); - + switch (hdr[0]) { case 'c': case 'z': @@ -2032,7 +1999,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { return true; } catch (IOException | InvalidAlgorithmParameterException | InvalidKeyException | NoSuchAlgorithmException | BadPaddingException | IllegalBlockSizeException | NoSuchPaddingException ex) { throw new SwfOpenException(AppResources.translate("error.swf.decryptionProblem")); - } + } } return false; } @@ -2065,6 +2032,15 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { header.gfx = headerData[1] == 'F' && headerData[2] == 'X'; return header; } + + public static boolean decompress(InputStream fis, OutputStream fos) { + try { + decompress(fis, fos, false); + return true; + } catch (IOException ex) { + return false; + } + } private static SWFHeader decompress(InputStream is, OutputStream os, boolean allowUncompressed) throws IOException { @@ -2344,7 +2320,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { if (treeItem instanceof AS2Package) { AS2Package pkg = (AS2Package) treeItem; if (pkg.isFlat()) { - String parts[] = pkg.toString().split("\\."); + String[] parts = pkg.toString().split("\\."); for (int i = 0; i < parts.length; i++) { parts[i] = Helper.makeFileName(parts[i]); } @@ -2489,7 +2465,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { val >>= 8; } } - + public static void createWavFromPcmData(OutputStream fos, int soundRateHz, boolean soundSize, boolean soundType, byte[] data) throws IOException { ByteArrayOutputStream subChunk1Data = new ByteArrayOutputStream(); int audioFormat = 1; // PCM @@ -3173,22 +3149,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { return new AffineTransform(mat.getScaleXFloat(), mat.getRotateSkew0Float(), mat.getRotateSkew1Float(), mat.getScaleYFloat(), mat.translateX, mat.translateY); - } - - public SerializableImage getFromCache(String key) { - if (frameCache.contains(key)) { - return frameCache.get(key); - } - return null; - } - - public byte[] getFromCache(SOUNDINFO soundInfo, SoundTag soundTag) { - SoundInfoSoundCacheEntry key = new SoundInfoSoundCacheEntry(soundInfo, soundTag); - if (soundCache.contains(key)) { - return soundCache.get(key); - } - return null; - } + } public void putToCache(String key, SerializableImage img) { if (Configuration.useFrameCache.get()) { @@ -3290,6 +3251,17 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { swf.as3Cache.remove(pack); } } + } + + public static boolean isActionListCached(ASMSource src) { + if (src != null) { + SWF swf = src.getSwf(); + if (swf != null) { + return swf.as2Cache.isPCodeCached(src); + } + } + + return false; } public static boolean isCached(ASMSource src) { @@ -3303,17 +3275,6 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { return false; } - public static boolean isActionListCached(ASMSource src) { - if (src != null) { - SWF swf = src.getSwf(); - if (swf != null) { - return swf.as2Cache.isPCodeCached(src); - } - } - - return false; - } - public static boolean isCached(ScriptPack pack) { if (pack != null) { Openable openable = pack.getOpenable(); @@ -3336,18 +3297,22 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { return null; } - - public static ActionList getActionListFromCache(ASMSource src) { - if (src != null) { - SWF swf = src.getSwf(); - if (swf != null) { - return swf.as2Cache.getPCode(src); - } + + public SerializableImage getFromCache(String key) { + if (frameCache.contains(key)) { + return frameCache.get(key); } - return null; } + public byte[] getFromCache(SOUNDINFO soundInfo, SoundTag soundTag) { + SoundInfoSoundCacheEntry key = new SoundInfoSoundCacheEntry(soundInfo, soundTag); + if (soundCache.contains(key)) { + return soundCache.get(key); + } + return null; + } + public static HighlightedText getFromCache(ScriptPack pack) { if (pack != null) { Openable openable = pack.getOpenable(); @@ -3360,6 +3325,17 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { return null; } + public static ActionList getActionListFromCache(ASMSource src) { + if (src != null) { + SWF swf = src.getSwf(); + if (swf != null) { + return swf.as2Cache.getPCode(src); + } + } + + return null; + } + public static ActionList getCachedActionList(ASMSource src, final List listeners) throws InterruptedException { synchronized (src) { SWF swf = src.getSwf(); @@ -3534,6 +3510,14 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { return image; } + + + public boolean removeCharacterFromTimeline(int characterId, Timeline timeline, TagRemoveListener listener) { + Set chars = new HashSet<>(); + chars.add(characterId); + return removeTagWithDependenciesFromTimeline(null, timeline, chars, listener); + } + private void removeTagWithDependenciesFromTimeline(Tag toRemove, Timeline timeline, TagRemoveListener listener) { Set dependingChars = new HashSet<>(); if (toRemove instanceof CharacterTag) { @@ -3546,12 +3530,6 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { removeTagWithDependenciesFromTimeline(toRemove, timeline, dependingChars, listener); } - public boolean removeCharacterFromTimeline(int characterId, Timeline timeline, TagRemoveListener listener) { - Set chars = new HashSet<>(); - chars.add(characterId); - return removeTagWithDependenciesFromTimeline(null, timeline, chars, listener); - } - private boolean removeTagWithDependenciesFromTimeline(Tag toRemove, Timeline timeline, Set dependingChars, TagRemoveListener listener) { Map stage = new HashMap<>(); Timelined timelined = timeline.timelined; @@ -3723,8 +3701,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { timelined.removeTag(tag); timelined.setModified(true); timelined.resetTimeline(); - } else // timeline should be always the swf here - if (removeDependencies) { + } else if (removeDependencies) { // timeline should be always the swf here removeTagWithDependenciesFromTimeline(tag, timelined.getTimeline(), listener); timelined.setModified(true); } else { @@ -3756,8 +3733,6 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { /** * Adds a tag to the SWF - * - * @param tag */ @Override public void addTag(Tag tag) { @@ -3768,31 +3743,13 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { /** * Adds a tag to the SWF - * - * @param index - * @param tag */ @Override public void addTag(int index, Tag tag) { setModified(true); tags.add(index, tag); updateCharacters(); - } - - /** - * Replaces a tag in the SWF - * - * @param oldTag - * @param newTag - */ - public void replaceTag(Tag oldTag, Tag newTag) { - setModified(true); - int index = tags.indexOf(oldTag); - if (index != -1) { - tags.set(index, newTag); - updateCharacters(); - } - } + } public int indexOfTag(Tag tag) { return tags.indexOf(tag); @@ -3937,39 +3894,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { ((Tag) tag).setModified(true); } - } - - /** - * Enables debugging. Adds tags to enable debugging and optinally injects - * debugline and debugfile instructions to AS3 code by decompiling it first - * - * @param injectAS3Code Modify AS3 code with debugfile / debugline ? - * @param decompileDir Directory to virtual decompile (will affect - * debugfile) - */ - public void enableDebugging(boolean injectAS3Code, File decompileDir) throws InterruptedException { - enableDebugging(injectAS3Code, decompileDir, false); - } - - /** - * Enables debugging. Adds tags to enable debugging. - */ - public void enableDebugging() throws InterruptedException { - enableDebugging(false, null, false); - } - - /** - * Enables debugging. Adds tags to enable debugging and injects debugline - * and debugfile instructions to AS3 code. Optionally enables Telemetry - * - * @param injectAS3Code Modify AS3 code with debugfile / debugline ? - * @param decompileDir Directory to virtual decompile (will affect - * debugfile) - * @param telemetry Enable telemetry info? - */ - public void enableDebugging(boolean injectAS3Code, File decompileDir, boolean telemetry) throws InterruptedException { - enableDebugging(injectAS3Code, decompileDir, telemetry, false); - } + } /** * Injects debugline and debugfile instructions to AS3 P-code (lines of @@ -4011,6 +3936,38 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { } } + /** + * Enables debugging. Adds tags to enable debugging and optinally injects + * debugline and debugfile instructions to AS3 code by decompiling it first + * + * @param injectAS3Code Modify AS3 code with debugfile / debugline ? + * @param decompileDir Directory to virtual decompile (will affect + * debugfile) + */ + public void enableDebugging(boolean injectAS3Code, File decompileDir) throws InterruptedException { + enableDebugging(injectAS3Code, decompileDir, false); + } + + /** + * Enables debugging. Adds tags to enable debugging. + */ + public void enableDebugging() throws InterruptedException { + enableDebugging(false, null, false); + } + + /** + * Enables debugging. Adds tags to enable debugging and injects debugline + * and debugfile instructions to AS3 code. Optionally enables Telemetry + * + * @param injectAS3Code Modify AS3 code with debugfile / debugline ? + * @param decompileDir Directory to virtual decompile (will affect + * debugfile) + * @param telemetry Enable telemetry info? + */ + public void enableDebugging(boolean injectAS3Code, File decompileDir, boolean telemetry) throws InterruptedException { + enableDebugging(injectAS3Code, decompileDir, telemetry, false); + } + /** * Enables debugging. Adds tags to enable debugging and injects debugline * and debugfile instructions to AS3 code. Optionally enables Telemetry @@ -4481,6 +4438,19 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { return null; } + /** + * Replaces a tag in the SWF + */ + @Override + public void replaceTag(Tag oldTag, Tag newTag) { + setModified(true); + int index = tags.indexOf(oldTag); + if (index != -1) { + tags.set(index, newTag); + updateCharacters(); + } + } + @Override public void replaceTag(int index, Tag newTag) { removeTag(index); @@ -4567,7 +4537,7 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { public OpenableList getOpenableList() { return openableList; } - + public void calculateAs2UninitializedClassTraits() { uninitializedAs2ClassTraits = new HashMap<>(); UninitializedClassFieldsDetector detector = new UninitializedClassFieldsDetector(); @@ -4579,5 +4549,5 @@ public final class SWF implements SWFContainerItem, Timelined, Openable { calculateAs2UninitializedClassTraits(); } return uninitializedAs2ClassTraits; - } + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFHeader.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFHeader.java index f19021e26..4270b20bc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFHeader.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFHeader.java @@ -46,7 +46,7 @@ public class SWFHeader { * ScaleForm GFx */ public boolean gfx = false; - + /** * Harman SWF Encryption */ 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 0b26d534f..add17862d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -328,7 +328,7 @@ public class SWFInputStream implements AutoCloseable { } return swf.getCharset(); } - + public void addPercentListener(ProgressListener listener) { listeners.add(listener); } @@ -369,7 +369,7 @@ public class SWFInputStream implements AutoCloseable { this.swf = swf; this.startingPos = startingPos; this.data = data; - this.limit = limit; + this.limit = limit; is = new MemoryInputStream(data, 0, limit); } @@ -516,7 +516,7 @@ public class SWFInputStream implements AutoCloseable { baos.write(r); } } - + /** * Reads one netstring (length + string) value from the stream * @@ -608,7 +608,7 @@ public class SWFInputStream implements AutoCloseable { } return uval; } - + /** * Reads one SI16 (Signed 16bit integer) value from the stream * @@ -622,7 +622,7 @@ public class SWFInputStream implements AutoCloseable { endDumpLevel(uval); return uval; } - + private int readSI16Internal() throws IOException { int uval = readEx() + (readEx() << 8); if (uval >= 0x8000) { @@ -669,7 +669,7 @@ public class SWFInputStream implements AutoCloseable { public double readFIXED(String name) throws IOException { newDumpLevel(name, "FIXED"); long si = readSI32Internal(); - double ret = si / (double)(1 << 16); + double ret = si / (double) (1 << 16); endDumpLevel(ret); return ret; } @@ -684,7 +684,7 @@ public class SWFInputStream implements AutoCloseable { public float readFIXED8(String name) throws IOException { newDumpLevel(name, "FIXED8"); int si = readSI16Internal(); - float ret = si / (float)(1 << 8); + float ret = si / (float) (1 << 8); endDumpLevel(ret); return ret; } @@ -3089,9 +3089,9 @@ public class SWFInputStream implements AutoCloseable { } /** - * Reads one MORPHFOCALGRADIENT value from the stream + * Reads one MORPHFOCALGRADIENT value from the stream. * - * This is undocumented feature + *

This is undocumented feature * * @param name * @return MORPHGRADIENT value 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 5d9f0365f..2908b7f00 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFOutputStream.java @@ -106,7 +106,7 @@ public class SWFOutputStream extends OutputStream { private int bitPos = 0; private int tempByte = 0; - + private String charset; public long getPos() { @@ -206,7 +206,7 @@ public class SWFOutputStream extends OutputStream { byte[] data = value.getBytes(charset); writeUI8(data.length); write(data); - } + } /** * Writes UI32 (Unsigned 32bit integer) value to the stream @@ -501,31 +501,7 @@ public class SWFOutputStream extends OutputStream { for (Tag tag : tags) { tag.writeTag(this); } - } - - /** - * Calculates number of bits needed for representing unsigned value - * - * @param value Unsigned value - * @return Number of bits - */ - public static int getNeededBitsU(int value) { - if (value == 0) { - return 0; - } - - value = Math.abs(value); - long x = 1; - int nBits; - - for (nBits = 1; nBits <= 64; nBits++) { - x <<= 1; - if (x > value) { - break; - } - } - return nBits; - } + } /** * Calculates number of bits needed for representing signed value @@ -559,6 +535,30 @@ public class SWFOutputStream extends OutputStream { } return nBits; } + + /** + * Calculates number of bits needed for representing unsigned value + * + * @param value Unsigned value + * @return Number of bits + */ + public static int getNeededBitsU(int value) { + if (value == 0) { + return 0; + } + + value = Math.abs(value); + long x = 1; + int nBits; + + for (nBits = 1; nBits <= 64; nBits++) { + x <<= 1; + if (x > value) { + break; + } + } + return nBits; + } public static int getNeededBitsU(int first, int... params) { int nBits = 0; @@ -1654,9 +1654,9 @@ public class SWFOutputStream extends OutputStream { } /** - * Writes MORPHFOCALGRADIENT value to the stream + * Writes MORPHFOCALGRADIENT value to the stream. * - * Undocumented feature + *

Undocumented feature * * @param value MORPHGRADIENT value * @param shapeNum 1 in DefineMorphShape, 2 in DefineMorphShape2,... diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSearch.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSearch.java index ace7dbbd7..214c3beb2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSearch.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFSearch.java @@ -76,7 +76,7 @@ public class SWFSearch { @Override public void status(String status) { - } + } }, "FWS".getBytes(), // Uncompressed Flash "CWS".getBytes(), // ZLib compressed Flash @@ -86,8 +86,8 @@ public class SWFSearch { "fWS".getBytes(), //Harman encrypted uncompressed Flash, "cWS".getBytes(), //Harman encrypted ZLib compressed Flash, "zWS".getBytes() //Harman encrypted LZMA compressed Flash - ); - + ); + int pos = 0; long biggestSize = 0; long smallestSize = Long.MAX_VALUE; @@ -137,6 +137,7 @@ public class SWFSearch { } catch (OutOfMemoryError ome) { Helper.freeMem(); } catch (Exception | Error ex) { + //ignored } } setProgress(100); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java index b59262798..d7b5ee0b7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SourceGeneratorLocalData.java @@ -69,7 +69,7 @@ public class SourceGeneratorLocalData implements Serializable { public List scopeStack = new ArrayList<>(); public ScriptInfo currentScript; - + public int scriptIndex; public boolean subMethod = false; @@ -84,7 +84,7 @@ public class SourceGeneratorLocalData implements Serializable { public List> catchesOpenedLoops = new ArrayList<>(); public List catchesTempRegs = new ArrayList<>(); - + public boolean secondRun = false; public String getFullClass() { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/TagRemoveListener.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/TagRemoveListener.java index c7f78a2bf..a4dd717dc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/TagRemoveListener.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/TagRemoveListener.java @@ -23,5 +23,6 @@ import com.jpexs.decompiler.flash.tags.Tag; * @author JPEXS */ public interface TagRemoveListener { + public void tagRemoved(Tag tag); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ValueTooLargeException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ValueTooLargeException.java index fbb63b68f..f97f0058d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ValueTooLargeException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/ValueTooLargeException.java @@ -21,8 +21,9 @@ package com.jpexs.decompiler.flash; * @author JPEXS */ public class ValueTooLargeException extends IllegalArgumentException { + private final String type; - private final Object value; + private final Object value; public ValueTooLargeException(String type, Object value) { super("Value is too large for " + type + ": " + value); @@ -37,5 +38,5 @@ public class ValueTooLargeException extends IllegalArgumentException { public Object getValue() { return value; } - + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java index 85170562e..caf525559 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -50,13 +50,13 @@ import com.jpexs.decompiler.flash.abc.usages.ClassNameMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.ConstVarNameMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.ConstVarTypeMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.DefinitionUsage; -import com.jpexs.decompiler.flash.abc.usages.SuperClassMultinameUsage; -import com.jpexs.decompiler.flash.abc.usages.SuperInterfaceMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.MethodBodyMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.MethodNameMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.MethodParamsMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.MethodReturnTypeMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.MultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.SuperClassMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.SuperInterfaceMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.TraitMultinameUsage; import com.jpexs.decompiler.flash.abc.usages.TypeNameMultinameUsage; import com.jpexs.decompiler.flash.dumpview.DumpInfo; @@ -72,7 +72,6 @@ import com.jpexs.decompiler.flash.treeitems.Openable; import com.jpexs.decompiler.flash.treeitems.OpenableList; import com.jpexs.decompiler.flash.types.annotations.Internal; import com.jpexs.decompiler.graph.DottedChain; -import com.jpexs.helpers.Reference; import com.jpexs.helpers.utf8.Utf8PrintWriter; import java.io.File; import java.io.IOException; @@ -1961,7 +1960,7 @@ public class ABC implements Openable { getSwf().clearScriptCache(); getMethodIndexing(); getSwf().getAbcIndex().refreshAbc(this); - + fireChanged(); } @@ -2054,17 +2053,17 @@ public class ABC implements Openable { //Method Info for (int i = 0; i < secondABC.method_info.size(); i++) { MethodInfo secondMethodInfo = secondABC.method_info.get(i); - int newParamTypes[] = new int[secondMethodInfo.param_types.length]; + int[] newParamTypes = new int[secondMethodInfo.param_types.length]; for (int t = 0; t < secondMethodInfo.param_types.length; t++) { newParamTypes[t] = mergeMultinameMap.get(secondMethodInfo.param_types[t]); } - int newParamNames[] = new int[secondMethodInfo.paramNames.length]; + int[] newParamNames = new int[secondMethodInfo.paramNames.length]; for (int n = 0; n < secondMethodInfo.paramNames.length; n++) { newParamNames[n] = mergeStringMap.get(secondMethodInfo.paramNames[n]); } int newRetType = mergeMultinameMap.get(secondMethodInfo.ret_type); int newNameIndex = mergeStringMap.get(secondMethodInfo.name_index); - ValueKind newOptional[] = new ValueKind[secondMethodInfo.optional.length]; + ValueKind[] newOptional = new ValueKind[secondMethodInfo.optional.length]; for (int k = 0; k < secondMethodInfo.optional.length; k++) { int vkind = secondMethodInfo.optional[k].value_kind; Map valueMergeMap = null; @@ -2175,7 +2174,7 @@ public class ABC implements Openable { } AVM2Code newCode = newBody.getCode(); for (AVM2Instruction newIns : newCode.code) { - int newOperands[] = newIns.operands == null ? null : newIns.operands.clone(); + int[] newOperands = newIns.operands == null ? null : newIns.operands.clone(); boolean modified = false; if (newIns.operands != null) { for (int i = 0; i < newIns.definition.operands.length; i++) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java index a7517b22f..123a0d16d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java @@ -34,7 +34,6 @@ import com.jpexs.decompiler.flash.abc.types.traits.Traits; import com.jpexs.decompiler.flash.dumpview.DumpInfo; import com.jpexs.decompiler.flash.dumpview.DumpInfoSpecial; import com.jpexs.decompiler.flash.dumpview.DumpInfoSpecialType; -import com.jpexs.helpers.Helper; import com.jpexs.helpers.MemoryInputStream; import com.jpexs.helpers.utf8.Utf8Helper; import java.io.ByteArrayOutputStream; @@ -524,7 +523,7 @@ public class ABCInputStream implements AutoCloseable { stringDataBuffer = new byte[newLength]; } - safeRead(length, stringDataBuffer); + safeRead(length, stringDataBuffer); String r = Utf8Helper.decode(stringDataBuffer, 0, length); endDumpLevel(r); return r; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOpenException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOpenException.java index 6b0e6766c..481056eee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOpenException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOpenException.java @@ -25,9 +25,9 @@ import java.io.IOException; public class ABCOpenException extends IOException { public ABCOpenException(String message) { - super(message); + super(message); } - + public ABCOpenException(String message, Throwable cause) { super(message, cause); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java index 4303c0124..912f7219c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java @@ -47,14 +47,14 @@ public class ABCOutputStream extends OutputStream { public long getPosition() { return position; - } - + } + @Override public void write(int b) throws IOException { os.write(b); position++; } - + @Override public void write(byte[] data) throws IOException { super.write(data); @@ -66,7 +66,7 @@ public class ABCOutputStream extends OutputStream { super.write(b, off, len); position += len; } - + public void writeU30(long value) throws IOException { writeS32(value); /*boolean loop = true; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java index 8d403b46e..ba943de4e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/AVM2LocalData.java @@ -50,19 +50,19 @@ public class AVM2LocalData extends BaseLocalData { public HashMap localRegs; public ScopeStack scopeStack; - + public ScopeStack localScopeStack; public MethodBody methodBody; - + public List callStack; public ABC abc; - + public AbcIndexing abcIndex; public HashMap localRegNames; - + public HashMap localRegTypes; public List fullyQualifiedNames; @@ -92,11 +92,11 @@ public class AVM2LocalData extends BaseLocalData { public Map defaultParts = new HashMap<>(); public Map switchedRegs = new HashMap<>(); - + public Map pushDefaultPart = new HashMap<>(); public Map finallyKinds = new HashMap<>(); - + /** * exception index -> switch throw part */ @@ -112,7 +112,7 @@ public class AVM2LocalData extends BaseLocalData { public HashMap localRegAssignmentIps; public Integer ip; - + public AVM2Code code; public boolean thisHasDefaultToPrimitive; @@ -126,7 +126,7 @@ public class AVM2LocalData extends BaseLocalData { public boolean inGetLoops = false; public Set seenMethods = new HashSet<>(); - + public AVM2LocalData() { } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java index d09a102d4..045d1e6e8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ScriptPack.java @@ -34,7 +34,6 @@ import com.jpexs.decompiler.flash.abc.types.traits.Trait; import com.jpexs.decompiler.flash.abc.types.traits.TraitClass; import com.jpexs.decompiler.flash.abc.types.traits.TraitFunction; import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter; -import com.jpexs.decompiler.flash.abc.types.traits.Traits; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; import com.jpexs.decompiler.flash.exporters.settings.ScriptExportSettings; @@ -116,7 +115,7 @@ public class ScriptPack extends AS3ClassTreeItem { this.path = path; this.allABCs = allAbcs; } - + public DottedChain getPathPackage() { DottedChain packageName = DottedChain.TOPLEVEL; for (int t : traitIndices) { @@ -182,15 +181,14 @@ public class ScriptPack extends AS3ClassTreeItem { }*/ writer.mark(); List callStack = new ArrayList<>(); - callStack.add(abc.bodies.get(sinit_bodyIndex)); - abc.bodies.get(sinit_bodyIndex).convert(callStack, abcIndex, convertData, path +/*packageName +*/ "/.scriptinitializer", exportMode, true, sinit_index, scriptIndex, -1, abc, null, new ScopeStack(), GraphTextWriter.TRAIT_SCRIPT_INITIALIZER, writer, new ArrayList<>(), abc.script_info.get(scriptIndex).traits, true, new HashSet<>()); - scriptInitializerIsEmpty = !writer.getMark(); - + callStack.add(abc.bodies.get(sinit_bodyIndex)); + abc.bodies.get(sinit_bodyIndex).convert(callStack, abcIndex, convertData, path + "/.scriptinitializer", exportMode, true, sinit_index, scriptIndex, -1, abc, null, new ScopeStack(), GraphTextWriter.TRAIT_SCRIPT_INITIALIZER, writer, new ArrayList<>(), abc.script_info.get(scriptIndex).traits, true, new HashSet<>()); + scriptInitializerIsEmpty = !writer.getMark(); + } ScopeStack scopeStack = new ScopeStack(); scopeStack.push(new GlobalAVM2Item(null, null)); - - + for (int t : traitIndices) { Trait trait = traits.get(t); Multiname name = trait.getName(abc); @@ -208,8 +206,7 @@ public class ScriptPack extends AS3ClassTreeItem { //script initializer int script_init = abc.script_info.get(scriptIndex).init_index; int bodyIndex = abc.findBodyIndex(script_init); - - + if (!isSimple && traitIndices.isEmpty()) { for (Trait t : abc.script_info.get(scriptIndex).traits.traits) { String fullName = t.getName(abc).getNameWithNamespace(abc.constants, false).toPrintableString(true); @@ -217,7 +214,7 @@ public class ScriptPack extends AS3ClassTreeItem { } writer.newLine(); } - + if (bodyIndex != -1 && (isSimple || traitIndices.isEmpty())) { //Note: There must be trait/method highlight even if the initializer is empty to TraitList in GUI to work correctly //TODO: handle this better in GUI(?) @@ -227,8 +224,8 @@ public class ScriptPack extends AS3ClassTreeItem { if (!scriptInitializerIsEmpty) { writer.startBlock(); List callStack = new ArrayList<>(); - callStack.add(abc.bodies.get(bodyIndex)); - abc.bodies.get(bodyIndex).toString(callStack, abcIndex, path +/*packageName +*/ "/.scriptinitializer", exportMode, abc, null, writer, new ArrayList<>(), new HashSet<>()); + callStack.add(abc.bodies.get(bodyIndex)); + abc.bodies.get(bodyIndex).toString(callStack, abcIndex, path + "/.scriptinitializer", exportMode, abc, null, writer, new ArrayList<>(), new HashSet<>()); writer.endBlock(); } else { writer.append(""); @@ -239,7 +236,7 @@ public class ScriptPack extends AS3ClassTreeItem { if (!scriptInitializerIsEmpty) { writer.newLine(); first = false; - } + } } for (int t : traitIndices) { @@ -250,7 +247,7 @@ public class ScriptPack extends AS3ClassTreeItem { Trait trait = traits.get(t); //if (!(trait instanceof TraitClass)) { - writer.startTrait(t); + writer.startTrait(t); //} Multiname name = trait.getName(abc); int nskind = name.getSimpleNamespaceKind(abc.constants); @@ -259,8 +256,7 @@ public class ScriptPack extends AS3ClassTreeItem { } else { trait.toString(abcIndex, null, convertData, "", abc, false, exportMode, scriptIndex, -1, writer, new ArrayList<>(), parallel, false); } - if (!(trait instanceof TraitClass)) - { + if (!(trait instanceof TraitClass)) { writer.endTrait(); } first = false; @@ -367,7 +363,7 @@ public class ScriptPack extends AS3ClassTreeItem { } return abc.script_info.get(scriptIndex).isModified(); } - + public void clearModified() { if (scriptIndex >= abc.script_info.size()) { return; @@ -376,8 +372,9 @@ public class ScriptPack extends AS3ClassTreeItem { } /** - * Injects debugfile, debugline instructions into the code + * Injects debugfile, debugline instructions into the code. * + *

* Based on idea of Jacob Thompson * http://securityevaluators.com/knowledge/flash/ */ @@ -396,7 +393,7 @@ public class ScriptPack extends AS3ClassTreeItem { for (int i = 0; i < txt.length(); i++) { blk: - { + while (true) { Highlighting sh = Highlighting.searchPos(decompiled.getSpecialHighlights(), i); Highlighting cls = Highlighting.searchPos(decompiled.getClassHighlights(), i); @@ -479,6 +476,7 @@ public class ScriptPack extends AS3ClassTreeItem { bodyToRegToLine.get(bodyIndex).put(regIndex, line); } } + break; } if (txt.charAt(i) == '\n') { line++; @@ -589,7 +587,7 @@ public class ScriptPack extends AS3ClassTreeItem { for (int i = 0; i < txt.length(); i++) { blk: - { + while (true) { Highlighting sh = Highlighting.searchPos(decompiled.getSpecialHighlights(), i); Highlighting cls = Highlighting.searchPos(decompiled.getClassHighlights(), i); @@ -618,6 +616,7 @@ public class ScriptPack extends AS3ClassTreeItem { } } bodyToIdentifier.put(bodyIndex, "abc:" + abcIndex + ",script:" + scriptIndex + ",class:" + classIndex + ",trait:" + traitIndex + ",method:" + methodIndex + ",body:" + bodyIndex); + break; } } } catch (InterruptedException ex) { 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 8b491e6fc..082201b93 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 @@ -129,6 +129,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal2Ins; import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal3Ins; import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocalIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocalTypeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.BkptIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.BkptLineIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.DeletePropertyIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.FindDefIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.FindPropertyIns; @@ -137,6 +139,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetDescendantsIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetGlobalScopeIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetGlobalSlotIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetLexIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetOuterScopeIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetPropertyIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetScopeObjectIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetSlotIns; @@ -156,55 +159,50 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetPropertyIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetSlotIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetSuperIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ThrowIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.AbsJumpIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.AddDIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.TimestampIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.AddPIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.AllocIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.BkptIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.BkptLineIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.CallInterfaceIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.CallSuperIdIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.CodeGenOpIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceBIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceDIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceIIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceUIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.ConcatIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.ConvertF4Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.ConvertFIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.ConvertMIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.ConvertMPIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.DecLocalPIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DecodeIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.DecrementPIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DelDescendantsIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DeletePropertyLateIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.DividePIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DoubleToAtomIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.FindPropGlobalIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetOuterScopeIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.IncLocalPIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.IncrementPIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.InvalidIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.Lf32x4Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.MarkIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.ModuloPIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.MultiplyPIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.NegatePIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.PrologueIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.PushConstantIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.PushDNanIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.PushDecimalIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.SubtractPIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceBIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceDIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.deprecated.CoerceUIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.ConvertF4Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.ConvertFIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.Lf32x4Ins; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.PushFloat4Ins; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.PushFloatIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.Sf32x4Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.UnPlusIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.AbsJumpIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.AddDIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.AllocIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.CallInterfaceIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.CallSuperIdIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.CodeGenOpIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.ConcatIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DecodeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DelDescendantsIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DeletePropertyLateIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.DoubleToAtomIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.InvalidIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.MarkIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.PrologueIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.PushConstantIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.SendEnterIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.SetPropertyLateIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.Sf32x4Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.decimalsupport.SubtractPIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.SweepIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.TimestampIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.floatsupport.UnPlusIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.VerifyOpIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.VerifyPassIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.unknown.WbIns; @@ -231,6 +229,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.types.AsTypeIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.types.AsTypeLateIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceAIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceSIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.types.ConvertBIns; @@ -278,7 +277,6 @@ import com.jpexs.decompiler.flash.abc.types.ConvertData; import com.jpexs.decompiler.flash.abc.types.MethodBody; import com.jpexs.decompiler.flash.abc.types.MethodInfo; import com.jpexs.decompiler.flash.abc.types.Multiname; -import com.jpexs.decompiler.flash.abc.types.ValueKind; import com.jpexs.decompiler.flash.abc.types.traits.Trait; import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; import com.jpexs.decompiler.flash.abc.types.traits.Traits; @@ -442,7 +440,8 @@ public class AVM2Code implements Cloneable { {"setlocal0", "setlocal_0"}, {"setlocal1", "setlocal_1"}, {"setlocal2", "setlocal_2"}, - {"setlocal3", "setlocal_3"},}; + {"setlocal3", "setlocal_3"} + }; public static final Map instructionAliases = new HashMap<>(); static { @@ -714,7 +713,8 @@ public class AVM2Code implements Cloneable { /*0xFC*/ new SweepIns(), /*0xFD*/ new CodeGenOpIns(), /*0xFE*/ new VerifyOpIns(), - /*0xFF*/ new DecodeIns(),}; + /*0xFF*/ new DecodeIns() + }; // endoflist static { @@ -726,11 +726,9 @@ public class AVM2Code implements Cloneable { instructionSet[opCode] = allInstructionSet[i]; } else if (instructionSet[opCode].hasFlag(AVM2InstructionFlag.NO_FLASH_PLAYER) && !allInstructionSet[i].hasFlag(AVM2InstructionFlag.NO_FLASH_PLAYER)) { instructionSet[opCode] = allInstructionSet[i]; - } //Prefer without decimal: - else if (instructionSet[opCode].hasFlag(AVM2InstructionFlag.ES4_NUMERICS_MINOR) && !allInstructionSet[i].hasFlag(AVM2InstructionFlag.ES4_NUMERICS_MINOR)) { + } else if (instructionSet[opCode].hasFlag(AVM2InstructionFlag.ES4_NUMERICS_MINOR) && !allInstructionSet[i].hasFlag(AVM2InstructionFlag.ES4_NUMERICS_MINOR)) { //Prefer without decimal: instructionSet[opCode] = allInstructionSet[i]; - } //Prefer without float: - else if (instructionSet[opCode].hasFlag(AVM2InstructionFlag.FLOAT_MAJOR) && !allInstructionSet[i].hasFlag(AVM2InstructionFlag.FLOAT_MAJOR)) { + } else if (instructionSet[opCode].hasFlag(AVM2InstructionFlag.FLOAT_MAJOR) && !allInstructionSet[i].hasFlag(AVM2InstructionFlag.FLOAT_MAJOR)) { //Prefer without float: instructionSet[opCode] = allInstructionSet[i]; } } @@ -949,8 +947,7 @@ public class AVM2Code implements Cloneable { address = unAdresses.remove(0); handleJumps = false; } - if (address < startPos) // no jump outside block - { + if (address < startPos) { // no jump outside block continue; } try { @@ -1159,6 +1156,7 @@ public class AVM2Code implements Cloneable { cos.write(instruction.getBytes()); } } catch (IOException ex) { + //ignored } return bos.toByteArray(); } @@ -1430,14 +1428,14 @@ public class AVM2Code implements Cloneable { AVM2Instruction ins = code.get(code.size() - 1); return (int) (ins.getAddress() + ins.getBytesLength()); - } + } private int toSourceCount = 0; public Map getLocalRegNamesFromDebug(ABC abc, int maxRegs) { Map regIndexToName = new HashMap<>(); Map regNameToIndex = new HashMap<>(); - + Set reservedRegNames = new HashSet<>(); for (int i = 0; i < maxRegs; i++) { reservedRegNames.add(String.format(Configuration.registerNameFormat.get(), i)); @@ -1447,14 +1445,14 @@ public class AVM2Code implements Cloneable { if (ins.definition instanceof DebugIns) { if (ins.operands[0] == 1) { String v = abc.constants.getString(ins.operands[1]); - + if (reservedRegNames.contains(v)) { //do not allow reassigning reserved _loc%d_ format to other local regs continue; } - - int regIndex = ins.operands[2] + 1; - + + int regIndex = ins.operands[2] + 1; + // Same name already exists, it may be wrong names inserted by obfuscator if (regNameToIndex.containsKey(v)) { int existingIndex = regNameToIndex.get(v); @@ -1471,7 +1469,7 @@ public class AVM2Code implements Cloneable { // TODO: Make this immune to using existing multinames (?) return regIndexToName; - } + } public int getIpThroughJumpAndDebugLine(int ip) { if (code.isEmpty()) { @@ -1625,7 +1623,7 @@ public class AVM2Code implements Cloneable { if (code.get(ip + plus + 4).definition instanceof PopScopeIns) { if (code.get(ip + plus + 3).definition instanceof SetPropertyIns) { functionName = abc.constants.getMultiname(code.get(ip + plus + 3).operands[0]).getName(abc.constants, fullyQualifiedNames, true, true); - localScopeStack.pop();// with + localScopeStack.pop(); // with output.remove(output.size() - 1); // with ip = ip + plus + 4; // +1 below } @@ -1762,14 +1760,14 @@ public class AVM2Code implements Cloneable { } else if (assignment.value instanceof GetLexAVM2Item) { vtype = assignment.value.returnType(); } - + boolean isNull = false; if (vtype.equals(new TypeItem(DottedChain.NULL))) { vtype = TypeItem.UNBOUNDED; isNull = true; } - if (declaredRegisters[reg] == null) { + if (declaredRegisters[reg] == null) { declaredRegisters[reg] = new DeclarationAVM2Item(assignment, vtype); if (assignment instanceof SetTypeAVM2Item) { ((SetTypeAVM2Item) assignment).setDeclaration(declaredRegisters[reg]); @@ -1782,7 +1780,7 @@ public class AVM2Code implements Cloneable { declaredRegisters[reg].type = vtype; declaredRegisters[reg].typeIsNull = isNull; } else if (declaredRegisters[reg].type == TypeItem.UNBOUNDED) { - + //empty } else if (!declaredRegisters[reg].type.equals(vtype)) { //already declared with different type declaredRegisters[reg].type = TypeItem.UNBOUNDED; } @@ -2088,7 +2086,7 @@ public class AVM2Code implements Cloneable { if ((ss.slotObject instanceof GlobalAVM2Item) && (initializerType == GraphTextWriter.TRAIT_SCRIPT_INITIALIZER)) { for (Trait t : initTraits.traits) { if (t instanceof TraitSlotConst) { - TraitSlotConst tsc = (TraitSlotConst)t; + TraitSlotConst tsc = (TraitSlotConst) t; if (tsc.slot_id == ss.slotIndex) { GraphTargetItem value = ss.value; if (value != null && !convertData.assignedValues.containsKey(tsc)) { @@ -2173,7 +2171,7 @@ public class AVM2Code implements Cloneable { } break; } - } + } } } else { // In obfuscated code, SetLocal instructions comes first @@ -2293,13 +2291,7 @@ public class AVM2Code implements Cloneable { target = ins.getAddress() + ins.operands[k]; ins.operands[k] = updater.updateOperandOffset(ins.getAddress(), target, ins.operands[k]); } - } else /*for (int j = 0; j < ins.definition.operands.length; j++) { - if (ins.definition.operands[j] == AVM2Code.DAT_OFFSET) { - long target = ins.offset + ins.getBytes().length + ins.operands[j]; - ins.operands[j] = updater.updateOperandOffset(target, ins.operands[j]); - } - }*/ //Faster, but not so universal - if (ins.definition instanceof IfTypeIns) { + } else if (ins.definition instanceof IfTypeIns) { long target = ins.getTargetAddress(); try { ins.operands[0] = updater.updateOperandOffset(ins.getAddress(), target, ins.operands[0]); @@ -2419,20 +2411,7 @@ public class AVM2Code implements Cloneable { }, body); code.remove(pos); //checkValidOffsets(body); - } - - /** - * Inserts instruction at specified point. Handles offsets properly. Note: - * If newinstruction is jump, the offset operand must be handled properly by - * caller. All old jump offsets to pos are targeted before new instruction. - * - * @param pos Position in the list - * @param instruction Instruction False means before new instruction - * @param body Method body (used for try handling) - */ - public void insertInstruction(int pos, AVM2Instruction instruction, MethodBody body) { - insertInstruction(pos, instruction, false, body); - } + } /** * Replaces instruction by another. Properly handles offsets. Note: If @@ -2475,6 +2454,19 @@ public class AVM2Code implements Cloneable { code.set(pos, instruction); } + /** + * Inserts instruction at specified point. Handles offsets properly. Note: + * If newinstruction is jump, the offset operand must be handled properly by + * caller. All old jump offsets to pos are targeted before new instruction. + * + * @param pos Position in the list + * @param instruction Instruction False means before new instruction + * @param body Method body (used for try handling) + */ + public void insertInstruction(int pos, AVM2Instruction instruction, MethodBody body) { + insertInstruction(pos, instruction, false, body); + } + /** * Inserts instruction at specified point. Handles offsets properly. Note: * If newinstruction is jump, the offset operand must be handled properly by @@ -2745,7 +2737,7 @@ public class AVM2Code implements Cloneable { return stats; } - private void visitCode(int ip, int lastIp, HashMap> refs) throws InterruptedException { + private void visitCode(int ip, int lastIp, HashMap> refs) throws InterruptedException { Queue toVisit = new LinkedList<>(); Queue toVisitLast = new LinkedList<>(); toVisit.add(ip); @@ -2784,6 +2776,7 @@ public class AVM2Code implements Cloneable { ip = adr2pos(pos2adr(ip) + ins.operands[0]); continue; } catch (ConvertException ex) { + //ignored } } if (ins.definition instanceof JumpIns) { @@ -2803,10 +2796,10 @@ public class AVM2Code implements Cloneable { } ip++; } - }; + } } - public HashMap> visitCode(MethodBody body) throws InterruptedException { + public HashMap> visitCode(MethodBody body) throws InterruptedException { HashMap> refs = new HashMap<>(); for (int i = 0; i < code.size(); i++) { refs.put(i, new ArrayList<>()); @@ -2836,7 +2829,7 @@ public class AVM2Code implements Cloneable { public int removeDeadCode(MethodBody body) throws InterruptedException { return removeDeadCode(body, new Reference<>(-1)); } - + public int removeDeadCode(MethodBody body, Reference minChangedIpRef) throws InterruptedException { HashMap> refs = visitCode(body); int cnt = 0; @@ -2867,7 +2860,7 @@ public class AVM2Code implements Cloneable { removeIgnored(body); minChangedIpRef.setVal(minChangedIp); - + return cnt; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2ConstantPool.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2ConstantPool.java index 7b7698aa5..d3b04d597 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2ConstantPool.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2ConstantPool.java @@ -36,7 +36,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.logging.Level; import java.util.logging.Logger; /** @@ -88,27 +87,26 @@ public class AVM2ConstantPool implements Cloneable { @Internal public Map dottedChainCache = new HashMap<>(); - + @Internal public Map multinameWithNamespaceCache = new HashMap<>(); - public DottedChain getCachedMultinameWithNamespace(Multiname multiName) { return multinameWithNamespaceCache.get(multiName); } - + public void cacheMultinameWithNamespace(Multiname multiName, DottedChain multinameWithNamespace) { multinameWithNamespaceCache.put(multiName, multinameWithNamespace); } - + public void clearCachedMultinames() { multinameWithNamespaceCache.clear(); } - + public void clearCachedDottedChains() { dottedChainCache.clear(); } - + private void ensureDefault(List list) { if (list.isEmpty()) { list.add(null); @@ -216,7 +214,7 @@ public class AVM2ConstantPool implements Cloneable { public synchronized int addUInt(long value) { ensureDefault(constant_uint); - value &= 0xffffffffl; + value &= 0xffffffffL; constant_uint.add(value); return constant_uint.size() - 1; } @@ -362,14 +360,6 @@ public class AVM2ConstantPool implements Cloneable { return constant_decimal.get(index); } - public int getDecimalId(Decimal val, boolean add) { - int id = getDecimalId(val); - if (add && id == -1) { - id = addDecimal(val); - } - return id; - } - public Float getFloat(int index) { return constant_float.get(index); } @@ -472,38 +462,18 @@ public class AVM2ConstantPool implements Cloneable { return getNamespaceId(kind, nameIndex, index, add); } - private int getIntId(int value) { - return constant_int.indexOf(value); - } - - private int getUIntId(long value) { - return constant_uint.indexOf(value); - } - - private int getDoubleId(double value) { - return constant_double.indexOf(value); - } - - private int getFloatId(float value) { - return constant_float.indexOf(value); - } - - private int getFloat4Id(Float4 value) { - return constant_float4.indexOf(value); + public int getDecimalId(Decimal val, boolean add) { + int id = getDecimalId(val); + if (add && id == -1) { + id = addDecimal(val); + } + return id; } private int getDecimalId(Decimal value) { return constant_decimal.indexOf(value); } - private int getStringId(String value) { - return constant_string.indexOf(value); - } - - private int getMultinameId(Multiname value) { - return constant_multiname.indexOf(value); - } - public int getQnameId(String name, int namespaceKind, String namespaceName, boolean add) { return getMultinameId(Multiname.createQName(false, getStringId(name, add), getNamespaceId(namespaceKind, namespaceName, 0, add)), add); } @@ -512,6 +482,10 @@ public class AVM2ConstantPool implements Cloneable { return getQnameId(name, Namespace.KIND_PACKAGE, "", add); } + private int getMultinameId(Multiname value) { + return constant_multiname.indexOf(value); + } + public int getMultinameId(Multiname val, boolean add) { int id = getMultinameId(val); if (add && id == -1) { @@ -538,6 +512,10 @@ public class AVM2ConstantPool implements Cloneable { return ret; } + private int getStringId(String value) { + return constant_string.indexOf(value); + } + public int getStringId(String val, boolean add) { if (val == null) { return 0; @@ -557,6 +535,10 @@ public class AVM2ConstantPool implements Cloneable { return getStringId(val.toRawString(), add); } + private int getIntId(int value) { + return constant_int.indexOf(value); + } + public int getIntId(int val, boolean add) { int id = getIntId(val); if (add && id == -1) { @@ -597,6 +579,10 @@ public class AVM2ConstantPool implements Cloneable { return id; } + private int getUIntId(long value) { + return constant_uint.indexOf(value); + } + public int getUIntId(long val, boolean add) { int id = getUIntId(val); if (add && id == -1) { @@ -605,6 +591,10 @@ public class AVM2ConstantPool implements Cloneable { return id; } + private int getDoubleId(double value) { + return constant_double.indexOf(value); + } + public int getDoubleId(double val, boolean add) { int id = getDoubleId(val); if (add && id == -1) { @@ -613,6 +603,10 @@ public class AVM2ConstantPool implements Cloneable { return id; } + private int getFloatId(float value) { + return constant_float.indexOf(value); + } + public int getFloatId(float val, boolean add) { int id = getFloatId(val); if (add && id == -1) { @@ -621,6 +615,10 @@ public class AVM2ConstantPool implements Cloneable { return id; } + private int getFloat4Id(Float4 value) { + return constant_float4.indexOf(value); + } + public int getFloat4Id(Float4 val, boolean add) { int id = getFloat4Id(val); if (add && id == -1) { @@ -796,7 +794,7 @@ public class AVM2ConstantPool implements Cloneable { Namespace secondNamespace = secondPool.constant_namespace.get(i); int mappedId; int newNameIndex = stringMap.get(secondNamespace.name_index); - if (secondNamespace.kind == Namespace.KIND_PRIVATE) {//always add, this does not exists in this ABC. Conflicting private namespaces can have same names. + if (secondNamespace.kind == Namespace.KIND_PRIVATE) { //always add, this does not exists in this ABC. Conflicting private namespaces can have same names. mappedId = addNamespace(secondNamespace.kind, newNameIndex); } else { mappedId = getNamespaceId(secondNamespace.kind, newNameIndex, 0, true); @@ -806,7 +804,7 @@ public class AVM2ConstantPool implements Cloneable { namespaceSetMap.put(0, 0); for (int i = 1; i < secondPool.constant_namespace_set.size(); i++) { NamespaceSet secondNamespaceSet = secondPool.constant_namespace_set.get(i); - int mappedsNss[] = new int[secondNamespaceSet.namespaces.length]; + int[] mappedsNss = new int[secondNamespaceSet.namespaces.length]; for (int n = 0; n < secondNamespaceSet.namespaces.length; n++) { mappedsNss[n] = namespaceMap.get(secondNamespaceSet.namespaces[n]); } @@ -854,7 +852,7 @@ public class AVM2ConstantPool implements Cloneable { break; case Multiname.TYPENAME: int newQnameIndex = multinameMap.get(secondMultiname.qname_index); - int newParams[] = new int[secondMultiname.params.length]; + int[] newParams = new int[secondMultiname.params.length]; for (int p = 0; p < secondMultiname.params.length; p++) { newParams[p] = multinameMap.get(secondMultiname.params[p]); } @@ -867,7 +865,7 @@ public class AVM2ConstantPool implements Cloneable { } } - + public void checkCyclicTypeNames() { for (int i = 0; i < constant_multiname.size(); i++) { Multiname.checkTypeNameCyclic(this, i); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java index 84c156382..f27e56b4e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java @@ -138,7 +138,7 @@ public class AVM2Deobfuscation { newName = namesMap.get(sChain); return constants.getStringId(newName.toRawString(), true); //constants.setString(strIndex, newName.toRawString()); } - + List ret = new ArrayList<>(); for (int p = 0; p < sChain.size(); p++) { String part = sChain.get(p); @@ -150,7 +150,7 @@ public class AVM2Deobfuscation { } newName = new DottedChain(ret); namesMap.put(sChain, newName); - + if (stringUsages.contains(strIndex)) { strIndex = constants.addString(newName.toRawString()); } else { @@ -193,15 +193,15 @@ public class AVM2Deobfuscation { newname = namesMap.get(sChain); return constants.getStringId(newname, true); } - + String str = fooString(namesMap, constants.getString(strIndex), firstUppercase, stringUsageTypes.get(strIndex), renameType, false); newname = DottedChain.parseNoSuffix(str); - + if (stringUsages.contains(strIndex) || namespaceUsages.contains(strIndex)) { // this name is already referenced as String String usageType = stringUsageTypes.get(strIndex); strIndex = constants.addString(s); // add new index - stringUsageTypes.put(strIndex, usageType); - } + stringUsageTypes.put(strIndex, usageType); + } constants.setString(strIndex, newname.toRawString()); if (!namesMap.containsKey(sChain)) { namesMap.put(sChain, DottedChain.parseNoSuffix(constants.getString(strIndex))); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2FinalProcessLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2FinalProcessLocalData.java index 50507b213..44c3df279 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2FinalProcessLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2FinalProcessLocalData.java @@ -38,7 +38,7 @@ public class AVM2FinalProcessLocalData extends FinalProcessLocalData { this.localRegNames = localRegNames; this.setLocalPosToGetLocalPos = setLocalPosToGetLocalPos; } - + public Set getSetLocalUsages(int setLocalPos) { if (setLocalPosToGetLocalPos == null) { return new HashSet<>(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorGroupParts.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorGroupParts.java index a44968438..504a59604 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorGroupParts.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorGroupParts.java @@ -37,68 +37,68 @@ import java.util.Map; public class AVM2DeobfuscatorGroupParts extends SWFDecompilerAdapter { /* - blk_1 - jump A - B: - blk_2 - jump C -A: blk_3 - jump B -C: blk_4 + blk_1 + jump A + B: + blk_2 + jump C +A: blk_3 + jump B +C: blk_4 -=> - jump A -A: jump B -B: jump C - blk_1 - blk_3 - blk_2 - blk_4 +=> + jump A +A: jump B +B: jump C + blk_1 + blk_3 + blk_2 + blk_4 ---------------------- - blk_1 - jump A - B: - blk_2 - jump C -A: blk_3 - if B - blk_5 -C: blk_4 + blk_1 + jump A + B: + blk_2 + jump C +A: blk_3 + if B + blk_5 +C: blk_4 => - jump A + jump A B: - blk_2 - jump C -A: blk_1 - blk_3 - if B - blk_5 + blk_2 + jump C +A: blk_1 + blk_3 + if B + blk_5 C: - blk_4 + blk_4 ---------------------- - blk_1 - jump A - B: - blk_2 - if C -A: blk_3 - jump B -C: blk_4 + blk_1 + jump A + B: + blk_2 + if C +A: blk_3 + jump B +C: blk_4 => - blk_1 - jump A - B: - blk_3 - blk_2 - if C -A: jump B -C: blk_4 + blk_1 + jump A + B: + blk_3 + blk_2 + if C +A: jump B +C: blk_4 */ @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegisters.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegisters.java index febbf373a..0fa77cf3d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegisters.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegisters.java @@ -266,7 +266,7 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple { if (ins.definition instanceof JumpIns) { long address = ins.getTargetAddress(); - idx = code.adr2pos(address);//code.indexOf(code.getByAddress(address)); + idx = code.adr2pos(address); if (idx == -1) { throw new TranslateException("Jump target not found: " + address); } @@ -299,17 +299,17 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple { public int adr2pos(long adr) { return code.adr2pos(adr); } + + @Override + public int adr2pos(long adr, boolean nearest) { + return code.adr2pos(adr, nearest); + } @Override public long pos2adr(int pos) { return code.pos2adr(pos); } - @Override - public int adr2pos(long adr, boolean nearest) { - return code.adr2pos(adr, nearest); - } - @Override public Set getImportantAddresses() { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegistersOld.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegistersOld.java index 8ae31df42..eee48d14f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegistersOld.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorRegistersOld.java @@ -273,7 +273,7 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld { if (ins.definition instanceof JumpIns) { long address = ins.getTargetAddress(); - idx = code.adr2pos(address);//code.indexOf(code.getByAddress(address)); + idx = code.adr2pos(address); if (idx == -1) { throw new TranslateException("Jump target not found: " + address); } @@ -306,18 +306,18 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld { public int adr2pos(long adr) { return code.adr2pos(adr); } - - @Override - public long pos2adr(int pos) { - return code.pos2adr(pos); - } - + @Override public int adr2pos(long adr, boolean nearest) { return code.adr2pos(adr, nearest); } + @Override + public long pos2adr(int pos) { + return code.pos2adr(pos); + } + @Override public Set getImportantAddresses() { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimple.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimple.java index 23a3577db..44ad19b83 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimple.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimple.java @@ -128,7 +128,6 @@ public class AVM2DeobfuscatorSimple extends AVM2DeobfuscatorZeroJumpsNullPushes return false; } - protected void initLocalRegs(LocalDataArea localData, int localReservedCount, int maxRegs, boolean executeFromFirst) { for (int i = 0; i < localReservedCount; i++) { localData.localRegisters.put(i, NotCompileTime.INSTANCE); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimpleOld.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimpleOld.java index b0e4bbef0..f3df08685 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimpleOld.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorSimpleOld.java @@ -177,7 +177,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush if (Thread.currentThread().isInterrupted()) { throw new InterruptedException(); } - + localData.scopeStack.clear(); localData.localScopeStack.clear(); localData.localRegs.clear(); @@ -231,7 +231,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush FixItemCounterTranslateStack stack = new FixItemCounterTranslateStack(""); int instructionsProcessed = 0; - + int minChangedIp = Integer.MAX_VALUE; endIdx = code.code.size() - 1; @@ -256,7 +256,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush } } } else */ - { + if (true) { // do not throw EmptyStackException, much faster int requiredStackSize = ins.getStackPopCount(localData); if (stack.size() < requiredStackSize) { @@ -277,11 +277,15 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush if (fins.definition instanceof NewFunctionIns) { int fidx = code.code.indexOf(fins); code.removeInstruction(fidx, body); - if (fidx < minChangedIp) minChangedIp = fidx; + if (fidx < minChangedIp) { + minChangedIp = fidx; + } } int nidx = code.code.indexOf(ins); code.removeInstruction(nidx, body); - if (nidx < minChangedIp) minChangedIp = nidx; + if (nidx < minChangedIp) { + minChangedIp = nidx; + } if (nins == null) { idx = code.code.size(); } else { @@ -304,7 +308,9 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush int regId = ((SetLocalTypeIns) def).getRegisterId(ins); staticRegs.put(regId, localData.localRegs.get(regId).getNotCoerced()); code.replaceInstruction(idx, new AVM2Instruction(0, DeobfuscatePopIns.getInstance(), null), body); - if (idx < minChangedIp) minChangedIp = idx; + if (idx < minChangedIp) { + minChangedIp = idx; + } importantOffsets.clear(); importantOffsets.addAll(code.getImportantOffsets(body, false)); @@ -325,7 +331,9 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush } code.replaceInstruction(idx, pushins, body); - if (idx < minChangedIp) minChangedIp = idx; + if (idx < minChangedIp) { + minChangedIp = idx; + } stack.push(staticRegs.get(regId)); ins = pushins; def = ins.definition; @@ -392,8 +400,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush || def instanceof DebugLineIns || def instanceof DebugFileIns || def instanceof DebugIns - || def instanceof NopIns - ) { + || def instanceof NopIns) { ok = true; } @@ -429,7 +436,9 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush boolean ifed = false; if (def instanceof PopIns) { code.replaceInstruction(idx, new AVM2Instruction(ins.getAddress(), DeobfuscatePopIns.getInstance(), null), body); - if (idx < minChangedIp) minChangedIp = idx; + if (idx < minChangedIp) { + minChangedIp = idx; + } idx++; } else if (def instanceof JumpIns) { long address = ins.getTargetAddress(); @@ -451,8 +460,8 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush GraphTargetItem top = stack.pop(); Boolean res = top.getResultAsBoolean(); long address = ins.getTargetAddress(); - int nidx = code.adr2pos(address);//code.indexOf(code.getByAddress(address)); - AVM2Instruction tarIns = code.code.get(nidx); + int nidx = code.adr2pos(address); + AVM2Instruction tarIns = code.code.get(nidx); //Some IfType instructions need more than 1 operand, we must pop out all of them int stackCount = -def.getStackDelta(ins, abc); @@ -461,7 +470,9 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush AVM2Instruction jumpIns = new AVM2Instruction(0, AVM2Instructions.Jump, new int[]{0}); //jumpIns.operands[0] = ins.operands[0] /*- ins.getBytes().length*/ + jumpIns.getBytes().length; code.replaceInstruction(idx, jumpIns, body); - if (idx < minChangedIp) minChangedIp = idx; + if (idx < minChangedIp) { + minChangedIp = idx; + } jumpIns.operands[0] = (int) (tarIns.getAddress() - jumpIns.getAddress() - jumpIns.getBytesLength()); for (int s = 0; s < stackCount; s++) { code.insertInstruction(idx, new AVM2Instruction(ins.getAddress(), DeobfuscatePopIns.getInstance(), null), true, body); @@ -470,7 +481,9 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush idx = code.adr2pos(jumpIns.getTargetAddress()); } else { //System.err.println("replacing " + ins + " on " + idx + " with pop"); - if (idx < minChangedIp) minChangedIp = idx; + if (idx < minChangedIp) { + minChangedIp = idx; + } code.replaceInstruction(idx, new AVM2Instruction(ins.getAddress(), DeobfuscatePopIns.getInstance(), null), body); for (int s = 1 /*first is replaced*/; s < stackCount; s++) { code.insertInstruction(idx, new AVM2Instruction(ins.getAddress(), DeobfuscatePopIns.getInstance(), null), true, body); @@ -482,13 +495,13 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush Reference minChangedIp2Ref = new Reference<>(-1); //this might be slow:-(, but makes importantOffsets relevant code.removeDeadCode(body, minChangedIp2Ref); - + if (minChangedIp2Ref.getVal() != -1 && minChangedIp2Ref.getVal() < minChangedIp) { minChangedIp = minChangedIp2Ref.getVal(); } minChangedIp2Ref.setVal(-1); removeZeroJumps(code, body, minChangedIp2Ref); - + if (minChangedIp2Ref.getVal() != -1 && minChangedIp2Ref.getVal() < minChangedIp) { minChangedIp = minChangedIp2Ref.getVal(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorZeroJumpsNullPushes.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorZeroJumpsNullPushes.java index 67c5643eb..c103a6e1e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorZeroJumpsNullPushes.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorZeroJumpsNullPushes.java @@ -46,10 +46,10 @@ import java.util.Set; */ public class AVM2DeobfuscatorZeroJumpsNullPushes extends SWFDecompilerAdapter { - protected boolean removeZeroJumps(AVM2Code code, MethodBody body) throws InterruptedException { return removeZeroJumps(code, body, new Reference<>(-1)); } + protected boolean removeZeroJumps(AVM2Code code, MethodBody body, Reference minChangedIpRef) throws InterruptedException { boolean result = false; int minChangedIp = -1; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/DeobfuscationLevel.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/DeobfuscationLevel.java index 3ddcb11e0..cc80c5586 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/DeobfuscationLevel.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/DeobfuscationLevel.java @@ -23,7 +23,7 @@ package com.jpexs.decompiler.flash.abc.avm2.deobfuscation; public enum DeobfuscationLevel { LEVEL_REMOVE_DEAD_CODE(1), - LEVEL_REMOVE_TRAPS(2); + LEVEL_REMOVE_TRAPS(2); private final int level; public int getLevel() { @@ -35,7 +35,7 @@ public enum DeobfuscationLevel { case 1: return LEVEL_REMOVE_DEAD_CODE; case 2: - return LEVEL_REMOVE_TRAPS; + return LEVEL_REMOVE_TRAPS; } return null; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/exceptions/AVM2RangeErrorException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/exceptions/AVM2RangeErrorException.java index 4a56da13d..96dd63753 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/exceptions/AVM2RangeErrorException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/exceptions/AVM2RangeErrorException.java @@ -32,8 +32,8 @@ public class AVM2RangeErrorException extends AVM2ExecutionException { private static String codeToMessage(int code, boolean debug, Object[] params) { String msg = null; - switch (code) { - } + /*switch (code) { + }*/ String result = "RangeError: Error #" + code; if (debug && msg != null) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/exceptions/AVM2TypeErrorException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/exceptions/AVM2TypeErrorException.java index 91c6ec80b..1d02cc7e2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/exceptions/AVM2TypeErrorException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/exceptions/AVM2TypeErrorException.java @@ -32,8 +32,8 @@ public class AVM2TypeErrorException extends AVM2ExecutionException { private static String codeToMessage(int code, boolean debug, Object[] params) { String msg = null; - switch (code) { - } + /*switch (code) { + }*/ String result = "TypeError: Error #" + code; if (debug && msg != null) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/fastavm2/FastAVM2List.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/fastavm2/FastAVM2List.java index d89c99039..e0767b287 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/fastavm2/FastAVM2List.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/fastavm2/FastAVM2List.java @@ -57,20 +57,14 @@ public class FastAVM2List implements Collection { } size = code.size(); -// getContainerLastActions(avm2code, actionItemMap); getJumps(avm2code, actionItemMap); - } - + } + public final AVM2InstructionItem insertItemBefore(AVM2InstructionItem item, AVM2Instruction action) { AVM2InstructionItem newItem = new AVM2InstructionItem(action); return insertItemBefore(item, newItem); } - public final AVM2InstructionItem insertItemAfter(AVM2InstructionItem item, AVM2Instruction action) { - AVM2InstructionItem newItem = new AVM2InstructionItem(action); - return insertItemAfter(item, newItem); - } - public final AVM2InstructionItem insertItemBefore(AVM2InstructionItem item, AVM2InstructionItem newItem) { insertItemAfter(item.prev, newItem); if (item == firstItem) { @@ -80,6 +74,11 @@ public class FastAVM2List implements Collection { return newItem; } + public final AVM2InstructionItem insertItemAfter(AVM2InstructionItem item, AVM2Instruction action) { + AVM2InstructionItem newItem = new AVM2InstructionItem(action); + return insertItemAfter(item, newItem); + } + public final AVM2InstructionItem insertItemAfter(AVM2InstructionItem item, AVM2InstructionItem newItem) { if (item == null && firstItem == null) { firstItem = newItem; @@ -165,42 +164,6 @@ public class FastAVM2List implements Collection { } } -// private void getContainerLastActions(AVM2Code actions, Map actionItemMap) { -// AVM2InstructionItem item = firstItem; -// if (item == null) { -// return; -// } -// -// do { -// AVM2Instruction action = item.ins; -// if (action instanceof GraphSourceItemContainer) { -// item.setContainerLastInstructions(getContainerLastActions(actions, action, actionItemMap)); -// } -// -// item = item.next; -// } while (item != firstItem); -// } -// private List getContainerLastActions(AVM2Code actions, AVM2Instruction action, Map actionItemMap) { -// GraphSourceItemContainer container = (GraphSourceItemContainer) action; -// List sizes = container.getContainerSizes(); -// long endAddress = action.getAddress() + container.getHeaderSize(); -// List lasts = new ArrayList<>(sizes.size()); -// for (long size : sizes) { -// endAddress += size; -// long lastActionAddress = getNearAddress(actions.code, endAddress - 1, false); -// AVM2Instruction lastAction = null; -// if (lastActionAddress != -1) { -// lastAction = actions.getByAddress(lastActionAddress); -// } -// -// if (lastAction != null) { -// lasts.add(actionItemMap.get(lastAction)); -// } else { -// lasts.add(null); -// } -// } -// return lasts; -// } private long getNearAddress(List instructions, long address, boolean next) { int min = 0; int max = instructions.size() - 1; 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 8bdadc718..5e5aba102 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 @@ -101,7 +101,6 @@ import com.jpexs.decompiler.graph.model.AnyItem; import com.jpexs.decompiler.graph.model.BreakItem; import com.jpexs.decompiler.graph.model.CommaExpressionItem; import com.jpexs.decompiler.graph.model.ContinueItem; -import com.jpexs.decompiler.graph.model.DoWhileItem; import com.jpexs.decompiler.graph.model.ExitItem; import com.jpexs.decompiler.graph.model.FalseItem; import com.jpexs.decompiler.graph.model.GotoItem; @@ -335,11 +334,12 @@ public class AVM2Graph extends Graph { for (int j = prevFinallyEndPart.start; j <= prevFinallyEndPart.end; j++) { AVM2Instruction ins = avm2code.code.get(j); if (ins.definition instanceof NopIns) { - + //empty } else if (ins.definition instanceof PushByteIns) { defaultPushByte = ins.operands[0]; localData.pushDefaultPart.put(e, prevFinallyEndPart); } else if (ins.definition instanceof JumpIns) { + //empty } else { if (localData.pushDefaultPart.containsKey(e)) { localData.pushDefaultPart.remove(e); @@ -357,7 +357,7 @@ public class AVM2Graph extends Graph { for (int j = prevFinallyEndPart.start; j <= prevFinallyEndPart.end; j++) { AVM2Instruction ins = avm2code.code.get(j); if (ins.definition instanceof NopIns) { - + //empty } else if (ins.definition instanceof PushByteIns) { defaultPushByte = ins.operands[0]; localData.pushDefaultPart.put(e, prevFinallyEndPart); @@ -913,11 +913,11 @@ public class AVM2Graph extends Graph { for (int ip = outSideExceptionNonEmptyPart.start; ip <= outSideExceptionNonEmptyPart.end; ip++) { AVM2Instruction ins = avm2code.code.get(outSideExceptionNonEmptyPart.start); if (ins.definition instanceof PushByteIns) { - + //empty } else if (ins.definition instanceof JumpIns) { - + //empty } else if (ins.definition instanceof NopIns) { - + //empty } else { hashPushByteOnly = false; } @@ -1034,9 +1034,8 @@ public class AVM2Graph extends Graph { } //List catchedExceptionsAfter = new ArrayList<>(); - List catchAfterParts = new ArrayList<>(); - + if (afterPart == null) { loope: @@ -1050,7 +1049,7 @@ public class AVM2Graph extends Graph { if (!stopPart.contains(possibleAfter)) { catchAfterParts.add(possibleAfter); } - } + } } } } @@ -1111,7 +1110,7 @@ public class AVM2Graph extends Graph { try { //We are assuming Finally target has only 1 part - finallyTargetItems = translatePart(localData2, finallyTryTargetPart, st2, staticOperation, path);//printGraph(foundGotos, partCodes, partCodePos, visited, localData2, st2, allParts, null, finallyTryTargetPart, finallyTargetStopPart, loops, throwStates, 0, path); + finallyTargetItems = translatePart(localData2, finallyTryTargetPart, st2, staticOperation, path); } catch (GraphPartChangeException ex) { //should not happen finallyTargetItems = new ArrayList<>(); } @@ -1130,8 +1129,9 @@ public class AVM2Graph extends Graph { break; } } else if (it instanceof ThrowAVM2Item) { - + //empty } else if (it instanceof IntegerValueAVM2Item) { + //empty } else { isEmpty = false; break; @@ -1235,8 +1235,8 @@ public class AVM2Graph extends Graph { stopPart2.add(defaultPart); stopPartKind2.add(StopPartKind.OTHER); } - - for (GraphPart p:catchAfterParts) { + + for (GraphPart p : catchAfterParts) { stopPart2.add(p); stopPartKind2.add(StopPartKind.OTHER); } @@ -1468,29 +1468,29 @@ public class AVM2Graph extends Graph { @Override protected boolean checkPartOutput(List currentRet, List foundGotos, - Map> partCodes, Map partCodePos, - Set visited, GraphSource code, - BaseLocalData localData, Set allParts, - TranslateStack stack, GraphPart parent, - GraphPart part, List stopPart, - List stopPartKind, List loops, - List throwStates, Loop currentLoop, - int staticOperation, String path, - int recursionLevel) throws InterruptedException { + Map> partCodes, Map partCodePos, + Set visited, GraphSource code, + BaseLocalData localData, Set allParts, + TranslateStack stack, GraphPart parent, + GraphPart part, List stopPart, + List stopPartKind, List loops, + List throwStates, Loop currentLoop, + int staticOperation, String path, + int recursionLevel) throws InterruptedException { AVM2LocalData aLocalData = (AVM2LocalData) localData; return checkTry(currentRet, foundGotos, partCodes, partCodePos, visited, aLocalData, part, stopPart, stopPartKind, loops, throwStates, allParts, stack, staticOperation, path, recursionLevel); } @Override protected List check(List currentRet, List foundGotos, - Map> partCodes, Map partCodePos, - Set visited, GraphSource code, - BaseLocalData localData, Set allParts, - TranslateStack stack, GraphPart parent, - GraphPart part, List stopPart, - List stopPartKind, List loops, - List throwStates, List output, - Loop currentLoop, int staticOperation, String path) throws InterruptedException { + Map> partCodes, Map partCodePos, + Set visited, GraphSource code, + BaseLocalData localData, Set allParts, + TranslateStack stack, GraphPart parent, + GraphPart part, List stopPart, + List stopPartKind, List loops, + List throwStates, List output, + Loop currentLoop, int staticOperation, String path) throws InterruptedException { List ret = null; /*if (ret != null) { @@ -1620,8 +1620,8 @@ public class AVM2Graph extends Graph { @Override protected GraphPart checkPartWithOutput(List output, TranslateStack stack, - BaseLocalData localData, GraphPart prev, - GraphPart part, Set allParts + BaseLocalData localData, GraphPart prev, + GraphPart part, Set allParts ) { AVM2LocalData aLocalData = (AVM2LocalData) localData; if (aLocalData.finallyJumps == null) { @@ -2051,7 +2051,7 @@ public class AVM2Graph extends Graph { protected void finalProcessAfter(List list, int level, FinalProcessLocalData localData, String path) { super.finalProcessAfter(list, level, localData, path); for (int i = 0; i < list.size(); i++) { - + //Remove continues from all branches of try...catch block if its continue to parent loop if (list.get(i) instanceof LoopItem) { LoopItem li = (LoopItem) list.get(i); @@ -2193,7 +2193,7 @@ public class AVM2Graph extends Graph { && (((NotItem) ifi.expression).getOriginal() instanceof HasNextAVM2Item)))) { HasNextAVM2Item hnt; List body = new ArrayList<>(); - List nextbody;//= new ArrayList<>(); + List nextbody; if (ifi.expression instanceof NotItem) { hnt = (HasNextAVM2Item) ((NotItem) ifi.expression).getOriginal(); body.addAll(ifi.onFalse); @@ -2263,7 +2263,7 @@ public class AVM2Graph extends Graph { } } //if (usages.size() <= 1) - { + if (true) { if (i + 1 < list.size()) { if ((list.get(i + 1) instanceof ReturnValueAVM2Item) && (list.get(i + 1).value instanceof LocalRegAVM2Item) @@ -2544,7 +2544,7 @@ public class AVM2Graph extends Graph { List ret = new ArrayList<>(); for (int e = 0; e < body.exceptions.length; e++) { - ThrowState ts = new ThrowState(); + ThrowState ts = new ThrowState(); ts.exceptionId = e; ts.state = 0; ts.targetPart = searchPart(code.adr2pos(body.exceptions[e].target), allParts); @@ -2650,13 +2650,13 @@ public class AVM2Graph extends Graph { } } - private void walkCatchParts(CodeStats stats, GraphPart part, int startIp, Set catchParts, int scopePos, Set allParts, boolean isFinally) { + private void walkCatchParts(CodeStats stats, GraphPart part, int startIp, Set catchParts, int scopePos, Set allParts, boolean isFinally) { if (catchParts.contains(part)) { return; } for (int ip = startIp; ip <= part.end; ip++) { if (stats.instructionStats[ip].scopepos_after < scopePos) { - + //popscope can be followed by jump (break/continue), //in such case, treat as single block if (ip >= 0 && ip < code.size()) { @@ -2677,22 +2677,22 @@ public class AVM2Graph extends Graph { } if (onlyKillJump) { catchParts.add(part); - return; + return; } } if (ip < part.end && !isFinally) { //split part into half GraphPart secondPart = new GraphPart(ip + 1, part.end); - part.end = ip; + part.end = ip; for (GraphPart n : part.nextParts) { n.refs.remove(part); n.refs.add(secondPart); - } + } secondPart.nextParts.addAll(part.nextParts); part.nextParts.clear(); part.nextParts.add(secondPart); secondPart.refs.add(part); - + secondPart.type = GraphPart.TYPE_NONE; secondPart.discoveredTime = part.discoveredTime; secondPart.closedTime = part.closedTime; @@ -2705,7 +2705,7 @@ public class AVM2Graph extends Graph { secondPart.path = part.path; secondPart.posX = part.posX; secondPart.posY = part.posY; - secondPart.traversed = true; + secondPart.traversed = true; allParts.add(secondPart); } catchParts.add(part); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java index ac252e6e0..15de75bb6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2GraphSource.java @@ -29,7 +29,6 @@ import com.jpexs.decompiler.graph.GraphPart; import com.jpexs.decompiler.graph.GraphSource; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.ScopeStack; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.helpers.Reference; import java.util.ArrayList; @@ -61,7 +60,7 @@ public class AVM2GraphSource extends GraphSource { List fullyQualifiedNames; - HashMap localRegAssigmentIps; + HashMap localRegAssigmentIps; public AVM2Code getCode() { return code; @@ -123,14 +122,14 @@ public class AVM2GraphSource extends GraphSource { public int adr2pos(long adr) { return code.adr2pos(adr); } - - @Override - public long pos2adr(int pos) { - return code.pos2adr(pos); - } - + @Override public int adr2pos(long adr, boolean nearest) { return code.adr2pos(adr, true); } + + @Override + public long pos2adr(int pos) { + return code.pos2adr(pos); + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java index 85b0acf74..46dd69580 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instruction.java @@ -21,7 +21,6 @@ import com.jpexs.decompiler.flash.abc.ABCOutputStream; import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; -import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallSuperIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.JumpIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.LookupSwitchIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ReturnValueIns; @@ -173,20 +172,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { } return cnt; - } - - @Override - public String toString() { - StringBuilder s = new StringBuilder(); - s.append(definition.instructionName); - if (operands != null) { - for (int i = 0; i < operands.length; i++) { - s.append(" "); - s.append(operands[i]); - } - } - return s.toString(); - } + } public List getOffsets() { List ret = new ArrayList<>(); @@ -331,7 +317,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { s.append(EcmaScript.toString(constants.getDouble(operands[i]))); } catch (IndexOutOfBoundsException iob) { s.append("Unknown(").append(operands[i]).append(")"); - } + } } break; case AVM2Code.DAT_FLOAT_INDEX: @@ -343,7 +329,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { s.append(EcmaScript.toString(constants.getFloat(operands[i]))); } catch (IndexOutOfBoundsException iob) { s.append("Unknown(").append(operands[i]).append(")"); - } + } } break; case AVM2Code.DAT_FLOAT4_INDEX: @@ -358,7 +344,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { s.append(" ").append(EcmaScript.toString(f4.values[3])); } catch (IndexOutOfBoundsException iob) { s.append(" Unknown(").append(operands[i]).append(")"); - } + } } break; case AVM2Code.DAT_DECIMAL_INDEX: @@ -370,7 +356,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { s.append(constants.getDecimal(operands[i])); } catch (IndexOutOfBoundsException iob) { s.append("Unknown(").append(operands[i]).append(")"); - } + } } break; case AVM2Code.DAT_OFFSET: @@ -427,6 +413,19 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { return ignored; } + @Override + public String toString() { + StringBuilder s = new StringBuilder(); + s.append(definition.instructionName); + if (operands != null) { + for (int i = 0; i < operands.length; i++) { + s.append(" "); + s.append(operands[i]); + } + } + return s.toString(); + } + public GraphTextWriter toString(GraphTextWriter writer, LocalData localData) { writer.appendNoHilight(Helper.formatAddress(address) + " " + String.format("%-30s", Helper.byteArrToString(getBytes())) + getCustomizedInstructionName()); writer.appendNoHilight(getParams(localData.constantsAvm2, localData.fullyQualifiedNames) + getComment()); @@ -467,16 +466,16 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { return getStackPopCount(aLocalData); } + public int getStackPopCount(AVM2LocalData aLocalData) { + return definition.getStackPopCount(this, aLocalData.abc); + } + @Override public int getStackPushCount(BaseLocalData localData, TranslateStack stack) { AVM2LocalData aLocalData = (AVM2LocalData) localData; return getStackPushCount(aLocalData); } - public int getStackPopCount(AVM2LocalData aLocalData) { - return definition.getStackPopCount(this, aLocalData.abc); - } - public int getStackPushCount(AVM2LocalData aLocalData) { return definition.getStackPushCount(this, aLocalData.abc); } @@ -598,7 +597,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem { * @param code * @param body */ - public void setOperands(int operands[], AVM2Code code, MethodBody body) { + public void setOperands(int[] operands, AVM2Code code, MethodBody body) { int oldByteCount = getBytesLength(); this.operands = operands; int newByteCount = getBytesLength(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instructions.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instructions.java index 23e5ca570..cd8994aad 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instructions.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/AVM2Instructions.java @@ -261,17 +261,17 @@ public class AVM2Instructions { public static final int ConvertO = 0x77; public static final int CheckFilter = 0x78; - + public static final int ConvertM = 0x79; - - public static final int ConvertF = 0x79; + + public static final int ConvertF = 0x79; public static final int ConvertMP = 0x7A; - + public static final int UnPlus = 0x7A; - - public static final int ConvertF4 = 0x7B; - + + public static final int ConvertF4 = 0x7B; + public static final int Coerce = 0x80; public static final int CoerceB = 0x81; @@ -430,10 +430,10 @@ public class AVM2Instructions { public static final int Prologue = 0xF9; - public static final int SendEnter = 0xFA; + public static final int SendEnter = 0xFA; public static final int DoubleToAtom = 0xFB; - + public static final int Sweep = 0xFC; public static final int CodeGenOp = 0xFD; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java index 0522d8b92..60ff1c6b2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/InstructionDefinition.java @@ -29,7 +29,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.IncLocalIIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.IncLocalIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocalTypeIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetPropertyIns; -import static com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetPropertyIns.handleCompound; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetPropertyIns; import com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.ApplyTypeAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.ClassAVM2Item; @@ -401,7 +401,7 @@ public abstract class InstructionDefinition implements Serializable { return null; } - + public void handleSetProperty(boolean init, AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { int multinameIndex = ins.operands[0]; GraphTargetItem value = stack.pop(); @@ -638,18 +638,17 @@ public abstract class InstructionDefinition implements Serializable { Reference type = new Reference<>(null); Reference callType = new Reference<>(null); GetPropertyIns.resolvePropertyType(localData, obj, multiname, isStatic, type, callType); - - + SetTypeAVM2Item result; if (init) { result = new InitPropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname, value, type.getVal(), callType.getVal(), isStatic.getVal()); } else { result = new SetPropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname, value, type.getVal(), callType.getVal(), isStatic.getVal()); } - handleCompound(localData, obj, multiname, value, output, result); - SetTypeIns.handleResult(value, stack, output, localData, (GraphTargetItem)result, -1, type.getVal()); + SetPropertyIns.handleCompound(localData, obj, multiname, value, output, result); + SetTypeIns.handleResult(value, stack, output, localData, (GraphTargetItem) result, -1, type.getVal()); } - + private GraphTargetItem checkIncDec(boolean standalone, int multinameIndex, AVM2Instruction ins, AVM2LocalData localData, GraphTargetItem item, LocalRegAVM2Item valueLocalReg, LocalRegAVM2Item nameLocalReg, LocalRegAVM2Item objLocalReg) { if (item instanceof SetLocalAVM2Item) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java index dd13abf1f..bca9a39da 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/SetTypeIns.java @@ -44,7 +44,7 @@ public interface SetTypeIns { } return value; } - + public static void handleResult(GraphTargetItem value, TranslateStack stack, List output, AVM2LocalData localData, GraphTargetItem result, int regId, GraphTargetItem type) { GraphTargetItem notCoercedValue = value; if ((value instanceof CoerceAVM2Item) || (value instanceof ConvertAVM2Item)) { @@ -75,8 +75,8 @@ public interface SetTypeIns { stack.push(new LocalRegAVM2Item(null, localData.lineStartInstruction, regId, value, localData.localRegTypes.containsKey(regId) ? localData.localRegTypes.get(regId) : value.returnType())); } return; - } else { - + } else { + if ((value instanceof CoerceAVM2Item) || (value instanceof ConvertAVM2Item)) { value.value = insideDup; } else { @@ -84,9 +84,9 @@ public interface SetTypeIns { } result.value = value; - + if ((result instanceof SetLocalAVM2Item) && regId > -1) { - ((SetLocalAVM2Item)result).causedByDup = true; + ((SetLocalAVM2Item) result).causedByDup = true; } if (regId > -1 && AVM2Item.mustStayIntact2(insideDup.getNotCoerced())) { //hack @@ -100,7 +100,7 @@ public interface SetTypeIns { } } } - } + } output.add(result); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java index 2d5efd275..f03f9ac21 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructIns.java @@ -30,13 +30,10 @@ import com.jpexs.decompiler.flash.abc.avm2.model.FindPropertyAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.FullMultinameAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetLexAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetPropertyAVM2Item; -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.RegExpAvm2Item; import com.jpexs.decompiler.flash.abc.avm2.model.StringAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.XMLAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.operations.AddAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.SlotAVM2Item; import com.jpexs.decompiler.flash.ecma.ObjectType; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; @@ -85,6 +82,7 @@ public class ConstructIns extends InstructionDefinition { } return ret; } + public static boolean walkXMLSub(GraphTargetItem item, List list) { boolean ret = false; if (item instanceof AddAVM2Item) { @@ -93,14 +91,14 @@ public class ConstructIns extends InstructionDefinition { } if (walkXMLSub(((AddAVM2Item) item).rightSide, list)) { ret = true; - } + } } else if ((item instanceof EscapeXElemAVM2Item) || (item instanceof EscapeXAttrAVM2Item)) { ret = true; list.add(item); } else { list.add(item); } - + return ret; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java index d63fa0b95..3e5cb74f3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/construction/ConstructPropIns.java @@ -72,7 +72,6 @@ public class ConstructPropIns extends InstructionDefinition { } FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); - if (multiname.isXML(localData.abc, localData.localRegNames, localData.fullyQualifiedNames, localData.seenMethods)) { if (args.size() == 1) { @@ -83,7 +82,7 @@ public class ConstructPropIns extends InstructionDefinition { return; } } - }// + } boolean isRegExp = false; if (multiname.isTopLevel("RegExp", localData.abc, localData.localRegNames, localData.fullyQualifiedNames, localData.seenMethods)) { isRegExp = true; @@ -97,7 +96,7 @@ public class ConstructPropIns extends InstructionDefinition { stack.push(new RegExpAvm2Item(pattern, modifiers, ins, localData.lineStartInstruction)); return; } - + Reference isStatic = new Reference<>(false); Reference type = new Reference<>(null); Reference callType = new Reference<>(null); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java index dd86c6cff..ff2a5b38b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallIns.java @@ -85,8 +85,7 @@ public class CallIns extends InstructionDefinition { if (getProperty.object.value == receiver) { getProperty.object = receiver; } - } - else if (getProperty.object instanceof SetLocalAVM2Item) { + } else if (getProperty.object instanceof SetLocalAVM2Item) { SetLocalAVM2Item setLocal = (SetLocalAVM2Item) getProperty.object; if (receiver instanceof LocalRegAVM2Item) { LocalRegAVM2Item getLocal = (LocalRegAVM2Item) receiver; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java index 6ee777241..53b4839a3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropLexIns.java @@ -85,7 +85,7 @@ public class CallPropLexIns extends CallPropertyIns { Reference type = new Reference<>(null); Reference callType = new Reference<>(null); GetPropertyIns.resolvePropertyType(localData, obj, multiname, isStatic, type, callType); - + stack.push(new CallPropertyAVM2Item(ins, localData.lineStartInstruction, false, obj, multiname, args, callType.getVal(), isStatic.getVal())); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java index a61258599..dc809f3fb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropVoidIns.java @@ -80,7 +80,7 @@ public class CallPropVoidIns extends InstructionDefinition { } FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); - GraphTargetItem obj = stack.pop(); + GraphTargetItem obj = stack.pop(); Reference isStatic = new Reference<>(false); Reference type = new Reference<>(null); Reference callType = new Reference<>(null); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java index 92e11875d..bc92195b9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/executing/CallPropertyIns.java @@ -85,7 +85,7 @@ public class CallPropertyIns extends InstructionDefinition { Reference type = new Reference<>(null); Reference callType = new Reference<>(null); GetPropertyIns.resolvePropertyType(localData, obj, multiname, isStatic, type, callType); - + stack.push(new CallPropertyAVM2Item(ins, localData.lineStartInstruction, false, obj, multiname, args, callType.getVal(), isStatic.getVal())); } 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 c5682b845..5e7e6cb2a 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 @@ -28,7 +28,6 @@ import com.jpexs.decompiler.flash.abc.avm2.model.ConvertAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.DecrementAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.FullMultinameAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetPropertyAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.GlobalAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.IncrementAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.PostDecrementAVM2Item; @@ -75,7 +74,7 @@ public abstract class GetLocalTypeIns extends InstructionDefinition { if (localData.classIndex == -1) { stack.push(new ThisAVM2Item(ins, localData.lineStartInstruction, DottedChain.parseNoSuffix("global"), false, false)); return; - } + } if ((localData.classIndex >= localData.getInstanceInfo().size())) { stack.push(new ThisAVM2Item(ins, localData.lineStartInstruction, DottedChain.OBJECT /*?*/, false, false)); return; @@ -137,8 +136,8 @@ public abstract class GetLocalTypeIns extends InstructionDefinition { } else if (setItem.value.getNotCoerced() instanceof SetLocalAVM2Item) { SetLocalAVM2Item setLocal = (SetLocalAVM2Item) setItem.value.getNotCoerced(); if (setLocal.regIndex == regId) { - int setLocalIp = localData.code.adr2pos(setLocal.getSrc().getAddress()); - if (localData.getSetLocalUsages(setLocalIp).size() == 1) { + int setLocalIp = localData.code.adr2pos(setLocal.getSrc().getAddress()); + if (localData.getSetLocalUsages(setLocalIp).size() == 1) { if ((setItem.value instanceof CoerceAVM2Item) || (setItem.value instanceof ConvertAVM2Item)) { setItem.value.value = setLocal.value; } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java index ba645db62..8b550557b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/DeletePropertyIns.java @@ -59,7 +59,7 @@ public class DeletePropertyIns extends InstructionDefinition { Reference isStatic = new Reference<>(false); Reference type = new Reference<>(null); Reference callType = new Reference<>(null); - GetPropertyIns.resolvePropertyType(localData, obj, multiname, isStatic, type, callType); + GetPropertyIns.resolvePropertyType(localData, obj, multiname, isStatic, type, callType); stack.add(new DeletePropertyAVM2Item(ins, localData.lineStartInstruction, obj, multiname, isStatic.getVal())); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java index 40d2ba659..13cf5c454 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetGlobalSlotIns.java @@ -54,7 +54,7 @@ public class GetGlobalSlotIns extends InstructionDefinition { if (obj instanceof NewActivationAVM2Item) { for (Trait t : localData.methodBody.traits.traits) { if (t instanceof TraitSlotConst) { - TraitSlotConst tsc = (TraitSlotConst)t; + TraitSlotConst tsc = (TraitSlotConst) t; if (tsc.slot_id == slotIndex) { slotType = AbcIndexing.multinameToType(tsc.type_index, localData.abc.constants); break; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetOuterScopeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetOuterScopeIns.java index 08aabae48..fa8073e8a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetOuterScopeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetOuterScopeIns.java @@ -43,14 +43,14 @@ public class GetOuterScopeIns extends InstructionDefinition { int index = ins.operands[0]; GraphTargetItem item = localData.scopeStack.get(index); if (item instanceof ThisAVM2Item) { - if (((ThisAVM2Item)item).className.equals(DottedChain.parseNoSuffix("global"))) { + if (((ThisAVM2Item) item).className.equals(DottedChain.parseNoSuffix("global"))) { stack.push(new GlobalAVM2Item(null, null)); return; } } stack.push(item); } - + @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { return 0; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java index d2c6bddd5..74d3fde5e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetPropertyIns.java @@ -176,8 +176,8 @@ public class GetPropertyIns extends InstructionDefinition { if (currentClassName != null) { localData.abcIndex.findPropertyTypeOrCallType(localData.abc, new TypeItem(currentClassName), multinameStr, localData.abc.constants.getMultiname(multiname.multinameIndex).namespace_index, true, true, true, type, callType); } - if (type.getVal().equals(TypeItem.UNKNOWN)) { - GraphTargetItem ti = AbcIndexing.multinameToType(multiname.multinameIndex, localData.abc.constants);//new TypeItem(localData.abc.constants.getMultiname(multiname.multinameIndex).getNameWithNamespace(localData.abc.constants, true)); + if (type.getVal().equals(TypeItem.UNKNOWN)) { + GraphTargetItem ti = AbcIndexing.multinameToType(multiname.multinameIndex, localData.abc.constants); if (localData.abcIndex.findClass(ti, localData.abc, localData.scriptIndex) != null) { type.setVal(ti); callType.setVal(ti); //coercion i = int(xx); @@ -255,7 +255,7 @@ public class GetPropertyIns extends InstructionDefinition { localData.abcIndex.findPropertyTypeOrCallType(localData.abc, receiverType, multiname.resolvedMultinameName, localData.abc.constants.getMultiname(multiname.multinameIndex).namespace_index, parentStatic, !parentStatic, false, type, callType); if (receiverType.equals(new TypeItem("XML")) && !type.getVal().equals(new TypeItem("Function"))) { type.setVal(new TypeItem("XMLList")); - } + } } } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java index 6db3260e6..beea264b7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSlotIns.java @@ -57,7 +57,7 @@ public class GetSlotIns extends InstructionDefinition { if (obj instanceof NewActivationAVM2Item) { for (Trait t : localData.methodBody.traits.traits) { if (t instanceof TraitSlotConst) { - TraitSlotConst tsc = (TraitSlotConst)t; + TraitSlotConst tsc = (TraitSlotConst) t; if (tsc.slot_id == slotIndex) { slotType = AbcIndexing.multinameToType(tsc.type_index, localData.abc.constants); break; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java index c435501ed..ece568895 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetSuperIns.java @@ -21,7 +21,6 @@ import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import static com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetPropertyIns.resolvePropertyType; import com.jpexs.decompiler.flash.abc.avm2.model.FullMultinameAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetSuperAVM2Item; import com.jpexs.decompiler.graph.GraphTargetItem; @@ -33,8 +32,8 @@ import java.util.List; * * @author JPEXS */ -public class GetSuperIns extends InstructionDefinition { - +public class GetSuperIns extends InstructionDefinition { + public GetSuperIns() { super(0x04, "getsuper", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true); } @@ -44,13 +43,13 @@ public class GetSuperIns extends InstructionDefinition { int multinameIndex = ins.operands[0]; FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); - + Reference isStatic = new Reference<>(false); Reference type = new Reference<>(null); Reference callType = new Reference<>(null); - resolvePropertyType(localData, obj, multiname, isStatic, type, callType); - - stack.push(new GetSuperAVM2Item(ins, localData.lineStartInstruction, obj, multiname, type.getVal(), callType.getVal(),isStatic.getVal())); + GetPropertyIns.resolvePropertyType(localData, obj, multiname, isStatic, type, callType); + + stack.push(new GetSuperAVM2Item(ins, localData.lineStartInstruction, obj, multiname, type.getVal(), callType.getVal(), isStatic.getVal())); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java index 3aac4dc60..6f6a60f1c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/InitPropertyIns.java @@ -21,11 +21,8 @@ import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; -import com.jpexs.decompiler.flash.abc.avm2.model.FullMultinameAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.InitPropertyAVM2Item; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; -import com.jpexs.helpers.Reference; import java.util.List; /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java index ce5061a71..958902ead 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/LabelIns.java @@ -25,8 +25,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS */ -public class LabelIns extends InstructionDefinition { -//this can be target of branch +public class LabelIns extends InstructionDefinition { //this can be target of branch public LabelIns() { super(0x09, "label", new int[]{}, false); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java index cd20f6564..bf025f96c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetPropertyIns.java @@ -22,30 +22,16 @@ import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.instructions.SetTypeIns; -import com.jpexs.decompiler.flash.abc.avm2.model.ApplyTypeAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.ConstructAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.ConvertAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.DecrementAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.FindPropertyAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.FullMultinameAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetLexAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetPropertyAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.IncrementAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.InitVectorAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.PostDecrementAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.PostIncrementAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.SetLocalAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.SetPropertyAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.SetTypeAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.operations.PreDecrementAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.operations.PreIncrementAVM2Item; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; -import com.jpexs.decompiler.graph.model.DuplicateItem; -import com.jpexs.helpers.Reference; -import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -58,9 +44,9 @@ public class SetPropertyIns extends InstructionDefinition implements SetTypeIns public SetPropertyIns() { super(0x61, "setproperty", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true); } - + @Override - public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { + public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { handleSetProperty(false, localData, stack, ins, output, path); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java index fb4a9fd67..953f9b6a3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java @@ -144,7 +144,7 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { if (obj instanceof NewActivationAVM2Item) { for (Trait t : localData.methodBody.traits.traits) { if (t instanceof TraitSlotConst) { - TraitSlotConst tsc = (TraitSlotConst)t; + TraitSlotConst tsc = (TraitSlotConst) t; if (tsc.slot_id == slotIndex) { slotType = AbcIndexing.multinameToType(tsc.type_index, localData.abc.constants); break; @@ -152,7 +152,7 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { } } } - + SetSlotAVM2Item result = new SetSlotAVM2Item(ins, localData.lineStartInstruction, obj, objnoreg, slotIndex, slotname, value, slotType); if (value.getNotCoerced() instanceof CompoundableBinaryOp) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java index a97bd2fb1..3f3bddf4b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSuperIns.java @@ -50,12 +50,12 @@ public class SetSuperIns extends InstructionDefinition implements SetTypeIns { FullMultinameAVM2Item multiname = resolveMultiname(localData, true, stack, localData.getConstants(), multinameIndex, ins); GraphTargetItem obj = stack.pop(); - + Reference isStatic = new Reference<>(false); Reference type = new Reference<>(null); Reference callType = new Reference<>(null); GetPropertyIns.resolvePropertyType(localData, obj /*??*/, multiname, isStatic, type, callType); - + SetSuperAVM2Item result = new SetSuperAVM2Item(ins, localData.lineStartInstruction, value, obj, multiname, type.getVal(), callType.getVal(), isStatic.getVal()); if (value.getNotCoercedNoDup() instanceof CompoundableBinaryOp) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/DecLocalPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/DecLocalPIns.java index 8f9a78279..eee12dbce 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/DecLocalPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/DecLocalPIns.java @@ -44,7 +44,7 @@ public class DecLocalPIns extends InstructionDefinition { super.verify(lda, constants, ins); } - + @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { return 0; @@ -53,5 +53,5 @@ public class DecLocalPIns extends InstructionDefinition { @Override public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 0; - } + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/DecrementPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/DecrementPIns.java index 1a69fdecf..78a225871 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/DecrementPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/DecrementPIns.java @@ -44,7 +44,7 @@ public class DecrementPIns extends InstructionDefinition { super.verify(lda, constants, ins); } - + @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { return 1; @@ -53,5 +53,5 @@ public class DecrementPIns extends InstructionDefinition { @Override public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; - } + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/IncLocalPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/IncLocalPIns.java index 6a921e507..8095a0a92 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/IncLocalPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/IncLocalPIns.java @@ -44,7 +44,7 @@ public class IncLocalPIns extends InstructionDefinition { super.verify(lda, constants, ins); } - + @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { return 0; @@ -53,5 +53,5 @@ public class IncLocalPIns extends InstructionDefinition { @Override public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 0; - } + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/IncrementPIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/IncrementPIns.java index d3b001383..3a176fde6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/IncrementPIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/IncrementPIns.java @@ -53,5 +53,5 @@ public class IncrementPIns extends InstructionDefinition { @Override public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; - } + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/PushDNanIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/PushDNanIns.java index 9e96b2eba..749cb7e70 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/PushDNanIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/PushDNanIns.java @@ -47,8 +47,8 @@ public class PushDNanIns extends InstructionDefinition { @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { return 0; - } - + } + @Override public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/PushDecimalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/PushDecimalIns.java index 6d9e8531a..fe701c81b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/PushDecimalIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/decimalsupport/PushDecimalIns.java @@ -48,8 +48,8 @@ public class PushDecimalIns extends InstructionDefinition { @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { return 0; - } - + } + @Override public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloat4Ins.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloat4Ins.java index 561fbbe12..929ce31f6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloat4Ins.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloat4Ins.java @@ -48,12 +48,11 @@ public class PushFloat4Ins extends InstructionDefinition { @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { return 0; - } + } @Override public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; } - - + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloatIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloatIns.java index 459efc5bc..4b602a062 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloatIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/floatsupport/PushFloatIns.java @@ -44,7 +44,7 @@ public class PushFloatIns extends InstructionDefinition { super.verify(lda, constants, ins); } - + @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { return 0; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AbsJumpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AbsJumpIns.java index d178b1c83..88c4ec90b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AbsJumpIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AbsJumpIns.java @@ -28,8 +28,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class AbsJumpIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AddDIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AddDIns.java index 7377c347a..e10183918 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AddDIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AddDIns.java @@ -28,8 +28,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class AddDIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AllocIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AllocIns.java index e31c05250..e68c09db0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AllocIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/AllocIns.java @@ -28,8 +28,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class AllocIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CallInterfaceIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CallInterfaceIns.java index e9ae99ea7..cd407f615 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CallInterfaceIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CallInterfaceIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class CallInterfaceIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CallSuperIdIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CallSuperIdIns.java index 074738fea..64dc7b10e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CallSuperIdIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CallSuperIdIns.java @@ -28,7 +28,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class CallSuperIdIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CodeGenOpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CodeGenOpIns.java index 96bbe9faa..669570682 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CodeGenOpIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/CodeGenOpIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class CodeGenOpIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/ConcatIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/ConcatIns.java index c5d805ca0..05e3c1c9b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/ConcatIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/ConcatIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class ConcatIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DecodeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DecodeIns.java index b61081402..9ca415980 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DecodeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DecodeIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class DecodeIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DelDescendantsIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DelDescendantsIns.java index 56379b3f0..5244f86e0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DelDescendantsIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DelDescendantsIns.java @@ -29,7 +29,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * + * * source: ?? */ public class DelDescendantsIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DeletePropertyLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DeletePropertyLateIns.java index a302b7e0a..9d7bae925 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DeletePropertyLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DeletePropertyLateIns.java @@ -28,7 +28,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * + * * source: ?? */ public class DeletePropertyLateIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DoubleToAtomIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DoubleToAtomIns.java index dcb451d19..96cf921f3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DoubleToAtomIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/DoubleToAtomIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class DoubleToAtomIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/FindPropGlobalIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/FindPropGlobalIns.java index e2f512d30..65e2956c1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/FindPropGlobalIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/FindPropGlobalIns.java @@ -29,8 +29,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * - * source: https://github.com/adobe-flash/avmplus/blob/65a05927767f3735db37823eebf7d743531f5d37/utils/abcdis/abc/Constants.as + * + * source: + * https://github.com/adobe-flash/avmplus/blob/65a05927767f3735db37823eebf7d743531f5d37/utils/abcdis/abc/Constants.as * (internal only) */ public class FindPropGlobalIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/FindPropGlobalStrictIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/FindPropGlobalStrictIns.java index fced35701..414cb12f5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/FindPropGlobalStrictIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/FindPropGlobalStrictIns.java @@ -29,8 +29,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * - * source: https://github.com/adobe-flash/avmplus/blob/65a05927767f3735db37823eebf7d743531f5d37/utils/abcdis/abc/Constants.as + * + * source: + * https://github.com/adobe-flash/avmplus/blob/65a05927767f3735db37823eebf7d743531f5d37/utils/abcdis/abc/Constants.as * (internal only) */ public class FindPropGlobalStrictIns extends InstructionDefinition { @@ -47,7 +48,7 @@ public class FindPropGlobalStrictIns extends InstructionDefinition { super.verify(lda, constants, ins); } - + @Override public int getStackPopCount(AVM2Instruction ins, ABC abc) { throw new UnsupportedOperationException(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/GetPropertyLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/GetPropertyLateIns.java index ae6b5ef75..a7dfe9b4c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/GetPropertyLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/GetPropertyLateIns.java @@ -24,8 +24,9 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * - * source: https://github.com/magicalhobo/SWFWire/blob/master/SWFWireDecompiler/src/com/swfwire/decompiler/abc/ABCInstructions.as + * + * source: + * https://github.com/magicalhobo/SWFWire/blob/master/SWFWireDecompiler/src/com/swfwire/decompiler/abc/ABCInstructions.as * collides with getouterscope */ public class GetPropertyLateIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/InvalidIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/InvalidIns.java index 8da047517..a235eed43 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/InvalidIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/InvalidIns.java @@ -27,7 +27,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * + * * source: ?? */ public class InvalidIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/MarkIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/MarkIns.java index 8683a197e..01bffae58 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/MarkIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/MarkIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class MarkIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/PrologueIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/PrologueIns.java index d614afbea..c744f545d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/PrologueIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/PrologueIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class PrologueIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/PushConstantIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/PushConstantIns.java index 8c23fde15..982309421 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/PushConstantIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/PushConstantIns.java @@ -29,7 +29,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * + * * source: ?? */ public class PushConstantIns extends InstructionDefinition { @@ -37,7 +37,7 @@ public class PushConstantIns extends InstructionDefinition { public PushConstantIns() { super(0x22, "pushconstant", new int[]{AVM2Code.OPT_U30}, false /*?*/, AVM2InstructionFlag.UNDOCUMENTED, AVM2InstructionFlag.UNKNOWN_STACK, AVM2InstructionFlag.NO_FLASH_PLAYER); } - + @Override public void verify(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) throws AVM2VerifyErrorException { if (lda.getRuntime() == AVM2Runtime.ADOBE_FLASH) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SendEnterIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SendEnterIns.java index 3dc3a0629..5e27a7048 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SendEnterIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SendEnterIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class SendEnterIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SetPropertyLateIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SetPropertyLateIns.java index 1f17b18e8..5fa7c666a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SetPropertyLateIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SetPropertyLateIns.java @@ -28,7 +28,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; /** * * @author JPEXS - * + * * source: ?? */ public class SetPropertyLateIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SweepIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SweepIns.java index 248bc1924..998f780e1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SweepIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/SweepIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class SweepIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/VerifyOpIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/VerifyOpIns.java index 8006e93e1..ecdf8db80 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/VerifyOpIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/VerifyOpIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class VerifyOpIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/VerifyPassIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/VerifyPassIns.java index 89d699b1a..a6776f541 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/VerifyPassIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/VerifyPassIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class VerifyPassIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/WbIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/WbIns.java index 8cc6d8f17..ac57deff6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/WbIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/unknown/WbIns.java @@ -29,7 +29,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; * * @author JPEXS * - * source: https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java + * source: + * https://github.com/apache/flex-sdk/blob/414b9a3e55effd243a697e614b702d1fa0b53efe/modules/asc/src/java/macromedia/abc/Opcodes.java */ public class WbIns extends InstructionDefinition { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java index 8abb5962a..d1ac9a3af 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/stack/PushScopeIns.java @@ -51,19 +51,19 @@ public class PushScopeIns extends InstructionDefinition { @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List output, String path) { GraphTargetItem top = stack.pop(); - + //Hack for catch inside catch to not detect pushscope register as used if (top instanceof LocalRegAVM2Item) { - LocalRegAVM2Item getLocal = (LocalRegAVM2Item)top;; - if(getLocal.getSrc() != null){ + LocalRegAVM2Item getLocal = (LocalRegAVM2Item) top;; + if (getLocal.getSrc() != null) { int getLocalIp = localData.code.adr2pos(getLocal.getSrc().getAddress()); - for(int setLocalPos : localData.setLocalPosToGetLocalPos.keySet()){ - if (localData.setLocalPosToGetLocalPos.get(setLocalPos).contains(getLocalIp)){ + for (int setLocalPos : localData.setLocalPosToGetLocalPos.keySet()) { + if (localData.setLocalPosToGetLocalPos.get(setLocalPos).contains(getLocalIp)) { localData.setLocalPosToGetLocalPos.get(setLocalPos).remove(getLocalIp); } } } - + } localData.localScopeStack.push(top); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java index 44522610c..574366830 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/types/CoerceAIns.java @@ -36,11 +36,7 @@ public class CoerceAIns extends InstructionDefinition implements CoerceOrConvert public CoerceAIns() { super(0x82, "coerce_a", new int[]{}, true); - } - - public String getTargetType() { - return "*"; - } + } @Override public boolean execute(LocalDataArea lda, AVM2ConstantPool constants, AVM2Instruction ins) { @@ -64,6 +60,10 @@ public class CoerceAIns extends InstructionDefinition implements CoerceOrConvert return 1; } + public String getTargetType() { + return "*"; + } + @Override public GraphTargetItem getTargetType(AVM2ConstantPool constants, AVM2Instruction ins) { return TypeItem.UNBOUNDED; 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 0e9d25bf9..bb754f655 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 @@ -111,15 +111,15 @@ public abstract class AVM2Item extends GraphTargetItem { if (empty) { return propertyName.toString(writer, localData); } - + if (propertyName instanceof FullMultinameAVM2Item) { - + HighlightData data = new HighlightData(); int multinameIndex = ((FullMultinameAVM2Item) propertyName).multinameIndex; int namespaceIndex = localData.constantsAvm2.getMultiname(multinameIndex).namespace_index; GraphTargetItem returnType = object.returnType(); if (returnType instanceof ApplyTypeAVM2Item) { - ApplyTypeAVM2Item ati = (ApplyTypeAVM2Item)returnType; + ApplyTypeAVM2Item ati = (ApplyTypeAVM2Item) returnType; data.propertyType = ati.object.toString(); data.propertySubType = ati.params.get(0).toString(); } else { @@ -127,9 +127,9 @@ public abstract class AVM2Item extends GraphTargetItem { } data.namespaceIndex = namespaceIndex; data.isStatic = isStatic; - + if (((FullMultinameAVM2Item) propertyName).name != null) { - if (((FullMultinameAVM2Item) propertyName).namespace != null) { + if (((FullMultinameAVM2Item) propertyName).namespace != null) { //writer.append("."); writer.hilightSpecial(".", HighlightSpecialType.PROPERTY_TYPE, 0, data); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java index 5e7310d4b..3f1187b8e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ApplyTypeAVM2Item.java @@ -114,7 +114,7 @@ public class ApplyTypeAVM2Item extends AVM2Item { //int qname = AVM2SourceGenerator.resolveType(localData, object, ((AVM2SourceGenerator)generator).abc, ((AVM2SourceGenerator)generator).allABCs); List nparams = new ArrayList<>(); for (GraphTargetItem i : params) { - nparams.addAll(i.toSource(localData, generator));//ins(AVM2Instructions.GetLex, AVM2SourceGenerator.resolveType(localData, i, ((AVM2SourceGenerator)generator).abc,((AVM2SourceGenerator)generator).allABCs))); + nparams.addAll(i.toSource(localData, generator)); } return toSourceMerge(localData, generator, object, @@ -140,7 +140,5 @@ public class ApplyTypeAVM2Item extends AVM2Item { } return ret; } - - } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java index 3e4256c0d..159f821bf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallAVM2Item.java @@ -43,7 +43,7 @@ public class CallAVM2Item extends AVM2Item { public List arguments; - private static abstract class Func implements Callable { + private abstract static class Func implements Callable { @Override public Object call(String methodName, List args) { @@ -227,10 +227,10 @@ public class CallAVM2Item extends AVM2Item { @Override public GraphTargetItem returnType() { if (function instanceof GetPropertyAVM2Item) { - return ((GetPropertyAVM2Item)function).callType; + return ((GetPropertyAVM2Item) function).callType; } if (function instanceof GetLexAVM2Item) { - return ((GetLexAVM2Item)function).callType; + return ((GetLexAVM2Item) function).callType; } return TypeItem.UNBOUNDED; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java index 1c0e4fd0e..f2d259373 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CallPropertyAVM2Item.java @@ -43,9 +43,9 @@ public class CallPropertyAVM2Item extends AVM2Item { public List arguments; public boolean isVoid; - + public GraphTargetItem type; - + public boolean isStatic; public CallPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, boolean isVoid, GraphTargetItem receiver, GraphTargetItem propertyName, List arguments, GraphTargetItem type, boolean isStatic) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java index 0e7173a23..0189c320f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ClassAVM2Item.java @@ -31,14 +31,14 @@ import com.jpexs.decompiler.graph.model.LocalData; public class ClassAVM2Item extends AVM2Item { public Multiname className; - + public DottedChain classNameAsStr; public ClassAVM2Item(Multiname className) { super(null, null, PRECEDENCE_PRIMARY); this.className = className; } - + public ClassAVM2Item(DottedChain className) { super(null, null, PRECEDENCE_PRIMARY); this.classNameAsStr = className; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java index 22a52d7a2..b67d77f44 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/CoerceAVM2Item.java @@ -127,15 +127,15 @@ public class CoerceAVM2Item extends AVM2Item { return false; } dependencies.add(value); - switch(typeObj.toString()) { + switch (typeObj.toString()) { case "String": case "Boolean": case "int": case "uint": case "Number": - return value.isConvertedCompileTime(dependencies); + return value.isConvertedCompileTime(dependencies); } - return false; + return false; } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java index 16001a682..aeffefd76 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructAVM2Item.java @@ -53,13 +53,13 @@ public class ConstructAVM2Item extends AVM2Item { return object.toString(writer, localData); } writer.append("new "); - - boolean objectIsCall = (object instanceof CallAVM2Item) || - (object instanceof CallPropertyAVM2Item) || - (object instanceof CallMethodAVM2Item) || - (object instanceof CallStaticAVM2Item) || - (object instanceof CallSuperAVM2Item); - + + boolean objectIsCall = (object instanceof CallAVM2Item) + || (object instanceof CallPropertyAVM2Item) + || (object instanceof CallMethodAVM2Item) + || (object instanceof CallStaticAVM2Item) + || (object instanceof CallSuperAVM2Item); + if (object.getPrecedence() > getPrecedence() || objectIsCall) { writer.append("("); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java index 0cd91408d..470388584 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/ConstructPropAVM2Item.java @@ -35,7 +35,7 @@ public class ConstructPropAVM2Item extends AVM2Item { public GraphTargetItem propertyName; public List args; - + public GraphTargetItem type; public ConstructPropAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName, List args, GraphTargetItem type) { @@ -73,7 +73,7 @@ public class ConstructPropAVM2Item extends AVM2Item { } @Override - public GraphTargetItem returnType() { + public GraphTargetItem returnType() { return type; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java index cd8791260..5de3d8565 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/DecrementAVM2Item.java @@ -68,11 +68,11 @@ public class DecrementAVM2Item extends AVM2Item { if (value.returnType().equals(TypeItem.UINT)) { return TypeItem.UINT; } - + if (value.returnType().equals(TypeItem.NUMBER)) { return TypeItem.NUMBER; } - + return TypeItem.NUMBER; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java index d8f970a9b..cd5a29e57 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetDescendantsAVM2Item.java @@ -72,7 +72,7 @@ public class GetDescendantsAVM2Item extends AVM2Item { } else { object.toString(writer, localData); } - + writer.append(".."); return multiname.toString(writer, localData); } 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 f2c5a69c2..935413e14 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 @@ -22,7 +22,6 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.SimpleValue; import com.jpexs.decompiler.graph.model.LocalData; import java.util.Objects; @@ -33,12 +32,12 @@ import java.util.Objects; public class GetLexAVM2Item extends AVM2Item { public Multiname propertyName; - + public GraphTargetItem type; - + public GraphTargetItem callType; - - public boolean isStatic; + + public boolean isStatic; private final DottedChain fullPropertyName; @@ -70,7 +69,7 @@ public class GetLexAVM2Item extends AVM2Item { @Override public boolean hasReturnValue() { return true; - } + } @Override public int hashCode() { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java index dc0460133..ea0a8a26b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetPropertyAVM2Item.java @@ -46,11 +46,11 @@ public class GetPropertyAVM2Item extends AVM2Item { public GraphTargetItem object; public GraphTargetItem propertyName; - + public GraphTargetItem type; - + public GraphTargetItem callType; - + public boolean isStatic; @Override @@ -157,11 +157,11 @@ public class GetPropertyAVM2Item extends AVM2Item { @Override public GraphTargetItem returnType() { if (object instanceof FindPropertyAVM2Item) { - FindPropertyAVM2Item fprop = (FindPropertyAVM2Item)object; + FindPropertyAVM2Item fprop = (FindPropertyAVM2Item) object; if (fprop.propertyName instanceof FullMultinameAVM2Item) { - FullMultinameAVM2Item fmul = (FullMultinameAVM2Item)fprop.propertyName; + FullMultinameAVM2Item fmul = (FullMultinameAVM2Item) fprop.propertyName; if (this.propertyName.equals(fmul)) { - switch(fmul.resolvedMultinameName) { + switch (fmul.resolvedMultinameName) { case "NaN": return TypeItem.NUMBER; case "undefined": 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 0a304a2b8..94b6747b9 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 @@ -37,7 +37,7 @@ public class GetSlotAVM2Item extends AVM2Item { public GraphTargetItem slotObject; public int slotIndex; - + public GraphTargetItem slotType; public GetSlotAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem scope, GraphTargetItem slotObject, int slotIndex, Multiname slotName, GraphTargetItem slotType) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java index dc7277473..eb83b770b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/GetSuperAVM2Item.java @@ -34,11 +34,11 @@ public class GetSuperAVM2Item extends AVM2Item { public FullMultinameAVM2Item propertyName; public GraphTargetItem type; - + public GraphTargetItem callType; - + public boolean isStatic; - + public GetSuperAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, FullMultinameAVM2Item propertyName, GraphTargetItem type, GraphTargetItem callType, boolean isStatic) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY); this.object = object; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java index 26c0a2548..a530b2acd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IncrementAVM2Item.java @@ -68,11 +68,11 @@ public class IncrementAVM2Item extends AVM2Item { if (value.returnType().equals(TypeItem.UINT)) { return TypeItem.UINT; } - + if (value.returnType().equals(TypeItem.NUMBER)) { return TypeItem.NUMBER; } - + return TypeItem.NUMBER; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java index 205050ffd..e87273a30 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitPropertyAVM2Item.java @@ -41,11 +41,11 @@ public class InitPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, A public GraphTargetItem compoundValue; public String compoundOperator; - + public GraphTargetItem type; - + public GraphTargetItem callType; - + public boolean isStatic; @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java index 87f59f94c..4bca47f65 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/InitVectorAVM2Item.java @@ -24,7 +24,6 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; import com.jpexs.decompiler.flash.abc.avm2.parser.script.AbcIndexing; import com.jpexs.decompiler.flash.abc.avm2.parser.script.NamespaceItem; 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.CompilationException; import com.jpexs.decompiler.graph.DottedChain; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java index 5705eb1b7..e2ee25a5f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/IntegerValueAVM2Item.java @@ -123,7 +123,7 @@ public class IntegerValueAVM2Item extends NumberValueAVM2Item implements Integer @Override public Object getResult() { - return value;//(Double) (double) (long) value; + return value; //(Double) (double) (long) value; } @Override @@ -146,7 +146,7 @@ public class IntegerValueAVM2Item extends NumberValueAVM2Item implements Integer } @Override - public GraphTargetItem returnType() { + public GraphTargetItem returnType() { return TypeItem.INT; } 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 79dc3ad57..10d766f10 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 @@ -40,10 +40,10 @@ public class LocalRegAVM2Item extends AVM2Item { public GraphTargetItem computedValue; public GraphTargetItem type; - + private final Object computedResult; - private boolean isCT = false; + private boolean isCT = false; public LocalRegAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, int regIndex, GraphTargetItem computedValue, GraphTargetItem type) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java index bb616d903..792f2f4ca 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NameValuePair.java @@ -46,18 +46,18 @@ public class NameValuePair extends AVM2Item { } @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { boolean needsParents = !((name.getNotCoerced() instanceof NumberValueAVM2Item) || (name.getNotCoerced() instanceof StringAVM2Item)); // special for obfuscated strings if (needsParents) { writer.append("("); } - if ((name instanceof ConvertAVM2Item) && ((ConvertAVM2Item)name).type.equals(TypeItem.STRING)) { + if ((name instanceof ConvertAVM2Item) && ((ConvertAVM2Item) name).type.equals(TypeItem.STRING)) { name = name.value; } name.toString(writer, localData); if (needsParents) { writer.append(")"); - } + } writer.append(":"); if (value instanceof TernarOpItem) { //Ternar operator contains ":" writer.append("("); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java index fd0ea8aa2..2cd355bcb 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NewActivationAVM2Item.java @@ -58,7 +58,7 @@ public class NewActivationAVM2Item extends AVM2Item { @Override public boolean hasReturnValue() { return true; - } + } @Override public int hashCode() { @@ -79,6 +79,5 @@ public class NewActivationAVM2Item extends AVM2Item { } return true; } - - + } 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 04e75bd3b..13e1231ff 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 @@ -51,7 +51,7 @@ public class NewFunctionAVM2Item extends AVM2Item { public int classIndex; public ABC abc; - + public int methodIndex; public ScopeStack scopeStack; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java index e4faaf307..d6d7d0421 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextNameAVM2Item.java @@ -38,7 +38,7 @@ public class NextNameAVM2Item extends AVM2Item { public GraphTargetItem index; public GraphTargetItem obj; - + public GraphTargetItem localReg; public NextNameAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem index, GraphTargetItem obj) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java index 7ee0ff66d..312c90083 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/NextValueAVM2Item.java @@ -38,7 +38,7 @@ public class NextValueAVM2Item extends AVM2Item { public GraphTargetItem index; public GraphTargetItem obj; - + public GraphTargetItem localReg; public NextValueAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem index, GraphTargetItem obj) { 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 d8d26f189..c84e81c3a 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 @@ -44,11 +44,11 @@ public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assig public GraphTargetItem compoundValue; public String compoundOperator; - + public GraphTargetItem type; - + public boolean hideValue = false; - + public boolean causedByDup = false; @Override @@ -84,7 +84,7 @@ public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assig writer.append(" = "); /*if (declaration != null && !declaration.type.equals(TypeItem.UNBOUNDED) && (value instanceof ConvertAVM2Item)) { return value.value.toString(writer, localData); - }*/ + }*/ return SetTypeIns.handleNumberToInt(value, type).toString(writer, localData); } @@ -151,7 +151,7 @@ public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assig } @Override - public GraphTargetItem returnType() { + public GraphTargetItem returnType() { return type; } @@ -215,6 +215,5 @@ public class SetLocalAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assig } return precedence; } - - + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java index 66fa477b0..cd92110fc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetPropertyAVM2Item.java @@ -48,11 +48,11 @@ public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, As public GraphTargetItem compoundValue; public String compoundOperator; - + public GraphTargetItem type; - + public GraphTargetItem callType; - + public boolean isStatic; @Override @@ -82,7 +82,7 @@ public class SetPropertyAVM2Item extends AVM2Item implements SetTypeAVM2Item, As public SetPropertyAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem object, GraphTargetItem propertyName, GraphTargetItem value, GraphTargetItem type, GraphTargetItem callType, boolean isStatic) { super(instruction, lineStartIns, PRECEDENCE_ASSIGMENT); this.object = object; - this.propertyName = propertyName; + this.propertyName = propertyName; this.value = value; this.type = type; this.callType = callType; 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 fa5fc480d..ffc1edd18 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 @@ -48,7 +48,7 @@ public class SetSlotAVM2Item extends AVM2Item implements SetTypeAVM2Item, Assign public GraphTargetItem compoundValue; public String compoundOperator; - + public GraphTargetItem type; @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java index 4179742ae..911876ef3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/SetSuperAVM2Item.java @@ -41,11 +41,11 @@ public class SetSuperAVM2Item extends AVM2Item implements SetTypeAVM2Item { public GraphTargetItem compoundValue; public String compoundOperator; - + public GraphTargetItem type; - + public GraphTargetItem callType; - + public boolean isStatic; @Override 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 eb7448ac2..50999639c 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 @@ -42,7 +42,7 @@ public class ThisAVM2Item extends AVM2Item { public DottedChain className; public boolean basicObject; - + public boolean showClassName; public ThisAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, DottedChain className, boolean basicObject, boolean showClassName) { @@ -50,7 +50,7 @@ public class ThisAVM2Item extends AVM2Item { this.className = className; this.basicObject = basicObject; this.showClassName = showClassName; - getSrcData().localName = "this"; + getSrcData().localName = "this"; } public boolean isBasicObject() { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java index 8fd285172..163779cae 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/XMLAVM2Item.java @@ -45,11 +45,11 @@ public class XMLAVM2Item extends AVM2Item { } @Override - public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { + public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { for (int i = 0; i < parts.size(); i++) { GraphTargetItem part = parts.get(i); GraphTargetItem partBefore = i > 0 ? parts.get(i - 1) : null; - GraphTargetItem partAfter = i < parts.size() - 1 ? parts.get(i + 1) : null; + GraphTargetItem partAfter = i < parts.size() - 1 ? parts.get(i + 1) : null; if (part instanceof StringAVM2Item) { String s = ((StringAVM2Item) part).getValue(); if (partAfter instanceof EscapeXAttrAVM2Item) { 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 6f4f6f7e5..577596f46 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 @@ -19,8 +19,6 @@ package com.jpexs.decompiler.flash.abc.avm2.model.clauses; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; import com.jpexs.decompiler.flash.abc.avm2.instructions.SetTypeIns; 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; import com.jpexs.decompiler.flash.abc.avm2.model.FullMultinameAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetSlotAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item; @@ -44,7 +42,7 @@ public class DeclarationAVM2Item extends AVM2Item { public GraphTargetItem assignment; public GraphTargetItem type; - + public boolean typeIsNull = false; public boolean showValue = true; @@ -63,8 +61,8 @@ public class DeclarationAVM2Item extends AVM2Item { public DeclarationAVM2Item(GraphTargetItem assignment) { this(assignment, null); - } - + } + @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { @@ -118,7 +116,7 @@ public class DeclarationAVM2Item extends AVM2Item { srcData.localName = ssti.getNameAsStr(localData); srcData.declaration = true; - GraphTargetItem val = ssti.value; + GraphTargetItem val = ssti.value; srcData.declaredType = (type instanceof TypeItem) ? ((TypeItem) type).fullTypeName : DottedChain.ALL; writer.append("var "); ssti.getName(writer, localData); @@ -138,7 +136,7 @@ public class DeclarationAVM2Item extends AVM2Item { srcData.localName = ((FullMultinameAVM2Item) spti.propertyName).resolvedMultinameName; srcData.declaration = true; - GraphTargetItem val = spti.value; + GraphTargetItem val = spti.value; srcData.declaredType = (type instanceof TypeItem) ? ((TypeItem) type).fullTypeName : DottedChain.ALL; writer.append("var "); writer.append(IdentifiersDeobfuscation.printIdentifier(true, ((FullMultinameAVM2Item) spti.propertyName).resolvedMultinameName)); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java index 11538e919..58655065f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForEachInAVM2Item.java @@ -68,7 +68,6 @@ public class ForEachInAVM2Item extends LoopItem implements Block { visitor.visit(expression); } - public ForEachInAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, InAVM2Item expression, List commands) { super(instruction, lineStartIns, loop); @@ -89,8 +88,6 @@ public class ForEachInAVM2Item extends LoopItem implements Block { } - */ - /* if (!commands.isEmpty()) { GraphTargetItem firstAssign = commands.get(0); if (firstAssign instanceof SetTypeAVM2Item) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java index 5337f78b9..41bd31fcf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/clauses/ForInAVM2Item.java @@ -18,8 +18,6 @@ package com.jpexs.decompiler.flash.abc.avm2.model.clauses; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; import com.jpexs.decompiler.flash.abc.avm2.model.InAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.SetTypeAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.flash.helpers.LoopWithType; @@ -70,10 +68,9 @@ public class ForInAVM2Item extends LoopItem implements Block { visitor.visit(expression); } - public ForInAVM2Item(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, InAVM2Item expression, List commands) { super(instruction, lineStartIns, loop); - + //Commented out - see the comment in ForEachInAVM2Item /*if (!commands.isEmpty()) { GraphTargetItem firstAssign = commands.get(0); 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 9215125be..315d0004a 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 @@ -94,7 +94,6 @@ public class TryAVM2Item extends AVM2Item implements Block { } - public TryAVM2Item(List tryCommands, List catchExceptions, List> catchCommands, List finallyCommands, String finCatchName) { super(null, null, NOPRECEDENCE); this.tryCommands = tryCommands; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java index cfd33ba76..5e098735d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AddAVM2Item.java @@ -19,7 +19,6 @@ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; -import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item; import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.decompiler.flash.ecma.EcmaType; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; @@ -103,20 +102,19 @@ public class AddAVM2Item extends BinaryOpItem implements CompoundableBinaryOp { if (leftType.equals(TypeItem.INT) && rightType.equals(TypeItem.INT)) { return TypeItem.INT; } - - if ((leftType.equals(TypeItem.INT) && rightType.equals(TypeItem.UINT))|| - (leftType.equals(TypeItem.UINT) && rightType.equals(TypeItem.INT)) - ) { + + if ((leftType.equals(TypeItem.INT) && rightType.equals(TypeItem.UINT)) + || (leftType.equals(TypeItem.UINT) && rightType.equals(TypeItem.INT))) { return TypeItem.INT; - } - + } + if (leftType.equals(TypeItem.UINT) && rightType.equals(TypeItem.UINT)) { return TypeItem.UINT; } - + if (leftType.equals(TypeItem.NUMBER) || rightType.equals(TypeItem.NUMBER)) { return TypeItem.NUMBER; - } + } return TypeItem.NUMBER; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java index 262e0f0c8..37f43120d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/AsTypeAVM2Item.java @@ -45,7 +45,7 @@ public class AsTypeAVM2Item extends BinaryOpItem { } @Override - public GraphTargetItem returnType() { + public GraphTargetItem returnType() { return rightSide.returnType(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java index 41ebbe023..c9b82ca52 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/DeletePropertyAVM2Item.java @@ -45,15 +45,15 @@ public class DeletePropertyAVM2Item extends AVM2Item { public GraphTargetItem object; public GraphTargetItem propertyName; - + private int line; public boolean isStatic; - + //Constructor for compiler public DeletePropertyAVM2Item(GraphTargetItem property, int line) { this(null, null, property, null, false); - this.line = line; + this.line = line; } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java index cbd46e65a..89672eec7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/ModuloAVM2Item.java @@ -80,7 +80,7 @@ public class ModuloAVM2Item extends BinaryOpItem implements CompoundableBinaryOp } @Override - public GraphTargetItem returnType() { + public GraphTargetItem returnType() { return TypeItem.NUMBER; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java index 560c173c6..eca6715dd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/MultiplyAVM2Item.java @@ -88,7 +88,7 @@ public class MultiplyAVM2Item extends BinaryOpItem implements CompoundableBinary if (leftType.equals(TypeItem.NUMBER) || rightType.equals(TypeItem.NUMBER)) { return TypeItem.NUMBER; } - + return TypeItem.NUMBER; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java index c7839929d..f2507c4bd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/SubtractAVM2Item.java @@ -19,7 +19,6 @@ package com.jpexs.decompiler.flash.abc.avm2.model.operations; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; -import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; @@ -88,24 +87,24 @@ public class SubtractAVM2Item extends BinaryOpItem implements CompoundableBinary public GraphTargetItem returnType() { GraphTargetItem leftType = leftSide.returnType(); GraphTargetItem rightType = rightSide.returnType(); - + if (leftType.equals(TypeItem.INT) && rightType.equals(TypeItem.INT)) { return TypeItem.INT; } - - if ((leftType.equals(TypeItem.INT) && rightType.equals(TypeItem.UINT))|| - (leftType.equals(TypeItem.UINT) && rightType.equals(TypeItem.INT))) { + + if ((leftType.equals(TypeItem.INT) && rightType.equals(TypeItem.UINT)) + || (leftType.equals(TypeItem.UINT) && rightType.equals(TypeItem.INT))) { return TypeItem.INT; - } - + } + if (leftType.equals(TypeItem.UINT) && rightType.equals(TypeItem.UINT)) { return TypeItem.INT; } - + if (leftType.equals(TypeItem.NUMBER) || rightType.equals(TypeItem.NUMBER)) { return TypeItem.NUMBER; } - + return TypeItem.NUMBER; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java index 734674a44..872a59760 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/model/operations/TypeOfAVM2Item.java @@ -46,7 +46,7 @@ public class TypeOfAVM2Item extends UnaryOpItem { if (dependencies.contains(value)) { return false; } - if (!((value instanceof SimpleValue) && ((SimpleValue)value).isSimpleValue())) { + if (!((value instanceof SimpleValue) && ((SimpleValue) value).isSimpleValue())) { dependencies.add(value); } return value.isCompileTime(dependencies); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java index 27de19403..7666ee4f4 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/ASM3Parser.java @@ -101,11 +101,7 @@ public class ASM3Parser { return label + " at address " + offset; } - } - - public static AVM2Code parse(ABC abc, Reader reader, Trait trait, MethodBody body, MethodInfo info) throws IOException, AVM2ParseException, InterruptedException { - return parse(abc, reader, trait, null, body, info); - } + } private static int checkMultinameIndex(AVM2ConstantPool constants, int index, int line) throws AVM2ParseException { if ((index < 0) || (index >= constants.getMultinameCount())) { @@ -113,7 +109,7 @@ public class ASM3Parser { } return index; } - + private static void expectEnd(Flasm3Lexer lexer) throws IOException, AVM2ParseException { expected(ParsedSymbol.TYPE_KEYWORD_END, "end", lexer); ParsedSymbol symb = lexer.lex(); @@ -136,7 +132,7 @@ public class ASM3Parser { } private static void parseTraitParams(ABC abc, Flasm3Lexer lexer, Trait t) throws IOException, AVM2ParseException { - ParsedSymbol symb;// = lexer.lex(); + ParsedSymbol symb; List>> metadata = new ArrayList<>(); @@ -190,13 +186,13 @@ public class ASM3Parser { t.kindFlags = flags; if ((flags & Trait.ATTR_Metadata) > 0) { - int metadataArray[] = new int[metadata.size()]; + int[] metadataArray = new int[metadata.size()]; for (int i = 0; i < metadata.size(); i++) { Map.Entry> entry = metadata.get(i); int mkey = abc.constants.getStringId(entry.getKey(), true); Map items = entry.getValue(); - int keys[] = new int[items.size()]; - int vals[] = new int[items.size()]; + int[] keys = new int[items.size()]; + int[] vals = new int[items.size()]; int pos = 0; for (String key : items.keySet()) { @@ -214,6 +210,86 @@ public class ASM3Parser { } + public static boolean parseClass(ABC abc, Reader reader, AVM2ConstantPool constants, TraitClass tc) throws IOException, AVM2ParseException { + Flasm3Lexer lexer = new Flasm3Lexer(reader); + return parseClass(abc, lexer, constants, tc); + } + + private static boolean parseClass(ABC abc, Flasm3Lexer lexer, AVM2ConstantPool constants, TraitClass tc) throws IOException, AVM2ParseException { + expected(ParsedSymbol.TYPE_KEYWORD_TRAIT, "trait", lexer); + expected(ParsedSymbol.TYPE_KEYWORD_CLASS, "class", lexer); + int name_index = parseMultiName(constants, lexer); + parseTraitParams(abc, lexer, tc); + expected(ParsedSymbol.TYPE_KEYWORD_SLOTID, "slotid", lexer); + ParsedSymbol symb; + symb = lexer.lex(); + expected(symb, ParsedSymbol.TYPE_INTEGER, "Integer", lexer.yyline()); + int slotid = (int) (Integer) symb.value; + + expected(ParsedSymbol.TYPE_KEYWORD_CLASS, "class", lexer); + expected(ParsedSymbol.TYPE_KEYWORD_INSTANCE, "instance", lexer); + + int instance_name_index = parseMultiName(constants, lexer); + expected(ParsedSymbol.TYPE_KEYWORD_EXTENDS, "extends", lexer); + int super_index = parseMultiName(constants, lexer); + symb = lexer.lex(); + List ifacesList = new ArrayList<>(); + while (symb.type == ParsedSymbol.TYPE_KEYWORD_IMPLEMENTS) { + ifacesList.add(parseMultiName(constants, lexer)); + symb = lexer.lex(); + } + int[] interfaces = new int[ifacesList.size()]; + for (int i = 0; i < ifacesList.size(); i++) { + interfaces[i] = ifacesList.get(i); + } + int instanceFlags = 0; + while (symb.type == ParsedSymbol.TYPE_KEYWORD_FLAG) { + symb = lexer.lex(); + switch (symb.type) { + case ParsedSymbol.TYPE_KEYWORD_SEALED: + instanceFlags |= InstanceInfo.CLASS_SEALED; + break; + case ParsedSymbol.TYPE_KEYWORD_FINAL: + instanceFlags |= InstanceInfo.CLASS_FINAL; + break; + case ParsedSymbol.TYPE_KEYWORD_INTERFACE: + instanceFlags |= InstanceInfo.CLASS_INTERFACE; + break; + case ParsedSymbol.TYPE_KEYWORD_PROTECTEDNS: + instanceFlags |= InstanceInfo.CLASS_PROTECTEDNS; + break; + case ParsedSymbol.TYPE_KEYWORD_NON_NULLABLE: + instanceFlags |= InstanceInfo.CLASS_NON_NULLABLE; + break; + default: + throw new AVM2ParseException("SEALED,FINAL,INTERFACE,PROTECTEDNS or NON_NULLABLE expected", lexer.yyline()); + } + symb = lexer.lex(); + } + int protectedns = 0; + if (symb.type == ParsedSymbol.TYPE_KEYWORD_PROTECTEDNS_BLOCK && ((instanceFlags & InstanceInfo.CLASS_PROTECTEDNS) == InstanceInfo.CLASS_PROTECTEDNS)) { + protectedns = parseNamespace(constants, lexer); + } else { + lexer.pushback(symb); + } + expectEnd(lexer); //instance + expectEnd(lexer); //class + expectEnd(lexer); //trait + + InstanceInfo ii = abc.instance_info.get(tc.class_info); + ii.name_index = instance_name_index; + ii.super_index = super_index; + ii.interfaces = interfaces; + ii.flags = instanceFlags; + if ((instanceFlags & InstanceInfo.CLASS_PROTECTEDNS) == InstanceInfo.CLASS_PROTECTEDNS) { + ii.protectedNS = protectedns; + } + + tc.slot_id = slotid; + + return true; + } + private static boolean parseSlotConst(ABC abc, Flasm3Lexer lexer, AVM2ConstantPool constants, TraitSlotConst tsc) throws IOException, AVM2ParseException { expected(ParsedSymbol.TYPE_KEYWORD_TRAIT, "trait", lexer); ParsedSymbol symb = lexer.lex(); @@ -248,86 +324,6 @@ public class ASM3Parser { return true; } - public static boolean parseClass(ABC abc, Reader reader, AVM2ConstantPool constants, TraitClass tc) throws IOException, AVM2ParseException { - Flasm3Lexer lexer = new Flasm3Lexer(reader); - return parseClass(abc, lexer, constants, tc); - } - - private static boolean parseClass(ABC abc, Flasm3Lexer lexer, AVM2ConstantPool constants, TraitClass tc) throws IOException, AVM2ParseException { - expected(ParsedSymbol.TYPE_KEYWORD_TRAIT, "trait", lexer); - expected(ParsedSymbol.TYPE_KEYWORD_CLASS, "class", lexer); - int name_index = parseMultiName(constants, lexer); - parseTraitParams(abc, lexer, tc); - expected(ParsedSymbol.TYPE_KEYWORD_SLOTID, "slotid", lexer); - ParsedSymbol symb; - symb = lexer.lex(); - expected(symb, ParsedSymbol.TYPE_INTEGER, "Integer", lexer.yyline()); - int slotid = (int) (Integer) symb.value; - - expected(ParsedSymbol.TYPE_KEYWORD_CLASS, "class", lexer); - expected(ParsedSymbol.TYPE_KEYWORD_INSTANCE, "instance", lexer); - - int instance_name_index = parseMultiName(constants, lexer); - expected(ParsedSymbol.TYPE_KEYWORD_EXTENDS, "extends", lexer); - int super_index = parseMultiName(constants, lexer); - symb = lexer.lex(); - List ifacesList = new ArrayList<>(); - while (symb.type == ParsedSymbol.TYPE_KEYWORD_IMPLEMENTS) { - ifacesList.add(parseMultiName(constants, lexer)); - symb = lexer.lex(); - } - int interfaces[] = new int[ifacesList.size()]; - for(int i = 0; i < ifacesList.size(); i++) { - interfaces[i] = ifacesList.get(i); - } - int instanceFlags = 0; - while (symb.type == ParsedSymbol.TYPE_KEYWORD_FLAG) { - symb = lexer.lex(); - switch (symb.type) { - case ParsedSymbol.TYPE_KEYWORD_SEALED: - instanceFlags |= InstanceInfo.CLASS_SEALED; - break; - case ParsedSymbol.TYPE_KEYWORD_FINAL: - instanceFlags |= InstanceInfo.CLASS_FINAL; - break; - case ParsedSymbol.TYPE_KEYWORD_INTERFACE: - instanceFlags |= InstanceInfo.CLASS_INTERFACE; - break; - case ParsedSymbol.TYPE_KEYWORD_PROTECTEDNS: - instanceFlags |= InstanceInfo.CLASS_PROTECTEDNS; - break; - case ParsedSymbol.TYPE_KEYWORD_NON_NULLABLE: - instanceFlags |= InstanceInfo.CLASS_NON_NULLABLE; - break; - default: - throw new AVM2ParseException("SEALED,FINAL,INTERFACE,PROTECTEDNS or NON_NULLABLE expected", lexer.yyline()); - } - symb = lexer.lex(); - } - int protectedns = 0; - if (symb.type == ParsedSymbol.TYPE_KEYWORD_PROTECTEDNS_BLOCK && ((instanceFlags & InstanceInfo.CLASS_PROTECTEDNS)==InstanceInfo.CLASS_PROTECTEDNS)) { - protectedns = parseNamespace(constants, lexer); - } else { - lexer.pushback(symb); - } - expectEnd(lexer); //instance - expectEnd(lexer); //class - expectEnd(lexer); //trait - - InstanceInfo ii = abc.instance_info.get(tc.class_info); - ii.name_index = instance_name_index; - ii.super_index = super_index; - ii.interfaces = interfaces; - ii.flags = instanceFlags; - if ((instanceFlags & InstanceInfo.CLASS_PROTECTEDNS)==InstanceInfo.CLASS_PROTECTEDNS) { - ii.protectedNS = protectedns; - } - - tc.slot_id = slotid; - - return true; - } - public static boolean parseSlotConst(ABC abc, Reader reader, AVM2ConstantPool constants, TraitSlotConst tsc) throws IOException, AVM2ParseException { Flasm3Lexer lexer = new Flasm3Lexer(reader); return parseSlotConst(abc, lexer, constants, tsc); @@ -419,9 +415,9 @@ public class ASM3Parser { expected(ParsedSymbol.TYPE_PARENT_OPEN, "(", lexer); ParsedSymbol name = lexer.lex(); if (name.type == ParsedSymbol.TYPE_KEYWORD_NULL) { - + //empty } else if (name.type == ParsedSymbol.TYPE_STRING) { - + //empty } else { throw new AVM2ParseException("String or null expected", lexer.yyline()); } @@ -736,6 +732,10 @@ public class ASM3Parser { } return new ValueKind(value_index, value_kind); } + + public static AVM2Code parse(ABC abc, Reader reader, Trait trait, MethodBody body, MethodInfo info) throws IOException, AVM2ParseException, InterruptedException { + return parse(abc, reader, trait, null, body, info); + } public static AVM2Code parse(ABC abc, Reader reader, Trait trait, MissingSymbolHandler missingHandler, MethodBody body, MethodInfo info) throws IOException, AVM2ParseException, InterruptedException { AVM2ConstantPool constants = abc.constants; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java index b8636d048..bb7dc46df 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java @@ -20,1930 +20,1971 @@ import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException; import java.util.Stack; /** - * This class is a scanner generated by - * JFlex 1.6.0 - * from the specification file C:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript3_pcode.flex + * This class is a scanner generated by + * JFlex 1.6.0 from the specification file + * C:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript3_pcode.flex */ public final class Flasm3Lexer { - /** 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 PARAMETERS = 4; + /** + * lexical states + */ + public static final int YYINITIAL = 0; + public static final int STRING = 2; + public static final int PARAMETERS = 4; - /** - * 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 - }; + /** + * 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 + }; - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED = - "\11\12\1\4\1\2\1\65\1\66\1\1\16\12\4\0\1\35\1\0"+ - "\1\47\1\0\1\11\2\0\1\62\1\52\1\53\1\0\1\20\1\56"+ - "\1\15\1\16\1\0\1\14\7\7\1\60\1\7\1\13\1\3\1\54"+ - "\1\0\1\55\2\0\1\33\1\21\1\24\1\36\1\17\1\41\1\37"+ - "\1\45\1\27\1\11\1\44\1\42\1\5\1\31\1\30\1\25\1\50"+ - "\1\34\1\32\1\26\1\43\1\46\1\51\1\23\1\40\1\11\1\6"+ - "\1\22\1\10\1\0\1\57\1\0\1\33\1\21\1\24\1\36\1\17"+ - "\1\41\1\37\1\45\1\27\1\11\1\44\1\42\1\5\1\31\1\30"+ - "\1\25\1\50\1\34\1\32\1\26\1\43\1\46\1\51\1\23\1\40"+ - "\1\11\1\63\1\0\1\64\1\0\6\12\1\67\32\12\2\0\4\11"+ - "\1\0\1\61\2\0\1\11\2\0\1\12\7\0\1\11\4\0\1\11"+ - "\5\0\27\11\1\0\37\11\1\0\70\11\2\27\115\11\1\32\u0142\11"+ - "\4\0\14\11\16\0\5\11\7\0\1\11\1\0\1\11\21\0\160\12"+ - "\5\11\1\0\2\11\2\0\4\11\1\0\1\11\6\0\1\11\1\0"+ - "\3\11\1\0\1\11\1\0\24\11\1\0\123\11\1\0\213\11\1\0"+ - "\5\12\2\0\246\11\1\0\46\11\2\0\1\11\6\0\51\11\6\0"+ - "\1\11\1\0\55\12\1\0\1\12\1\0\2\12\1\0\2\12\1\0"+ - "\1\12\10\0\33\11\4\0\4\11\15\0\6\12\5\0\1\11\4\0"+ - "\13\12\1\0\1\12\3\0\53\11\37\12\4\0\2\11\1\12\143\11"+ - "\1\0\1\11\10\12\1\0\6\12\2\11\2\12\1\0\4\12\2\11"+ - "\12\12\3\11\2\0\1\11\17\0\1\12\1\11\1\12\36\11\33\12"+ - "\2\0\131\11\13\12\1\11\16\0\12\12\41\11\11\12\2\11\4\0"+ - "\1\11\2\0\1\12\30\11\4\12\1\11\11\12\1\11\3\12\1\11"+ - "\5\12\22\0\31\11\3\12\4\0\13\11\5\0\30\11\1\0\6\11"+ - "\1\0\2\12\6\0\10\12\52\11\72\12\66\11\3\12\1\11\22\12"+ - "\1\11\7\12\12\11\2\12\2\0\12\12\1\0\20\11\3\12\1\0"+ - "\10\11\2\0\2\11\2\0\26\11\1\0\7\11\1\0\1\11\3\0"+ - "\4\11\2\0\1\12\1\11\7\12\2\0\2\12\2\0\3\12\1\11"+ - "\10\0\1\12\4\0\2\11\1\0\3\11\2\12\2\0\12\12\4\11"+ - "\7\0\2\11\1\0\1\12\2\0\3\12\1\0\6\11\4\0\2\11"+ - "\2\0\26\11\1\0\7\11\1\0\2\11\1\0\2\11\1\0\2\11"+ - "\2\0\1\12\1\0\5\12\4\0\2\12\2\0\3\12\3\0\1\12"+ - "\7\0\4\11\1\0\1\11\7\0\14\12\3\11\1\12\13\0\3\12"+ - "\1\0\11\11\1\0\3\11\1\0\26\11\1\0\7\11\1\0\2\11"+ - "\1\0\5\11\2\0\1\12\1\11\10\12\1\0\3\12\1\0\3\12"+ - "\2\0\1\11\17\0\2\11\2\12\2\0\12\12\1\0\1\11\7\0"+ - "\1\11\6\12\1\0\3\12\1\0\10\11\2\0\2\11\2\0\26\11"+ - "\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11\7\12"+ - "\2\0\2\12\2\0\3\12\7\0\3\12\4\0\2\11\1\0\3\11"+ - "\2\12\2\0\12\12\1\0\1\11\20\0\1\12\1\11\1\0\6\11"+ - "\3\0\3\11\1\0\4\11\3\0\2\11\1\0\1\11\1\0\2\11"+ - "\3\0\2\11\3\0\3\11\3\0\14\11\4\0\5\12\3\0\3\12"+ - "\1\0\4\12\2\0\1\11\6\0\1\12\16\0\12\12\11\0\1\11"+ - "\6\0\5\12\10\11\1\0\3\11\1\0\27\11\1\0\20\11\2\0"+ - "\1\12\1\11\7\12\1\0\3\12\1\0\4\12\7\0\2\12\1\0"+ - "\3\11\2\0\1\11\2\0\2\11\2\12\2\0\12\12\20\0\1\11"+ - "\3\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0\12\11\1\0"+ - "\5\11\2\0\1\12\1\11\7\12\1\0\3\12\1\0\4\12\7\0"+ - "\2\12\6\0\2\11\1\0\2\11\2\12\2\0\12\12\1\0\2\11"+ - "\15\0\4\12\11\11\1\0\3\11\1\0\51\11\2\12\1\11\7\12"+ - "\1\0\3\12\1\0\4\12\1\11\5\0\3\11\1\12\7\0\3\11"+ - "\2\12\2\0\12\12\12\0\6\11\1\0\3\12\1\0\22\11\3\0"+ - "\30\11\1\0\11\11\1\0\1\11\2\0\7\11\3\0\1\12\4\0"+ - "\6\12\1\0\1\12\1\0\10\12\6\0\12\12\2\0\2\12\15\0"+ - "\60\11\1\12\2\11\7\12\4\0\10\11\10\12\1\0\12\12\47\0"+ - "\2\11\1\0\1\11\1\0\5\11\1\0\30\11\1\0\1\11\1\0"+ - "\12\11\1\12\2\11\11\12\1\11\2\0\5\11\1\0\1\11\1\0"+ - "\6\12\2\0\12\12\2\0\4\11\40\0\1\11\27\0\2\12\6\0"+ - "\12\12\13\0\1\12\1\0\1\12\1\0\1\12\4\0\2\12\10\11"+ - "\1\0\44\11\4\0\24\12\1\0\2\12\5\11\13\12\1\0\44\12"+ - "\11\0\1\12\71\0\53\11\24\12\1\11\12\12\6\0\6\11\4\12"+ - "\4\11\3\12\1\11\3\12\2\11\7\12\3\11\4\12\15\11\14\12"+ - "\1\11\17\12\2\0\46\11\1\0\1\11\5\0\1\11\2\0\53\11"+ - "\1\0\u014d\11\1\0\4\11\2\0\7\11\1\0\1\11\1\0\4\11"+ - "\2\0\51\11\1\0\4\11\2\0\41\11\1\0\4\11\2\0\7\11"+ - "\1\0\1\11\1\0\4\11\2\0\17\11\1\0\71\11\1\0\4\11"+ - "\2\0\103\11\2\0\3\12\40\0\20\11\20\0\126\11\2\0\6\11"+ - "\3\0\u026c\11\2\0\21\11\1\0\32\11\5\0\113\11\3\0\13\11"+ - "\7\0\22\11\4\12\11\0\23\11\3\12\13\0\22\11\2\12\14\0"+ - "\15\11\1\0\3\11\1\0\2\12\14\0\64\11\40\12\3\0\1\11"+ - "\3\0\2\11\1\12\2\0\12\12\41\0\17\12\6\0\131\11\7\0"+ - "\5\11\2\12\42\11\1\12\1\11\5\0\106\11\12\0\37\11\1\0"+ - "\14\12\4\0\14\12\12\0\12\12\36\11\2\0\5\11\13\0\54\11"+ - "\4\0\32\11\6\0\12\12\46\0\27\11\5\12\4\0\65\11\12\12"+ - "\1\0\35\12\2\0\13\12\6\0\12\12\15\0\1\11\10\0\16\12"+ - "\1\0\20\12\61\0\5\12\57\11\21\12\10\11\3\0\12\12\21\0"+ - "\11\12\14\0\3\12\36\11\15\12\2\11\12\12\54\11\16\12\14\0"+ - "\44\11\24\12\10\0\12\12\3\0\3\11\12\12\44\11\2\0\11\11"+ - "\7\0\53\11\2\0\3\11\20\0\3\12\1\0\25\12\4\11\1\12"+ - "\6\11\1\12\2\11\3\12\1\11\5\0\300\11\100\12\u0116\11\2\0"+ - "\6\11\2\0\46\11\2\0\6\11\2\0\10\11\1\0\1\11\1\0"+ - "\1\11\1\0\1\11\1\0\37\11\2\0\65\11\1\0\7\11\1\0"+ - "\1\11\3\0\3\11\1\0\7\11\3\0\4\11\2\0\6\11\4\0"+ - "\15\11\5\0\3\11\1\0\7\11\16\0\5\12\30\0\1\65\1\65"+ - "\5\12\20\0\2\11\23\0\1\11\13\0\5\12\1\0\12\12\1\0"+ - "\1\11\15\0\1\11\20\0\15\11\3\0\41\11\17\0\15\12\4\0"+ - "\1\12\3\0\14\12\21\0\1\11\4\0\1\11\2\0\12\11\1\0"+ - "\1\11\3\0\5\11\6\0\1\11\1\0\1\11\1\0\1\11\1\0"+ - "\1\44\3\11\1\0\13\11\2\0\4\11\5\0\5\11\4\0\1\11"+ - "\21\0\51\11\u0a77\0\345\11\6\0\4\11\3\12\2\11\14\0\46\11"+ - "\1\0\1\11\5\0\1\11\2\0\70\11\7\0\1\11\17\0\1\12"+ - "\27\11\11\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11\1\0"+ - "\7\11\1\0\7\11\1\0\7\11\1\0\7\11\1\0\40\12\57\0"+ - "\1\11\u01d5\0\3\11\31\0\11\11\6\12\1\0\5\11\2\0\5\11"+ - "\4\0\126\11\2\0\2\12\2\0\3\11\1\0\132\11\1\0\4\11"+ - "\5\0\53\11\1\0\136\11\21\0\40\11\60\0\20\11\u0200\0\u19c0\11"+ - "\100\0\u568d\11\103\0\56\11\2\0\u010d\11\3\0\20\11\12\12\2\11"+ - "\24\0\57\11\1\12\4\0\12\12\1\0\37\11\2\12\120\11\2\12"+ - "\45\0\11\11\2\0\147\11\2\0\100\11\5\0\2\11\1\0\1\11"+ - "\1\0\5\11\30\0\20\11\1\12\3\11\1\12\4\11\1\12\27\11"+ - "\5\12\4\0\1\12\13\0\1\11\7\0\64\11\14\0\2\12\62\11"+ - "\22\12\12\0\12\12\6\0\22\12\6\11\3\0\1\11\1\0\2\11"+ - "\13\12\34\11\10\12\2\0\27\11\15\12\14\0\35\11\3\0\4\12"+ - "\57\11\16\12\16\0\1\11\12\12\6\0\5\11\1\12\12\11\12\12"+ - "\5\11\1\0\51\11\16\12\11\0\3\11\1\12\10\11\2\12\2\0"+ - "\12\12\6\0\27\11\3\0\1\11\3\12\62\11\1\12\1\11\3\12"+ - "\2\11\2\12\5\11\2\12\1\11\1\12\1\11\30\0\3\11\2\0"+ - "\13\11\5\12\2\0\3\11\2\12\12\0\6\11\2\0\6\11\2\0"+ - "\6\11\11\0\7\11\1\0\7\11\1\0\53\11\1\0\16\11\6\0"+ - "\163\11\10\12\1\0\2\12\2\0\12\12\6\0\u2ba4\11\14\0\27\11"+ - "\4\0\61\11\u2104\0\u016e\11\2\0\152\11\46\0\7\11\14\0\5\11"+ - "\5\0\1\11\1\12\12\11\1\0\15\11\1\0\5\11\1\0\1\11"+ - "\1\0\2\11\1\0\2\11\1\0\154\11\41\0\u016b\11\22\0\100\11"+ - "\2\0\66\11\50\0\15\11\3\0\20\12\20\0\20\12\3\0\2\11"+ - "\30\0\3\11\31\0\1\11\6\0\5\11\1\0\207\11\2\0\1\12"+ - "\4\0\1\11\13\0\12\12\7\0\32\11\4\0\1\11\1\0\32\11"+ - "\13\0\131\11\3\0\6\11\2\0\6\11\2\0\6\11\2\0\3\11"+ - "\3\0\2\11\3\0\2\11\22\0\3\12\4\0\14\11\1\0\32\11"+ - "\1\0\23\11\1\0\2\11\1\0\17\11\2\0\16\11\42\0\173\11"+ - "\105\0\65\11\210\0\1\12\202\0\35\11\3\0\61\11\17\0\1\12"+ - "\37\0\40\11\15\0\36\11\5\0\46\11\5\12\5\0\36\11\2\0"+ - "\44\11\4\0\10\11\1\0\5\11\52\0\236\11\2\0\12\12\6\0"+ - "\44\11\4\0\44\11\4\0\50\11\10\0\64\11\14\0\13\11\1\0"+ - "\17\11\1\0\7\11\1\0\2\11\1\0\13\11\1\0\17\11\1\0"+ - "\7\11\1\0\2\11\103\0\u0137\11\11\0\26\11\12\0\10\11\30\0"+ - "\6\11\1\0\52\11\1\0\11\11\105\0\6\11\2\0\1\11\1\0"+ - "\54\11\1\0\2\11\3\0\1\11\2\0\27\11\12\0\27\11\11\0"+ - "\37\11\101\0\23\11\1\0\2\11\12\0\26\11\12\0\32\11\106\0"+ - "\70\11\6\0\2\11\100\0\1\11\3\12\1\0\2\12\5\0\4\12"+ - "\4\11\1\0\3\11\1\0\35\11\2\0\3\12\4\0\1\12\40\0"+ - "\35\11\3\0\35\11\43\0\10\11\1\0\34\11\2\12\31\0\66\11"+ - "\12\0\26\11\12\0\23\11\15\0\22\11\156\0\111\11\67\0\63\11"+ - "\15\0\63\11\15\0\44\11\4\12\10\0\12\12\u0146\0\52\11\1\0"+ - "\2\12\3\0\2\11\116\0\35\11\12\0\1\11\10\0\26\11\13\12"+ - "\37\0\22\11\4\12\52\0\25\11\33\0\27\11\11\0\3\12\65\11"+ - "\17\12\37\0\13\12\2\11\2\12\1\11\11\0\4\12\55\11\13\12"+ - "\2\0\1\12\4\0\1\12\12\0\1\12\2\0\31\11\7\0\12\12"+ - "\6\0\3\12\44\11\16\12\1\0\12\12\4\0\1\11\2\12\1\11"+ - "\10\0\43\11\1\12\2\0\1\11\11\0\3\12\60\11\16\12\4\11"+ - "\4\0\4\12\1\0\14\12\1\11\1\0\1\11\43\0\22\11\1\0"+ - "\31\11\14\12\6\0\1\12\101\0\7\11\1\0\1\11\1\0\4\11"+ - "\1\0\17\11\1\0\12\11\7\0\57\11\14\12\5\0\12\12\6\0"+ - "\4\12\1\0\10\11\2\0\2\11\2\0\26\11\1\0\7\11\1\0"+ - "\2\11\1\0\5\11\1\0\2\12\1\11\7\12\2\0\2\12\2\0"+ - "\3\12\2\0\1\11\6\0\1\12\5\0\5\11\2\12\2\0\7\12"+ - "\3\0\5\12\213\0\65\11\22\12\4\11\5\0\12\12\4\0\1\12"+ - "\3\11\36\0\60\11\24\12\2\11\1\0\1\11\10\0\12\12\246\0"+ - "\57\11\7\12\2\0\11\12\27\0\4\11\2\12\42\0\60\11\21\12"+ - "\3\0\1\11\13\0\12\12\46\0\53\11\15\12\1\11\7\0\12\12"+ - "\66\0\33\11\2\0\17\12\4\0\12\12\6\0\7\11\271\0\54\11"+ - "\17\12\145\0\100\11\12\12\25\0\10\11\2\0\1\11\2\0\10\11"+ - "\1\0\2\11\1\0\30\11\6\12\1\0\2\12\2\0\4\12\1\11"+ - "\1\12\1\11\2\12\14\0\12\12\106\0\10\11\2\0\47\11\7\12"+ - "\2\0\7\12\1\11\1\0\1\11\1\12\33\0\1\11\12\12\50\11"+ - "\7\12\1\11\4\12\10\0\1\12\10\0\1\11\13\12\56\11\20\12"+ - "\3\0\1\11\22\0\111\11\u0107\0\11\11\1\0\45\11\10\12\1\0"+ - "\10\12\1\11\17\0\12\12\30\0\36\11\2\0\26\12\1\0\16\12"+ - "\111\0\7\11\1\0\2\11\1\0\46\11\6\12\3\0\1\12\1\0"+ - "\2\12\1\0\7\12\1\11\1\12\10\0\12\12\6\0\6\11\1\0"+ - "\2\11\1\0\40\11\5\12\1\0\2\12\1\0\5\12\1\11\7\0"+ - "\12\12\u0136\0\23\11\4\12\271\0\1\11\54\0\4\11\37\0\u039a\11"+ - "\146\0\157\11\21\0\304\11\u0a4c\0\141\11\17\0\u042f\11\1\0\11\12"+ - "\u0fc7\0\u0247\11\u21b9\0\u0239\11\7\0\37\11\1\0\12\12\6\0\117\11"+ - "\1\0\12\12\6\0\36\11\2\0\5\12\13\0\60\11\7\12\11\0"+ - "\4\11\14\0\12\12\11\0\25\11\5\0\23\11\u02b0\0\100\11\200\0"+ - "\113\11\4\0\1\12\1\11\67\12\7\0\4\12\15\11\100\0\2\11"+ - "\1\0\1\11\1\12\13\0\2\12\16\0\u17f8\11\10\0\u04d6\11\52\0"+ - "\11\11\u22e7\0\4\11\1\0\7\11\1\0\2\11\1\0\u0123\11\55\0"+ - "\3\11\21\0\4\11\10\0\u018c\11\u0904\0\153\11\5\0\15\11\3\0"+ - "\11\11\7\0\12\11\3\0\2\12\1\0\4\12\u125c\0\56\12\2\0"+ - "\27\12\u021e\0\5\12\3\0\26\12\2\0\7\12\36\0\4\12\224\0"+ - "\3\12\u01bb\0\125\11\1\0\107\11\1\0\2\11\2\0\1\11\2\0"+ - "\2\11\2\0\4\11\1\0\14\11\1\0\1\11\1\0\7\11\1\0"+ - "\101\11\1\0\4\11\2\0\10\11\1\0\7\11\1\0\34\11\1\0"+ - "\4\11\1\0\5\11\1\0\1\11\3\0\7\11\1\0\u0154\11\2\0"+ - "\31\11\1\0\31\11\1\0\37\11\1\0\31\11\1\0\37\11\1\0"+ - "\31\11\1\0\37\11\1\0\31\11\1\0\37\11\1\0\31\11\1\0"+ - "\10\11\2\0\62\12\u0200\0\67\12\4\0\62\12\10\0\1\12\16\0"+ - "\1\12\26\0\5\12\1\0\17\12\u0450\0\37\11\341\0\7\12\1\0"+ - "\21\12\2\0\7\12\1\0\2\12\1\0\5\12\325\0\55\11\3\0"+ - "\7\12\7\11\2\0\12\12\4\0\1\11\u0141\0\36\11\1\12\21\0"+ - "\54\11\16\12\5\0\1\11\u04e0\0\7\11\1\0\4\11\1\0\2\11"+ - "\1\0\17\11\1\0\305\11\13\0\7\12\51\0\104\11\7\12\1\11"+ - "\4\0\12\12\u0356\0\1\11\u014f\0\4\11\1\0\33\11\1\0\2\11"+ - "\1\0\1\11\2\0\1\11\1\0\12\11\1\0\4\11\1\0\1\11"+ - "\1\0\1\11\6\0\1\11\4\0\1\11\1\0\1\11\1\0\1\11"+ - "\1\0\3\11\1\0\2\11\1\0\1\11\2\0\1\11\1\0\1\11"+ - "\1\0\1\11\1\0\1\11\1\0\1\11\1\0\2\11\1\0\1\11"+ - "\2\0\4\11\1\0\7\11\1\0\4\11\1\0\4\11\1\0\1\11"+ - "\1\0\12\11\1\0\21\11\5\0\3\11\1\0\5\11\1\0\21\11"+ - "\u0d34\0\12\12\u0406\0\ua6e0\11\40\0\u1039\11\7\0\336\11\2\0\u1682\11"+ - "\16\0\u1d31\11\u0c1f\0\u021e\11\u05e2\0\u134b\11\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uecc0\0"+ - "\1\12\36\0\140\12\200\0\360\12\uffff\0\uffff\0\ufe12\0"; + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED + = "\11\12\1\4\1\2\1\65\1\66\1\1\16\12\4\0\1\35\1\0" + + "\1\47\1\0\1\11\2\0\1\62\1\52\1\53\1\0\1\20\1\56" + + "\1\15\1\16\1\0\1\14\7\7\1\60\1\7\1\13\1\3\1\54" + + "\1\0\1\55\2\0\1\33\1\21\1\24\1\36\1\17\1\41\1\37" + + "\1\45\1\27\1\11\1\44\1\42\1\5\1\31\1\30\1\25\1\50" + + "\1\34\1\32\1\26\1\43\1\46\1\51\1\23\1\40\1\11\1\6" + + "\1\22\1\10\1\0\1\57\1\0\1\33\1\21\1\24\1\36\1\17" + + "\1\41\1\37\1\45\1\27\1\11\1\44\1\42\1\5\1\31\1\30" + + "\1\25\1\50\1\34\1\32\1\26\1\43\1\46\1\51\1\23\1\40" + + "\1\11\1\63\1\0\1\64\1\0\6\12\1\67\32\12\2\0\4\11" + + "\1\0\1\61\2\0\1\11\2\0\1\12\7\0\1\11\4\0\1\11" + + "\5\0\27\11\1\0\37\11\1\0\70\11\2\27\115\11\1\32\u0142\11" + + "\4\0\14\11\16\0\5\11\7\0\1\11\1\0\1\11\21\0\160\12" + + "\5\11\1\0\2\11\2\0\4\11\1\0\1\11\6\0\1\11\1\0" + + "\3\11\1\0\1\11\1\0\24\11\1\0\123\11\1\0\213\11\1\0" + + "\5\12\2\0\246\11\1\0\46\11\2\0\1\11\6\0\51\11\6\0" + + "\1\11\1\0\55\12\1\0\1\12\1\0\2\12\1\0\2\12\1\0" + + "\1\12\10\0\33\11\4\0\4\11\15\0\6\12\5\0\1\11\4\0" + + "\13\12\1\0\1\12\3\0\53\11\37\12\4\0\2\11\1\12\143\11" + + "\1\0\1\11\10\12\1\0\6\12\2\11\2\12\1\0\4\12\2\11" + + "\12\12\3\11\2\0\1\11\17\0\1\12\1\11\1\12\36\11\33\12" + + "\2\0\131\11\13\12\1\11\16\0\12\12\41\11\11\12\2\11\4\0" + + "\1\11\2\0\1\12\30\11\4\12\1\11\11\12\1\11\3\12\1\11" + + "\5\12\22\0\31\11\3\12\4\0\13\11\5\0\30\11\1\0\6\11" + + "\1\0\2\12\6\0\10\12\52\11\72\12\66\11\3\12\1\11\22\12" + + "\1\11\7\12\12\11\2\12\2\0\12\12\1\0\20\11\3\12\1\0" + + "\10\11\2\0\2\11\2\0\26\11\1\0\7\11\1\0\1\11\3\0" + + "\4\11\2\0\1\12\1\11\7\12\2\0\2\12\2\0\3\12\1\11" + + "\10\0\1\12\4\0\2\11\1\0\3\11\2\12\2\0\12\12\4\11" + + "\7\0\2\11\1\0\1\12\2\0\3\12\1\0\6\11\4\0\2\11" + + "\2\0\26\11\1\0\7\11\1\0\2\11\1\0\2\11\1\0\2\11" + + "\2\0\1\12\1\0\5\12\4\0\2\12\2\0\3\12\3\0\1\12" + + "\7\0\4\11\1\0\1\11\7\0\14\12\3\11\1\12\13\0\3\12" + + "\1\0\11\11\1\0\3\11\1\0\26\11\1\0\7\11\1\0\2\11" + + "\1\0\5\11\2\0\1\12\1\11\10\12\1\0\3\12\1\0\3\12" + + "\2\0\1\11\17\0\2\11\2\12\2\0\12\12\1\0\1\11\7\0" + + "\1\11\6\12\1\0\3\12\1\0\10\11\2\0\2\11\2\0\26\11" + + "\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11\7\12" + + "\2\0\2\12\2\0\3\12\7\0\3\12\4\0\2\11\1\0\3\11" + + "\2\12\2\0\12\12\1\0\1\11\20\0\1\12\1\11\1\0\6\11" + + "\3\0\3\11\1\0\4\11\3\0\2\11\1\0\1\11\1\0\2\11" + + "\3\0\2\11\3\0\3\11\3\0\14\11\4\0\5\12\3\0\3\12" + + "\1\0\4\12\2\0\1\11\6\0\1\12\16\0\12\12\11\0\1\11" + + "\6\0\5\12\10\11\1\0\3\11\1\0\27\11\1\0\20\11\2\0" + + "\1\12\1\11\7\12\1\0\3\12\1\0\4\12\7\0\2\12\1\0" + + "\3\11\2\0\1\11\2\0\2\11\2\12\2\0\12\12\20\0\1\11" + + "\3\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0\12\11\1\0" + + "\5\11\2\0\1\12\1\11\7\12\1\0\3\12\1\0\4\12\7\0" + + "\2\12\6\0\2\11\1\0\2\11\2\12\2\0\12\12\1\0\2\11" + + "\15\0\4\12\11\11\1\0\3\11\1\0\51\11\2\12\1\11\7\12" + + "\1\0\3\12\1\0\4\12\1\11\5\0\3\11\1\12\7\0\3\11" + + "\2\12\2\0\12\12\12\0\6\11\1\0\3\12\1\0\22\11\3\0" + + "\30\11\1\0\11\11\1\0\1\11\2\0\7\11\3\0\1\12\4\0" + + "\6\12\1\0\1\12\1\0\10\12\6\0\12\12\2\0\2\12\15\0" + + "\60\11\1\12\2\11\7\12\4\0\10\11\10\12\1\0\12\12\47\0" + + "\2\11\1\0\1\11\1\0\5\11\1\0\30\11\1\0\1\11\1\0" + + "\12\11\1\12\2\11\11\12\1\11\2\0\5\11\1\0\1\11\1\0" + + "\6\12\2\0\12\12\2\0\4\11\40\0\1\11\27\0\2\12\6\0" + + "\12\12\13\0\1\12\1\0\1\12\1\0\1\12\4\0\2\12\10\11" + + "\1\0\44\11\4\0\24\12\1\0\2\12\5\11\13\12\1\0\44\12" + + "\11\0\1\12\71\0\53\11\24\12\1\11\12\12\6\0\6\11\4\12" + + "\4\11\3\12\1\11\3\12\2\11\7\12\3\11\4\12\15\11\14\12" + + "\1\11\17\12\2\0\46\11\1\0\1\11\5\0\1\11\2\0\53\11" + + "\1\0\u014d\11\1\0\4\11\2\0\7\11\1\0\1\11\1\0\4\11" + + "\2\0\51\11\1\0\4\11\2\0\41\11\1\0\4\11\2\0\7\11" + + "\1\0\1\11\1\0\4\11\2\0\17\11\1\0\71\11\1\0\4\11" + + "\2\0\103\11\2\0\3\12\40\0\20\11\20\0\126\11\2\0\6\11" + + "\3\0\u026c\11\2\0\21\11\1\0\32\11\5\0\113\11\3\0\13\11" + + "\7\0\22\11\4\12\11\0\23\11\3\12\13\0\22\11\2\12\14\0" + + "\15\11\1\0\3\11\1\0\2\12\14\0\64\11\40\12\3\0\1\11" + + "\3\0\2\11\1\12\2\0\12\12\41\0\17\12\6\0\131\11\7\0" + + "\5\11\2\12\42\11\1\12\1\11\5\0\106\11\12\0\37\11\1\0" + + "\14\12\4\0\14\12\12\0\12\12\36\11\2\0\5\11\13\0\54\11" + + "\4\0\32\11\6\0\12\12\46\0\27\11\5\12\4\0\65\11\12\12" + + "\1\0\35\12\2\0\13\12\6\0\12\12\15\0\1\11\10\0\16\12" + + "\1\0\20\12\61\0\5\12\57\11\21\12\10\11\3\0\12\12\21\0" + + "\11\12\14\0\3\12\36\11\15\12\2\11\12\12\54\11\16\12\14\0" + + "\44\11\24\12\10\0\12\12\3\0\3\11\12\12\44\11\2\0\11\11" + + "\7\0\53\11\2\0\3\11\20\0\3\12\1\0\25\12\4\11\1\12" + + "\6\11\1\12\2\11\3\12\1\11\5\0\300\11\100\12\u0116\11\2\0" + + "\6\11\2\0\46\11\2\0\6\11\2\0\10\11\1\0\1\11\1\0" + + "\1\11\1\0\1\11\1\0\37\11\2\0\65\11\1\0\7\11\1\0" + + "\1\11\3\0\3\11\1\0\7\11\3\0\4\11\2\0\6\11\4\0" + + "\15\11\5\0\3\11\1\0\7\11\16\0\5\12\30\0\1\65\1\65" + + "\5\12\20\0\2\11\23\0\1\11\13\0\5\12\1\0\12\12\1\0" + + "\1\11\15\0\1\11\20\0\15\11\3\0\41\11\17\0\15\12\4\0" + + "\1\12\3\0\14\12\21\0\1\11\4\0\1\11\2\0\12\11\1\0" + + "\1\11\3\0\5\11\6\0\1\11\1\0\1\11\1\0\1\11\1\0" + + "\1\44\3\11\1\0\13\11\2\0\4\11\5\0\5\11\4\0\1\11" + + "\21\0\51\11\u0a77\0\345\11\6\0\4\11\3\12\2\11\14\0\46\11" + + "\1\0\1\11\5\0\1\11\2\0\70\11\7\0\1\11\17\0\1\12" + + "\27\11\11\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11\1\0" + + "\7\11\1\0\7\11\1\0\7\11\1\0\7\11\1\0\40\12\57\0" + + "\1\11\u01d5\0\3\11\31\0\11\11\6\12\1\0\5\11\2\0\5\11" + + "\4\0\126\11\2\0\2\12\2\0\3\11\1\0\132\11\1\0\4\11" + + "\5\0\53\11\1\0\136\11\21\0\40\11\60\0\20\11\u0200\0\u19c0\11" + + "\100\0\u568d\11\103\0\56\11\2\0\u010d\11\3\0\20\11\12\12\2\11" + + "\24\0\57\11\1\12\4\0\12\12\1\0\37\11\2\12\120\11\2\12" + + "\45\0\11\11\2\0\147\11\2\0\100\11\5\0\2\11\1\0\1\11" + + "\1\0\5\11\30\0\20\11\1\12\3\11\1\12\4\11\1\12\27\11" + + "\5\12\4\0\1\12\13\0\1\11\7\0\64\11\14\0\2\12\62\11" + + "\22\12\12\0\12\12\6\0\22\12\6\11\3\0\1\11\1\0\2\11" + + "\13\12\34\11\10\12\2\0\27\11\15\12\14\0\35\11\3\0\4\12" + + "\57\11\16\12\16\0\1\11\12\12\6\0\5\11\1\12\12\11\12\12" + + "\5\11\1\0\51\11\16\12\11\0\3\11\1\12\10\11\2\12\2\0" + + "\12\12\6\0\27\11\3\0\1\11\3\12\62\11\1\12\1\11\3\12" + + "\2\11\2\12\5\11\2\12\1\11\1\12\1\11\30\0\3\11\2\0" + + "\13\11\5\12\2\0\3\11\2\12\12\0\6\11\2\0\6\11\2\0" + + "\6\11\11\0\7\11\1\0\7\11\1\0\53\11\1\0\16\11\6\0" + + "\163\11\10\12\1\0\2\12\2\0\12\12\6\0\u2ba4\11\14\0\27\11" + + "\4\0\61\11\u2104\0\u016e\11\2\0\152\11\46\0\7\11\14\0\5\11" + + "\5\0\1\11\1\12\12\11\1\0\15\11\1\0\5\11\1\0\1\11" + + "\1\0\2\11\1\0\2\11\1\0\154\11\41\0\u016b\11\22\0\100\11" + + "\2\0\66\11\50\0\15\11\3\0\20\12\20\0\20\12\3\0\2\11" + + "\30\0\3\11\31\0\1\11\6\0\5\11\1\0\207\11\2\0\1\12" + + "\4\0\1\11\13\0\12\12\7\0\32\11\4\0\1\11\1\0\32\11" + + "\13\0\131\11\3\0\6\11\2\0\6\11\2\0\6\11\2\0\3\11" + + "\3\0\2\11\3\0\2\11\22\0\3\12\4\0\14\11\1\0\32\11" + + "\1\0\23\11\1\0\2\11\1\0\17\11\2\0\16\11\42\0\173\11" + + "\105\0\65\11\210\0\1\12\202\0\35\11\3\0\61\11\17\0\1\12" + + "\37\0\40\11\15\0\36\11\5\0\46\11\5\12\5\0\36\11\2\0" + + "\44\11\4\0\10\11\1\0\5\11\52\0\236\11\2\0\12\12\6\0" + + "\44\11\4\0\44\11\4\0\50\11\10\0\64\11\14\0\13\11\1\0" + + "\17\11\1\0\7\11\1\0\2\11\1\0\13\11\1\0\17\11\1\0" + + "\7\11\1\0\2\11\103\0\u0137\11\11\0\26\11\12\0\10\11\30\0" + + "\6\11\1\0\52\11\1\0\11\11\105\0\6\11\2\0\1\11\1\0" + + "\54\11\1\0\2\11\3\0\1\11\2\0\27\11\12\0\27\11\11\0" + + "\37\11\101\0\23\11\1\0\2\11\12\0\26\11\12\0\32\11\106\0" + + "\70\11\6\0\2\11\100\0\1\11\3\12\1\0\2\12\5\0\4\12" + + "\4\11\1\0\3\11\1\0\35\11\2\0\3\12\4\0\1\12\40\0" + + "\35\11\3\0\35\11\43\0\10\11\1\0\34\11\2\12\31\0\66\11" + + "\12\0\26\11\12\0\23\11\15\0\22\11\156\0\111\11\67\0\63\11" + + "\15\0\63\11\15\0\44\11\4\12\10\0\12\12\u0146\0\52\11\1\0" + + "\2\12\3\0\2\11\116\0\35\11\12\0\1\11\10\0\26\11\13\12" + + "\37\0\22\11\4\12\52\0\25\11\33\0\27\11\11\0\3\12\65\11" + + "\17\12\37\0\13\12\2\11\2\12\1\11\11\0\4\12\55\11\13\12" + + "\2\0\1\12\4\0\1\12\12\0\1\12\2\0\31\11\7\0\12\12" + + "\6\0\3\12\44\11\16\12\1\0\12\12\4\0\1\11\2\12\1\11" + + "\10\0\43\11\1\12\2\0\1\11\11\0\3\12\60\11\16\12\4\11" + + "\4\0\4\12\1\0\14\12\1\11\1\0\1\11\43\0\22\11\1\0" + + "\31\11\14\12\6\0\1\12\101\0\7\11\1\0\1\11\1\0\4\11" + + "\1\0\17\11\1\0\12\11\7\0\57\11\14\12\5\0\12\12\6\0" + + "\4\12\1\0\10\11\2\0\2\11\2\0\26\11\1\0\7\11\1\0" + + "\2\11\1\0\5\11\1\0\2\12\1\11\7\12\2\0\2\12\2\0" + + "\3\12\2\0\1\11\6\0\1\12\5\0\5\11\2\12\2\0\7\12" + + "\3\0\5\12\213\0\65\11\22\12\4\11\5\0\12\12\4\0\1\12" + + "\3\11\36\0\60\11\24\12\2\11\1\0\1\11\10\0\12\12\246\0" + + "\57\11\7\12\2\0\11\12\27\0\4\11\2\12\42\0\60\11\21\12" + + "\3\0\1\11\13\0\12\12\46\0\53\11\15\12\1\11\7\0\12\12" + + "\66\0\33\11\2\0\17\12\4\0\12\12\6\0\7\11\271\0\54\11" + + "\17\12\145\0\100\11\12\12\25\0\10\11\2\0\1\11\2\0\10\11" + + "\1\0\2\11\1\0\30\11\6\12\1\0\2\12\2\0\4\12\1\11" + + "\1\12\1\11\2\12\14\0\12\12\106\0\10\11\2\0\47\11\7\12" + + "\2\0\7\12\1\11\1\0\1\11\1\12\33\0\1\11\12\12\50\11" + + "\7\12\1\11\4\12\10\0\1\12\10\0\1\11\13\12\56\11\20\12" + + "\3\0\1\11\22\0\111\11\u0107\0\11\11\1\0\45\11\10\12\1\0" + + "\10\12\1\11\17\0\12\12\30\0\36\11\2\0\26\12\1\0\16\12" + + "\111\0\7\11\1\0\2\11\1\0\46\11\6\12\3\0\1\12\1\0" + + "\2\12\1\0\7\12\1\11\1\12\10\0\12\12\6\0\6\11\1\0" + + "\2\11\1\0\40\11\5\12\1\0\2\12\1\0\5\12\1\11\7\0" + + "\12\12\u0136\0\23\11\4\12\271\0\1\11\54\0\4\11\37\0\u039a\11" + + "\146\0\157\11\21\0\304\11\u0a4c\0\141\11\17\0\u042f\11\1\0\11\12" + + "\u0fc7\0\u0247\11\u21b9\0\u0239\11\7\0\37\11\1\0\12\12\6\0\117\11" + + "\1\0\12\12\6\0\36\11\2\0\5\12\13\0\60\11\7\12\11\0" + + "\4\11\14\0\12\12\11\0\25\11\5\0\23\11\u02b0\0\100\11\200\0" + + "\113\11\4\0\1\12\1\11\67\12\7\0\4\12\15\11\100\0\2\11" + + "\1\0\1\11\1\12\13\0\2\12\16\0\u17f8\11\10\0\u04d6\11\52\0" + + "\11\11\u22e7\0\4\11\1\0\7\11\1\0\2\11\1\0\u0123\11\55\0" + + "\3\11\21\0\4\11\10\0\u018c\11\u0904\0\153\11\5\0\15\11\3\0" + + "\11\11\7\0\12\11\3\0\2\12\1\0\4\12\u125c\0\56\12\2\0" + + "\27\12\u021e\0\5\12\3\0\26\12\2\0\7\12\36\0\4\12\224\0" + + "\3\12\u01bb\0\125\11\1\0\107\11\1\0\2\11\2\0\1\11\2\0" + + "\2\11\2\0\4\11\1\0\14\11\1\0\1\11\1\0\7\11\1\0" + + "\101\11\1\0\4\11\2\0\10\11\1\0\7\11\1\0\34\11\1\0" + + "\4\11\1\0\5\11\1\0\1\11\3\0\7\11\1\0\u0154\11\2\0" + + "\31\11\1\0\31\11\1\0\37\11\1\0\31\11\1\0\37\11\1\0" + + "\31\11\1\0\37\11\1\0\31\11\1\0\37\11\1\0\31\11\1\0" + + "\10\11\2\0\62\12\u0200\0\67\12\4\0\62\12\10\0\1\12\16\0" + + "\1\12\26\0\5\12\1\0\17\12\u0450\0\37\11\341\0\7\12\1\0" + + "\21\12\2\0\7\12\1\0\2\12\1\0\5\12\325\0\55\11\3\0" + + "\7\12\7\11\2\0\12\12\4\0\1\11\u0141\0\36\11\1\12\21\0" + + "\54\11\16\12\5\0\1\11\u04e0\0\7\11\1\0\4\11\1\0\2\11" + + "\1\0\17\11\1\0\305\11\13\0\7\12\51\0\104\11\7\12\1\11" + + "\4\0\12\12\u0356\0\1\11\u014f\0\4\11\1\0\33\11\1\0\2\11" + + "\1\0\1\11\2\0\1\11\1\0\12\11\1\0\4\11\1\0\1\11" + + "\1\0\1\11\6\0\1\11\4\0\1\11\1\0\1\11\1\0\1\11" + + "\1\0\3\11\1\0\2\11\1\0\1\11\2\0\1\11\1\0\1\11" + + "\1\0\1\11\1\0\1\11\1\0\1\11\1\0\2\11\1\0\1\11" + + "\2\0\4\11\1\0\7\11\1\0\4\11\1\0\4\11\1\0\1\11" + + "\1\0\12\11\1\0\21\11\5\0\3\11\1\0\5\11\1\0\21\11" + + "\u0d34\0\12\12\u0406\0\ua6e0\11\40\0\u1039\11\7\0\336\11\2\0\u1682\11" + + "\16\0\u1d31\11\u0c1f\0\u021e\11\u05e2\0\u134b\11\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uecc0\0" + + "\1\12\36\0\140\12\200\0\360\12\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 = - "\3\0\1\1\1\2\1\1\20\3\1\4\2\5\1\1"+ - "\1\6\2\7\1\10\1\11\1\12\1\13\1\10\1\12"+ - "\2\1\17\10\1\14\1\10\1\15\1\16\1\17\1\20"+ - "\1\21\1\22\26\3\1\23\1\24\1\25\1\23\1\26"+ - "\1\27\1\30\1\31\1\23\1\32\1\33\1\34\1\23"+ - "\1\0\2\10\1\35\1\0\1\35\1\0\6\10\1\36"+ - "\36\10\4\3\1\37\6\3\1\40\15\3\5\0\2\10"+ - "\1\35\1\0\1\10\1\37\46\10\5\3\1\41\1\42"+ - "\4\3\1\43\1\3\1\44\3\3\1\45\3\3\1\46"+ - "\2\3\1\47\1\0\1\50\1\0\12\10\1\51\1\52"+ - "\5\10\1\53\1\10\1\54\4\10\1\55\7\10\1\56"+ - "\1\46\1\10\1\57\4\10\1\60\2\10\6\3\1\61"+ - "\1\62\1\3\1\63\10\3\1\64\1\65\4\10\1\66"+ - "\1\61\27\10\1\67\1\70\6\10\1\64\1\71\1\3"+ - "\1\72\12\3\1\73\1\3\1\74\1\3\1\10\1\72"+ - "\5\10\1\75\11\10\1\76\1\77\1\10\1\100\1\10"+ - "\1\73\2\10\1\74\1\101\1\102\6\10\1\103\4\3"+ - "\1\104\6\3\1\105\1\3\10\10\1\106\11\10\1\107"+ - "\1\110\3\10\1\111\2\10\1\112\1\3\1\113\5\3"+ - "\1\114\1\115\1\3\1\116\1\10\1\76\4\10\1\117"+ - "\2\10\1\120\5\10\1\121\1\10\1\122\1\123\1\124"+ - "\1\125\2\10\2\3\1\126\4\3\1\127\5\10\1\130"+ - "\3\10\1\131\1\10\1\132\1\10\1\133\2\10\5\3"+ - "\1\134\1\3\1\135\1\136\1\137\14\10\4\3\1\140"+ - "\1\3\1\141\4\10\1\142\1\10\1\143\6\10\5\3"+ - "\7\10\1\144\2\10\1\145\1\146\1\0\3\3\11\10"+ - "\2\0\2\3\1\147\6\10\1\150\2\10\1\151\1\3"+ - "\1\0\5\10\1\152\1\10\1\153\3\0\2\10\1\154"+ - "\1\155\2\10\2\0\1\156\1\157\1\160\1\10\1\161"+ - "\1\162\1\163"; + private static final String ZZ_ACTION_PACKED_0 + = "\3\0\1\1\1\2\1\1\20\3\1\4\2\5\1\1" + + "\1\6\2\7\1\10\1\11\1\12\1\13\1\10\1\12" + + "\2\1\17\10\1\14\1\10\1\15\1\16\1\17\1\20" + + "\1\21\1\22\26\3\1\23\1\24\1\25\1\23\1\26" + + "\1\27\1\30\1\31\1\23\1\32\1\33\1\34\1\23" + + "\1\0\2\10\1\35\1\0\1\35\1\0\6\10\1\36" + + "\36\10\4\3\1\37\6\3\1\40\15\3\5\0\2\10" + + "\1\35\1\0\1\10\1\37\46\10\5\3\1\41\1\42" + + "\4\3\1\43\1\3\1\44\3\3\1\45\3\3\1\46" + + "\2\3\1\47\1\0\1\50\1\0\12\10\1\51\1\52" + + "\5\10\1\53\1\10\1\54\4\10\1\55\7\10\1\56" + + "\1\46\1\10\1\57\4\10\1\60\2\10\6\3\1\61" + + "\1\62\1\3\1\63\10\3\1\64\1\65\4\10\1\66" + + "\1\61\27\10\1\67\1\70\6\10\1\64\1\71\1\3" + + "\1\72\12\3\1\73\1\3\1\74\1\3\1\10\1\72" + + "\5\10\1\75\11\10\1\76\1\77\1\10\1\100\1\10" + + "\1\73\2\10\1\74\1\101\1\102\6\10\1\103\4\3" + + "\1\104\6\3\1\105\1\3\10\10\1\106\11\10\1\107" + + "\1\110\3\10\1\111\2\10\1\112\1\3\1\113\5\3" + + "\1\114\1\115\1\3\1\116\1\10\1\76\4\10\1\117" + + "\2\10\1\120\5\10\1\121\1\10\1\122\1\123\1\124" + + "\1\125\2\10\2\3\1\126\4\3\1\127\5\10\1\130" + + "\3\10\1\131\1\10\1\132\1\10\1\133\2\10\5\3" + + "\1\134\1\3\1\135\1\136\1\137\14\10\4\3\1\140" + + "\1\3\1\141\4\10\1\142\1\10\1\143\6\10\5\3" + + "\7\10\1\144\2\10\1\145\1\146\1\0\3\3\11\10" + + "\2\0\2\3\1\147\6\10\1\150\2\10\1\151\1\3" + + "\1\0\5\10\1\152\1\10\1\153\3\0\2\10\1\154" + + "\1\155\2\10\2\0\1\156\1\157\1\160\1\10\1\161" + + "\1\162\1\163"; - private static int [] zzUnpackAction() { - int [] result = new int[607]; - 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[607]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; } - return j; - } - - /** - * Translates a state to a row index in the transition table - */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); - - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\70\0\160\0\250\0\340\0\u0118\0\u0150\0\u0188"+ - "\0\u01c0\0\u01f8\0\u0230\0\u0268\0\u02a0\0\u02d8\0\u0310\0\u0348"+ - "\0\u0380\0\u03b8\0\u03f0\0\u0428\0\u0460\0\u0498\0\250\0\u04d0"+ - "\0\250\0\u0508\0\250\0\u0540\0\250\0\u0578\0\250\0\u05b0"+ - "\0\250\0\u05e8\0\u0620\0\u0658\0\u0690\0\u06c8\0\u0700\0\u0738"+ - "\0\u0770\0\u07a8\0\u07e0\0\u0818\0\u0850\0\u0888\0\u08c0\0\u08f8"+ - "\0\u0930\0\u0968\0\u09a0\0\u09d8\0\250\0\u0a10\0\250\0\250"+ - "\0\250\0\250\0\250\0\250\0\u0a48\0\u0a80\0\u0ab8\0\u0af0"+ - "\0\u0b28\0\u0b60\0\u0b98\0\u0bd0\0\u0c08\0\u0c40\0\u0c78\0\u0cb0"+ - "\0\u0ce8\0\u0d20\0\u0d58\0\u0d90\0\u0dc8\0\u0e00\0\u0e38\0\u0e70"+ - "\0\u0ea8\0\u0ee0\0\250\0\250\0\250\0\u0f18\0\250\0\250"+ - "\0\250\0\250\0\u0f50\0\250\0\250\0\250\0\u0f88\0\u0fc0"+ - "\0\u0ff8\0\u1030\0\u1068\0\u10a0\0\u0620\0\u0690\0\u10d8\0\u1110"+ - "\0\u1148\0\u1180\0\u11b8\0\u11f0\0\u05e8\0\u1228\0\u1260\0\u1298"+ - "\0\u12d0\0\u1308\0\u1340\0\u1378\0\u13b0\0\u13e8\0\u1420\0\u1458"+ - "\0\u1490\0\u14c8\0\u1500\0\u1538\0\u1570\0\u15a8\0\u15e0\0\u1618"+ - "\0\u1650\0\u1688\0\u16c0\0\u16f8\0\u1730\0\u1768\0\u17a0\0\u17d8"+ - "\0\u1810\0\u1848\0\u1880\0\u18b8\0\u18f0\0\u1928\0\u1960\0\u0188"+ - "\0\u1998\0\u19d0\0\u1a08\0\u1a40\0\u1a78\0\u1ab0\0\u0188\0\u1ae8"+ - "\0\u1b20\0\u1b58\0\u1b90\0\u1bc8\0\u1c00\0\u1c38\0\u1c70\0\u1ca8"+ - "\0\u1ce0\0\u1d18\0\u1d50\0\u1d88\0\u1dc0\0\u1df8\0\u1e30\0\u1e68"+ - "\0\u1ea0\0\u1ed8\0\u1f10\0\u1f48\0\u1f48\0\u1f80\0\u05e8\0\u1fb8"+ - "\0\u1ff0\0\u2028\0\u2060\0\u2098\0\u20d0\0\u2108\0\u2140\0\u2178"+ - "\0\u21b0\0\u21e8\0\u2220\0\u2258\0\u2290\0\u22c8\0\u2300\0\u2338"+ - "\0\u2370\0\u23a8\0\u23e0\0\u2418\0\u2450\0\u2488\0\u24c0\0\u24f8"+ - "\0\u2530\0\u2568\0\u25a0\0\u25d8\0\u2610\0\u2648\0\u2680\0\u26b8"+ - "\0\u26f0\0\u2728\0\u2760\0\u2798\0\u27d0\0\u2808\0\u2840\0\u2878"+ - "\0\u28b0\0\u28e8\0\u0188\0\u0188\0\u2920\0\u2958\0\u2990\0\u29c8"+ - "\0\u0188\0\u2a00\0\u0188\0\u2a38\0\u2a70\0\u2aa8\0\u0188\0\u2ae0"+ - "\0\u2b18\0\u2b50\0\u0188\0\u2b88\0\u2bc0\0\250\0\u0f18\0\250"+ - "\0\u2bf8\0\u2c30\0\u2c68\0\u2ca0\0\u2cd8\0\u2d10\0\u2d48\0\u2d80"+ - "\0\u2db8\0\u2df0\0\u2e28\0\u05e8\0\u2e60\0\u2e98\0\u2ed0\0\u2f08"+ - "\0\u2f40\0\u2f78\0\u2fb0\0\u2fe8\0\u05e8\0\u3020\0\u3058\0\u3090"+ - "\0\u30c8\0\u3100\0\u3138\0\u3170\0\u31a8\0\u31e0\0\u3218\0\u3250"+ - "\0\u3288\0\u05e8\0\u05e8\0\u32c0\0\u05e8\0\u32f8\0\u3330\0\u3368"+ - "\0\u33a0\0\u05e8\0\u33d8\0\u3410\0\u3448\0\u3480\0\u34b8\0\u34f0"+ - "\0\u3528\0\u3560\0\u0188\0\u3598\0\u35d0\0\u0188\0\u3608\0\u3640"+ - "\0\u3678\0\u36b0\0\u36e8\0\u3720\0\u3758\0\u3790\0\u0188\0\250"+ - "\0\u37c8\0\u3800\0\u3838\0\u3870\0\u05e8\0\u05e8\0\u38a8\0\u38e0"+ - "\0\u3918\0\u3950\0\u3988\0\u39c0\0\u39f8\0\u3a30\0\u3a68\0\u3aa0"+ - "\0\u3ad8\0\u3b10\0\u3b48\0\u3b80\0\u3bb8\0\u3bf0\0\u3c28\0\u3c60"+ - "\0\u3c98\0\u3cd0\0\u3d08\0\u3d40\0\u3d78\0\u05e8\0\u05e8\0\u3db0"+ - "\0\u3de8\0\u3e20\0\u3e58\0\u3e90\0\u3ec8\0\u05e8\0\u3f00\0\u3f38"+ - "\0\u0188\0\u3f70\0\u3fa8\0\u3fe0\0\u4018\0\u4050\0\u4088\0\u40c0"+ - "\0\u40f8\0\u4130\0\u4168\0\u0188\0\u41a0\0\u0188\0\u41d8\0\u4210"+ - "\0\u05e8\0\u4248\0\u4280\0\u42b8\0\u42f0\0\u4328\0\u05e8\0\u4360"+ - "\0\u4398\0\u43d0\0\u4408\0\u4440\0\u4478\0\u44b0\0\u44e8\0\u4520"+ - "\0\u05e8\0\u05e8\0\u4558\0\u05e8\0\u4590\0\u05e8\0\u45c8\0\u4600"+ - "\0\u05e8\0\u05e8\0\u05e8\0\u4638\0\u4670\0\u46a8\0\u46e0\0\u4718"+ - "\0\u4750\0\u05e8\0\u4788\0\u47c0\0\u47f8\0\u4830\0\u0188\0\u4868"+ - "\0\u48a0\0\u48d8\0\u4910\0\u4948\0\u4980\0\u0188\0\u49b8\0\u49f0"+ - "\0\u4a28\0\u4a60\0\u4a98\0\u4ad0\0\u4b08\0\u4b40\0\u4b78\0\u05e8"+ - "\0\u4bb0\0\u4be8\0\u4c20\0\u4c58\0\u4c90\0\u4cc8\0\u4d00\0\u4d38"+ - "\0\u4d70\0\u4da8\0\u05e8\0\u4de0\0\u4e18\0\u4e50\0\u05e8\0\u4e88"+ - "\0\u4ec0\0\u0188\0\u4ef8\0\u0188\0\u4f30\0\u4f68\0\u4fa0\0\u4fd8"+ - "\0\u5010\0\u0188\0\u0188\0\u5048\0\u05e8\0\u5080\0\u50b8\0\u50f0"+ - "\0\u5128\0\u5160\0\u5198\0\u05e8\0\u51d0\0\u5208\0\u05e8\0\u5240"+ - "\0\u5278\0\u52b0\0\u52e8\0\u5320\0\u05e8\0\u5358\0\u05e8\0\u5390"+ - "\0\u05e8\0\u05e8\0\u53c8\0\u5400\0\u5438\0\u5470\0\u0188\0\u54a8"+ - "\0\u54e0\0\u5518\0\u5550\0\u5588\0\u55c0\0\u55f8\0\u5630\0\u5668"+ - "\0\u56a0\0\u05e8\0\u56d8\0\u5710\0\u5748\0\u05e8\0\u5780\0\u05e8"+ - "\0\u57b8\0\u05e8\0\u57f0\0\u5828\0\u5860\0\u5898\0\u58d0\0\u5908"+ - "\0\u5940\0\u0188\0\u5978\0\u0188\0\u05e8\0\u59b0\0\u59e8\0\u5a20"+ - "\0\u5a58\0\u5a90\0\u5ac8\0\u5b00\0\u5b38\0\u5b70\0\u5ba8\0\u5be0"+ - "\0\u5c18\0\u5c50\0\u5c88\0\u5cc0\0\u5cf8\0\u5d30\0\u0188\0\u5d68"+ - "\0\u05e8\0\u5da0\0\u5dd8\0\u5e10\0\u5e48\0\u05e8\0\u5e80\0\u05e8"+ - "\0\u5eb8\0\u5ef0\0\u5f28\0\u5f60\0\u5f98\0\u5fd0\0\u6008\0\u6040"+ - "\0\u6078\0\u60b0\0\u60e8\0\u6120\0\u6158\0\u6190\0\u61c8\0\u6200"+ - "\0\u6238\0\u6270\0\u05e8\0\u62a8\0\u62e0\0\u05e8\0\u0188\0\u6318"+ - "\0\u6350\0\u6388\0\u63c0\0\u63f8\0\u6430\0\u6468\0\u64a0\0\u64d8"+ - "\0\u6510\0\u6548\0\u6580\0\u65b8\0\u65f0\0\u6628\0\u6660\0\u6698"+ - "\0\u0188\0\u66d0\0\u6708\0\u6740\0\u6778\0\u67b0\0\u67e8\0\u05e8"+ - "\0\u6820\0\u6858\0\250\0\u6890\0\u68c8\0\u6900\0\u6938\0\u6970"+ - "\0\u69a8\0\u69e0\0\u05e8\0\u6a18\0\u05e8\0\u6a50\0\u6a88\0\u6ac0"+ - "\0\u6af8\0\u6b30\0\u05e8\0\u05e8\0\u6b68\0\u6ba0\0\u6bd8\0\u6c10"+ - "\0\250\0\u05e8\0\u05e8\0\u6c48\0\u05e8\0\250\0\u05e8"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[607]; - 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++); + 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); + } + 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 = - "\3\4\1\5\1\6\1\7\3\4\1\10\5\4\1\11"+ - "\1\4\1\12\1\4\1\10\1\13\1\14\1\15\1\16"+ - "\1\17\1\20\1\21\1\10\1\22\1\6\1\23\2\10"+ - "\1\24\1\25\3\10\1\26\1\4\2\10\5\4\1\10"+ - "\6\4\1\6\1\4\1\27\1\30\1\31\17\27\1\32"+ - "\24\27\1\33\20\27\1\4\1\34\1\35\1\5\1\4"+ - "\1\36\1\37\1\40\1\41\1\42\2\4\1\43\1\44"+ - "\1\45\1\46\1\4\1\42\1\4\1\42\1\47\1\50"+ - "\1\51\1\52\1\53\1\54\1\55\1\42\1\56\1\4"+ - "\1\57\1\60\1\42\1\61\1\42\1\62\1\42\1\63"+ - "\1\64\1\65\1\66\1\42\1\67\1\70\1\71\1\72"+ - "\1\73\1\42\1\40\7\4\70\0\1\5\2\0\65\5"+ - "\4\0\1\6\30\0\1\6\30\0\1\6\6\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\75"+ - "\1\0\1\10\1\0\10\10\1\76\1\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\1\77\5\10\1\100\3\10\1\0\11\10\1\0"+ - "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0"+ - "\1\10\1\0\2\10\1\74\1\10\2\0\1\10\1\0"+ - "\1\10\1\0\5\10\1\101\4\10\1\0\11\10\1\0"+ - "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0"+ - "\1\10\1\0\2\10\1\74\1\10\2\0\1\10\1\0"+ - "\1\10\1\0\5\10\1\102\4\10\1\0\4\10\1\103"+ - "\4\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\10\10\1\104\1\105\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\11\10\1\106\1\0\2\10"+ - "\1\107\6\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\110\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\3\10\1\111\2\10"+ - "\1\112\3\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\113\7\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\10\10"+ - "\1\114\1\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\4\10\1\115\4\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\116\1\0\1\10\1\0\12\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\4\10\1\117\5\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\4\10"+ - "\1\120\4\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\5\10\1\121\4\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\10\10\1\122\1\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\2\0\1\31\65\0\1\123\2\0\16\123\1\124\1\125"+ - "\1\126\2\123\1\127\2\123\1\130\2\123\1\131\4\123"+ - "\1\132\1\123\1\133\3\123\1\134\11\123\1\135\1\136"+ - "\1\137\1\123\5\0\1\35\72\0\1\42\1\140\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\141\1\0\1\42"+ - "\1\0\12\42\1\0\5\42\1\142\3\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\7\0\1\40\4\0\1\40"+ - "\1\0\1\143\1\144\40\0\1\40\14\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\7\0\1\145\4\0\1\145\1\0"+ - "\1\143\1\144\40\0\1\145\16\0\1\40\4\0\1\145"+ - "\1\0\1\146\41\0\1\40\16\0\1\143\4\0\1\143"+ - "\43\0\1\143\14\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\1\147"+ - "\5\42\1\150\3\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\5\42\1\151\4\42\1\0\4\42\1\152\4\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\10\42\1\153\1\154\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\5\42\1\155\2\42\1\156\1\157\1\0"+ - "\2\42\1\160\6\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\6\42\1\161"+ - "\3\42\1\0\1\42\1\162\7\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\10\42\1\163\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\164\1\0\1\42\1\0\5\42"+ - "\1\165\2\42\1\166\1\42\1\0\5\42\1\167\3\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\170"+ - "\1\0\1\42\1\0\3\42\1\171\6\42\1\0\4\42"+ - "\1\172\4\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\3\42\1\173\6\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\174\1\0\1\42\1\0\4\42\1\175\1\176"+ - "\4\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\177\1\0\1\42\1\0\12\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\4\42\1\200\3\42\1\201"+ - "\1\202\1\0\4\42\1\203\1\204\3\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\3\42\1\205\1\206\1\42\1\207\3\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\10\42\1\210\1\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\5\42\1\211\2\42\1\212"+ - "\1\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\6\42\1\213"+ - "\3\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\3\10\1\214"+ - "\6\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\1\215\11\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\1\10\1\216\1\10"+ - "\1\217\6\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\1\220\10\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0"+ - "\1\221\10\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\1\222"+ - "\10\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\10\10\1\223\1\10\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\11\10\1\224\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\5\10\1\225\4\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\10\10\1\226\1\10\1\0\2\10"+ - "\1\227\6\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\2\10\1\230\7\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\2\10\1\231\7\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\232\1\0\1\10\1\0\12\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\4\10\1\233\2\10\1\234\2\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\3\10\1\235\6\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\236\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\5\10\1\237\4\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\3\10\1\240\6\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\7\10\1\241\2\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\10\10\1\242\1\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\1\10\1\243\10\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\12\10\1\0\4\10\1\244\4\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\7\0\1\245"+ - "\4\0\1\245\2\0\1\245\1\0\1\245\2\0\1\245"+ - "\6\0\1\245\2\0\1\245\2\0\1\245\16\0\1\245"+ - "\16\0\1\246\4\0\1\246\2\0\1\246\1\0\1\246"+ - "\2\0\1\246\6\0\1\246\2\0\1\246\2\0\1\246"+ - "\16\0\1\246\16\0\1\247\4\0\1\250\43\0\1\247"+ - "\16\0\1\251\4\0\1\251\43\0\1\251\14\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\3\42\1\252\6\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\4\42\1\253\4\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\7\0\1\143"+ - "\4\0\1\143\2\0\1\144\40\0\1\143\16\0\1\254"+ - "\4\0\1\254\1\255\2\0\1\255\37\0\1\254\14\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\256\7\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\12\42\1\0\1\257\10\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\6\42\1\260\3\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\10\42\1\261\1\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\1\42\1\262\10\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\4\42\1\263\1\264\4\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\11\42\1\265\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\5\42\1\266\3\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\267\7\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\3\42\1\270\6\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\6\42\1\271\3\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\272"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\273\1\0\1\42"+ - "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\6\42"+ - "\1\274\3\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\275\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42"+ - "\1\276\6\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42"+ - "\1\0\4\42\1\277\4\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42"+ - "\1\300\4\42\1\301\1\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\10\42\1\302\1\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\5\42\1\303\4\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\12\42\1\0\11\42\1\0\1\304\1\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\1\42\1\305\10\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\7\42\1\306\2\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\5\42\1\307\3\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\3\42\1\310\6\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\6\42\1\311\3\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\4\42\1\312\4\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\5\42\1\313\4\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\10\42\1\314\1\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\6\42\1\315\3\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\3\42\1\316\5\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\6\42\1\317\3\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\1\320\5\42\1\321\2\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\7\42\1\322\2\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\4\42\1\323\5\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\12\42\1\0\4\42\1\324\4\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\10\42\1\325\1\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\10\10\1\326\1\10\1\0\7\10\1\327\1\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\7\10\1\330\2\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\331"+ - "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\332\1\0\1\10"+ - "\1\0\12\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\2\10\1\333\6\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\334\1\0\1\10\1\0\12\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\7\10\1\335\2\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\10\10\1\336\1\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\3\10\1\337\6\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\4\10\1\340\5\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\341\1\0\1\10\1\0\12\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\12\10\1\0\4\10\1\342\4\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\343"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\3\10\1\344\6\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\3\10\1\345\6\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\4\10\1\346\5\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\347\1\0\1\10"+ - "\1\0\12\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\3\10"+ - "\1\350\6\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\5\10\1\351\3\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\352\7\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\1\10\1\353\7\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\10\10"+ - "\1\354\1\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\5\10\1\355\3\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\7\0\1\356\4\0\1\356\2\0\1\356"+ - "\1\0\1\356\2\0\1\356\6\0\1\356\2\0\1\356"+ - "\2\0\1\356\16\0\1\356\16\0\1\357\4\0\1\357"+ - "\2\0\1\357\1\0\1\357\2\0\1\357\6\0\1\357"+ - "\2\0\1\357\2\0\1\357\16\0\1\357\16\0\1\247"+ - "\4\0\1\247\43\0\1\247\3\0\1\360\67\0\1\360"+ - "\12\0\1\251\1\361\3\0\1\251\43\0\1\251\14\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\10\42\1\362\1\42\1\0"+ - "\7\42\1\363\1\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\3\42\1\364"+ - "\6\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\7\0\1\254\4\0\1\254\43\0\1\254\14\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\12\42\1\0\4\42\1\365"+ - "\4\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\7\42\1\366\2\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\7\42\1\367\2\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\12\42\1\0\6\42\1\370"+ - "\2\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\12\42\1\0\10\42\1\371"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\3\42\1\372\6\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\1\42\1\373\7\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\374"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\375\1\0\1\42"+ - "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\376\1\0\1\42\1\0\12\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\5\42\1\377\4\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\11\42\1\u0100\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\12\42\1\0\1\u0101\10\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\1\u0102\1\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0103\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\4\42\1\u0104\5\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\4\42\1\u0105\4\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\3\42\1\u0106\6\42\1\0\11\42\1\0\2\42\5\0"+ - "\1\u0107\1\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\12\42\1\0\4\42\1\u0108\4\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\3\42\1\u0109\6\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\3\42\1\u010a\6\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\6\42\1\u010b\3\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\4\42\1\u010c\5\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\u010d\7\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\u010e"+ - "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42"+ - "\1\u010f\6\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u0110\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\7\42"+ - "\1\u0111\2\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\u0112\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\12\42\1\0\1\42"+ - "\1\u0113\7\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\1\42\1\u0114\10\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\1\42\1\u0115\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\3\42\1\u0116\6\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\u0117\1\0\1\42\1\0\12\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\6\42\1\u0118\3\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\1\u0119\1\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\12\42\1\0\1\u011a\10\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\5\42\1\u011b\3\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\u011c\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0"+ - "\1\u011d\10\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\5\10\1\u011e\4\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\1\10\1\u011f\1\10"+ - "\1\u0120\6\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\u0121\7\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\6\10"+ - "\1\u0122\3\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\7\10"+ - "\1\u0123\2\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\u0124\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\u0125\1\0\1\10\1\0\12\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\3\10\1\u0126\6\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\u0127"+ - "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\7\10\1\u0128\2\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\10\10\1\u0129\1\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\5\10\1\u012a\4\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\4\10\1\u012b\5\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\11\10\1\u012c\1\0\11\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\4\10\1\u012d\5\10\1\0\11\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\12\10\1\0\4\10\1\u012e\4\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\u012f\1\0\1\10\1\0"+ - "\12\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\47\0\1\u0130\25\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\1\u0131\10\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\5\42"+ - "\1\u0132\4\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\4\42"+ - "\1\u0133\5\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\4\42"+ - "\1\u0134\5\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42"+ - "\1\u0135\6\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\7\42"+ - "\1\u0136\2\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u0137\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u0138\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\u0139\1\0\1\42\1\0\12\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\u013a\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\6\42\1\u013b\3\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\11\42\1\u013c\1\0\1\42\1\u013d"+ - "\7\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\11\42\1\u013e\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\11\42\1\u013f\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\1\u0140\1\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\6\42\1\u0141\3\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\7\42\1\u0142\2\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\12\42\1\0\10\42\1\u0143\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\u0144\1\0\1\42\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\12\42\1\0"+ - "\1\u0145\10\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\u0146\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\4\42\1\u0147\5\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\4\42\1\u0148\5\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\10\42\1\u0149\1\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\u014a"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\4\42\1\u014b\5\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\12\42\1\0\4\42\1\u014c\4\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\u014d\1\0\1\42"+ - "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42"+ - "\1\0\4\42\1\u014e\4\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\u014f\1\0\1\42\1\0\12\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\3\42\1\u0150\6\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\u0151\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\3\42\1\u0152\5\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\5\42\1\u0153\4\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\u0154\2\42\1\u0155\4\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\u0156\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\u0157"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\10\10\1\u0158\1\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\12\10\1\0\1\u0159\10\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\5\10\1\u015a\4\10\1\0\11\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\10\10\1\u015b\1\10\1\0\11\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\3\10\1\u015c\6\10\1\0\11\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\12\10\1\0\1\u015d\10\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\6\10"+ - "\1\u015e\3\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\1\10"+ - "\1\u015f\10\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\u0160\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\1\10\1\u0161\10\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\6\10\1\u0162\3\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\6\10\1\u0163\3\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\1\u0164"+ - "\10\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\6\10\1\u0165\3\10\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\12\10\1\0\1\u0166\10\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\1\10\1\u0167\10\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\10\42\1\u0168\1\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\1\u0169\10\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\6\42\1\u016a\3\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\1\42\1\u016b\10\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\1\42\1\u016c\7\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\3\42\1\u016d\6\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\1\42\1\u016e\10\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\3\42\1\u016f\6\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\10\42\1\u0170\1\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\3\42\1\u0171\5\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0172\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\u0173\1\0\1\42\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\4\42\1\u0174"+ - "\5\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\10\42\1\u0175"+ - "\1\u0176\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\12\42\1\0"+ - "\5\42\1\u0177\3\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\2\42\1\u0178"+ - "\7\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\u0179\1\0\1\42\1\0\12\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\11\42\1\u017a\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\1\u017b\11\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\1\u017c\10\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\1\42\1\u017d\10\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\12\42\1\0\1\u017e\10\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\u017f\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\10\42\1\u0180"+ - "\1\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\12\42\1\0"+ - "\1\u0181\10\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\u0182\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\11\42\1\u0183\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\4\42\1\u0184\5\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\1\42\1\u0185\7\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\4\42\1\u0186\5\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\1\42\1\u0187"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\10\42\1\u0188\1\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\u0189\7\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\10\42\1\u018a\1\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\3\10\1\u018b\6\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\u018c\7\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\1\10\1\u018d\10\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\4\10\1\u018e\5\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\7\10\1\u018f\2\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\10\10\1\u0190\1\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\3\10\1\u0191\6\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\u0192\1\0\1\10"+ - "\1\0\12\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\5\10"+ - "\1\u0193\4\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\1\10"+ - "\1\u0194\10\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\10\10"+ - "\1\u0195\1\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\7\10"+ - "\1\u0196\2\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\5\10"+ - "\1\u0197\4\10\1\0\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42"+ - "\1\u0198\6\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u0199\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\4\42"+ - "\1\u019a\5\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\u019b\1\0\1\42\1\0\12\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\u019c\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\3\42\1\u019d\6\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\u019e"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\10\42\1\u019f\1\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\11\42\1\u01a0\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\1\u01a1\1\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42"+ - "\1\0\1\u01a2\10\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\1\42\1\u01a3"+ - "\7\42\1\u01a4\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\u01a5\1\0\1\42\1\0\12\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\12\42\1\0\4\42"+ - "\1\u01a6\4\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\10\42\1\u01a7\1\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\6\42\1\u01a8\3\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\2\42\1\u01a9\7\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\u01aa\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\4\42\1\u01ab\4\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\5\42\1\u01ac\4\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\u01ad"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\6\42\1\u01ae\3\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\6\42\1\u01af\3\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\11\42\1\u01b0\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\3\42\1\u01b1\6\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\10\10\1\u01b2\1\10\1\0\11\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\u01b3\1\0\1\10\1\0"+ - "\12\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0"+ - "\6\10\1\u01b4\2\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\5\10\1\u01b5"+ - "\4\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\u01b6\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\u01b7\1\0\1\10\1\0\12\10\1\0\11\10\1\0"+ - "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0"+ - "\1\10\1\0\2\10\1\74\1\10\2\0\1\10\1\0"+ - "\1\10\1\0\6\10\1\u01b8\3\10\1\0\11\10\1\0"+ - "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0"+ - "\1\10\1\0\2\10\1\74\1\10\2\0\1\10\1\0"+ - "\1\10\1\0\2\10\1\u01b9\7\10\1\0\11\10\1\0"+ - "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0"+ - "\1\10\1\0\2\10\1\74\1\10\2\0\1\u01ba\1\0"+ - "\1\10\1\0\12\10\1\0\11\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\12\10\1\0\4\10\1\u01bb\4\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\12\10\1\0\5\10\1\u01bc\3\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\10\42\1\u01bd\1\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\u01be\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\3\42\1\u01bf"+ - "\6\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\4\42\1\u01c0"+ - "\1\42\1\u01c1\3\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\6\42\1\u01c2\3\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\u01c3\1\0\1\42\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\u01c4\1\0\1\42\1\0\12\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\1\42\1\u01c5\10\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\11\42\1\u01c6\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\u01c7"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\3\42\1\u01c8\6\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\12\42\1\0\1\42\1\u01c9\7\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\7\42\1\u01ca\2\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\12\42\1\0\4\42\1\u01cb\4\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\1\42\1\u01cc\10\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\7\42\1\u01cd\2\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\11\42\1\u01ce\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\10\42\1\u01cf\1\42\1\0\4\42\1\u01d0\4\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\6\42\1\u01d1\3\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\11\42\1\u01d2\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\323\1\0\1\42"+ - "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u01d3\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\4\42"+ - "\1\u01d4\5\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\1\u01d5\10\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\6\10\1\u01d6"+ - "\3\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\u01d7\1\0\1\10\1\0\12\10\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\12\10\1\0\1\u01d8\10\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10"+ - "\1\0\1\10\1\0\3\10\1\u01d9\6\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10"+ - "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\u01da"+ - "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\6\10\1\u01db\3\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\u01dc\1\0\1\42"+ - "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\6\42"+ - "\1\u01dd\3\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\6\42"+ - "\1\u01de\3\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u01df\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u01e0\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42"+ - "\1\0\1\u01e1\10\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\u01e2\1\0\1\42\1\0\12\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\u01e3\1\0\1\42\1\0\12\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\4\42\1\u01e4\5\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\5\42\1\u01e5\3\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\3\42\1\u01e6\6\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\10\42\1\u01e7\1\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\u01e8\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\5\42\1\u01e9\4\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\10\42\1\u01ea\1\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\u01eb\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\5\42\1\u01ec"+ - "\4\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\u01ed\1\0\1\10\1\0\12\10\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\u01ee\1\0\1\10\1\0\3\10\1\u01ef\3\10\1\u01f0"+ - "\2\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\6\10\1\u01f1"+ - "\3\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\7\10\1\u01f2"+ - "\2\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0"+ - "\1\u01f3\10\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\3\10\1\u01f4\6\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\10\42\1\u01f5\1\42"+ - "\1\0\4\42\1\u01f6\4\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u01f7\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42"+ - "\1\u01f8\6\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\u01f9\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\u01fa\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\6\42\1\u01fb\3\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\7\42\1\u01fc\2\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\10\42\1\u01fd\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\u01fe\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\u01ff\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\3\42\1\u0200"+ - "\6\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\12\42\1\0"+ - "\11\42\1\0\2\42\5\0\1\u0201\1\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\42\1\0\1\42\1\0\6\42\1\u0202\3\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\2\10\1\u0203\7\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\6\10\1\u0204\3\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\10\10\1\u0205\1\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\3\10\1\u0206\6\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\7\10\1\u0207\2\10"+ - "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\u0208\1\0\1\10\1\0\12\10\1\0\11\10"+ - "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\10\42\1\u0209\1\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\u020a"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\u020b\1\0\1\42"+ - "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\u020c\1\0\1\42\1\0\12\42"+ - "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42"+ - "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\u020d\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\7\42\1\u020e\1\u020f\1\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\3\42\1\u0210\6\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\10\42\1\u0211\1\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\u0212\1\0\1\42\1\0\12\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\4\42\1\u0213\4\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0214\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\6\42\1\u0215\3\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0"+ - "\10\42\1\u0216\1\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\3\10\1\u0217\6\10\1\0\11\10\1\0\2\10\5\0"+ - "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0"+ - "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0"+ - "\12\10\1\0\1\u0218\10\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\11\10"+ - "\1\u0219\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\10\10\1\u021a"+ - "\1\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\2\10\1\u021b"+ - "\7\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0"+ - "\1\10\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\u021c\1\0\1\42\1\0\12\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\11\42\1\u021d\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\7\42\1\u021e\2\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\7\42\1\u021f\2\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\u0220"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\3\42\1\u0221\6\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42"+ - "\1\0\6\42\1\u0222\3\42\1\0\11\42\1\0\2\42"+ - "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42"+ - "\1\0\2\42\1\0\1\42\2\0\1\u0223\1\0\1\42"+ - "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\1\42"+ - "\1\u0224\10\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u0225\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42"+ - "\1\0\4\42\1\u0226\4\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\0\7\10\1\u0227\1\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10"+ - "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10"+ - "\1\u0228\11\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\1\10"+ - "\1\u0229\7\10\1\0\2\10\5\0\2\10\6\0\1\10"+ - "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10"+ - "\2\0\1\10\1\0\1\10\1\0\11\10\1\u022a\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\3\10\1\u022b\6\10\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\7\42\1\u022c\2\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\6\42\1\u022d\3\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\u022e\7\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\u022f\7\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\u0230\1\0\1\42\1\0\12\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\4\42\1\u0231\5\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\3\42\1\u0232\6\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\3\42\1\u0233\6\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\u0234\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\7\0\1\u0235\4\0\1\u0236\43\0"+ - "\1\u0235\14\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\u0237\1\0\1\10\1\0\12\10\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\3\10\1\u0238\6\10\1\0"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0"+ - "\1\10\1\0\1\10\1\0\12\10\1\0\7\10\1\u0239"+ - "\1\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\u023a\7\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\10\42\1\u023b\1\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\10\42\1\u023c\1\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\10\42\1\u023d\1\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\7\42\1\u023e\2\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\5\42\1\u023f\4\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\42\1\0\1\42\1\0\7\42\1\u0240\2\42\1\0"+ - "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\u0241\1\0\1\42\1\0\12\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0242\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\7\0\1\u0235\3\0\1\u0243\1\u0235"+ - "\43\0\1\u0235\22\0\1\u0243\61\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\3\10\1\u0244\6\10\1\0\11\10\1\0\2\10"+ - "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10"+ - "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10"+ - "\1\0\12\10\1\u0245\11\10\1\0\2\10\5\0\2\10"+ - "\6\0\1\10\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42"+ - "\1\u0246\1\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42"+ - "\1\0\4\42\1\u0247\4\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\1\42"+ - "\1\u0248\10\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\1\42"+ - "\1\u0249\10\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\u024a\7\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\6\42"+ - "\1\u024b\3\42\1\0\11\42\1\0\2\42\5\0\2\42"+ - "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42"+ - "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42"+ - "\1\0\1\u024c\10\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\7\42\1\u024d"+ - "\2\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\10\1\0\1\10\1\0\2\10\1\74"+ - "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\u024e"+ - "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\7\0"+ - "\1\u024f\4\0\1\u0250\43\0\1\u024f\14\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\1\42\1\u0251\10\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0"+ - "\1\42\1\0\6\42\1\u0252\3\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0"+ - "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0253\1\0"+ - "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0"+ - "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0"+ - "\2\42\1\0\1\42\2\0\1\u0254\1\0\1\42\1\0"+ - "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\10\42\1\u0255"+ - "\1\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0"+ - "\1\42\2\0\1\42\1\0\1\42\1\0\6\42\1\u0256"+ - "\3\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0"+ - "\1\42\7\0\1\u0257\4\0\1\u0258\43\0\1\u0257\16\0"+ - "\1\u024f\3\0\1\u0259\1\u024f\43\0\1\u024f\22\0\1\u0259"+ - "\61\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42"+ - "\2\0\1\u025a\1\0\1\42\1\0\12\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\7\42\1\u025b\2\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\1\42\1\u025c\10\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42"+ - "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42"+ - "\1\0\1\42\1\0\7\42\1\u025d\2\42\1\0\11\42"+ - "\1\0\2\42\5\0\2\42\6\0\1\42\7\0\1\u0257"+ - "\3\0\1\u025e\1\u0257\43\0\1\u0257\22\0\1\u025e\61\0"+ - "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0"+ - "\1\u025f\1\0\1\42\1\0\12\42\1\0\11\42\1\0"+ - "\2\42\5\0\2\42\6\0\1\42"; + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\70\0\160\0\250\0\340\0\u0118\0\u0150\0\u0188" + + "\0\u01c0\0\u01f8\0\u0230\0\u0268\0\u02a0\0\u02d8\0\u0310\0\u0348" + + "\0\u0380\0\u03b8\0\u03f0\0\u0428\0\u0460\0\u0498\0\250\0\u04d0" + + "\0\250\0\u0508\0\250\0\u0540\0\250\0\u0578\0\250\0\u05b0" + + "\0\250\0\u05e8\0\u0620\0\u0658\0\u0690\0\u06c8\0\u0700\0\u0738" + + "\0\u0770\0\u07a8\0\u07e0\0\u0818\0\u0850\0\u0888\0\u08c0\0\u08f8" + + "\0\u0930\0\u0968\0\u09a0\0\u09d8\0\250\0\u0a10\0\250\0\250" + + "\0\250\0\250\0\250\0\250\0\u0a48\0\u0a80\0\u0ab8\0\u0af0" + + "\0\u0b28\0\u0b60\0\u0b98\0\u0bd0\0\u0c08\0\u0c40\0\u0c78\0\u0cb0" + + "\0\u0ce8\0\u0d20\0\u0d58\0\u0d90\0\u0dc8\0\u0e00\0\u0e38\0\u0e70" + + "\0\u0ea8\0\u0ee0\0\250\0\250\0\250\0\u0f18\0\250\0\250" + + "\0\250\0\250\0\u0f50\0\250\0\250\0\250\0\u0f88\0\u0fc0" + + "\0\u0ff8\0\u1030\0\u1068\0\u10a0\0\u0620\0\u0690\0\u10d8\0\u1110" + + "\0\u1148\0\u1180\0\u11b8\0\u11f0\0\u05e8\0\u1228\0\u1260\0\u1298" + + "\0\u12d0\0\u1308\0\u1340\0\u1378\0\u13b0\0\u13e8\0\u1420\0\u1458" + + "\0\u1490\0\u14c8\0\u1500\0\u1538\0\u1570\0\u15a8\0\u15e0\0\u1618" + + "\0\u1650\0\u1688\0\u16c0\0\u16f8\0\u1730\0\u1768\0\u17a0\0\u17d8" + + "\0\u1810\0\u1848\0\u1880\0\u18b8\0\u18f0\0\u1928\0\u1960\0\u0188" + + "\0\u1998\0\u19d0\0\u1a08\0\u1a40\0\u1a78\0\u1ab0\0\u0188\0\u1ae8" + + "\0\u1b20\0\u1b58\0\u1b90\0\u1bc8\0\u1c00\0\u1c38\0\u1c70\0\u1ca8" + + "\0\u1ce0\0\u1d18\0\u1d50\0\u1d88\0\u1dc0\0\u1df8\0\u1e30\0\u1e68" + + "\0\u1ea0\0\u1ed8\0\u1f10\0\u1f48\0\u1f48\0\u1f80\0\u05e8\0\u1fb8" + + "\0\u1ff0\0\u2028\0\u2060\0\u2098\0\u20d0\0\u2108\0\u2140\0\u2178" + + "\0\u21b0\0\u21e8\0\u2220\0\u2258\0\u2290\0\u22c8\0\u2300\0\u2338" + + "\0\u2370\0\u23a8\0\u23e0\0\u2418\0\u2450\0\u2488\0\u24c0\0\u24f8" + + "\0\u2530\0\u2568\0\u25a0\0\u25d8\0\u2610\0\u2648\0\u2680\0\u26b8" + + "\0\u26f0\0\u2728\0\u2760\0\u2798\0\u27d0\0\u2808\0\u2840\0\u2878" + + "\0\u28b0\0\u28e8\0\u0188\0\u0188\0\u2920\0\u2958\0\u2990\0\u29c8" + + "\0\u0188\0\u2a00\0\u0188\0\u2a38\0\u2a70\0\u2aa8\0\u0188\0\u2ae0" + + "\0\u2b18\0\u2b50\0\u0188\0\u2b88\0\u2bc0\0\250\0\u0f18\0\250" + + "\0\u2bf8\0\u2c30\0\u2c68\0\u2ca0\0\u2cd8\0\u2d10\0\u2d48\0\u2d80" + + "\0\u2db8\0\u2df0\0\u2e28\0\u05e8\0\u2e60\0\u2e98\0\u2ed0\0\u2f08" + + "\0\u2f40\0\u2f78\0\u2fb0\0\u2fe8\0\u05e8\0\u3020\0\u3058\0\u3090" + + "\0\u30c8\0\u3100\0\u3138\0\u3170\0\u31a8\0\u31e0\0\u3218\0\u3250" + + "\0\u3288\0\u05e8\0\u05e8\0\u32c0\0\u05e8\0\u32f8\0\u3330\0\u3368" + + "\0\u33a0\0\u05e8\0\u33d8\0\u3410\0\u3448\0\u3480\0\u34b8\0\u34f0" + + "\0\u3528\0\u3560\0\u0188\0\u3598\0\u35d0\0\u0188\0\u3608\0\u3640" + + "\0\u3678\0\u36b0\0\u36e8\0\u3720\0\u3758\0\u3790\0\u0188\0\250" + + "\0\u37c8\0\u3800\0\u3838\0\u3870\0\u05e8\0\u05e8\0\u38a8\0\u38e0" + + "\0\u3918\0\u3950\0\u3988\0\u39c0\0\u39f8\0\u3a30\0\u3a68\0\u3aa0" + + "\0\u3ad8\0\u3b10\0\u3b48\0\u3b80\0\u3bb8\0\u3bf0\0\u3c28\0\u3c60" + + "\0\u3c98\0\u3cd0\0\u3d08\0\u3d40\0\u3d78\0\u05e8\0\u05e8\0\u3db0" + + "\0\u3de8\0\u3e20\0\u3e58\0\u3e90\0\u3ec8\0\u05e8\0\u3f00\0\u3f38" + + "\0\u0188\0\u3f70\0\u3fa8\0\u3fe0\0\u4018\0\u4050\0\u4088\0\u40c0" + + "\0\u40f8\0\u4130\0\u4168\0\u0188\0\u41a0\0\u0188\0\u41d8\0\u4210" + + "\0\u05e8\0\u4248\0\u4280\0\u42b8\0\u42f0\0\u4328\0\u05e8\0\u4360" + + "\0\u4398\0\u43d0\0\u4408\0\u4440\0\u4478\0\u44b0\0\u44e8\0\u4520" + + "\0\u05e8\0\u05e8\0\u4558\0\u05e8\0\u4590\0\u05e8\0\u45c8\0\u4600" + + "\0\u05e8\0\u05e8\0\u05e8\0\u4638\0\u4670\0\u46a8\0\u46e0\0\u4718" + + "\0\u4750\0\u05e8\0\u4788\0\u47c0\0\u47f8\0\u4830\0\u0188\0\u4868" + + "\0\u48a0\0\u48d8\0\u4910\0\u4948\0\u4980\0\u0188\0\u49b8\0\u49f0" + + "\0\u4a28\0\u4a60\0\u4a98\0\u4ad0\0\u4b08\0\u4b40\0\u4b78\0\u05e8" + + "\0\u4bb0\0\u4be8\0\u4c20\0\u4c58\0\u4c90\0\u4cc8\0\u4d00\0\u4d38" + + "\0\u4d70\0\u4da8\0\u05e8\0\u4de0\0\u4e18\0\u4e50\0\u05e8\0\u4e88" + + "\0\u4ec0\0\u0188\0\u4ef8\0\u0188\0\u4f30\0\u4f68\0\u4fa0\0\u4fd8" + + "\0\u5010\0\u0188\0\u0188\0\u5048\0\u05e8\0\u5080\0\u50b8\0\u50f0" + + "\0\u5128\0\u5160\0\u5198\0\u05e8\0\u51d0\0\u5208\0\u05e8\0\u5240" + + "\0\u5278\0\u52b0\0\u52e8\0\u5320\0\u05e8\0\u5358\0\u05e8\0\u5390" + + "\0\u05e8\0\u05e8\0\u53c8\0\u5400\0\u5438\0\u5470\0\u0188\0\u54a8" + + "\0\u54e0\0\u5518\0\u5550\0\u5588\0\u55c0\0\u55f8\0\u5630\0\u5668" + + "\0\u56a0\0\u05e8\0\u56d8\0\u5710\0\u5748\0\u05e8\0\u5780\0\u05e8" + + "\0\u57b8\0\u05e8\0\u57f0\0\u5828\0\u5860\0\u5898\0\u58d0\0\u5908" + + "\0\u5940\0\u0188\0\u5978\0\u0188\0\u05e8\0\u59b0\0\u59e8\0\u5a20" + + "\0\u5a58\0\u5a90\0\u5ac8\0\u5b00\0\u5b38\0\u5b70\0\u5ba8\0\u5be0" + + "\0\u5c18\0\u5c50\0\u5c88\0\u5cc0\0\u5cf8\0\u5d30\0\u0188\0\u5d68" + + "\0\u05e8\0\u5da0\0\u5dd8\0\u5e10\0\u5e48\0\u05e8\0\u5e80\0\u05e8" + + "\0\u5eb8\0\u5ef0\0\u5f28\0\u5f60\0\u5f98\0\u5fd0\0\u6008\0\u6040" + + "\0\u6078\0\u60b0\0\u60e8\0\u6120\0\u6158\0\u6190\0\u61c8\0\u6200" + + "\0\u6238\0\u6270\0\u05e8\0\u62a8\0\u62e0\0\u05e8\0\u0188\0\u6318" + + "\0\u6350\0\u6388\0\u63c0\0\u63f8\0\u6430\0\u6468\0\u64a0\0\u64d8" + + "\0\u6510\0\u6548\0\u6580\0\u65b8\0\u65f0\0\u6628\0\u6660\0\u6698" + + "\0\u0188\0\u66d0\0\u6708\0\u6740\0\u6778\0\u67b0\0\u67e8\0\u05e8" + + "\0\u6820\0\u6858\0\250\0\u6890\0\u68c8\0\u6900\0\u6938\0\u6970" + + "\0\u69a8\0\u69e0\0\u05e8\0\u6a18\0\u05e8\0\u6a50\0\u6a88\0\u6ac0" + + "\0\u6af8\0\u6b30\0\u05e8\0\u05e8\0\u6b68\0\u6ba0\0\u6bd8\0\u6c10" + + "\0\250\0\u05e8\0\u05e8\0\u6c48\0\u05e8\0\250\0\u05e8"; - private static int [] zzUnpackTrans() { - int [] result = new int[27776]; - 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[607]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; } - return j; - } - - /* 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; - - /* 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 = - "\3\0\1\11\22\1\1\11\1\1\1\11\1\1\1\11"+ - "\1\1\1\11\1\1\1\11\1\1\1\11\23\1\1\11"+ - "\1\1\6\11\26\1\3\11\1\1\4\11\1\1\3\11"+ - "\1\1\1\0\3\1\1\0\1\1\1\0\76\1\5\0"+ - "\3\1\1\0\100\1\1\11\1\0\1\11\1\0\76\1"+ - "\1\11\367\1\1\0\14\1\2\0\14\1\1\11\1\1"+ - "\1\0\10\1\3\0\6\1\2\0\1\11\4\1\1\11"+ - "\1\1"; - - private static int [] zzUnpackAttribute() { - int [] result = new int[607]; - 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); + 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++); + } + 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 + = "\3\4\1\5\1\6\1\7\3\4\1\10\5\4\1\11" + + "\1\4\1\12\1\4\1\10\1\13\1\14\1\15\1\16" + + "\1\17\1\20\1\21\1\10\1\22\1\6\1\23\2\10" + + "\1\24\1\25\3\10\1\26\1\4\2\10\5\4\1\10" + + "\6\4\1\6\1\4\1\27\1\30\1\31\17\27\1\32" + + "\24\27\1\33\20\27\1\4\1\34\1\35\1\5\1\4" + + "\1\36\1\37\1\40\1\41\1\42\2\4\1\43\1\44" + + "\1\45\1\46\1\4\1\42\1\4\1\42\1\47\1\50" + + "\1\51\1\52\1\53\1\54\1\55\1\42\1\56\1\4" + + "\1\57\1\60\1\42\1\61\1\42\1\62\1\42\1\63" + + "\1\64\1\65\1\66\1\42\1\67\1\70\1\71\1\72" + + "\1\73\1\42\1\40\7\4\70\0\1\5\2\0\65\5" + + "\4\0\1\6\30\0\1\6\30\0\1\6\6\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\75" + + "\1\0\1\10\1\0\10\10\1\76\1\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\1\77\5\10\1\100\3\10\1\0\11\10\1\0" + + "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0" + + "\1\10\1\0\2\10\1\74\1\10\2\0\1\10\1\0" + + "\1\10\1\0\5\10\1\101\4\10\1\0\11\10\1\0" + + "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0" + + "\1\10\1\0\2\10\1\74\1\10\2\0\1\10\1\0" + + "\1\10\1\0\5\10\1\102\4\10\1\0\4\10\1\103" + + "\4\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\10\10\1\104\1\105\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\11\10\1\106\1\0\2\10" + + "\1\107\6\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\110\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\3\10\1\111\2\10" + + "\1\112\3\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\2\10" + + "\1\113\7\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\10\10" + + "\1\114\1\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\4\10\1\115\4\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\116\1\0\1\10\1\0\12\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\4\10\1\117\5\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\4\10" + + "\1\120\4\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\5\10\1\121\4\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\10\10\1\122\1\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\2\0\1\31\65\0\1\123\2\0\16\123\1\124\1\125" + + "\1\126\2\123\1\127\2\123\1\130\2\123\1\131\4\123" + + "\1\132\1\123\1\133\3\123\1\134\11\123\1\135\1\136" + + "\1\137\1\123\5\0\1\35\72\0\1\42\1\140\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\141\1\0\1\42" + + "\1\0\12\42\1\0\5\42\1\142\3\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\7\0\1\40\4\0\1\40" + + "\1\0\1\143\1\144\40\0\1\40\14\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\7\0\1\145\4\0\1\145\1\0" + + "\1\143\1\144\40\0\1\145\16\0\1\40\4\0\1\145" + + "\1\0\1\146\41\0\1\40\16\0\1\143\4\0\1\143" + + "\43\0\1\143\14\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\1\147" + + "\5\42\1\150\3\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\5\42\1\151\4\42\1\0\4\42\1\152\4\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\10\42\1\153\1\154\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\5\42\1\155\2\42\1\156\1\157\1\0" + + "\2\42\1\160\6\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\6\42\1\161" + + "\3\42\1\0\1\42\1\162\7\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\10\42\1\163\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\164\1\0\1\42\1\0\5\42" + + "\1\165\2\42\1\166\1\42\1\0\5\42\1\167\3\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\170" + + "\1\0\1\42\1\0\3\42\1\171\6\42\1\0\4\42" + + "\1\172\4\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\3\42\1\173\6\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\174\1\0\1\42\1\0\4\42\1\175\1\176" + + "\4\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\177\1\0\1\42\1\0\12\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\4\42\1\200\3\42\1\201" + + "\1\202\1\0\4\42\1\203\1\204\3\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\3\42\1\205\1\206\1\42\1\207\3\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\10\42\1\210\1\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\5\42\1\211\2\42\1\212" + + "\1\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\6\42\1\213" + + "\3\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\3\10\1\214" + + "\6\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\1\215\11\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\1\10\1\216\1\10" + + "\1\217\6\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\1\220\10\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0" + + "\1\221\10\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\1\222" + + "\10\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\10\10\1\223\1\10\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\11\10\1\224\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\5\10\1\225\4\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\10\10\1\226\1\10\1\0\2\10" + + "\1\227\6\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\2\10\1\230\7\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\2\10\1\231\7\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\232\1\0\1\10\1\0\12\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\4\10\1\233\2\10\1\234\2\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\3\10\1\235\6\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\236\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\5\10\1\237\4\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\3\10\1\240\6\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\7\10\1\241\2\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\10\10\1\242\1\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\1\10\1\243\10\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\12\10\1\0\4\10\1\244\4\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\7\0\1\245" + + "\4\0\1\245\2\0\1\245\1\0\1\245\2\0\1\245" + + "\6\0\1\245\2\0\1\245\2\0\1\245\16\0\1\245" + + "\16\0\1\246\4\0\1\246\2\0\1\246\1\0\1\246" + + "\2\0\1\246\6\0\1\246\2\0\1\246\2\0\1\246" + + "\16\0\1\246\16\0\1\247\4\0\1\250\43\0\1\247" + + "\16\0\1\251\4\0\1\251\43\0\1\251\14\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\3\42\1\252\6\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\4\42\1\253\4\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\7\0\1\143" + + "\4\0\1\143\2\0\1\144\40\0\1\143\16\0\1\254" + + "\4\0\1\254\1\255\2\0\1\255\37\0\1\254\14\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\2\42\1\256\7\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\12\42\1\0\1\257\10\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\6\42\1\260\3\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\10\42\1\261\1\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\1\42\1\262\10\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\4\42\1\263\1\264\4\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\11\42\1\265\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\5\42\1\266\3\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\2\42\1\267\7\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\3\42\1\270\6\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\6\42\1\271\3\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\272" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\273\1\0\1\42" + + "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\6\42" + + "\1\274\3\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\275\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42" + + "\1\276\6\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42" + + "\1\0\4\42\1\277\4\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42" + + "\1\300\4\42\1\301\1\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\10\42\1\302\1\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\5\42\1\303\4\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\12\42\1\0\11\42\1\0\1\304\1\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\1\42\1\305\10\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\7\42\1\306\2\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\5\42\1\307\3\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\3\42\1\310\6\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\6\42\1\311\3\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\4\42\1\312\4\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\5\42\1\313\4\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\10\42\1\314\1\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\6\42\1\315\3\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\3\42\1\316\5\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\6\42\1\317\3\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\1\320\5\42\1\321\2\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\7\42\1\322\2\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\4\42\1\323\5\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\12\42\1\0\4\42\1\324\4\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\10\42\1\325\1\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\10\10\1\326\1\10\1\0\7\10\1\327\1\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\7\10\1\330\2\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\331" + + "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\332\1\0\1\10" + + "\1\0\12\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\2\10\1\333\6\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\334\1\0\1\10\1\0\12\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\7\10\1\335\2\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\10\10\1\336\1\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\3\10\1\337\6\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\4\10\1\340\5\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\341\1\0\1\10\1\0\12\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\12\10\1\0\4\10\1\342\4\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\343" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\3\10\1\344\6\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\3\10\1\345\6\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\4\10\1\346\5\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\347\1\0\1\10" + + "\1\0\12\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\3\10" + + "\1\350\6\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\5\10\1\351\3\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\2\10" + + "\1\352\7\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\1\10\1\353\7\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\10\10" + + "\1\354\1\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\5\10\1\355\3\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\7\0\1\356\4\0\1\356\2\0\1\356" + + "\1\0\1\356\2\0\1\356\6\0\1\356\2\0\1\356" + + "\2\0\1\356\16\0\1\356\16\0\1\357\4\0\1\357" + + "\2\0\1\357\1\0\1\357\2\0\1\357\6\0\1\357" + + "\2\0\1\357\2\0\1\357\16\0\1\357\16\0\1\247" + + "\4\0\1\247\43\0\1\247\3\0\1\360\67\0\1\360" + + "\12\0\1\251\1\361\3\0\1\251\43\0\1\251\14\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\10\42\1\362\1\42\1\0" + + "\7\42\1\363\1\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\3\42\1\364" + + "\6\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\7\0\1\254\4\0\1\254\43\0\1\254\14\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\12\42\1\0\4\42\1\365" + + "\4\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\7\42\1\366\2\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\7\42\1\367\2\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\12\42\1\0\6\42\1\370" + + "\2\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\12\42\1\0\10\42\1\371" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\3\42\1\372\6\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\1\42\1\373\7\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\374" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\375\1\0\1\42" + + "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\376\1\0\1\42\1\0\12\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\5\42\1\377\4\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\11\42\1\u0100\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\12\42\1\0\1\u0101\10\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\1\u0102\1\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0103\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\4\42\1\u0104\5\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\4\42\1\u0105\4\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\3\42\1\u0106\6\42\1\0\11\42\1\0\2\42\5\0" + + "\1\u0107\1\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\12\42\1\0\4\42\1\u0108\4\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\3\42\1\u0109\6\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\3\42\1\u010a\6\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\6\42\1\u010b\3\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\4\42\1\u010c\5\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\2\42\1\u010d\7\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\u010e" + + "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42" + + "\1\u010f\6\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u0110\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\7\42" + + "\1\u0111\2\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\u0112\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\12\42\1\0\1\42" + + "\1\u0113\7\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\1\42\1\u0114\10\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\1\42\1\u0115\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\3\42\1\u0116\6\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\u0117\1\0\1\42\1\0\12\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\6\42\1\u0118\3\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\1\u0119\1\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\12\42\1\0\1\u011a\10\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\5\42\1\u011b\3\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\u011c\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0" + + "\1\u011d\10\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\5\10\1\u011e\4\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\1\10\1\u011f\1\10" + + "\1\u0120\6\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\2\10" + + "\1\u0121\7\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\6\10" + + "\1\u0122\3\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\7\10" + + "\1\u0123\2\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\u0124\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\u0125\1\0\1\10\1\0\12\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\3\10\1\u0126\6\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\u0127" + + "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\7\10\1\u0128\2\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\10\10\1\u0129\1\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\5\10\1\u012a\4\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\4\10\1\u012b\5\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\11\10\1\u012c\1\0\11\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\4\10\1\u012d\5\10\1\0\11\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\12\10\1\0\4\10\1\u012e\4\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\u012f\1\0\1\10\1\0" + + "\12\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\47\0\1\u0130\25\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\1\u0131\10\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\5\42" + + "\1\u0132\4\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\4\42" + + "\1\u0133\5\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\4\42" + + "\1\u0134\5\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42" + + "\1\u0135\6\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\7\42" + + "\1\u0136\2\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u0137\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u0138\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\u0139\1\0\1\42\1\0\12\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\u013a\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\6\42\1\u013b\3\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\11\42\1\u013c\1\0\1\42\1\u013d" + + "\7\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\11\42\1\u013e\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\11\42\1\u013f\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\1\u0140\1\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\6\42\1\u0141\3\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\7\42\1\u0142\2\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\12\42\1\0\10\42\1\u0143\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\u0144\1\0\1\42\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\12\42\1\0" + + "\1\u0145\10\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\u0146\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\4\42\1\u0147\5\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\4\42\1\u0148\5\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\10\42\1\u0149\1\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\u014a" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\4\42\1\u014b\5\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\12\42\1\0\4\42\1\u014c\4\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\u014d\1\0\1\42" + + "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42" + + "\1\0\4\42\1\u014e\4\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\u014f\1\0\1\42\1\0\12\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\3\42\1\u0150\6\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\u0151\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\3\42\1\u0152\5\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\5\42\1\u0153\4\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\2\42\1\u0154\2\42\1\u0155\4\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\u0156\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\u0157" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\10\10\1\u0158\1\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\12\10\1\0\1\u0159\10\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\5\10\1\u015a\4\10\1\0\11\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\10\10\1\u015b\1\10\1\0\11\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\3\10\1\u015c\6\10\1\0\11\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\12\10\1\0\1\u015d\10\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\6\10" + + "\1\u015e\3\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\1\10" + + "\1\u015f\10\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\u0160\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\1\10\1\u0161\10\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\6\10\1\u0162\3\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\6\10\1\u0163\3\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\1\u0164" + + "\10\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\6\10\1\u0165\3\10\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\12\10\1\0\1\u0166\10\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\1\10\1\u0167\10\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\10\42\1\u0168\1\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\1\u0169\10\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\6\42\1\u016a\3\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\1\42\1\u016b\10\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\1\42\1\u016c\7\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\3\42\1\u016d\6\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\1\42\1\u016e\10\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\3\42\1\u016f\6\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\10\42\1\u0170\1\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\3\42\1\u0171\5\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0172\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\u0173\1\0\1\42\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\4\42\1\u0174" + + "\5\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\10\42\1\u0175" + + "\1\u0176\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\12\42\1\0" + + "\5\42\1\u0177\3\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\2\42\1\u0178" + + "\7\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\u0179\1\0\1\42\1\0\12\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\11\42\1\u017a\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\1\u017b\11\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\1\u017c\10\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\1\42\1\u017d\10\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\12\42\1\0\1\u017e\10\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\u017f\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\10\42\1\u0180" + + "\1\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\12\42\1\0" + + "\1\u0181\10\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\u0182\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\11\42\1\u0183\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\4\42\1\u0184\5\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\1\42\1\u0185\7\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\4\42\1\u0186\5\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\1\42\1\u0187" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\10\42\1\u0188\1\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\2\42\1\u0189\7\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\10\42\1\u018a\1\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\3\10\1\u018b\6\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\2\10\1\u018c\7\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\1\10\1\u018d\10\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\4\10\1\u018e\5\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\7\10\1\u018f\2\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\10\10\1\u0190\1\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\3\10\1\u0191\6\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\u0192\1\0\1\10" + + "\1\0\12\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\5\10" + + "\1\u0193\4\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\1\10" + + "\1\u0194\10\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\10\10" + + "\1\u0195\1\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\7\10" + + "\1\u0196\2\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\5\10" + + "\1\u0197\4\10\1\0\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42" + + "\1\u0198\6\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u0199\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\4\42" + + "\1\u019a\5\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\u019b\1\0\1\42\1\0\12\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\u019c\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\3\42\1\u019d\6\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\u019e" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\10\42\1\u019f\1\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\11\42\1\u01a0\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\1\u01a1\1\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42" + + "\1\0\1\u01a2\10\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\1\42\1\u01a3" + + "\7\42\1\u01a4\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\u01a5\1\0\1\42\1\0\12\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\12\42\1\0\4\42" + + "\1\u01a6\4\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\10\42\1\u01a7\1\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\6\42\1\u01a8\3\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\2\42\1\u01a9\7\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\u01aa\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\4\42\1\u01ab\4\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\5\42\1\u01ac\4\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\u01ad" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\6\42\1\u01ae\3\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\6\42\1\u01af\3\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\11\42\1\u01b0\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\3\42\1\u01b1\6\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\10\10\1\u01b2\1\10\1\0\11\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\u01b3\1\0\1\10\1\0" + + "\12\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0" + + "\6\10\1\u01b4\2\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\5\10\1\u01b5" + + "\4\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\u01b6\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\u01b7\1\0\1\10\1\0\12\10\1\0\11\10\1\0" + + "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0" + + "\1\10\1\0\2\10\1\74\1\10\2\0\1\10\1\0" + + "\1\10\1\0\6\10\1\u01b8\3\10\1\0\11\10\1\0" + + "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0" + + "\1\10\1\0\2\10\1\74\1\10\2\0\1\10\1\0" + + "\1\10\1\0\2\10\1\u01b9\7\10\1\0\11\10\1\0" + + "\2\10\5\0\2\10\6\0\1\10\5\0\1\10\1\0" + + "\1\10\1\0\2\10\1\74\1\10\2\0\1\u01ba\1\0" + + "\1\10\1\0\12\10\1\0\11\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\12\10\1\0\4\10\1\u01bb\4\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\12\10\1\0\5\10\1\u01bc\3\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\10\42\1\u01bd\1\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\u01be\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\3\42\1\u01bf" + + "\6\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\4\42\1\u01c0" + + "\1\42\1\u01c1\3\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\6\42\1\u01c2\3\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\u01c3\1\0\1\42\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\u01c4\1\0\1\42\1\0\12\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\1\42\1\u01c5\10\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\11\42\1\u01c6\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\u01c7" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\3\42\1\u01c8\6\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\12\42\1\0\1\42\1\u01c9\7\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\7\42\1\u01ca\2\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\12\42\1\0\4\42\1\u01cb\4\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\1\42\1\u01cc\10\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\7\42\1\u01cd\2\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\11\42\1\u01ce\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\10\42\1\u01cf\1\42\1\0\4\42\1\u01d0\4\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\6\42\1\u01d1\3\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\11\42\1\u01d2\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\323\1\0\1\42" + + "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u01d3\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\4\42" + + "\1\u01d4\5\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\1\u01d5\10\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\6\10\1\u01d6" + + "\3\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\u01d7\1\0\1\10\1\0\12\10\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\12\10\1\0\1\u01d8\10\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\10" + + "\1\0\1\10\1\0\3\10\1\u01d9\6\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\10" + + "\1\0\1\10\1\0\2\10\1\74\1\10\2\0\1\u01da" + + "\1\0\1\10\1\0\12\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\6\10\1\u01db\3\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\u01dc\1\0\1\42" + + "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\6\42" + + "\1\u01dd\3\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\6\42" + + "\1\u01de\3\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u01df\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u01e0\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42" + + "\1\0\1\u01e1\10\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\u01e2\1\0\1\42\1\0\12\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\u01e3\1\0\1\42\1\0\12\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\4\42\1\u01e4\5\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\5\42\1\u01e5\3\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\3\42\1\u01e6\6\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\10\42\1\u01e7\1\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\u01e8\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\5\42\1\u01e9\4\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\10\42\1\u01ea\1\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\u01eb\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\5\42\1\u01ec" + + "\4\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\u01ed\1\0\1\10\1\0\12\10\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\u01ee\1\0\1\10\1\0\3\10\1\u01ef\3\10\1\u01f0" + + "\2\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\6\10\1\u01f1" + + "\3\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\7\10\1\u01f2" + + "\2\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\0" + + "\1\u01f3\10\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\3\10\1\u01f4\6\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\10\42\1\u01f5\1\42" + + "\1\0\4\42\1\u01f6\4\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u01f7\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\3\42" + + "\1\u01f8\6\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\u01f9\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\u01fa\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\6\42\1\u01fb\3\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\7\42\1\u01fc\2\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\10\42\1\u01fd\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\u01fe\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\u01ff\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\3\42\1\u0200" + + "\6\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\12\42\1\0" + + "\11\42\1\0\2\42\5\0\1\u0201\1\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\42\1\0\1\42\1\0\6\42\1\u0202\3\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\2\10\1\u0203\7\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\6\10\1\u0204\3\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\10\10\1\u0205\1\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\3\10\1\u0206\6\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\7\10\1\u0207\2\10" + + "\1\0\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\u0208\1\0\1\10\1\0\12\10\1\0\11\10" + + "\1\0\2\10\5\0\2\10\6\0\1\10\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\10\42\1\u0209\1\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\u020a" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\u020b\1\0\1\42" + + "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\u020c\1\0\1\42\1\0\12\42" + + "\1\0\11\42\1\0\2\42\5\0\2\42\6\0\1\42" + + "\5\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\u020d\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\7\42\1\u020e\1\u020f\1\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\3\42\1\u0210\6\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\10\42\1\u0211\1\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\u0212\1\0\1\42\1\0\12\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\4\42\1\u0213\4\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0214\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\6\42\1\u0215\3\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\42\1\0\1\42\1\0" + + "\10\42\1\u0216\1\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\3\10\1\u0217\6\10\1\0\11\10\1\0\2\10\5\0" + + "\2\10\6\0\1\10\5\0\1\10\1\0\1\10\1\0" + + "\2\10\1\74\1\10\2\0\1\10\1\0\1\10\1\0" + + "\12\10\1\0\1\u0218\10\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\11\10" + + "\1\u0219\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\10\10\1\u021a" + + "\1\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\2\10\1\u021b" + + "\7\10\1\0\11\10\1\0\2\10\5\0\2\10\6\0" + + "\1\10\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\u021c\1\0\1\42\1\0\12\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\11\42\1\u021d\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\7\42\1\u021e\2\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\7\42\1\u021f\2\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\u0220" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\12\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\3\42\1\u0221\6\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\42\1\0\1\42" + + "\1\0\6\42\1\u0222\3\42\1\0\11\42\1\0\2\42" + + "\5\0\2\42\6\0\1\42\5\0\1\42\1\0\1\42" + + "\1\0\2\42\1\0\1\42\2\0\1\u0223\1\0\1\42" + + "\1\0\12\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\1\42" + + "\1\u0224\10\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u0225\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42" + + "\1\0\4\42\1\u0226\4\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\0\7\10\1\u0227\1\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\10\1\0\1\10\1\0\2\10" + + "\1\74\1\10\2\0\1\10\1\0\1\10\1\0\12\10" + + "\1\u0228\11\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\12\10\1\0\1\10" + + "\1\u0229\7\10\1\0\2\10\5\0\2\10\6\0\1\10" + + "\5\0\1\10\1\0\1\10\1\0\2\10\1\74\1\10" + + "\2\0\1\10\1\0\1\10\1\0\11\10\1\u022a\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\3\10\1\u022b\6\10\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\7\42\1\u022c\2\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\6\42\1\u022d\3\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\2\42\1\u022e\7\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\2\42\1\u022f\7\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\u0230\1\0\1\42\1\0\12\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\4\42\1\u0231\5\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\3\42\1\u0232\6\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\3\42\1\u0233\6\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\u0234\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\7\0\1\u0235\4\0\1\u0236\43\0" + + "\1\u0235\14\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\u0237\1\0\1\10\1\0\12\10\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\3\10\1\u0238\6\10\1\0" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\10\1\0\1\10\1\0\2\10\1\74\1\10\2\0" + + "\1\10\1\0\1\10\1\0\12\10\1\0\7\10\1\u0239" + + "\1\10\1\0\2\10\5\0\2\10\6\0\1\10\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\2\42\1\u023a\7\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\10\42\1\u023b\1\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\10\42\1\u023c\1\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\10\42\1\u023d\1\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\7\42\1\u023e\2\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\5\42\1\u023f\4\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\42\1\0\1\42\1\0\7\42\1\u0240\2\42\1\0" + + "\11\42\1\0\2\42\5\0\2\42\6\0\1\42\5\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\u0241\1\0\1\42\1\0\12\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0242\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\7\0\1\u0235\3\0\1\u0243\1\u0235" + + "\43\0\1\u0235\22\0\1\u0243\61\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\3\10\1\u0244\6\10\1\0\11\10\1\0\2\10" + + "\5\0\2\10\6\0\1\10\5\0\1\10\1\0\1\10" + + "\1\0\2\10\1\74\1\10\2\0\1\10\1\0\1\10" + + "\1\0\12\10\1\u0245\11\10\1\0\2\10\5\0\2\10" + + "\6\0\1\10\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\10\42" + + "\1\u0246\1\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42" + + "\1\0\4\42\1\u0247\4\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\1\42" + + "\1\u0248\10\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\1\42" + + "\1\u0249\10\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\2\42" + + "\1\u024a\7\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\6\42" + + "\1\u024b\3\42\1\0\11\42\1\0\2\42\5\0\2\42" + + "\6\0\1\42\5\0\1\42\1\0\1\42\1\0\2\42" + + "\1\0\1\42\2\0\1\42\1\0\1\42\1\0\12\42" + + "\1\0\1\u024c\10\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\7\42\1\u024d" + + "\2\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\10\1\0\1\10\1\0\2\10\1\74" + + "\1\10\2\0\1\10\1\0\1\10\1\0\12\10\1\u024e" + + "\11\10\1\0\2\10\5\0\2\10\6\0\1\10\7\0" + + "\1\u024f\4\0\1\u0250\43\0\1\u024f\14\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\1\42\1\u0251\10\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\42\1\0" + + "\1\42\1\0\6\42\1\u0252\3\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42\5\0\1\42\1\0" + + "\1\42\1\0\2\42\1\0\1\42\2\0\1\u0253\1\0" + + "\1\42\1\0\12\42\1\0\11\42\1\0\2\42\5\0" + + "\2\42\6\0\1\42\5\0\1\42\1\0\1\42\1\0" + + "\2\42\1\0\1\42\2\0\1\u0254\1\0\1\42\1\0" + + "\12\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\10\42\1\u0255" + + "\1\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\5\0\1\42\1\0\1\42\1\0\2\42\1\0" + + "\1\42\2\0\1\42\1\0\1\42\1\0\6\42\1\u0256" + + "\3\42\1\0\11\42\1\0\2\42\5\0\2\42\6\0" + + "\1\42\7\0\1\u0257\4\0\1\u0258\43\0\1\u0257\16\0" + + "\1\u024f\3\0\1\u0259\1\u024f\43\0\1\u024f\22\0\1\u0259" + + "\61\0\1\42\1\0\1\42\1\0\2\42\1\0\1\42" + + "\2\0\1\u025a\1\0\1\42\1\0\12\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\7\42\1\u025b\2\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\1\42\1\u025c\10\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\5\0\1\42" + + "\1\0\1\42\1\0\2\42\1\0\1\42\2\0\1\42" + + "\1\0\1\42\1\0\7\42\1\u025d\2\42\1\0\11\42" + + "\1\0\2\42\5\0\2\42\6\0\1\42\7\0\1\u0257" + + "\3\0\1\u025e\1\u0257\43\0\1\u0257\22\0\1\u025e\61\0" + + "\1\42\1\0\1\42\1\0\2\42\1\0\1\42\2\0" + + "\1\u025f\1\0\1\42\1\0\12\42\1\0\11\42\1\0" + + "\2\42\5\0\2\42\6\0\1\42"; - /** the current lexical state */ - private int zzLexicalState = YYINITIAL; + private static int[] zzUnpackTrans() { + int[] result = new int[27776]; + 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 */ + 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); + } + return j; + } - /** the textposition at the last accepting state */ - private int zzMarkedPos; - /** the current text position in the buffer */ - private int zzCurrentPos; + /* 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; - /** startRead marks the beginning of the yytext() string in the buffer */ - private int zzStartRead; + /* 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" + }; - /** endRead marks the last character in the buffer, that has been read - from input */ - private int zzEndRead; + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - /** number of newlines encountered up to the start of the matched text */ - private int yyline; + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\3\0\1\11\22\1\1\11\1\1\1\11\1\1\1\11" + + "\1\1\1\11\1\1\1\11\1\1\1\11\23\1\1\11" + + "\1\1\6\11\26\1\3\11\1\1\4\11\1\1\3\11" + + "\1\1\1\0\3\1\1\0\1\1\1\0\76\1\5\0" + + "\3\1\1\0\100\1\1\11\1\0\1\11\1\0\76\1" + + "\1\11\367\1\1\0\14\1\2\0\14\1\1\11\1\1" + + "\1\0\10\1\3\0\6\1\2\0\1\11\4\1\1\11" + + "\1\1"; - /** the number of characters up to the start of the matched text */ - private int yychar; + private static int[] zzUnpackAttribute() { + int[] result = new int[607]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - private int yycolumn; + 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); + } + return j; + } - /** - * zzAtBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean zzAtBOL = true; + /** + * the input device + */ + private java.io.Reader zzReader; - /** zzAtEOF == true <=> the scanner is at the EOF */ - private boolean zzAtEOF; + /** + * the current state of the DFA + */ + private int zzState; - /** 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; + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; - /* user code: */ + /** + * 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: */ StringBuilder string = new StringBuilder(); boolean isMultiname = false; long multinameId = 0; @@ -1974,9 +2015,10 @@ public final class Flasm3Lexer { } ParsedSymbol last; - public ParsedSymbol lex() throws java.io.IOException, AVM2ParseException{ + + public ParsedSymbol lex() throws java.io.IOException, AVM2ParseException { ParsedSymbol ret = null; - if (!pushedBack.isEmpty()){ + if (!pushedBack.isEmpty()) { ret = last = pushedBack.pop(); } else { ret = last = yylex(); @@ -1984,870 +2026,1046 @@ public final class Flasm3Lexer { return ret; } - - - /** - * Creates a new scanner - * - * @param in the java.io.Reader to read input from. - */ - public Flasm3Lexer(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 < 3870) { - 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 Flasm3Lexer(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; - } - - /* 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 */ - if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { - --zzEndRead; - zzFinalHighSurrogate = 1; + /** + * 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 < 3870) { + 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. - */ - 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(); - } - - - /** - * 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. - */ - public final int yystate() { - return zzLexicalState; - } - - - /** - * 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. - */ - 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. - */ - 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]; - } - - throw new Error(message); - } - - - /** - * 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); - - 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 - */ - 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; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - yychar+= zzMarkedPosL-zzStartRead; - - boolean zzR = false; - int zzCh; - int zzCharCount; - for (zzCurrentPosL = zzStartRead ; - zzCurrentPosL < zzMarkedPosL ; - zzCurrentPosL += zzCharCount ) { - zzCh = Character.codePointAt(zzBufferL, zzCurrentPosL, zzMarkedPosL); - zzCharCount = Character.charCount(zzCh); - switch (zzCh) { - case '\u000B': - case '\u000C': - case '\u0085': - case '\u2028': - case '\u2029': - yyline++; - yycolumn = 0; - zzR = false; - break; - case '\r': - yyline++; - yycolumn = 0; - zzR = true; - break; - case '\n': - if (zzR) - zzR = false; - else { - yyline++; - yycolumn = 0; - } - break; - default: - zzR = false; - yycolumn += zzCharCount; + /* translate stored positions */ + zzEndRead -= zzStartRead; + zzCurrentPos -= zzStartRead; + zzMarkedPos -= zzStartRead; + zzStartRead = 0; } - } - if (zzR) { - // peek one character ahead if it is \n (if we have counted one line too much) - boolean zzPeek; - if (zzMarkedPosL < zzEndReadL) - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - else if (zzAtEOF) - zzPeek = false; - else { - boolean eof = zzRefill(); - zzEndReadL = zzEndRead; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - if (eof) - zzPeek = false; - else - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + /* 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; } - if (zzPeek) yyline--; - } - zzAction = -1; - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = ZZ_LEXSTATE[zzLexicalState]; + /* 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; + } - // set up zzAction for empty match case: - int zzAttributes = zzAttrL[zzState]; - if ( (zzAttributes & 1) == 1 ) { - zzAction = zzState; - } + if (totalRead > 0) { + zzEndRead += totalRead; + if (totalRead == requested) { + /* possibly more input available */ + if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { + --zzEndRead; + zzFinalHighSurrogate = 1; + } + } + return false; + } + // totalRead = 0: End of stream + return true; + } + + /** + * Closes the input stream. + */ + public final void yyclose() throws java.io.IOException { + zzAtEOF = true; + /* indicate end of file */ + zzEndRead = zzStartRead; + /* invalidate buffer */ + + if (zzReader != null) { + zzReader.close(); + } + } + + /** + * 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. + */ + public final int yystate() { + return zzLexicalState; + } + + /** + * 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. + */ + 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. + */ + 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]; + } + + throw new Error(message); + } + + /** + * 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); + } + + 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 + */ + 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; + boolean zzR = false; + int zzCh; + int zzCharCount; + for (zzCurrentPosL = zzStartRead; + zzCurrentPosL < zzMarkedPosL; + zzCurrentPosL += zzCharCount) { + zzCh = Character.codePointAt(zzBufferL, zzCurrentPosL, zzMarkedPosL); + zzCharCount = Character.charCount(zzCh); + switch (zzCh) { + case '\u000B': + case '\u000C': + case '\u0085': + case '\u2028': + case '\u2029': + yyline++; + yycolumn = 0; + zzR = false; + break; + case '\r': + yyline++; + yycolumn = 0; + zzR = true; + break; + case '\n': + if (zzR) { + zzR = false; + } else { + yyline++; + yycolumn = 0; + } + break; + default: + zzR = false; + yycolumn += zzCharCount; + } + } + + if (zzR) { + // peek one character ahead if it is \n (if we have counted one line too much) + boolean zzPeek; + if (zzMarkedPosL < zzEndReadL) { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } else if (zzAtEOF) { + zzPeek = false; + } else { + boolean eof = zzRefill(); + zzEndReadL = zzEndRead; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + if (eof) { + zzPeek = false; + } else { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } + } + if (zzPeek) { + yyline--; + } + } + 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 116: + break; + case 2: { + return new ParsedSymbol(ParsedSymbol.TYPE_COMMENT, yytext().substring(1)); + } + case 117: + break; + case 3: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_INSTRUCTION_NAME, yytext()); + } + case 118: + break; + case 4: { + for (int r = 0; r < repeatNum; r++) { + string.append(yytext()); + } + repeatNum = 1; + } + case 119: + break; + case 5: { + repeatNum = 1; + throw new AVM2ParseException("Unterminated string at end of line", yyline + 1); + } + case 120: + break; + case 6: { + yybegin(PARAMETERS); + repeatNum = 1; + // length also includes the trailing quote + if (isMultiname) { + return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, multinameId); + } else { + return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); + } + } + case 121: + break; + case 7: { + yybegin(YYINITIAL); + } + case 122: + break; + case 8: { + return new ParsedSymbol(ParsedSymbol.TYPE_IDENTIFIER, yytext()); + } + case 123: + break; + case 9: { + return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_OPEN, yytext()); + } + case 124: + break; + case 10: { + try { + return new ParsedSymbol(ParsedSymbol.TYPE_INTEGER, Integer.parseInt((yytext()))); + } catch (NumberFormatException nfe) { + return new ParsedSymbol(ParsedSymbol.TYPE_FLOAT, Double.parseDouble((yytext()))); + } + } + case 125: + break; + case 11: { + return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_CLOSE, yytext()); + } + case 126: + break; + case 12: { + isMultiname = false; + yybegin(STRING); + string.setLength(0); + } + case 127: + break; + case 13: { + return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_OPEN, yytext()); + } + case 128: + break; + case 14: { + return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_CLOSE, yytext()); + } + case 129: + break; + case 15: { + return new ParsedSymbol(ParsedSymbol.TYPE_LOWERTHAN, yytext()); + } + case 130: + break; + case 16: { + return new ParsedSymbol(ParsedSymbol.TYPE_GREATERTHAN, yytext()); + } + case 131: + break; + case 17: { + return new ParsedSymbol(ParsedSymbol.TYPE_COMMA, yytext()); + } + case 132: + break; + case 18: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_LABEL, s.substring(0, s.length() - 1)); + } + case 133: + break; + case 19: { + repeatNum = 1; + throw new AVM2ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); + } + case 134: + break; + case 20: { + for (int r = 0; r < repeatNum; r++) { + string.append('\b'); + } + repeatNum = 1; + } + case 135: + break; + case 21: { + for (int r = 0; r < repeatNum; r++) { + string.append('\\'); + } + repeatNum = 1; + } + case 136: + break; + case 22: { + for (int r = 0; r < repeatNum; r++) { + string.append('\t'); + } + repeatNum = 1; + } + case 137: + break; + case 23: { + for (int r = 0; r < repeatNum; r++) { + string.append('\n'); + } + repeatNum = 1; + } + case 138: + break; + case 24: { + for (int r = 0; r < repeatNum; r++) { + string.append('\r'); + } + repeatNum = 1; + } + case 139: + break; + case 25: { + for (int r = 0; r < repeatNum; r++) { + string.append('\f'); + } + repeatNum = 1; + } + case 140: + break; + case 26: { + for (int r = 0; r < repeatNum; r++) { + string.append('\"'); + } + repeatNum = 1; + } + case 141: + break; + case 27: { + for (int r = 0; r < repeatNum; r++) { + string.append('\u00A7'); + } + repeatNum = 1; + } + case 142: + break; + case 28: { + for (int r = 0; r < repeatNum; r++) { + string.append('\''); + } + repeatNum = 1; + } + case 143: + break; + case 29: { + return new ParsedSymbol(ParsedSymbol.TYPE_FLOAT, Double.parseDouble((yytext()))); + } + case 144: + break; + case 30: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TO, yytext()); + } + case 145: + break; + case 31: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_END, yytext()); + } + case 146: + break; + case 32: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRY, yytext()); + } + case 147: + break; + case 33: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_BODY, yytext()); + } + case 148: + break; + case 34: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CODE, yytext()); + } + case 149: + break; + case 35: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPE, yytext()); + } + case 150: + break; + case 36: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_ITEM, yytext()); + } + case 151: + break; + case 37: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME, yytext()); + } + case 152: + break; + case 38: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FLAG, yytext()); + } + case 153: + break; + case 39: { + char val = (char) Integer.parseInt(yytext().substring(2), 16); + for (int r = 0; r < repeatNum; r++) { + string.append(val); + } + repeatNum = 1; + } + case 154: + break; + case 40: { + repeatNum = Integer.parseInt(yytext().substring(2, yytext().length() - 1)); + } + case 155: + break; + case 41: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRUE, yytext()); + } + case 156: + break; + case 42: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPE, yytext()); + } + case 157: + break; + case 43: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME, yytext()); + } + case 158: + break; + case 44: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NULL, yytext()); + } + case 159: + break; + case 45: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOT, yytext()); + } + case 160: + break; + case 46: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FROM, yytext()); + } + case 161: + break; + case 47: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UTF8, yytext()); + } + case 162: + break; + case 48: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_VOID, yytext()); + } + case 163: + break; + case 49: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CLASS, yytext()); + } + case 164: + break; + case 50: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAM, yytext()); + } + case 165: + break; + case 51: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRAIT, yytext()); + } + case 166: + break; + case 52: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_VALUE, yytext()); + } + case 167: + break; + case 53: { + isMultiname = true; + String s = yytext(); + multinameId = Long.parseLong(s.substring(2, s.length() - 2)); + yybegin(STRING); + string.setLength(0); + } + case 168: + break; + case 54: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CONST, yytext()); + } + case 169: + break; + case 55: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FINAL, yytext()); + } + case 170: + break; + case 56: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FALSE, yytext()); + } + case 171: + break; + case 57: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAME, yytext()); + } + case 172: + break; + case 58: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METHOD, yytext()); + } + case 173: + break; + case 59: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOTID, yytext()); + } + case 174: + break; + case 60: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DISPID, yytext()); + } + case 175: + break; + case 61: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TARGET, yytext()); + } + case 176: + break; + case 62: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NATIVE, yytext()); + } + case 177: + break; + case 63: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SETTER, yytext()); + } + case 178: + break; + case 64: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SEALED, yytext()); + } + case 179: + break; + case 65: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DOUBLE, yytext()); + } + case 180: + break; + case 66: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_GETTER, yytext()); + } + case 181: + break; + case 67: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAMEA, yytext()); + } + case 182: + break; + case 68: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXTENDS, yytext()); + } + case 183: + break; + case 69: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RETURNS, yytext()); + } + case 184: + break; + case 70: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INTEGER, yytext()); + } + case 185: + break; + case 71: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAME, yytext()); + } + case 186: + break; + case 72: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DECIMAL, yytext()); + } + case 187: + break; + case 73: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UNKNOWN, yytext()); + } + case 188: + break; + case 74: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METADATA_BLOCK, yytext()); + } + case 189: + break; + case 75: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSTACK, yytext()); + } + case 190: + break; + case 76: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INSTANCE, yytext()); + } + case 191: + break; + case 77: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OPTIONAL, yytext()); + } + case 192: + break; + case 78: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METADATA, yytext()); + } + case 193: + break; + case 79: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPENAME, yytext()); + } + case 194: + break; + case 80: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OVERRIDE, yytext()); + } + case 195: + break; + case 81: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SET_DXNS, yytext()); + } + case 196: + break; + case 82: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEA, yytext()); + } + case 197: + break; + case 83: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEL, yytext()); + } + case 198: + break; + case 84: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FUNCTION, yytext()); + } + case 199: + break; + case 85: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UINTEGER, yytext()); + } + case 200: + break; + case 86: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAMNAME, yytext()); + } + case 201: + break; + case 87: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAME, yytext()); + } + case 202: + break; + case 88: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INTERFACE, yytext()); + } + case 203: + break; + case 89: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_REST, yytext()); + } + case 204: + break; + case 90: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAMESPACE, yytext()); + } + case 205: + break; + case 91: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMELA, yytext()); + } + case 206: + break; + case 92: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_IMPLEMENTS, yytext()); + } + case 207: + break; + case 93: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_LOCALCOUNT, yytext()); + } + case 208: + break; + case 94: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEA, yytext()); + } + case 209: + break; + case 95: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEL, yytext()); + } + case 210: + break; + case 96: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PROTECTEDNS_BLOCK, yytext()); + } + case 211: + break; + case 97: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMELA, yytext()); + } + case 212: + break; + case 98: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PROTECTEDNS, yytext()); + } + case 213: + break; + case 99: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_IGNORE_REST, yytext()); + } + case 214: + break; + case 100: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NON_NULLABLE, yytext()); + } + case 215: + break; + case 101: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_OPTIONAL, yytext()); + } + case 216: + break; + case 102: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSCOPEDEPTH, yytext()); + } + case 217: + break; + case 103: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INITSCOPEDEPTH, yytext()); + } + case 218: + break; + case 104: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ARGUMENTS, yytext()); + } + case 219: + break; + case 105: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_END, Integer.parseInt(s.substring(13, s.length() - 1))); + } + case 220: + break; + case 106: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ACTIVATION, yytext()); + } + case 221: + break; + case 107: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_PARAM_NAMES, yytext()); + } + case 222: + break; + case 108: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGENAMESPACE, yytext()); + } + case 223: + break; + case 109: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PRIVATENAMESPACE, yytext()); + } + case 224: + break; + case 110: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_START, Integer.parseInt(s.substring(15, s.length() - 1))); + } + case 225: + break; + case 111: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXPLICITNAMESPACE, yytext()); + } + case 226: + break; + case 112: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGEINTERNALNS, yytext()); + } + case 227: + break; + case 113: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_STATICPROTECTEDNS, yytext()); + } + case 228: + break; + case 114: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_TARGET, Integer.parseInt(s.substring(16, s.length() - 1))); + } + case 229: + break; + case 115: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PROTECTEDNAMESPACE, yytext()); + } + case 230: + break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + { + return new ParsedSymbol(ParsedSymbol.TYPE_EOF); + } + } else { + zzScanError(ZZ_NO_MATCH); + } + } } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 1: - { - } - case 116: break; - case 2: - { return new ParsedSymbol(ParsedSymbol.TYPE_COMMENT, yytext().substring(1)); - } - case 117: break; - case 3: - { yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_INSTRUCTION_NAME, yytext()); - } - case 118: break; - case 4: - { for(int r=0;r(), new ArrayList<>(), abcIndex, new ArrayList<>(), new ArrayList<>()); + } + if (item instanceof TypeItem) { + typeItem = item; + } else if (item instanceof ApplyTypeAVM2Item) { + typeItem = ((ApplyTypeAVM2Item) item).object; + } else if (item instanceof ImportedSlotConstItem) { + typeItem = ((ImportedSlotConstItem) item).type; + } else { + throw new CompilationException("Invalid type:" + item + " (" + item.getClass().getName() + ")", 0/*??*/); + } + if (typeItem instanceof UnresolvedAVM2Item) { + String fullClass = localData.getFullClass(); + typeItem = ((UnresolvedAVM2Item) typeItem).resolve(localData, localData.currentClass, new TypeItem(fullClass), new ArrayList<>(), new ArrayList<>(), abcIndex, new ArrayList<>(), new ArrayList<>()); + } + + if (!(typeItem instanceof TypeItem)) { + throw new CompilationException("Invalid type", 0/*??*/); + } + + TypeItem type = (TypeItem) typeItem; + + DottedChain dname = type.fullTypeName; + DottedChain pkg = dname.getWithoutLast(); + String name = dname.getLast(); + /*for (InstanceInfo ii : abc.getSelectedAbc().instance_info) { + Multiname mname = abc.getSelectedAbc().constants.constant_multiname.get(ii.name_index); + if (mname != null && name.equals(mname.getName(abc.getSelectedAbc().constants, null, true))) { + Namespace ns = mname.getNamespace(abc.getSelectedAbc().constants); + if (ns != null && ns.hasName(pkg, abc.getSelectedAbc().constants)) { + name_index = ii.name_index; + break; + } + } + }*/ + ABC abc = abcIndex.getSelectedAbc(); + AVM2ConstantPool constants = abc.constants; + AbcIndexing.ClassIndex ci = abcIndex.findClass(new TypeItem(dname), null, null/*FIXME?*/); + if (ci != null) { + Multiname m = ci.abc.instance_info.get(ci.index).getName(ci.abc.constants); + if (m != null) { + Namespace ns = ci.abc.instance_info.get(ci.index).getName(ci.abc.constants).getNamespace(ci.abc.constants); + String n = m.getName(ci.abc.constants, new ArrayList<>(), true, true /*FIXME!!*/); + String nsn = ns == null ? null : ns.getRawName(ci.abc.constants); + name_index = constants.getQnameId( + n, + ns == null ? Namespace.KIND_PACKAGE : ns.kind, + nsn, true); + } + } + + String pkgRaw = pkg.toRawString(); + for (int i = 1; i < constants.getMultinameCount(); i++) { + Multiname mname = constants.getMultiname(i); + if (mname != null && name.equals(mname.getName(constants, null, true, true /*FIXME!!*/))) { + if (mname.getNamespace(constants) != null && Objects.equals(pkgRaw, mname.getNamespace(constants).getRawName(constants))) { + name_index = i; + break; + } + } + } + if (name_index == 0) { + if (pkg.isEmpty() && localData.currentScript != null /*FIXME!*/) { + for (Trait t : localData.currentScript.traits.traits) { + if (t.getName(abc).getName(constants, null, true, true /*FIXME!!*/).equals(name)) { + name_index = t.name_index; + break; + } + } + } + if (name_index == 0) { + name_index = constants.getMultinameId(Multiname.createQName(false, constants.getStringId(name, true), constants.getNamespaceId(Namespace.KIND_PACKAGE, pkg, 0, true)), true); + } + } + + if (item instanceof ApplyTypeAVM2Item) { + ApplyTypeAVM2Item atype = (ApplyTypeAVM2Item) item; + int[] params = new int[atype.params.size()]; + int i = 0; + for (GraphTargetItem s : atype.params) { + params[i++] = (s instanceof NullAVM2Item) ? 0 : resolveType(localData, s, abcIndex); + } + return constants.getMultinameId(Multiname.createTypeName(name_index, params), true); + } + + return name_index; + } + + @Override + public List generateDiscardValue(SourceGeneratorLocalData localData, GraphTargetItem item) throws CompilationException { + List ret = item.toSource(localData, this); + ret.add(ins(AVM2Instructions.Pop)); + return ret; + } + private AVM2Instruction ins(int instructionCode, int... operands) { return new AVM2Instruction(0, instructionCode, operands); } @@ -141,49 +256,6 @@ public class AVM2SourceGenerator implements SourceGenerator { return new AVM2Instruction(0, def, operands); } - @Override - public List generate(SourceGeneratorLocalData localData, FalseItem item) throws CompilationException { - return GraphTargetItem.toSourceMerge(localData, this, ins(AVM2Instructions.PushFalse)); - } - - @Override - public List generate(SourceGeneratorLocalData localData, TrueItem item) throws CompilationException { - return GraphTargetItem.toSourceMerge(localData, this, ins(AVM2Instructions.PushTrue)); - } - - public List generate(SourceGeneratorLocalData localData, GetDescendantsAVM2Item item) throws CompilationException { - - AVM2ConstantPool constants = abcIndex.getSelectedAbc().constants; - int[] nssa = new int[item.openedNamespaces.size()]; - for (int i = 0; i < item.openedNamespaces.size(); i++) { - nssa[i] = item.openedNamespaces.get(i).getCpoolIndex(abcIndex); - } - - int nsset = constants.getNamespaceSetId(nssa, true); - - return GraphTargetItem.toSourceMerge(localData, this, - item.object, - ins(AVM2Instructions.GetDescendants, constants.getMultinameId(Multiname.createMultiname(false, constants.getStringId(item.nameStr, true), nsset), true)) - ); - } - - @Override - public List generate(SourceGeneratorLocalData localData, AndItem item) throws CompilationException { - List ret = new ArrayList<>(); - ret.addAll(generateToActionList(localData, item.leftSide)); - ret.add(ins(AVM2Instructions.Dup)); - if (!("" + item.leftSide.returnType()).equals("Boolean")) { - ret.add(ins(AVM2Instructions.ConvertB)); - } - List andExpr = generateToActionList(localData, item.rightSide); - andExpr.add(0, ins(AVM2Instructions.Pop)); - int andExprLen = insToBytes(andExpr).length; - ret.add(ins(AVM2Instructions.IfFalse, andExprLen)); - ret.addAll(andExpr); - return ret; - - } - private byte[] insToBytes(List code) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -199,22 +271,6 @@ public class AVM2SourceGenerator implements SourceGenerator { return SWFInputStream.BYTE_ARRAY_EMPTY; } - @Override - public List generate(SourceGeneratorLocalData localData, OrItem item) throws CompilationException { - List ret = new ArrayList<>(); - ret.addAll(generateToActionList(localData, item.leftSide)); - ret.add(ins(AVM2Instructions.Dup)); - if (!("" + item.leftSide.returnType()).equals("Boolean")) { - ret.add(ins(AVM2Instructions.ConvertB)); - } - List orExpr = generateToActionList(localData, item.rightSide); - orExpr.add(0, ins(AVM2Instructions.Pop)); - int orExprLen = insToBytes(orExpr).length; - ret.add(ins(AVM2Instructions.IfTrue, orExprLen)); - ret.addAll(orExpr); - return ret; - } - public ArrayList toInsList(List items) { ArrayList ret = new ArrayList<>(); for (GraphSourceItem s : items) { @@ -293,75 +349,6 @@ public class AVM2SourceGenerator implements SourceGenerator { return ret; } - public List generate(SourceGeneratorLocalData localData, XMLFilterAVM2Item item) throws CompilationException { - List ret = new ArrayList<>(); - final Reference counterReg = new Reference<>(0); - final Reference collectionReg = new Reference<>(0); - final Reference xmlListReg = new Reference<>(0); - List xmlListSetTemp = AssignableAVM2Item.setTemp(localData, this, xmlListReg); - AVM2ConstantPool constants = abcIndex.getSelectedAbc().constants; - ret.addAll(GraphTargetItem.toSourceMerge(localData, this, - ins(AVM2Instructions.PushByte, 0), - AssignableAVM2Item.setTemp(localData, this, counterReg), - item.object, - ins(AVM2Instructions.CheckFilter), - NameAVM2Item.generateCoerce(localData, this, TypeItem.UNBOUNDED), - AssignableAVM2Item.setTemp(localData, this, collectionReg), - ins(AVM2Instructions.GetLex, constants.getMultinameId(Multiname.createQName(false, constants.getStringId("XMLList", true), constants.getNamespaceId(Namespace.KIND_PACKAGE, "", 0, true)), true)), - ins(AVM2Instructions.PushString, constants.getStringId("", true)), - ins(AVM2Instructions.Construct, 1), - xmlListSetTemp - )); - final Reference tempVal1 = new Reference<>(0); - final Reference tempVal2 = new Reference<>(0); - - List forBody = toInsList(GraphTargetItem.toSourceMerge(localData, this, - ins(AVM2Instructions.Label), - AssignableAVM2Item.getTemp(localData, this, collectionReg), - AssignableAVM2Item.getTemp(localData, this, counterReg), - ins(AVM2Instructions.NextValue), - AssignableAVM2Item.dupSetTemp(localData, this, tempVal1), - AssignableAVM2Item.dupSetTemp(localData, this, tempVal2), - ins(AVM2Instructions.PushWith) - )); - localData.scopeStack.add(new LocalRegAVM2Item(null, null, tempVal2.getVal(), null, new TypeItem("Object") /*?*/)); - forBody.addAll(toInsList(item.value.toSource(localData, this))); - List trueBody = new ArrayList<>(); - trueBody.addAll(toInsList(AssignableAVM2Item.getTemp(localData, this, xmlListReg))); - trueBody.addAll(toInsList(AssignableAVM2Item.getTemp(localData, this, counterReg))); - trueBody.addAll(toInsList(AssignableAVM2Item.getTemp(localData, this, tempVal1))); - trueBody.add(ins(AVM2Instructions.SetProperty, constants.getMultinameId(Multiname.createMultinameL(false, NamespaceItem.getCpoolSetIndex(abcIndex, item.openedNamespaces)), true))); - forBody.add(ins(AVM2Instructions.IfFalse, insToBytes(trueBody).length)); - forBody.addAll(trueBody); - forBody.add(ins(AVM2Instructions.PopScope)); - localData.scopeStack.remove(localData.scopeStack.size() - 1); - forBody.addAll(toInsList(AssignableAVM2Item.killTemp(localData, this, Arrays.asList(tempVal2, tempVal1)))); - - int forBodyLen = insToBytes(forBody).length; - AVM2Instruction forwardJump = ins(AVM2Instructions.Jump, forBodyLen); - ret.add(forwardJump); - - List expr = new ArrayList<>(); - expr.add(ins(AVM2Instructions.HasNext2, collectionReg.getVal(), counterReg.getVal())); - AVM2Instruction backIf = ins(AVM2Instructions.IfTrue, 0); - expr.add(backIf); - - int exprLen = insToBytes(expr).length; - backIf.operands[0] = -(exprLen + forBodyLen); - - ret.addAll(forBody); - ret.addAll(expr); - ret.addAll(AssignableAVM2Item.killTemp(localData, this, Arrays.asList(collectionReg, counterReg))); - ret.addAll(AssignableAVM2Item.getTemp(localData, this, xmlListReg)); - ret.addAll(AssignableAVM2Item.killTemp(localData, this, Arrays.asList(xmlListReg))); - return ret; - } - - @Override - public List generate(SourceGeneratorLocalData localData, IfItem item) throws CompilationException { - return generateIf(localData, item.expression, item.onTrue, item.onFalse, false); - } - private void fixSwitch(List code, int breakOffset, long loopId) { fixLoop(code, breakOffset, Integer.MAX_VALUE, loopId); } @@ -386,55 +373,6 @@ public class AVM2SourceGenerator implements SourceGenerator { } } - @Override - public List generate(SourceGeneratorLocalData localData, TernarOpItem item) throws CompilationException { - List onTrue = new ArrayList<>(); - onTrue.add(item.onTrue); - List onFalse = new ArrayList<>(); - onFalse.add(item.onFalse); - return generateIf(localData, item.expression, onTrue, onFalse, true); - } - - @Override - public List generate(SourceGeneratorLocalData localData, WhileItem item) throws CompilationException { - localData.openedLoops.add(item.loop.id); - List ret = new ArrayList<>(); - List whileExpr = new ArrayList<>(); - - List ex = new ArrayList<>(item.expression); - GraphTargetItem lastItem = null; - if (!ex.isEmpty()) { - lastItem = ex.remove(ex.size() - 1); - while (lastItem instanceof CommaExpressionItem) { - CommaExpressionItem cei = (CommaExpressionItem) lastItem; - ex.addAll(cei.commands); - lastItem = ex.remove(ex.size() - 1); - } - whileExpr.addAll(generateToInsList(localData, ex)); - } - List whileBody = generateToInsList(localData, item.commands); - AVM2Instruction forwardJump = ins(AVM2Instructions.Jump, 0); - ret.add(forwardJump); - whileBody.add(0, ins(AVM2Instructions.Label)); - ret.addAll(whileBody); - int whileBodyLen = insToBytes(whileBody).length; - forwardJump.operands[0] = whileBodyLen; - whileExpr.addAll(toInsList(condition(localData, lastItem, 0))); - int whileExprLen = insToBytes(whileExpr).length; - whileExpr.get(whileExpr.size() - 1).operands[0] = -(whileExprLen + whileBodyLen); //Assuming last is if instruction - ret.addAll(whileExpr); - fixLoop(whileBody, whileBodyLen + whileExprLen, whileBodyLen, item.loop.id); - return ret; - } - - public List generate(SourceGeneratorLocalData localData, ForEachInAVM2Item item) throws CompilationException { - return generateForIn(localData, item.loop, item.expression.collection, (AssignableAVM2Item) item.expression.object, item.commands, true); - } - - public List generate(SourceGeneratorLocalData localData, ForInAVM2Item item) throws CompilationException { - return generateForIn(localData, item.loop, item.expression.collection, (AssignableAVM2Item) item.expression.object, item.commands, false); - } - public List generateForIn(SourceGeneratorLocalData localData, Loop loop, GraphTargetItem collection, AssignableAVM2Item assignable, List commands, final boolean each) throws CompilationException { localData.openedLoops.add(loop.id); List ret = new ArrayList<>(); @@ -506,6 +444,1756 @@ public class AVM2SourceGenerator implements SourceGenerator { return ret; } + private List generateToInsList(SourceGeneratorLocalData localData, List commands) throws CompilationException { + return toInsList(generate(localData, commands)); + } + + private List generateToActionList(SourceGeneratorLocalData localData, GraphTargetItem command) throws CompilationException { + return toInsList(command.toSource(localData, this)); + } + + public HashMap getRegisterVars(SourceGeneratorLocalData localData) { + return localData.registerVars; + } + + public void setRegisterVars(SourceGeneratorLocalData localData, HashMap value) { + localData.registerVars = value; + } + + public void setInFunction(SourceGeneratorLocalData localData, int value) { + localData.inFunction = value; + } + + public int isInFunction(SourceGeneratorLocalData localData) { + return localData.inFunction; + } + + public boolean isInMethod(SourceGeneratorLocalData localData) { + return localData.inMethod; + } + + public void setInMethod(SourceGeneratorLocalData localData, boolean value) { + localData.inMethod = value; + } + + public int getForInLevel(SourceGeneratorLocalData localData) { + return localData.forInLevel; + } + + public void setForInLevel(SourceGeneratorLocalData localData, int value) { + localData.forInLevel = value; + } + + public int getTempRegister(SourceGeneratorLocalData localData) { + HashMap registerVars = getRegisterVars(localData); + int tmpReg = 0; + for (int i = 0; i < 256; i++) { + if (!registerVars.containsValue(i)) { + tmpReg = i; + break; + } + } + return tmpReg; + } + + public AVM2SourceGenerator(AbcIndexing abc) { + this.abcIndex = abc; + } + + /*public ABC getABC() { + return abc; + }*/ + public void generateClass(List importedClasses, List cinitVariables, boolean cinitNeedsActivation, List cinit, List openedNamespaces, int namespace, int initScope, DottedChain pkg, ClassInfo classInfo, InstanceInfo instanceInfo, SourceGeneratorLocalData localData, boolean isInterface, String name, String superName, GraphTargetItem extendsVal, List implementsStr, GraphTargetItem iinit, List iinitVariables, boolean iinitNeedsActivation, List traitItems, Reference class_index) throws AVM2ParseException, CompilationException { + localData.currentClass = name; + localData.pkg = pkg; + localData.privateNs = abcIndex.getSelectedAbc().constants.getNamespaceId(Namespace.KIND_PRIVATE, pkg.toRawString().isEmpty() ? name : pkg.toRawString() + ":" + name, 0, true); + localData.protectedNs = abcIndex.getSelectedAbc().constants.getNamespaceId(Namespace.KIND_PROTECTED, pkg.toRawString().isEmpty() ? name : pkg.toRawString() + ":" + name, 0, true); + if (extendsVal == null && !isInterface) { + extendsVal = new TypeItem(DottedChain.OBJECT); + } + ParsedSymbol s = null; + + if (Configuration.handleSkinPartsAutomatically.get()) { + + Map skinParts = new HashMap<>(); + for (GraphTargetItem t : traitItems) { + String tname = null; + List>> tmetadata = null; + if (t instanceof MethodAVM2Item) { + tname = ((MethodAVM2Item) t).functionName; + tmetadata = ((MethodAVM2Item) t).metadata; + } else if (t instanceof SlotAVM2Item) { + tname = ((SlotAVM2Item) t).var; + tmetadata = ((SlotAVM2Item) t).metadata; + } else if (t instanceof ConstAVM2Item) { + tname = ((ConstAVM2Item) t).var; + tmetadata = ((ConstAVM2Item) t).metadata; + } + if (tname != null && tmetadata != null) { + for (Map.Entry> en : tmetadata) { + if ("SkinPart".equals(en.getKey())) { + boolean req = false; + if (en.getValue().containsKey("required")) { + if ("true".equals(en.getValue().get("required"))) { + req = true; + } + } + skinParts.put(tname, req); + } + } + } + } + if (!skinParts.isEmpty()) { + + //Merge parts from _skinParts attribute of parent class + GraphTargetItem parent = extendsVal; + if (parent instanceof UnresolvedAVM2Item) { + parent = ((UnresolvedAVM2Item) parent).resolved; + } + if (parent instanceof TypeItem) { + ClassIndex ci = abcIndex.findClass(parent, null, null/*FIXME?*/); + if (ci != null) { + int mi = ci.abc.class_info.get(ci.index).cinit_index; + MethodBody pcinit = ci.abc.findBody(mi); + ConvertData d = new ConvertData(); + + List callStack = new ArrayList<>(); + callStack.add(pcinit); + try { + pcinit.convert(callStack, null, d, "-", ScriptExportMode.AS, true, mi, -1, ci.index, ci.abc, null, new ScopeStack(), GraphTextWriter.TRAIT_CLASS_INITIALIZER, new NulWriter(), new ArrayList<>(), ci.abc.class_info.get(ci.index).static_traits, false, new HashSet<>()); + //FIXME! Add skinparts from _skinParts attribute of parent class!!! + } catch (InterruptedException ex) { + Logger.getLogger(AVM2SourceGenerator.class.getName()).log(Level.SEVERE, "Getting parent skinparts interrupted", ex); + } + for (Trait t : ci.abc.class_info.get(ci.index).static_traits.traits) { + if (t instanceof TraitSlotConst) { + TraitSlotConst tsc = (TraitSlotConst) t; + if (tsc.kindType == Trait.TRAIT_SLOT) { + if ("_skinParts".equals(tsc.getName(ci.abc).getName(ci.abc.constants, new ArrayList<>(), true, true))) { + if (d.assignedValues.containsKey(tsc)) { + if (d.assignedValues.get(tsc).value instanceof NewObjectAVM2Item) { + NewObjectAVM2Item no = (NewObjectAVM2Item) d.assignedValues.get(tsc).value; + for (NameValuePair nvp : no.pairs) { + skinParts.put(EcmaScript.toString(nvp.name.getResult()), EcmaScript.toBoolean(nvp.value.getResult())); + } + } + + } + } + } + } + } + + } + } + + /* + Add + override protected function get skinParts() : Object + { + return _skinParts; + } + */ + List getterBody = new ArrayList<>(); + UnresolvedAVM2Item sp = new UnresolvedAVM2Item(new ArrayList<>(), importedClasses, false, TypeItem.UNBOUNDED, 0, new DottedChain(new String[]{"_skinParts"}), + null, openedNamespaces, abcIndex); + getterBody.add(new ReturnValueAVM2Item(null, null, sp)); + List subvars = new ArrayList<>(); + subvars.add(sp); + List> allopns = new ArrayList<>(); + allopns.add(openedNamespaces); + + GetterAVM2Item getter = new GetterAVM2Item(allopns, false, false, new ArrayList<>(), new NamespaceItem(pkg.isEmpty() ? name : pkg.toRawString() + ":" + name, Namespace.KIND_PROTECTED), isInterface, null, false, false, 0, + true, false, false, "skinParts", new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), + getterBody, subvars, new TypeItem("Object")); + + /* + Add + private static var _skinParts = {attr1:false, attr2:true}; + */ + List pairs = new ArrayList<>(); + for (String tname : skinParts.keySet()) { + pairs.add(new NameValuePair(new StringAVM2Item(null, null, tname), skinParts.get(tname) ? new TrueItem(null, null) : new FalseItem(null, null))); + } + + NewObjectAVM2Item sltVal = new NewObjectAVM2Item(null, null, pairs); + + SlotAVM2Item slt = new SlotAVM2Item( + new ArrayList<>(), new NamespaceItem(pkg.isEmpty() ? name : pkg.toRawString() + ":" + name, Namespace.KIND_PRIVATE), + null, true, "_skinParts", new TypeItem("Object"), sltVal, 0); + + traitItems.add(0, slt); + traitItems.add(getter); + + } + } + + Trait[] it = generateTraitsPhase1(importedClasses, openedNamespaces, name, superName, false, localData, traitItems, instanceInfo.instance_traits, class_index, false); + Trait[] st = generateTraitsPhase1(importedClasses, openedNamespaces, name, superName, true, localData, traitItems, classInfo.static_traits, class_index, false); + generateTraitsPhase2(importedClasses, pkg, traitItems, it, openedNamespaces, localData); + generateTraitsPhase2(importedClasses, pkg, traitItems, st, openedNamespaces, localData); + abcIndex.refreshSelected(); + generateTraitsPhase4(importedClasses, openedNamespaces, initScope, isInterface, name, superName, false, localData, traitItems, instanceInfo.instance_traits, it, new HashMap<>(), class_index, false); + generateTraitsPhase4(importedClasses, openedNamespaces, initScope, isInterface, name, superName, true, localData, traitItems, classInfo.static_traits, st, new HashMap<>(), class_index, false); + int init; + if (iinit == null || isInterface) { + instanceInfo.iinit_index = init = method(false, 0, false, isInterface, new ArrayList<>(), pkg, false, new ArrayList<>(), initScope + 1, false, 0, isInterface ? null : name, extendsVal != null ? extendsVal.toString() : null, true, localData, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), TypeItem.UNBOUNDED/*?? FIXME*/); + } else { + MethodAVM2Item m = (MethodAVM2Item) iinit; + instanceInfo.iinit_index = init = method(false, pkg.toRawString().isEmpty() ? str(name + "/" + name) : str(pkg.toRawString() + ":" + name + "/" + name), false, false, new ArrayList<>(), pkg, m.needsActivation, m.subvariables, initScope + 1, m.hasRest, m.line, name, extendsVal != null ? extendsVal.toString() : null, true, localData, m.paramTypes, m.paramNames, m.paramValues, m.body, TypeItem.UNBOUNDED/*?? FIXME*/); + } + + //Class initializer + int cinit_index = method(true, str(""), false, false, new ArrayList<>(), pkg, cinitNeedsActivation, cinitVariables, initScope + (implementsStr.isEmpty() ? 0 : 1), false, 0, isInterface ? null : name, superName, false, localData, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), cinit, TypeItem.UNBOUNDED); + MethodBody cinitBody = abcIndex.getSelectedAbc().findBody(cinit_index); + + List sinitcode = new ArrayList<>(); + List initcode = new ArrayList<>(); + for (GraphTargetItem ti : traitItems) { + if ((ti instanceof SlotAVM2Item) || (ti instanceof ConstAVM2Item)) { + GraphTargetItem val = null; + boolean isStatic = false; + int ns = -1; + String tname = null; + boolean isConst = false; + if (ti instanceof SlotAVM2Item) { + val = ((SlotAVM2Item) ti).value; + isStatic = ((SlotAVM2Item) ti).isStatic(); + ns = genNs(importedClasses, pkg, ((SlotAVM2Item) ti).pkg, openedNamespaces, localData, ((SlotAVM2Item) ti).line); + tname = ((SlotAVM2Item) ti).var; + } + if (ti instanceof ConstAVM2Item) { + val = ((ConstAVM2Item) ti).value; + isStatic = ((ConstAVM2Item) ti).isStatic(); + ns = genNs(importedClasses, pkg, ((ConstAVM2Item) ti).pkg, openedNamespaces, localData, ((ConstAVM2Item) ti).line); + tname = ((ConstAVM2Item) ti).var; + isConst = true; + } + if (isStatic && val != null) { + sinitcode.add(ins(AVM2Instructions.FindProperty, traitName(ns, tname))); + localData.isStatic = true; + sinitcode.addAll(toInsList(val.toSource(localData, this))); + sinitcode.add(ins(isConst ? AVM2Instructions.InitProperty : AVM2Instructions.SetProperty, traitName(ns, tname))); + } + if (!isStatic && val != null) { + //do not init basic values, that can be stored in trait + if (!(val instanceof IntegerValueAVM2Item) && !(val instanceof StringAVM2Item) && !(val instanceof BooleanAVM2Item) && !(val instanceof NullAVM2Item) && !(val instanceof UndefinedAVM2Item)) { + initcode.add(ins(AVM2Instructions.GetLocal0)); + localData.isStatic = false; + initcode.addAll(toInsList(val.toSource(localData, this))); + initcode.add(ins(isConst ? AVM2Instructions.InitProperty : AVM2Instructions.SetProperty, traitName(ns, tname))); + } + } + } + } + MethodBody initBody = null; + if (!isInterface) { + initBody = abcIndex.getSelectedAbc().findBody(init); + initBody.insertAll(iinit == null ? 0 : 2, initcode); //after getlocal0,pushscope + + if (cinitBody.getCode().code.get(cinitBody.getCode().code.size() - 1).definition instanceof ReturnVoidIns) { + cinitBody.insertAll(2, sinitcode); //after getlocal0,pushscope + } + } + cinitBody.markOffsets(); + cinitBody.autoFillStats(abcIndex.getSelectedAbc(), initScope + (implementsStr.isEmpty() ? 0 : 1), true); + + classInfo.cinit_index = cinit_index; + if (initBody != null) { + initBody.autoFillStats(abcIndex.getSelectedAbc(), initScope + 1, true); + } + instanceInfo.interfaces = new int[implementsStr.size()]; + for (int i = 0; i < implementsStr.size(); i++) { + instanceInfo.interfaces[i] = superIntName(localData, implementsStr.get(i)); + } + + } + + public int generateClass(int namespace, ClassInfo ci, InstanceInfo ii, int initScope, DottedChain pkg, SourceGeneratorLocalData localData, AVM2Item cls, Reference class_index) throws AVM2ParseException, CompilationException { + /*ClassInfo ci = new ClassInfo(); + InstanceInfo ii = new InstanceInfo(); + abc.class_info.add(ci); + abc.instance_info.add(ii); + */ + if (cls instanceof ClassAVM2Item) { + ClassAVM2Item cai = (ClassAVM2Item) cls; + //TODO: iinit variables, iinit activation + generateClass(cai.importedClasses, cai.cinitVariables, cai.cinitActivation, cai.staticInit, + cai.openedNamespaces, + namespace, + initScope, pkg, ci, ii, + localData, false, + cai.className, cai.extendsOp == null ? "Object" : cai.extendsOp.toString(), + cai.extendsOp, cai.implementsOp, cai.iinit, + cai.iinitVariables, cai.iinitActivation, cai.traits, class_index + ); + if (!cai.isDynamic) { + ii.flags |= InstanceInfo.CLASS_SEALED; + } + if (cai.isFinal) { + ii.flags |= InstanceInfo.CLASS_FINAL; + } + ii.flags |= InstanceInfo.CLASS_PROTECTEDNS; + ii.protectedNS = abcIndex.getSelectedAbc().constants.getNamespaceId(Namespace.KIND_PROTECTED, pkg.toRawString().isEmpty() ? cai.className : pkg.toRawString() + ":" + cai.className, 0, true); + } + if (cls instanceof InterfaceAVM2Item) { + InterfaceAVM2Item iai = (InterfaceAVM2Item) cls; + ii.flags |= InstanceInfo.CLASS_INTERFACE; + ii.flags |= InstanceInfo.CLASS_SEALED; + generateClass(iai.importedClasses, new ArrayList<>(), false, new ArrayList<>(), + iai.openedNamespaces, namespace, initScope, pkg, ci, ii, localData, true, iai.name, null, null, iai.superInterfaces, null, null, false, iai.methods, + class_index + ); + } + + return abcIndex.getSelectedAbc().instance_info.size() - 1; + } + + public int traitName(int namespace, String var) { + return abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createQName(false, str(var), namespace), true); + } + + public int typeName(SourceGeneratorLocalData localData, GraphTargetItem type) throws CompilationException { + if (type.equals(TypeItem.UNBOUNDED)) { + return 0; + } + if (("" + type).equals("*")) { + return 0; + } + + return resolveType(localData, type, abcIndex); + /* + TypeItem nameItem = (TypeItem) type; + name = nameItem.fullTypeName; + if (name.contains(".")) { + pkg = name.substring(0, name.lastIndexOf('.')); + name = name.substring(name.lastIndexOf('.') + 1); + } + if (!nameItem.subtypes.isEmpty()) { //It's vector => TypeName + List params = new ArrayList<>(); + for (GraphTargetItem p : nameItem.subtypes) { + params.add(typeName(localData, p));//abc.getLastAbc().constants.getMultinameId(new Multiname(Multiname.QNAME, str(p), namespace(Namespace.KIND_PACKAGE, ppkg), 0, 0, new ArrayList()), true)); + } + int qname = abc.getLastAbc().constants.getMultinameId(new Multiname(Multiname.QNAME, str(name), namespace(Namespace.KIND_PACKAGE, pkg), 0, 0, new ArrayList()), true); + return abc.getLastAbc().constants.getMultinameId(new Multiname(Multiname.TYPENAME, 0, 0, 0, qname, params), true); + } else { + return abc.getLastAbc().constants.getMultinameId(new Multiname(Multiname.QNAME, str(name), namespace(Namespace.KIND_PACKAGE, pkg), 0, 0, new ArrayList()), true); + }*/ + } + + public int ident(GraphTargetItem name) { + if (name instanceof NameAVM2Item) { + return str(((NameAVM2Item) name).getVariableName()); + } + throw new RuntimeException("no ident"); //FIXME + } + + public int namespace(int nsKind, String name) { + return abcIndex.getSelectedAbc().constants.getNamespaceId(nsKind, str(name), 0, true); + } + + public int str(String name) { + return abcIndex.getSelectedAbc().constants.getStringId(name, true); + } + + public int propertyName(GraphTargetItem name) { + if (name instanceof NameAVM2Item) { + NameAVM2Item va = (NameAVM2Item) name; + return abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createQName(false, str(va.getVariableName()), namespace(Namespace.KIND_PACKAGE, "")), true); + } + throw new RuntimeException("no prop"); //FIXME + } + + public int getFreeRegister(SourceGeneratorLocalData localData) { + for (int i = 0;; i++) { + if (!localData.registerVars.containsValue(i)) { + localData.registerVars.put("__TEMP__" + i, i); + return i; + } + } + } + + public boolean killRegister(SourceGeneratorLocalData localData, int i) { + String key = null; + for (String k : localData.registerVars.keySet()) { + if (localData.registerVars.get(k) == i) { + key = k; + break; + } + } + if (key != null) { + localData.registerVars.remove(key); + return true; + } + return false; + } + + public int method(boolean isStatic, int name_index, boolean subMethod, boolean isInterface, List callStack, DottedChain pkg, boolean needsActivation, List subvariables, int initScope, boolean hasRest, int line, String className, String superType, boolean constructor, SourceGeneratorLocalData localData, List paramTypes, List paramNames, List paramValues, List body, GraphTargetItem retType) throws CompilationException { + //Reference hasArgs = new Reference<>(Boolean.FALSE); + //calcRegisters(localData,needsActivation,paramNames,subvariables,body, hasArgs); + SourceGeneratorLocalData newlocalData = new SourceGeneratorLocalData(new HashMap<>(), 1, true, 0); + newlocalData.currentClass = className; + newlocalData.pkg = localData.pkg; + newlocalData.callStack.addAll(localData.callStack); + newlocalData.traitUsages = localData.traitUsages; + newlocalData.currentScript = localData.currentScript; + newlocalData.scriptIndex = localData.scriptIndex; + newlocalData.privateNs = localData.privateNs; + newlocalData.protectedNs = localData.protectedNs; + newlocalData.isStatic = isStatic; + newlocalData.subMethod = subMethod; + localData = newlocalData; + + localData.activationReg = 0; + + for (int i = 0; i < subvariables.size(); i++) { + AssignableAVM2Item an = subvariables.get(i); + if (an instanceof UnresolvedAVM2Item) { + UnresolvedAVM2Item n = (UnresolvedAVM2Item) an; + if (n.resolved == null) { + String fullClass = localData.getFullClass(); + GraphTargetItem res = n.resolve(localData, localData.currentClass, new TypeItem(fullClass), paramTypes, paramNames, abcIndex, callStack, subvariables); + if (res instanceof AssignableAVM2Item) { + subvariables.set(i, (AssignableAVM2Item) res); + } else { + subvariables.remove(i); + i--; + } + } + } + } + + for (int t = 0; t < paramTypes.size(); t++) { + GraphTargetItem an = paramTypes.get(t); + if (an instanceof UnresolvedAVM2Item) { + UnresolvedAVM2Item n = (UnresolvedAVM2Item) an; + if (n.resolved == null) { + String fullClass = localData.getFullClass(); + GraphTargetItem res = n.resolve(localData, localData.currentClass, new TypeItem(fullClass), paramTypes, paramNames, abcIndex, callStack, subvariables); + paramTypes.set(t, res); + } + } + } + + boolean hasArguments = false; + List slotNames = new ArrayList<>(); + List slotTypes = new ArrayList<>(); + slotNames.add("--first"); + slotTypes.add(TypeItem.UNBOUNDED); + + int paramLine = 0; //? + + List registerNames = new ArrayList<>(); + List registerLines = new ArrayList<>(); + List registerTypes = new ArrayList<>(); + if (className != null && !subMethod) { + String fullClassName = pkg.addWithSuffix(className).toRawString(); + registerTypes.add(new TypeItem(fullClassName)); + localData.scopeStack.add(new LocalRegAVM2Item(null, null, registerNames.size(), null, new TypeItem(fullClassName))); + registerNames.add("this"); + registerLines.add(0); //? + + } else { + registerTypes.add(new TypeItem("global")); + registerNames.add("this"); + registerLines.add(0); //? + } + for (GraphTargetItem t : paramTypes) { + registerTypes.add(t); + slotTypes.add(t); + } + for (int i = 0; i < paramNames.size(); i++) { + registerLines.add(paramLine); + } + registerNames.addAll(paramNames); + slotNames.addAll(paramNames); + if (hasRest) { + registerTypes.add(TypeItem.ARRAY); + slotTypes.add(TypeItem.ARRAY); + } + localData.registerVars.clear(); + for (AssignableAVM2Item an : subvariables) { + if (an instanceof NameAVM2Item) { + NameAVM2Item n = (NameAVM2Item) an; + if (n.getVariableName().equals("arguments") & !n.isDefinition()) { + registerNames.add("arguments"); + registerTypes.add(new TypeItem("Array")); + registerLines.add(0); //? + slotNames.add(n.getVariableName()); + slotTypes.add(new TypeItem("Array")); + hasArguments = true; + break; + } + } + } + int paramRegCount = registerNames.size(); + + if (needsActivation) { + registerNames.add("+$activation"); + registerLines.add(0); //? + localData.activationReg = registerNames.size() - 1; + registerTypes.add(new TypeItem("Object")); + localData.scopeStack.add(new LocalRegAVM2Item(null, null, localData.activationReg, null, new TypeItem("Object"))); + } + + String mask = Configuration.registerNameFormat.get(); + String maskRegexp = mask.replace("%d", "([0-9]+)"); + Pattern pat = Pattern.compile(maskRegexp); + + final String UNUSED = "~~unused"; + + //Two rounds + for (int round = 1; round <= 2; round++) { + for (AssignableAVM2Item an : subvariables) { + if (an instanceof NameAVM2Item) { + NameAVM2Item n = (NameAVM2Item) an; + if (n.isDefinition() && !registerNames.contains(n.getVariableName())) { + String varName = n.getVariableName(); + if (!needsActivation) { + Matcher m = pat.matcher(varName); + //In first round, make all register that match standard loc_xx register + if ((round == 1) && (m.matches())) { + String regIndexStr = m.group(1); + int regIndex = Integer.parseInt(regIndexStr); + while (registerNames.size() <= regIndex) { + registerNames.add(UNUSED); + registerTypes.add(TypeItem.UNBOUNDED); + registerLines.add(paramLine); + } + registerNames.set(regIndex, varName); + registerTypes.set(regIndex, n.type); + registerLines.set(regIndex, n.line); + + } else if (round == 2 && !m.matches()) { //in second round the rest + + //search for some unused indices first: + int newRegIndex = -1; + for (int j = 0; j < registerNames.size(); j++) { + if (UNUSED.equals(registerNames.get(j))) { + newRegIndex = j; + break; + } + } + if (newRegIndex == -1) { + newRegIndex = registerNames.size(); + registerNames.add(UNUSED); + registerTypes.add(TypeItem.UNBOUNDED); + registerLines.add(paramLine); + } + registerNames.set(newRegIndex, n.getVariableName()); + registerTypes.set(newRegIndex, n.type); + registerLines.set(newRegIndex, n.line); + } + } else { + if (round == 1) { + if (!slotNames.contains(varName)) { + slotNames.add(varName); + slotTypes.add(n.type); + } + } + } + } + } + } + } + + for (int j = registerNames.size() - 1; j >= 0; j--) { + if (UNUSED.equals(registerNames.get(j))) { + registerNames.remove(j); + registerTypes.remove(j); + registerLines.remove(j); + } + } + for (int j = 0; j < registerNames.size(); j++) { + if (UNUSED.equals(registerNames.get(j))) { + String standardName = String.format(mask, j); + registerNames.set(j, standardName); + } + } + + int slotScope = subMethod ? 0 : 1; + + for (AssignableAVM2Item an : subvariables) { + if (an instanceof NameAVM2Item) { + NameAVM2Item n = (NameAVM2Item) an; + String variableName = n.getVariableName(); + if (variableName != null) { + boolean isThisOrSuper = variableName.equals("this") || variableName.equals("super"); + if (!isThisOrSuper && needsActivation) { + if (n.getSlotNumber() <= 0) { + n.setSlotNumber(slotNames.indexOf(variableName)); + n.setSlotScope(slotScope); + } + } else if (isThisOrSuper) { + n.setRegNumber(0); + } else { + n.setRegNumber(registerNames.indexOf(variableName)); + } + } + } + } + + for (int i = 0; i < registerNames.size(); i++) { + if (needsActivation && i > localData.activationReg) { + break; + } + localData.registerVars.put(registerNames.get(i), i); + } + List declarations = new ArrayList<>(); + loopn: + for (AssignableAVM2Item an : subvariables) { + if (an instanceof NameAVM2Item) { + NameAVM2Item n = (NameAVM2Item) an; + + if (needsActivation) { + if (n.getSlotScope() != slotScope) { + continue; + } else if (n.getSlotNumber() < paramRegCount) { + continue; + } + } + for (NameAVM2Item d : declarations) { + if (n.getVariableName() != null && n.getVariableName().equals(d.getVariableName())) { + continue loopn; + } + } + + for (GraphTargetItem it : body) { //search first level of commands + if (it instanceof NameAVM2Item) { + NameAVM2Item n2 = (NameAVM2Item) it; + if (n2.isDefinition() && n2.getAssignedValue() != null && n2.getVariableName().equals(n.getVariableName())) { + continue loopn; + } + if (!n2.isDefinition() && n2.getVariableName() != null && n2.getVariableName().equals(n.getVariableName())) { //used earlier than defined + break; + } + } + } + if (n.unresolved) { + continue; + } + if (n.redirect != null) { + continue; + } + if (n.getNs() != null) { + continue; + } + + String variableName = n.getVariableName(); + if ("this".equals(variableName) || "super".equals(variableName) || paramNames.contains(variableName) || "arguments".equals(variableName)) { + continue; + } + + NameAVM2Item d = new NameAVM2Item(n.type, n.line, n.isAttribute(), n.getVariableName(), n.getNamespaceSuffix(), null /*NameAVM2Item.getDefaultValue("" + n.type)*/, true, n.openedNamespaces, abcIndex); + //no index + if (needsActivation) { + if (d.getSlotNumber() <= 0) { + d.setSlotNumber(n.getSlotNumber()); + d.setSlotScope(n.getSlotScope()); + } + } else { + d.setRegNumber(n.getRegNumber()); + } + declarations.add(d); + } + } + + int[] param_types = new int[paramTypes.size()]; + ValueKind[] optional = new ValueKind[paramValues.size()]; + //int[] param_names = new int[paramNames.size()]; + for (int i = 0; i < paramTypes.size(); i++) { + param_types[i] = typeName(localData, paramTypes.get(i)); + //param_names[i] = str(paramNames.get(i)); + } + + for (int i = 0; i < paramValues.size(); i++) { + optional[i] = getValueKind(Namespace.KIND_NAMESPACE/*FIXME*/, paramTypes.get(paramTypes.size() - paramValues.size() + i), paramValues.get(i), false); + if (optional[i] == null) { + throw new CompilationException("Default value must be compiletime constant", line); + } + } + + MethodInfo mi = new MethodInfo(param_types, constructor ? 0 : typeName(localData, retType), name_index, 0, optional, new int[0]/*no param_names*/); + if (hasArguments) { + mi.setFlagNeed_Arguments(); + } + //No param names like in official + /* + if (!paramNames.isEmpty()) { + mi.setFlagHas_paramnames(); + }*/ + if (!paramValues.isEmpty()) { + mi.setFlagHas_optional(); + } + if (hasRest) { + mi.setFlagNeed_rest(); + } + + int mindex; + if (!isInterface) { + MethodBody mbody = new MethodBody(abcIndex.getSelectedAbc(), new Traits(), new byte[0], new ABCException[0]); + + if (needsActivation) { + int slotId = 1; + for (int i = 1; i < slotNames.size(); i++) { + TraitSlotConst tsc = new TraitSlotConst(); + tsc.slot_id = slotId++; + tsc.name_index = abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createQName(false, abcIndex.getSelectedAbc().constants.getStringId(slotNames.get(i), true), abcIndex.getSelectedAbc().constants.getNamespaceId(Namespace.KIND_PACKAGE_INTERNAL, pkg, 0, true)), true); + tsc.type_index = typeName(localData, slotTypes.get(i)); + mbody.traits.traits.add(tsc); + } + for (int i = 1; i < paramRegCount; i++) { + NameAVM2Item param = new NameAVM2Item(registerTypes.get(i), 0, false, registerNames.get(i), "", null, false, new ArrayList<>(), abcIndex); + param.setRegNumber(i); + NameAVM2Item d = new NameAVM2Item(registerTypes.get(i), 0, false, registerNames.get(i), "", param, true, new ArrayList<>(), abcIndex); + d.setSlotScope(slotScope); + d.setSlotNumber(slotNames.indexOf(registerNames.get(i))); + declarations.add(d); + } + } + boolean addRet = false; + if (body != null) { + body.addAll(0, declarations); + if (body.isEmpty() || (!((body.get(body.size() - 1) instanceof ReturnValueAVM2Item) + || (body.get(body.size() - 1) instanceof ReturnVoidAVM2Item)))) { + addRet = true; + } + } + + localData.exceptions = new ArrayList<>(); + localData.callStack.add(mbody); + List src = body == null ? new ArrayList<>() : generate(localData, body); + + mbody.method_info = abcIndex.getSelectedAbc().addMethodInfo(mi); + ArrayList mbodyCode = toInsList(src); + mbody.setCode(new AVM2Code(mbodyCode)); + + if (needsActivation) { + /*if (localData.traitUsages.containsKey(mbody)) { + List usages = localData.traitUsages.get(mbody); + List mbodyCodeDecl = new ArrayList<>(); + for (int i = 0; i < mbody.traits.traits.size(); i++) { + if (usages.contains(i)) { + TraitSlotConst tsc = (TraitSlotConst) mbody.traits.traits.get(i); + GraphTargetItem type = TypeItem.UNBOUNDED; + if (tsc.type_index > 0) { + type = new TypeItem(abcIndex.getSelectedAbc().constants.getMultiname(tsc.type_index).getNameWithNamespace(abcIndex.getSelectedAbc().constants, true)); + } + NameAVM2Item d = new NameAVM2Item(type, 0, tsc.getName(abcIndex.getSelectedAbc()).getName(abcIndex.getSelectedAbc().constants, null, true, true), NameAVM2Item.getDefaultValue("" + type), true, new ArrayList<>(), abcIndex); + d.setSlotNumber(tsc.slot_id); + d.setSlotScope(slotScope); + mbodyCodeDecl.addAll(toInsList(d.toSourceIgnoreReturnValue(localData, this))); + } + } + mbodyCode.addAll(0, mbodyCodeDecl); + }*/ + + List acts = new ArrayList<>(); + acts.add(ins(AVM2Instructions.NewActivation)); + acts.add(ins(AVM2Instructions.Dup)); + acts.add(AssignableAVM2Item.generateSetLoc(localData.activationReg)); + acts.add(ins(AVM2Instructions.PushScope)); + + mbodyCode.addAll(0, acts); + } + + if (constructor) { + /* List abcs = new ArrayList<>(); + abcs.add(abc); + abcs.addAll(allABCs); + */ + int parentConstMinAC = 0; + + AbcIndexing.ClassIndex ci = abcIndex.findClass(new TypeItem(superType), null, null/*FIXME?*/); + + if (ci != null) { + MethodInfo pmi = ci.abc.method_info.get(ci.abc.instance_info.get(ci.index).iinit_index); + parentConstMinAC = pmi.param_types.length; + if (pmi.flagHas_optional()) { + parentConstMinAC -= pmi.optional.length; + } + } + int ac = -1; + for (AVM2Instruction ins : mbodyCode) { + if (ins.definition instanceof ConstructSuperIns) { + ac = ins.operands[0]; + if (parentConstMinAC > ac) { + throw new CompilationException("Parent constructor call requires different number of arguments", line); + } + + } + } + if (ac == -1) { + if (parentConstMinAC == 0) { + mbodyCode.add(0, new AVM2Instruction(0, AVM2Instructions.GetLocal0, null)); + mbodyCode.add(1, new AVM2Instruction(0, AVM2Instructions.ConstructSuper, new int[]{0})); + + } else { + throw new CompilationException("Parent constructor must be called", line); + } + } + } + for (int i = 1; i < registerNames.size(); i++) { + mbodyCode.add(i - 1, ins(AVM2Instructions.Debug, 1, str(registerNames.get(i)), i - 1, (int) registerLines.get(i))); + } + if (!subMethod) { + mbodyCode.add(0, new AVM2Instruction(0, AVM2Instructions.GetLocal0, null)); + mbodyCode.add(1, new AVM2Instruction(0, AVM2Instructions.PushScope, null)); + } + /*if (!mbodyCode.isEmpty()) { + InstructionDefinition lastDef = mbodyCode.get(mbodyCode.size() - 1).definition; + if (!((lastDef instanceof ReturnVoidIns) || (lastDef instanceof ReturnValueIns))) { + addRet = true; + } + } else { + addRet = true; + }*/ + if (addRet) { + if (retType.toString().equals("*") || retType.toString().equals("void") || constructor) { + mbodyCode.add(new AVM2Instruction(0, AVM2Instructions.ReturnVoid, null)); + } else { + mbodyCode.add(new AVM2Instruction(0, AVM2Instructions.PushUndefined, null)); + mbodyCode.add(new AVM2Instruction(0, AVM2Instructions.ReturnValue, null)); + } + } + mbody.exceptions = localData.exceptions.toArray(new ABCException[localData.exceptions.size()]); + int offset = 0; + for (int i = 0; i < mbodyCode.size(); i++) { + AVM2Instruction ins = mbodyCode.get(i); + if (ins instanceof ExceptionMarkAVM2Instruction) { + ExceptionMarkAVM2Instruction m = (ExceptionMarkAVM2Instruction) ins; + switch (m.markType) { + case MARK_E_START: + mbody.exceptions[m.exceptionId].start = offset; + break; + case MARK_E_END: + mbody.exceptions[m.exceptionId].end = offset; + break; + case MARK_E_TARGET: + mbody.exceptions[m.exceptionId].target = offset; + break; + } + mbodyCode.remove(i); + i--; + continue; + } + offset += ins.getBytesLength(); + } + + mbody.markOffsets(); + mbody.autoFillStats(abcIndex.getSelectedAbc(), initScope, className != null); + abcIndex.getSelectedAbc().addMethodBody(mbody); + mindex = mbody.method_info; + } else { + mindex = abcIndex.getSelectedAbc().addMethodInfo(mi); + } + + return mindex; + } + + public ValueKind getValueKind(int ns, GraphTargetItem type, GraphTargetItem val, boolean generatedNs) { + + if (val instanceof BooleanAVM2Item) { + BooleanAVM2Item bi = (BooleanAVM2Item) val; + if (bi.value) { + return new ValueKind(ValueKind.CONSTANT_True, ValueKind.CONSTANT_True); + } else { + return new ValueKind(ValueKind.CONSTANT_False, ValueKind.CONSTANT_False); + } + } + + boolean isNs = false; + if (type instanceof NameAVM2Item) { + if (((NameAVM2Item) type).getVariableName().equals("namespace")) { + isNs = true; + } + } + + if ((type instanceof TypeItem) && (((TypeItem) type).fullTypeName.equals(DottedChain.NAMESPACE))) { + isNs = true; + } + + if (val instanceof StringAVM2Item) { + StringAVM2Item sval = (StringAVM2Item) val; + if (isNs) { + return new ValueKind(namespace(generatedNs ? Namespace.KIND_PACKAGE_INTERNAL : Namespace.KIND_NAMESPACE, sval.getValue()), ValueKind.CONSTANT_Namespace); + } else { + return new ValueKind(str(sval.getValue()), ValueKind.CONSTANT_Utf8); + } + } + if (val instanceof IntegerValueAVM2Item) { + return new ValueKind(abcIndex.getSelectedAbc().constants.getIntId(((IntegerValueAVM2Item) val).value, true), ValueKind.CONSTANT_Int); + } + if (val instanceof FloatValueAVM2Item) { + return new ValueKind(abcIndex.getSelectedAbc().constants.getDoubleId(((FloatValueAVM2Item) val).value, true), ValueKind.CONSTANT_Double); + } + if (val instanceof NanAVM2Item) { + return new ValueKind(abcIndex.getSelectedAbc().constants.getDoubleId(Double.NaN, true), ValueKind.CONSTANT_Double); + } + if (val instanceof NullAVM2Item) { + return new ValueKind(ValueKind.CONSTANT_Null, ValueKind.CONSTANT_Null); + } + if (val instanceof UndefinedAVM2Item) { + return new ValueKind(ValueKind.CONSTANT_Undefined, ValueKind.CONSTANT_Undefined); + } + + //TODO: the compiler should check whether default value is compatible with its type + //Flash CS6 does this, example message: "Incompatible default value of type int where String is expected." + //However a negative integer value on uint type silently loses its negation. Weird. + return null; + } + + private int genNs(List importedClasses, DottedChain pkg, NamespaceItem ns, List openedNamespaces, SourceGeneratorLocalData localData, int line) throws CompilationException { + ns.resolveCustomNs(abcIndex, importedClasses, pkg, openedNamespaces, localData); + return ns.getCpoolIndex(abcIndex); + } + + public void generateTraitsPhase2(List importedClasses, DottedChain pkg, List items, Trait[] traits, List openedNamespaces, SourceGeneratorLocalData localData) throws CompilationException { + for (int k = 0; k < items.size(); k++) { + GraphTargetItem item = items.get(k); + if (traits[k] == null) { + //empty + } else if (item instanceof InterfaceAVM2Item) { + traits[k].name_index = traitName(((InterfaceAVM2Item) item).pkg == null ? 0 : ((InterfaceAVM2Item) item).pkg.getCpoolIndex(abcIndex), ((InterfaceAVM2Item) item).name); + } else if (item instanceof ClassAVM2Item) { + traits[k].name_index = traitName(((ClassAVM2Item) item).pkg == null ? 0 : ((ClassAVM2Item) item).pkg.getCpoolIndex(abcIndex), ((ClassAVM2Item) item).className); + } else if ((item instanceof MethodAVM2Item) || (item instanceof GetterAVM2Item) || (item instanceof SetterAVM2Item)) { + traits[k].name_index = traitName(genNs(importedClasses, pkg, ((MethodAVM2Item) item).pkg, openedNamespaces, localData, ((MethodAVM2Item) item).line), ((MethodAVM2Item) item).functionName); + } else if (item instanceof FunctionAVM2Item) { + traits[k].name_index = traitName(((FunctionAVM2Item) item).pkg == null ? 0 : ((FunctionAVM2Item) item).pkg.getCpoolIndex(abcIndex), ((FunctionAVM2Item) item).functionName); + } else if (item instanceof ConstAVM2Item) { + traits[k].name_index = traitName(genNs(importedClasses, pkg, ((ConstAVM2Item) item).pkg, openedNamespaces, localData, ((ConstAVM2Item) item).line), ((ConstAVM2Item) item).var); + } else if (item instanceof SlotAVM2Item) { + traits[k].name_index = traitName(genNs(importedClasses, pkg, ((SlotAVM2Item) item).pkg, openedNamespaces, localData, ((SlotAVM2Item) item).line), ((SlotAVM2Item) item).var); + } + } + + for (int k = 0; k < items.size(); k++) { + GraphTargetItem item = items.get(k); + if (traits[k] == null) { + continue; + } + if (item instanceof ClassAVM2Item) { + localData.currentClass = ((ClassAVM2Item) item).pkg.name.addWithSuffix(((ClassAVM2Item) item).className).toRawString(); + InstanceInfo instanceInfo = abcIndex.getSelectedAbc().instance_info.get(((TraitClass) traits[k]).class_info); + instanceInfo.name_index = abcIndex.getSelectedAbc().constants.getMultinameId( + Multiname.createQName( + false, + abcIndex.getSelectedAbc().constants.getStringId(((ClassAVM2Item) item).className, true), + ((ClassAVM2Item) item).pkg.getCpoolIndex(abcIndex)), true); + + localData.currentClass = null; + } + if (item instanceof InterfaceAVM2Item) { + localData.currentClass = ((InterfaceAVM2Item) item).pkg.name.addWithSuffix(((InterfaceAVM2Item) item).name).toRawString(); + ABC abc = abcIndex.getSelectedAbc(); + AVM2ConstantPool constants = abc.constants; + InstanceInfo instanceInfo = abc.instance_info.get(((TraitClass) traits[k]).class_info); + instanceInfo.name_index = constants.getMultinameId(Multiname.createQName(false, constants.getStringId(((InterfaceAVM2Item) item).name, true), + ((InterfaceAVM2Item) item).pkg.getCpoolIndex(abcIndex)), true); + + localData.currentClass = null; + } + } + } + + public void generateTraitsPhase3(List items, Trait[] traits, SourceGeneratorLocalData localData) throws CompilationException { + for (int k = 0; k < items.size(); k++) { + GraphTargetItem item = items.get(k); + if (traits[k] == null) { + continue; + } + if (item instanceof ClassAVM2Item) { + int minClassIndex = -1; + localData.currentClass = ((ClassAVM2Item) item).pkg.name.addWithSuffix(((ClassAVM2Item) item).className).toRawString(); + InstanceInfo instanceInfo = abcIndex.getSelectedAbc().instance_info.get(((TraitClass) traits[k]).class_info); + ABC abc = abcIndex.getSelectedAbc(); + if (((ClassAVM2Item) item).extendsOp != null) { + instanceInfo.super_index = typeName(localData, ((ClassAVM2Item) item).extendsOp); + } else { + instanceInfo.super_index = abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createQName(false, str("Object"), namespace(Namespace.KIND_PACKAGE, "")), true); + } + if (instanceInfo.super_index != 0) { + int foundClass = abc.findClassByName(abc.constants.getMultiname(instanceInfo.super_index).getNameWithNamespace(abc.constants, true)); + if (foundClass > -1) { + if (foundClass > minClassIndex) { + minClassIndex = foundClass; + } + } + } + instanceInfo.interfaces = new int[((ClassAVM2Item) item).implementsOp.size()]; + for (int i = 0; i < ((ClassAVM2Item) item).implementsOp.size(); i++) { + instanceInfo.interfaces[i] = superIntName(localData, ((ClassAVM2Item) item).implementsOp.get(i)); + int foundIface = abc.findClassByName(abc.constants.getMultiname(instanceInfo.interfaces[i]).getNameWithNamespace(abc.constants, true)); + if (foundIface > -1) { + if (foundIface > minClassIndex) { + minClassIndex = foundIface; + } + } + } + int oldClassIndex = ((TraitClass) traits[k]).class_info; + if (oldClassIndex <= minClassIndex) { + abc.moveClass(oldClassIndex, minClassIndex + 1); + } + localData.currentClass = null; + } + if (item instanceof InterfaceAVM2Item) { + int minClassIndex = -1; + localData.currentClass = ((InterfaceAVM2Item) item).pkg.name.addWithSuffix(((InterfaceAVM2Item) item).name).toRawString(); + ABC abc = abcIndex.getSelectedAbc(); + InstanceInfo instanceInfo = abc.instance_info.get(((TraitClass) traits[k]).class_info); + instanceInfo.interfaces = new int[((InterfaceAVM2Item) item).superInterfaces.size()]; + for (int i = 0; i < ((InterfaceAVM2Item) item).superInterfaces.size(); i++) { + GraphTargetItem un = ((InterfaceAVM2Item) item).superInterfaces.get(i); + instanceInfo.interfaces[i] = superIntName(localData, un); + + int foundIface = abc.findClassByName(abc.constants.getMultiname(instanceInfo.interfaces[i]).getNameWithNamespace(abc.constants, true)); + if (foundIface > -1) { + if (foundIface > minClassIndex) { + minClassIndex = foundIface; + } + } + } + int oldClassIndex = ((TraitClass) traits[k]).class_info; + if (oldClassIndex <= minClassIndex) { + abc.moveClass(oldClassIndex, minClassIndex + 1); + } + localData.currentClass = null; + } + } + } + + public int superIntName(SourceGeneratorLocalData localData, GraphTargetItem un) throws CompilationException { + if (un instanceof UnresolvedAVM2Item) { + ((UnresolvedAVM2Item) un).resolve(localData, localData.currentClass, null, new ArrayList<>(), new ArrayList<>(), abcIndex, new ArrayList<>(), new ArrayList<>()); + un = ((UnresolvedAVM2Item) un).resolved; + } + if (!(un instanceof TypeItem)) { //not applyType + throw new CompilationException("Invalid type", 0); + } + TypeItem sup = (TypeItem) un; + int propId = resolveType(localData, sup, abcIndex); + int[] nss = new int[]{abcIndex.getSelectedAbc().constants.getMultiname(propId).namespace_index}; + return abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createMultiname(false, abcIndex.getSelectedAbc().constants.getMultiname(propId).name_index, abcIndex.getSelectedAbc().constants.getNamespaceSetId(nss, true)), true); + + } + + public int[] generateMetadata(List>> metadata, ABC abc) { + List retList = new ArrayList<>(); + for (int i = 0; i < metadata.size(); i++) { + Map.Entry> en = metadata.get(i); + if ("API".equals(en.getKey()) && abc.isApiVersioned()) { + continue; + } + int[] keys = new int[en.getValue().size()]; + int[] values = new int[en.getValue().size()]; + int j = 0; + for (String key : en.getValue().keySet()) { + keys[j] = abcIndex.getSelectedAbc().constants.getStringId(key, true); + values[j] = abcIndex.getSelectedAbc().constants.getStringId(en.getValue().get(key), true); + j++; + } + MetadataInfo mi = new MetadataInfo(abcIndex.getSelectedAbc().constants.getStringId(en.getKey(), true), keys, values); + retList.add(abcIndex.getSelectedAbc().metadata_info.size()); + abcIndex.getSelectedAbc().metadata_info.add(mi); + } + int[] ret = new int[retList.size()]; + for (int i = 0; i < retList.size(); i++) { + ret[i] = retList.get(i); + } + return ret; + } + + public void generateTraitsPhase4(List importedClasses, List openedNamespaces, int methodInitScope, boolean isInterface, String className, String superName, boolean generateStatic, SourceGeneratorLocalData localData, List items, Traits ts, Trait[] traits, Map initScopes, Reference class_index, boolean isScriptTraits) throws AVM2ParseException, CompilationException { + + //Note: Names must be generated first before accesed in inner subs + for (int k = 0; k < items.size(); k++) { + GraphTargetItem item = items.get(k); + if (traits[k] == null) { + continue; + } + + if ((item instanceof SlotAVM2Item) || (item instanceof ConstAVM2Item)) { + TraitSlotConst tsc = (TraitSlotConst) traits[k]; + GraphTargetItem val = null; + GraphTargetItem type = null; + boolean isNamespace = false; + int namespace = 0; + boolean isStatic = false; + int[] metadata = new int[0]; + if (item instanceof SlotAVM2Item) { + SlotAVM2Item sai = (SlotAVM2Item) item; + if (!isScriptTraits && sai.isStatic() != generateStatic) { + continue; + } + val = sai.value; + type = sai.type; + isStatic = sai.isStatic(); + if (sai.pkg != null) { + sai.pkg.resolveCustomNs(abcIndex, importedClasses, localData.pkg, openedNamespaces, localData); + } + namespace = sai.pkg == null ? 0 : sai.pkg.getCpoolIndex(abcIndex); + } + boolean generatedNs = false; + if (item instanceof ConstAVM2Item) { + ConstAVM2Item cai = (ConstAVM2Item) item; + generatedNs = cai.generatedNs; + if (!isScriptTraits && cai.isStatic() != generateStatic) { + continue; + } + val = cai.value; + type = cai.type; + if (cai.pkg != null) { + cai.pkg.resolveCustomNs(abcIndex, importedClasses, localData.pkg, openedNamespaces, localData); + } + namespace = cai.pkg == null ? 0 : cai.pkg.getCpoolIndex(abcIndex); + isNamespace = type.toString().equals("Namespace"); + isStatic = cai.isStatic(); + } + tsc.type_index = isNamespace ? 0 : (type == null ? 0 : typeName(localData, type)); + + ValueKind vk = getValueKind(namespace, type, val, generatedNs); + if (vk == null) { + tsc.value_index = ValueKind.CONSTANT_Undefined; + tsc.value_kind = ValueKind.CONSTANT_Undefined; + } else { + tsc.value_kind = vk.value_kind; + tsc.value_index = vk.value_index; + } + } + + if (item instanceof InterfaceAVM2Item) { + ABC abc = abcIndex.getSelectedAbc(); + TraitClass trait = (TraitClass) traits[k]; + InterfaceAVM2Item iitem = (InterfaceAVM2Item) item; + generateClass(iitem.pkg.getCpoolIndex(abcIndex), abc.class_info.get(trait.class_info), abc.instance_info.get(trait.class_info), initScopes.get(trait), iitem.pkg.name, localData, iitem, class_index); + } + + if (item instanceof ClassAVM2Item) { + ABC abc = abcIndex.getSelectedAbc(); + TraitClass trait = (TraitClass) traits[k]; + ClassAVM2Item citem = (ClassAVM2Item) item; + generateClass(citem.pkg.getCpoolIndex(abcIndex), abc.class_info.get(trait.class_info), abc.instance_info.get(trait.class_info), initScopes.get(trait), citem.pkg.name, localData, citem, class_index); + } + if ((item instanceof MethodAVM2Item) || (item instanceof GetterAVM2Item) || (item instanceof SetterAVM2Item)) { + MethodAVM2Item mai = (MethodAVM2Item) item; + if (!isScriptTraits && mai.isStatic() != generateStatic) { + continue; + } + for (List ln : mai.allOpenedNamespaces) { + for (NamespaceItem n : ln) { + n.resolveCustomNs(abcIndex, importedClasses, localData.pkg, ln, localData); + } + } + String suffix = null; + if (item instanceof GetterAVM2Item) { + suffix = "get"; + } + if (item instanceof SetterAVM2Item) { + suffix = "set"; + } + + ((TraitMethodGetterSetter) traits[k]).method_info = method(mai.isStatic(), methodName(mai.outsidePackage, localData.pkg, mai.functionName, mai.pkg, className, mai.customNamespace, suffix), false, isInterface, new ArrayList<>(), localData.pkg, mai.needsActivation, mai.subvariables, methodInitScope + (mai.isStatic() ? 0 : 1), mai.hasRest, mai.line, className, superName, false, localData, mai.paramTypes, mai.paramNames, mai.paramValues, mai.body, mai.retType); + } else if (item instanceof FunctionAVM2Item) { + FunctionAVM2Item fai = (FunctionAVM2Item) item; + ((TraitFunction) traits[k]).method_info = method(false, methodName(false/*?*/, localData.pkg, fai.functionName, fai.pkg, null, null, ""), false, isInterface, new ArrayList<>(), localData.pkg, fai.needsActivation, fai.subvariables, methodInitScope, fai.hasRest, fai.line, className, superName, false, localData, fai.paramTypes, fai.paramNames, fai.paramValues, fai.body, fai.retType); + } + } + } + + private int methodName(boolean outsidePkg, DottedChain pkg, String methodName, NamespaceItem ns, String className, String customNs, String typeSuffix) { + StringBuilder sb = new StringBuilder(); + /*if (ns != null) { + sb.append(ns.name.toRawString()); + }*/ + if (className != null) { + if (pkg != null && !pkg.isEmpty() && !pkg.isTopLevel()) { + sb.append(pkg.toRawString()); + sb.append(":"); + } + sb.append(className); + } + if (customNs != null) { + sb.append(customNs); + } else if (ns != null) { + switch (ns.kind) { + case Namespace.KIND_PACKAGE_INTERNAL: + sb.append(pkg == null ? "" /*?*/ : pkg.toRawString()); + break; + case Namespace.KIND_PRIVATE: + + if (!outsidePkg) { + sb.append("/private"); + } + break; + case Namespace.KIND_PROTECTED: + case Namespace.KIND_STATIC_PROTECTED: + sb.append("/protected"); + break; + } + } + sb.append("/"); + sb.append(methodName); + if (typeSuffix != null && !typeSuffix.isEmpty()) { + sb.append("/"); + sb.append(typeSuffix); + } + return abcIndex.getSelectedAbc().constants.getStringId(sb.toString(), true); + } + + public Trait[] generateTraitsPhase1(List importedClasses, List openedNamespaces, String className, String superName, boolean generateStatic, SourceGeneratorLocalData localData, List items, Traits ts, Reference classIndex, boolean isScriptTraits) throws AVM2ParseException, CompilationException { + Trait[] traits = new Trait[items.size()]; + int slot_id = 1; + int disp_id = 3; //1 and 2 are for constructor + for (int k = 0; k < items.size(); k++) { + GraphTargetItem item = items.get(k); + if (item instanceof InterfaceAVM2Item) { + TraitClass tc = new TraitClass(); + ClassInfo ci = new ClassInfo(); + InstanceInfo ii = new InstanceInfo(); + /*abc.class_info.add(ci); + abc.instance_info.add(ii);*/ + tc.class_info = classIndex.getVal(); + abcIndex.getSelectedAbc().addClass(ci, ii, classIndex.getVal()); + classIndex.setVal(classIndex.getVal() + 1); + ii.flags |= InstanceInfo.CLASS_INTERFACE; + //ii.name_index = traitName(((InterfaceAVM2Item) item).namespace, ((InterfaceAVM2Item) item).name); + //tc.class_info = abc.instance_info.size() - 1; + tc.kindType = Trait.TRAIT_CLASS; + //tc.name_index = traitName(((InterfaceAVM2Item) item).namespace, ((InterfaceAVM2Item) item).name); + tc.slot_id = 0; //? + ts.traits.add(tc); + traits[k] = tc; + traits[k].metadata = generateMetadata(((InterfaceAVM2Item) item).metadata, abcIndex.getSelectedAbc()); + if (traits[k].metadata.length > 0) { + traits[k].kindFlags |= Trait.ATTR_Metadata; + } + } + + if (item instanceof ClassAVM2Item) { + TraitClass tc = new TraitClass(); + ClassInfo ci = new ClassInfo(); + InstanceInfo ii = new InstanceInfo(); + //ii.name_index = traitName(((ClassAVM2Item) item).namespace, ((ClassAVM2Item) item).className); + /*abc.class_info.add(ci); + abc.instance_info.add(instanceInfo);*/ + tc.class_info = classIndex.getVal(); + abcIndex.getSelectedAbc().addClass(ci, ii, classIndex.getVal()); + classIndex.setVal(classIndex.getVal() + 1); + tc.kindType = Trait.TRAIT_CLASS; + // tc.name_index = traitName(((ClassAVM2Item) item).namespace, ((ClassAVM2Item) item).className); + tc.slot_id = slot_id++; + ts.traits.add(tc); + traits[k] = tc; + traits[k].metadata = generateMetadata(((ClassAVM2Item) item).metadata, abcIndex.getSelectedAbc()); + if (traits[k].metadata.length > 0) { + traits[k].kindFlags |= Trait.ATTR_Metadata; + } + } + if ((item instanceof SlotAVM2Item) || (item instanceof ConstAVM2Item)) { + TraitSlotConst tsc = new TraitSlotConst(); + tsc.kindType = (item instanceof SlotAVM2Item) ? Trait.TRAIT_SLOT : Trait.TRAIT_CONST; + String var = null; + //GraphTargetItem val = null; + GraphTargetItem type = null; + boolean isNamespace = false; + int namespace = 0; + boolean isStatic = false; + int[] metadata = new int[0]; + if (item instanceof SlotAVM2Item) { + SlotAVM2Item sai = (SlotAVM2Item) item; + if (!isScriptTraits && sai.isStatic() != generateStatic) { + continue; + } + var = sai.var; + //val = sai.value; + type = sai.type; + isStatic = sai.isStatic(); + if (sai.pkg != null) { + sai.pkg.resolveCustomNs(abcIndex, importedClasses, localData.pkg, openedNamespaces, localData); + } + namespace = sai.pkg == null ? 0 : sai.pkg.getCpoolIndex(abcIndex); + metadata = generateMetadata(((SlotAVM2Item) item).metadata, abcIndex.getSelectedAbc()); + } + boolean generatedNs = false; + if (item instanceof ConstAVM2Item) { + ConstAVM2Item cai = (ConstAVM2Item) item; + generatedNs = cai.generatedNs; + if (!isScriptTraits && cai.isStatic() != generateStatic) { + continue; + } + var = cai.var; + //val = cai.value; + type = cai.type; + if (cai.pkg != null) { + cai.pkg.resolveCustomNs(abcIndex, importedClasses, localData.pkg, openedNamespaces, localData); + } + namespace = cai.pkg == null ? 0 : cai.pkg.getCpoolIndex(abcIndex); + isNamespace = type.toString().equals("Namespace"); + isStatic = cai.isStatic(); + metadata = generateMetadata(((ConstAVM2Item) item).metadata, abcIndex.getSelectedAbc()); + } + if (isNamespace) { + tsc.name_index = traitName(namespace, var); + } + //tsc.type_index = isNamespace ? 0 : (type == null ? 0 : typeName(localData, type)); + + /*ValueKind vk = getValueKind(namespace, type, val, generatedNs); + if (vk == null) { + tsc.value_index = ValueKind.CONSTANT_Undefined; + tsc.value_kind = ValueKind.CONSTANT_Undefined; + } else { + tsc.value_kind = vk.value_kind; + tsc.value_index = vk.value_index; + }*/ + tsc.slot_id = !isScriptTraits && isStatic ? slot_id++ : 0; + ts.traits.add(tsc); + traits[k] = tsc; + traits[k].metadata = metadata; + if (traits[k].metadata.length > 0) { + traits[k].kindFlags |= Trait.ATTR_Metadata; + } + } + if ((item instanceof MethodAVM2Item) || (item instanceof GetterAVM2Item) || (item instanceof SetterAVM2Item)) { + MethodAVM2Item mai = (MethodAVM2Item) item; + if (!isScriptTraits && mai.isStatic() != generateStatic) { + continue; + } + TraitMethodGetterSetter tmgs = new TraitMethodGetterSetter(); + tmgs.kindType = (item instanceof GetterAVM2Item) ? Trait.TRAIT_GETTER : ((item instanceof SetterAVM2Item) ? Trait.TRAIT_SETTER : Trait.TRAIT_METHOD); + tmgs.disp_id = mai.isStatic() ? disp_id++ : 0; //For a reason, there is disp_id only for static methods (or not?) + if (mai.isFinal() || (className != null && mai.isStatic())) { + tmgs.kindFlags |= Trait.ATTR_Final; + } + if (mai.isOverride()) { + tmgs.kindFlags |= Trait.ATTR_Override; + } + ts.traits.add(tmgs); + + traits[k] = tmgs; + traits[k].metadata = generateMetadata(((MethodAVM2Item) item).metadata, abcIndex.getSelectedAbc()); + if (traits[k].metadata.length > 0) { + traits[k].kindFlags |= Trait.ATTR_Metadata; + } + } + /*else if (item instanceof FunctionAVM2Item) { + TraitFunction tf = new TraitFunction(); + tf.slot_id = slot_id++; + tf.kindType = Trait.TRAIT_FUNCTION; + //tf.name_index = traitName(((FunctionAVM2Item) item).namespace, ((FunctionAVM2Item) item).functionName); + ts.traits.add(tf); + traits[k] = tf; + traits[k].metadata = generateMetadata(((FunctionAVM2Item) item).metadata); + }*/ + + } + + return traits; + } + + public void generateScriptInfo(int scriptIndex, ScriptInfo scriptInfo, List> allOpenedNamespaces, SourceGeneratorLocalData localData, List commands, int classPos) throws AVM2ParseException, CompilationException { + Reference class_index = new Reference<>(classPos); + localData.currentScript = scriptInfo; + localData.scriptIndex = scriptIndex; + Trait[] traitArr = generateTraitsPhase1(new ArrayList<>(), new ArrayList<>(), null, null, true, localData, commands, scriptInfo.traits, class_index, true); + generateTraitsPhase2(new ArrayList<>(), null/*FIXME*/, commands, traitArr, new ArrayList<>(), localData); + abcIndex.refreshSelected(); + generateTraitsPhase3(commands, traitArr, localData); + abcIndex.refreshSelected(); + + ABC abc = abcIndex.getSelectedAbc(); + AVM2ConstantPool constants = abc.constants; + MethodInfo mi = new MethodInfo(new int[0], 0, constants.getStringId("", true), 0, new ValueKind[0], new int[0]); + MethodBody mb = new MethodBody(abc, new Traits(), new byte[0], new ABCException[0]); + mb.method_info = abc.addMethodInfo(mi); + mb.setCode(new AVM2Code()); + List mbCode = mb.getCode().code; + mbCode.add(ins(AVM2Instructions.GetLocal0)); + mbCode.add(ins(AVM2Instructions.PushScope)); + + int traitScope = 1; + + Map initScopes = new HashMap<>(); + + for (Trait t : scriptInfo.traits.traits) { + if (t instanceof TraitClass) { + TraitClass tc = (TraitClass) t; + DottedChain className = tc.getName(abc).getNameWithNamespace(abc.constants, true); + + List parents = new ArrayList<>(); + int[] nsset = new int[]{constants.getMultiname(tc.name_index).namespace_index}; + mbCode.add(ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createMultiname(false, constants.getMultiname(tc.name_index).name_index, constants.getNamespaceSetId(nsset, true)), true))); + traitScope++; + if (abc.instance_info.get(tc.class_info).isInterface()) { + mbCode.add(ins(AVM2Instructions.PushNull)); + } else { + + AbcIndexing.ClassIndex ci = abcIndex.findClass(AbcIndexing.multinameToType(abc.instance_info.get(tc.class_info).name_index, constants), null, null/*FIXME?*/); + while (ci != null && ci.parent != null) { + ci = ci.parent; + Multiname origM = ci.abc.constants.getMultiname(ci.abc.instance_info.get(ci.index).name_index); + Namespace origNs = ci.abc.constants.getNamespace(origM.namespace_index); + if (origM.kind == Multiname.QNAME || origM.kind == Multiname.QNAMEA) { + parents.add(constants.getMultinameId( + Multiname.createQName(origM.kind == Multiname.QNAMEA, + constants.getStringId(ci.abc.constants.getString(origM.name_index), true), + constants.getNamespaceId(origNs.kind, + ci.abc.constants.getString(origNs.name_index), 0, true)), true)); + } + } + + //add all parent objects to scopestack + for (int i = parents.size() - 1; i >= 0; i--) { + mbCode.add(ins(AVM2Instructions.GetLex, parents.get(i))); + mbCode.add(ins(AVM2Instructions.PushScope)); + traitScope++; + } + //direct parent class to new_class instruction + if (!parents.isEmpty()) { //NON EXISTING PARENT CLASS - TODO: handle as error! + mbCode.add(ins(AVM2Instructions.GetLex, parents.get(0))); + } + } + mbCode.add(ins(AVM2Instructions.NewClass, tc.class_info)); + for (int i = 0; i < parents.size(); i++) { + mbCode.add(ins(AVM2Instructions.PopScope)); + } + + mbCode.add(ins(AVM2Instructions.InitProperty, tc.name_index)); + initScopes.put(t, traitScope); + traitScope = 1; + } + } + + abc.addMethodBody(mb); + scriptInfo.init_index = mb.method_info; + localData.pkg = DottedChain.EMPTY; + generateTraitsPhase4(new ArrayList<>(), new ArrayList<>(), 1/*??*/, false, null, null, true, localData, commands, scriptInfo.traits, traitArr, initScopes, class_index, true); + + int maxSlotId = 0; + for (int k = 0; k < scriptInfo.traits.traits.size(); k++) { + if (scriptInfo.traits.traits.get(k) instanceof TraitSlotConst) { + TraitSlotConst ti = (TraitSlotConst) scriptInfo.traits.traits.get(k); + if (ti.slot_id > maxSlotId) { + maxSlotId = ti.slot_id; + } + } + } + for (int k = 0; k < scriptInfo.traits.traits.size(); k++) { + if ((scriptInfo.traits.traits.get(k) instanceof TraitMethodGetterSetter) && (commands.get(k) instanceof MethodAVM2Item)) { + MethodAVM2Item mai = (MethodAVM2Item) commands.get(k); + if (mai.outsidePackage) { + TraitMethodGetterSetter tmgs = (TraitMethodGetterSetter) scriptInfo.traits.traits.get(k); + TraitSlotConst nts = new TraitSlotConst(); + nts.name_index = scriptInfo.traits.traits.get(k).name_index; + nts.metadata = scriptInfo.traits.traits.get(k).metadata; + + nts.slot_id = maxSlotId + 1; + maxSlotId++; + nts.type_index = abcIndex.getSelectedAbc().constants.getQnameId("Function", Namespace.KIND_PACKAGE, "", true); + nts.value_index = 0; + nts.value_kind = 0; + int methodinfo = tmgs.method_info; + scriptInfo.traits.traits.set(k, nts); + mbCode.add(ins(AVM2Instructions.NewFunction, methodinfo)); + mbCode.add(ins(AVM2Instructions.InitProperty, nts.name_index)); + } + } + } + + mbCode.add(ins(AVM2Instructions.ReturnVoid)); + mb.autoFillStats(abc, 1, false); + + } + + public static void parentNamesAddNames(AbcIndexing abc, int name_index, List indices, List names, List namespaces) { + List cindices = new ArrayList<>(); + + List outABCs = new ArrayList<>(); + parentNames(abc, name_index, cindices, names, namespaces, outABCs); + for (int i = 0; i < cindices.size(); i++) { + ABC a = outABCs.get(i); + int m = cindices.get(i); + if (a == abc.getSelectedAbc()) { + indices.add(m); + continue; + } + Multiname superName = a.constants.getMultiname(m); + indices.add( + abc.getSelectedAbc().constants.getMultinameId( + Multiname.createQName(false, + abc.getSelectedAbc().constants.getStringId(superName.getName(a.constants, null, true, true /*FIXME!!! ???*/), true), + abc.getSelectedAbc().constants.getNamespaceId(superName.getNamespace(a.constants).kind, superName.getNamespace(a.constants).getName(a.constants), 0, true)), true) + ); + } + } + + public static GraphTargetItem getTraitReturnType(AbcIndexing abc, Trait t) { + if (t instanceof TraitSlotConst) { + TraitSlotConst tsc = (TraitSlotConst) t; + if (tsc.type_index == 0) { + return TypeItem.UNBOUNDED; + } + return AbcIndexing.multinameToType(tsc.type_index, abc.getSelectedAbc().constants); + } + if (t instanceof TraitMethodGetterSetter) { + TraitMethodGetterSetter tmgs = (TraitMethodGetterSetter) t; + if (tmgs.kindType == Trait.TRAIT_GETTER) { + return AbcIndexing.multinameToType(abc.getSelectedAbc().method_info.get(tmgs.method_info).ret_type, abc.getSelectedAbc().constants); + } + if (tmgs.kindType == Trait.TRAIT_SETTER) { + if (abc.getSelectedAbc().method_info.get(tmgs.method_info).param_types.length > 0) { + return AbcIndexing.multinameToType(abc.getSelectedAbc().method_info.get(tmgs.method_info).param_types[0], abc.getSelectedAbc().constants); + } else { + return TypeItem.UNBOUNDED; + } + } + } + if (t instanceof TraitFunction) { + return new TypeItem(DottedChain.FUNCTION); + } + return TypeItem.UNBOUNDED; + } + + public static boolean searchPrototypeChain(Integer namespaceSuffix, List otherNs, int privateNs, int protectedNs, boolean instanceOnly, AbcIndexing abc, DottedChain pkg, String obj, String propertyName, Reference outName, Reference outNs, Reference outPropNs, Reference outPropNsKind, Reference outPropNsIndex, Reference outPropType, Reference outPropValue, Reference outPropValueAbc, Reference isType) { + // private and protected namespaces first so we find overriding functions before overridden functions + if (namespaceSuffix != null) { + if (searchPrototypeChain(namespaceSuffix, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { + return true; + } + } + if (searchPrototypeChain(privateNs, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { + return true; + } + if (searchPrototypeChain(protectedNs, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { + return true; + } + + for (int ns : otherNs) { + if (searchPrototypeChain(ns, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { + return true; + } + } + + return searchPrototypeChain(0, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType); + } + + private static boolean searchPrototypeChain(int selectedNs, boolean instanceOnly, AbcIndexing abc, DottedChain pkg, String obj, String propertyName, Reference outName, Reference outNs, Reference outPropNs, Reference outPropNsKind, Reference outPropNsIndex, Reference outPropType, Reference outPropValue, Reference outPropValueAbc, Reference isType) { + isType.setVal(false); + AbcIndexing.TraitIndex sp = abc.findScriptProperty(pkg.addWithSuffix(propertyName)); + if (sp == null) { + sp = abc.findProperty(new AbcIndexing.PropertyDef(propertyName, new TypeItem(pkg.addWithSuffix(obj)), abc.getSelectedAbc(), selectedNs), !instanceOnly, true, true); + } + if (sp != null) { + if (sp.trait instanceof TraitClass) { + isType.setVal(true); + } + if (sp.objType instanceof TypeItem) { + outName.setVal(((TypeItem) sp.objType).fullTypeName.getLast()); + outNs.setVal(((TypeItem) sp.objType).fullTypeName.getWithoutLast()); + } else { + //FIXME? Vector? + } + outPropNs.setVal(sp.trait.getName(sp.abc).getNamespace(sp.abc.constants).getName(sp.abc.constants)); + outPropNsKind.setVal(sp.trait.getName(sp.abc).getNamespace(sp.abc.constants).kind); + int nsi = sp.trait.getName(sp.abc).namespace_index; + outPropNsIndex.setVal(sp.abc == abc.getSelectedAbc() ? sp.abc.constants.getNamespaceSubIndex(nsi) : 0); + outPropType.setVal(sp.returnType); + outPropValue.setVal(sp.value); + outPropValueAbc.setVal(sp.abc); + return true; + } + return false; + } + + public static void parentNames(AbcIndexing abc, int name_index, List indices, List names, List namespaces, List outABCs) { + AbcIndexing.ClassIndex ci = abc.findClass(new TypeItem(abc.getSelectedAbc().constants.getMultiname(name_index).getNameWithNamespace(abc.getSelectedAbc().constants, true /*FIXME!!*/)), null, null/*FIXME?*/); + while (ci != null) { + int ni = ci.abc.instance_info.get(ci.index).name_index; + indices.add(ni); + outABCs.add(ci.abc); + names.add(ci.abc.constants.getMultiname(ni).getName(ci.abc.constants, null, true, true/*FIXME!!*/)); + namespaces.add(ci.abc.constants.getMultiname(ni).getNamespace(ci.abc.constants).getName(ci.abc.constants).toRawString()); + ci = ci.parent; + } + } + + @Override + public List generate(SourceGeneratorLocalData localData, FalseItem item) throws CompilationException { + return GraphTargetItem.toSourceMerge(localData, this, ins(AVM2Instructions.PushFalse)); + } + + @Override + public List generate(SourceGeneratorLocalData localData, TrueItem item) throws CompilationException { + return GraphTargetItem.toSourceMerge(localData, this, ins(AVM2Instructions.PushTrue)); + } + + public List generate(SourceGeneratorLocalData localData, GetDescendantsAVM2Item item) throws CompilationException { + + AVM2ConstantPool constants = abcIndex.getSelectedAbc().constants; + int[] nssa = new int[item.openedNamespaces.size()]; + for (int i = 0; i < item.openedNamespaces.size(); i++) { + nssa[i] = item.openedNamespaces.get(i).getCpoolIndex(abcIndex); + } + + int nsset = constants.getNamespaceSetId(nssa, true); + + return GraphTargetItem.toSourceMerge(localData, this, + item.object, + ins(AVM2Instructions.GetDescendants, constants.getMultinameId(Multiname.createMultiname(false, constants.getStringId(item.nameStr, true), nsset), true)) + ); + } + + @Override + public List generate(SourceGeneratorLocalData localData, AndItem item) throws CompilationException { + List ret = new ArrayList<>(); + ret.addAll(generateToActionList(localData, item.leftSide)); + ret.add(ins(AVM2Instructions.Dup)); + if (!("" + item.leftSide.returnType()).equals("Boolean")) { + ret.add(ins(AVM2Instructions.ConvertB)); + } + List andExpr = generateToActionList(localData, item.rightSide); + andExpr.add(0, ins(AVM2Instructions.Pop)); + int andExprLen = insToBytes(andExpr).length; + ret.add(ins(AVM2Instructions.IfFalse, andExprLen)); + ret.addAll(andExpr); + return ret; + + } + + @Override + public List generate(SourceGeneratorLocalData localData, OrItem item) throws CompilationException { + List ret = new ArrayList<>(); + ret.addAll(generateToActionList(localData, item.leftSide)); + ret.add(ins(AVM2Instructions.Dup)); + if (!("" + item.leftSide.returnType()).equals("Boolean")) { + ret.add(ins(AVM2Instructions.ConvertB)); + } + List orExpr = generateToActionList(localData, item.rightSide); + orExpr.add(0, ins(AVM2Instructions.Pop)); + int orExprLen = insToBytes(orExpr).length; + ret.add(ins(AVM2Instructions.IfTrue, orExprLen)); + ret.addAll(orExpr); + return ret; + } + + public List generate(SourceGeneratorLocalData localData, XMLFilterAVM2Item item) throws CompilationException { + List ret = new ArrayList<>(); + final Reference counterReg = new Reference<>(0); + final Reference collectionReg = new Reference<>(0); + final Reference xmlListReg = new Reference<>(0); + List xmlListSetTemp = AssignableAVM2Item.setTemp(localData, this, xmlListReg); + AVM2ConstantPool constants = abcIndex.getSelectedAbc().constants; + ret.addAll(GraphTargetItem.toSourceMerge(localData, this, + ins(AVM2Instructions.PushByte, 0), + AssignableAVM2Item.setTemp(localData, this, counterReg), + item.object, + ins(AVM2Instructions.CheckFilter), + NameAVM2Item.generateCoerce(localData, this, TypeItem.UNBOUNDED), + AssignableAVM2Item.setTemp(localData, this, collectionReg), + ins(AVM2Instructions.GetLex, constants.getMultinameId(Multiname.createQName(false, constants.getStringId("XMLList", true), constants.getNamespaceId(Namespace.KIND_PACKAGE, "", 0, true)), true)), + ins(AVM2Instructions.PushString, constants.getStringId("", true)), + ins(AVM2Instructions.Construct, 1), + xmlListSetTemp + )); + final Reference tempVal1 = new Reference<>(0); + final Reference tempVal2 = new Reference<>(0); + + List forBody = toInsList(GraphTargetItem.toSourceMerge(localData, this, + ins(AVM2Instructions.Label), + AssignableAVM2Item.getTemp(localData, this, collectionReg), + AssignableAVM2Item.getTemp(localData, this, counterReg), + ins(AVM2Instructions.NextValue), + AssignableAVM2Item.dupSetTemp(localData, this, tempVal1), + AssignableAVM2Item.dupSetTemp(localData, this, tempVal2), + ins(AVM2Instructions.PushWith) + )); + localData.scopeStack.add(new LocalRegAVM2Item(null, null, tempVal2.getVal(), null, new TypeItem("Object") /*?*/)); + forBody.addAll(toInsList(item.value.toSource(localData, this))); + List trueBody = new ArrayList<>(); + trueBody.addAll(toInsList(AssignableAVM2Item.getTemp(localData, this, xmlListReg))); + trueBody.addAll(toInsList(AssignableAVM2Item.getTemp(localData, this, counterReg))); + trueBody.addAll(toInsList(AssignableAVM2Item.getTemp(localData, this, tempVal1))); + trueBody.add(ins(AVM2Instructions.SetProperty, constants.getMultinameId(Multiname.createMultinameL(false, NamespaceItem.getCpoolSetIndex(abcIndex, item.openedNamespaces)), true))); + forBody.add(ins(AVM2Instructions.IfFalse, insToBytes(trueBody).length)); + forBody.addAll(trueBody); + forBody.add(ins(AVM2Instructions.PopScope)); + localData.scopeStack.remove(localData.scopeStack.size() - 1); + forBody.addAll(toInsList(AssignableAVM2Item.killTemp(localData, this, Arrays.asList(tempVal2, tempVal1)))); + + int forBodyLen = insToBytes(forBody).length; + AVM2Instruction forwardJump = ins(AVM2Instructions.Jump, forBodyLen); + ret.add(forwardJump); + + List expr = new ArrayList<>(); + expr.add(ins(AVM2Instructions.HasNext2, collectionReg.getVal(), counterReg.getVal())); + AVM2Instruction backIf = ins(AVM2Instructions.IfTrue, 0); + expr.add(backIf); + + int exprLen = insToBytes(expr).length; + backIf.operands[0] = -(exprLen + forBodyLen); + + ret.addAll(forBody); + ret.addAll(expr); + ret.addAll(AssignableAVM2Item.killTemp(localData, this, Arrays.asList(collectionReg, counterReg))); + ret.addAll(AssignableAVM2Item.getTemp(localData, this, xmlListReg)); + ret.addAll(AssignableAVM2Item.killTemp(localData, this, Arrays.asList(xmlListReg))); + return ret; + } + + @Override + public List generate(SourceGeneratorLocalData localData, IfItem item) throws CompilationException { + return generateIf(localData, item.expression, item.onTrue, item.onFalse, false); + } + + @Override + public List generate(SourceGeneratorLocalData localData, TernarOpItem item) throws CompilationException { + List onTrue = new ArrayList<>(); + onTrue.add(item.onTrue); + List onFalse = new ArrayList<>(); + onFalse.add(item.onFalse); + return generateIf(localData, item.expression, onTrue, onFalse, true); + } + + @Override + public List generate(SourceGeneratorLocalData localData, WhileItem item) throws CompilationException { + localData.openedLoops.add(item.loop.id); + List ret = new ArrayList<>(); + List whileExpr = new ArrayList<>(); + + List ex = new ArrayList<>(item.expression); + GraphTargetItem lastItem = null; + if (!ex.isEmpty()) { + lastItem = ex.remove(ex.size() - 1); + while (lastItem instanceof CommaExpressionItem) { + CommaExpressionItem cei = (CommaExpressionItem) lastItem; + ex.addAll(cei.commands); + lastItem = ex.remove(ex.size() - 1); + } + whileExpr.addAll(generateToInsList(localData, ex)); + } + List whileBody = generateToInsList(localData, item.commands); + AVM2Instruction forwardJump = ins(AVM2Instructions.Jump, 0); + ret.add(forwardJump); + whileBody.add(0, ins(AVM2Instructions.Label)); + ret.addAll(whileBody); + int whileBodyLen = insToBytes(whileBody).length; + forwardJump.operands[0] = whileBodyLen; + whileExpr.addAll(toInsList(condition(localData, lastItem, 0))); + int whileExprLen = insToBytes(whileExpr).length; + whileExpr.get(whileExpr.size() - 1).operands[0] = -(whileExprLen + whileBodyLen); //Assuming last is if instruction + ret.addAll(whileExpr); + fixLoop(whileBody, whileBodyLen + whileExprLen, whileBodyLen, item.loop.id); + return ret; + } + + public List generate(SourceGeneratorLocalData localData, ForEachInAVM2Item item) throws CompilationException { + return generateForIn(localData, item.loop, item.expression.collection, (AssignableAVM2Item) item.expression.object, item.commands, true); + } + + public List generate(SourceGeneratorLocalData localData, ForInAVM2Item item) throws CompilationException { + return generateForIn(localData, item.loop, item.expression.collection, (AssignableAVM2Item) item.expression.object, item.commands, false); + } + @Override public List generate(SourceGeneratorLocalData localData, DoWhileItem item) throws CompilationException { localData.openedLoops.add(item.loop.id); @@ -599,13 +2287,6 @@ public class AVM2SourceGenerator implements SourceGenerator { return ret; } - private long uniqLast = 0; - - public String uniqId() { - uniqLast++; - return "" + uniqLast; - } - @Override public List generate(SourceGeneratorLocalData localData, SwitchItem item) throws CompilationException { localData.openedLoops.add(item.loop.id); @@ -668,7 +2349,7 @@ public class AVM2SourceGenerator implements SourceGenerator { bodiesOffsets.add(0, -(insToBytes(bodies).length + casesLen)); } lookupOp.operands[0] = defOffset; - lookupOp.operands[1] = item.valuesMapping.size(); + lookupOp.operands[1] = item.valuesMapping.size(); // as per avm2 spec: "There are case_count+1 case offsets" for (int i = 0; i < item.valuesMapping.size(); i++) { lookupOp.operands[2 + i] = bodiesOffsets.get(item.valuesMapping.get(i)); @@ -763,12 +2444,6 @@ public class AVM2SourceGenerator implements SourceGenerator { return ret; } - private static int currentFinId = 1; - - private static int finId() { - return currentFinId++; - } - public List generate(SourceGeneratorLocalData localData, TryAVM2Item item) throws CompilationException { List ret = new ArrayList<>(); @@ -1190,14 +2865,6 @@ public class AVM2SourceGenerator implements SourceGenerator { return ret; } - private List generateToInsList(SourceGeneratorLocalData localData, List commands) throws CompilationException { - return toInsList(generate(localData, commands)); - } - - private List generateToActionList(SourceGeneratorLocalData localData, GraphTargetItem command) throws CompilationException { - return toInsList(command.toSource(localData, this)); - } - @Override public List generate(SourceGeneratorLocalData localData, List commands) throws CompilationException { List ret = new ArrayList<>(); @@ -1207,263 +2874,6 @@ public class AVM2SourceGenerator implements SourceGenerator { return ret; } - public HashMap getRegisterVars(SourceGeneratorLocalData localData) { - return localData.registerVars; - } - - public void setRegisterVars(SourceGeneratorLocalData localData, HashMap value) { - localData.registerVars = value; - } - - public void setInFunction(SourceGeneratorLocalData localData, int value) { - localData.inFunction = value; - } - - public int isInFunction(SourceGeneratorLocalData localData) { - return localData.inFunction; - } - - public boolean isInMethod(SourceGeneratorLocalData localData) { - return localData.inMethod; - } - - public void setInMethod(SourceGeneratorLocalData localData, boolean value) { - localData.inMethod = value; - } - - public int getForInLevel(SourceGeneratorLocalData localData) { - return localData.forInLevel; - } - - public void setForInLevel(SourceGeneratorLocalData localData, int value) { - localData.forInLevel = value; - } - - public int getTempRegister(SourceGeneratorLocalData localData) { - HashMap registerVars = getRegisterVars(localData); - int tmpReg = 0; - for (int i = 0; i < 256; i++) { - if (!registerVars.containsValue(i)) { - tmpReg = i; - break; - } - } - return tmpReg; - } - - public AVM2SourceGenerator(AbcIndexing abc) { - this.abcIndex = abc; - } - - /*public ABC getABC() { - return abc; - }*/ - public void generateClass(List importedClasses, List cinitVariables, boolean cinitNeedsActivation, List cinit, List openedNamespaces, int namespace, int initScope, DottedChain pkg, ClassInfo classInfo, InstanceInfo instanceInfo, SourceGeneratorLocalData localData, boolean isInterface, String name, String superName, GraphTargetItem extendsVal, List implementsStr, GraphTargetItem iinit, List iinitVariables, boolean iinitNeedsActivation, List traitItems, Reference class_index) throws AVM2ParseException, CompilationException { - localData.currentClass = name; - localData.pkg = pkg; - localData.privateNs = abcIndex.getSelectedAbc().constants.getNamespaceId(Namespace.KIND_PRIVATE, pkg.toRawString().isEmpty() ? name : pkg.toRawString() + ":" + name, 0, true); - localData.protectedNs = abcIndex.getSelectedAbc().constants.getNamespaceId(Namespace.KIND_PROTECTED, pkg.toRawString().isEmpty() ? name : pkg.toRawString() + ":" + name, 0, true); - if (extendsVal == null && !isInterface) { - extendsVal = new TypeItem(DottedChain.OBJECT); - } - ParsedSymbol s = null; - - if (Configuration.handleSkinPartsAutomatically.get()) { - - Map skinParts = new HashMap<>(); - for (GraphTargetItem t : traitItems) { - String tname = null; - List>> tmetadata = null; - if (t instanceof MethodAVM2Item) { - tname = ((MethodAVM2Item) t).functionName; - tmetadata = ((MethodAVM2Item) t).metadata; - } else if (t instanceof SlotAVM2Item) { - tname = ((SlotAVM2Item) t).var; - tmetadata = ((SlotAVM2Item) t).metadata; - } else if (t instanceof ConstAVM2Item) { - tname = ((ConstAVM2Item) t).var; - tmetadata = ((ConstAVM2Item) t).metadata; - } - if (tname != null && tmetadata != null) { - for (Map.Entry> en : tmetadata) { - if ("SkinPart".equals(en.getKey())) { - boolean req = false; - if (en.getValue().containsKey("required")) { - if ("true".equals(en.getValue().get("required"))) { - req = true; - } - } - skinParts.put(tname, req); - } - } - } - } - if (!skinParts.isEmpty()) { - - //Merge parts from _skinParts attribute of parent class - GraphTargetItem parent = extendsVal; - if (parent instanceof UnresolvedAVM2Item) { - parent = ((UnresolvedAVM2Item) parent).resolved; - } - if (parent instanceof TypeItem) { - ClassIndex ci = abcIndex.findClass(parent, null, null/*FIXME?*/); - if (ci != null) { - int mi = ci.abc.class_info.get(ci.index).cinit_index; - MethodBody pcinit = ci.abc.findBody(mi); - ConvertData d = new ConvertData(); - - List callStack = new ArrayList<>(); - callStack.add(pcinit); - try { - pcinit.convert(callStack, null, d, "-", ScriptExportMode.AS, true, mi, -1, ci.index, ci.abc, null, new ScopeStack(), GraphTextWriter.TRAIT_CLASS_INITIALIZER, new NulWriter(), new ArrayList<>(), ci.abc.class_info.get(ci.index).static_traits, false, new HashSet<>()); - //FIXME! Add skinparts from _skinParts attribute of parent class!!! - } catch (InterruptedException ex) { - Logger.getLogger(AVM2SourceGenerator.class.getName()).log(Level.SEVERE, "Getting parent skinparts interrupted", ex); - } - for (Trait t : ci.abc.class_info.get(ci.index).static_traits.traits) { - if (t instanceof TraitSlotConst) { - TraitSlotConst tsc = (TraitSlotConst) t; - if (tsc.kindType == Trait.TRAIT_SLOT) { - if ("_skinParts".equals(tsc.getName(ci.abc).getName(ci.abc.constants, new ArrayList<>(), true, true))) { - if (d.assignedValues.containsKey(tsc)) { - if (d.assignedValues.get(tsc).value instanceof NewObjectAVM2Item) { - NewObjectAVM2Item no = (NewObjectAVM2Item) d.assignedValues.get(tsc).value; - for (NameValuePair nvp : no.pairs) { - skinParts.put(EcmaScript.toString(nvp.name.getResult()), EcmaScript.toBoolean(nvp.value.getResult())); - } - } - - } - } - } - } - } - - } - } - - /* - Add - override protected function get skinParts() : Object - { - return _skinParts; - } - */ - List getterBody = new ArrayList<>(); - UnresolvedAVM2Item sp = new UnresolvedAVM2Item(new ArrayList<>(), importedClasses, false, TypeItem.UNBOUNDED, 0, new DottedChain(new String[]{"_skinParts"}), - null, openedNamespaces, abcIndex); - getterBody.add(new ReturnValueAVM2Item(null, null, sp)); - List subvars = new ArrayList<>(); - subvars.add(sp); - List> allopns = new ArrayList<>(); - allopns.add(openedNamespaces); - - GetterAVM2Item getter = new GetterAVM2Item(allopns, false, false, new ArrayList<>(), new NamespaceItem(pkg.isEmpty() ? name : pkg.toRawString() + ":" + name, Namespace.KIND_PROTECTED), isInterface, null, false, false, 0, - true, false, false, "skinParts", new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), - getterBody, subvars, new TypeItem("Object")); - - /* - Add - private static var _skinParts = {attr1:false, attr2:true}; - */ - List pairs = new ArrayList<>(); - for (String tname : skinParts.keySet()) { - pairs.add(new NameValuePair(new StringAVM2Item(null, null, tname), skinParts.get(tname) ? new TrueItem(null, null) : new FalseItem(null, null))); - } - - NewObjectAVM2Item sltVal = new NewObjectAVM2Item(null, null, pairs); - - SlotAVM2Item slt = new SlotAVM2Item( - new ArrayList<>(), new NamespaceItem(pkg.isEmpty() ? name : pkg.toRawString() + ":" + name, Namespace.KIND_PRIVATE), - null, true, "_skinParts", new TypeItem("Object"), sltVal, 0); - - traitItems.add(0, slt); - traitItems.add(getter); - - } - } - - Trait[] it = generateTraitsPhase1(importedClasses, openedNamespaces, name, superName, false, localData, traitItems, instanceInfo.instance_traits, class_index, false); - Trait[] st = generateTraitsPhase1(importedClasses, openedNamespaces, name, superName, true, localData, traitItems, classInfo.static_traits, class_index, false); - generateTraitsPhase2(importedClasses, pkg, traitItems, it, openedNamespaces, localData); - generateTraitsPhase2(importedClasses, pkg, traitItems, st, openedNamespaces, localData); - abcIndex.refreshSelected(); - generateTraitsPhase4(importedClasses, openedNamespaces, initScope, isInterface, name, superName, false, localData, traitItems, instanceInfo.instance_traits, it, new HashMap<>(), class_index, false); - generateTraitsPhase4(importedClasses, openedNamespaces, initScope, isInterface, name, superName, true, localData, traitItems, classInfo.static_traits, st, new HashMap<>(), class_index, false); - int init; - if (iinit == null || isInterface) { - instanceInfo.iinit_index = init = method(false, 0, false, isInterface, new ArrayList<>(), pkg, false, new ArrayList<>(), initScope + 1, false, 0, isInterface ? null : name, extendsVal != null ? extendsVal.toString() : null, true, localData, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), TypeItem.UNBOUNDED/*?? FIXME*/); - } else { - MethodAVM2Item m = (MethodAVM2Item) iinit; - instanceInfo.iinit_index = init = method(false, pkg.toRawString().isEmpty() ? str(name + "/" + name) : str(pkg.toRawString() + ":" + name + "/" + name), false, false, new ArrayList<>(), pkg, m.needsActivation, m.subvariables, initScope + 1, m.hasRest, m.line, name, extendsVal != null ? extendsVal.toString() : null, true, localData, m.paramTypes, m.paramNames, m.paramValues, m.body, TypeItem.UNBOUNDED/*?? FIXME*/); - } - - //Class initializer - int cinit_index = method(true, str(""), false, false, new ArrayList<>(), pkg, cinitNeedsActivation, cinitVariables, initScope + (implementsStr.isEmpty() ? 0 : 1), false, 0, isInterface ? null : name, superName, false, localData, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), cinit, TypeItem.UNBOUNDED); - MethodBody cinitBody = abcIndex.getSelectedAbc().findBody(cinit_index); - - List sinitcode = new ArrayList<>(); - List initcode = new ArrayList<>(); - for (GraphTargetItem ti : traitItems) { - if ((ti instanceof SlotAVM2Item) || (ti instanceof ConstAVM2Item)) { - GraphTargetItem val = null; - boolean isStatic = false; - int ns = -1; - String tname = null; - boolean isConst = false; - if (ti instanceof SlotAVM2Item) { - val = ((SlotAVM2Item) ti).value; - isStatic = ((SlotAVM2Item) ti).isStatic(); - ns = genNs(importedClasses, pkg, ((SlotAVM2Item) ti).pkg, openedNamespaces, localData, ((SlotAVM2Item) ti).line); - tname = ((SlotAVM2Item) ti).var; - } - if (ti instanceof ConstAVM2Item) { - val = ((ConstAVM2Item) ti).value; - isStatic = ((ConstAVM2Item) ti).isStatic(); - ns = genNs(importedClasses, pkg, ((ConstAVM2Item) ti).pkg, openedNamespaces, localData, ((ConstAVM2Item) ti).line); - tname = ((ConstAVM2Item) ti).var; - isConst = true; - } - if (isStatic && val != null) { - sinitcode.add(ins(AVM2Instructions.FindProperty, traitName(ns, tname))); - localData.isStatic = true; - sinitcode.addAll(toInsList(val.toSource(localData, this))); - sinitcode.add(ins(isConst ? AVM2Instructions.InitProperty : AVM2Instructions.SetProperty, traitName(ns, tname))); - } - if (!isStatic && val != null) { - //do not init basic values, that can be stored in trait - if (!(val instanceof IntegerValueAVM2Item) && !(val instanceof StringAVM2Item) && !(val instanceof BooleanAVM2Item) && !(val instanceof NullAVM2Item) && !(val instanceof UndefinedAVM2Item)) { - initcode.add(ins(AVM2Instructions.GetLocal0)); - localData.isStatic = false; - initcode.addAll(toInsList(val.toSource(localData, this))); - initcode.add(ins(isConst ? AVM2Instructions.InitProperty : AVM2Instructions.SetProperty, traitName(ns, tname))); - } - } - } - } - MethodBody initBody = null; - if (!isInterface) { - initBody = abcIndex.getSelectedAbc().findBody(init); - initBody.insertAll(iinit == null ? 0 : 2, initcode);//after getlocal0,pushscope - - if (cinitBody.getCode().code.get(cinitBody.getCode().code.size() - 1).definition instanceof ReturnVoidIns) { - cinitBody.insertAll(2, sinitcode); //after getlocal0,pushscope - } - } - cinitBody.markOffsets(); - cinitBody.autoFillStats(abcIndex.getSelectedAbc(), initScope + (implementsStr.isEmpty() ? 0 : 1), true); - - classInfo.cinit_index = cinit_index; - if (initBody != null) { - initBody.autoFillStats(abcIndex.getSelectedAbc(), initScope + 1, true); - } - instanceInfo.interfaces = new int[implementsStr.size()]; - for (int i = 0; i < implementsStr.size(); i++) { - instanceInfo.interfaces[i] = superIntName(localData, implementsStr.get(i)); - } - - } - @Override public List generate(SourceGeneratorLocalData localData, CommaExpressionItem item, boolean withReturnValue) throws CompilationException { if (item.commands.isEmpty()) { @@ -1479,1339 +2889,6 @@ public class AVM2SourceGenerator implements SourceGenerator { return ret; } - public int generateClass(int namespace, ClassInfo ci, InstanceInfo ii, int initScope, DottedChain pkg, SourceGeneratorLocalData localData, AVM2Item cls, Reference class_index) throws AVM2ParseException, CompilationException { - /*ClassInfo ci = new ClassInfo(); - InstanceInfo ii = new InstanceInfo(); - abc.class_info.add(ci); - abc.instance_info.add(ii); - */ - if (cls instanceof ClassAVM2Item) { - ClassAVM2Item cai = (ClassAVM2Item) cls; - //TODO: iinit variables, iinit activation - generateClass(cai.importedClasses, cai.cinitVariables, cai.cinitActivation, cai.staticInit, - cai.openedNamespaces, - namespace, - initScope, pkg, ci, ii, - localData, false, - cai.className, cai.extendsOp == null ? "Object" : cai.extendsOp.toString(), - cai.extendsOp, cai.implementsOp, cai.iinit, - cai.iinitVariables, cai.iinitActivation, cai.traits, class_index - ); - if (!cai.isDynamic) { - ii.flags |= InstanceInfo.CLASS_SEALED; - } - if (cai.isFinal) { - ii.flags |= InstanceInfo.CLASS_FINAL; - } - ii.flags |= InstanceInfo.CLASS_PROTECTEDNS; - ii.protectedNS = abcIndex.getSelectedAbc().constants.getNamespaceId(Namespace.KIND_PROTECTED, pkg.toRawString().isEmpty() ? cai.className : pkg.toRawString() + ":" + cai.className, 0, true); - } - if (cls instanceof InterfaceAVM2Item) { - InterfaceAVM2Item iai = (InterfaceAVM2Item) cls; - ii.flags |= InstanceInfo.CLASS_INTERFACE; - ii.flags |= InstanceInfo.CLASS_SEALED; - generateClass(iai.importedClasses, new ArrayList<>(), false, new ArrayList<>(), - iai.openedNamespaces, namespace, initScope, pkg, ci, ii, localData, true, iai.name, null, null, iai.superInterfaces, null, null, false, iai.methods, - class_index - ); - } - - return abcIndex.getSelectedAbc().instance_info.size() - 1; - } - - public int traitName(int namespace, String var) { - return abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createQName(false, str(var), namespace), true); - } - - public int typeName(SourceGeneratorLocalData localData, GraphTargetItem type) throws CompilationException { - if (type.equals(TypeItem.UNBOUNDED)) { - return 0; - } - if (("" + type).equals("*")) { - return 0; - } - - return resolveType(localData, type, abcIndex); - /* - TypeItem nameItem = (TypeItem) type; - name = nameItem.fullTypeName; - if (name.contains(".")) { - pkg = name.substring(0, name.lastIndexOf('.')); - name = name.substring(name.lastIndexOf('.') + 1); - } - if (!nameItem.subtypes.isEmpty()) { //It's vector => TypeName - List params = new ArrayList<>(); - for (GraphTargetItem p : nameItem.subtypes) { - params.add(typeName(localData, p));//abc.getLastAbc().constants.getMultinameId(new Multiname(Multiname.QNAME, str(p), namespace(Namespace.KIND_PACKAGE, ppkg), 0, 0, new ArrayList()), true)); - } - int qname = abc.getLastAbc().constants.getMultinameId(new Multiname(Multiname.QNAME, str(name), namespace(Namespace.KIND_PACKAGE, pkg), 0, 0, new ArrayList()), true); - return abc.getLastAbc().constants.getMultinameId(new Multiname(Multiname.TYPENAME, 0, 0, 0, qname, params), true); - } else { - return abc.getLastAbc().constants.getMultinameId(new Multiname(Multiname.QNAME, str(name), namespace(Namespace.KIND_PACKAGE, pkg), 0, 0, new ArrayList()), true); - }*/ - } - - public int ident(GraphTargetItem name) { - if (name instanceof NameAVM2Item) { - return str(((NameAVM2Item) name).getVariableName()); - } - throw new RuntimeException("no ident"); //FIXME - } - - public int namespace(int nsKind, String name) { - return abcIndex.getSelectedAbc().constants.getNamespaceId(nsKind, str(name), 0, true); - } - - public int str(String name) { - return abcIndex.getSelectedAbc().constants.getStringId(name, true); - } - - public int propertyName(GraphTargetItem name) { - if (name instanceof NameAVM2Item) { - NameAVM2Item va = (NameAVM2Item) name; - return abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createQName(false, str(va.getVariableName()), namespace(Namespace.KIND_PACKAGE, "")), true); - } - throw new RuntimeException("no prop"); //FIXME - } - - public int getFreeRegister(SourceGeneratorLocalData localData) { - for (int i = 0;; i++) { - if (!localData.registerVars.containsValue(i)) { - localData.registerVars.put("__TEMP__" + i, i); - return i; - } - } - } - - public boolean killRegister(SourceGeneratorLocalData localData, int i) { - String key = null; - for (String k : localData.registerVars.keySet()) { - if (localData.registerVars.get(k) == i) { - key = k; - break; - } - } - if (key != null) { - localData.registerVars.remove(key); - return true; - } - return false; - } - - public int method(boolean isStatic, int name_index, boolean subMethod, boolean isInterface, List callStack, DottedChain pkg, boolean needsActivation, List subvariables, int initScope, boolean hasRest, int line, String className, String superType, boolean constructor, SourceGeneratorLocalData localData, List paramTypes, List paramNames, List paramValues, List body, GraphTargetItem retType) throws CompilationException { - //Reference hasArgs = new Reference<>(Boolean.FALSE); - //calcRegisters(localData,needsActivation,paramNames,subvariables,body, hasArgs); - SourceGeneratorLocalData newlocalData = new SourceGeneratorLocalData(new HashMap<>(), 1, true, 0); - newlocalData.currentClass = className; - newlocalData.pkg = localData.pkg; - newlocalData.callStack.addAll(localData.callStack); - newlocalData.traitUsages = localData.traitUsages; - newlocalData.currentScript = localData.currentScript; - newlocalData.scriptIndex = localData.scriptIndex; - newlocalData.privateNs = localData.privateNs; - newlocalData.protectedNs = localData.protectedNs; - newlocalData.isStatic = isStatic; - newlocalData.subMethod = subMethod; - localData = newlocalData; - - localData.activationReg = 0; - - for (int i = 0; i < subvariables.size(); i++) { - AssignableAVM2Item an = subvariables.get(i); - if (an instanceof UnresolvedAVM2Item) { - UnresolvedAVM2Item n = (UnresolvedAVM2Item) an; - if (n.resolved == null) { - String fullClass = localData.getFullClass(); - GraphTargetItem res = n.resolve(localData, localData.currentClass, new TypeItem(fullClass), paramTypes, paramNames, abcIndex, callStack, subvariables); - if (res instanceof AssignableAVM2Item) { - subvariables.set(i, (AssignableAVM2Item) res); - } else { - subvariables.remove(i); - i--; - } - } - } - } - - for (int t = 0; t < paramTypes.size(); t++) { - GraphTargetItem an = paramTypes.get(t); - if (an instanceof UnresolvedAVM2Item) { - UnresolvedAVM2Item n = (UnresolvedAVM2Item) an; - if (n.resolved == null) { - String fullClass = localData.getFullClass(); - GraphTargetItem res = n.resolve(localData, localData.currentClass, new TypeItem(fullClass), paramTypes, paramNames, abcIndex, callStack, subvariables); - paramTypes.set(t, res); - } - } - } - - boolean hasArguments = false; - List slotNames = new ArrayList<>(); - List slotTypes = new ArrayList<>(); - slotNames.add("--first"); - slotTypes.add(TypeItem.UNBOUNDED); - - int paramLine = 0; //? - - List registerNames = new ArrayList<>(); - List registerLines = new ArrayList<>(); - List registerTypes = new ArrayList<>(); - if (className != null && !subMethod) { - String fullClassName = pkg.addWithSuffix(className).toRawString(); - registerTypes.add(new TypeItem(fullClassName)); - localData.scopeStack.add(new LocalRegAVM2Item(null, null, registerNames.size(), null, new TypeItem(fullClassName))); - registerNames.add("this"); - registerLines.add(0); //? - - } else { - registerTypes.add(new TypeItem("global")); - registerNames.add("this"); - registerLines.add(0); //? - } - for (GraphTargetItem t : paramTypes) { - registerTypes.add(t); - slotTypes.add(t); - } - for (int i = 0; i < paramNames.size(); i++) { - registerLines.add(paramLine); - } - registerNames.addAll(paramNames); - slotNames.addAll(paramNames); - if (hasRest) { - registerTypes.add(TypeItem.ARRAY); - slotTypes.add(TypeItem.ARRAY); - } - localData.registerVars.clear(); - for (AssignableAVM2Item an : subvariables) { - if (an instanceof NameAVM2Item) { - NameAVM2Item n = (NameAVM2Item) an; - if (n.getVariableName().equals("arguments") & !n.isDefinition()) { - registerNames.add("arguments"); - registerTypes.add(new TypeItem("Array")); - registerLines.add(0); //? - slotNames.add(n.getVariableName()); - slotTypes.add(new TypeItem("Array")); - hasArguments = true; - break; - } - } - } - int paramRegCount = registerNames.size(); - - if (needsActivation) { - registerNames.add("+$activation"); - registerLines.add(0); //? - localData.activationReg = registerNames.size() - 1; - registerTypes.add(new TypeItem("Object")); - localData.scopeStack.add(new LocalRegAVM2Item(null, null, localData.activationReg, null, new TypeItem("Object"))); - } - - String mask = Configuration.registerNameFormat.get(); - String maskRegexp = mask.replace("%d", "([0-9]+)"); - Pattern pat = Pattern.compile(maskRegexp); - - final String UNUSED = "~~unused"; - - //Two rounds - for (int round = 1; round <= 2; round++) { - for (AssignableAVM2Item an : subvariables) { - if (an instanceof NameAVM2Item) { - NameAVM2Item n = (NameAVM2Item) an; - if (n.isDefinition() && !registerNames.contains(n.getVariableName())) { - String varName = n.getVariableName(); - if (!needsActivation) { - Matcher m = pat.matcher(varName); - //In first round, make all register that match standard loc_xx register - if ((round == 1) && (m.matches())) { - String regIndexStr = m.group(1); - int regIndex = Integer.parseInt(regIndexStr); - while (registerNames.size() <= regIndex) { - registerNames.add(UNUSED); - registerTypes.add(TypeItem.UNBOUNDED); - registerLines.add(paramLine); - } - registerNames.set(regIndex, varName); - registerTypes.set(regIndex, n.type); - registerLines.set(regIndex, n.line); - - } //in second round the rest - else if (round == 2 && !m.matches()) { - - //search for some unused indices first: - int newRegIndex = -1; - for (int j = 0; j < registerNames.size(); j++) { - if (UNUSED.equals(registerNames.get(j))) { - newRegIndex = j; - break; - } - } - if (newRegIndex == -1) { - newRegIndex = registerNames.size(); - registerNames.add(UNUSED); - registerTypes.add(TypeItem.UNBOUNDED); - registerLines.add(paramLine); - } - registerNames.set(newRegIndex, n.getVariableName()); - registerTypes.set(newRegIndex, n.type); - registerLines.set(newRegIndex, n.line); - } - } - else - { - if (round == 1) { - if (!slotNames.contains(varName)) { - slotNames.add(varName); - slotTypes.add(n.type); - } - } - } - } - } - } - } - - - for (int j = registerNames.size() - 1; j >= 0; j--) { - if (UNUSED.equals(registerNames.get(j))) { - registerNames.remove(j); - registerTypes.remove(j); - registerLines.remove(j); - } - } - for (int j = 0; j < registerNames.size(); j++) { - if (UNUSED.equals(registerNames.get(j))) { - String standardName = String.format(mask, j); - registerNames.set(j, standardName); - } - } - - int slotScope = subMethod ? 0 : 1; - - for (AssignableAVM2Item an : subvariables) { - if (an instanceof NameAVM2Item) { - NameAVM2Item n = (NameAVM2Item) an; - String variableName = n.getVariableName(); - if (variableName != null) { - boolean isThisOrSuper = variableName.equals("this") || variableName.equals("super"); - if (!isThisOrSuper && needsActivation) { - if (n.getSlotNumber() <= 0) { - n.setSlotNumber(slotNames.indexOf(variableName)); - n.setSlotScope(slotScope); - } - } else if (isThisOrSuper) { - n.setRegNumber(0); - } else { - n.setRegNumber(registerNames.indexOf(variableName)); - } - } - } - } - - for (int i = 0; i < registerNames.size(); i++) { - if (needsActivation && i > localData.activationReg) { - break; - } - localData.registerVars.put(registerNames.get(i), i); - } - List declarations = new ArrayList<>(); - loopn: - for (AssignableAVM2Item an : subvariables) { - if (an instanceof NameAVM2Item) { - NameAVM2Item n = (NameAVM2Item) an; - - if (needsActivation) { - if (n.getSlotScope() != slotScope) { - continue; - } else if (n.getSlotNumber() < paramRegCount) { - continue; - } - } - for (NameAVM2Item d : declarations) { - if (n.getVariableName() != null && n.getVariableName().equals(d.getVariableName())) { - continue loopn; - } - } - - for (GraphTargetItem it : body) { //search first level of commands - if (it instanceof NameAVM2Item) { - NameAVM2Item n2 = (NameAVM2Item) it; - if (n2.isDefinition() && n2.getAssignedValue() != null && n2.getVariableName().equals(n.getVariableName())) { - continue loopn; - } - if (!n2.isDefinition() && n2.getVariableName() != null && n2.getVariableName().equals(n.getVariableName())) { //used earlier than defined - break; - } - } - } - if (n.unresolved) { - continue; - } - if (n.redirect != null) { - continue; - } - if (n.getNs() != null) { - continue; - } - - String variableName = n.getVariableName(); - if ("this".equals(variableName) || "super".equals(variableName) || paramNames.contains(variableName) || "arguments".equals(variableName)) { - continue; - } - - NameAVM2Item d = new NameAVM2Item(n.type, n.line, n.isAttribute(), n.getVariableName(), n.getNamespaceSuffix(), null /*NameAVM2Item.getDefaultValue("" + n.type)*/, true, n.openedNamespaces, abcIndex); - //no index - if (needsActivation) { - if (d.getSlotNumber() <= 0) { - d.setSlotNumber(n.getSlotNumber()); - d.setSlotScope(n.getSlotScope()); - } - } else { - d.setRegNumber(n.getRegNumber()); - } - declarations.add(d); - } - } - - int[] param_types = new int[paramTypes.size()]; - ValueKind[] optional = new ValueKind[paramValues.size()]; - //int[] param_names = new int[paramNames.size()]; - for (int i = 0; i < paramTypes.size(); i++) { - param_types[i] = typeName(localData, paramTypes.get(i)); - //param_names[i] = str(paramNames.get(i)); - } - - for (int i = 0; i < paramValues.size(); i++) { - optional[i] = getValueKind(Namespace.KIND_NAMESPACE/*FIXME*/, paramTypes.get(paramTypes.size() - paramValues.size() + i), paramValues.get(i), false); - if (optional[i] == null) { - throw new CompilationException("Default value must be compiletime constant", line); - } - } - - MethodInfo mi = new MethodInfo(param_types, constructor ? 0 : typeName(localData, retType), name_index, 0, optional, new int[0]/*no param_names*/); - if (hasArguments) { - mi.setFlagNeed_Arguments(); - } - //No param names like in official - /* - if (!paramNames.isEmpty()) { - mi.setFlagHas_paramnames(); - }*/ - if (!paramValues.isEmpty()) { - mi.setFlagHas_optional(); - } - if (hasRest) { - mi.setFlagNeed_rest(); - } - - int mindex; - if (!isInterface) { - MethodBody mbody = new MethodBody(abcIndex.getSelectedAbc(), new Traits(), new byte[0], new ABCException[0]); - - if (needsActivation) { - int slotId = 1; - for (int i = 1; i < slotNames.size(); i++) { - TraitSlotConst tsc = new TraitSlotConst(); - tsc.slot_id = slotId++; - tsc.name_index = abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createQName(false, abcIndex.getSelectedAbc().constants.getStringId(slotNames.get(i), true), abcIndex.getSelectedAbc().constants.getNamespaceId(Namespace.KIND_PACKAGE_INTERNAL, pkg, 0, true)), true); - tsc.type_index = typeName(localData, slotTypes.get(i)); - mbody.traits.traits.add(tsc); - } - for (int i = 1; i < paramRegCount; i++) { - NameAVM2Item param = new NameAVM2Item(registerTypes.get(i), 0, false, registerNames.get(i), "", null, false, new ArrayList<>(), abcIndex); - param.setRegNumber(i); - NameAVM2Item d = new NameAVM2Item(registerTypes.get(i), 0, false, registerNames.get(i), "", param, true, new ArrayList<>(), abcIndex); - d.setSlotScope(slotScope); - d.setSlotNumber(slotNames.indexOf(registerNames.get(i))); - declarations.add(d); - } - } - boolean addRet = false; - if (body != null) { - body.addAll(0, declarations); - if (body.isEmpty() || (!((body.get(body.size() - 1) instanceof ReturnValueAVM2Item) - || (body.get(body.size() - 1) instanceof ReturnVoidAVM2Item)))) { - addRet = true; - } - } - - localData.exceptions = new ArrayList<>(); - localData.callStack.add(mbody); - List src = body == null ? new ArrayList<>() : generate(localData, body); - - mbody.method_info = abcIndex.getSelectedAbc().addMethodInfo(mi); - ArrayList mbodyCode = toInsList(src); - mbody.setCode(new AVM2Code(mbodyCode)); - - if (needsActivation) { - /*if (localData.traitUsages.containsKey(mbody)) { - List usages = localData.traitUsages.get(mbody); - List mbodyCodeDecl = new ArrayList<>(); - for (int i = 0; i < mbody.traits.traits.size(); i++) { - if (usages.contains(i)) { - TraitSlotConst tsc = (TraitSlotConst) mbody.traits.traits.get(i); - GraphTargetItem type = TypeItem.UNBOUNDED; - if (tsc.type_index > 0) { - type = new TypeItem(abcIndex.getSelectedAbc().constants.getMultiname(tsc.type_index).getNameWithNamespace(abcIndex.getSelectedAbc().constants, true)); - } - NameAVM2Item d = new NameAVM2Item(type, 0, tsc.getName(abcIndex.getSelectedAbc()).getName(abcIndex.getSelectedAbc().constants, null, true, true), NameAVM2Item.getDefaultValue("" + type), true, new ArrayList<>(), abcIndex); - d.setSlotNumber(tsc.slot_id); - d.setSlotScope(slotScope); - mbodyCodeDecl.addAll(toInsList(d.toSourceIgnoreReturnValue(localData, this))); - } - } - mbodyCode.addAll(0, mbodyCodeDecl); - }*/ - - List acts = new ArrayList<>(); - acts.add(ins(AVM2Instructions.NewActivation)); - acts.add(ins(AVM2Instructions.Dup)); - acts.add(AssignableAVM2Item.generateSetLoc(localData.activationReg)); - acts.add(ins(AVM2Instructions.PushScope)); - - mbodyCode.addAll(0, acts); - } - - if (constructor) { - /* List abcs = new ArrayList<>(); - abcs.add(abc); - abcs.addAll(allABCs); - */ - int parentConstMinAC = 0; - - AbcIndexing.ClassIndex ci = abcIndex.findClass(new TypeItem(superType), null, null/*FIXME?*/); - - if (ci != null) { - MethodInfo pmi = ci.abc.method_info.get(ci.abc.instance_info.get(ci.index).iinit_index); - parentConstMinAC = pmi.param_types.length; - if (pmi.flagHas_optional()) { - parentConstMinAC -= pmi.optional.length; - } - } - int ac = -1; - for (AVM2Instruction ins : mbodyCode) { - if (ins.definition instanceof ConstructSuperIns) { - ac = ins.operands[0]; - if (parentConstMinAC > ac) { - throw new CompilationException("Parent constructor call requires different number of arguments", line); - } - - } - } - if (ac == -1) { - if (parentConstMinAC == 0) { - mbodyCode.add(0, new AVM2Instruction(0, AVM2Instructions.GetLocal0, null)); - mbodyCode.add(1, new AVM2Instruction(0, AVM2Instructions.ConstructSuper, new int[]{0})); - - } else { - throw new CompilationException("Parent constructor must be called", line); - } - } - } - for (int i = 1; i < registerNames.size(); i++) { - mbodyCode.add(i - 1, ins(AVM2Instructions.Debug, 1, str(registerNames.get(i)), i - 1, (int) registerLines.get(i))); - } - if (!subMethod) { - mbodyCode.add(0, new AVM2Instruction(0, AVM2Instructions.GetLocal0, null)); - mbodyCode.add(1, new AVM2Instruction(0, AVM2Instructions.PushScope, null)); - } - /*if (!mbodyCode.isEmpty()) { - InstructionDefinition lastDef = mbodyCode.get(mbodyCode.size() - 1).definition; - if (!((lastDef instanceof ReturnVoidIns) || (lastDef instanceof ReturnValueIns))) { - addRet = true; - } - } else { - addRet = true; - }*/ - if (addRet) { - if (retType.toString().equals("*") || retType.toString().equals("void") || constructor) { - mbodyCode.add(new AVM2Instruction(0, AVM2Instructions.ReturnVoid, null)); - } else { - mbodyCode.add(new AVM2Instruction(0, AVM2Instructions.PushUndefined, null)); - mbodyCode.add(new AVM2Instruction(0, AVM2Instructions.ReturnValue, null)); - } - } - mbody.exceptions = localData.exceptions.toArray(new ABCException[localData.exceptions.size()]); - int offset = 0; - for (int i = 0; i < mbodyCode.size(); i++) { - AVM2Instruction ins = mbodyCode.get(i); - if (ins instanceof ExceptionMarkAVM2Instruction) { - ExceptionMarkAVM2Instruction m = (ExceptionMarkAVM2Instruction) ins; - switch (m.markType) { - case MARK_E_START: - mbody.exceptions[m.exceptionId].start = offset; - break; - case MARK_E_END: - mbody.exceptions[m.exceptionId].end = offset; - break; - case MARK_E_TARGET: - mbody.exceptions[m.exceptionId].target = offset; - break; - } - mbodyCode.remove(i); - i--; - continue; - } - offset += ins.getBytesLength(); - } - - mbody.markOffsets(); - mbody.autoFillStats(abcIndex.getSelectedAbc(), initScope, className != null); - abcIndex.getSelectedAbc().addMethodBody(mbody); - mindex = mbody.method_info; - } else { - mindex = abcIndex.getSelectedAbc().addMethodInfo(mi); - } - - return mindex; - } - - public ValueKind getValueKind(int ns, GraphTargetItem type, GraphTargetItem val, boolean generatedNs) { - - if (val instanceof BooleanAVM2Item) { - BooleanAVM2Item bi = (BooleanAVM2Item) val; - if (bi.value) { - return new ValueKind(ValueKind.CONSTANT_True, ValueKind.CONSTANT_True); - } else { - return new ValueKind(ValueKind.CONSTANT_False, ValueKind.CONSTANT_False); - } - } - - boolean isNs = false; - if (type instanceof NameAVM2Item) { - if (((NameAVM2Item) type).getVariableName().equals("namespace")) { - isNs = true; - } - } - - if ((type instanceof TypeItem) && (((TypeItem) type).fullTypeName.equals(DottedChain.NAMESPACE))) { - isNs = true; - } - - if (val instanceof StringAVM2Item) { - StringAVM2Item sval = (StringAVM2Item) val; - if (isNs) { - return new ValueKind(namespace(generatedNs ? Namespace.KIND_PACKAGE_INTERNAL : Namespace.KIND_NAMESPACE, sval.getValue()), ValueKind.CONSTANT_Namespace); - } else { - return new ValueKind(str(sval.getValue()), ValueKind.CONSTANT_Utf8); - } - } - if (val instanceof IntegerValueAVM2Item) { - return new ValueKind(abcIndex.getSelectedAbc().constants.getIntId(((IntegerValueAVM2Item) val).value, true), ValueKind.CONSTANT_Int); - } - if (val instanceof FloatValueAVM2Item) { - return new ValueKind(abcIndex.getSelectedAbc().constants.getDoubleId(((FloatValueAVM2Item) val).value, true), ValueKind.CONSTANT_Double); - } - if (val instanceof NanAVM2Item) { - return new ValueKind(abcIndex.getSelectedAbc().constants.getDoubleId(Double.NaN, true), ValueKind.CONSTANT_Double); - } - if (val instanceof NullAVM2Item) { - return new ValueKind(ValueKind.CONSTANT_Null, ValueKind.CONSTANT_Null); - } - if (val instanceof UndefinedAVM2Item) { - return new ValueKind(ValueKind.CONSTANT_Undefined, ValueKind.CONSTANT_Undefined); - } - - //TODO: the compiler should check whether default value is compatible with its type - //Flash CS6 does this, example message: "Incompatible default value of type int where String is expected." - //However a negative integer value on uint type silently loses its negation. Weird. - return null; - } - - private int genNs(List importedClasses, DottedChain pkg, NamespaceItem ns, List openedNamespaces, SourceGeneratorLocalData localData, int line) throws CompilationException { - ns.resolveCustomNs(abcIndex, importedClasses, pkg, openedNamespaces, localData); - return ns.getCpoolIndex(abcIndex); - } - - public void generateTraitsPhase2(List importedClasses, DottedChain pkg, List items, Trait[] traits, List openedNamespaces, SourceGeneratorLocalData localData) throws CompilationException { - for (int k = 0; k < items.size(); k++) { - GraphTargetItem item = items.get(k); - if (traits[k] == null) { - - } else if (item instanceof InterfaceAVM2Item) { - traits[k].name_index = traitName(((InterfaceAVM2Item) item).pkg == null ? 0 : ((InterfaceAVM2Item) item).pkg.getCpoolIndex(abcIndex), ((InterfaceAVM2Item) item).name); - } else if (item instanceof ClassAVM2Item) { - traits[k].name_index = traitName(((ClassAVM2Item) item).pkg == null ? 0 : ((ClassAVM2Item) item).pkg.getCpoolIndex(abcIndex), ((ClassAVM2Item) item).className); - } else if ((item instanceof MethodAVM2Item) || (item instanceof GetterAVM2Item) || (item instanceof SetterAVM2Item)) { - traits[k].name_index = traitName(genNs(importedClasses, pkg, ((MethodAVM2Item) item).pkg, openedNamespaces, localData, ((MethodAVM2Item) item).line), ((MethodAVM2Item) item).functionName); - } else if (item instanceof FunctionAVM2Item) { - traits[k].name_index = traitName(((FunctionAVM2Item) item).pkg == null ? 0 : ((FunctionAVM2Item) item).pkg.getCpoolIndex(abcIndex), ((FunctionAVM2Item) item).functionName); - } else if (item instanceof ConstAVM2Item) { - traits[k].name_index = traitName(genNs(importedClasses, pkg, ((ConstAVM2Item) item).pkg, openedNamespaces, localData, ((ConstAVM2Item) item).line), ((ConstAVM2Item) item).var); - } else if (item instanceof SlotAVM2Item) { - traits[k].name_index = traitName(genNs(importedClasses, pkg, ((SlotAVM2Item) item).pkg, openedNamespaces, localData, ((SlotAVM2Item) item).line), ((SlotAVM2Item) item).var); - } - } - - for (int k = 0; k < items.size(); k++) { - GraphTargetItem item = items.get(k); - if (traits[k] == null) { - continue; - } - if (item instanceof ClassAVM2Item) { - localData.currentClass = ((ClassAVM2Item) item).pkg.name.addWithSuffix(((ClassAVM2Item) item).className).toRawString(); - InstanceInfo instanceInfo = abcIndex.getSelectedAbc().instance_info.get(((TraitClass) traits[k]).class_info); - instanceInfo.name_index = abcIndex.getSelectedAbc().constants.getMultinameId( - Multiname.createQName( - false, - abcIndex.getSelectedAbc().constants.getStringId(((ClassAVM2Item) item).className, true), - ((ClassAVM2Item) item).pkg.getCpoolIndex(abcIndex)), true); - - localData.currentClass = null; - } - if (item instanceof InterfaceAVM2Item) { - localData.currentClass = ((InterfaceAVM2Item) item).pkg.name.addWithSuffix(((InterfaceAVM2Item) item).name).toRawString(); - ABC abc = abcIndex.getSelectedAbc(); - AVM2ConstantPool constants = abc.constants; - InstanceInfo instanceInfo = abc.instance_info.get(((TraitClass) traits[k]).class_info); - instanceInfo.name_index = constants.getMultinameId(Multiname.createQName(false, constants.getStringId(((InterfaceAVM2Item) item).name, true), - ((InterfaceAVM2Item) item).pkg.getCpoolIndex(abcIndex)), true); - - localData.currentClass = null; - } - } - } - - public void generateTraitsPhase3(List items, Trait[] traits, SourceGeneratorLocalData localData) throws CompilationException { - for (int k = 0; k < items.size(); k++) { - GraphTargetItem item = items.get(k); - if (traits[k] == null) { - continue; - } - if (item instanceof ClassAVM2Item) { - int minClassIndex = -1; - localData.currentClass = ((ClassAVM2Item) item).pkg.name.addWithSuffix(((ClassAVM2Item) item).className).toRawString(); - InstanceInfo instanceInfo = abcIndex.getSelectedAbc().instance_info.get(((TraitClass) traits[k]).class_info); - ABC abc = abcIndex.getSelectedAbc(); - if (((ClassAVM2Item) item).extendsOp != null) { - instanceInfo.super_index = typeName(localData, ((ClassAVM2Item) item).extendsOp); - } else { - instanceInfo.super_index = abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createQName(false, str("Object"), namespace(Namespace.KIND_PACKAGE, "")), true); - } - if (instanceInfo.super_index != 0) { - int foundClass = abc.findClassByName(abc.constants.getMultiname(instanceInfo.super_index).getNameWithNamespace(abc.constants, true)); - if (foundClass > -1) { - if (foundClass > minClassIndex) { - minClassIndex = foundClass; - } - } - } - instanceInfo.interfaces = new int[((ClassAVM2Item) item).implementsOp.size()]; - for (int i = 0; i < ((ClassAVM2Item) item).implementsOp.size(); i++) { - instanceInfo.interfaces[i] = superIntName(localData, ((ClassAVM2Item) item).implementsOp.get(i)); - int foundIface = abc.findClassByName(abc.constants.getMultiname(instanceInfo.interfaces[i]).getNameWithNamespace(abc.constants, true)); - if (foundIface > -1) { - if (foundIface > minClassIndex) { - minClassIndex = foundIface; - } - } - } - int oldClassIndex = ((TraitClass) traits[k]).class_info; - if (oldClassIndex <= minClassIndex) { - abc.moveClass(oldClassIndex, minClassIndex + 1); - } - localData.currentClass = null; - } - if (item instanceof InterfaceAVM2Item) { - int minClassIndex = -1; - localData.currentClass = ((InterfaceAVM2Item) item).pkg.name.addWithSuffix(((InterfaceAVM2Item) item).name).toRawString(); - ABC abc = abcIndex.getSelectedAbc(); - InstanceInfo instanceInfo = abc.instance_info.get(((TraitClass) traits[k]).class_info); - instanceInfo.interfaces = new int[((InterfaceAVM2Item) item).superInterfaces.size()]; - for (int i = 0; i < ((InterfaceAVM2Item) item).superInterfaces.size(); i++) { - GraphTargetItem un = ((InterfaceAVM2Item) item).superInterfaces.get(i); - instanceInfo.interfaces[i] = superIntName(localData, un); - - int foundIface = abc.findClassByName(abc.constants.getMultiname(instanceInfo.interfaces[i]).getNameWithNamespace(abc.constants, true)); - if (foundIface > -1) { - if (foundIface > minClassIndex) { - minClassIndex = foundIface; - } - } - } - int oldClassIndex = ((TraitClass) traits[k]).class_info; - if (oldClassIndex <= minClassIndex) { - abc.moveClass(oldClassIndex, minClassIndex + 1); - } - localData.currentClass = null; - } - } - } - - public int superIntName(SourceGeneratorLocalData localData, GraphTargetItem un) throws CompilationException { - if (un instanceof UnresolvedAVM2Item) { - ((UnresolvedAVM2Item) un).resolve(localData, localData.currentClass, null, new ArrayList<>(), new ArrayList<>(), abcIndex, new ArrayList<>(), new ArrayList<>()); - un = ((UnresolvedAVM2Item) un).resolved; - } - if (!(un instanceof TypeItem)) { //not applyType - throw new CompilationException("Invalid type", 0); - } - TypeItem sup = (TypeItem) un; - int propId = resolveType(localData, sup, abcIndex); - int[] nss = new int[]{abcIndex.getSelectedAbc().constants.getMultiname(propId).namespace_index}; - return abcIndex.getSelectedAbc().constants.getMultinameId(Multiname.createMultiname(false, abcIndex.getSelectedAbc().constants.getMultiname(propId).name_index, abcIndex.getSelectedAbc().constants.getNamespaceSetId(nss, true)), true); - - } - - public int[] generateMetadata(List>> metadata, ABC abc) { - List retList = new ArrayList<>(); - for (int i = 0; i < metadata.size(); i++) { - Map.Entry> en = metadata.get(i); - if ("API".equals(en.getKey()) && abc.isApiVersioned()) { - continue; - } - int[] keys = new int[en.getValue().size()]; - int[] values = new int[en.getValue().size()]; - int j = 0; - for (String key : en.getValue().keySet()) { - keys[j] = abcIndex.getSelectedAbc().constants.getStringId(key, true); - values[j] = abcIndex.getSelectedAbc().constants.getStringId(en.getValue().get(key), true); - j++; - } - MetadataInfo mi = new MetadataInfo(abcIndex.getSelectedAbc().constants.getStringId(en.getKey(), true), keys, values); - retList.add(abcIndex.getSelectedAbc().metadata_info.size()); - abcIndex.getSelectedAbc().metadata_info.add(mi); - } - int[] ret = new int[retList.size()]; - for (int i = 0; i < retList.size(); i++) { - ret[i] = retList.get(i); - } - return ret; - } - - public void generateTraitsPhase4(List importedClasses, List openedNamespaces, int methodInitScope, boolean isInterface, String className, String superName, boolean generateStatic, SourceGeneratorLocalData localData, List items, Traits ts, Trait[] traits, Map initScopes, Reference class_index, boolean isScriptTraits) throws AVM2ParseException, CompilationException { - - //Note: Names must be generated first before accesed in inner subs - for (int k = 0; k < items.size(); k++) { - GraphTargetItem item = items.get(k); - if (traits[k] == null) { - continue; - } - - if ((item instanceof SlotAVM2Item) || (item instanceof ConstAVM2Item)) { - TraitSlotConst tsc = (TraitSlotConst) traits[k]; - GraphTargetItem val = null; - GraphTargetItem type = null; - boolean isNamespace = false; - int namespace = 0; - boolean isStatic = false; - int[] metadata = new int[0]; - if (item instanceof SlotAVM2Item) { - SlotAVM2Item sai = (SlotAVM2Item) item; - if (!isScriptTraits && sai.isStatic() != generateStatic) { - continue; - } - val = sai.value; - type = sai.type; - isStatic = sai.isStatic(); - if (sai.pkg != null) { - sai.pkg.resolveCustomNs(abcIndex, importedClasses, localData.pkg, openedNamespaces, localData); - } - namespace = sai.pkg == null ? 0 : sai.pkg.getCpoolIndex(abcIndex); - } - boolean generatedNs = false; - if (item instanceof ConstAVM2Item) { - ConstAVM2Item cai = (ConstAVM2Item) item; - generatedNs = cai.generatedNs; - if (!isScriptTraits && cai.isStatic() != generateStatic) { - continue; - } - val = cai.value; - type = cai.type; - if (cai.pkg != null) { - cai.pkg.resolveCustomNs(abcIndex, importedClasses, localData.pkg, openedNamespaces, localData); - } - namespace = cai.pkg == null ? 0 : cai.pkg.getCpoolIndex(abcIndex); - isNamespace = type.toString().equals("Namespace"); - isStatic = cai.isStatic(); - } - tsc.type_index = isNamespace ? 0 : (type == null ? 0 : typeName(localData, type)); - - ValueKind vk = getValueKind(namespace, type, val, generatedNs); - if (vk == null) { - tsc.value_index = ValueKind.CONSTANT_Undefined; - tsc.value_kind = ValueKind.CONSTANT_Undefined; - } else { - tsc.value_kind = vk.value_kind; - tsc.value_index = vk.value_index; - } - } - - if (item instanceof InterfaceAVM2Item) { - ABC abc = abcIndex.getSelectedAbc(); - TraitClass trait = (TraitClass) traits[k]; - InterfaceAVM2Item iitem = (InterfaceAVM2Item) item; - generateClass(iitem.pkg.getCpoolIndex(abcIndex), abc.class_info.get(trait.class_info), abc.instance_info.get(trait.class_info), initScopes.get(trait), iitem.pkg.name, localData, iitem, class_index); - } - - if (item instanceof ClassAVM2Item) { - ABC abc = abcIndex.getSelectedAbc(); - TraitClass trait = (TraitClass) traits[k]; - ClassAVM2Item citem = (ClassAVM2Item) item; - generateClass(citem.pkg.getCpoolIndex(abcIndex), abc.class_info.get(trait.class_info), abc.instance_info.get(trait.class_info), initScopes.get(trait), citem.pkg.name, localData, citem, class_index); - } - if ((item instanceof MethodAVM2Item) || (item instanceof GetterAVM2Item) || (item instanceof SetterAVM2Item)) { - MethodAVM2Item mai = (MethodAVM2Item) item; - if (!isScriptTraits && mai.isStatic() != generateStatic) { - continue; - } - for (List ln : mai.allOpenedNamespaces) { - for (NamespaceItem n : ln) { - n.resolveCustomNs(abcIndex, importedClasses, localData.pkg, ln, localData); - } - } - String suffix = null; - if (item instanceof GetterAVM2Item) { - suffix = "get"; - } - if (item instanceof SetterAVM2Item) { - suffix = "set"; - } - - ((TraitMethodGetterSetter) traits[k]).method_info = method(mai.isStatic(), methodName(mai.outsidePackage, localData.pkg, mai.functionName, mai.pkg, className, mai.customNamespace, suffix), false, isInterface, new ArrayList<>(), localData.pkg, mai.needsActivation, mai.subvariables, methodInitScope + (mai.isStatic() ? 0 : 1), mai.hasRest, mai.line, className, superName, false, localData, mai.paramTypes, mai.paramNames, mai.paramValues, mai.body, mai.retType); - } else if (item instanceof FunctionAVM2Item) { - FunctionAVM2Item fai = (FunctionAVM2Item) item; - ((TraitFunction) traits[k]).method_info = method(false, methodName(false/*?*/, localData.pkg, fai.functionName, fai.pkg, null, null, ""), false, isInterface, new ArrayList<>(), localData.pkg, fai.needsActivation, fai.subvariables, methodInitScope, fai.hasRest, fai.line, className, superName, false, localData, fai.paramTypes, fai.paramNames, fai.paramValues, fai.body, fai.retType); - } - } - } - - private int methodName(boolean outsidePkg, DottedChain pkg, String methodName, NamespaceItem ns, String className, String customNs, String typeSuffix) { - StringBuilder sb = new StringBuilder(); - /*if (ns != null) { - sb.append(ns.name.toRawString()); - }*/ - if (className != null) { - if (pkg != null && !pkg.isEmpty() && !pkg.isTopLevel()) { - sb.append(pkg.toRawString()); - sb.append(":"); - } - sb.append(className); - } - if (customNs != null) { - sb.append(customNs); - } else if (ns != null) { - switch (ns.kind) { - case Namespace.KIND_PACKAGE_INTERNAL: - sb.append(pkg == null ? "" /*?*/ : pkg.toRawString()); - break; - case Namespace.KIND_PRIVATE: - - if (!outsidePkg) { - sb.append("/private"); - } - break; - case Namespace.KIND_PROTECTED: - case Namespace.KIND_STATIC_PROTECTED: - sb.append("/protected"); - break; - } - } - sb.append("/"); - sb.append(methodName); - if (typeSuffix != null && !typeSuffix.isEmpty()) { - sb.append("/"); - sb.append(typeSuffix); - } - return abcIndex.getSelectedAbc().constants.getStringId(sb.toString(), true); - } - - public Trait[] generateTraitsPhase1(List importedClasses, List openedNamespaces, String className, String superName, boolean generateStatic, SourceGeneratorLocalData localData, List items, Traits ts, Reference classIndex, boolean isScriptTraits) throws AVM2ParseException, CompilationException { - Trait[] traits = new Trait[items.size()]; - int slot_id = 1; - int disp_id = 3; //1 and 2 are for constructor - for (int k = 0; k < items.size(); k++) { - GraphTargetItem item = items.get(k); - if (item instanceof InterfaceAVM2Item) { - TraitClass tc = new TraitClass(); - ClassInfo ci = new ClassInfo(); - InstanceInfo ii = new InstanceInfo(); - /*abc.class_info.add(ci); - abc.instance_info.add(ii);*/ - tc.class_info = classIndex.getVal(); - abcIndex.getSelectedAbc().addClass(ci, ii, classIndex.getVal()); - classIndex.setVal(classIndex.getVal() + 1); - ii.flags |= InstanceInfo.CLASS_INTERFACE; - //ii.name_index = traitName(((InterfaceAVM2Item) item).namespace, ((InterfaceAVM2Item) item).name); - //tc.class_info = abc.instance_info.size() - 1; - tc.kindType = Trait.TRAIT_CLASS; - //tc.name_index = traitName(((InterfaceAVM2Item) item).namespace, ((InterfaceAVM2Item) item).name); - tc.slot_id = 0; //? - ts.traits.add(tc); - traits[k] = tc; - traits[k].metadata = generateMetadata(((InterfaceAVM2Item) item).metadata, abcIndex.getSelectedAbc()); - if (traits[k].metadata.length > 0) { - traits[k].kindFlags |= Trait.ATTR_Metadata; - } - } - - if (item instanceof ClassAVM2Item) { - TraitClass tc = new TraitClass(); - ClassInfo ci = new ClassInfo(); - InstanceInfo ii = new InstanceInfo(); - //ii.name_index = traitName(((ClassAVM2Item) item).namespace, ((ClassAVM2Item) item).className); - /*abc.class_info.add(ci); - abc.instance_info.add(instanceInfo);*/ - tc.class_info = classIndex.getVal(); - abcIndex.getSelectedAbc().addClass(ci, ii, classIndex.getVal()); - classIndex.setVal(classIndex.getVal() + 1); - tc.kindType = Trait.TRAIT_CLASS; - // tc.name_index = traitName(((ClassAVM2Item) item).namespace, ((ClassAVM2Item) item).className); - tc.slot_id = slot_id++; - ts.traits.add(tc); - traits[k] = tc; - traits[k].metadata = generateMetadata(((ClassAVM2Item) item).metadata, abcIndex.getSelectedAbc()); - if (traits[k].metadata.length > 0) { - traits[k].kindFlags |= Trait.ATTR_Metadata; - } - } - if ((item instanceof SlotAVM2Item) || (item instanceof ConstAVM2Item)) { - TraitSlotConst tsc = new TraitSlotConst(); - tsc.kindType = (item instanceof SlotAVM2Item) ? Trait.TRAIT_SLOT : Trait.TRAIT_CONST; - String var = null; - //GraphTargetItem val = null; - GraphTargetItem type = null; - boolean isNamespace = false; - int namespace = 0; - boolean isStatic = false; - int[] metadata = new int[0]; - if (item instanceof SlotAVM2Item) { - SlotAVM2Item sai = (SlotAVM2Item) item; - if (!isScriptTraits && sai.isStatic() != generateStatic) { - continue; - } - var = sai.var; - //val = sai.value; - type = sai.type; - isStatic = sai.isStatic(); - if (sai.pkg != null) { - sai.pkg.resolveCustomNs(abcIndex, importedClasses, localData.pkg, openedNamespaces, localData); - } - namespace = sai.pkg == null ? 0 : sai.pkg.getCpoolIndex(abcIndex); - metadata = generateMetadata(((SlotAVM2Item) item).metadata, abcIndex.getSelectedAbc()); - } - boolean generatedNs = false; - if (item instanceof ConstAVM2Item) { - ConstAVM2Item cai = (ConstAVM2Item) item; - generatedNs = cai.generatedNs; - if (!isScriptTraits && cai.isStatic() != generateStatic) { - continue; - } - var = cai.var; - //val = cai.value; - type = cai.type; - if (cai.pkg != null) { - cai.pkg.resolveCustomNs(abcIndex, importedClasses, localData.pkg, openedNamespaces, localData); - } - namespace = cai.pkg == null ? 0 : cai.pkg.getCpoolIndex(abcIndex); - isNamespace = type.toString().equals("Namespace"); - isStatic = cai.isStatic(); - metadata = generateMetadata(((ConstAVM2Item) item).metadata, abcIndex.getSelectedAbc()); - } - if (isNamespace) { - tsc.name_index = traitName(namespace, var); - } - //tsc.type_index = isNamespace ? 0 : (type == null ? 0 : typeName(localData, type)); - - /*ValueKind vk = getValueKind(namespace, type, val, generatedNs); - if (vk == null) { - tsc.value_index = ValueKind.CONSTANT_Undefined; - tsc.value_kind = ValueKind.CONSTANT_Undefined; - } else { - tsc.value_kind = vk.value_kind; - tsc.value_index = vk.value_index; - }*/ - tsc.slot_id = !isScriptTraits && isStatic ? slot_id++ : 0; - ts.traits.add(tsc); - traits[k] = tsc; - traits[k].metadata = metadata; - if (traits[k].metadata.length > 0) { - traits[k].kindFlags |= Trait.ATTR_Metadata; - } - } - if ((item instanceof MethodAVM2Item) || (item instanceof GetterAVM2Item) || (item instanceof SetterAVM2Item)) { - MethodAVM2Item mai = (MethodAVM2Item) item; - if (!isScriptTraits && mai.isStatic() != generateStatic) { - continue; - } - TraitMethodGetterSetter tmgs = new TraitMethodGetterSetter(); - tmgs.kindType = (item instanceof GetterAVM2Item) ? Trait.TRAIT_GETTER : ((item instanceof SetterAVM2Item) ? Trait.TRAIT_SETTER : Trait.TRAIT_METHOD); - tmgs.disp_id = mai.isStatic() ? disp_id++ : 0; //For a reason, there is disp_id only for static methods (or not?) - if (mai.isFinal() || (className != null && mai.isStatic())) { - tmgs.kindFlags |= Trait.ATTR_Final; - } - if (mai.isOverride()) { - tmgs.kindFlags |= Trait.ATTR_Override; - } - ts.traits.add(tmgs); - - traits[k] = tmgs; - traits[k].metadata = generateMetadata(((MethodAVM2Item) item).metadata, abcIndex.getSelectedAbc()); - if (traits[k].metadata.length > 0) { - traits[k].kindFlags |= Trait.ATTR_Metadata; - } - } - /*else if (item instanceof FunctionAVM2Item) { - TraitFunction tf = new TraitFunction(); - tf.slot_id = slot_id++; - tf.kindType = Trait.TRAIT_FUNCTION; - //tf.name_index = traitName(((FunctionAVM2Item) item).namespace, ((FunctionAVM2Item) item).functionName); - ts.traits.add(tf); - traits[k] = tf; - traits[k].metadata = generateMetadata(((FunctionAVM2Item) item).metadata); - }*/ - - } - - return traits; - } - - public void generateScriptInfo(int scriptIndex, ScriptInfo scriptInfo, List> allOpenedNamespaces, SourceGeneratorLocalData localData, List commands, int classPos) throws AVM2ParseException, CompilationException { - Reference class_index = new Reference<>(classPos); - localData.currentScript = scriptInfo; - localData.scriptIndex = scriptIndex; - Trait[] traitArr = generateTraitsPhase1(new ArrayList<>(), new ArrayList<>(), null, null, true, localData, commands, scriptInfo.traits, class_index, true); - generateTraitsPhase2(new ArrayList<>(), null/*FIXME*/, commands, traitArr, new ArrayList<>(), localData); - abcIndex.refreshSelected(); - generateTraitsPhase3(commands, traitArr, localData); - abcIndex.refreshSelected(); - - ABC abc = abcIndex.getSelectedAbc(); - AVM2ConstantPool constants = abc.constants; - MethodInfo mi = new MethodInfo(new int[0], 0, constants.getStringId("", true), 0, new ValueKind[0], new int[0]); - MethodBody mb = new MethodBody(abc, new Traits(), new byte[0], new ABCException[0]); - mb.method_info = abc.addMethodInfo(mi); - mb.setCode(new AVM2Code()); - List mbCode = mb.getCode().code; - mbCode.add(ins(AVM2Instructions.GetLocal0)); - mbCode.add(ins(AVM2Instructions.PushScope)); - - int traitScope = 1; - - Map initScopes = new HashMap<>(); - - for (Trait t : scriptInfo.traits.traits) { - if (t instanceof TraitClass) { - TraitClass tc = (TraitClass) t; - DottedChain className = tc.getName(abc).getNameWithNamespace(abc.constants, true); - - List parents = new ArrayList<>(); - int[] nsset = new int[]{constants.getMultiname(tc.name_index).namespace_index}; - mbCode.add(ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createMultiname(false, constants.getMultiname(tc.name_index).name_index, constants.getNamespaceSetId(nsset, true)), true))); - traitScope++; - if (abc.instance_info.get(tc.class_info).isInterface()) { - mbCode.add(ins(AVM2Instructions.PushNull)); - } else { - - AbcIndexing.ClassIndex ci = abcIndex.findClass(AbcIndexing.multinameToType(abc.instance_info.get(tc.class_info).name_index, constants), null, null/*FIXME?*/); - while (ci != null && ci.parent != null) { - ci = ci.parent; - Multiname origM = ci.abc.constants.getMultiname(ci.abc.instance_info.get(ci.index).name_index); - Namespace origNs = ci.abc.constants.getNamespace(origM.namespace_index); - if (origM.kind == Multiname.QNAME || origM.kind == Multiname.QNAMEA) { - parents.add(constants.getMultinameId( - Multiname.createQName(origM.kind == Multiname.QNAMEA, - constants.getStringId(ci.abc.constants.getString(origM.name_index), true), - constants.getNamespaceId(origNs.kind, - ci.abc.constants.getString(origNs.name_index), 0, true)), true)); - } - } - - //add all parent objects to scopestack - for (int i = parents.size() - 1; i >= 0; i--) { - mbCode.add(ins(AVM2Instructions.GetLex, parents.get(i))); - mbCode.add(ins(AVM2Instructions.PushScope)); - traitScope++; - } - //direct parent class to new_class instruction - if (!parents.isEmpty()) { //NON EXISTING PARENT CLASS - TODO: handle as error! - mbCode.add(ins(AVM2Instructions.GetLex, parents.get(0))); - } - } - mbCode.add(ins(AVM2Instructions.NewClass, tc.class_info)); - for (int i = 0; i < parents.size(); i++) { - mbCode.add(ins(AVM2Instructions.PopScope)); - } - - mbCode.add(ins(AVM2Instructions.InitProperty, tc.name_index)); - initScopes.put(t, traitScope); - traitScope = 1; - } - } - - abc.addMethodBody(mb); - scriptInfo.init_index = mb.method_info; - localData.pkg = DottedChain.EMPTY; - generateTraitsPhase4(new ArrayList<>(), new ArrayList<>(), 1/*??*/, false, null, null, true, localData, commands, scriptInfo.traits, traitArr, initScopes, class_index, true); - - int maxSlotId = 0; - for (int k = 0; k < scriptInfo.traits.traits.size(); k++) { - if (scriptInfo.traits.traits.get(k) instanceof TraitSlotConst) { - TraitSlotConst ti = (TraitSlotConst) scriptInfo.traits.traits.get(k); - if (ti.slot_id > maxSlotId) { - maxSlotId = ti.slot_id; - } - } - } - for (int k = 0; k < scriptInfo.traits.traits.size(); k++) { - if ((scriptInfo.traits.traits.get(k) instanceof TraitMethodGetterSetter) && (commands.get(k) instanceof MethodAVM2Item)) { - MethodAVM2Item mai = (MethodAVM2Item) commands.get(k); - if (mai.outsidePackage) { - TraitMethodGetterSetter tmgs = (TraitMethodGetterSetter) scriptInfo.traits.traits.get(k); - TraitSlotConst nts = new TraitSlotConst(); - nts.name_index = scriptInfo.traits.traits.get(k).name_index; - nts.metadata = scriptInfo.traits.traits.get(k).metadata; - - nts.slot_id = maxSlotId + 1; - maxSlotId++; - nts.type_index = abcIndex.getSelectedAbc().constants.getQnameId("Function", Namespace.KIND_PACKAGE, "", true); - nts.value_index = 0; - nts.value_kind = 0; - int methodinfo = tmgs.method_info; - scriptInfo.traits.traits.set(k, nts); - mbCode.add(ins(AVM2Instructions.NewFunction, methodinfo)); - mbCode.add(ins(AVM2Instructions.InitProperty, nts.name_index)); - } - } - } - - mbCode.add(ins(AVM2Instructions.ReturnVoid)); - mb.autoFillStats(abc, 1, false); - - } - - public static void parentNamesAddNames(AbcIndexing abc, int name_index, List indices, List names, List namespaces) { - List cindices = new ArrayList<>(); - - List outABCs = new ArrayList<>(); - parentNames(abc, name_index, cindices, names, namespaces, outABCs); - for (int i = 0; i < cindices.size(); i++) { - ABC a = outABCs.get(i); - int m = cindices.get(i); - if (a == abc.getSelectedAbc()) { - indices.add(m); - continue; - } - Multiname superName = a.constants.getMultiname(m); - indices.add( - abc.getSelectedAbc().constants.getMultinameId( - Multiname.createQName(false, - abc.getSelectedAbc().constants.getStringId(superName.getName(a.constants, null, true, true /*FIXME!!! ???*/), true), - abc.getSelectedAbc().constants.getNamespaceId(superName.getNamespace(a.constants).kind, superName.getNamespace(a.constants).getName(a.constants), 0, true)), true) - ); - } - } - - public static GraphTargetItem getTraitReturnType(AbcIndexing abc, Trait t) { - if (t instanceof TraitSlotConst) { - TraitSlotConst tsc = (TraitSlotConst) t; - if (tsc.type_index == 0) { - return TypeItem.UNBOUNDED; - } - return AbcIndexing.multinameToType(tsc.type_index, abc.getSelectedAbc().constants); - } - if (t instanceof TraitMethodGetterSetter) { - TraitMethodGetterSetter tmgs = (TraitMethodGetterSetter) t; - if (tmgs.kindType == Trait.TRAIT_GETTER) { - return AbcIndexing.multinameToType(abc.getSelectedAbc().method_info.get(tmgs.method_info).ret_type, abc.getSelectedAbc().constants); - } - if (tmgs.kindType == Trait.TRAIT_SETTER) { - if (abc.getSelectedAbc().method_info.get(tmgs.method_info).param_types.length > 0) { - return AbcIndexing.multinameToType(abc.getSelectedAbc().method_info.get(tmgs.method_info).param_types[0], abc.getSelectedAbc().constants); - } else { - return TypeItem.UNBOUNDED; - } - } - } - if (t instanceof TraitFunction) { - return new TypeItem(DottedChain.FUNCTION); - } - return TypeItem.UNBOUNDED; - } - - public static boolean searchPrototypeChain(Integer namespaceSuffix, List otherNs, int privateNs, int protectedNs, boolean instanceOnly, AbcIndexing abc, DottedChain pkg, String obj, String propertyName, Reference outName, Reference outNs, Reference outPropNs, Reference outPropNsKind, Reference outPropNsIndex, Reference outPropType, Reference outPropValue, Reference outPropValueAbc, Reference isType) { - // private and protected namespaces first so we find overriding functions before overridden functions - if (namespaceSuffix != null) { - if (searchPrototypeChain(namespaceSuffix, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { - return true; - } - } - if (searchPrototypeChain(privateNs, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { - return true; - } - if (searchPrototypeChain(protectedNs, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { - return true; - } - - for (int ns : otherNs) { - if (searchPrototypeChain(ns, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { - return true; - } - } - - return searchPrototypeChain(0, instanceOnly, abc, pkg, obj, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType); - } - - private static boolean searchPrototypeChain(int selectedNs, boolean instanceOnly, AbcIndexing abc, DottedChain pkg, String obj, String propertyName, Reference outName, Reference outNs, Reference outPropNs, Reference outPropNsKind, Reference outPropNsIndex, Reference outPropType, Reference outPropValue, Reference outPropValueAbc, Reference isType) { - isType.setVal(false); - AbcIndexing.TraitIndex sp = abc.findScriptProperty(pkg.addWithSuffix(propertyName)); - if (sp == null) { - sp = abc.findProperty(new AbcIndexing.PropertyDef(propertyName, new TypeItem(pkg.addWithSuffix(obj)), abc.getSelectedAbc(), selectedNs), !instanceOnly, true, true); - } - if (sp != null) { - if (sp.trait instanceof TraitClass) { - isType.setVal(true); - } - if (sp.objType instanceof TypeItem) { - outName.setVal(((TypeItem) sp.objType).fullTypeName.getLast()); - outNs.setVal(((TypeItem) sp.objType).fullTypeName.getWithoutLast()); - } else { - //FIXME? Vector? - } - outPropNs.setVal(sp.trait.getName(sp.abc).getNamespace(sp.abc.constants).getName(sp.abc.constants)); - outPropNsKind.setVal(sp.trait.getName(sp.abc).getNamespace(sp.abc.constants).kind); - int nsi = sp.trait.getName(sp.abc).namespace_index; - outPropNsIndex.setVal(sp.abc == abc.getSelectedAbc() ? sp.abc.constants.getNamespaceSubIndex(nsi) : 0); - outPropType.setVal(sp.returnType); - outPropValue.setVal(sp.value); - outPropValueAbc.setVal(sp.abc); - return true; - } - return false; - } - - public static void parentNames(AbcIndexing abc, int name_index, List indices, List names, List namespaces, List outABCs) { - AbcIndexing.ClassIndex ci = abc.findClass(new TypeItem(abc.getSelectedAbc().constants.getMultiname(name_index).getNameWithNamespace(abc.getSelectedAbc().constants, true /*FIXME!!*/)), null, null/*FIXME?*/); - while (ci != null) { - int ni = ci.abc.instance_info.get(ci.index).name_index; - indices.add(ni); - outABCs.add(ci.abc); - names.add(ci.abc.constants.getMultiname(ni).getName(ci.abc.constants, null, true, true/*FIXME!!*/)); - namespaces.add(ci.abc.constants.getMultiname(ni).getNamespace(ci.abc.constants).getName(ci.abc.constants).toRawString()); - ci = ci.parent; - } - } - - /* public void calcRegisters(Reference activationReg, SourceGeneratorLocalData localData, boolean needsActivation, List funParamNames,List funSubVariables,List funBody, Reference hasArguments) throws ParseException { - - }*/ - /*public int resolveType(String objType) { - if (objType.equals("*")) { - return 0; - } - List abcs = new ArrayList<>(); - abcs.add(abc); - abcs.addAll(allABCs); - for (ABC a : abcs) { - int ci = a.findClassByName(objType); - if (ci != -1) { - Multiname tname = a.instance_info.get(ci).getName(a.constants); - return abc.getLastAbc().constants.getMultinameId(new Multiname(tname.kind, - abc.getLastAbc().constants.getStringId(tname.getName(a.constants, new ArrayList<>()), true), - abc.getLastAbc().constants.getNamespaceId(new Namespace(tname.getNamespace(a.constants).kind, abc.getLastAbc().constants.getStringId(tname.getNamespace(a.constants).getName(a.constants), true)), 0, true), 0, 0, new ArrayList()), true); - } - } - return 0; - }*/ @Override public List generate(SourceGeneratorLocalData localData, TypeItem item) throws CompilationException { String currentFullClassName = localData.getFullClass(); @@ -2834,108 +2911,7 @@ public class AVM2SourceGenerator implements SourceGenerator { } else { return GraphTargetItem.toSourceMerge(localData, this, ins(AVM2Instructions.GetLex, resolveType(localData, item, abcIndex))); } - } - - public static int resolveType(SourceGeneratorLocalData localData, GraphTargetItem item, AbcIndexing abcIndex) throws CompilationException { - int name_index = 0; - GraphTargetItem typeItem = null; - - if (item instanceof UnresolvedAVM2Item) { - String fullClass = localData.getFullClass(); - item = ((UnresolvedAVM2Item) item).resolve(localData, localData.currentClass, new TypeItem(fullClass), new ArrayList<>(), new ArrayList<>(), abcIndex, new ArrayList<>(), new ArrayList<>()); - } - if (item instanceof TypeItem) { - typeItem = item; - } else if (item instanceof ApplyTypeAVM2Item) { - typeItem = ((ApplyTypeAVM2Item) item).object; - } else if (item instanceof ImportedSlotConstItem) { - typeItem = ((ImportedSlotConstItem) item).type; - } else { - throw new CompilationException("Invalid type:" + item + " (" + item.getClass().getName() + ")", 0/*??*/); - } - if (typeItem instanceof UnresolvedAVM2Item) { - String fullClass = localData.getFullClass(); - typeItem = ((UnresolvedAVM2Item) typeItem).resolve(localData, localData.currentClass, new TypeItem(fullClass), new ArrayList<>(), new ArrayList<>(), abcIndex, new ArrayList<>(), new ArrayList<>()); - } - - if (!(typeItem instanceof TypeItem)) { - throw new CompilationException("Invalid type", 0/*??*/); - } - - TypeItem type = (TypeItem) typeItem; - - DottedChain dname = type.fullTypeName; - DottedChain pkg = dname.getWithoutLast(); - String name = dname.getLast(); - /*for (InstanceInfo ii : abc.getSelectedAbc().instance_info) { - Multiname mname = abc.getSelectedAbc().constants.constant_multiname.get(ii.name_index); - if (mname != null && name.equals(mname.getName(abc.getSelectedAbc().constants, null, true))) { - Namespace ns = mname.getNamespace(abc.getSelectedAbc().constants); - if (ns != null && ns.hasName(pkg, abc.getSelectedAbc().constants)) { - name_index = ii.name_index; - break; - } - } - }*/ - ABC abc = abcIndex.getSelectedAbc(); - AVM2ConstantPool constants = abc.constants; - AbcIndexing.ClassIndex ci = abcIndex.findClass(new TypeItem(dname), null, null/*FIXME?*/); - if (ci != null) { - Multiname m = ci.abc.instance_info.get(ci.index).getName(ci.abc.constants); - if (m != null) { - Namespace ns = ci.abc.instance_info.get(ci.index).getName(ci.abc.constants).getNamespace(ci.abc.constants); - String n = m.getName(ci.abc.constants, new ArrayList<>(), true, true /*FIXME!!*/); - String nsn = ns == null ? null : ns.getRawName(ci.abc.constants); - name_index = constants.getQnameId( - n, - ns == null ? Namespace.KIND_PACKAGE : ns.kind, - nsn, true); - } - } - - String pkgRaw = pkg.toRawString(); - for (int i = 1; i < constants.getMultinameCount(); i++) { - Multiname mname = constants.getMultiname(i); - if (mname != null && name.equals(mname.getName(constants, null, true, true /*FIXME!!*/))) { - if (mname.getNamespace(constants) != null && Objects.equals(pkgRaw, mname.getNamespace(constants).getRawName(constants))){ - name_index = i; - break; - } - } - } - if (name_index == 0) { - if (pkg.isEmpty() && localData.currentScript != null /*FIXME!*/) { - for (Trait t : localData.currentScript.traits.traits) { - if (t.getName(abc).getName(constants, null, true, true /*FIXME!!*/).equals(name)) { - name_index = t.name_index; - break; - } - } - } - if (name_index == 0) { - name_index = constants.getMultinameId(Multiname.createQName(false, constants.getStringId(name, true), constants.getNamespaceId(Namespace.KIND_PACKAGE, pkg, 0, true)), true); - } - } - - if (item instanceof ApplyTypeAVM2Item) { - ApplyTypeAVM2Item atype = (ApplyTypeAVM2Item) item; - int[] params = new int[atype.params.size()]; - int i = 0; - for (GraphTargetItem s : atype.params) { - params[i++] = (s instanceof NullAVM2Item) ? 0 : resolveType(localData, s, abcIndex); - } - return constants.getMultinameId(Multiname.createTypeName(name_index, params), true); - } - - return name_index; - } - - @Override - public List generateDiscardValue(SourceGeneratorLocalData localData, GraphTargetItem item) throws CompilationException { - List ret = item.toSource(localData, this); - ret.add(ins(AVM2Instructions.Pop)); - return ret; - } + } @Override public List generate(SourceGeneratorLocalData localData, PushItem item) throws CompilationException { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AbcIndexing.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AbcIndexing.java index 2f065bd11..a899527c3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AbcIndexing.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AbcIndexing.java @@ -47,8 +47,6 @@ import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.WeakHashMap; -import java.util.logging.Level; -import java.util.logging.Logger; /** * Indexing of ABCs for faster access. Indexes ABC classes for faster class and @@ -161,7 +159,7 @@ public final class AbcIndexing { int builtInIndex = -1; if (abc != null) { Integer builtInNs = builtInNsPerAbc.get(abc); - + if (builtInNs == null) { builtInIndex = abc.constants.getNamespaceId(Namespace.KIND_NAMESPACE, BUILT_IN_NS, 0, true); builtInNsPerAbc.put(abc, builtInIndex); @@ -324,16 +322,17 @@ public final class AbcIndexing { } private static class ClassDef { + public GraphTargetItem type; public DottedChain pkg; private GraphTargetItem noNsType(GraphTargetItem type) { - TypeItem ti = (TypeItem)type; - ti = (TypeItem)ti.clone(); + TypeItem ti = (TypeItem) type; + ti = (TypeItem) ti.clone(); ti.ns = null; return ti; } - + public ClassDef(GraphTargetItem type, ABC abc, Integer scriptIndex) { this.type = type; if (scriptIndex != null) { @@ -433,7 +432,7 @@ public final class AbcIndexing { } private Map> pkgToObjectsName = new LinkedHashMap<>(); - + private final Map classes = new HashMap<>(); private final Map instanceProperties = new HashMap<>(); @@ -445,26 +444,26 @@ public final class AbcIndexing { private final Map classNsProperties = new HashMap<>(); private final Map scriptProperties = new HashMap<>(); - + public void rebuildPkgToObjectsNameMap() { pkgToObjectsName.clear(); - for (ClassDef cd:classes.keySet()) { + for (ClassDef cd : classes.keySet()) { if (!(cd.type instanceof TypeItem)) { continue; } if (!pkgToObjectsName.containsKey(cd.pkg)) { pkgToObjectsName.put(cd.pkg, new LinkedHashSet<>()); - } - pkgToObjectsName.get(cd.pkg).add(((TypeItem)cd.type).fullTypeName.getLast()); + } + pkgToObjectsName.get(cd.pkg).add(((TypeItem) cd.type).fullTypeName.getLast()); } - for (PropertyNsDef nsdef:scriptProperties.keySet()) { + for (PropertyNsDef nsdef : scriptProperties.keySet()) { if (!pkgToObjectsName.containsKey(nsdef.ns)) { pkgToObjectsName.put(nsdef.ns, new LinkedHashSet<>()); } pkgToObjectsName.get(nsdef.ns).add(nsdef.propName); } } - + public Set getPackageObjects(DottedChain pkg) { Set classNames = new LinkedHashSet<>(); if (pkgToObjectsName.containsKey(pkg)) { @@ -584,7 +583,7 @@ public final class AbcIndexing { if (ret != null) { return ret; } - } + } } //now search instance @@ -842,7 +841,7 @@ public final class AbcIndexing { } } abcs.add(abc); - selectedAbc = abc; + selectedAbc = abc; } public void selectAbc(ABC abc) { @@ -870,7 +869,7 @@ public final class AbcIndexing { } return null; } - + public boolean isInstanceOf(ABC abc, int classIndex, DottedChain searchClassName) { DottedChain clsName = abc.instance_info.get(classIndex).getName(abc.constants).getNameWithNamespace(abc.constants, false); if (searchClassName.equals(clsName)) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java index fbe58f104..38f55f4ad 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScript3Parser.java @@ -129,7 +129,6 @@ import java.util.Map; import java.util.Stack; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.regex.Pattern; /** * @@ -145,8 +144,6 @@ public class ActionScript3Parser { private final AbcIndexing abcIndex; -// private final AbcIndexing otherABCs; - //private static final List playerABCs = new ArrayList<>(); private long uniqId() { uniqLast++; return uniqLast; @@ -612,13 +609,14 @@ public class ActionScript3Parser { } expected(s, lexer.yyline(), SymbolType.BRACKET_CLOSE); s = lex(); - - /** - * Skip Embed metadata - these are loaded automatically by the assignment in SymbolClass tag + + /* + * Skip Embed metadata - these are loaded automatically by the + * assignment in SymbolClass tag */ if (!"Embed".equals(name)) { metadata.add(en); - } + } } lexer.pushback(s); return metadata; @@ -633,7 +631,6 @@ public class ActionScript3Parser { NamespaceItem packageInternalNs = new NamespaceItem(pkg.name, Namespace.KIND_PACKAGE_INTERNAL); NamespaceItem interfaceNs = new NamespaceItem(pkg.name.toRawString().isEmpty() ? classNameStr : pkg.name.toRawString() + ":" + classNameStr, Namespace.KIND_NAMESPACE); - openedNamespaces = new ArrayList<>(openedNamespaces); allOpenedNamespaces.add(openedNamespaces); for (List ln : allOpenedNamespaces) { @@ -728,14 +725,14 @@ public class ActionScript3Parser { if (isInterface) { throw new AVM2ParseException("Interface members cannot be declared public, private, protected, or internal", lexer.yyline()); } - break; - case PREPROCESSOR: - if (((String)s.value).toLowerCase().equals("namespace")) { - expectedType(SymbolType.PARENT_OPEN); - s = lex(); - expected(s, lexer.yyline(), SymbolType.STRING); - namespace = new NamespaceItem((String)s.value, Namespace.KIND_NAMESPACE); - expectedType(SymbolType.PARENT_CLOSE); + break; + case PREPROCESSOR: + if (((String) s.value).toLowerCase().equals("namespace")) { + expectedType(SymbolType.PARENT_OPEN); + s = lex(); + expected(s, lexer.yyline(), SymbolType.STRING); + namespace = new NamespaceItem((String) s.value, Namespace.KIND_NAMESPACE); + expectedType(SymbolType.PARENT_CLOSE); } else { lexer.pushback(s); } @@ -743,11 +740,11 @@ public class ActionScript3Parser { } s = lex(); } - + if (isInterface) { namespace = interfaceNs; } - + if (namespace == null && customNs == null) { namespace = packageInternalNs; } @@ -806,45 +803,42 @@ public class ActionScript3Parser { if (classNameStr == null) { isStatic = true; } - { - - s = lex(); - if (s.type == SymbolType.NAMESPACESUFFIX) { - namespace = new NamespaceItem((Integer) s.value); - } else { - lexer.pushback(s); - } - - MethodAVM2Item ft = method(allOpenedNamespaces, outsidePackage, isPrivate, metadata, namespace, isInterface, customNs, new Reference<>(false), importedClasses, isOverride, isFinal, thisType, openedNamespaces, isStatic, fname, true, new ArrayList<>()); - - if (isGetter) { - if (!ft.paramTypes.isEmpty()) { - throw new AVM2ParseException("Getter can't have any parameters", lexer.yyline()); - } - } - - if (isSetter) { - if (ft.paramTypes.size() != 1) { - throw new AVM2ParseException("Getter must have exactly one parameter", lexer.yyline()); - } - } - - if (isStatic && isInterface) { - if (isInterface) { - throw new AVM2ParseException("Interface cannot have static fields", lexer.yyline()); - } - } - if (isGetter) { - GetterAVM2Item g = new GetterAVM2Item(allOpenedNamespaces, outsidePackage, ft.isPrivate(), ft.metadata, ft.pkg, isInterface, customNs, ft.needsActivation, ft.hasRest, ft.line, ft.isOverride(), ft.isFinal(), isStatic, ft.functionName, ft.paramTypes, ft.paramNames, ft.paramValues, ft.body, ft.subvariables, ft.retType); - t = g; - } else if (isSetter) { - SetterAVM2Item st = new SetterAVM2Item(allOpenedNamespaces, outsidePackage, ft.isPrivate(), ft.metadata, ft.pkg, isInterface, customNs, ft.needsActivation, ft.hasRest, ft.line, ft.isOverride(), ft.isFinal(), isStatic, ft.functionName, ft.paramTypes, ft.paramNames, ft.paramValues, ft.body, ft.subvariables, ft.retType); - t = st; - } else { - t = ft; - } - + + s = lex(); + if (s.type == SymbolType.NAMESPACESUFFIX) { + namespace = new NamespaceItem((Integer) s.value); + } else { + lexer.pushback(s); } + + MethodAVM2Item ft = method(allOpenedNamespaces, outsidePackage, isPrivate, metadata, namespace, isInterface, customNs, new Reference<>(false), importedClasses, isOverride, isFinal, thisType, openedNamespaces, isStatic, fname, true, new ArrayList<>()); + + if (isGetter) { + if (!ft.paramTypes.isEmpty()) { + throw new AVM2ParseException("Getter can't have any parameters", lexer.yyline()); + } + } + + if (isSetter) { + if (ft.paramTypes.size() != 1) { + throw new AVM2ParseException("Getter must have exactly one parameter", lexer.yyline()); + } + } + + if (isStatic && isInterface) { + if (isInterface) { + throw new AVM2ParseException("Interface cannot have static fields", lexer.yyline()); + } + } + if (isGetter) { + GetterAVM2Item g = new GetterAVM2Item(allOpenedNamespaces, outsidePackage, ft.isPrivate(), ft.metadata, ft.pkg, isInterface, customNs, ft.needsActivation, ft.hasRest, ft.line, ft.isOverride(), ft.isFinal(), isStatic, ft.functionName, ft.paramTypes, ft.paramNames, ft.paramValues, ft.body, ft.subvariables, ft.retType); + t = g; + } else if (isSetter) { + SetterAVM2Item st = new SetterAVM2Item(allOpenedNamespaces, outsidePackage, ft.isPrivate(), ft.metadata, ft.pkg, isInterface, customNs, ft.needsActivation, ft.hasRest, ft.line, ft.isOverride(), ft.isFinal(), isStatic, ft.functionName, ft.paramTypes, ft.paramNames, ft.paramValues, ft.body, ft.subvariables, ft.retType); + t = st; + } else { + t = ft; + } //NOTE: Looks like TraitFunction does not work in FlashPlayer - use MethodTrait instead /*else { t = function(metadata, pkg, isInterface, new Reference(false), importedClasses, namespace, thisType, openedNamespaces, fname, false, new ArrayList()); @@ -1265,14 +1259,14 @@ public class ActionScript3Parser { private GraphTargetItem add(Object a, Object b) { GraphTargetItem ta = add(a); GraphTargetItem tb = add(b); - + if ((ta instanceof StringAVM2Item) && (tb instanceof StringAVM2Item)) { - String sa = ((StringAVM2Item)ta).getValue(); - String sb = ((StringAVM2Item)tb).getValue(); - + String sa = ((StringAVM2Item) ta).getValue(); + String sb = ((StringAVM2Item) tb).getValue(); + return new StringAVM2Item(ta.getSrc(), ta.getLineStartItem(), sa + sb); } - + if (ta == null && tb == null) { return null; } @@ -1325,7 +1319,7 @@ public class ActionScript3Parser { sb.append("\""); expectedType(SymbolType.CURLY_CLOSE); lexer.yybegin(ActionScriptLexer.XMLOPENTAG); - break; + break; case XML_VAR_BEGIN: // {...} esc_xelem usesVars.setVal(true); addS(rets, sb); @@ -1342,18 +1336,18 @@ public class ActionScript3Parser { expectedType(SymbolType.CURLY_CLOSE); lexer.begin(ActionScriptLexer.XMLCLOSETAGFINISH); s = lex(); - while(s.isType(SymbolType.XML_TEXT)) { + while (s.isType(SymbolType.XML_TEXT)) { sb.append(s.value); s = lex(); } expected(s, lexer.yyline(), SymbolType.GREATER_THAN); sb.append(">"); addS(rets, sb); - + if (openedTags.isEmpty()) { throw new AVM2ParseException("XML : Closing unopened tag", lexer.yyline()); } - openedTags.remove(openedTags.size() - 1); + openedTags.remove(openedTags.size() - 1); break; case XML_STARTVARTAG_BEGIN: // <{...}> add GraphTargetItem ex = expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables, false); @@ -1363,7 +1357,7 @@ public class ActionScript3Parser { sb.append("<"); addS(rets, sb); rets.add(ex); - rets.addAll(xmltag(allOpenedNamespaces, thisType, pkg, subusesvars, sub, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, variables)); + rets.addAll(xmltag(allOpenedNamespaces, thisType, pkg, subusesvars, sub, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, variables)); break; case XML_STARTTAG_BEGIN: // sub.add(s.value.toString().trim().substring(1)); //remove < from beginning @@ -1401,7 +1395,7 @@ public class ActionScript3Parser { } private GraphTargetItem xml(List> allOpenedNamespaces, TypeItem thisType, NamespaceItem pkg, Reference needsActivation, List importedClasses, List openedNamespaces, HashMap registerVars, boolean inFunction, boolean inMethod, List variables) throws IOException, AVM2ParseException, InterruptedException { - List openedTags = new ArrayList<>(); + List openedTags = new ArrayList<>(); List xmlParts = xmltag(allOpenedNamespaces, thisType, pkg, new Reference<>(false), openedTags, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, variables); lexer.setEnableWhiteSpace(true); lexer.begin(ActionScriptLexer.YYINITIAL); @@ -1409,7 +1403,7 @@ public class ActionScript3Parser { while (s.isType(SymbolType.XML_WHITESPACE)) { addS(xmlParts, new StringBuilder(s.value.toString())); s = lexer.lex(); - } + } lexer.setEnableWhiteSpace(false); lexer.pushback(s); GraphTargetItem ret = add(xmlParts); @@ -1466,7 +1460,7 @@ public class ActionScript3Parser { case WITH: needsActivation.setVal(true); expectedType(SymbolType.PARENT_OPEN); - GraphTargetItem wvar = expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables, false);//(name(allOpenedNamespaces, thisType,false, openedNamespaces, registerVars, inFunction, inMethod, variables)); + GraphTargetItem wvar = expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, true, variables, false); if (!isNameOrProp(wvar)) { throw new AVM2ParseException("Not a property or name", lexer.yyline()); } @@ -1550,7 +1544,7 @@ public class ActionScript3Parser { if (ss2.type == SymbolType.PARENT_OPEN) { List args = call(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, variables); ret = new ConstructSuperAVM2Item(null, null, new LocalRegAVM2Item(null, null, 0, null, new TypeItem("Object") /*?*/), args); - } else {//no costructor call, but it could be calling parent methods... => handle in expression + } else { //no costructor call, but it could be calling parent methods... => handle in expression lexer.pushback(ss2); lexer.pushback(s); } @@ -1754,7 +1748,7 @@ public class ActionScript3Parser { } else { lexer.pushback(s); for (int i = loops.size() - 1; i >= 0; i--) { - if (loops.get(i).id >= 0) {//no switches + if (loops.get(i).id >= 0) { //no switches cloopId = loops.get(i).id; break; } @@ -1825,7 +1819,7 @@ public class ActionScript3Parser { } } - variables.addAll(newVariables); + variables.addAll(newVariables); catchCommands.add(cc); s = lex(); @@ -1900,11 +1894,7 @@ public class ActionScript3Parser { return ret; - } - - private GraphTargetItem expression(List> allOpenedNamespaces, TypeItem thisType, NamespaceItem pkg, Reference needsActivation, List importedClasses, List openedNamespaces, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder, List variables, boolean allowComma) throws IOException, AVM2ParseException, InterruptedException { - return expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, allowRemainder, variables, allowComma); - } + } /*private GraphTargetItem expressionRemainder(TypeItem thisType, String pkg, Reference needsActivation, List openedNamespaces, GraphTargetItem expr, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder, List variables, List importedClasses) throws IOException, AVM2ParseException { GraphTargetItem ret = null; @@ -1959,6 +1949,10 @@ public class ActionScript3Parser { } return arrCnt; } + + private GraphTargetItem expression(List> allOpenedNamespaces, TypeItem thisType, NamespaceItem pkg, Reference needsActivation, List importedClasses, List openedNamespaces, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder, List variables, boolean allowComma) throws IOException, AVM2ParseException, InterruptedException { + return expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, allowRemainder, variables, allowComma); + } private GraphTargetItem expression(List> allOpenedNamespaces, TypeItem thisType, NamespaceItem pkg, Reference needsActivation, List importedClasses, List openedNamespaces, boolean allowEmpty, HashMap registerVars, boolean inFunction, boolean inMethod, boolean allowRemainder, List variables, boolean allowComma) throws IOException, AVM2ParseException, InterruptedException { @@ -2153,7 +2147,7 @@ public class ActionScript3Parser { lhs = new InstanceOfAVM2Item(null, null, lhs, rhs); break; case IS: - GraphTargetItem istype = rhs;//type(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces, variables); + GraphTargetItem istype = rhs; lhs = new IsTypeAVM2Item(null, null, lhs, istype); break; case ASSIGN: @@ -2171,7 +2165,7 @@ public class ActionScript3Parser { case ASSIGN_AND: case ASSIGN_OR: GraphTargetItem assigned = rhs; - switch (op.type) { + switch (op.type) { case ASSIGN_BITAND: assigned = new BitAndAVM2Item(null, null, lhs, assigned); break; @@ -2229,7 +2223,7 @@ public class ActionScript3Parser { ((NameAVM2Item) lhs).setDefinition(false); } lhs = as; - break; + break; } } if (lhs instanceof ParenthesisItem) { @@ -2439,7 +2433,7 @@ public class ActionScript3Parser { allowMemberOrCall = true; // 5.2.toString(); break; case DELETE: - GraphTargetItem varDel = expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, true, variables);//name(allOpenedNamespaces, thisType,false, openedNamespaces, registerVars, inFunction, inMethod, variables); + GraphTargetItem varDel = expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, true, variables); if (!isNameOrProp(varDel)) { throw new AVM2ParseException("Not a property or name", lexer.yyline()); } @@ -2447,7 +2441,7 @@ public class ActionScript3Parser { break; case INCREMENT: case DECREMENT: //preincrement - GraphTargetItem varincdec = expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, false/*?*/, variables);//name(allOpenedNamespaces, thisType,false, openedNamespaces, registerVars, inFunction, inMethod, variables); + GraphTargetItem varincdec = expressionPrimary(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, false, registerVars, inFunction, inMethod, false/*?*/, variables); if (!isNameOrProp(varincdec)) { throw new AVM2ParseException("Not a property or name", lexer.yyline()); } @@ -2630,7 +2624,7 @@ public class ActionScript3Parser { abcIndex.getSelectedAbc().script_info.remove(si); throw ex; } - + abcIndex.getSelectedAbc().fireChanged(); } @@ -2679,7 +2673,7 @@ public class ActionScript3Parser { abcIndex.selectAbc(abc); ActionScript3Parser parser = new ActionScript3Parser(abcIndex); parser.addScript(new String(Helper.readFile(src), Utf8Helper.charset), src, classPos, scriptIndex); - try ( OutputStream fos = new BufferedOutputStream(new FileOutputStream(new File(dst)))) { + try (OutputStream fos = new BufferedOutputStream(new FileOutputStream(new File(dst)))) { abc.saveToStream(fos); } } catch (Exception ex) { 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 dcb6de6dc..c3fba1bfd 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 @@ -15,921 +15,961 @@ * License along with this library. */ package com.jpexs.decompiler.flash.abc.avm2.parser.script; + import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException; import java.io.StringReader; +import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import java.util.Stack; -import java.math.BigInteger; - /** - * This class is a scanner generated by - * JFlex 1.6.0 - * from the specification file C:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript3_script.flex + * This class is a scanner generated by + * JFlex 1.6.0 from the specification file + * C:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript3_script.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 XMLCLOSETAGFINISH = 8; - public static final int XMLOPENTAGATTRIB = 10; - public static final int XMLINSTR = 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; - public static final int XMLCDATAALONE = 22; - public static final int XMLCOMMENTALONE = 24; + /** + * 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 XMLCLOSETAGFINISH = 8; + public static final int XMLOPENTAGATTRIB = 10; + public static final int XMLINSTR = 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; + public static final int XMLCDATAALONE = 22; + public static final int XMLCOMMENTALONE = 24; - /** - * 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, 11, 11, 12, 12 - }; + /** + * 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, 11, 11, 12, 12 + }; - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED = - "\11\0\1\13\1\2\1\113\1\3\1\1\22\0\1\13\1\14\1\34"+ - "\1\50\1\6\1\111\1\106\1\35\1\77\1\100\1\5\1\45\1\104"+ - "\1\15\1\11\1\4\1\36\3\42\4\42\2\22\1\17\1\103\1\12"+ - "\1\33\1\16\1\24\1\112\1\30\1\20\1\26\1\27\1\43\1\20"+ - "\2\10\1\75\4\10\1\76\5\10\1\31\3\10\1\40\2\10\1\25"+ - "\1\46\1\32\1\110\1\10\1\0\1\53\1\51\1\55\1\64\1\44"+ - "\1\41\1\74\1\67\1\62\1\21\1\54\1\65\1\72\1\60\1\57"+ - "\1\70\1\21\1\52\1\56\1\61\1\63\1\73\1\66\1\37\1\71"+ - "\1\21\1\101\1\107\1\102\1\105\6\0\1\113\41\0\1\47\2\0"+ - "\1\6\12\0\1\6\1\0\1\23\2\0\1\6\5\0\27\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\113\1\113\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\113\1\3\1\1\22\0\1\13\1\14\1\34" + + "\1\50\1\6\1\111\1\106\1\35\1\77\1\100\1\5\1\45\1\104" + + "\1\15\1\11\1\4\1\36\3\42\4\42\2\22\1\17\1\103\1\12" + + "\1\33\1\16\1\24\1\112\1\30\1\20\1\26\1\27\1\43\1\20" + + "\2\10\1\75\4\10\1\76\5\10\1\31\3\10\1\40\2\10\1\25" + + "\1\46\1\32\1\110\1\10\1\0\1\53\1\51\1\55\1\64\1\44" + + "\1\41\1\74\1\67\1\62\1\21\1\54\1\65\1\72\1\60\1\57" + + "\1\70\1\21\1\52\1\56\1\61\1\63\1\73\1\66\1\37\1\71" + + "\1\21\1\101\1\107\1\102\1\105\6\0\1\113\41\0\1\47\2\0" + + "\1\6\12\0\1\6\1\0\1\23\2\0\1\6\5\0\27\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\113\1\113\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 = - "\15\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"+ - "\1\1\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\46\2\47\1\42\2\1"+ - "\1\50\1\51\1\42\1\52\1\1\1\53\3\42\2\54"+ - "\2\42\1\55\1\56\1\1\1\57\2\42\1\0\1\60"+ - "\1\0\1\61\1\0\1\62\1\63\1\64\1\65\1\66"+ - "\1\67\1\70\1\0\1\71\1\72\1\73\1\74\1\75"+ - "\1\76\1\77\1\100\1\0\1\101\1\65\1\102\1\0"+ - "\7\6\1\103\1\104\1\0\2\105\2\6\1\106\16\6"+ - "\1\107\1\110\1\111\4\6\1\112\13\6\1\113\1\114"+ - "\1\115\1\116\1\117\1\120\1\121\1\122\1\123\1\121"+ - "\1\124\1\125\1\126\1\127\1\130\1\131\1\121\1\132"+ - "\1\0\1\133\1\0\1\134\1\135\3\0\1\136\2\0"+ - "\1\137\2\140\1\141\1\142\1\143\1\144\1\145\1\146"+ - "\1\147\2\140\2\0\1\150\2\60\2\0\1\150\2\0"+ - "\1\150\1\151\1\152\2\0\1\153\1\154\1\155\1\0"+ - "\1\65\1\156\1\157\1\6\1\160\5\6\1\161\6\6"+ - "\1\162\4\6\1\163\4\6\1\164\6\6\1\165\12\6"+ - "\1\166\1\6\1\167\1\6\1\170\1\171\1\172\2\0"+ - "\1\173\1\174\1\0\1\175\2\0\1\176\4\0\1\177"+ - "\1\200\2\0\1\60\1\150\1\201\1\0\1\202\4\6"+ - "\1\203\1\204\2\6\1\205\12\6\1\206\1\207\1\6"+ - "\1\210\11\6\1\211\5\6\1\212\1\6\1\213\2\0"+ - "\1\214\1\215\1\0\1\216\1\0\1\217\1\0\1\220"+ - "\1\221\2\6\1\222\1\6\1\223\1\224\1\6\1\225"+ - "\1\6\1\226\4\6\1\227\11\6\1\230\5\6\2\0"+ - "\3\6\1\231\1\6\1\232\1\233\1\6\1\234\1\6"+ - "\1\235\3\6\1\236\3\6\1\237\4\6\1\240\1\6"+ - "\2\0\1\241\1\6\1\242\10\6\1\243\1\244\1\6"+ - "\1\245\1\246\1\6\2\0\1\247\1\250\1\251\3\6"+ - "\1\252\3\6\1\253\1\0\1\254\1\255\1\6\1\256"+ - "\1\6\1\257\1\260\1\261\1\262\1\263"; + private static final String ZZ_ACTION_PACKED_0 + = "\15\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" + + "\1\1\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\46\2\47\1\42\2\1" + + "\1\50\1\51\1\42\1\52\1\1\1\53\3\42\2\54" + + "\2\42\1\55\1\56\1\1\1\57\2\42\1\0\1\60" + + "\1\0\1\61\1\0\1\62\1\63\1\64\1\65\1\66" + + "\1\67\1\70\1\0\1\71\1\72\1\73\1\74\1\75" + + "\1\76\1\77\1\100\1\0\1\101\1\65\1\102\1\0" + + "\7\6\1\103\1\104\1\0\2\105\2\6\1\106\16\6" + + "\1\107\1\110\1\111\4\6\1\112\13\6\1\113\1\114" + + "\1\115\1\116\1\117\1\120\1\121\1\122\1\123\1\121" + + "\1\124\1\125\1\126\1\127\1\130\1\131\1\121\1\132" + + "\1\0\1\133\1\0\1\134\1\135\3\0\1\136\2\0" + + "\1\137\2\140\1\141\1\142\1\143\1\144\1\145\1\146" + + "\1\147\2\140\2\0\1\150\2\60\2\0\1\150\2\0" + + "\1\150\1\151\1\152\2\0\1\153\1\154\1\155\1\0" + + "\1\65\1\156\1\157\1\6\1\160\5\6\1\161\6\6" + + "\1\162\4\6\1\163\4\6\1\164\6\6\1\165\12\6" + + "\1\166\1\6\1\167\1\6\1\170\1\171\1\172\2\0" + + "\1\173\1\174\1\0\1\175\2\0\1\176\4\0\1\177" + + "\1\200\2\0\1\60\1\150\1\201\1\0\1\202\4\6" + + "\1\203\1\204\2\6\1\205\12\6\1\206\1\207\1\6" + + "\1\210\11\6\1\211\5\6\1\212\1\6\1\213\2\0" + + "\1\214\1\215\1\0\1\216\1\0\1\217\1\0\1\220" + + "\1\221\2\6\1\222\1\6\1\223\1\224\1\6\1\225" + + "\1\6\1\226\4\6\1\227\11\6\1\230\5\6\2\0" + + "\3\6\1\231\1\6\1\232\1\233\1\6\1\234\1\6" + + "\1\235\3\6\1\236\3\6\1\237\4\6\1\240\1\6" + + "\2\0\1\241\1\6\1\242\10\6\1\243\1\244\1\6" + + "\1\245\1\246\1\6\2\0\1\247\1\250\1\251\3\6" + + "\1\252\3\6\1\253\1\0\1\254\1\255\1\6\1\256" + + "\1\6\1\257\1\260\1\261\1\262\1\263"; - private static int [] zzUnpackAction() { - int [] result = new int[461]; - 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[461]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; } - return j; - } - - /** - * Translates a state to a row index in the transition table - */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); - - 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\u03dc\0\u0428\0\u03dc"+ - "\0\u0474\0\u04c0\0\u050c\0\u0558\0\u05a4\0\u05f0\0\u063c\0\u0688"+ - "\0\u06d4\0\u0720\0\u076c\0\u03dc\0\u03dc\0\u03dc\0\u07b8\0\u03dc"+ - "\0\u03dc\0\u0804\0\u0850\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\u0da8\0\u0df4\0\u0e40\0\u0e8c"+ - "\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u0ed8"+ - "\0\u0f24\0\u0f70\0\u0fbc\0\u03dc\0\u1008\0\u1054\0\u03dc\0\u03dc"+ - "\0\u10a0\0\u10ec\0\u1138\0\u03dc\0\u03dc\0\u1184\0\u03dc\0\u11d0"+ - "\0\u121c\0\u1268\0\u03dc\0\u03dc\0\u12b4\0\u03dc\0\u1300\0\u03dc"+ - "\0\u03dc\0\u134c\0\u1398\0\u13e4\0\u03dc\0\u1430\0\u147c\0\u03dc"+ - "\0\u03dc\0\u14c8\0\u03dc\0\u1514\0\u1560\0\u15ac\0\u15f8\0\u1644"+ - "\0\u15ac\0\u1690\0\u03dc\0\u16dc\0\u03dc\0\u1728\0\u03dc\0\u1774"+ - "\0\u17c0\0\u180c\0\u03dc\0\u03dc\0\u1858\0\u03dc\0\u03dc\0\u18a4"+ - "\0\u03dc\0\u03dc\0\u18f0\0\u193c\0\u1988\0\u19d4\0\u1a20\0\u1a6c"+ - "\0\u1ab8\0\u1b04\0\u1b50\0\u1b9c\0\u1be8\0\u1c34\0\u03dc\0\u03dc"+ - "\0\u1c80\0\u1ccc\0\u03dc\0\u1d18\0\u1d64\0\u0558\0\u1db0\0\u1dfc"+ - "\0\u1e48\0\u1e94\0\u1ee0\0\u1f2c\0\u1f78\0\u1fc4\0\u2010\0\u205c"+ - "\0\u20a8\0\u20f4\0\u2140\0\u218c\0\u0558\0\u0558\0\u21d8\0\u2224"+ - "\0\u2270\0\u22bc\0\u2308\0\u0558\0\u2354\0\u23a0\0\u23ec\0\u2438"+ - "\0\u2484\0\u24d0\0\u251c\0\u2568\0\u25b4\0\u2600\0\u264c\0\u03dc"+ - "\0\u2698\0\u03dc\0\u26e4\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc"+ - "\0\u2730\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u277c"+ - "\0\u03dc\0\u1268\0\u03dc\0\u1300\0\u03dc\0\u03dc\0\u27c8\0\u2814"+ - "\0\u2860\0\u28ac\0\u28f8\0\u2944\0\u03dc\0\u03dc\0\u2990\0\u03dc"+ - "\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u29dc\0\u2a28"+ - "\0\u2a74\0\u2ac0\0\u2b0c\0\u2b58\0\u03dc\0\u2ba4\0\u2bf0\0\u2c3c"+ - "\0\u2c88\0\u2cd4\0\u2d20\0\u03dc\0\u03dc\0\u2d6c\0\u2db8\0\u03dc"+ - "\0\u2e04\0\u03dc\0\u2e50\0\u2e50\0\u03dc\0\u1a20\0\u2e9c\0\u0558"+ - "\0\u2ee8\0\u2f34\0\u2f80\0\u2fcc\0\u3018\0\u3064\0\u30b0\0\u30fc"+ - "\0\u3148\0\u3194\0\u31e0\0\u322c\0\u0558\0\u3278\0\u32c4\0\u3310"+ - "\0\u335c\0\u0558\0\u33a8\0\u33f4\0\u3440\0\u348c\0\u0558\0\u34d8"+ - "\0\u3524\0\u3570\0\u35bc\0\u3608\0\u3654\0\u0558\0\u36a0\0\u36ec"+ - "\0\u3738\0\u3784\0\u37d0\0\u381c\0\u3868\0\u38b4\0\u3900\0\u394c"+ - "\0\u0558\0\u3998\0\u0558\0\u39e4\0\u0558\0\u03dc\0\u03dc\0\u3a30"+ - "\0\u3a7c\0\u03dc\0\u03dc\0\u3ac8\0\u03dc\0\u3b14\0\u3b60\0\u3bac"+ - "\0\u3bf8\0\u3c44\0\u3c90\0\u3cdc\0\u03dc\0\u03dc\0\u3d28\0\u3d74"+ - "\0\u2b0c\0\u3dc0\0\u03dc\0\u3e0c\0\u03dc\0\u3e58\0\u3ea4\0\u3ef0"+ - "\0\u3f3c\0\u0558\0\u0558\0\u3f88\0\u3fd4\0\u0558\0\u4020\0\u406c"+ - "\0\u40b8\0\u4104\0\u4150\0\u419c\0\u41e8\0\u4234\0\u4280\0\u42cc"+ - "\0\u0558\0\u0558\0\u4318\0\u0558\0\u4364\0\u43b0\0\u43fc\0\u4448"+ - "\0\u4494\0\u44e0\0\u452c\0\u4578\0\u45c4\0\u0558\0\u4610\0\u465c"+ - "\0\u46a8\0\u46f4\0\u4740\0\u0558\0\u478c\0\u03dc\0\u2730\0\u47d8"+ - "\0\u03dc\0\u03dc\0\u4824\0\u03dc\0\u2990\0\u03dc\0\u4870\0\u0558"+ - "\0\u48bc\0\u4908\0\u4954\0\u0558\0\u49a0\0\u0558\0\u0558\0\u49ec"+ - "\0\u0558\0\u4a38\0\u0558\0\u4a84\0\u4ad0\0\u4b1c\0\u4b68\0\u0558"+ - "\0\u4bb4\0\u4c00\0\u4c4c\0\u4c98\0\u4ce4\0\u4d30\0\u4d7c\0\u4dc8"+ - "\0\u4e14\0\u0558\0\u4e60\0\u4eac\0\u4ef8\0\u4f44\0\u4f90\0\u4fdc"+ - "\0\u5028\0\u5074\0\u50c0\0\u510c\0\u0558\0\u5158\0\u0558\0\u0558"+ - "\0\u51a4\0\u0558\0\u51f0\0\u0558\0\u523c\0\u5288\0\u52d4\0\u0558"+ - "\0\u5320\0\u536c\0\u53b8\0\u0558\0\u5404\0\u5450\0\u549c\0\u54e8"+ - "\0\u0558\0\u5534\0\u5580\0\u55cc\0\u0558\0\u5618\0\u0558\0\u5664"+ - "\0\u56b0\0\u56fc\0\u5748\0\u5794\0\u57e0\0\u582c\0\u5878\0\u0558"+ - "\0\u0558\0\u58c4\0\u0558\0\u0558\0\u5910\0\u595c\0\u59a8\0\u0558"+ - "\0\u0558\0\u0558\0\u59f4\0\u5a40\0\u5a8c\0\u0558\0\u5ad8\0\u5b24"+ - "\0\u5b70\0\u0558\0\u5bbc\0\u03dc\0\u0558\0\u5c08\0\u0558\0\u5c54"+ - "\0\u0558\0\u0558\0\u03dc\0\u0558\0\u0558"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[461]; - 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++); + 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); + } + 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\16\1\17\1\20\1\21\1\22\1\23\1\24\1\16"+ - "\1\24\1\25\1\26\1\21\1\27\1\30\1\31\1\32"+ - "\2\24\1\33\1\16\1\34\1\35\4\24\1\36\1\37"+ - "\1\40\1\41\1\42\2\24\1\43\1\33\1\24\1\44"+ - "\1\45\1\16\1\46\1\47\1\50\1\51\1\52\1\24"+ - "\1\53\1\54\1\55\1\56\1\57\1\60\1\61\1\62"+ - "\1\24\1\63\1\24\1\64\2\24\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\102\1\103\1\104\1\16\1\105\1\106"+ - "\1\107\31\105\1\110\11\105\1\111\45\105\1\112\1\113"+ - "\1\114\32\112\1\115\10\112\1\111\45\112\1\16\1\116"+ - "\1\117\1\120\1\121\3\16\1\122\2\16\1\120\2\16"+ - "\1\123\3\122\4\16\4\122\5\16\3\122\1\16\2\122"+ - "\4\16\26\122\2\16\1\124\13\16\1\116\1\117\10\16"+ - "\1\125\2\16\1\126\131\16\1\127\44\16\1\130\12\16"+ - "\1\131\1\116\1\117\21\131\1\132\70\131\1\116\1\117"+ - "\27\131\1\133\62\131\1\134\1\135\12\131\1\136\77\131"+ - "\1\116\1\117\7\131\1\137\66\131\1\140\12\131\1\141"+ - "\1\113\1\114\43\141\1\142\1\143\44\141\1\131\1\116"+ - "\1\117\27\131\1\144\62\131\1\134\1\135\12\131\1\145"+ - "\76\131\116\0\1\20\114\0\1\21\7\0\1\21\100\0"+ - "\1\146\2\0\1\146\1\147\1\150\25\146\1\151\12\146"+ - "\1\152\45\146\33\0\1\153\66\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\26\24\26\0\1\154"+ - "\1\155\7\0\1\156\13\0\1\156\3\0\1\156\34\0"+ - "\1\157\24\0\1\160\1\0\1\161\1\0\1\162\2\0"+ - "\3\160\4\0\4\160\1\0\1\163\3\0\3\160\1\0"+ - "\2\160\4\0\26\160\2\0\1\164\45\0\1\165\75\0"+ - "\1\166\15\0\1\167\76\0\1\170\14\0\1\171\77\0"+ - "\1\172\105\0\1\156\10\0\1\33\13\0\1\33\3\0"+ - "\1\33\2\173\102\0\1\174\71\0\1\156\10\0\1\175"+ - "\13\0\1\176\2\177\1\0\1\176\2\173\55\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24"+ - "\1\200\3\24\1\201\2\24\1\202\1\203\13\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\1\24\1\204"+ - "\5\24\4\0\2\24\1\205\11\24\1\206\11\24\50\0"+ - "\1\207\11\0\1\210\115\0\1\211\66\0\1\212\13\0"+ - "\1\213\3\0\1\212\57\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\1\24\1\214\24\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\6\24\1\215"+ - "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\5\24\1\216\20\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24"+ - "\1\217\3\24\1\220\5\24\1\221\11\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\6\24\1\222\4\0"+ - "\10\24\1\223\1\24\1\224\2\24\1\225\10\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\22\24\1\226\3\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\6\24\1\227\4\0\2\24\1\230\7\24"+ - "\1\231\13\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\1\24\1\232\14\24\1\233\1\24"+ - "\1\234\5\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\3\24\1\235\3\24\4\0\5\24\1\236\1\24"+ - "\1\237\11\24\1\240\4\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\5\24\1\241\1\24"+ - "\1\242\16\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\6\24\1\243\4\0\6\24\1\244\11\24\1\245"+ - "\5\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\11\24\1\246\4\24\1\247\7\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\1\24\1\250\1\251\7\24\1\252\13\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24"+ - "\1\253\3\24\1\254\17\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\6\24\1\255\4\0\26\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\7\24\1\256\16\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\2\24\1\257\23\24\50\0"+ - "\1\260\52\0\1\261\40\0\1\262\53\0\1\263\37\0"+ - "\1\264\113\0\1\265\60\0\1\105\2\0\31\105\1\0"+ - "\11\105\1\0\45\105\2\0\1\107\111\0\1\266\3\0"+ - "\30\266\1\267\1\270\1\266\1\271\1\266\1\272\4\266"+ - "\1\273\2\266\1\274\1\275\5\266\1\276\1\277\1\266"+ - "\1\300\27\266\1\0\1\112\2\0\32\112\1\0\10\112"+ - "\1\0\45\112\2\0\1\114\113\0\1\117\114\0\1\120"+ - "\7\0\1\120\116\0\1\301\105\0\2\302\3\0\1\302"+ - "\1\0\5\302\2\0\4\302\1\0\1\303\2\0\7\302"+ - "\4\0\26\302\30\0\1\125\100\0\1\304\2\0\31\304"+ - "\1\305\57\304\16\0\1\306\127\0\1\307\63\0\1\135"+ - "\126\0\1\310\102\0\1\311\3\0\1\312\3\0\1\313"+ - "\2\0\3\312\2\0\1\314\1\0\4\312\5\0\3\312"+ - "\1\0\2\312\4\0\26\312\2\0\1\315\12\0\1\316"+ - "\3\0\33\316\1\317\1\316\1\320\4\316\1\321\1\322"+ - "\1\316\1\323\1\324\5\316\1\325\1\326\1\316\1\327"+ - "\15\316\1\330\11\316\33\0\1\331\76\0\1\332\76\0"+ - "\1\146\2\0\1\146\1\333\41\146\1\152\45\146\1\147"+ - "\1\334\1\335\111\147\1\336\2\337\1\336\1\340\1\341"+ - "\40\336\1\342\45\336\1\146\2\0\1\146\1\343\41\146"+ - "\1\152\45\146\11\0\1\344\124\0\1\156\13\0\1\156"+ - "\3\0\1\156\2\173\57\0\2\160\3\0\1\160\1\0"+ - "\5\160\2\0\4\160\4\0\7\160\4\0\26\160\50\0"+ - "\1\345\75\0\1\346\7\0\1\347\121\0\1\350\76\0"+ - "\1\351\14\0\1\352\75\0\1\353\4\0\1\354\13\0"+ - "\1\354\3\0\1\354\2\0\1\353\101\0\1\355\71\0"+ - "\1\156\10\0\1\175\13\0\1\175\3\0\1\175\2\173"+ - "\60\0\1\156\10\0\1\175\13\0\1\176\3\0\1\176"+ - "\2\173\67\0\1\356\1\0\1\356\3\0\3\356\5\0"+ - "\1\356\2\0\4\356\4\0\1\356\1\0\1\356\1\0"+ - "\1\356\6\0\1\356\35\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\14\24\1\357\11\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\1\24\1\360\24\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\7\24\1\361\16\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\7\24\1\362\16\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\10\24\1\363\15\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\4\24\1\364\21\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\5\24\1\365\20\24\23\0"+ - "\1\366\1\0\1\366\7\0\2\366\4\0\4\366\5\0"+ - "\3\366\1\0\2\366\4\0\26\366\37\0\1\212\13\0"+ - "\1\212\3\0\1\212\57\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\6\24\1\367\4\0\26\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\10\24"+ - "\1\370\15\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\5\24\1\371\2\24\1\372\15\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\7\24\1\373\16\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\2\24\1\374\23\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\10\24\1\375\15\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\2\24\1\376\23\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\17\24\1\377\6\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\11\24\1\u0100\14\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\6\24"+ - "\1\u0101\4\0\26\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\15\24\1\u0102\10\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\10\24\1\u0103\10\24\1\u0104\4\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\14\24\1\u0105"+ - "\11\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\12\24\1\u0106\5\24\1\u0107\5\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\1\24\1\u0108\7\24\1\u0109\14\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\17\24\1\u010a"+ - "\6\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\5\24\1\u010b\2\24\1\u010c\15\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\17\24\1\u010d\6\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\6\24\1\u010e\4\0\26\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\13\24"+ - "\1\u010f\12\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\3\24\1\u0110\3\24\4\0\14\24\1\u0111\11\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\7\24\1\u0112\16\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\10\24\1\u0113\15\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\11\24\1\u0114\14\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\6\24\1\u0115\2\24"+ - "\1\u0116\14\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\4\24\1\u0117\21\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\1\u0118"+ - "\25\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\1\24\1\u0119\24\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\11\24\1\u011a"+ - "\14\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\10\24\1\u011b\15\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\3\24\1\u011c\3\24\4\0"+ - "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\25\24\1\u011d\50\0\1\u011e\113\0\1\u011f"+ - "\100\0\1\u0120\1\0\1\u0120\3\0\3\u0120\5\0\1\u0120"+ - "\2\0\4\u0120\4\0\1\u0120\1\0\1\u0120\1\0\1\u0120"+ - "\6\0\1\u0120\47\0\1\u0121\1\0\1\u0121\3\0\3\u0121"+ - "\5\0\1\u0121\2\0\4\u0121\4\0\1\u0121\1\0\1\u0121"+ - "\1\0\1\u0121\6\0\1\u0121\45\0\1\u0122\113\0\1\u0123"+ - "\105\0\1\u0124\6\0\3\u0124\4\0\4\u0124\5\0\3\u0124"+ - "\1\0\2\u0124\4\0\26\u0124\2\0\1\u0125\22\0\2\312"+ - "\3\0\1\312\1\0\5\312\2\0\4\312\4\0\7\312"+ - "\4\0\26\312\32\0\1\u0126\7\0\1\u0127\76\0\1\u0128"+ - "\6\0\3\u0128\4\0\4\u0128\5\0\3\u0128\1\0\2\u0128"+ - "\4\0\26\u0128\35\0\1\u0129\1\0\1\u0129\3\0\3\u0129"+ - "\5\0\1\u0129\2\0\4\u0129\4\0\1\u0129\1\0\1\u0129"+ - "\1\0\1\u0129\6\0\1\u0129\47\0\1\u012a\1\0\1\u012a"+ - "\3\0\3\u012a\5\0\1\u012a\2\0\4\u012a\4\0\1\u012a"+ - "\1\0\1\u012a\1\0\1\u012a\6\0\1\u012a\51\0\1\u012b"+ - "\13\0\1\u012c\3\0\1\u012b\67\0\1\u012d\113\0\1\u012e"+ - "\116\0\1\333\15\0\1\333\1\0\1\333\2\0\1\333"+ - "\4\0\24\333\21\0\1\335\111\0\1\336\2\337\1\336"+ - "\1\340\1\u012f\40\336\1\342\45\336\5\337\1\u0130\113\337"+ - "\1\u0130\13\337\1\340\15\337\1\340\1\337\1\340\2\337"+ - "\1\340\4\337\24\340\17\337\1\146\2\0\1\146\1\u0131"+ - "\1\341\40\146\1\152\45\146\1\336\2\337\1\336\1\u0132"+ - "\1\u012f\40\336\1\342\45\336\1\146\2\0\1\146\1\333"+ - "\14\146\1\343\15\146\1\343\1\146\1\343\2\146\1\343"+ - "\1\146\1\152\2\146\24\343\17\146\15\0\1\u0133\124\0"+ - "\1\u0134\120\0\1\u0135\102\0\1\354\13\0\1\354\3\0"+ - "\1\354\57\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\5\24\1\u0136\20\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\2\24\1\u0137"+ - "\23\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\4\24\1\u0138\21\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\6\24\1\u0139\4\0\26\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\16\24\1\u013a\7\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\6\24\1\u013b\4\0\26\24\23\0"+ - "\3\366\7\0\3\366\3\0\4\366\4\0\7\366\4\0"+ - "\26\366\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\2\24\1\u013c\23\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\12\24\1\u013d"+ - "\13\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\6\24\1\u013e\4\0\26\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\4\24\1\u013f\21\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\5\24\1\u0140\2\24\1\u0141\15\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\5\24"+ - "\1\u0142\20\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\10\24\1\u0143\15\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\6\24\1\u0144\4\0"+ - "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\10\24\1\u0145\15\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\1\24\1\u0146"+ - "\24\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\11\24\1\u0147\14\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\6\24\1\u0148\4\0\26\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\14\24\1\u0149\11\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\6\24\1\u014a\4\0\26\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\6\24\1\u014b\17\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\5\24\1\u014c\20\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\6\24\1\u014d"+ - "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\10\24\1\u014e\15\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\6\24\1\u014f\4\0"+ - "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\6\24\1\u0150\5\24\1\u0151\11\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\6\24\1\u0152"+ - "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\2\24\1\u0153\23\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\6\24\1\u0154\4\0"+ - "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\2\24\1\u0155\23\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\16\24\1\u0156"+ - "\7\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\14\24\1\u0157\11\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\10\24\1\u0158"+ - "\15\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\22\24\1\u0159\3\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\3\24\1\u015a"+ - "\22\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\14\24\1\u015b\11\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\13\24\1\u015c"+ - "\12\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\11\24\1\u015d\14\24\35\0\1\u015e\1\0"+ - "\1\u015e\3\0\3\u015e\5\0\1\u015e\2\0\4\u015e\4\0"+ - "\1\u015e\1\0\1\u015e\1\0\1\u015e\6\0\1\u015e\47\0"+ - "\1\u015f\1\0\1\u015f\3\0\3\u015f\5\0\1\u015f\2\0"+ - "\4\u015f\4\0\1\u015f\1\0\1\u015f\1\0\1\u015f\6\0"+ - "\1\u015f\30\0\2\u0160\5\0\2\u0124\1\0\1\u0160\1\0"+ - "\1\u0124\1\u0161\5\u0124\2\0\4\u0124\4\0\7\u0124\4\0"+ - "\26\u0124\32\0\1\u0162\124\0\1\u0163\75\0\2\u0128\3\0"+ - "\1\u0128\1\0\5\u0128\2\0\4\u0128\4\0\7\u0128\4\0"+ - "\26\u0128\35\0\1\u0164\1\0\1\u0164\3\0\3\u0164\5\0"+ - "\1\u0164\2\0\4\u0164\4\0\1\u0164\1\0\1\u0164\1\0"+ - "\1\u0164\6\0\1\u0164\47\0\1\u0165\1\0\1\u0165\3\0"+ - "\3\u0165\5\0\1\u0165\2\0\4\u0165\4\0\1\u0165\1\0"+ - "\1\u0165\1\0\1\u0165\6\0\1\u0165\51\0\1\u012b\13\0"+ - "\1\u012b\3\0\1\u012b\37\0\1\u0166\113\0\1\u0166\11\0"+ - "\1\336\2\337\1\336\1\u0131\1\u012f\40\336\1\342\45\336"+ - "\4\337\1\335\1\u0130\106\337\1\336\2\337\1\336\1\340"+ - "\1\u012f\13\336\1\u0132\15\336\1\u0132\1\336\1\u0132\2\336"+ - "\1\u0132\1\336\1\342\2\336\24\u0132\17\336\27\0\1\u0167"+ - "\72\0\3\24\7\0\3\24\3\0\4\24\4\0\6\24"+ - "\1\u0168\4\0\26\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\14\24\1\u0169\11\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\10\24\1\u016a\15\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\7\24\1\u016b\16\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\3\24\1\u016c\22\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\1\24\1\u016d\24\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\16\24\1\u016e\7\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\10\24\1\u016f\15\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\11\24\1\u0170\14\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\5\24\1\u0171\20\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\11\24\1\u0172\14\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\1\24\1\u0173\24\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\4\24\1\u0174\21\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\1\24\1\u0175\24\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\22\24\1\u0176\3\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\5\24\1\u0177\20\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\15\24\1\u0178\10\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\6\24\1\u0179\17\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\2\24\1\u017a\23\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\1\24\1\u017b\24\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\1\24\1\u017c\24\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\6\24\1\u017d\4\0\26\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\3\24\1\u017e\3\24"+ - "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\12\24\1\u017f\13\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\10\24"+ - "\1\u0180\15\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\21\24\1\u0181\4\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\6\24\1\u0182\4\0"+ - "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\6\24\1\u0183\4\0\26\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\2\24\1\u0184\23\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\2\24\1\u0185\23\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\11\24\1\u0186\14\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\7\24\1\u0187\16\24\16\0\2\u0160\10\0\1\u0160"+ - "\2\0\1\u0161\124\0\1\u0188\114\0\1\u0189\71\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\14\24"+ - "\1\u018a\11\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\11\24\1\u018b\14\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\13\24"+ - "\1\u018c\12\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\7\24\1\u018d\16\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\7\24"+ - "\1\u018e\16\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\4\24\1\u018f\21\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\16\24"+ - "\1\u0190\7\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\11\24\1\u0191\14\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\6\24\1\u0192\4\0"+ - "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\17\24\1\u0193\6\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\3\24\1\u0194\3\24\4\0"+ - "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\7\24\1\u0195\16\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\3\24\1\u0196\3\24\4\0"+ - "\7\24\1\u0197\16\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\10\24\1\u0198\15\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\21\24\1\u0199\4\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\7\24\4\0\11\24\1\u019a\14\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\14\24\1\u019b\11\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\6\24\1\u019c\4\0\26\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\11\24"+ - "\1\u019d\14\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\4\24\1\u019e\21\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\10\24"+ - "\1\u019f\15\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\23\24\1\u01a0\2\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\4\24"+ - "\1\u01a1\21\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\11\24\1\u01a2\14\24\45\0\1\u01a3"+ - "\114\0\1\u01a4\70\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\20\24\1\u01a5\5\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\6\24"+ - "\1\u01a6\17\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\5\24\1\u01a7\20\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\12\24"+ - "\1\u01a8\13\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\13\24\1\u01a9\12\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24"+ - "\1\u01aa\23\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\4\24\1\u01ab\21\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24"+ - "\1\u01ac\23\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\2\24\1\u01ad\23\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\6\24\1\u01ae\4\0"+ - "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\7\24\1\u01af\16\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\10\24\1\u01b0"+ - "\15\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\4\24\1\u01b1\21\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\10\24\1\u01b2"+ - "\15\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\6\24\1\u01b3\4\0\26\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\6\24\1\u01b4\4\0\26\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\10\24\1\u01b5\15\24\46\0\1\u01b6\112\0\1\u01b7\71\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0"+ - "\7\24\1\u01b8\16\24\23\0\3\24\7\0\3\24\3\0"+ - "\4\24\4\0\6\24\1\u01b9\4\0\26\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\6\24\1\u01ba\4\0"+ - "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\7\24\4\0\4\24\1\u01bb\21\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\6\24\1\u01bc\4\0\26\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\4\24\1\u01bd\21\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\14\24\1\u01be\11\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\7\24\1\u01bf\16\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\6\24\1\u01c0\4\0\26\24\23\0"+ - "\3\24\7\0\3\24\3\0\4\24\4\0\6\24\1\u01c1"+ - "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\7\24\4\0\20\24\1\u01c2\5\24\45\0\1\u01c3"+ - "\110\0\1\u01c4\74\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\6\24\1\u01c5\4\0\26\24\23\0\3\24\7\0"+ - "\3\24\3\0\4\24\4\0\7\24\4\0\6\24\1\u01c6"+ - "\17\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0"+ - "\6\24\1\u01c7\4\0\26\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\10\24\1\u01c8\15\24"+ - "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24"+ - "\4\0\13\24\1\u01c9\12\24\23\0\3\24\7\0\3\24"+ - "\3\0\4\24\4\0\7\24\4\0\13\24\1\u01ca\12\24"+ - "\42\0\1\u01cb\74\0\3\24\7\0\3\24\3\0\4\24"+ - "\4\0\3\24\1\u01cc\3\24\4\0\26\24\23\0\3\24"+ - "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\5\24"+ - "\1\u01cd\20\24\15\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\u03dc\0\u0428\0\u03dc" + + "\0\u0474\0\u04c0\0\u050c\0\u0558\0\u05a4\0\u05f0\0\u063c\0\u0688" + + "\0\u06d4\0\u0720\0\u076c\0\u03dc\0\u03dc\0\u03dc\0\u07b8\0\u03dc" + + "\0\u03dc\0\u0804\0\u0850\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\u0da8\0\u0df4\0\u0e40\0\u0e8c" + + "\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u0ed8" + + "\0\u0f24\0\u0f70\0\u0fbc\0\u03dc\0\u1008\0\u1054\0\u03dc\0\u03dc" + + "\0\u10a0\0\u10ec\0\u1138\0\u03dc\0\u03dc\0\u1184\0\u03dc\0\u11d0" + + "\0\u121c\0\u1268\0\u03dc\0\u03dc\0\u12b4\0\u03dc\0\u1300\0\u03dc" + + "\0\u03dc\0\u134c\0\u1398\0\u13e4\0\u03dc\0\u1430\0\u147c\0\u03dc" + + "\0\u03dc\0\u14c8\0\u03dc\0\u1514\0\u1560\0\u15ac\0\u15f8\0\u1644" + + "\0\u15ac\0\u1690\0\u03dc\0\u16dc\0\u03dc\0\u1728\0\u03dc\0\u1774" + + "\0\u17c0\0\u180c\0\u03dc\0\u03dc\0\u1858\0\u03dc\0\u03dc\0\u18a4" + + "\0\u03dc\0\u03dc\0\u18f0\0\u193c\0\u1988\0\u19d4\0\u1a20\0\u1a6c" + + "\0\u1ab8\0\u1b04\0\u1b50\0\u1b9c\0\u1be8\0\u1c34\0\u03dc\0\u03dc" + + "\0\u1c80\0\u1ccc\0\u03dc\0\u1d18\0\u1d64\0\u0558\0\u1db0\0\u1dfc" + + "\0\u1e48\0\u1e94\0\u1ee0\0\u1f2c\0\u1f78\0\u1fc4\0\u2010\0\u205c" + + "\0\u20a8\0\u20f4\0\u2140\0\u218c\0\u0558\0\u0558\0\u21d8\0\u2224" + + "\0\u2270\0\u22bc\0\u2308\0\u0558\0\u2354\0\u23a0\0\u23ec\0\u2438" + + "\0\u2484\0\u24d0\0\u251c\0\u2568\0\u25b4\0\u2600\0\u264c\0\u03dc" + + "\0\u2698\0\u03dc\0\u26e4\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc" + + "\0\u2730\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u277c" + + "\0\u03dc\0\u1268\0\u03dc\0\u1300\0\u03dc\0\u03dc\0\u27c8\0\u2814" + + "\0\u2860\0\u28ac\0\u28f8\0\u2944\0\u03dc\0\u03dc\0\u2990\0\u03dc" + + "\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u03dc\0\u29dc\0\u2a28" + + "\0\u2a74\0\u2ac0\0\u2b0c\0\u2b58\0\u03dc\0\u2ba4\0\u2bf0\0\u2c3c" + + "\0\u2c88\0\u2cd4\0\u2d20\0\u03dc\0\u03dc\0\u2d6c\0\u2db8\0\u03dc" + + "\0\u2e04\0\u03dc\0\u2e50\0\u2e50\0\u03dc\0\u1a20\0\u2e9c\0\u0558" + + "\0\u2ee8\0\u2f34\0\u2f80\0\u2fcc\0\u3018\0\u3064\0\u30b0\0\u30fc" + + "\0\u3148\0\u3194\0\u31e0\0\u322c\0\u0558\0\u3278\0\u32c4\0\u3310" + + "\0\u335c\0\u0558\0\u33a8\0\u33f4\0\u3440\0\u348c\0\u0558\0\u34d8" + + "\0\u3524\0\u3570\0\u35bc\0\u3608\0\u3654\0\u0558\0\u36a0\0\u36ec" + + "\0\u3738\0\u3784\0\u37d0\0\u381c\0\u3868\0\u38b4\0\u3900\0\u394c" + + "\0\u0558\0\u3998\0\u0558\0\u39e4\0\u0558\0\u03dc\0\u03dc\0\u3a30" + + "\0\u3a7c\0\u03dc\0\u03dc\0\u3ac8\0\u03dc\0\u3b14\0\u3b60\0\u3bac" + + "\0\u3bf8\0\u3c44\0\u3c90\0\u3cdc\0\u03dc\0\u03dc\0\u3d28\0\u3d74" + + "\0\u2b0c\0\u3dc0\0\u03dc\0\u3e0c\0\u03dc\0\u3e58\0\u3ea4\0\u3ef0" + + "\0\u3f3c\0\u0558\0\u0558\0\u3f88\0\u3fd4\0\u0558\0\u4020\0\u406c" + + "\0\u40b8\0\u4104\0\u4150\0\u419c\0\u41e8\0\u4234\0\u4280\0\u42cc" + + "\0\u0558\0\u0558\0\u4318\0\u0558\0\u4364\0\u43b0\0\u43fc\0\u4448" + + "\0\u4494\0\u44e0\0\u452c\0\u4578\0\u45c4\0\u0558\0\u4610\0\u465c" + + "\0\u46a8\0\u46f4\0\u4740\0\u0558\0\u478c\0\u03dc\0\u2730\0\u47d8" + + "\0\u03dc\0\u03dc\0\u4824\0\u03dc\0\u2990\0\u03dc\0\u4870\0\u0558" + + "\0\u48bc\0\u4908\0\u4954\0\u0558\0\u49a0\0\u0558\0\u0558\0\u49ec" + + "\0\u0558\0\u4a38\0\u0558\0\u4a84\0\u4ad0\0\u4b1c\0\u4b68\0\u0558" + + "\0\u4bb4\0\u4c00\0\u4c4c\0\u4c98\0\u4ce4\0\u4d30\0\u4d7c\0\u4dc8" + + "\0\u4e14\0\u0558\0\u4e60\0\u4eac\0\u4ef8\0\u4f44\0\u4f90\0\u4fdc" + + "\0\u5028\0\u5074\0\u50c0\0\u510c\0\u0558\0\u5158\0\u0558\0\u0558" + + "\0\u51a4\0\u0558\0\u51f0\0\u0558\0\u523c\0\u5288\0\u52d4\0\u0558" + + "\0\u5320\0\u536c\0\u53b8\0\u0558\0\u5404\0\u5450\0\u549c\0\u54e8" + + "\0\u0558\0\u5534\0\u5580\0\u55cc\0\u0558\0\u5618\0\u0558\0\u5664" + + "\0\u56b0\0\u56fc\0\u5748\0\u5794\0\u57e0\0\u582c\0\u5878\0\u0558" + + "\0\u0558\0\u58c4\0\u0558\0\u0558\0\u5910\0\u595c\0\u59a8\0\u0558" + + "\0\u0558\0\u0558\0\u59f4\0\u5a40\0\u5a8c\0\u0558\0\u5ad8\0\u5b24" + + "\0\u5b70\0\u0558\0\u5bbc\0\u03dc\0\u0558\0\u5c08\0\u0558\0\u5c54" + + "\0\u0558\0\u0558\0\u03dc\0\u0558\0\u0558"; - private static int [] zzUnpackTrans() { - int [] result = new int[23712]; - 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[461]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; } - return j; - } - - /* 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; - - /* 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 = - "\15\0\1\11\1\1\1\11\13\1\3\11\1\1\2\11"+ - "\27\1\7\11\4\1\1\11\2\1\2\11\3\1\2\11"+ - "\1\1\1\11\3\1\2\11\1\1\1\11\1\1\2\11"+ - "\3\1\1\11\2\1\2\11\1\1\1\11\2\1\1\0"+ - "\1\1\1\0\1\1\1\0\1\11\1\1\1\11\1\1"+ - "\1\11\2\1\1\0\2\11\1\1\2\11\1\1\2\11"+ - "\1\0\3\1\1\0\7\1\2\11\1\0\1\1\1\11"+ - "\44\1\1\11\1\1\1\11\1\1\5\11\1\1\6\11"+ - "\1\1\1\11\1\0\1\11\1\0\2\11\3\0\1\1"+ - "\2\0\2\11\1\1\7\11\2\1\2\0\2\1\1\11"+ - "\2\0\1\1\2\0\1\1\2\11\2\0\1\11\1\1"+ - "\1\11\1\0\1\1\1\11\60\1\2\11\2\0\2\11"+ - "\1\0\1\11\2\0\1\1\4\0\2\11\2\0\2\1"+ - "\1\11\1\0\1\11\50\1\1\11\2\0\2\11\1\0"+ - "\1\11\1\0\1\11\1\0\40\1\2\0\31\1\2\0"+ - "\21\1\2\0\13\1\1\0\1\11\6\1\1\11\2\1"; - - private static int [] zzUnpackAttribute() { - int [] result = new int[461]; - 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); + 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++); + } + 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\16\1\17\1\20\1\21\1\22\1\23\1\24\1\16" + + "\1\24\1\25\1\26\1\21\1\27\1\30\1\31\1\32" + + "\2\24\1\33\1\16\1\34\1\35\4\24\1\36\1\37" + + "\1\40\1\41\1\42\2\24\1\43\1\33\1\24\1\44" + + "\1\45\1\16\1\46\1\47\1\50\1\51\1\52\1\24" + + "\1\53\1\54\1\55\1\56\1\57\1\60\1\61\1\62" + + "\1\24\1\63\1\24\1\64\2\24\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\102\1\103\1\104\1\16\1\105\1\106" + + "\1\107\31\105\1\110\11\105\1\111\45\105\1\112\1\113" + + "\1\114\32\112\1\115\10\112\1\111\45\112\1\16\1\116" + + "\1\117\1\120\1\121\3\16\1\122\2\16\1\120\2\16" + + "\1\123\3\122\4\16\4\122\5\16\3\122\1\16\2\122" + + "\4\16\26\122\2\16\1\124\13\16\1\116\1\117\10\16" + + "\1\125\2\16\1\126\131\16\1\127\44\16\1\130\12\16" + + "\1\131\1\116\1\117\21\131\1\132\70\131\1\116\1\117" + + "\27\131\1\133\62\131\1\134\1\135\12\131\1\136\77\131" + + "\1\116\1\117\7\131\1\137\66\131\1\140\12\131\1\141" + + "\1\113\1\114\43\141\1\142\1\143\44\141\1\131\1\116" + + "\1\117\27\131\1\144\62\131\1\134\1\135\12\131\1\145" + + "\76\131\116\0\1\20\114\0\1\21\7\0\1\21\100\0" + + "\1\146\2\0\1\146\1\147\1\150\25\146\1\151\12\146" + + "\1\152\45\146\33\0\1\153\66\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\26\24\26\0\1\154" + + "\1\155\7\0\1\156\13\0\1\156\3\0\1\156\34\0" + + "\1\157\24\0\1\160\1\0\1\161\1\0\1\162\2\0" + + "\3\160\4\0\4\160\1\0\1\163\3\0\3\160\1\0" + + "\2\160\4\0\26\160\2\0\1\164\45\0\1\165\75\0" + + "\1\166\15\0\1\167\76\0\1\170\14\0\1\171\77\0" + + "\1\172\105\0\1\156\10\0\1\33\13\0\1\33\3\0" + + "\1\33\2\173\102\0\1\174\71\0\1\156\10\0\1\175" + + "\13\0\1\176\2\177\1\0\1\176\2\173\55\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24" + + "\1\200\3\24\1\201\2\24\1\202\1\203\13\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\1\24\1\204" + + "\5\24\4\0\2\24\1\205\11\24\1\206\11\24\50\0" + + "\1\207\11\0\1\210\115\0\1\211\66\0\1\212\13\0" + + "\1\213\3\0\1\212\57\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\1\24\1\214\24\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\6\24\1\215" + + "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\5\24\1\216\20\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24" + + "\1\217\3\24\1\220\5\24\1\221\11\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\6\24\1\222\4\0" + + "\10\24\1\223\1\24\1\224\2\24\1\225\10\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\22\24\1\226\3\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\6\24\1\227\4\0\2\24\1\230\7\24" + + "\1\231\13\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\1\24\1\232\14\24\1\233\1\24" + + "\1\234\5\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\3\24\1\235\3\24\4\0\5\24\1\236\1\24" + + "\1\237\11\24\1\240\4\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\5\24\1\241\1\24" + + "\1\242\16\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\6\24\1\243\4\0\6\24\1\244\11\24\1\245" + + "\5\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\11\24\1\246\4\24\1\247\7\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\1\24\1\250\1\251\7\24\1\252\13\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24" + + "\1\253\3\24\1\254\17\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\6\24\1\255\4\0\26\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\7\24\1\256\16\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\2\24\1\257\23\24\50\0" + + "\1\260\52\0\1\261\40\0\1\262\53\0\1\263\37\0" + + "\1\264\113\0\1\265\60\0\1\105\2\0\31\105\1\0" + + "\11\105\1\0\45\105\2\0\1\107\111\0\1\266\3\0" + + "\30\266\1\267\1\270\1\266\1\271\1\266\1\272\4\266" + + "\1\273\2\266\1\274\1\275\5\266\1\276\1\277\1\266" + + "\1\300\27\266\1\0\1\112\2\0\32\112\1\0\10\112" + + "\1\0\45\112\2\0\1\114\113\0\1\117\114\0\1\120" + + "\7\0\1\120\116\0\1\301\105\0\2\302\3\0\1\302" + + "\1\0\5\302\2\0\4\302\1\0\1\303\2\0\7\302" + + "\4\0\26\302\30\0\1\125\100\0\1\304\2\0\31\304" + + "\1\305\57\304\16\0\1\306\127\0\1\307\63\0\1\135" + + "\126\0\1\310\102\0\1\311\3\0\1\312\3\0\1\313" + + "\2\0\3\312\2\0\1\314\1\0\4\312\5\0\3\312" + + "\1\0\2\312\4\0\26\312\2\0\1\315\12\0\1\316" + + "\3\0\33\316\1\317\1\316\1\320\4\316\1\321\1\322" + + "\1\316\1\323\1\324\5\316\1\325\1\326\1\316\1\327" + + "\15\316\1\330\11\316\33\0\1\331\76\0\1\332\76\0" + + "\1\146\2\0\1\146\1\333\41\146\1\152\45\146\1\147" + + "\1\334\1\335\111\147\1\336\2\337\1\336\1\340\1\341" + + "\40\336\1\342\45\336\1\146\2\0\1\146\1\343\41\146" + + "\1\152\45\146\11\0\1\344\124\0\1\156\13\0\1\156" + + "\3\0\1\156\2\173\57\0\2\160\3\0\1\160\1\0" + + "\5\160\2\0\4\160\4\0\7\160\4\0\26\160\50\0" + + "\1\345\75\0\1\346\7\0\1\347\121\0\1\350\76\0" + + "\1\351\14\0\1\352\75\0\1\353\4\0\1\354\13\0" + + "\1\354\3\0\1\354\2\0\1\353\101\0\1\355\71\0" + + "\1\156\10\0\1\175\13\0\1\175\3\0\1\175\2\173" + + "\60\0\1\156\10\0\1\175\13\0\1\176\3\0\1\176" + + "\2\173\67\0\1\356\1\0\1\356\3\0\3\356\5\0" + + "\1\356\2\0\4\356\4\0\1\356\1\0\1\356\1\0" + + "\1\356\6\0\1\356\35\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\14\24\1\357\11\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\1\24\1\360\24\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\7\24\1\361\16\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\7\24\1\362\16\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\10\24\1\363\15\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\4\24\1\364\21\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\5\24\1\365\20\24\23\0" + + "\1\366\1\0\1\366\7\0\2\366\4\0\4\366\5\0" + + "\3\366\1\0\2\366\4\0\26\366\37\0\1\212\13\0" + + "\1\212\3\0\1\212\57\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\6\24\1\367\4\0\26\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\10\24" + + "\1\370\15\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\5\24\1\371\2\24\1\372\15\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\7\24\1\373\16\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\2\24\1\374\23\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\10\24\1\375\15\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\2\24\1\376\23\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\17\24\1\377\6\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\11\24\1\u0100\14\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\6\24" + + "\1\u0101\4\0\26\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\15\24\1\u0102\10\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\10\24\1\u0103\10\24\1\u0104\4\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\14\24\1\u0105" + + "\11\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\12\24\1\u0106\5\24\1\u0107\5\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\1\24\1\u0108\7\24\1\u0109\14\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\17\24\1\u010a" + + "\6\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\5\24\1\u010b\2\24\1\u010c\15\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\17\24\1\u010d\6\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\6\24\1\u010e\4\0\26\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\13\24" + + "\1\u010f\12\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\3\24\1\u0110\3\24\4\0\14\24\1\u0111\11\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\7\24\1\u0112\16\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\10\24\1\u0113\15\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\11\24\1\u0114\14\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\6\24\1\u0115\2\24" + + "\1\u0116\14\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\4\24\1\u0117\21\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\1\u0118" + + "\25\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\1\24\1\u0119\24\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\11\24\1\u011a" + + "\14\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\10\24\1\u011b\15\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\3\24\1\u011c\3\24\4\0" + + "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\25\24\1\u011d\50\0\1\u011e\113\0\1\u011f" + + "\100\0\1\u0120\1\0\1\u0120\3\0\3\u0120\5\0\1\u0120" + + "\2\0\4\u0120\4\0\1\u0120\1\0\1\u0120\1\0\1\u0120" + + "\6\0\1\u0120\47\0\1\u0121\1\0\1\u0121\3\0\3\u0121" + + "\5\0\1\u0121\2\0\4\u0121\4\0\1\u0121\1\0\1\u0121" + + "\1\0\1\u0121\6\0\1\u0121\45\0\1\u0122\113\0\1\u0123" + + "\105\0\1\u0124\6\0\3\u0124\4\0\4\u0124\5\0\3\u0124" + + "\1\0\2\u0124\4\0\26\u0124\2\0\1\u0125\22\0\2\312" + + "\3\0\1\312\1\0\5\312\2\0\4\312\4\0\7\312" + + "\4\0\26\312\32\0\1\u0126\7\0\1\u0127\76\0\1\u0128" + + "\6\0\3\u0128\4\0\4\u0128\5\0\3\u0128\1\0\2\u0128" + + "\4\0\26\u0128\35\0\1\u0129\1\0\1\u0129\3\0\3\u0129" + + "\5\0\1\u0129\2\0\4\u0129\4\0\1\u0129\1\0\1\u0129" + + "\1\0\1\u0129\6\0\1\u0129\47\0\1\u012a\1\0\1\u012a" + + "\3\0\3\u012a\5\0\1\u012a\2\0\4\u012a\4\0\1\u012a" + + "\1\0\1\u012a\1\0\1\u012a\6\0\1\u012a\51\0\1\u012b" + + "\13\0\1\u012c\3\0\1\u012b\67\0\1\u012d\113\0\1\u012e" + + "\116\0\1\333\15\0\1\333\1\0\1\333\2\0\1\333" + + "\4\0\24\333\21\0\1\335\111\0\1\336\2\337\1\336" + + "\1\340\1\u012f\40\336\1\342\45\336\5\337\1\u0130\113\337" + + "\1\u0130\13\337\1\340\15\337\1\340\1\337\1\340\2\337" + + "\1\340\4\337\24\340\17\337\1\146\2\0\1\146\1\u0131" + + "\1\341\40\146\1\152\45\146\1\336\2\337\1\336\1\u0132" + + "\1\u012f\40\336\1\342\45\336\1\146\2\0\1\146\1\333" + + "\14\146\1\343\15\146\1\343\1\146\1\343\2\146\1\343" + + "\1\146\1\152\2\146\24\343\17\146\15\0\1\u0133\124\0" + + "\1\u0134\120\0\1\u0135\102\0\1\354\13\0\1\354\3\0" + + "\1\354\57\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\5\24\1\u0136\20\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\2\24\1\u0137" + + "\23\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\4\24\1\u0138\21\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\6\24\1\u0139\4\0\26\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\16\24\1\u013a\7\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\6\24\1\u013b\4\0\26\24\23\0" + + "\3\366\7\0\3\366\3\0\4\366\4\0\7\366\4\0" + + "\26\366\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\2\24\1\u013c\23\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\12\24\1\u013d" + + "\13\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\6\24\1\u013e\4\0\26\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\4\24\1\u013f\21\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\5\24\1\u0140\2\24\1\u0141\15\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\5\24" + + "\1\u0142\20\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\10\24\1\u0143\15\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\6\24\1\u0144\4\0" + + "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\10\24\1\u0145\15\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\1\24\1\u0146" + + "\24\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\11\24\1\u0147\14\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\6\24\1\u0148\4\0\26\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\14\24\1\u0149\11\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\6\24\1\u014a\4\0\26\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\6\24\1\u014b\17\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\5\24\1\u014c\20\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\6\24\1\u014d" + + "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\10\24\1\u014e\15\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\6\24\1\u014f\4\0" + + "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\6\24\1\u0150\5\24\1\u0151\11\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\6\24\1\u0152" + + "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\2\24\1\u0153\23\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\6\24\1\u0154\4\0" + + "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\2\24\1\u0155\23\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\16\24\1\u0156" + + "\7\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\14\24\1\u0157\11\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\10\24\1\u0158" + + "\15\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\22\24\1\u0159\3\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\3\24\1\u015a" + + "\22\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\14\24\1\u015b\11\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\13\24\1\u015c" + + "\12\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\11\24\1\u015d\14\24\35\0\1\u015e\1\0" + + "\1\u015e\3\0\3\u015e\5\0\1\u015e\2\0\4\u015e\4\0" + + "\1\u015e\1\0\1\u015e\1\0\1\u015e\6\0\1\u015e\47\0" + + "\1\u015f\1\0\1\u015f\3\0\3\u015f\5\0\1\u015f\2\0" + + "\4\u015f\4\0\1\u015f\1\0\1\u015f\1\0\1\u015f\6\0" + + "\1\u015f\30\0\2\u0160\5\0\2\u0124\1\0\1\u0160\1\0" + + "\1\u0124\1\u0161\5\u0124\2\0\4\u0124\4\0\7\u0124\4\0" + + "\26\u0124\32\0\1\u0162\124\0\1\u0163\75\0\2\u0128\3\0" + + "\1\u0128\1\0\5\u0128\2\0\4\u0128\4\0\7\u0128\4\0" + + "\26\u0128\35\0\1\u0164\1\0\1\u0164\3\0\3\u0164\5\0" + + "\1\u0164\2\0\4\u0164\4\0\1\u0164\1\0\1\u0164\1\0" + + "\1\u0164\6\0\1\u0164\47\0\1\u0165\1\0\1\u0165\3\0" + + "\3\u0165\5\0\1\u0165\2\0\4\u0165\4\0\1\u0165\1\0" + + "\1\u0165\1\0\1\u0165\6\0\1\u0165\51\0\1\u012b\13\0" + + "\1\u012b\3\0\1\u012b\37\0\1\u0166\113\0\1\u0166\11\0" + + "\1\336\2\337\1\336\1\u0131\1\u012f\40\336\1\342\45\336" + + "\4\337\1\335\1\u0130\106\337\1\336\2\337\1\336\1\340" + + "\1\u012f\13\336\1\u0132\15\336\1\u0132\1\336\1\u0132\2\336" + + "\1\u0132\1\336\1\342\2\336\24\u0132\17\336\27\0\1\u0167" + + "\72\0\3\24\7\0\3\24\3\0\4\24\4\0\6\24" + + "\1\u0168\4\0\26\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\14\24\1\u0169\11\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\10\24\1\u016a\15\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\7\24\1\u016b\16\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\3\24\1\u016c\22\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\1\24\1\u016d\24\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\16\24\1\u016e\7\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\10\24\1\u016f\15\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\11\24\1\u0170\14\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\5\24\1\u0171\20\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\11\24\1\u0172\14\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\1\24\1\u0173\24\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\4\24\1\u0174\21\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\1\24\1\u0175\24\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\22\24\1\u0176\3\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\5\24\1\u0177\20\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\15\24\1\u0178\10\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\6\24\1\u0179\17\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\2\24\1\u017a\23\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\1\24\1\u017b\24\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\1\24\1\u017c\24\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\6\24\1\u017d\4\0\26\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\3\24\1\u017e\3\24" + + "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\12\24\1\u017f\13\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\10\24" + + "\1\u0180\15\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\21\24\1\u0181\4\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\6\24\1\u0182\4\0" + + "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\6\24\1\u0183\4\0\26\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\2\24\1\u0184\23\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\2\24\1\u0185\23\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\11\24\1\u0186\14\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\7\24\1\u0187\16\24\16\0\2\u0160\10\0\1\u0160" + + "\2\0\1\u0161\124\0\1\u0188\114\0\1\u0189\71\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\14\24" + + "\1\u018a\11\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\11\24\1\u018b\14\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\13\24" + + "\1\u018c\12\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\7\24\1\u018d\16\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\7\24" + + "\1\u018e\16\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\4\24\1\u018f\21\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\16\24" + + "\1\u0190\7\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\11\24\1\u0191\14\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\6\24\1\u0192\4\0" + + "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\17\24\1\u0193\6\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\3\24\1\u0194\3\24\4\0" + + "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\7\24\1\u0195\16\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\3\24\1\u0196\3\24\4\0" + + "\7\24\1\u0197\16\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\10\24\1\u0198\15\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\21\24\1\u0199\4\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\7\24\4\0\11\24\1\u019a\14\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\14\24\1\u019b\11\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\6\24\1\u019c\4\0\26\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\11\24" + + "\1\u019d\14\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\4\24\1\u019e\21\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\10\24" + + "\1\u019f\15\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\23\24\1\u01a0\2\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\4\24" + + "\1\u01a1\21\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\11\24\1\u01a2\14\24\45\0\1\u01a3" + + "\114\0\1\u01a4\70\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\20\24\1\u01a5\5\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\6\24" + + "\1\u01a6\17\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\5\24\1\u01a7\20\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\12\24" + + "\1\u01a8\13\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\13\24\1\u01a9\12\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24" + + "\1\u01aa\23\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\4\24\1\u01ab\21\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\2\24" + + "\1\u01ac\23\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\2\24\1\u01ad\23\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\6\24\1\u01ae\4\0" + + "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\7\24\1\u01af\16\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\10\24\1\u01b0" + + "\15\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\4\24\1\u01b1\21\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\10\24\1\u01b2" + + "\15\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\6\24\1\u01b3\4\0\26\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\6\24\1\u01b4\4\0\26\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\10\24\1\u01b5\15\24\46\0\1\u01b6\112\0\1\u01b7\71\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\7\24\4\0" + + "\7\24\1\u01b8\16\24\23\0\3\24\7\0\3\24\3\0" + + "\4\24\4\0\6\24\1\u01b9\4\0\26\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\6\24\1\u01ba\4\0" + + "\26\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\7\24\4\0\4\24\1\u01bb\21\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\6\24\1\u01bc\4\0\26\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\4\24\1\u01bd\21\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\14\24\1\u01be\11\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\7\24\1\u01bf\16\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\6\24\1\u01c0\4\0\26\24\23\0" + + "\3\24\7\0\3\24\3\0\4\24\4\0\6\24\1\u01c1" + + "\4\0\26\24\23\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\7\24\4\0\20\24\1\u01c2\5\24\45\0\1\u01c3" + + "\110\0\1\u01c4\74\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\6\24\1\u01c5\4\0\26\24\23\0\3\24\7\0" + + "\3\24\3\0\4\24\4\0\7\24\4\0\6\24\1\u01c6" + + "\17\24\23\0\3\24\7\0\3\24\3\0\4\24\4\0" + + "\6\24\1\u01c7\4\0\26\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\10\24\1\u01c8\15\24" + + "\23\0\3\24\7\0\3\24\3\0\4\24\4\0\7\24" + + "\4\0\13\24\1\u01c9\12\24\23\0\3\24\7\0\3\24" + + "\3\0\4\24\4\0\7\24\4\0\13\24\1\u01ca\12\24" + + "\42\0\1\u01cb\74\0\3\24\7\0\3\24\3\0\4\24" + + "\4\0\3\24\1\u01cc\3\24\4\0\26\24\23\0\3\24" + + "\7\0\3\24\3\0\4\24\4\0\7\24\4\0\5\24" + + "\1\u01cd\20\24\15\0"; - /** the current lexical state */ - private int zzLexicalState = YYINITIAL; + private static int[] zzUnpackTrans() { + int[] result = new int[23712]; + 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 */ + 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); + } + return j; + } - /** the textposition at the last accepting state */ - private int zzMarkedPos; - /** the current text position in the buffer */ - private int zzCurrentPos; + /* 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; - /** startRead marks the beginning of the yytext() string in the buffer */ - private int zzStartRead; + /* 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" + }; - /** endRead marks the last character in the buffer, that has been read - from input */ - private int zzEndRead; + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - /** number of newlines encountered up to the start of the matched text */ - private int yyline; + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\15\0\1\11\1\1\1\11\13\1\3\11\1\1\2\11" + + "\27\1\7\11\4\1\1\11\2\1\2\11\3\1\2\11" + + "\1\1\1\11\3\1\2\11\1\1\1\11\1\1\2\11" + + "\3\1\1\11\2\1\2\11\1\1\1\11\2\1\1\0" + + "\1\1\1\0\1\1\1\0\1\11\1\1\1\11\1\1" + + "\1\11\2\1\1\0\2\11\1\1\2\11\1\1\2\11" + + "\1\0\3\1\1\0\7\1\2\11\1\0\1\1\1\11" + + "\44\1\1\11\1\1\1\11\1\1\5\11\1\1\6\11" + + "\1\1\1\11\1\0\1\11\1\0\2\11\3\0\1\1" + + "\2\0\2\11\1\1\7\11\2\1\2\0\2\1\1\11" + + "\2\0\1\1\2\0\1\1\2\11\2\0\1\11\1\1" + + "\1\11\1\0\1\1\1\11\60\1\2\11\2\0\2\11" + + "\1\0\1\11\2\0\1\1\4\0\2\11\2\0\2\1" + + "\1\11\1\0\1\11\50\1\1\11\2\0\2\11\1\0" + + "\1\11\1\0\1\11\1\0\40\1\2\0\31\1\2\0" + + "\21\1\2\0\13\1\1\0\1\11\6\1\1\11\2\1"; - /** the number of characters up to the start of the matched text */ - private int yychar; + private static int[] zzUnpackAttribute() { + int[] result = new int[461]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - private int yycolumn; + 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); + } + return j; + } - /** - * zzAtBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean zzAtBOL = true; + /** + * the input device + */ + private java.io.Reader zzReader; - /** zzAtEOF == true <=> the scanner is at the EOF */ - private boolean zzAtEOF; + /** + * the current state of the DFA + */ + private int zzState; - /** 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; + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; - /* user code: */ + /** + * 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; private int repeatNum = 1; private boolean enableWhiteSpace = false; - public ActionScriptLexer(String sourceCode){ + public ActionScriptLexer(String sourceCode) { this(new StringReader(sourceCode)); this.sourceCode = sourceCode; } - public void yypushbackstr(String s, int state) - { + public void yypushbackstr(String s, int state) { int numLines = count(s, "\n"); int newYyline = yyline - numLines; sourceCode = s + sourceCode.substring(yychar + yylength()); @@ -938,19 +978,16 @@ public final class ActionScriptLexer { yyline = newYyline; } - public void setEnableWhiteSpace(boolean enable) - { + public void setEnableWhiteSpace(boolean enable) { this.enableWhiteSpace = enable; } - public void begin(int state) - { + public void begin(int state) { string.setLength(0); yybegin(state); } - public void yypushbackstr(String s) - { + public void yypushbackstr(String s) { yypushbackstr(s, YYINITIAL); } @@ -968,24 +1005,24 @@ public final class ActionScriptLexer { 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); } } @@ -997,9 +1034,10 @@ public final class ActionScriptLexer { } ParsedSymbol last; - public ParsedSymbol lex() throws java.io.IOException, AVM2ParseException{ + + public ParsedSymbol lex() throws java.io.IOException, AVM2ParseException { ParsedSymbol ret = null; - if (!pushedBack.isEmpty()){ + if (!pushedBack.isEmpty()) { ret = last = pushedBack.pop(); } else { ret = last = yylex(); @@ -1012,1168 +1050,1389 @@ public final class ActionScriptLexer { return (str.length() - str.replace(target, "").length()) / target.length(); } - - /** - * 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 < 3136) { - 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; - } - - /* 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 */ - if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { - --zzEndRead; - zzFinalHighSurrogate = 1; + /** + * 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 < 3136) { + 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. - */ - 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 */ + if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) { + --zzEndRead; + zzFinalHighSurrogate = 1; + } + } + return false; + } - /** - * Returns the current lexical state. - */ - public final int yystate() { - return zzLexicalState; - } - - - /** - * 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. - */ - 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. - */ - 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. + */ + public final void yyclose() throws java.io.IOException { + zzAtEOF = true; + /* indicate end of file */ + zzEndRead = zzStartRead; + /* invalidate buffer */ + if (zzReader != null) { + zzReader.close(); + } + } - /** - * 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); + /** + * 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]; + } + } - zzMarkedPos -= number; - } + /** + * Returns the current lexical state. + */ + public final int yystate() { + return zzLexicalState; + } + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } - /** - * 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 - */ - public ParsedSymbol yylex() throws java.io.IOException, AVM2ParseException { - int zzInput; - int zzAction; + /** + * Returns the text matched by the current regular expression. + */ + public final String yytext() { + return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); + } - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char [] zzBufferL = zzBuffer; - char [] zzCMapL = ZZ_CMAP; + /** + * 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]; + } - int [] zzTransL = ZZ_TRANS; - int [] zzRowMapL = ZZ_ROWMAP; - int [] zzAttrL = ZZ_ATTRIBUTE; + /** + * Returns the length of the matched text region. + */ + public final int yylength() { + return zzMarkedPos - zzStartRead; + } - while (true) { - zzMarkedPosL = zzMarkedPos; + /** + * 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]; + } - yychar+= zzMarkedPosL-zzStartRead; + throw new Error(message); + } - zzAction = -1; + /** + * 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); + } - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = ZZ_LEXSTATE[zzLexicalState]; + zzMarkedPos -= number; + } - // set up zzAction for empty match case: - int zzAttributes = zzAttrL[zzState]; - if ( (zzAttributes & 1) == 1 ) { - zzAction = zzState; - } + /** + * 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 + */ + 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 180: + break; + case 2: { + yyline++; + if (enableWhiteSpace) { + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_WHITESPACE, yytext()); + } + } + case 181: + break; + case 3: { + if (enableWhiteSpace) { + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_WHITESPACE, yytext()); + } + } + case 182: + break; + case 4: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DIVIDE, yytext()); + } + case 183: + break; + case 5: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MULTIPLY, yytext()); + } + case 184: + break; + case 6: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.IDENTIFIER, yytext()); + } + case 185: + break; + case 7: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DOT, yytext()); + } + case 186: + break; + case 8: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.LOWER_THAN, yytext()); + } + case 187: + break; + case 9: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NOT, yytext()); + } + case 188: + break; + case 10: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MINUS, yytext()); + } + case 189: + break; + case 11: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.GREATER_THAN, yytext()); + } + case 190: + break; + case 12: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.COLON, yytext()); + } + case 191: + break; + case 13: { + try { + return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Integer.parseInt(yytext())); + } catch (NumberFormatException nfe) { + //its too long for an Integer var + return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, Double.parseDouble(yytext())); + } + } + case 192: + break; + case 14: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.TERNAR, yytext()); + } + case 193: + break; + case 15: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BRACKET_OPEN, yytext()); + } + case 194: + break; + case 16: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BRACKET_CLOSE, yytext()); + } + case 195: + break; + case 17: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN, yytext()); + } + case 196: + break; + case 18: { + string.setLength(0); + yybegin(STRING); + } + case 197: + break; + case 19: { + string.setLength(0); + yybegin(CHARLITERAL); + } + case 198: + break; + case 20: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PLUS, yytext()); + } + case 199: + break; + case 21: { + string.setLength(0); + yybegin(OIDENTIFIER); + } + case 200: + break; + case 22: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PARENT_OPEN, yytext()); + } + case 201: + break; + case 23: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PARENT_CLOSE, yytext()); + } + case 202: + break; + case 24: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.CURLY_OPEN, yytext()); + } + case 203: + break; + case 25: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.CURLY_CLOSE, yytext()); + } + case 204: + break; + case 26: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SEMICOLON, yytext()); + } + case 205: + break; + case 27: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.COMMA, yytext()); + } + case 206: + break; + case 28: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NEGATE, yytext()); + } + case 207: + break; + case 29: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BITAND, yytext()); + } + case 208: + break; + case 30: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BITOR, yytext()); + } + case 209: + break; + case 31: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.XOR, yytext()); + } + case 210: + break; + case 32: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MODULO, yytext()); + } + case 211: + break; + case 33: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ATTRIBUTE, yytext()); + } + case 212: + break; + case 34: { + string.append(yytext()); + } + case 213: + break; + case 35: { + yybegin(YYINITIAL); + yyline++; + } + case 214: + break; + case 36: { + yybegin(YYINITIAL); + // length also includes the trailing quote + String tos = string.toString(); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.STRING, SymbolType.STRING, tos); + } + case 215: + break; + case 37: { + yybegin(YYINITIAL); + yyline++; + } + case 216: + break; + case 38: { + yybegin(YYINITIAL); + // length also includes the trailing quote + return new ParsedSymbol(SymbolGroup.STRING, SymbolType.STRING, string.toString()); + } + case 217: + break; + case 39: { + string.append(yytext()); + yyline++; + } + case 218: + break; + case 40: { + 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 219: + break; + case 41: { + 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 220: + break; + case 42: { + yybegin(XML); + pushback(new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.GREATER_THAN, yytext())); + if (string.length() > 0) { + pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); + string.setLength(0); + } + return lex(); + } + case 221: + break; + case 43: { + yybegin(YYINITIAL); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRVALVAR_BEGIN, yytext()); + } + case 222: + break; + case 44: { + string.append(yytext()); + yyline++; + } + case 223: + break; + case 45: { + 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 224: + break; + case 46: { + for (int r = 0; r < repeatNum; r++) { + string.append(yytext()); + } + repeatNum = 1; + } + case 225: + break; + case 47: { + yybegin(YYINITIAL); + repeatNum = 1; + // length also includes the trailing quote + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.IDENTIFIER, string.toString()); + } + case 226: + break; + case 48: { + yyline += count(yytext(), "\n"); + } + case 227: + break; + case 49: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_DIVIDE, yytext()); + } + case 228: + break; + case 50: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_MULTIPLY, yytext()); + } + case 229: + break; + case 51: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DESCENDANTS, yytext()); + } + case 230: + break; + case 52: { + return new ParsedSymbol(SymbolGroup.TYPENAME, SymbolType.TYPENAME, yytext()); + } + case 231: + break; + case 53: { + return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, Double.parseDouble(yytext())); + } + case 232: + break; + case 54: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.FILTER, yytext()); + } + case 233: + break; + case 55: { + yybegin(XMLOPENTAG); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTTAG_BEGIN, yytext()); + } + case 234: + break; + case 56: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SHIFT_LEFT, yytext()); + } + case 235: + break; + case 57: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.LOWER_EQUAL, yytext()); + } + case 236: + break; + case 58: { + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_STARTVARTAG_BEGIN, yytext()); + } + case 237: + break; + case 59: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NOT_EQUAL, yytext()); + } + case 238: + break; + case 60: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DECREMENT, yytext()); + } + case 239: + break; + case 61: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_MINUS, yytext()); + } + case 240: + break; + case 62: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SHIFT_RIGHT, yytext()); + } + case 241: + break; + case 63: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.GREATER_EQUAL, yytext()); + } + case 242: + break; + case 64: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NAMESPACE_OP, yytext()); + } + case 243: + break; + case 65: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.EQUALS, yytext()); + } + case 244: + break; + case 66: { + try { + return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Integer.parseInt(yytext(), 8)); + } catch (NumberFormatException nfe) { + //its too long for an Integer var + return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, new BigInteger(yytext(), 8).doubleValue()); + } + } + case 245: + break; + case 67: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_PLUS, yytext()); + } + case 246: + break; + case 68: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.INCREMENT, yytext()); + } + case 247: + break; + case 69: { + return new ParsedSymbol(SymbolGroup.NAMESPACESUFFIX, SymbolType.NAMESPACESUFFIX, Integer.parseInt(yytext().substring(1))); + } + case 248: + break; + case 70: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.AS, yytext()); + } + case 249: + break; + case 71: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IF, yytext()); + } + case 250: + break; + case 72: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.IS, yytext()); + } + case 251: + break; + case 73: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IN, yytext()); + } + case 252: + break; + case 74: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.DO, yytext()); + } + case 253: + break; + case 75: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_BITAND, yytext()); + } + case 254: + break; + case 76: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.AND, yytext()); + } + case 255: + break; + case 77: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_BITOR, yytext()); + } + case 256: + break; + case 78: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.OR, yytext()); + } + case 257: + break; + case 79: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_XOR, yytext()); + } + case 258: + break; + case 80: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_MODULO, yytext()); + } + case 259: + break; + case 81: { + /* ignore illegal character escape */ + } + case 260: + break; + case 82: { + string.append('\"'); + } + case 261: + break; + case 83: { + string.append('\''); + } + case 262: + break; + case 84: { + string.append('\f'); + } + case 263: + break; + case 85: { + string.append('\\'); + } + case 264: + break; + case 86: { + string.append('\b'); + } + case 265: + break; + case 87: { + string.append('\r'); + } + case 266: + break; + case 88: { + string.append('\n'); + } + case 267: + break; + case 89: { + string.append('\t'); + } + case 268: + break; + case 90: { + 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 269: + break; + case 91: { + 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 270: + break; + case 92: { + yybegin(XMLOPENTAG); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRIBUTEVALUE, yytext()); + } + case 271: + break; + case 93: { + yybegin(XML); + string.append(yytext()); + String tos = string.toString(); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_INSTR, tos); + } + case 272: + break; + case 94: { + 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 273: + break; + case 95: { + 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 274: + break; + case 96: { + throw new AVM2ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); + } + case 275: + break; + case 97: { + for (int r = 0; r < repeatNum; r++) { + string.append('\f'); + } + repeatNum = 1; + } + case 276: + break; + case 98: { + for (int r = 0; r < repeatNum; r++) { + string.append('\\'); + } + repeatNum = 1; + } + case 277: + break; + case 99: { + for (int r = 0; r < repeatNum; r++) { + string.append('\u00A7'); + } + repeatNum = 1; + } + case 278: + break; + case 100: { + for (int r = 0; r < repeatNum; r++) { + string.append('\b'); + } + repeatNum = 1; + } + case 279: + break; + case 101: { + for (int r = 0; r < repeatNum; r++) { + string.append('\r'); + } + repeatNum = 1; + } + case 280: + break; + case 102: { + for (int r = 0; r < repeatNum; r++) { + string.append('\n'); + } + repeatNum = 1; + } + case 281: + break; + case 103: { + for (int r = 0; r < repeatNum; r++) { + string.append('\t'); + } + repeatNum = 1; + } + case 282: + break; + case 104: { + return new ParsedSymbol(SymbolGroup.REGEXP, SymbolType.REGEXP, yytext()); + } + case 283: + break; + case 105: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.REST, yytext()); + } + case 284: + break; + case 106: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_SHIFT_LEFT, yytext()); + } + case 285: + break; + case 107: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.STRICT_NOT_EQUAL, yytext()); + } + case 286: + break; + case 108: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.USHIFT_RIGHT, yytext()); + } + case 287: + break; + case 109: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_SHIFT_RIGHT, yytext()); + } + case 288: + break; + case 110: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.STRICT_EQUALS, yytext()); + } + case 289: + break; + case 111: { + try { + return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Integer.parseInt(yytext().substring(2), 16)); + } catch (NumberFormatException nfe) { + //its too long for an Integer var + return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, new BigInteger(yytext().substring(2), 16).doubleValue()); + } + } + case 290: + break; + case 112: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FOR, yytext()); + } + case 291: + break; + case 113: { + return new ParsedSymbol(SymbolGroup.PREPROCESSOR, SymbolType.PREPROCESSOR, yytext().substring(2)); + } + case 292: + break; + case 114: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.SET, yytext()); + } + case 293: + break; + case 115: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NEW, yytext()); + } + case 294: + break; + case 116: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.TRY, yytext()); + } + case 295: + break; + case 117: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.USE, yytext()); + } + case 296: + break; + case 118: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.VAR, yytext()); + } + case 297: + break; + case 119: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.GET, yytext()); + } + case 298: + break; + case 120: { + return new ParsedSymbol(SymbolGroup.GLOBALCONST, SymbolType.NAN, yytext()); + } + case 299: + break; + case 121: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_AND, yytext()); + } + case 300: + break; + case 122: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_OR, yytext()); + } + case 301: + break; + case 123: { + string.append(yytext()); + yybegin(XML); + String ret = string.toString(); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_CDATA, ret); + } + case 302: + break; + case 124: { + string.append(yytext()); + yybegin(XML); + String ret = string.toString(); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_COMMENT, ret); + } + case 303: + break; + case 125: { + 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 304: + break; + case 126: { + yybegin(XMLINSTR); + if (string.length() > 0) { + String tos = string.toString(); + string.setLength(0); + string.append(yytext()); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, tos); + } + string.append(yytext()); + } + case 305: + break; + case 127: { + string.append(yytext()); + yybegin(YYINITIAL); + String ret = string.toString(); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_CDATA, ret); + } + case 306: + break; + case 128: { + string.append(yytext()); + yybegin(YYINITIAL); + String ret = string.toString(); + string.setLength(0); + return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_COMMENT, ret); + } + case 307: + break; + case 129: { + string.setLength(0); + string.append(yytext()); + yybegin(XMLCOMMENTALONE); + } + case 308: + break; + case 130: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_USHIFT_RIGHT, yytext()); + } + case 309: + break; + case 131: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.EACH, yytext()); + } + case 310: + break; + case 132: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.ELSE, yytext()); + } + case 311: + break; + case 133: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CASE, yytext()); + } + case 312: + break; + case 134: { + return new ParsedSymbol(SymbolGroup.GLOBALCONST, SymbolType.NULL, yytext()); + } + case 313: + break; + case 135: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.TRUE, yytext()); + } + case 314: + break; + case 136: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.THIS, yytext()); + } + case 315: + break; + case 137: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.WITH, yytext()); + } + case 316: + break; + case 138: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.VOID, yytext()); + } + case 317: + break; + case 139: { + char val = (char) Integer.parseInt(yytext().substring(2), 16); + string.append(val); + } + case 318: + break; + case 140: { + 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 319: + break; + case 141: { + 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 320: + break; + case 142: { + char val = (char) Integer.parseInt(yytext().substring(2), 16); + for (int r = 0; r < repeatNum; r++) { + string.append(val); + } + repeatNum = 1; + } + case 321: + break; + case 143: { + repeatNum = Integer.parseInt(yytext().substring(2, yytext().length() - 1)); + } + case 322: + break; + case 144: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FALSE, yytext()); + } + case 323: + break; + case 145: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.FINAL, yytext()); + } + case 324: + break; + case 146: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.BREAK, yytext()); + } + case 325: + break; + case 147: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CATCH, yytext()); + } + case 326: + break; + case 148: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CONST, yytext()); + } + case 327: + break; + case 149: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CLASS, yytext()); + } + case 328: + break; + case 150: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.SUPER, yytext()); + } + case 329: + break; + case 151: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.THROW, yytext()); + } + case 330: + break; + case 152: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.WHILE, yytext()); + } + case 331: + break; + case 153: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.RETURN, yytext()); + } + case 332: + break; + case 154: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.STATIC, yytext()); + } + case 333: + break; + case 155: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.SWITCH, yytext()); + } + case 334: + break; + case 156: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.NATIVE, yytext()); + } + case 335: + break; + case 157: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.TYPEOF, yytext()); + } + case 336: + break; + case 158: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IMPORT, yytext()); + } + case 337: + break; + case 159: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DELETE, yytext()); + } + case 338: + break; + case 160: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PUBLIC, yytext()); + } + case 339: + break; + case 161: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FINALLY, yytext()); + } + case 340: + break; + case 162: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.EXTENDS, yytext()); + } + case 341: + break; + case 163: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.DEFAULT, yytext()); + } + case 342: + break; + case 164: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.DYNAMIC, yytext()); + } + case 343: + break; + case 165: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PRIVATE, yytext()); + } + case 344: + break; + case 166: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PACKAGE, yytext()); + } + case 345: + break; + case 167: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.FUNCTION, yytext()); + } + case 346: + break; + case 168: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CONTINUE, yytext()); + } + case 347: + break; + case 169: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.OVERRIDE, yytext()); + } + case 348: + break; + case 170: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.INTERNAL, yytext()); + } + case 349: + break; + case 171: { + return new ParsedSymbol(SymbolGroup.GLOBALCONST, SymbolType.INFINITY, yytext()); + } + case 350: + break; + case 172: { + string.setLength(0); + string.append(yytext()); + yybegin(XMLCDATAALONE); + } + case 351: + break; + case 173: { + return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.NAMESPACE, yytext()); + } + case 352: + break; + case 174: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.INTERFACE, yytext()); + } + case 353: + break; + case 175: { + return new ParsedSymbol(SymbolGroup.GLOBALCONST, SymbolType.UNDEFINED, yytext()); + } + case 354: + break; + case 176: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.PROTECTED, yytext()); + } + case 355: + break; + case 177: { + 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 356: + break; + case 178: { + return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.INSTANCEOF, yytext()); + } + case 357: + break; + case 179: { + return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.IMPLEMENTS, yytext()); + } + case 358: + 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 180: break; - case 2: - { yyline++; - if (enableWhiteSpace) { return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_WHITESPACE, yytext()); } - } - case 181: break; - case 3: - { if (enableWhiteSpace) { return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_WHITESPACE, yytext()); } - } - case 182: break; - case 4: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DIVIDE, yytext()); - } - case 183: break; - case 5: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MULTIPLY, yytext()); - } - case 184: break; - case 6: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.IDENTIFIER, yytext()); - } - case 185: break; - case 7: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.DOT, yytext()); - } - case 186: break; - case 8: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.LOWER_THAN, yytext()); - } - case 187: break; - case 9: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NOT, yytext()); - } - case 188: break; - case 10: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MINUS, yytext()); - } - case 189: break; - case 11: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.GREATER_THAN, yytext()); - } - case 190: break; - case 12: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.COLON, yytext()); - } - case 191: break; - case 13: - { try{ - return new ParsedSymbol(SymbolGroup.INTEGER, SymbolType.INTEGER, Integer.parseInt(yytext())); - } catch(NumberFormatException nfe){ - //its too long for an Integer var - return new ParsedSymbol(SymbolGroup.DOUBLE, SymbolType.DOUBLE, Double.parseDouble(yytext())); - } - } - case 192: break; - case 14: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.TERNAR, yytext()); - } - case 193: break; - case 15: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BRACKET_OPEN, yytext()); - } - case 194: break; - case 16: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BRACKET_CLOSE, yytext()); - } - case 195: break; - case 17: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN, yytext()); - } - case 196: break; - case 18: - { string.setLength(0); - yybegin(STRING); - } - case 197: break; - case 19: - { string.setLength(0); - yybegin(CHARLITERAL); - } - case 198: break; - case 20: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PLUS, yytext()); - } - case 199: break; - case 21: - { string.setLength(0); - yybegin(OIDENTIFIER); - } - case 200: break; - case 22: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PARENT_OPEN, yytext()); - } - case 201: break; - case 23: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.PARENT_CLOSE, yytext()); - } - case 202: break; - case 24: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.CURLY_OPEN, yytext()); - } - case 203: break; - case 25: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.CURLY_CLOSE, yytext()); - } - case 204: break; - case 26: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.SEMICOLON, yytext()); - } - case 205: break; - case 27: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.COMMA, yytext()); - } - case 206: break; - case 28: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.NEGATE, yytext()); - } - case 207: break; - case 29: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BITAND, yytext()); - } - case 208: break; - case 30: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.BITOR, yytext()); - } - case 209: break; - case 31: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.XOR, yytext()); - } - case 210: break; - case 32: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.MODULO, yytext()); - } - case 211: break; - case 33: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ATTRIBUTE, yytext()); - } - case 212: break; - case 34: - { string.append(yytext()); - } - case 213: break; - case 35: - { yybegin(YYINITIAL); yyline++; - } - case 214: break; - case 36: - { yybegin(YYINITIAL); - // length also includes the trailing quote - String tos = string.toString(); - string.setLength(0); - return new ParsedSymbol(SymbolGroup.STRING, SymbolType.STRING, tos); - } - case 215: break; - case 37: - { yybegin(YYINITIAL); yyline++; - } - case 216: break; - case 38: - { yybegin(YYINITIAL); - // length also includes the trailing quote - return new ParsedSymbol(SymbolGroup.STRING, SymbolType.STRING, string.toString()); - } - case 217: break; - case 39: - { string.append(yytext()); yyline++; - } - case 218: break; - case 40: - { 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 219: break; - case 41: - { 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 220: break; - case 42: - { yybegin(XML); - pushback(new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.GREATER_THAN, yytext())); - if (string.length() > 0){ - pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 221: break; - case 43: - { yybegin(YYINITIAL); - return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRVALVAR_BEGIN, yytext()); - } - case 222: break; - case 44: - { string.append(yytext()); yyline++; - } - case 223: break; - case 45: - { 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 224: break; - case 46: - { for(int r=0;r 0){ - pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 269: break; - case 91: - { 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 270: break; - case 92: - { yybegin(XMLOPENTAG); - return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_ATTRIBUTEVALUE, yytext()); - } - case 271: break; - case 93: - { yybegin(XML); - string.append(yytext()); - String tos = string.toString(); - string.setLength(0); - return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_INSTR, tos); - } - case 272: break; - case 94: - { 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 273: break; - case 95: - { 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 274: break; - case 96: - { throw new AVM2ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); - } - case 275: break; - case 97: - { for(int r=0;r 0){ - pushback(new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, string.toString())); - string.setLength(0); - } - return lex(); - } - case 304: break; - case 126: - { yybegin(XMLINSTR); - if (string.length() > 0){ - String tos = string.toString(); - string.setLength(0); - string.append(yytext()); - return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_TEXT, tos); - } - string.append(yytext()); - } - case 305: break; - case 127: - { string.append(yytext()); - yybegin(YYINITIAL); - String ret = string.toString(); - string.setLength(0); - return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_CDATA, ret); - } - case 306: break; - case 128: - { string.append(yytext()); - yybegin(YYINITIAL); - String ret = string.toString(); - string.setLength(0); - return new ParsedSymbol(SymbolGroup.XML, SymbolType.XML_COMMENT, ret); - } - case 307: break; - case 129: - { string.setLength(0); string.append(yytext() ); yybegin(XMLCOMMENTALONE); - } - case 308: break; - case 130: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.ASSIGN_USHIFT_RIGHT, yytext()); - } - case 309: break; - case 131: - { return new ParsedSymbol(SymbolGroup.IDENTIFIER, SymbolType.EACH, yytext()); - } - case 310: break; - case 132: - { return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.ELSE, yytext()); - } - case 311: break; - case 133: - { return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.CASE, yytext()); - } - case 312: break; - case 134: - { return new ParsedSymbol(SymbolGroup.GLOBALCONST, SymbolType.NULL, yytext()); - } - case 313: break; - case 135: - { return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.TRUE, yytext()); - } - case 314: break; - case 136: - { return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.THIS, yytext()); - } - case 315: break; - case 137: - { return new ParsedSymbol(SymbolGroup.KEYWORD, SymbolType.WITH, yytext()); - } - case 316: break; - case 138: - { return new ParsedSymbol(SymbolGroup.OPERATOR, SymbolType.VOID, yytext()); - } - case 317: break; - case 139: - { char val = (char) Integer.parseInt(yytext().substring(2), 16); - string.append(val); - } - case 318: break; - case 140: - { 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 319: break; - case 141: - { 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 320: break; - case 142: - { char val = (char) Integer.parseInt(yytext().substring(2), 16); - for(int r=0;r>> metadata, List importedClasses, NamespaceItem pkg, List openedNamespaces, boolean isFinal, boolean isDynamic, String className, GraphTargetItem extendsOp, List implementsOp, List cinit, boolean staticInitActivation, List cinitVariables, GraphTargetItem iinit, List iinitVariables, List traits, boolean iinitActivation) { super(null, null, NOPRECEDENCE); this.metadata = metadata; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java index 5a59102f3..62576423b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstAVM2Item.java @@ -42,7 +42,7 @@ public class ConstAVM2Item extends AVM2Item { public int line; public NamespaceItem pkg; - + public boolean generatedNs; public boolean isStatic() { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java index 408f76142..e3cbe8275 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ConstructSomethingAVM2Item.java @@ -19,7 +19,6 @@ package com.jpexs.decompiler.flash.abc.avm2.parser.script; import com.jpexs.decompiler.flash.SourceGeneratorLocalData; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; -import com.jpexs.decompiler.flash.abc.types.Namespace; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ImportedSlotConstItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ImportedSlotConstItem.java index 591814897..2a68bc651 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ImportedSlotConstItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ImportedSlotConstItem.java @@ -20,17 +20,11 @@ import com.jpexs.decompiler.flash.SourceGeneratorLocalData; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.FindPropertyStrictIns; -import static com.jpexs.decompiler.flash.abc.avm2.model.AVM2Item.ins; import com.jpexs.decompiler.flash.abc.avm2.model.FindPropertyAVM2Item; -import static com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item.dupSetTemp; -import static com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item.getTemp; -import static com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item.killTemp; -import static com.jpexs.decompiler.flash.abc.avm2.parser.script.AssignableAVM2Item.setTemp; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; -import static com.jpexs.decompiler.graph.GraphTargetItem.toSourceMerge; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java index 973faa6fd..f637290bc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java @@ -49,7 +49,7 @@ import java.util.Objects; public class NameAVM2Item extends AssignableAVM2Item { private boolean attribute; - + private String variableName; private boolean definition; @@ -75,7 +75,7 @@ public class NameAVM2Item extends AssignableAVM2Item { public GraphTargetItem redirect; private AbcIndexing abcIndex; - + private String namespaceSuffix; @Override @@ -91,8 +91,6 @@ public class NameAVM2Item extends AssignableAVM2Item { public boolean isAttribute() { return attribute; } - - public void setSlotScope(int slotScope) { this.slotScope = slotScope; @@ -149,8 +147,6 @@ public class NameAVM2Item extends AssignableAVM2Item { public String getNamespaceSuffix() { return namespaceSuffix; } - - public NameAVM2Item(GraphTargetItem type, int line, boolean attribute, String variableName, String namespaceSuffix, GraphTargetItem storeValue, boolean definition, List openedNamespaces, AbcIndexing abcIndex) { super(storeValue); @@ -366,10 +362,10 @@ public class NameAVM2Item extends AssignableAVM2Item { generateCoerce(localData, generator, returnType()), generateSetLoc(regNumber), slotNumber > -1 ? Arrays.asList( - ins(AVM2Instructions.GetScopeObject, slotScope), - ins(AVM2Instructions.Swap), - ins(AVM2Instructions.SetSlot, slotNumber) - ) : null + ins(AVM2Instructions.GetScopeObject, slotScope), + ins(AVM2Instructions.Swap), + ins(AVM2Instructions.SetSlot, slotNumber) + ) : null ); } @@ -415,6 +411,4 @@ public class NameAVM2Item extends AssignableAVM2Item { return Objects.equals(this.variableName, other.variableName); } - - } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespaceItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespaceItem.java index cbaaf927b..0bfb710f5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespaceItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NamespaceItem.java @@ -35,7 +35,7 @@ import java.util.Objects; public class NamespaceItem { public static final int KIND_NAMESPACE_CUSTOM = -2; - + public DottedChain name; public int kind; @@ -55,8 +55,8 @@ public class NamespaceItem { this.name = DottedChain.parseWithSuffix(name); this.kind = kind; } - - public NamespaceItem(int nsIndex) { + + public NamespaceItem(int nsIndex) { this.nsIndex = nsIndex; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java index b5391d0cb..1c2e1dd45 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/PropertyAVM2Item.java @@ -41,8 +41,11 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.LocalData; import com.jpexs.helpers.Reference; - -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; @@ -53,13 +56,13 @@ import java.util.logging.Logger; public class PropertyAVM2Item extends AssignableAVM2Item { public boolean attribute; - + public String propertyName; public GraphTargetItem object; public AbcIndexing abcIndex; - + public String namespaceSuffix; private final List openedNamespaces; @@ -75,7 +78,7 @@ public class PropertyAVM2Item extends AssignableAVM2Item { } public PropertyAVM2Item(GraphTargetItem object, boolean attribute, String propertyName, String namespaceSuffix, AbcIndexing abcIndex, List openedNamespaces, List callStack) { - this.attribute = attribute; + this.attribute = attribute; this.propertyName = propertyName; this.namespaceSuffix = namespaceSuffix; this.object = object; @@ -98,8 +101,6 @@ public class PropertyAVM2Item extends AssignableAVM2Item { return abc.getSelectedAbc().constants.getNamespaceSetId(nssa, true); } - - public void resolve(boolean mustExist, SourceGeneratorLocalData localData, Reference isType, Reference objectType, Reference propertyType, Reference propertyIndex, Reference propertyValue, Reference propertyValueABC) throws CompilationException { Integer namespaceSuffixInt = null; if (!"".equals(namespaceSuffix)) { @@ -139,120 +140,118 @@ public class PropertyAVM2Item extends AssignableAVM2Item { ttype = thisType; } - { - if (ttype.equals(new TypeItem(InitVectorAVM2Item.VECTOR_FQN))) { - switch ("" + objSubType) { - case "int": - ttype = new TypeItem(InitVectorAVM2Item.VECTOR_INT); - break; - case "Number": - ttype = new TypeItem(InitVectorAVM2Item.VECTOR_DOUBLE); - break; - case "uint": - ttype = new TypeItem(InitVectorAVM2Item.VECTOR_UINT); - break; - default: - ttype = new TypeItem(InitVectorAVM2Item.VECTOR_OBJECT); + if (ttype.equals(new TypeItem(InitVectorAVM2Item.VECTOR_FQN))) { + switch ("" + objSubType) { + case "int": + ttype = new TypeItem(InitVectorAVM2Item.VECTOR_INT); + break; + case "Number": + ttype = new TypeItem(InitVectorAVM2Item.VECTOR_DOUBLE); + break; + case "uint": + ttype = new TypeItem(InitVectorAVM2Item.VECTOR_UINT); + break; + default: + ttype = new TypeItem(InitVectorAVM2Item.VECTOR_OBJECT); + } + } + + if (ttype instanceof TypeItem) { + DottedChain ftn = ((TypeItem) ttype).fullTypeName; + Reference outName = new Reference<>(""); + Reference outNs = new Reference<>(DottedChain.EMPTY); + Reference outPropNs = new Reference<>(DottedChain.EMPTY); + Reference outPropNsKind = new Reference<>(1); + Reference outPropNsIndex = new Reference<>(0); + Reference outPropType = new Reference<>(null); + Reference outPropValue = new Reference<>(null); + Reference outPropValueAbc = new Reference<>(null); + List otherNs = new ArrayList<>(); + for (NamespaceItem n : openedNamespaces) { + if (n.isResolved()) { + otherNs.add(n.getCpoolIndex(abcIndex)); } } - - if (ttype instanceof TypeItem) { - DottedChain ftn = ((TypeItem) ttype).fullTypeName; - Reference outName = new Reference<>(""); - Reference outNs = new Reference<>(DottedChain.EMPTY); - Reference outPropNs = new Reference<>(DottedChain.EMPTY); - Reference outPropNsKind = new Reference<>(1); - Reference outPropNsIndex = new Reference<>(0); - Reference outPropType = new Reference<>(null); - Reference outPropValue = new Reference<>(null); - Reference outPropValueAbc = new Reference<>(null); - List otherNs = new ArrayList<>(); - for (NamespaceItem n : openedNamespaces) { - if (n.isResolved()) { - otherNs.add(n.getCpoolIndex(abcIndex)); - } - } - if ((object instanceof NameAVM2Item) && "super".equals(((NameAVM2Item) object).getVariableName())) - { - // super is special cause its static type is the super class, but it still allows access to protected members - // so for super to work we need to also allow the protected namespace of the super class - // however this namespace is in the ABC of the super class and not in abcIndex.getSelectedAbc() - AbcIndexing.ClassIndex ci = abcIndex.findClass(objType, null, null/*FIXME?*/); - int superProtectedNs = ci.abc.instance_info.get(ci.index).protectedNS; - AbcIndexing.TraitIndex sp = abcIndex.findProperty(new AbcIndexing.PropertyDef(propertyName, objType, ci.abc, superProtectedNs), false, true, true); - if (sp != null) { - objType = sp.objType; - Namespace ns = sp.trait.getName(sp.abc).getNamespace(sp.abc.constants); - propIndex = constants.getMultinameId(Multiname.createQName(false, - constants.getStringId(propertyName, true), - constants.getNamespaceId(ns.kind, ns.getName(sp.abc.constants), sp.abc == abc ? abc.constants.getNamespaceSubIndex(sp.trait.getName(sp.abc).namespace_index) : 0, true)), true - ); - propType = sp.returnType; - propValue = sp.value; - propValueAbc = sp.abc; - } - } - if (propType == null && AVM2SourceGenerator.searchPrototypeChain(namespaceSuffixInt, otherNs, localData.privateNs, localData.protectedNs, false, abcIndex, ftn.getWithoutLast(), ftn.getLast(), propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { - objType = new TypeItem(outNs.getVal().addWithSuffix(outName.getVal())); - propType = outPropType.getVal(); + if ((object instanceof NameAVM2Item) && "super".equals(((NameAVM2Item) object).getVariableName())) { + // super is special cause its static type is the super class, but it still allows access to protected members + // so for super to work we need to also allow the protected namespace of the super class + // however this namespace is in the ABC of the super class and not in abcIndex.getSelectedAbc() + AbcIndexing.ClassIndex ci = abcIndex.findClass(objType, null, null/*FIXME?*/); + int superProtectedNs = ci.abc.instance_info.get(ci.index).protectedNS; + AbcIndexing.TraitIndex sp = abcIndex.findProperty(new AbcIndexing.PropertyDef(propertyName, objType, ci.abc, superProtectedNs), false, true, true); + if (sp != null) { + objType = sp.objType; + Namespace ns = sp.trait.getName(sp.abc).getNamespace(sp.abc.constants); propIndex = constants.getMultinameId(Multiname.createQName(false, constants.getStringId(propertyName, true), - namespaceSuffixInt != null ? namespaceSuffixInt : constants.getNamespaceId(outPropNsKind.getVal(), outPropNs.getVal(), outPropNsIndex.getVal(), true)), true + constants.getNamespaceId(ns.kind, ns.getName(sp.abc.constants), sp.abc == abc ? abc.constants.getNamespaceSubIndex(sp.trait.getName(sp.abc).namespace_index) : 0, true)), true ); - propValue = outPropValue.getVal(); - propValueAbc = outPropValueAbc.getVal(); + propType = sp.returnType; + propValue = sp.value; + propValueAbc = sp.abc; } } + if (propType == null && AVM2SourceGenerator.searchPrototypeChain(namespaceSuffixInt, otherNs, localData.privateNs, localData.protectedNs, false, abcIndex, ftn.getWithoutLast(), ftn.getLast(), propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { + objType = new TypeItem(outNs.getVal().addWithSuffix(outName.getVal())); + propType = outPropType.getVal(); + propIndex = constants.getMultinameId(Multiname.createQName(false, + constants.getStringId(propertyName, true), + namespaceSuffixInt != null ? namespaceSuffixInt : constants.getNamespaceId(outPropNsKind.getVal(), outPropNs.getVal(), outPropNsIndex.getVal(), true)), true + ); + propValue = outPropValue.getVal(); + propValueAbc = outPropValueAbc.getVal(); + } + } - if (objType == null) { - for (MethodBody b : callStack) { - for (int i = 0; i < b.traits.traits.size(); i++) { - Trait t = b.traits.traits.get(i); - if (t.getName(abc).getName(constants, null, true, true).equals(propertyName)) { - if (t instanceof TraitSlotConst) { - TraitSlotConst tsc = (TraitSlotConst) t; - objType = new TypeItem(DottedChain.FUNCTION); - propType = AbcIndexing.multinameToType(tsc.type_index, constants); - propIndex = tsc.name_index; - if (!localData.traitUsages.containsKey(b)) { - localData.traitUsages.put(b, new ArrayList<>()); - } - localData.traitUsages.get(b).add(i); + if (objType == null) { + for (MethodBody b : callStack) { + for (int i = 0; i < b.traits.traits.size(); i++) { + Trait t = b.traits.traits.get(i); + if (t.getName(abc).getName(constants, null, true, true).equals(propertyName)) { + if (t instanceof TraitSlotConst) { + TraitSlotConst tsc = (TraitSlotConst) t; + objType = new TypeItem(DottedChain.FUNCTION); + propType = AbcIndexing.multinameToType(tsc.type_index, constants); + propIndex = tsc.name_index; + if (!localData.traitUsages.containsKey(b)) { + localData.traitUsages.put(b, new ArrayList<>()); } + localData.traitUsages.get(b).add(i); } } } - if (objType == null) { - loopobjType: - for (int i = 0; i < openedNamespaces.size(); i++) { - if (!openedNamespaces.get(i).isResolved()) { - continue; - } - int nsindex = openedNamespaces.get(i).getCpoolIndex(abcIndex); + } + if (objType == null) { + loopobjType: + for (int i = 0; i < openedNamespaces.size(); i++) { + if (!openedNamespaces.get(i).isResolved()) { + continue; + } + int nsindex = openedNamespaces.get(i).getCpoolIndex(abcIndex); - int nsKind = openedNamespaces.get(i).kind; - DottedChain nsname = openedNamespaces.get(i).name; - - if (nsname.isTopLevel()) { - continue; - } - - int name_index = 0; - int string_property_index = constants.getStringId(propertyName, false); - if (string_property_index > -1) { - for (int m = 1; m < constants.getMultinameCount(); m++) { - Multiname mname = constants.getMultiname(m); - if (mname.kind == Multiname.QNAME && - mname.name_index == string_property_index && - mname.namespace_index == nsindex) { - name_index = m; - break; - } + int nsKind = openedNamespaces.get(i).kind; + DottedChain nsname = openedNamespaces.get(i).name; + + if (nsname.isTopLevel()) { + continue; + } + + int name_index = 0; + int string_property_index = constants.getStringId(propertyName, false); + if (string_property_index > -1) { + for (int m = 1; m < constants.getMultinameCount(); m++) { + Multiname mname = constants.getMultiname(m); + if (mname.kind == Multiname.QNAME + && mname.name_index == string_property_index + && mname.namespace_index == nsindex) { + name_index = m; + break; } } - if (name_index > 0) { - //I believe these can be commented out... as it breaks #1840 - /*for (int c = 0; c < abc.instance_info.size(); c++) { + } + if (name_index > 0) { + //I believe these can be commented out... as it breaks #1840 + /*for (int c = 0; c < abc.instance_info.size(); c++) { if (abc.instance_info.get(c).deleted) { continue; } @@ -283,62 +282,61 @@ public class PropertyAVM2Item extends AssignableAVM2Item { } } }*/ - - for (ScriptInfo si : abc.script_info) { - if (si.deleted) { - continue; - } - for (Trait t : si.traits.traits) { - if (t.name_index == name_index) { - isType.setVal(t instanceof TraitClass); - objType = new TypeItem(DottedChain.OBJECT); - propType = AVM2SourceGenerator.getTraitReturnType(abcIndex, t); - propIndex = t.name_index; - if (t instanceof TraitSlotConst) { - TraitSlotConst tsc = (TraitSlotConst) t; - propValue = new ValueKind(tsc.value_index, tsc.value_kind); - propValueAbc = abc; - } - break loopobjType; - } - } - } - } - if (nsKind == Namespace.KIND_PACKAGE && propertyName != null) { - AbcIndexing.TraitIndex p = abcIndex.findNsProperty(new AbcIndexing.PropertyNsDef(propertyName, nsname, abc, openedNamespaces.get(i).getCpoolIndex(abcIndex)), true, true); - Reference outName = new Reference<>(""); - Reference outNs = new Reference<>(DottedChain.EMPTY); - Reference outPropNs = new Reference<>(DottedChain.EMPTY); - Reference outPropNsKind = new Reference<>(1); - Reference outPropNsIndex = new Reference<>(0); - Reference outPropType = new Reference<>(null); - Reference outPropValue = new Reference<>(null); - Reference outPropValueAbc = new Reference<>(null); - if (p != null && (p.objType instanceof TypeItem)) { - List otherns = new ArrayList<>(); - for (NamespaceItem n : openedNamespaces) { - if (n.isResolved()) { - otherns.add(n.getCpoolIndex(abcIndex)); + for (ScriptInfo si : abc.script_info) { + if (si.deleted) { + continue; + } + for (Trait t : si.traits.traits) { + if (t.name_index == name_index) { + isType.setVal(t instanceof TraitClass); + objType = new TypeItem(DottedChain.OBJECT); + propType = AVM2SourceGenerator.getTraitReturnType(abcIndex, t); + propIndex = t.name_index; + if (t instanceof TraitSlotConst) { + TraitSlotConst tsc = (TraitSlotConst) t; + propValue = new ValueKind(tsc.value_index, tsc.value_kind); + propValueAbc = abc; } - } - if (AVM2SourceGenerator.searchPrototypeChain(namespaceSuffixInt, otherns, localData.privateNs, localData.protectedNs, false, abcIndex, nsname, (((TypeItem) p.objType).fullTypeName.getLast()), propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { - objType = new TypeItem(outNs.getVal().addWithSuffix(outName.getVal())); - propType = p.returnType; - propIndex = constants.getMultinameId(Multiname.createQName(false, - constants.getStringId(propertyName, true), - namespaceSuffixInt != null ? namespaceSuffixInt : constants.getNamespaceId(outPropNsKind.getVal(), outPropNs.getVal(), outPropNsIndex.getVal(), true)), true - ); - propValue = p.value; - propValueAbc = outPropValueAbc.getVal(); break loopobjType; } - } + } + } + } + if (nsKind == Namespace.KIND_PACKAGE && propertyName != null) { + AbcIndexing.TraitIndex p = abcIndex.findNsProperty(new AbcIndexing.PropertyNsDef(propertyName, nsname, abc, openedNamespaces.get(i).getCpoolIndex(abcIndex)), true, true); + + Reference outName = new Reference<>(""); + Reference outNs = new Reference<>(DottedChain.EMPTY); + Reference outPropNs = new Reference<>(DottedChain.EMPTY); + Reference outPropNsKind = new Reference<>(1); + Reference outPropNsIndex = new Reference<>(0); + Reference outPropType = new Reference<>(null); + Reference outPropValue = new Reference<>(null); + Reference outPropValueAbc = new Reference<>(null); + if (p != null && (p.objType instanceof TypeItem)) { + List otherns = new ArrayList<>(); + for (NamespaceItem n : openedNamespaces) { + if (n.isResolved()) { + otherns.add(n.getCpoolIndex(abcIndex)); + } + } + if (AVM2SourceGenerator.searchPrototypeChain(namespaceSuffixInt, otherns, localData.privateNs, localData.protectedNs, false, abcIndex, nsname, (((TypeItem) p.objType).fullTypeName.getLast()), propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType)) { + objType = new TypeItem(outNs.getVal().addWithSuffix(outName.getVal())); + propType = p.returnType; + propIndex = constants.getMultinameId(Multiname.createQName(false, + constants.getStringId(propertyName, true), + namespaceSuffixInt != null ? namespaceSuffixInt : constants.getNamespaceId(outPropNsKind.getVal(), outPropNs.getVal(), outPropNsIndex.getVal(), true)), true + ); + propValue = p.value; + propValueAbc = outPropValueAbc.getVal(); + break loopobjType; + } } } } } - } + } } } @@ -486,26 +484,26 @@ public class PropertyAVM2Item extends AssignableAVM2Item { otherNs.add(n.getCpoolIndex(abcIndex)); } } - + Integer namespaceSuffixInt = null; if (!"".equals(namespaceSuffix)) { namespaceSuffixInt = Integer.parseInt(namespaceSuffix.substring(1)); } - + //For using this when appropriate (Non ASC2 approach): /*if (!localData.subMethod && cname != null && AVM2SourceGenerator.searchPrototypeChain(namespaceSuffixInt, otherNs, localData.privateNs, localData.protectedNs, true, abcIndex, pkgName, cname, propertyName, outName, outNs, outPropNs, outPropNsKind, outPropNsIndex, outPropType, outPropValue, outPropValueAbc, isType) && (localData.getFullClass().equals(outNs.getVal().addWithSuffix(outName.getVal()).toRawString()))) { NameAVM2Item nobj = new NameAVM2Item(new TypeItem(localData.getFullClass()), 0, false, "this", "", null, false, openedNamespaces, abcIndex); nobj.setRegNumber(0); obj = nobj; } else {*/ - Reference objType = new Reference<>(null); - Reference propType = new Reference<>(null); - Reference propIndex = new Reference<>(0); - Reference propValue = new Reference<>(null); - Reference propValueAbc = new Reference<>(null); + Reference objType = new Reference<>(null); + Reference propType = new Reference<>(null); + Reference propIndex = new Reference<>(0); + Reference propValue = new Reference<>(null); + Reference propValueAbc = new Reference<>(null); - resolve(false, localData, isType, objType, propType, propIndex, outPropValue, propValueAbc); - obj = ins(mustExist ? AVM2Instructions.FindPropertyStrict : AVM2Instructions.FindProperty, propIndex.getVal()); + resolve(false, localData, isType, objType, propType, propIndex, outPropValue, propValueAbc); + obj = ins(mustExist ? AVM2Instructions.FindPropertyStrict : AVM2Instructions.FindProperty, propIndex.getVal()); //} } return obj; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java index a5b5d43c2..92dee9692 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/SymbolType.java @@ -85,7 +85,7 @@ public enum SymbolType { NOT(GraphTargetItem.PRECEDENCE_UNARY, false), NEGATE(GraphTargetItem.PRECEDENCE_UNARY, false), TERNAR(GraphTargetItem.PRECEDENCE_CONDITIONAL, true, true), /*!! ternar !!!*/ - COLON(GraphTargetItem.PRECEDENCE_CONDITIONAL, false),/*!! ternar !!!*/ + COLON(GraphTargetItem.PRECEDENCE_CONDITIONAL, false), /*!! ternar !!!*/ EQUALS(GraphTargetItem.PRECEDENCE_EQUALITY, true), STRICT_EQUALS(GraphTargetItem.PRECEDENCE_EQUALITY, true), LOWER_EQUAL(GraphTargetItem.PRECEDENCE_RELATIONAL, true), @@ -94,7 +94,7 @@ public enum SymbolType { STRICT_NOT_EQUAL(GraphTargetItem.PRECEDENCE_EQUALITY, true), AND(GraphTargetItem.PRECEDENCE_LOGICALAND, true), OR(GraphTargetItem.PRECEDENCE_LOGICALOR, true), - INCREMENT(GraphTargetItem.PRECEDENCE_POSTFIX, false),//OR Unary + INCREMENT(GraphTargetItem.PRECEDENCE_POSTFIX, false), //OR Unary DECREMENT(GraphTargetItem.PRECEDENCE_POSTFIX, false), //OR Unary PLUS(GraphTargetItem.PRECEDENCE_ADDITIVE, true), MINUS(GraphTargetItem.PRECEDENCE_ADDITIVE, true), //OR Unary @@ -119,7 +119,7 @@ public enum SymbolType { ASSIGN_SHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), ASSIGN_USHIFT_RIGHT(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), ASSIGN_AND(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), - ASSIGN_OR(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), + ASSIGN_OR(GraphTargetItem.PRECEDENCE_ASSIGMENT, true, true), AS(GraphTargetItem.PRECEDENCE_RELATIONAL, true), DELETE(GraphTargetItem.PRECEDENCE_UNARY, false), INSTANCEOF(GraphTargetItem.PRECEDENCE_RELATIONAL, true), diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java index bd0e0c907..ac485b690 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/UnresolvedAVM2Item.java @@ -228,7 +228,7 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { if (resolved == null) { - throw new CompilationException("Undefined variable or property: "+ toString(), line); + throw new CompilationException("Undefined variable or property: " + toString(), line); } return resolved.toSource(localData, generator); } @@ -236,7 +236,7 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { if (resolved == null) { - throw new CompilationException("Undefined variable or property: "+ toString(), line); + throw new CompilationException("Undefined variable or property: " + toString(), line); } return resolved.toSourceIgnoreReturnValue(localData, generator); } @@ -279,7 +279,7 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { @Override public List toSourceChange(SourceGeneratorLocalData localData, SourceGenerator generator, boolean post, boolean decrement, boolean needsReturn) throws CompilationException { if (resolved == null) { - throw new CompilationException("Undefined variable or property: "+ toString(), line); + throw new CompilationException("Undefined variable or property: " + toString(), line); } if (resolved instanceof AssignableAVM2Item) { return ((AssignableAVM2Item) resolved).toSourceChange(localData, generator, post, decrement, needsReturn); @@ -320,7 +320,7 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { int ind = paramNames.indexOf(name.get(0)); GraphTargetItem t = TypeItem.UNBOUNDED; if (ind == -1) { - + //empty } else if (ind < paramTypes.size()) { t = paramTypes.get(ind); } //else rest parameter @@ -362,7 +362,7 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item { DottedChain classChain = DottedChain.parseWithSuffix(currentClass); DottedChain pkg = classChain.getWithoutLast(); - TypeItem ti = new TypeItem(pkg.addWithSuffix(name.get(0))); + TypeItem ti = new TypeItem(pkg.addWithSuffix(name.get(0))); AbcIndexing.ClassIndex ci = abc.findClass(ti, null, null/*FIXME?*/); if (ci != null) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/MethodInfoLexer.java similarity index 99% rename from libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/MethodInfoLexer.java index ba574d9a1..f81610195 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/MethodInfoLexer.java @@ -1,5 +1,7 @@ +/* The following code was generated by JFlex 1.6.0 */ + /* - * Copyright (C) 2010-2023 JPEXS, All rights reserved. + * Copyright (C) 2010-2016 JPEXS, All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -14,7 +16,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library. */ -package com.jpexs.decompiler.flash.abc.methodinfo_parser; +/* Method info lexer specification */ +package com.jpexs.decompiler.flash.abc.methodinfoparser; /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParseException.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/MethodInfoParseException.java similarity index 94% rename from libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParseException.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/MethodInfoParseException.java index f69c814a9..155572644 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParseException.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/MethodInfoParseException.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library. */ -package com.jpexs.decompiler.flash.abc.methodinfo_parser; +package com.jpexs.decompiler.flash.abc.methodinfoparser; import com.jpexs.decompiler.flash.ParseException; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/MethodInfoParser.java similarity index 99% rename from libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParser.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/MethodInfoParser.java index b82971c19..50c46d3fd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/MethodInfoParser.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library. */ -package com.jpexs.decompiler.flash.abc.methodinfo_parser; +package com.jpexs.decompiler.flash.abc.methodinfoparser; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.types.MethodInfo; @@ -109,6 +109,7 @@ public class MethodInfoParser { throw new MethodInfoParseException("Unexpected symbol", lexer.yyline()); } } else if (symbEqual.type == ParsedSymbol.TYPE_EOF) { + //empty } else { throw new MethodInfoParseException("Unexpected symbol", lexer.yyline()); } @@ -141,6 +142,7 @@ public class MethodInfoParser { update.ret_type = type; return true; } catch (IOException ex) { + //ignore } return false; } @@ -244,6 +246,7 @@ public class MethodInfoParser { } symb = lexer.yylex(); if (symb.type == ParsedSymbol.TYPE_COMMA) { + //empty } else if (symb.type == ParsedSymbol.TYPE_EOF) { break; } @@ -260,6 +263,7 @@ public class MethodInfoParser { throw new MethodInfoParseException("Unexpected symbol", lexer.yyline()); } } else if (symb.type == ParsedSymbol.TYPE_COMMA) { + //empty } else if (symb.type == ParsedSymbol.TYPE_EOF) { break; } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParsedSymbol.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/ParsedSymbol.java similarity index 97% rename from libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParsedSymbol.java rename to libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/ParsedSymbol.java index cd2938c32..48c610f09 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/ParsedSymbol.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfoparser/ParsedSymbol.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library. */ -package com.jpexs.decompiler.flash.abc.methodinfo_parser; +package com.jpexs.decompiler.flash.abc.methodinfoparser; /** * diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ConvertData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ConvertData.java index 30e6da1d8..20e43acaa 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ConvertData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ConvertData.java @@ -34,9 +34,9 @@ public class ConvertData { public boolean thisHasDefaultToPrimitive; public boolean ignoreFrameScripts; - + public boolean exportEmbed; - + public boolean exportEmbedFlaMode; public ConvertData() { 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 a0379a36b..29cf1f263 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 @@ -127,7 +127,7 @@ public class InstanceInfo { writer.appendNoHilight("[Embed(source=\"" + ASSETS_DIR + Helper.makeFileName(ct.getCharacterExportFileName()) + ".ttf\",").newLine(); writer.appendNoHilight("fontName=\"" + Helper.escapeActionScriptString(ft.getFontNameIntag()) + "\",").newLine(); - writer.appendNoHilight("fontFamily=\"" + Helper.escapeActionScriptString(ft.getFontName())+ "\",").newLine(); + writer.appendNoHilight("fontFamily=\"" + Helper.escapeActionScriptString(ft.getFontName()) + "\",").newLine(); writer.appendNoHilight("mimeType=\"application/x-font\",").newLine(); writer.appendNoHilight("fontWeight=\"" + (ft.isBold() ? "bold" : "normal") + "\",").newLine(); writer.appendNoHilight("fontStyle=\"" + (ft.isItalic() ? "italic" : "normal") + "\",").newLine(); @@ -171,9 +171,9 @@ public class InstanceInfo { writer.appendNoHilight("embedAsCFF=\"false\"").newLine(); writer.appendNoHilight(")]").newLine(); } - + if (ct instanceof DefineFont4Tag) { - DefineFont4Tag ft4 = (DefineFont4Tag)ct; + DefineFont4Tag ft4 = (DefineFont4Tag) ct; writer.appendNoHilight("[Embed(source=\"" + ASSETS_DIR + Helper.makeFileName(ct.getCharacterExportFileName()) + ".cff\",").newLine(); writer.appendNoHilight("fontName=\"" + Helper.escapeActionScriptString(ft4.fontName) + "\",").newLine(); writer.appendNoHilight("mimeType=\"application/x-font\",").newLine(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java index acb2af745..4ee9b3722 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/MethodBody.java @@ -127,7 +127,7 @@ public final class MethodBody implements Cloneable { this.abc = abc; } - public synchronized void setCodeBytes(byte codeBytes[]) { + public synchronized void setCodeBytes(byte[] codeBytes) { this.codeBytes = codeBytes; this.code = null; } @@ -168,15 +168,7 @@ public final class MethodBody implements Cloneable { public void markOffsets() { getCode().markOffsets(); - } - - @Override - public String toString() { - String s = ""; - s += "method_info=" + method_info + " max_stack=" + max_stack + " max_regs=" + max_regs + " scope_depth=" + init_scope_depth + " max_scope=" + max_scope_depth; - s += "\r\nCode:\r\n" + getCode().toString(); - return s; - } + } public int removeDeadCode(AVM2ConstantPool constants, Trait trait, MethodInfo info) throws InterruptedException { return getCode().removeDeadCode(this); @@ -211,6 +203,12 @@ public final class MethodBody implements Cloneable { */ public void replaceInstruction(int pos, AVM2Instruction instruction) { getCode().replaceInstruction(pos, instruction, this); + } + + public void insertAll(int pos, List list) { + for (AVM2Instruction ins : list) { + insertInstruction(pos++, ins); + } } /** @@ -225,12 +223,6 @@ public final class MethodBody implements Cloneable { getCode().insertInstruction(pos, instruction, this); } - public void insertAll(int pos, List list) { - for (AVM2Instruction ins : list) { - insertInstruction(pos++, ins); - } - } - /** * Inserts instruction at specified point. Handles offsets properly. Note: * If newinstruction is jump, the offset operand must be handled properly by @@ -342,6 +334,15 @@ public final class MethodBody implements Cloneable { } } } + + + @Override + public String toString() { + String s = ""; + s += "method_info=" + method_info + " max_stack=" + max_stack + " max_regs=" + max_regs + " scope_depth=" + init_scope_depth + " max_scope=" + max_scope_depth; + s += "\r\nCode:\r\n" + getCode().toString(); + return s; + } public GraphTextWriter toString(List callStack, AbcIndexing abcIndex, final String path, ScriptExportMode exportMode, final ABC abc, final Trait trait, final GraphTextWriter writer, final List fullyQualifiedNames, Set seenMethods) throws InterruptedException { seenMethods.add(method_info); @@ -369,11 +370,11 @@ public final class MethodBody implements Cloneable { writer.newLine(); } List fullyQualifiedNames2 = new ArrayList<>(fullyQualifiedNames); - for (Trait t:traits.traits) { + for (Trait t : traits.traits) { DottedChain tname = DottedChain.parseWithSuffix(t.getName(abc).getName(abc.constants, new ArrayList<>(), false, true)); fullyQualifiedNames2.remove(tname); } - + Graph.graphToString(convertedItems, writer, LocalData.create(callStack, abcIndex, abc, localRegNames, fullyQualifiedNames2, seenMethods)); //writer.endMethod(); } else if (convertException instanceof TimeoutException) { 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 a1677b6bf..d5639ee02 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 @@ -41,7 +41,7 @@ public class MethodInfo { public void delete(ABC abc, boolean d) { this.deleted = d; - + //NewFunctions are now deleted later, in ABC.pack /*MethodBody body = abc.findBody(this); if (body != null) { @@ -87,6 +87,20 @@ public class MethodInfo { public void setFlagIgnore_Rest() { flags |= FLAG_IGNORE_REST; } + + public void setFlagIgnore_Rest(boolean val) { + if (val) { + setFlagIgnore_Rest(); + } else { + unsetFlagIgnore_Rest(); + } + } + + public void unsetFlagIgnore_Rest() { + if (flagIgnore_rest()) { + flags -= FLAG_IGNORE_REST; + } + } public void setFlagNative() { flags |= FLAG_NATIVE; @@ -132,9 +146,7 @@ public class MethodInfo { } } - public void setFlagNeed_rest() { - flags |= FLAG_NEED_REST; - } + public void unsetFlagNeed_rest() { if (flagNeed_rest()) { @@ -142,6 +154,10 @@ public class MethodInfo { } } + public void setFlagNeed_rest() { + flags |= FLAG_NEED_REST; + } + public void setFlagNeed_rest(boolean val) { if (val) { setFlagNeed_rest(); @@ -150,9 +166,7 @@ public class MethodInfo { } } - public void setFlagHas_optional() { - flags |= FLAG_HAS_OPTIONAL; - } + public void unsetFlagHas_optional() { if (flagHas_optional()) { @@ -160,17 +174,17 @@ public class MethodInfo { } } + public void setFlagHas_optional() { + flags |= FLAG_HAS_OPTIONAL; + } + public void setFlagHas_optional(boolean val) { if (val) { setFlagHas_optional(); } else { unsetFlagHas_optional(); } - } - - public void setFlagHas_paramnames() { - flags |= FLAG_HAS_PARAMNAMES; - } + } public void unsetFlagHas_paramnames() { if (flagHas_paramnames()) { @@ -178,6 +192,10 @@ public class MethodInfo { } } + public void setFlagHas_paramnames() { + flags |= FLAG_HAS_PARAMNAMES; + } + public void setFlagHas_paramnames(boolean val) { if (val) { setFlagHas_paramnames(); @@ -399,7 +417,7 @@ public class MethodInfo { } return rname; } - + public void toASMSource(ABC abc, GraphTextWriter writer) { writer.appendNoHilight("name "); writer.hilightSpecial(name_index == 0 ? "null" : "\"" + Helper.escapeActionScriptString(getName(abc.constants)) + "\"", HighlightSpecialType.METHOD_NAME); 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 1720525c2..05f2f4280 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 @@ -26,7 +26,6 @@ import com.jpexs.helpers.Helper; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; -import java.util.LinkedHashSet; import java.util.List; import java.util.Objects; import java.util.Set; @@ -170,8 +169,8 @@ public class Multiname { } Multiname m = constants.getMultiname(name_index); if (m != null) { - - boolean cyclic = checkCyclicTypeNameSub(constants, name_index, visited); + + boolean cyclic = checkCyclicTypeNameSub(constants, name_index, visited); if (!m.cyclic && cyclic) { Logger.getLogger(AbcIndexing.class.getName()).log(Level.WARNING, "Recursive typename detected"); } @@ -277,22 +276,7 @@ public class Multiname { } } return kindStr; - } - - @Override - public String toString() { - String kindStr = getKindStr(); - StringBuilder sb = new StringBuilder(); - sb.append("kind=").append(kindStr); - sb.append(" name_index=").append(name_index); - sb.append(" namespace_index=").append(namespace_index); - sb.append(" namespace_set_index=").append(namespace_set_index); - sb.append(" qname_index=").append(qname_index); - sb.append(" params_size:"); - sb.append(params == null ? "null" : params.length); - return sb.toString(); - - } + } public static String namespaceToString(AVM2ConstantPool constants, int index) { if (index == 0) { @@ -354,6 +338,21 @@ public class Multiname { } return constants.getMultiname(index).toString(constants, fullyQualifiedNames); } + + @Override + public String toString() { + String kindStr = getKindStr(); + StringBuilder sb = new StringBuilder(); + sb.append("kind=").append(kindStr); + sb.append(" name_index=").append(name_index); + sb.append(" namespace_index=").append(namespace_index); + sb.append(" namespace_set_index=").append(namespace_set_index); + sb.append(" qname_index=").append(qname_index); + sb.append(" params_size:"); + sb.append(params == null ? "null" : params.length); + return sb.toString(); + + } public String toString(AVM2ConstantPool constants, List fullyQualifiedNames) { @@ -707,5 +706,5 @@ public class Multiname { public boolean isCyclic() { return cyclic; - } + } } 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 1f86ed4f8..afa9b0103 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 @@ -16,7 +16,6 @@ */ package com.jpexs.decompiler.flash.abc.types; -import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.types.annotations.Internal; import com.jpexs.decompiler.graph.DottedChain; @@ -26,9 +25,9 @@ import com.jpexs.decompiler.graph.DottedChain; * @author JPEXS */ public class Namespace { - + public static final int MIN_API_MARK = 0xE000; - + public static final int MAX_API_MARK = 0xF8FF; public static final int KIND_NAMESPACE = 8; @@ -121,7 +120,7 @@ public class Namespace { } return kindStr; } - + public static String getPrefix(int kind) { String kindStr = "?"; for (int k = 0; k < nameSpaceKinds.length; k++) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java index 6c52a2bee..78fd3008c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/NamespaceSet.java @@ -52,18 +52,18 @@ public class NamespaceSet { } return sb.toString(); } - + public boolean isApiVersioned(AVM2ConstantPool constants) { Set namespaceNames = new HashSet<>(); Set namespaceKinds = new HashSet<>(); - for (int n:namespaces) { + for (int n : namespaces) { Namespace ns = constants.getNamespace(n); String nsName = ns.getRawName(constants); if (nsName != null && nsName.length() > 0) { int lastChar = nsName.codePointAt(nsName.length() - 1); if (lastChar >= Namespace.MIN_API_MARK && lastChar <= Namespace.MAX_API_MARK) { namespaceNames.add(nsName.substring(0, nsName.length() - 1)); - namespaceKinds.add(ns.kind); + namespaceKinds.add(ns.kind); } else { return false; } @@ -77,12 +77,12 @@ public class NamespaceSet { } return true; } - + public List getApiVersions(AVM2ConstantPool constants) { Set namespaceNames = new HashSet<>(); Set namespaceKinds = new HashSet<>(); List apiVersions = new ArrayList<>(); - for (int n:namespaces) { + for (int n : namespaces) { Namespace ns = constants.getNamespace(n); String nsName = ns.getRawName(constants); if (nsName != null && nsName.length() > 0) { @@ -107,18 +107,18 @@ public class NamespaceSet { } return apiVersions; } - + public int getNonversionedKind(AVM2ConstantPool constants) { Set namespaceNames = new HashSet<>(); Set namespaceKinds = new HashSet<>(); - for (int n:namespaces) { + for (int n : namespaces) { Namespace ns = constants.getNamespace(n); String nsName = ns.getRawName(constants); namespaceKinds.add(ns.kind); if (nsName != null && nsName.length() > 0) { int lastChar = nsName.codePointAt(nsName.length() - 1); if (lastChar >= Namespace.MIN_API_MARK && lastChar <= Namespace.MAX_API_MARK) { - namespaceNames.add(nsName.substring(0, nsName.length() - 1)); + namespaceNames.add(nsName.substring(0, nsName.length() - 1)); } else { namespaceNames.add(nsName); } @@ -134,10 +134,10 @@ public class NamespaceSet { } return namespaceKinds.iterator().next(); } - + public DottedChain getNonversionedName(AVM2ConstantPool constants) { Set namespaceNames = new HashSet<>(); - for (int n:namespaces) { + for (int n : namespaces) { String nsName = constants.getNamespace(n).getRawName(constants); if (nsName != null && nsName.length() > 0) { int lastChar = nsName.codePointAt(nsName.length() - 1); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java index 4f7bb3cca..6b1faf903 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ScriptInfo.java @@ -63,15 +63,15 @@ public class ScriptInfo { public void clearPacksCache() { cachedPacks = null; } - + /** - * + * * @param abc * @return Simple pack name - Can be null! */ public DottedChain getSimplePackName(ABC abc) { List packageTraits = new ArrayList<>(); - + for (int j = 0; j < traits.traits.size(); j++) { Trait t = traits.traits.get(j); if (t.name_index >= abc.constants.getMultinameCount()) { @@ -106,7 +106,7 @@ public class ScriptInfo { otherTraits.add(j); } } - + int publicTraitsCount = 0; for (int j = 0; j < traits.traits.size(); j++) { Trait t = traits.traits.get(j); @@ -117,10 +117,9 @@ public class ScriptInfo { publicTraitsCount++; } } - + boolean isSimple = publicTraitsCount == 1; - - + for (int j = 0; j < traits.traits.size(); j++) { Trait t = traits.traits.get(j); Multiname name = t.getName(abc); @@ -139,20 +138,20 @@ public class ScriptInfo { } if (packagePrefix == null || packageName.toPrintableString(true).startsWith(packagePrefix)) { - + ClassPath cp = new ClassPath(packageName, objectName, namespaceSuffix); ScriptPack pack = new ScriptPack(cp, abc, allAbcs, scriptIndex, traitIndices); pack.isSimple = isSimple; ret.add(pack); } } - } + } if (ret.isEmpty() && !otherTraits.isEmpty()) { //no public/package internal traits to determine common pack name //make each trait separate pack for (int traitIndex : otherTraits) { Trait t = traits.traits.get(traitIndex); Multiname name = t.getName(abc); - + DottedChain packageName = name.getSimpleNamespaceName(abc.constants); String objectName = name.getName(abc.constants, null, true, false); String namespaceSuffix = name.getNamespaceSuffix(); @@ -163,9 +162,9 @@ public class ScriptInfo { ClassPath cp = new ClassPath(packageName, objectName, namespaceSuffix); ret.add(new ScriptPack(cp, abc, allAbcs, scriptIndex, traitIndices)); } - } + } if (!isSimple) { - ret.add(new ScriptPack(new ClassPath(DottedChain.EMPTY, "script_"+scriptIndex, ""), abc, allAbcs, scriptIndex, new ArrayList<>())); + ret.add(new ScriptPack(new ClassPath(DottedChain.EMPTY, "script_" + scriptIndex, ""), abc, allAbcs, scriptIndex, new ArrayList<>())); } if (packagePrefix == null) { cachedPacks = new ArrayList<>(ret); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java index 043ceedb5..59bb241ec 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/ValueKind.java @@ -17,7 +17,6 @@ package com.jpexs.decompiler.flash.abc.types; import com.jpexs.decompiler.flash.abc.ABC; -import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; import com.jpexs.decompiler.flash.ecma.EcmaScript; import com.jpexs.helpers.Helper; @@ -29,37 +28,37 @@ public class ValueKind { public static final int CONSTANT_DecimalOrFloat = 0x02; //decimal or float depending on ABC version - public static final int CONSTANT_Int = 0x03;// integer + public static final int CONSTANT_Int = 0x03; //integer - public static final int CONSTANT_UInt = 0x04;// uinteger + public static final int CONSTANT_UInt = 0x04; //uinteger - public static final int CONSTANT_Double = 0x06;// double + public static final int CONSTANT_Double = 0x06; //double - public static final int CONSTANT_Utf8 = 0x01;// string + public static final int CONSTANT_Utf8 = 0x01; //string - public static final int CONSTANT_True = 0x0B;// - + public static final int CONSTANT_True = 0x0B; //- - public static final int CONSTANT_False = 0x0A;// - + public static final int CONSTANT_False = 0x0A; //- - public static final int CONSTANT_Null = 0x0C;// - + public static final int CONSTANT_Null = 0x0C; //- - public static final int CONSTANT_Undefined = 0x00;// - + public static final int CONSTANT_Undefined = 0x00; //- - public static final int CONSTANT_Namespace = 0x08;// namespace + public static final int CONSTANT_Namespace = 0x08; //namespace - public static final int CONSTANT_PackageNamespace = 0x16;// namespace + public static final int CONSTANT_PackageNamespace = 0x16; //namespace - public static final int CONSTANT_PackageInternalNs = 0x17;// Namespace + public static final int CONSTANT_PackageInternalNs = 0x17; //namespace - public static final int CONSTANT_ProtectedNamespace = 0x18;// Namespace + public static final int CONSTANT_ProtectedNamespace = 0x18; //namespace - public static final int CONSTANT_ExplicitNamespace = 0x19;// Namespace + public static final int CONSTANT_ExplicitNamespace = 0x19; //namespace - public static final int CONSTANT_StaticProtectedNs = 0x1A;// Namespace + public static final int CONSTANT_StaticProtectedNs = 0x1A; //namespace - public static final int CONSTANT_PrivateNs = 0x05;// namespace + public static final int CONSTANT_PrivateNs = 0x05; //namespace - public static final int CONSTANT_Float4 = 0x1E;// float4 + public static final int CONSTANT_Float4 = 0x1E; //float4 private static final int[] optionalKinds = new int[]{0x03, 0x04, 0x06, 0x02, 0x01, 0x0B, 0x0A, 0x0C, 0x00, 0x08, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x05, 0x1E}; @@ -95,6 +94,20 @@ public class ValueKind { return CONSTANT_StaticProtectedNs; } return 0; + } + + public boolean isNamespace() { + switch (value_kind) { + case CONSTANT_Namespace: + case CONSTANT_PackageInternalNs: + case CONSTANT_ProtectedNamespace: + case CONSTANT_ExplicitNamespace: + case CONSTANT_StaticProtectedNs: + case CONSTANT_PrivateNs: + return true; + default: + return false; + } } @Override @@ -115,20 +128,6 @@ public class ValueKind { return s; } - public boolean isNamespace() { - switch (value_kind) { - case CONSTANT_Namespace: - case CONSTANT_PackageInternalNs: - case CONSTANT_ProtectedNamespace: - case CONSTANT_ExplicitNamespace: - case CONSTANT_StaticProtectedNs: - case CONSTANT_PrivateNs: - return true; - default: - return false; - } - } - public String toString(ABC abc) { String ret = "?"; switch (value_kind) { @@ -194,7 +193,7 @@ public class ValueKind { case CONSTANT_Double: ret = "Double(" + EcmaScript.toString(abc.constants.getDouble(value_index)) + ")"; break; - case CONSTANT_DecimalOrFloat: + case CONSTANT_DecimalOrFloat: if (abc.hasDecimalSupport()) { ret = "Decimal(" + abc.constants.getDecimal(value_index) + ")"; } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java index 1b1da9cd8..4725cb0c9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java @@ -100,7 +100,7 @@ public abstract class Trait implements Cloneable, Serializable { public static final int TRAIT_FUNCTION = 5; public static final int TRAIT_CONST = 6; - + public boolean deleted = false; public void delete(ABC abc, boolean d) { @@ -204,7 +204,7 @@ public abstract class Trait implements Cloneable, Serializable { private void getAllClassTraitNames(List traitNamesInThisScript, AbcIndexing abcIndex, ABC abc, int classIndex, Integer scriptIndex, boolean isParent) { boolean publicProtectedOnly = isParent; - for (Trait it : abc.instance_info.get(classIndex).instance_traits.traits) { + for (Trait it : abc.instance_info.get(classIndex).instance_traits.traits) { if (publicProtectedOnly) { int nskind = it.getName(abc).getSimpleNamespaceKind(abc.constants); if (nskind != Namespace.KIND_PACKAGE && nskind != Namespace.KIND_PROTECTED) { @@ -220,7 +220,7 @@ public abstract class Trait implements Cloneable, Serializable { continue; } } - traitNamesInThisScript.add(ct.getName(abc).getName(abc.constants, new ArrayList<>(), true, true)); + traitNamesInThisScript.add(ct.getName(abc).getName(abc.constants, new ArrayList<>(), true, true)); } if (abc.instance_info.get(classIndex).super_index == 0) { return; @@ -228,7 +228,7 @@ public abstract class Trait implements Cloneable, Serializable { DottedChain fullClassName = abc.constants.getMultiname(abc.instance_info.get(classIndex).super_index).getNameWithNamespace(abc.constants, true); AbcIndexing.ClassIndex ci = abcIndex.findClass(new TypeItem(fullClassName), abc, scriptIndex); if (ci != null) { - getAllClassTraitNames(traitNamesInThisScript, abcIndex, ci.abc, ci.index, ci.scriptIndex, true); + getAllClassTraitNames(traitNamesInThisScript, abcIndex, ci.abc, ci.index, ci.scriptIndex, true); } } @@ -350,9 +350,9 @@ public abstract class Trait implements Cloneable, Serializable { if (hasImport) { writer.newLine(); } - + if (!uses.isEmpty()) { - for (String u:uses) { + for (String u : uses) { writer.appendNoHilight("use namespace " + u + ";").newLine(); } writer.newLine(); @@ -391,14 +391,14 @@ public abstract class Trait implements Cloneable, Serializable { getApiVersions(abc, writer); return writer; } - + public boolean isApiVersioned(ABC abc) { return abc.constants.getMultiname(name_index).isApiVersioned(abc.constants); } - + public final GraphTextWriter getApiVersions(ABC abc, GraphTextWriter writer) { List apiVersions = abc.constants.getMultiname(name_index).getApiVersions(abc.constants); - for(int version:apiVersions) { + for (int version : apiVersions) { writer.appendNoHilight("[API(\"" + version + "\")]").newLine(); } return writer; @@ -432,41 +432,41 @@ public abstract class Trait implements Cloneable, Serializable { writer.appendNoHilight(identifier).appendNoHilight(" "); } } else if (nskind != 0) { - + //Traits of private classes inside script have same namespace as the class if (nskind == Namespace.KIND_PRIVATE) { Set namespaceIdsThis = new HashSet<>(); if (m.isApiVersioned(abc.constants)) { NamespaceSet nss = m.getNamespaceSet(abc.constants); - for (int n:nss.namespaces) { + for (int n : nss.namespaces) { namespaceIdsThis.add(n); } } else { namespaceIdsThis.add(m.namespace_index); } Set namespaceIdsClass = new HashSet<>(); - + Multiname mc = abc.instance_info.get(classIndex).getName(abc.constants); if (mc.isApiVersioned(abc.constants)) { NamespaceSet nss = mc.getNamespaceSet(abc.constants); - for (int n:nss.namespaces) { + for (int n : nss.namespaces) { namespaceIdsClass.add(n); } } else { namespaceIdsClass.add(mc.namespace_index); } - - for (int ns:namespaceIdsThis) { + + for (int ns : namespaceIdsThis) { if (namespaceIdsClass.contains(ns)) { nskind = Namespace.KIND_PACKAGE_INTERNAL; break; } - } + } } String nsPrefix = Namespace.getPrefix(nskind); if (nsPrefix != null && !nsPrefix.isEmpty()) { writer.appendNoHilight(nsPrefix).appendNoHilight(" "); - } + } } } if (isStatic) { @@ -641,10 +641,10 @@ public abstract class Trait implements Cloneable, Serializable { } public abstract void getMethodInfos(ABC abc, int traitId, int classIndex, List methodInfos); - + public String getKindToStr() { String traitKindStr = ""; - switch(kindType) { + switch (kindType) { case Trait.TRAIT_CLASS: traitKindStr = "class"; break; 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 7be362cf9..476c82a21 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 @@ -22,7 +22,6 @@ import com.jpexs.decompiler.flash.abc.avm2.model.ClassAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.FullMultinameAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetLexAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.GetPropertyAVM2Item; -import com.jpexs.decompiler.flash.abc.avm2.model.GlobalAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.IntegerValueAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.model.ThisAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.parser.script.AbcIndexing; @@ -79,10 +78,7 @@ public class TraitClass extends Trait implements TraitWithSlot { return slot_id; } - @Override - public String toString(ABC abc, List fullyQualifiedNames) { - return "Class " + abc.constants.getMultiname(name_index).toString(abc.constants, fullyQualifiedNames) + " slot=" + slot_id + " class_info=" + class_info + " metadata=" + Helper.intArrToString(metadata); - } + @Override public void getDependencies(AbcIndexing abcIndex, int scriptIndex, int classIndex, boolean isStatic, String customNs, ABC abc, List dependencies, DottedChain ignorePackage, List fullyQualifiedNames, List uses) throws InterruptedException { @@ -122,8 +118,11 @@ public class TraitClass extends Trait implements TraitWithSlot { public void convertHeader(Trait parent, ConvertData convertData, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, NulWriter writer, List fullyQualifiedNames, boolean parallel) { } + @Override + public String toString(ABC abc, List fullyQualifiedNames) { + return "Class " + abc.constants.getMultiname(name_index).toString(abc.constants, fullyQualifiedNames) + " slot=" + slot_id + " class_info=" + class_info + " metadata=" + Helper.intArrToString(metadata); + } - @Override public GraphTextWriter toString(AbcIndexing abcIndex, Trait parent, ConvertData convertData, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, GraphTextWriter writer, List fullyQualifiedNames, boolean parallel, boolean insideInterface) throws InterruptedException { @@ -140,7 +139,7 @@ public class TraitClass extends Trait implements TraitWithSlot { String instanceInfoName = instanceInfoMultiname.getName(abc.constants, fullyQualifiedNames, false, true); getMetaData(parent, convertData, abc, writer); - + boolean allowEmbed = true; if (convertData.exportEmbedFlaMode) { @@ -160,7 +159,7 @@ public class TraitClass extends Trait implements TraitWithSlot { allowEmbed = false; } } - + if (ct instanceof DefineFont4Tag) { allowEmbed = true; } @@ -180,7 +179,7 @@ public class TraitClass extends Trait implements TraitWithSlot { //static variables & constants ClassInfo classInfo = abc.class_info.get(class_info); - classInfo.static_traits.toString(abcIndex, new Class[]{TraitSlotConst.class}, this, convertData, path +/*packageName +*/ "/" + instanceInfoName, abc, true, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, new ArrayList<>(), isInterface); + classInfo.static_traits.toString(abcIndex, new Class[]{TraitSlotConst.class}, this, convertData, path + "/" + instanceInfoName, abc, true, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, new ArrayList<>(), isInterface); //static initializer int bodyIndex = abc.findBodyIndex(classInfo.cinit_index); @@ -192,7 +191,7 @@ public class TraitClass extends Trait implements TraitWithSlot { writer.startBlock(); List callStack = new ArrayList<>(); callStack.add(abc.bodies.get(bodyIndex)); - abc.bodies.get(bodyIndex).toString(callStack, abcIndex, path +/*packageName +*/ "/" + instanceInfoName + ".staticinitializer", exportMode, abc, this, writer, fullyQualifiedNames, new HashSet<>()); + abc.bodies.get(bodyIndex).toString(callStack, abcIndex, path + "/" + instanceInfoName + ".staticinitializer", exportMode, abc, this, writer, fullyQualifiedNames, new HashSet<>()); writer.endBlock(); } else { //Note: There must be trait/method highlight even if the initializer is empty to TraitList in GUI to work correctly @@ -210,7 +209,7 @@ public class TraitClass extends Trait implements TraitWithSlot { } //instance variables - instanceInfo.instance_traits.toString(abcIndex, new Class[]{TraitSlotConst.class}, this, convertData, path +/*packageName +*/ "/" + instanceInfoName, abc, false, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, new ArrayList<>(), isInterface); + instanceInfo.instance_traits.toString(abcIndex, new Class[]{TraitSlotConst.class}, this, convertData, path + "/" + instanceInfoName, abc, false, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, new ArrayList<>(), isInterface); //instance initializer - constructor if (!instanceInfo.isInterface()) { @@ -232,7 +231,7 @@ public class TraitClass extends Trait implements TraitWithSlot { if (body != null) { List callStack = new ArrayList<>(); callStack.add(body); - body.toString(callStack, abcIndex, path +/*packageName +*/ "/" + instanceInfoName + ".initializer", exportMode, abc, this, writer, fullyQualifiedNames, new HashSet<>()); + body.toString(callStack, abcIndex, path + "/" + instanceInfoName + ".initializer", exportMode, abc, this, writer, fullyQualifiedNames, new HashSet<>()); } } @@ -242,10 +241,10 @@ public class TraitClass extends Trait implements TraitWithSlot { } //static methods - classInfo.static_traits.toString(abcIndex, new Class[]{TraitClass.class, TraitFunction.class, TraitMethodGetterSetter.class}, this, convertData, path +/*packageName +*/ "/" + instanceInfoName, abc, true, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, new ArrayList<>(), isInterface); + classInfo.static_traits.toString(abcIndex, new Class[]{TraitClass.class, TraitFunction.class, TraitMethodGetterSetter.class}, this, convertData, path + "/" + instanceInfoName, abc, true, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, new ArrayList<>(), isInterface); //instance methods - instanceInfo.instance_traits.toString(abcIndex, new Class[]{TraitClass.class, TraitFunction.class, TraitMethodGetterSetter.class}, this, convertData, path +/*packageName +*/ "/" + instanceInfoName, abc, false, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, convertData.ignoreFrameScripts ? frameTraitNames : new ArrayList<>(), isInterface); + instanceInfo.instance_traits.toString(abcIndex, new Class[]{TraitClass.class, TraitFunction.class, TraitMethodGetterSetter.class}, this, convertData, path + "/" + instanceInfoName, abc, false, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, convertData.ignoreFrameScripts ? frameTraitNames : new ArrayList<>(), isInterface); writer.endClass(); writer.endBlock(); // class @@ -296,7 +295,7 @@ public class TraitClass extends Trait implements TraitWithSlot { } } - abc.bodies.get(bodyIndex).convert(callStack, abcIndex, convertData, path +/*packageName +*/ "/" + instanceInfoName + ".staticinitializer", exportMode, true, classInfo.cinit_index, scriptIndex, class_info, abc, this, newScopeStack, GraphTextWriter.TRAIT_CLASS_INITIALIZER, writer, fullyQualifiedNames, classInfo.static_traits, true, new HashSet<>()); + abc.bodies.get(bodyIndex).convert(callStack, abcIndex, convertData, path + "/" + instanceInfoName + ".staticinitializer", exportMode, true, classInfo.cinit_index, scriptIndex, class_info, abc, this, newScopeStack, GraphTextWriter.TRAIT_CLASS_INITIALIZER, writer, fullyQualifiedNames, classInfo.static_traits, true, new HashSet<>()); newScopeStack.push(new ClassAVM2Item(abc.instance_info.get(class_info).getName(abc.constants))); classInitializerIsEmpty = !writer.getMark(); @@ -309,7 +308,7 @@ public class TraitClass extends Trait implements TraitWithSlot { MethodBody constructorBody = abc.bodies.get(bodyIndex); List callStack = new ArrayList<>(); callStack.add(constructorBody); - constructorBody.convert(callStack, abcIndex, convertData, path +/*packageName +*/ "/" + instanceInfoName + ".initializer", exportMode, false, instanceInfo.iinit_index, scriptIndex, class_info, abc, this, new ScopeStack(), GraphTextWriter.TRAIT_INSTANCE_INITIALIZER, writer, fullyQualifiedNames, instanceInfo.instance_traits, true, new HashSet<>()); + constructorBody.convert(callStack, abcIndex, convertData, path + "/" + instanceInfoName + ".initializer", exportMode, false, instanceInfo.iinit_index, scriptIndex, class_info, abc, this, new ScopeStack(), GraphTextWriter.TRAIT_INSTANCE_INITIALIZER, writer, fullyQualifiedNames, instanceInfo.instance_traits, true, new HashSet<>()); if (convertData.ignoreFrameScripts) { //find all addFrameScript(xx,this.method) in constructor @@ -364,9 +363,9 @@ public class TraitClass extends Trait implements TraitWithSlot { } //static variables,constants & methods - classInfo.static_traits.convert(abcIndex, this, convertData, path +/*packageName +*/ "/" + instanceInfoName, abc, true, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, newScopeStack); + classInfo.static_traits.convert(abcIndex, this, convertData, path + "/" + instanceInfoName, abc, true, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, newScopeStack); - instanceInfo.instance_traits.convert(abcIndex, this, convertData, path +/*packageName +*/ "/" + instanceInfoName, abc, false, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, newScopeStack); + instanceInfo.instance_traits.convert(abcIndex, this, convertData, path + "/" + instanceInfoName, abc, false, exportMode, false, scriptIndex, class_info, writer, fullyQualifiedNames, parallel, newScopeStack); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java index 4b6ffd4e5..e4207d586 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitFunction.java @@ -47,7 +47,7 @@ public class TraitFunction extends Trait implements TraitWithSlot { @Override public void delete(ABC abc, boolean d) { super.delete(abc, d); - + abc.constants.getMultiname(name_index).deleted = d; abc.method_info.get(method_info).delete(abc, d); } @@ -55,12 +55,7 @@ public class TraitFunction extends Trait implements TraitWithSlot { @Override public int getSlotIndex() { return slot_id; - } - - @Override - public String toString(ABC abc, List fullyQualifiedNames) { - return "Function " + abc.constants.getMultiname(name_index).toString(abc.constants, fullyQualifiedNames) + " slot=" + slot_id + " method_info=" + method_info + " metadata=" + Helper.intArrToString(metadata); - } + } @Override public GraphTextWriter toStringHeader(Trait parent, ConvertData convertData, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, GraphTextWriter writer, List fullyQualifiedNames, boolean parallel, boolean insideInterface) { @@ -82,6 +77,11 @@ public class TraitFunction extends Trait implements TraitWithSlot { public void convertHeader(Trait parent, ConvertData convertData, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, NulWriter writer, List fullyQualifiedNames, boolean parallel) { } + @Override + public String toString(ABC abc, List fullyQualifiedNames) { + return "Function " + abc.constants.getMultiname(name_index).toString(abc.constants, fullyQualifiedNames) + " slot=" + slot_id + " method_info=" + method_info + " metadata=" + Helper.intArrToString(metadata); + } + @Override public GraphTextWriter toString(AbcIndexing abcIndex, Trait parent, ConvertData convertData, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, GraphTextWriter writer, List fullyQualifiedNames, boolean parallel, boolean insideInterface) throws InterruptedException { writeImports(abcIndex, scriptIndex, classIndex, false, abc, writer, getPackage(abc), fullyQualifiedNames); @@ -95,7 +95,7 @@ public class TraitFunction extends Trait implements TraitWithSlot { //writeUses(scriptIndex, classIndex, isStatic, abc, writer); List callStack = new ArrayList<>(); callStack.add(abc.bodies.get(bodyIndex)); - abc.bodies.get(bodyIndex).toString(callStack, abcIndex,path + "." + abc.constants.getMultiname(name_index).getName(abc.constants, fullyQualifiedNames, false, true), exportMode, abc, this, writer, fullyQualifiedNames, new HashSet<>()); + abc.bodies.get(bodyIndex).toString(callStack, abcIndex, path + "." + abc.constants.getMultiname(name_index).getName(abc.constants, fullyQualifiedNames, false, true), exportMode, abc, this, writer, fullyQualifiedNames, new HashSet<>()); } writer.endBlock(); @@ -140,10 +140,7 @@ public class TraitFunction extends Trait implements TraitWithSlot { ignorePackage = getPackage(abc); } super.getDependencies(abcIndex, scriptIndex, classIndex, false, customNs, abc, dependencies, ignorePackage, fullyQualifiedNames, uses); - //if (method_info != 0) - { - DependencyParser.parseDependenciesFromMethodInfo(abcIndex, this, scriptIndex, classIndex, false, customNs, abc, method_info, dependencies, ignorePackage, fullyQualifiedNames, new ArrayList<>(), uses); - } + DependencyParser.parseDependenciesFromMethodInfo(abcIndex, this, scriptIndex, classIndex, false, customNs, abc, method_info, dependencies, ignorePackage, fullyQualifiedNames, new ArrayList<>(), uses); } @Override diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java index 7862eabda..0c27b9e8f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitMethodGetterSetter.java @@ -51,15 +51,10 @@ public class TraitMethodGetterSetter extends Trait { @Override public void delete(ABC abc, boolean d) { super.delete(abc, d); - + abc.constants.getMultiname(name_index).deleted = d; abc.method_info.get(method_info).delete(abc, d); - } - - @Override - public String toString(ABC abc, List fullyQualifiedNames) { - return "0x" + Helper.formatAddress(fileOffset) + " " + Helper.byteArrToString(bytes) + " MethodGetterSetter " + abc.constants.getMultiname(name_index).toString(abc.constants, fullyQualifiedNames) + " disp_id=" + disp_id + " method_info=" + method_info + " metadata=" + Helper.intArrToString(metadata); - } + } @Override public void convertHeader(Trait parent, ConvertData convertData, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, NulWriter writer, List fullyQualifiedNames, boolean parallel) { @@ -79,10 +74,7 @@ public class TraitMethodGetterSetter extends Trait { customNs = m.getSimpleNamespaceName(abc.constants).toRawString(); } } - //if (method_info != 0) - { - DependencyParser.parseDependenciesFromMethodInfo(abcIndex, this, scriptIndex, classIndex, isStatic, customNs, abc, method_info, dependencies, ignorePackage, fullyQualifiedNames, new ArrayList<>(), uses); - } + DependencyParser.parseDependenciesFromMethodInfo(abcIndex, this, scriptIndex, classIndex, isStatic, customNs, abc, method_info, dependencies, ignorePackage, fullyQualifiedNames, new ArrayList<>(), uses); } @Override @@ -95,9 +87,9 @@ public class TraitMethodGetterSetter extends Trait { addKind = "set "; } MethodBody body = abc.findBody(method_info); - + getModifiers(abc, isStatic, insideInterface, writer, classIndex); - + if (abc.method_info.get(method_info).flagNative()) { writer.appendNoHilight("native "); } @@ -132,6 +124,11 @@ public class TraitMethodGetterSetter extends Trait { writer.endMethod(); } + @Override + public String toString(ABC abc, List fullyQualifiedNames) { + return "0x" + Helper.formatAddress(fileOffset) + " " + Helper.byteArrToString(bytes) + " MethodGetterSetter " + abc.constants.getMultiname(name_index).toString(abc.constants, fullyQualifiedNames) + " disp_id=" + disp_id + " method_info=" + method_info + " metadata=" + Helper.intArrToString(metadata); + } + @Override public GraphTextWriter toString(AbcIndexing abcIndex, Trait parent, ConvertData convertData, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, GraphTextWriter writer, List fullyQualifiedNames, boolean parallel, boolean insideInterface) throws InterruptedException { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java index 5d15842f6..b6a9ab4f2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java @@ -62,23 +62,14 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { @Override public void delete(ABC abc, boolean d) { super.delete(abc, d); - + abc.constants.getMultiname(name_index).deleted = d; } @Override public int getSlotIndex() { return slot_id; - } - - @Override - public String toString(ABC abc, List fullyQualifiedNames) { - String typeStr = "*"; - if (type_index > 0) { - typeStr = abc.constants.getMultiname(type_index).toString(abc.constants, fullyQualifiedNames); - } - return "0x" + Helper.formatAddress(fileOffset) + " " + Helper.byteArrToString(bytes) + " SlotConst " + abc.constants.getMultiname(name_index).toString(abc.constants, fullyQualifiedNames) + " slot=" + slot_id + " type=" + typeStr + " value=" + (new ValueKind(value_index, value_kind)).toString(abc) + " metadata=" + Helper.intArrToString(metadata); - } + } public String getType(AVM2ConstantPool constants, List fullyQualifiedNames) { String typeStr = "*"; @@ -96,7 +87,7 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { } typeStr = ":" + typeStr; - + String slotconst = "var"; if (kindType == TRAIT_CONST) { slotconst = "const"; @@ -116,13 +107,13 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { return true; } if (value_kind == ValueKind.CONSTANT_Namespace) { - if (abc.constants.getNamespace(value_index).kind == Namespace.KIND_PACKAGE_INTERNAL) { - return false; - } + if (abc.constants.getNamespace(value_index).kind == Namespace.KIND_PACKAGE_INTERNAL) { + return false; } + } return value_kind != 0; } - + public void getValueStr(AbcIndexing abcIndex, ScriptExportMode exportMode, Trait parent, ConvertData convertData, GraphTextWriter writer, ABC abc, List fullyQualifiedNames) throws InterruptedException { if (convertData.assignedValues.containsKey(this)) { @@ -146,7 +137,7 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { return; } - if (value_kind != 0) { + if (value_kind != 0) { ValueKind val = new ValueKind(value_index, value_kind); writer.hilightSpecial(val.toString(abc), HighlightSpecialType.TRAIT_VALUE); } @@ -159,6 +150,15 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { } return false; } + + @Override + public String toString(ABC abc, List fullyQualifiedNames) { + String typeStr = "*"; + if (type_index > 0) { + typeStr = abc.constants.getMultiname(type_index).toString(abc.constants, fullyQualifiedNames); + } + return "0x" + Helper.formatAddress(fileOffset) + " " + Helper.byteArrToString(bytes) + " SlotConst " + abc.constants.getMultiname(name_index).toString(abc.constants, fullyQualifiedNames) + " slot=" + slot_id + " type=" + typeStr + " value=" + (new ValueKind(value_index, value_kind)).toString(abc) + " metadata=" + Helper.intArrToString(metadata); + } @Override public GraphTextWriter toString(AbcIndexing abcIndex, Trait parent, ConvertData convertData, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, GraphTextWriter writer, List fullyQualifiedNames, boolean parallel, boolean insideInterface) throws InterruptedException { @@ -197,7 +197,7 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { public void convert(AbcIndexing abcIndex, Trait parent, ConvertData convertData, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, NulWriter writer, List fullyQualifiedNames, boolean parallel, ScopeStack scopeStack) throws InterruptedException { getNameStr(writer, abc, fullyQualifiedNames); if (hasValueStr(abc, convertData)) { - getValueStr(abcIndex,exportMode, parent, convertData, writer, abc, fullyQualifiedNames); + getValueStr(abcIndex, exportMode, parent, convertData, writer, abc, fullyQualifiedNames); } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java index b89ac1bca..073a45f5e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Traits.java @@ -132,9 +132,9 @@ public class Traits implements Cloneable, Serializable { Trait parent; ConvertData convertData; - + AbcIndexing abcIndex; - + ScopeStack scopeStack; public TraitConvertTask(AbcIndexing abcIndex, Trait trait, Trait parent, ConvertData convertData, boolean makePackages, String path, ABC abc, boolean isStatic, ScriptExportMode exportMode, int scriptIndex, int classIndex, NulWriter writer, List fullyQualifiedNames, int traitIndex, boolean parallel, ScopeStack scopeStack) { @@ -184,7 +184,6 @@ public class Traits implements Cloneable, Serializable { } GraphTargetItem v1 = convertData.assignedValues.get(o1).value; - Set subitems1 = v1.getAllSubItemsRecursively(); subitems1.add(v1); for (GraphTargetItem si : subitems1) { @@ -233,21 +232,13 @@ public class Traits implements Cloneable, Serializable { } writer.newLine(); int h = abc.getGlobalTraitId(TraitType.METHOD /*non-initializer*/, isStatic, classIndex, t); - //if (trait instanceof TraitClass) { -// writer.startClass(((TraitClass) trait).class_info); - //} else { - writer.startTrait(h); - //} + writer.startTrait(h); if (makePackages) { trait.toStringPackaged(abcIndex, parent, convertData, path, abc, isStatic, exportMode, scriptIndex, classIndex, writer, fullyQualifiedNames, parallel, insideInterface); } else { trait.toString(abcIndex, parent, convertData, path, abc, isStatic, exportMode, scriptIndex, classIndex, writer, fullyQualifiedNames, parallel, insideInterface); } - //if (trait instanceof TraitClass) { - // writer.endClass(); - //} else { - writer.endTrait(); - //} + writer.endTrait(); } return writer; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java index 68f65385a..f79f52c27 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ClassNameMultinameUsage.java @@ -84,7 +84,7 @@ public class ClassNameMultinameUsage extends MultinameUsage implements Definitio } return false; } - + @Override public int getScriptIndex() { return scriptIndex; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java index 1a5511ed1..5ed033066 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/ConstVarMultinameUsage.java @@ -60,7 +60,7 @@ public abstract class ConstVarMultinameUsage extends TraitMultinameUsage { if (classIndex > -1) { insideInterface = abc.instance_info.get(classIndex).isInterface(); } - + if (parentTraitIndex > -1) { if (traitsType == TRAITS_TYPE_CLASS) { ((TraitMethodGetterSetter) abc.class_info.get(classIndex).static_traits.traits.get(parentTraitIndex)).toStringHeader(null, convertData, "", abc, traitsType == TRAITS_TYPE_CLASS, ScriptExportMode.AS, -1/*FIXME*/, classIndex, writer, new ArrayList<>(), false, insideInterface); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsageInterface.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsageInterface.java index 57aeaac3c..dace2ca5b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsageInterface.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/InsideClassMultinameUsageInterface.java @@ -25,7 +25,7 @@ import com.jpexs.decompiler.flash.abc.ABC; public interface InsideClassMultinameUsageInterface { public int getScriptIndex(); - + public int getClassIndex(); public ABC getAbc(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java index 876bfd230..85970d6f2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/MethodNameMultinameUsage.java @@ -40,11 +40,11 @@ public class MethodNameMultinameUsage extends MethodMultinameUsage implements De TraitMultinameUsage otherTrait = (TraitMultinameUsage) other; if (otherTrait.classIndex == classIndex && otherTrait.traitsType == traitsType && otherTrait.parentTraitIndex == parentTraitIndex) { if (other.sameMultinameName(this)) { - - if(other instanceof MethodNameMultinameUsage){ - MethodNameMultinameUsage otherM = (MethodNameMultinameUsage)other; + + if (other instanceof MethodNameMultinameUsage) { + MethodNameMultinameUsage otherM = (MethodNameMultinameUsage) other; //getter/setter/method must match - if(otherM.traits.traits.get(otherM.traitIndex).kindType != traits.traits.get(traitIndex).kindType){ + if (otherM.traits.traits.get(otherM.traitIndex).kindType != traits.traits.get(traitIndex).kindType) { return false; } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/SuperInterfaceMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/SuperInterfaceMultinameUsage.java index 00ba11ad0..668e74c81 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/SuperInterfaceMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/SuperInterfaceMultinameUsage.java @@ -76,7 +76,7 @@ public class SuperInterfaceMultinameUsage extends MultinameUsage implements Insi public boolean collides(MultinameUsage other) { return false; } - + @Override public int getScriptIndex() { return scriptIndex; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java index a66d83030..d1f9b29bf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/usages/TraitMultinameUsage.java @@ -64,7 +64,7 @@ public abstract class TraitMultinameUsage extends MultinameUsage implements Insi return kind + " " + ii.getName(abc.constants).getNameWithNamespace(abc.constants, true).toPrintableString(true); } DottedChain scriptSimpleName = abc.script_info.get(scriptIndex).getSimplePackName(abc); - return "script " + (scriptSimpleName == null ? "" + scriptIndex:scriptSimpleName.toPrintableString(true)); + return "script " + (scriptSimpleName == null ? "" + scriptIndex : scriptSimpleName.toPrintableString(true)); } @Override 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 0b22338ea..b583bfb7d 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 @@ -124,7 +124,7 @@ public abstract class Action implements GraphSourceItem { private long address; private long virtualAddress = -1; - + private String charset; @Override @@ -135,8 +135,6 @@ public abstract class Action implements GraphSourceItem { public String getCharset() { return charset; } - - /** * Names of ActionScript properties @@ -190,7 +188,7 @@ public abstract class Action implements GraphSourceItem { this.charset = charset; } - public Action() { + public Action() { } /** @@ -423,6 +421,7 @@ public abstract class Action implements GraphSourceItem { lastAction = a; baos.write(a.getBytes(version)); } catch (IOException e) { + //ignore } } if (addZero && (lastAction == null || !(lastAction instanceof ActionEnd))) { @@ -759,29 +758,6 @@ public abstract class Action implements GraphSourceItem { public abstract boolean execute(LocalDataArea lda); - /* { - //throw new UnsupportedOperationException("Action " + toString() + " not implemented"); - return false; - }*/ - /** - * Translates this function to stack and output. - * - * @param uninitializedClassTraits - * @param secondPassData - * @param insideDoInitAction - * @param lineStartIns Line start instruction - * @param stack Stack - * @param output Output - * @param regNames Register names - * @param variables Variables - * @param functions Functions - * @param staticOperation the value of staticOperation - * @param path the value of path - * @throws java.lang.InterruptedException - */ - public void translate(Map> uninitializedClassTraits, SecondPassData secondPassData, boolean insideDoInitAction, GraphSourceItem lineStartIns, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) throws InterruptedException { - } - @Override public int getStackPopCount(BaseLocalData localData, TranslateStack stack) { return 0; @@ -855,14 +831,10 @@ public abstract class Action implements GraphSourceItem { return -1; } - public static List actionsToTree(Map> uninitializedClassTraits, boolean insideDoInitAction, boolean insideFunction, List actions, int version, int staticOperation, String path, String charset) throws InterruptedException { - return actionsToTree(uninitializedClassTraits, insideDoInitAction, insideFunction, new HashMap<>(), new HashMap<>(), new HashMap<>(), actions, version, staticOperation, path, charset); - } - public static GraphTextWriter actionsToSource(Map> uninitializedClassTraits, final ASMSource asm, final List actions, final String path, GraphTextWriter writer, String charset) throws InterruptedException { return Action.actionsToSource(uninitializedClassTraits, asm, actions, path, writer, charset, new ArrayList<>()); } - + /** * Converts list of actions to ActionScript source code * @@ -890,7 +862,7 @@ public abstract class Action implements GraphSourceItem { boolean insideDoInitAction = (asm instanceof DoInitActionTag); List tree = actionsToTree(uninitializedClassTraits, insideDoInitAction, false, new HashMap<>(), new HashMap<>(), new HashMap<>(), actions, version, staticOperation, path, charset); SWFDecompilerPlugin.fireActionTreeCreated(tree, swf); - for (ActionTreeOperation treeOperation:treeOperations) { + for (ActionTreeOperation treeOperation : treeOperations) { treeOperation.run(tree); } if (Configuration.autoDeobfuscate.get()) { @@ -937,6 +909,10 @@ public abstract class Action implements GraphSourceItem { return writer; } + public static List actionsToTree(Map> uninitializedClassTraits, boolean insideDoInitAction, boolean insideFunction, List actions, int version, int staticOperation, String path, String charset) throws InterruptedException { + return actionsToTree(uninitializedClassTraits, insideDoInitAction, insideFunction, new HashMap<>(), new HashMap<>(), new HashMap<>(), actions, version, staticOperation, path, charset); + } + /** * Converts list of actions to List of treeItems * @@ -964,19 +940,29 @@ public abstract class Action implements GraphSourceItem { } } + /** + * Translates this function to stack and output. + * + * @param uninitializedClassTraits + * @param secondPassData + * @param insideDoInitAction + * @param lineStartIns Line start instruction + * @param stack Stack + * @param output Output + * @param regNames Register names + * @param variables Variables + * @param functions Functions + * @param staticOperation the value of staticOperation + * @param path the value of path + * @throws java.lang.InterruptedException + */ + public void translate(Map> uninitializedClassTraits, SecondPassData secondPassData, boolean insideDoInitAction, GraphSourceItem lineStartIns, TranslateStack stack, List output, HashMap regNames, HashMap variables, HashMap functions, int staticOperation, String path) throws InterruptedException { + } + @Override public void translate(BaseLocalData localData, TranslateStack stack, List output, int staticOperation, String path) throws InterruptedException { ActionLocalData aLocalData = (ActionLocalData) localData; - /*int expectedSize = stack.size() - getStackPopCount(localData, stack); - if (expectedSize < 0) { - expectedSize = 0; - } - expectedSize += getStackPushCount(localData, stack);*/ - translate(aLocalData.uninitializedClassTraits, aLocalData.secondPassData, aLocalData.insideDoInitAction, aLocalData.lineStartAction, stack, output, aLocalData.regNames, aLocalData.variables, aLocalData.functions, staticOperation, path); - /*if (stack.size() != expectedSize && !(this instanceof ActionPushDuplicate)) { - throw new Error("HONFIKA stack size mismatch"); - }*/ } @Override @@ -1101,14 +1087,15 @@ public abstract class Action implements GraphSourceItem { } out = new ArrayList<>(); - out.add(new CommentItem(new String[]{ + String[] lines = new String[]{ "", " * " + AppResources.translate("decompilationError"), " * " + AppResources.translate("decompilationError.obfuscated"), Helper.decompilationErrorAdd == null ? null : " * " + Helper.decompilationErrorAdd, " * " + AppResources.translate("decompilationError.errorType") + ": " + ex.getClass().getSimpleName(), - ""})); + ""}; + out.add(new CommentItem(lines)); } outs.add(out); endAddr += size; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java index 3d5e3b4a5..49bd650c3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java @@ -16,11 +16,10 @@ */ package com.jpexs.decompiler.flash.action; -import com.jpexs.decompiler.flash.action.as2.ActionScript2ClassDetector; import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.FinalProcessLocalData; import com.jpexs.decompiler.flash.SWF; -import static com.jpexs.decompiler.flash.action.Action.adr2ip; +import com.jpexs.decompiler.flash.action.as2.ActionScript2ClassDetector; import com.jpexs.decompiler.flash.action.as2.Trait; import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; import com.jpexs.decompiler.flash.action.model.EnumerateActionItem; @@ -104,8 +103,6 @@ public class ActionGraph extends Graph { return uninitializedClassTraits; } - - @Override public ActionGraphSource getGraphCode() { return (ActionGraphSource) code; @@ -127,7 +124,7 @@ public class ActionGraph extends Graph { outs.add(new ActionList(((ActionGraphSource) code).getCharset())); continue; } - outs.add(new ActionList(alist.subList(adr2ip(alist, endAddr), adr2ip(alist, endAddr + size)), getGraphCode().getCharset())); + outs.add(new ActionList(alist.subList(Action.adr2ip(alist, endAddr), Action.adr2ip(alist, endAddr + size)), getGraphCode().getCharset())); endAddr += size; } @@ -152,7 +149,7 @@ public class ActionGraph extends Graph { } public static List translateViaGraph(Map> uninitializedClassTraits, SecondPassData secondPassData, boolean insideDoInitAction, boolean insideFunction, HashMap registerNames, HashMap variables, HashMap functions, List code, int version, int staticOperation, String path, String charset) throws InterruptedException { - ActionGraph g = new ActionGraph(uninitializedClassTraits,path, insideDoInitAction, insideFunction, code, registerNames, variables, functions, version, charset); + ActionGraph g = new ActionGraph(uninitializedClassTraits, path, insideDoInitAction, insideFunction, code, registerNames, variables, functions, version, charset); ActionLocalData localData = new ActionLocalData(secondPassData, insideDoInitAction, registerNames, uninitializedClassTraits); g.init(localData); return g.translate(localData, staticOperation, path); @@ -407,12 +404,12 @@ public class ActionGraph extends Graph { if (checkedLoop == null) { checkedLoop = new Loop(localData.loops.size(), null, null); checkedBody.add(new BreakItem(null, null, checkedLoop.id)); - } + } list.remove(t - 1); t--; if (eti.object instanceof SetTypeActionItem) { list.add(t++, eti.object); - eti.object = ((SetTypeActionItem)eti.object).getObject(); + eti.object = ((SetTypeActionItem) eti.object).getObject(); } list.add(t, new ForInActionItem(null, null, checkedLoop, (GraphTargetItem) neq.leftSide, eti.object, checkedBody)); if (t + 1 < list.size()) { @@ -436,8 +433,8 @@ public class ActionGraph extends Graph { public void makeAllCommands(List commands, TranslateStack stack) { GraphTargetItem enumerate = null; - if(!commands.isEmpty() && (commands.get(commands.size()-1) instanceof EnumerateActionItem)) { - enumerate = commands.remove(commands.size() -1 ); + if (!commands.isEmpty() && (commands.get(commands.size() - 1) instanceof EnumerateActionItem)) { + enumerate = commands.remove(commands.size() - 1); } super.makeAllCommands(commands, stack); //ags.getVariables() @@ -484,7 +481,7 @@ public class ActionGraph extends Graph { List ret = super.translate(localData, staticOperation, path); if (insideDoInitAction && !insideFunction) { ActionScript2ClassDetector detector = new ActionScript2ClassDetector(); - detector.checkClass(uninitializedClassTraits,ret, ((ActionGraphSource) code).getVariables(), path); + detector.checkClass(uninitializedClassTraits, ret, ((ActionGraphSource) code).getVariables(), path); } makeDefineRegistersUp(ret); return ret; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java index 821fcc3cb..3b6b92d64 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraphSource.java @@ -53,7 +53,7 @@ public class ActionGraphSource extends GraphSource { private final boolean insideDoInitAction; private final String path; - + private String charset; public List getActions() { @@ -75,8 +75,6 @@ public class ActionGraphSource extends GraphSource { return charset; } - - @Override public Set getImportantAddresses() { return Action.getActionsAllRefs(actions); @@ -113,7 +111,7 @@ public class ActionGraphSource extends GraphSource { public List translatePart(Graph graph, GraphPart part, BaseLocalData localData, TranslateStack stack, int start, int end, int staticOperation, String path) throws InterruptedException, GraphPartChangeException { Reference fi = new Reference<>(localData.lineStartInstruction); - List r = Action.actionsPartToTree((ActionGraph)graph, localData.allSwitchParts, localData.secondPassData, this.insideDoInitAction, fi, registerNames, variables, functions, stack, actions, start, end, version, staticOperation, path, charset); + List r = Action.actionsPartToTree((ActionGraph) graph, localData.allSwitchParts, localData.secondPassData, this.insideDoInitAction, fi, registerNames, variables, functions, stack, actions, start, end, version, staticOperation, path, charset); localData.lineStartInstruction = fi.getVal(); return r; } @@ -127,32 +125,15 @@ public class ActionGraphSource extends GraphSource { } } - /* public int adr2posInside(long addr){ - long lastAddr=0; - if(addr==0){ - return 0; - } - for(int i=0;iaddr){ - System.err.println("lastAddr="+lastAddr+" addr="+addr+" curAddr="+curAdr); - int contPos=adr2pos(lastAddr); - System.err.println("/insadr2po"); - GraphSourceItem src=get(contPos); - if(src instanceof ActionContainer){ - ActionContainer cnt=(ActionContainer)src; - return new ActionGraphSource(cnt.getActions(), version, registerNames, variables, functions).adr2pos(addr); - }else{ - return -1; - } - } - lastAddr=curAdr; - } - return -1; - }*/ + @Override + public long pos2adr(int pos) { + GraphSourceItem si = actions.get(pos); + if (si instanceof Action) { + return ((Action) si).getAddress(); + } + return 0; + } + @Override public int adr2pos(long adr) { if (posCache == null) { @@ -173,15 +154,6 @@ public class ActionGraphSource extends GraphSource { return ret; } - @Override - public long pos2adr(int pos) { - GraphSourceItem si = actions.get(pos); - if (si instanceof Action) { - return ((Action) si).getAddress();//Action.ip2adr(actions, pos, version); - } - return 0; - } - @Override public int adr2pos(long adr, boolean nearest) { if (posCache == null) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionList.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionList.java index 8ab101814..a8c72834c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionList.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionList.java @@ -17,8 +17,6 @@ package com.jpexs.decompiler.flash.action; import com.jpexs.decompiler.flash.SWF; -import static com.jpexs.decompiler.flash.action.Action.actionsToSource; -import static com.jpexs.decompiler.flash.action.Action.actionsToString; import com.jpexs.decompiler.flash.action.special.ActionNop; import com.jpexs.decompiler.flash.action.special.ActionStore; import com.jpexs.decompiler.flash.action.swf4.ActionIf; @@ -51,7 +49,7 @@ public class ActionList extends ArrayList { public int deobfuscationMode; public byte[] fileData; - + private String charset; public ActionList(String charset) { @@ -60,8 +58,7 @@ public class ActionList extends ArrayList { public String getCharset() { return charset; - } - + } public ActionList(Collection actions, String charset) { super(actions); @@ -73,14 +70,14 @@ public class ActionList extends ArrayList { addAll(list); } - public void removeAction(int index) { - ActionListReader.removeAction(this, index, true); - } - public void removeActions(List actionsToRemove) { ActionListReader.removeActions(this, actionsToRemove, true); } + public void removeAction(int index) { + ActionListReader.removeAction(this, index, true); + } + public void removeAction(int index, int count) { if (size() <= index + count - 1) { // Can't remove count elements, only size - index is available @@ -558,7 +555,7 @@ public class ActionList extends ArrayList { @Override public String toString() { HighlightedTextWriter writer = new HighlightedTextWriter(new CodeFormatting(), false); - actionsToString(new ArrayList<>(), 0, this, SWF.DEFAULT_VERSION, ScriptExportMode.PCODE, writer); + Action.actionsToString(new ArrayList<>(), 0, this, SWF.DEFAULT_VERSION, ScriptExportMode.PCODE, writer); return writer.toString(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java index 7f277244f..8ba2224b3 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionListReader.java @@ -171,7 +171,6 @@ public class ActionListReader { System.err.println("loc" + Helper.formatAddress(a.getAddress()) + " (" + p + "): " + a.getASMSource(actions, new HashSet(), ScriptExportMode.PCODE)); p++; }*/ - //TODO: This cleaner needs to be executed only before actual decompilation, not when disassembly only try { new ActionDefineFunctionPushRegistersCleaner().actionListParsed(actions, sis.getSwf()); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java index 704652528..14041cea1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionLocalData.java @@ -33,7 +33,7 @@ import java.util.Set; public class ActionLocalData extends BaseLocalData { public final Map> uninitializedClassTraits; - + public final HashMap regNames; public final HashMap variables; @@ -49,7 +49,7 @@ public class ActionLocalData extends BaseLocalData { regNames = new HashMap<>(); variables = new HashMap<>(); functions = new HashMap<>(); - this.insideDoInitAction = insideDoInitAction; + this.insideDoInitAction = insideDoInitAction; this.uninitializedClassTraits = uninitializedClassTraits; } @@ -58,7 +58,7 @@ public class ActionLocalData extends BaseLocalData { this.secondPassData = secondPassData; variables = new HashMap<>(); functions = new HashMap<>(); - this.insideDoInitAction = insideDoInitAction; + this.insideDoInitAction = insideDoInitAction; this.uninitializedClassTraits = uninitializedClassTraits; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionScriptObject.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionScriptObject.java index 2fe7abd1c..ec47b4078 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionScriptObject.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionScriptObject.java @@ -71,7 +71,7 @@ public class ActionScriptObject implements Cloneable { } public void removeMember(String path) { - String pathParts[]; + String[] pathParts; if (path.startsWith("/")) { pathParts = path.substring(1).split("/"); } else { @@ -107,7 +107,7 @@ public class ActionScriptObject implements Cloneable { } public void setMember(String path, Object value) { - String pathParts[]; + String[] pathParts; if (path.startsWith("/")) { pathParts = path.substring(1).split("/"); } else { @@ -162,7 +162,7 @@ public class ActionScriptObject implements Cloneable { } public Object getMember(String path) { - String pathParts[]; + String[] pathParts; if (path.startsWith("/")) { pathParts = path.substring(1).split("/"); } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionSecondPassData.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionSecondPassData.java index 1d791d58d..d5abcb46f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionSecondPassData.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionSecondPassData.java @@ -27,7 +27,8 @@ import java.util.List; * @author JPEXS */ public class ActionSecondPassData extends SecondPassData { + List> switchParts = new ArrayList<>(); List> switchOnFalseParts = new ArrayList<>(); - List> switchCaseExpressions = new ArrayList<>(); + List> switchCaseExpressions = new ArrayList<>(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionTreeOperation.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionTreeOperation.java index 86b498ab8..5113490d2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionTreeOperation.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionTreeOperation.java @@ -24,5 +24,6 @@ import java.util.List; * @author JPEXS */ public interface ActionTreeOperation { + public void run(List tree); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/ActionScript2ClassDetector.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/ActionScript2ClassDetector.java index 5a43063d3..601cae26f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/ActionScript2ClassDetector.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/ActionScript2ClassDetector.java @@ -17,7 +17,6 @@ package com.jpexs.decompiler.flash.action.as2; import com.jpexs.decompiler.flash.IdentifiersDeobfuscation; -import com.jpexs.decompiler.flash.action.as2.Trait; import com.jpexs.decompiler.flash.action.model.CallFunctionActionItem; import com.jpexs.decompiler.flash.action.model.CallMethodActionItem; import com.jpexs.decompiler.flash.action.model.DirectValueActionItem; @@ -56,7 +55,6 @@ import java.util.Map; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.regex.Matcher; import java.util.regex.Pattern; /** @@ -718,11 +716,11 @@ public class ActionScript2ClassDetector { } else { //throw new AssertException("No constructor found"); } - + String fullClassName = String.join(".", getMembersPath(classNameTargetPath)); if (uninitializedClassTraits.containsKey(fullClassName)) { int t = 0; - for (String traitName:uninitializedClassTraits.get(fullClassName).keySet()) { + for (String traitName : uninitializedClassTraits.get(fullClassName).keySet()) { Trait trait = uninitializedClassTraits.get(fullClassName).get(traitName); traitsStatic.add(t, trait.isStatic()); traits.add(t, new MyEntry<>(new DirectValueActionItem(trait.getName()), null)); @@ -741,8 +739,7 @@ public class ActionScript2ClassDetector { commands.remove(commandsStartPos + 1); } } - - + // goto next line and check next classes return true; } catch (AssertException ex) { @@ -909,7 +906,7 @@ public class ActionScript2ClassDetector { return true; } } - }//check_variant2 + } //check_variant2 return false; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/ActionScript2Classes.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/ActionScript2Classes.java index 66ec5d975..976a3e1ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/ActionScript2Classes.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/ActionScript2Classes.java @@ -32,15 +32,17 @@ import java.util.logging.Logger; /** * Index of ActionScript 2 built in classes. + * * @author JPEXS */ public class ActionScript2Classes { - private static final Map> classToTraits = new HashMap<>(); + + private static final Map> classToTraits = new HashMap<>(); private static final Map> classInheritance = new HashMap<>(); - + private static boolean inited = false; - - private synchronized static void initClasses() { + + private static synchronized void initClasses() { if (inited) { return; } @@ -49,12 +51,12 @@ public class ActionScript2Classes { BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8")); String line; String clsName = ""; - while((line = br.readLine()) != null) { + while ((line = br.readLine()) != null) { line = line.trim(); if (line.isEmpty()) { continue; } - String parts[] = line.split(" "); + String[] parts = line.split(" "); if (parts[0].equals("class")) { clsName = parts[1]; classToTraits.put(clsName, new TreeMap<>()); @@ -73,21 +75,21 @@ public class ActionScript2Classes { classInheritance.get(clsName).add(parts[pos + 1]); continue; } - + String traitType = parts[pos]; String name = parts[pos + 1]; String type = parts[pos + 2]; Trait trait; - switch(traitType) { - case "function": + switch (traitType) { + case "function": trait = new Method(isStatic, name, type, clsName); break; case "var": trait = new Variable(isStatic, name, type, clsName); break; - default: - throw new RuntimeException("Unknown trait type: "+traitType); - } + default: + throw new RuntimeException("Unknown trait type: " + traitType); + } classToTraits.get(clsName).put(name, trait); } } catch (UnsupportedEncodingException ex) { @@ -97,17 +99,16 @@ public class ActionScript2Classes { } inited = true; } - - + public static boolean traitExists(String className, String name, boolean withInheritance) { if (!classToTraits.containsKey(className)) { return false; } - + if (classToTraits.get(className).containsKey(name)) { return true; } - + if (withInheritance) { if (classInheritance.containsKey(className)) { for (String parentClassName : classInheritance.get(className)) { @@ -121,29 +122,30 @@ public class ActionScript2Classes { } return false; } - + /** * Get class traits, null when class not exists (or is not built-in) + * * @param className * @param withInheritance - * @return + * @return */ public static Map getClassTraits(String className, boolean withInheritance) { initClasses(); - + Map result = new LinkedHashMap<>(); if (!classToTraits.containsKey(className)) { return null; } - for (String name: classToTraits.get(className).keySet()) { + for (String name : classToTraits.get(className).keySet()) { result.put(name, classToTraits.get(className).get(name)); } - + if (withInheritance) { if (classInheritance.containsKey(className)) { for (String parentClassName : classInheritance.get(className)) { if (classToTraits.containsKey(parentClassName)) { - for (String name: classToTraits.get(parentClassName).keySet()) { + for (String name : classToTraits.get(parentClassName).keySet()) { if (!result.containsKey(name)) { result.put(name, classToTraits.get(parentClassName).get(name)); } @@ -163,18 +165,18 @@ public class ActionScript2Classes { public static Map> getClassInheritance() { initClasses(); return classInheritance; - } - + } + public static void main(String[] args) { Map traits = getClassTraits("flash.filters.BevelFilter", true); if (traits != null) { - for(String name:traits.keySet()) { + for (String name : traits.keySet()) { Trait t = traits.get(name); - System.out.println(t.toString() + " (" + t.getClassName() +")"); + System.out.println(t.toString() + " (" + t.getClassName() + ")"); } } - - System.out.println("trait exists: "+ traitExists("flash.filters.BevelFilter", "quality", false)); + + System.out.println("trait exists: " + traitExists("flash.filters.BevelFilter", "quality", false)); } - + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Method.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Method.java index f877dc2f9..e0c40b13c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Method.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Method.java @@ -21,6 +21,7 @@ package com.jpexs.decompiler.flash.action.as2; * @author JPEXS */ public class Method implements Trait { + private final boolean isStatic; private final String name; private final String returnType; @@ -37,7 +38,7 @@ public class Method implements Trait { public String getClassName() { return className; } - + @Override public boolean isStatic() { return isStatic; @@ -51,10 +52,10 @@ public class Method implements Trait { public String getReturnType() { return returnType; } - + @Override public String toString() { - return (isStatic ? "static " : "") + "function " + name + ": " +returnType; + return (isStatic ? "static " : "") + "function " + name + ": " + returnType; } @Override @@ -65,5 +66,5 @@ public class Method implements Trait { @Override public String getType() { return "Function"; - } + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Trait.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Trait.java index d166d5ae0..b0124dd6c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Trait.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Trait.java @@ -20,10 +20,15 @@ package com.jpexs.decompiler.flash.action.as2; * * @author JPEXS */ -public interface Trait { +public interface Trait { + public boolean isStatic(); + public String getName(); + public String getType(); + public String getCallType(); + public String getClassName(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/UninitializedClassFieldsDetector.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/UninitializedClassFieldsDetector.java index d2d44aaef..8be6bd9c0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/UninitializedClassFieldsDetector.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/UninitializedClassFieldsDetector.java @@ -34,7 +34,6 @@ import com.jpexs.decompiler.flash.tags.DoInitActionTag; import com.jpexs.decompiler.flash.tags.base.ASMSource; import com.jpexs.decompiler.graph.AbstractGraphTargetVisitor; import com.jpexs.decompiler.graph.GraphTargetItem; -import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; @@ -46,7 +45,7 @@ import java.util.Map; * @author JPEXS */ public class UninitializedClassFieldsDetector { - + /** * Gets path of variable and its getMembers: a.b.c.d => [a,b,c,d] * @@ -70,7 +69,7 @@ public class UninitializedClassFieldsDetector { if (item instanceof DirectValueActionItem) { DirectValueActionItem dv1 = (DirectValueActionItem) item; if (dv1.value instanceof RegisterNumber) { - RegisterNumber rn = (RegisterNumber)dv1.value; + RegisterNumber rn = (RegisterNumber) dv1.value; if ("this".equals(rn.name)) { ret.add(0, "this"); return ret; @@ -92,7 +91,7 @@ public class UninitializedClassFieldsDetector { ret.add(0, varName); return ret; } - + private List getFullPath(GraphTargetItem item) { if (item instanceof GetMemberActionItem) { return getMembersPath(item); @@ -110,30 +109,30 @@ public class UninitializedClassFieldsDetector { ret.add(nDv.getAsString()); return ret; } - + GraphTargetItem name; GraphTargetItem objectName; - + if (item instanceof SetMemberActionItem) { SetMemberActionItem sm = (SetMemberActionItem) item; name = sm.objectName; - objectName = sm.object; + objectName = sm.object; } else if (item instanceof CallMethodActionItem) { CallMethodActionItem cm = (CallMethodActionItem) item; name = cm.methodName; - objectName = cm.scriptObject; + objectName = cm.scriptObject; } else if (item instanceof NewMethodActionItem) { NewMethodActionItem nm = (NewMethodActionItem) item; name = nm.methodName; - objectName = nm.scriptObject; + objectName = nm.scriptObject; } else if (item instanceof DeleteActionItem) { DeleteActionItem d = (DeleteActionItem) item; name = d.propertyName; - objectName = d.object; + objectName = d.object; } else { return null; } - + if (!(name instanceof DirectValueActionItem)) { return null; } @@ -149,7 +148,7 @@ public class UninitializedClassFieldsDetector { path.add(currentMemberName); return path; } - + private boolean containsTrait(Map> classTraits, Map> classInheritance, String className, String name) { if (!classTraits.containsKey(className)) { return false; @@ -157,41 +156,41 @@ public class UninitializedClassFieldsDetector { if (classTraits.get(className).containsKey(name)) { return true; } - for (String parent:classInheritance.get(className)) { + for (String parent : classInheritance.get(className)) { if (classTraits.containsKey(parent) && classTraits.get(parent).containsKey(name)) { return true; } } return false; } - + public Map> calculateAs2UninitializedClassTraits(SWF swf) { if (swf.isAS3()) { return new HashMap<>(); } final Map> result = new LinkedHashMap<>(); Map asms = swf.getASMs(false); - + List classesAsms = new ArrayList<>(); - + final Map> classTraits = new LinkedHashMap<>(ActionScript2Classes.getClassToTraits()); final Map> classInheritance = new HashMap<>(ActionScript2Classes.getClassInheritance()); - + //get all assigned traits and inheritance tree - for (String key:asms.keySet()) { + for (String key : asms.keySet()) { ASMSource asm = asms.get(key); if (asm instanceof DoInitActionTag) { - DoInitActionTag doi = (DoInitActionTag)asm; + DoInitActionTag doi = (DoInitActionTag) asm; String exportName = doi.getSwf().getCharacter(doi.getCharacterId()).getExportName(); - if (exportName != null && exportName.startsWith("__Packages.")) { + if (exportName != null && exportName.startsWith("__Packages.")) { List tree = asm.getActionsToTree(); - for (GraphTargetItem item:tree) { + for (GraphTargetItem item : tree) { if (item instanceof InterfaceActionItem) { InterfaceActionItem iai = (InterfaceActionItem) item; String className = String.join(".", getMembersPath(iai.name)); - classInheritance.put(className, new ArrayList<>()); + classInheritance.put(className, new ArrayList<>()); if (iai.superInterfaces != null) { - for (GraphTargetItem imp: iai.superInterfaces) { + for (GraphTargetItem imp : iai.superInterfaces) { String imtName = String.join(".", getMembersPath(imp)); classInheritance.get(className).add(imtName); } @@ -204,7 +203,7 @@ public class UninitializedClassFieldsDetector { if (!classTraits.containsKey(className)) { classTraits.put(className, new LinkedHashMap<>()); } - for (int i = 0; i en = cai.traits.get(i); if (!(en.getKey() instanceof DirectValueActionItem)) { continue; @@ -214,38 +213,38 @@ public class UninitializedClassFieldsDetector { GraphTargetItem value = en.getValue(); boolean isStatic = cai.traitsStatic.get(i); if (value instanceof FunctionActionItem) { - Method m = new Method(isStatic, name, "Unknown" /*FIXME?*/, className); + Method m = new Method(isStatic, name, "Unknown" /*FIXME?*/, className); classTraits.get(className).put(name, m); } else { Variable v = new Variable(isStatic, name, name, className); classTraits.get(className).put(name, v); - } - } - if (cai.extendsOp!=null) { - String parentClassName = String.join(".", getMembersPath(cai.extendsOp)); + } + } + if (cai.extendsOp != null) { + String parentClassName = String.join(".", getMembersPath(cai.extendsOp)); classInheritance.get(className).add(parentClassName); } else { classInheritance.get(className).add("Object"); } if (cai.implementsOp != null) { - for (GraphTargetItem imp: cai.implementsOp) { + for (GraphTargetItem imp : cai.implementsOp) { String imtName = String.join(".", getMembersPath(imp)); classInheritance.get(className).add(imtName); } - } + } } } classesAsms.add(doi); - } + } } } - + //Complete inheritance tree - for (String className: classInheritance.keySet()) { + for (String className : classInheritance.keySet()) { for (int i = 0; i < classInheritance.get(className).size(); i++) { String parentClass = classInheritance.get(className).get(i); if (classInheritance.containsKey(parentClass)) { - for (String p: classInheritance.get(parentClass)) { + for (String p : classInheritance.get(parentClass)) { if (!classInheritance.get(className).contains(p)) { classInheritance.get(className).add(p); } @@ -253,28 +252,27 @@ public class UninitializedClassFieldsDetector { } } } - - + //Detect this.x assigns - for (String key:asms.keySet()) { + for (String key : asms.keySet()) { ASMSource asm = asms.get(key); if (asm instanceof DoInitActionTag) { - DoInitActionTag doi = (DoInitActionTag)asm; + DoInitActionTag doi = (DoInitActionTag) asm; String exportName = doi.getSwf().getCharacter(doi.getCharacterId()).getExportName(); - if (exportName != null && exportName.startsWith("__Packages.")) { + if (exportName != null && exportName.startsWith("__Packages.")) { List tree = asm.getActionsToTree(); - for (GraphTargetItem item:tree) { + for (GraphTargetItem item : tree) { if (item instanceof ClassActionItem) { ClassActionItem cai = (ClassActionItem) item; - final String className = String.join(".", getMembersPath(cai.className)); - for (int i = 0; i en = cai.traits.get(i); if (!(en.getKey() instanceof DirectValueActionItem)) { continue; } GraphTargetItem value = en.getValue(); if (value instanceof GraphTargetItem) { - AbstractGraphTargetVisitor visitor = new AbstractGraphTargetVisitor(){ + AbstractGraphTargetVisitor visitor = new AbstractGraphTargetVisitor() { @Override public void visit(GraphTargetItem item) { List path = getFullPath(item); @@ -293,8 +291,8 @@ public class UninitializedClassFieldsDetector { } } } - } - } + } + } }; visitor.visit(value); value.visitRecursively(visitor); @@ -303,47 +301,47 @@ public class UninitializedClassFieldsDetector { } } classesAsms.add(doi); - } + } } - } - + } + //getting static classname.x assigns - for (String key:asms.keySet()) { + for (String key : asms.keySet()) { ASMSource asm = asms.get(key); List tree = asm.getActionsToTree(); - for (GraphTargetItem item:tree) { - AbstractGraphTargetVisitor visitor = new AbstractGraphTargetVisitor(){ - @Override - public void visit(GraphTargetItem item) { + for (GraphTargetItem item : tree) { + AbstractGraphTargetVisitor visitor = new AbstractGraphTargetVisitor() { + @Override + public void visit(GraphTargetItem item) { + if (item instanceof SetMemberActionItem) { if (item instanceof SetMemberActionItem) { - if (item instanceof SetMemberActionItem) { - List path = getFullPath(item); - if (path != null) { - List parent = new ArrayList<>(path); - parent.remove(parent.size() - 1); - String name = path.get(path.size() - 1); - - String className = String.join(".", parent); - if (classInheritance.containsKey(className)) { - //it's a class - if (!containsTrait(classTraits, classInheritance, className, name) && (!result.containsKey(className) || !result.get(className).containsKey(name))) { - Variable v = new Variable(true, name, null, className); - if (!result.containsKey(className)) { - result.put(className, new LinkedHashMap<>()); - } - result.get(className).put(name, v); + List path = getFullPath(item); + if (path != null) { + List parent = new ArrayList<>(path); + parent.remove(parent.size() - 1); + String name = path.get(path.size() - 1); + + String className = String.join(".", parent); + if (classInheritance.containsKey(className)) { + //it's a class + if (!containsTrait(classTraits, classInheritance, className, name) && (!result.containsKey(className) || !result.get(className).containsKey(name))) { + Variable v = new Variable(true, name, null, className); + if (!result.containsKey(className)) { + result.put(className, new LinkedHashMap<>()); } - } + result.get(className).put(name, v); + } } } } - } - }; + } + } + }; visitor.visit(item); item.visitRecursively(visitor); } } - + /*for (String cls:result.keySet()) { System.err.println("class "+cls); for(String name:result.get(cls).keySet()) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Variable.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Variable.java index 8cfd81fa6..e547796cc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Variable.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/as2/Variable.java @@ -21,6 +21,7 @@ package com.jpexs.decompiler.flash.action.as2; * @author JPEXS */ public class Variable implements Trait { + private final boolean isStatic; private final String name; private final String type; @@ -42,23 +43,24 @@ public class Variable implements Trait { public String getName() { return name; } + @Override public String getType() { return type; - } + } @Override public String toString() { return (isStatic ? "static " : "") + "var " + name + ": " + getType(); - } + } @Override public String getCallType() { return null; - } - + } + @Override public String getClassName() { return className; - } + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/fastactionlist/FastActionList.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/fastactionlist/FastActionList.java index d9a479061..63db2be5b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/fastactionlist/FastActionList.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/fastactionlist/FastActionList.java @@ -45,7 +45,7 @@ public class FastActionList implements Collection { private final Map actionItemMap; private final Set actionItemSet; - + private String charset; public FastActionList(ActionList actions) { @@ -63,20 +63,13 @@ public class FastActionList implements Collection { public String getCharset() { return charset; - } - - + } public final ActionItem insertItemBefore(ActionItem item, Action action) { ActionItem newItem = new ActionItem(action); return insertItemBefore(item, newItem); } - - public final ActionItem insertItemAfter(ActionItem item, Action action) { - ActionItem newItem = new ActionItem(action); - return insertItemAfter(item, newItem); - } - + public final ActionItem insertItemBefore(ActionItem item, ActionItem newItem) { insertItemAfter(item.prev, newItem); if (item == firstItem) { @@ -86,6 +79,11 @@ public class FastActionList implements Collection { return newItem; } + public final ActionItem insertItemAfter(ActionItem item, Action action) { + ActionItem newItem = new ActionItem(action); + return insertItemAfter(item, newItem); + } + public final ActionItem insertItemAfter(ActionItem item, ActionItem newItem) { if (item == null && firstItem == null) { firstItem = newItem; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java index e3978a447..6ba02b585 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/flashlite/ActionFSCommand2.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.action.flashlite; import com.jpexs.decompiler.flash.BaseLocalData; import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.LocalDataArea; +import com.jpexs.decompiler.flash.action.as2.Trait; import com.jpexs.decompiler.flash.action.model.FSCommand2ActionItem; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; @@ -27,7 +28,6 @@ import com.jpexs.decompiler.graph.TranslateStack; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import com.jpexs.decompiler.flash.action.as2.Trait; import java.util.Map; /** diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java index 2e7fd7677..ff7a75732 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ActionItem.java @@ -76,8 +76,8 @@ public abstract class ActionItem extends GraphTargetItem implements Serializable protected List toSourceCall(SourceGeneratorLocalData localData, SourceGenerator gen, List list) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) gen; - String charset = asGenerator.getCharset(); - + String charset = asGenerator.getCharset(); + List ret = new ArrayList<>(); for (int i = 0; i < list.size(); i++) { ret.addAll(0, list.get(i).toSource(localData, gen)); 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 3aec081e5..d628cc44c 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 @@ -45,11 +45,10 @@ public class CallMethodActionItem extends ActionItem { public static int SPECIAL_GETTER = 1; public static int SPECIAL_SETTER = 2; - - + private int special = 0; private String setterGetterVarName = null; - + @Override public void visit(GraphTargetVisitorInterface visitor) { visitor.visitAll(arguments); @@ -61,7 +60,7 @@ public class CallMethodActionItem extends ActionItem { this.methodName = methodName; this.arguments = arguments; this.scriptObject = scriptObject; - + if (methodName instanceof DirectValueActionItem) { DirectValueActionItem dv = (DirectValueActionItem) methodName; if (dv.isString()) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java index be4f91b4e..ea5edcb94 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CloneSpriteActionItem.java @@ -83,8 +83,8 @@ public class CloneSpriteActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); - + String charset = asGenerator.getCharset(); + return toSourceMerge(localData, generator, source, target, depth, new ActionCloneSprite(), new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset)); } @@ -93,7 +93,6 @@ public class CloneSpriteActionItem extends ActionItem { return toSourceMerge(localData, generator, source, target, depth, new ActionCloneSprite()); } - @Override public boolean hasReturnValue() { return false; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CompoundableBinaryOpAs12.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CompoundableBinaryOpAs12.java index d31fdfbfa..56dd45471 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CompoundableBinaryOpAs12.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/CompoundableBinaryOpAs12.java @@ -19,9 +19,11 @@ package com.jpexs.decompiler.flash.action.model; import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; /** - * CompoundableBinaryOp but for AS1/2, which does not have &&, || compound operator. + * CompoundableBinaryOp but for AS1/2, which does not have &&, || compound + * operator. + * * @author JPEXS */ public interface CompoundableBinaryOpAs12 extends CompoundableBinaryOp { - + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java index de4196d1c..997fe1385 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DeleteActionItem.java @@ -62,8 +62,7 @@ public class DeleteActionItem extends ActionItem { && (IdentifiersDeobfuscation.isValidName(false, propertyName.toStringNoQuotes(localData)))) { writer.append("."); propertyName.toStringNoQuotes(writer, localData); - } - else { + } else { writer.append("["); propertyName.toString(writer, localData); writer.append("]"); @@ -94,7 +93,7 @@ public class DeleteActionItem extends ActionItem { } @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { if (object == null) { return toSourceMerge(localData, generator, propertyName, new ActionDelete2()); } @@ -161,5 +160,4 @@ public class DeleteActionItem extends ActionItem { return true; } - } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java index 62587d9a8..b3d7553e7 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/DirectValueActionItem.java @@ -261,8 +261,8 @@ public class DirectValueActionItem extends ActionItem implements SimpleValue { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); - + String charset = asGenerator.getCharset(); + return toSourceMerge(localData, generator, new ActionPush(value, charset)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumeratedValueActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumeratedValueActionItem.java index 005ccb712..abebf4b21 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumeratedValueActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumeratedValueActionItem.java @@ -21,7 +21,6 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphSourceItemPos; -import static com.jpexs.decompiler.graph.GraphTargetItem.PRECEDENCE_PRIMARY; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.BranchStackResistant; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerationAssignmentValueActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerationAssignmentValueActionItem.java index 30294035d..66dc82e15 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerationAssignmentValueActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/EnumerationAssignmentValueActionItem.java @@ -21,7 +21,6 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.graph.CompilationException; import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphSourceItemPos; -import static com.jpexs.decompiler.graph.GraphTargetItem.PRECEDENCE_PRIMARY; import com.jpexs.decompiler.graph.GraphTargetVisitorInterface; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java index 45f759769..eeba8671e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommand2ActionItem.java @@ -79,11 +79,10 @@ public class FSCommand2ActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); - - + String charset = asGenerator.getCharset(); + List ret = new ArrayList<>(); for (GraphTargetItem a : arguments) { ret.addAll(a.toSource(localData, generator)); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java index 76ce2d29f..246364f5d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/FSCommandActionItem.java @@ -52,6 +52,11 @@ public class FSCommandActionItem extends ActionItem { writer.append("("); command.appendTry(writer, localData); return writer.append(")"); + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, false); } @Override @@ -59,15 +64,9 @@ public class FSCommandActionItem extends ActionItem { return toSource(localData, generator, true); } - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, false); - } - - private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); if ((command instanceof DirectValueActionItem) && ((DirectValueActionItem) command).isString()) { return toSourceMerge(localData, generator, new ActionGetURL("FSCommand:" + ((DirectValueActionItem) command).getAsString(), "", charset)); } 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 054d625d9..792bfe963 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 @@ -240,7 +240,6 @@ public class FunctionActionItem extends ActionItem implements BranchStackResista } return true; }*/ - @Override public Object getResult() { if (!actions.isEmpty()) { @@ -285,8 +284,8 @@ public class FunctionActionItem extends ActionItem implements BranchStackResista public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); - + String charset = asGenerator.getCharset(); + Set usedNames = new HashSet<>(); for (VariableActionItem v : variables) { usedNames.add(v.getVariableName()); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java index 0fe3da083..706af611b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetPropertyActionItem.java @@ -67,7 +67,6 @@ public class GetPropertyActionItem extends ActionItem { writer.append(Action.propertyNames[propertyIndex]); return writer; }*/ - writer.append("getProperty"); writer.spaceBeforeCallParenthesies(2); writer.append("("); @@ -138,7 +137,7 @@ public class GetPropertyActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, target, new ActionPush((Long) (long) propertyIndex, charset), new ActionGetProperty()); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java index e5b8f5ac1..f8b6a305c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURL2ActionItem.java @@ -83,20 +83,20 @@ public class GetURL2ActionItem extends ActionItem { ret.addAll(targetString.getNeededSources()); return ret; } - + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, false); + } + @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, true); } - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, false); - } - private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, urlString, targetString, new ActionGetURL2(sendVarsMethod, false, false, charset), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java index df769f48a..a41dfcd12 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetURLActionItem.java @@ -59,7 +59,7 @@ public class GetURLActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionGetURL(urlString, targetString, charset)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java index de905fb9e..922996f7d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GetVersionActionItem.java @@ -47,7 +47,7 @@ public class GetVersionActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionPush("/:$version", charset), new ActionGetVariable()); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java index 9d23d8391..f193e1394 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java @@ -84,21 +84,21 @@ public class GotoFrame2ActionItem extends ActionItem { List ret = super.getNeededSources(); ret.addAll(frame.getNeededSources()); return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); if (!sceneBiasFlag && (frame instanceof DirectValueActionItem) && (((DirectValueActionItem) frame).isString())) { return toSourceMerge(localData, generator, new ActionGoToLabel(((DirectValueActionItem) frame).getAsString(), charset), playFlag ? new ActionPlay() : null, needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } else if (!sceneBiasFlag && (frame instanceof DirectValueActionItem) && (((DirectValueActionItem) frame).value instanceof Long)) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java index 676d3d79c..8bde21500 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoFrameActionItem.java @@ -51,7 +51,7 @@ public class GotoFrameActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionGotoFrame(frame, charset)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java index bd9c3876e..289580db6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/GotoLabelActionItem.java @@ -53,7 +53,7 @@ public class GotoLabelActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionGoToLabel(label, charset)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java index 8806b0995..8e937b9bc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitArrayActionItem.java @@ -131,5 +131,4 @@ public class InitArrayActionItem extends ActionItem { return false; } - } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java index 71070fb93..e15c44bc8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/InitObjectActionItem.java @@ -64,9 +64,9 @@ public class InitObjectActionItem extends ActionItem { writer.append(","); } //AS1/2 does not allow quotes in name here - if ((names.get(i) instanceof DirectValueActionItem) - &&(((DirectValueActionItem)names.get(i)).isSimpleValue())) { - writer.append(IdentifiersDeobfuscation.printIdentifier(false, names.get(i).toStringNoQuotes(localData))); + if ((names.get(i) instanceof DirectValueActionItem) + && (((DirectValueActionItem) names.get(i)).isSimpleValue())) { + writer.append(IdentifiersDeobfuscation.printIdentifier(false, names.get(i).toStringNoQuotes(localData))); } else { writer.append("("); names.get(i).appendTo(writer, localData); @@ -99,7 +99,7 @@ public class InitObjectActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); List ret = new ArrayList<>(); for (int i = values.size() - 1; i >= 0; i--) { ret.addAll(names.get(i).toSource(localData, generator)); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java index 94a3307fb..08fffef96 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieActionItem.java @@ -72,21 +72,21 @@ public class LoadMovieActionItem extends ActionItem { writer.append(","); targetString.toString(writer, localData); return writer.append(methodStr).append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, urlString, targetString, new ActionGetURL2(method, false, true, charset), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java index ff827e4ac..2e7b9c59d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadMovieNumActionItem.java @@ -73,21 +73,21 @@ public class LoadMovieNumActionItem extends ActionItem { writer.append(","); num.toString(writer, localData); return writer.append(methodStr).append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } + private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); Object lev; if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value); @@ -158,6 +158,7 @@ public class LoadMovieNumActionItem extends ActionItem { } return true; } + @Override public boolean hasSideEffect() { return true; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java index 716b9be50..2215ebc42 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesActionItem.java @@ -72,21 +72,21 @@ public class LoadVariablesActionItem extends ActionItem { writer.append(","); targetString.toString(writer, localData); return writer.append(methodStr).append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } + private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, urlString, targetString, new ActionGetURL2(method, true, true, charset), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java index 51b1bf03b..1f33c005d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/LoadVariablesNumActionItem.java @@ -73,21 +73,21 @@ public class LoadVariablesNumActionItem extends ActionItem { writer.append(","); num.toString(writer, localData); return writer.append(methodStr).append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); Object lev; if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java index 481a6128b..912718678 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NewMethodActionItem.java @@ -73,6 +73,7 @@ public class NewMethodActionItem extends ActionItem { if (!blankMethod) { if (methodName instanceof DirectValueActionItem) { if (((DirectValueActionItem) methodName).value == Undefined.INSTANCE) { + //empty } else if ((((DirectValueActionItem) methodName).value instanceof String) && (IdentifiersDeobfuscation.isValidName(false, (String) ((DirectValueActionItem) methodName).value))) { writer.append("."); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java index 8dc34e642..15f964e7b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/NextFrameActionItem.java @@ -43,21 +43,21 @@ public class NextFrameActionItem extends ActionItem { public NextFrameActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionNextFrame(), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java index 8bf2952aa..b44592c91 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PlayActionItem.java @@ -43,21 +43,21 @@ public class PlayActionItem extends ActionItem { public PlayActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionPlay(), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java index 45e6a696a..6741ce4db 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostDecrementActionItem.java @@ -103,8 +103,8 @@ public class PostDecrementActionItem extends ActionItem implements SetTypeAction @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); - + String charset = asGenerator.getCharset(); + List ret = new ArrayList<>(); GraphTargetItem val = object; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java index 820c031dd..6164184bc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PostIncrementActionItem.java @@ -102,10 +102,10 @@ public class PostIncrementActionItem extends ActionItem implements SetTypeAction @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); - + String charset = asGenerator.getCharset(); + List ret = new ArrayList<>(); GraphTargetItem val = object; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java index 19113e3c4..f44dd9284 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrevFrameActionItem.java @@ -43,21 +43,21 @@ public class PrevFrameActionItem extends ActionItem { public PrevFrameActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionPrevFrame(), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java index 670017e9c..0c9d68563 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintActionItem.java @@ -64,20 +64,20 @@ public class PrintActionItem extends ActionItem { boundingBox.toString(writer, localData); return writer.append(")"); } - + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, false); + } + @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, true); } - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, false); - } - private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("print:#"), boundingBox, true), target, new ActionGetURL2(0, false, false, charset), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java index b5bb64f9b..27bfd48b5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapActionItem.java @@ -63,21 +63,21 @@ public class PrintAsBitmapActionItem extends ActionItem { writer.append(","); boundingBox.toString(writer, localData); return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new AddActionItem(getSrc(), getLineStartItem(), asGenerator.pushConstTargetItem("printasbitmap:#"), boundingBox, true), target, new ActionGetURL2(0, false, false, charset), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java index 573f9d584..f9966c1e5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintAsBitmapNumActionItem.java @@ -63,21 +63,21 @@ public class PrintAsBitmapNumActionItem extends ActionItem { writer.append(","); boundingBox.toString(writer, localData); return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); Object lev; if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java index 6f1725006..d99b8339c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/PrintNumActionItem.java @@ -63,21 +63,21 @@ public class PrintNumActionItem extends ActionItem { writer.append(","); boundingBox.toString(writer, localData); return writer.append(")"); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } + private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); Object lev; if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { lev = asGenerator.pushConstTargetItem("_level" + ((DirectValueActionItem) num).value); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java index ae1c6a11a..65458fa1c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/RemoveSpriteActionItem.java @@ -55,21 +55,21 @@ public class RemoveSpriteActionItem extends ActionItem { List ret = super.getNeededSources(); ret.addAll(value.getNeededSources()); return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, value, new ActionRemoveSprite(), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java index f05b92116..ef67a3047 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ReturnActionItem.java @@ -71,7 +71,8 @@ public class ReturnActionItem extends ActionItem implements ExitItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); List ret = new ArrayList<>(); + String charset = asGenerator.getCharset(); + List ret = new ArrayList<>(); int forinlevel = asGenerator.getForInLevel(localData); for (int i = 0; i < forinlevel; i++) { //Must POP all remaining values from enumerations (for..in) List forinret = new ArrayList<>(); 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 91f86af65..d1fdf357a 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 @@ -140,7 +140,8 @@ public class SetMemberActionItem extends ActionItem implements SetTypeActionItem @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); int tmpReg = asGenerator.getTempRegister(localData); + String charset = asGenerator.getCharset(); + int tmpReg = asGenerator.getTempRegister(localData); try { return toSourceMerge(localData, generator, object, objectName, value, new ActionStoreRegister(tmpReg, charset), new ActionSetMember(), new ActionPush(new RegisterNumber(tmpReg), charset)); } finally { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java index 560c4eabd..68662bfe0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/SetPropertyActionItem.java @@ -117,7 +117,7 @@ public class SetPropertyActionItem extends ActionItem implements SetTypeActionIt @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); int tmpReg = asGenerator.getTempRegister(localData); try { return toSourceMerge(localData, generator, target, new ActionPush((Long) (long) propertyIndex, charset), value, new ActionStoreRegister(tmpReg, charset), new ActionSetProperty(), new ActionPush(new RegisterNumber(tmpReg), charset)); @@ -129,7 +129,7 @@ public class SetPropertyActionItem extends ActionItem implements SetTypeActionIt @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, target, new ActionPush((Long) (long) propertyIndex, charset), value, new ActionSetProperty()); } 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 11879e8c1..22112a0b9 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 @@ -145,7 +145,7 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt if (dependencies.contains(value)) { return false; } - if (!((value instanceof SimpleValue) && ((SimpleValue)value).isSimpleValue())) { + if (!((value instanceof SimpleValue) && ((SimpleValue) value).isSimpleValue())) { dependencies.add(value); } return value.isCompileTime(dependencies); @@ -159,7 +159,7 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); if (forceUseSet) { return toSourceMerge(localData, generator, name, value, new ActionSetVariable(), new ActionPush(Undefined.INSTANCE, charset)); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java index 8b8b55e95..cf9c20137 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StartDragActionItem.java @@ -101,23 +101,23 @@ public class StartDragActionItem extends ActionItem { ret.addAll(y1.getNeededSources()); ret.addAll(y2.getNeededSources()); return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { - + ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); - + String charset = asGenerator.getCharset(); + boolean hasConstrains = true; if (constrain instanceof DirectValueActionItem) { if (Double.compare(constrain.getResultAsNumber(), 0) == 0) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java index 8025d4b86..e23347955 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopActionItem.java @@ -44,20 +44,20 @@ public class StopActionItem extends ActionItem { public StopActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY); } - + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, false); + } + @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, true); } - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, false); - } - private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionStop(), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java index b88682aae..9bcc50f5e 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopAllSoundsActionItem.java @@ -43,21 +43,21 @@ public class StopAllSoundsActionItem extends ActionItem { public StopAllSoundsActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY); - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionStopSounds(), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java index 20039344e..23e901386 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StopDragActionItem.java @@ -43,6 +43,11 @@ public class StopDragActionItem extends ActionItem { public StopDragActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns) { super(instruction, lineStartIns, PRECEDENCE_PRIMARY); + } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, false); } @Override @@ -50,14 +55,9 @@ public class StopDragActionItem extends ActionItem { return toSource(localData, generator, true); } - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, false); - } - private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionEndDrag(), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java index b651a9621..a649d7ce9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/StoreRegisterActionItem.java @@ -33,7 +33,6 @@ import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.model.LocalData; import java.util.List; import java.util.Objects; -import java.util.Set; /** * @@ -127,7 +126,7 @@ public class StoreRegisterActionItem extends ActionItem implements SetTypeAction @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, value, new ActionStoreRegister(register.number, charset)); } @@ -146,8 +145,7 @@ public class StoreRegisterActionItem extends ActionItem implements SetTypeAction dependencies.add(value); return value.isCompileTime(dependencies); } - */ - + */ @Override public Object getResult() { return value.getResult(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java index f82a29c2c..e000ba65a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegister.java @@ -31,7 +31,7 @@ import java.util.Objects; public class TemporaryRegister extends ActionItem { private final int regId; - + public boolean used = false; public TemporaryRegister(int regId, GraphTargetItem value) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegisterMark.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegisterMark.java index fd1969974..0053236e1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegisterMark.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TemporaryRegisterMark.java @@ -29,8 +29,8 @@ public class TemporaryRegisterMark extends ActionItem { public TemporaryRegisterMark(TemporaryRegister tempReg) { this.tempReg = tempReg; - } - + } + @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { return writer; @@ -44,7 +44,7 @@ public class TemporaryRegisterMark extends ActionItem { @Override public boolean needsSemicolon() { return false; - } + } @Override public boolean hasReturnValue() { @@ -55,6 +55,5 @@ public class TemporaryRegisterMark extends ActionItem { public boolean isEmpty() { return true; } - - + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java index 42d6b7cb9..bace1bba0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/ToggleHighQualityActionItem.java @@ -48,21 +48,21 @@ public class ToggleHighQualityActionItem extends ActionItem { @Override public boolean hasReturnValue() { return false; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionToggleQuality(), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java index 4340f2c0b..8087c6366 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TraceActionItem.java @@ -55,21 +55,21 @@ public class TraceActionItem extends ActionItem { List ret = super.getNeededSources(); ret.addAll(value.getNeededSources()); return ret; - } - - @Override - public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, true); - } + } @Override public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, false); } + + @Override + public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, true); + } private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, value, new ActionTrace(), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java index a1e5c4e81..8db33c5f8 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/TypeOfActionItem.java @@ -95,7 +95,7 @@ public class TypeOfActionItem extends ActionItem { if (dependencies.contains(value)) { return false; } - if (!((value instanceof SimpleValue) && ((SimpleValue)value).isSimpleValue())) { + if (!((value instanceof SimpleValue) && ((SimpleValue) value).isSimpleValue())) { dependencies.add(value); } return value.isCompileTime(dependencies); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java index 49d25710f..80372f997 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieActionItem.java @@ -57,20 +57,20 @@ public class UnLoadMovieActionItem extends ActionItem { targetString.toString(writer, localData); return writer.append(")"); } + + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, false); + } @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, true); } - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, false); - } - private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionPush("", charset), targetString, new ActionGetURL2(0, false, true, charset), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java index 450c506bd..56bca4bfc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnLoadMovieNumActionItem.java @@ -60,19 +60,19 @@ public class UnLoadMovieNumActionItem extends ActionItem { return writer.append(")"); } + @Override + public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { + return toSource(localData, generator, false); + } + @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { return toSource(localData, generator, true); } - @Override - public List toSourceIgnoreReturnValue(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { - return toSource(localData, generator, false); - } - private List toSource(SourceGeneratorLocalData localData, SourceGenerator generator, boolean needsReturn) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); if ((num instanceof DirectValueActionItem) && (((DirectValueActionItem) num).value instanceof Long)) { return toSourceMerge(localData, generator, new ActionGetURL("", "_level" + ((DirectValueActionItem) num).value, charset), needsReturn ? new ActionPush(new Object[]{Undefined.INSTANCE, Undefined.INSTANCE}, charset) : null); } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnresolvedConstantActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnresolvedConstantActionItem.java index 853bb56c7..0a893be10 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnresolvedConstantActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/UnresolvedConstantActionItem.java @@ -141,7 +141,7 @@ public class UnresolvedConstantActionItem extends ActionItem implements SimpleVa @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); return toSourceMerge(localData, generator, new ActionPush(new ConstantIndex(index), charset)); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java index c87b1de9a..b11352d52 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ClassActionItem.java @@ -72,7 +72,6 @@ public class ClassActionItem extends ActionItem implements Block { } - public ClassActionItem(GraphTargetItem className, GraphTargetItem extendsOp, List implementsOp, List> traits, List traitsStatic) { super(null, null, NOPRECEDENCE); this.className = className; @@ -187,7 +186,7 @@ public class ClassActionItem extends ActionItem implements Block { } } writer.startBlock(); - writer.startClass(className.toStringNoQuotes(localData)); + writer.startClass(className.toStringNoQuotes(localData)); /*if (constructor != null) { constructor.toString(writer, localData).newLine(); @@ -267,13 +266,12 @@ public class ClassActionItem extends ActionItem implements Block { @Override public void visit(GraphTargetVisitorInterface visitor) { - for (MyEntry en: traits) { + for (MyEntry en : traits) { GraphTargetItem value = en.getValue(); if (value != null) { visitor.visit(value); } } - } - - + } + } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java index 0a83d3ea0..6eb13281f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/ForInActionItem.java @@ -85,9 +85,6 @@ public class ForInActionItem extends LoopActionItem implements Block { visitor.visit(enumVariable); } - - - public ForInActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, Loop loop, GraphTargetItem variableName, GraphTargetItem enumVariable, List commands) { super(instruction, lineStartIns, loop); this.variableName = variableName; @@ -134,7 +131,7 @@ public class ForInActionItem extends LoopActionItem implements Block { enumVariable.toString(writer, localData); if (enumVariable.getPrecedence() > PRECEDENCE_PRIMARY) { writer.append(")"); - } + } writer.append(")").startBlock(); for (GraphTargetItem ti : commands) { ti.toStringSemicoloned(writer, localData).newLine(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java index 25c2f01e6..d3d019313 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/IfFrameLoadedActionItem.java @@ -60,8 +60,6 @@ public class IfFrameLoadedActionItem extends ActionItem implements Block { visitor.visit(frame); } - - @Override public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException { writer.append("ifFrameLoaded"); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java index 7a2a6b5d2..e1850b401 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/InterfaceActionItem.java @@ -62,7 +62,7 @@ public class InterfaceActionItem extends ActionItem { Action.getWithoutGlobal(ti).toStringNoQuotes(writer, localData); } writer.startBlock(); - writer.startClass(name.toStringNoQuotes(localData)); + writer.startClass(name.toStringNoQuotes(localData)); writer.endClass(); return writer.endBlock(); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java index cefb9e226..85d2b478f 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/TryActionItem.java @@ -96,8 +96,6 @@ public class TryActionItem extends ActionItem implements Block { } - - public TryActionItem(List tryCommands, List catchExceptionNames, List catchExceptionTypes, List> catchCommands, List finallyCommands) { super(null, null, NOPRECEDENCE); this.tryCommands = tryCommands; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java index df0f45883..48a14e525 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/clauses/WithActionItem.java @@ -70,7 +70,7 @@ public class WithActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { ActionSourceGenerator asGenerator = (ActionSourceGenerator) generator; - String charset = asGenerator.getCharset(); + String charset = asGenerator.getCharset(); List data = generator.generate(localData, items); List dataA = new ArrayList<>(); for (GraphSourceItem s : data) { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java index 9e204bc10..571c68504 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/AddActionItem.java @@ -30,7 +30,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java index 111fc9ac9..85a94a699 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitAndActionItem.java @@ -26,7 +26,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java index 388a6b12c..389e81583 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitOrActionItem.java @@ -26,7 +26,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java index 04c2e0f6e..c9609a057 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/BitXorActionItem.java @@ -28,7 +28,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java index 116975933..13fe97393 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/DivideActionItem.java @@ -25,7 +25,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java index 2087b3884..d682e4706 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/LShiftActionItem.java @@ -26,7 +26,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java index 617526388..5bbafd340 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/ModuloActionItem.java @@ -25,7 +25,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java index f63e4b729..1531c5b52 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/MultiplyActionItem.java @@ -25,7 +25,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java index b55613b09..c48077541 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/RShiftActionItem.java @@ -26,7 +26,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java index 1c6c78f90..1e63763ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/SubtractActionItem.java @@ -27,7 +27,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import com.jpexs.decompiler.graph.model.LocalData; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java index c002117a5..afb36c86d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/model/operations/URShiftActionItem.java @@ -25,7 +25,6 @@ import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SourceGenerator; import com.jpexs.decompiler.graph.TypeItem; import com.jpexs.decompiler.graph.model.BinaryOpItem; -import com.jpexs.decompiler.graph.model.CompoundableBinaryOp; import java.util.ArrayList; import java.util.List; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java index 4a67c48b1..09ea866ee 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java @@ -143,75 +143,7 @@ import java.util.logging.Logger; */ public class ASMParser { - private static final Logger logger = Logger.getLogger(ASMParser.class.getName()); - - public static ActionList parse(boolean ignoreNops, List