Reformat and organize imports

This commit is contained in:
Jindra Petřík
2016-08-06 07:21:58 +02:00
parent 8c5345cfd8
commit 6781d86a6c
46 changed files with 1738 additions and 1637 deletions
@@ -1638,7 +1638,7 @@ public class AVM2Code implements Cloneable {
}
}//*/
/*if ((ip + 2 < code.size()) && (ins.definition instanceof NewCatchIns)) { // Filling local register in catch clause
/*if ((ip + 2 < code.size()) && (ins.definition instanceof NewCatchIns)) { // Filling local register in catch clause
if (code.get(ip + 1).definition instanceof DupIns) {
if (code.get(ip + 2).definition instanceof SetLocalTypeIns) {
ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames);
@@ -220,7 +220,7 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple {
AVM2Instruction ins = code.code.get(idx);
InstructionDefinition def = ins.definition;
//System.err.println("" + idx + ": " + ins + " stack:" + stack.size());
//System.err.println("" + idx + ": " + ins + " stack:" + stack.size());
// do not throw EmptyStackException, much faster
int requiredStackSize = def.getStackPopCount(ins, abc);
@@ -161,7 +161,7 @@ public class AVM2DeobfuscatorSimpleOld extends SWFDecompilerAdapter {
AVM2Instruction ins = code.code.get(i);
if (ins.definition instanceof JumpIns) {
long address = ins.getTargetAddress();
jumpTargets.add( code.adr2pos(address) );
jumpTargets.add(code.adr2pos(address));
}
}
@@ -294,9 +294,8 @@ public class AVM2DeobfuscatorSimpleOld extends SWFDecompilerAdapter {
if (inlineIns.contains(ins)) {
if (def instanceof SetLocalTypeIns) {
InstructionDefinition prevDef = code.code.get(idx-1).definition;
if ((prevDef instanceof DupIns && !jumpTargets.contains(idx-2)) || !jumpTargets.contains(idx-1))
{
InstructionDefinition prevDef = code.code.get(idx - 1).definition;
if ((prevDef instanceof DupIns && !jumpTargets.contains(idx - 2)) || !jumpTargets.contains(idx - 1)) {
int regId = ((SetLocalTypeIns) def).getRegisterId(ins);
staticRegs.put(regId, localData.localRegs.get(regId).getNotCoerced());
code.replaceInstruction(idx, new AVM2Instruction(0, DeobfuscatePopIns.getInstance(), null), body);
@@ -108,8 +108,9 @@ public abstract class AVM2Item extends GraphTargetItem {
}
if (propertyName instanceof FullMultinameAVM2Item) {
if (((FullMultinameAVM2Item) propertyName).name != null) {
if (((FullMultinameAVM2Item) propertyName).namespace != null)
if (((FullMultinameAVM2Item) propertyName).namespace != null) {
writer.append(".");
}
return propertyName.toString(writer, localData);
} else {
writer.append(".");
@@ -77,7 +77,7 @@ public class ForEachInAVM2Item extends LoopItem implements Block {
*/
/*
/*
if (!commands.isEmpty()) {
GraphTargetItem firstAssign = commands.get(0);
if (firstAssign instanceof SetTypeAVM2Item) {
@@ -1,6 +1,6 @@
/* The following code was generated by JFlex 1.6.0 */
/*
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
/* Flash assembler language lexer specification */
/* Flash assembler language lexer specification */
package com.jpexs.decompiler.flash.abc.avm2.parser.pcode;
import com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException;
@@ -24,8 +24,7 @@ import java.util.Stack;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0
* from the specification file
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0 from the specification file
* <tt>C:/FFDec/jpexs-decompiler/libsrc/ffdec_lib/lexers/actionscript3_pcode.flex</tt>
*/
public final class Flasm3Lexer {
@@ -51,9 +50,8 @@ public final class Flasm3Lexer {
/**
* 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
* 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
@@ -272,9 +270,11 @@ public final class Flasm3Lexer {
}
private static int zzUnpackAction(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -380,9 +380,11 @@ public final class Flasm3Lexer {
}
private static int zzUnpackRowMap(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -2479,9 +2481,11 @@ public final class Flasm3Lexer {
}
private static int zzUnpackTrans(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -2550,9 +2554,11 @@ public final class Flasm3Lexer {
}
private static int zzUnpackAttribute(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -2581,8 +2587,8 @@ public final class Flasm3Lexer {
private int zzLexicalState = YYINITIAL;
/**
* this buffer contains the current text to be matched and is
* the source of the yytext() string
* this buffer contains the current text to be matched and is the source of
* the yytext() string
*/
private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
@@ -2602,8 +2608,8 @@ public final class Flasm3Lexer {
private int zzStartRead;
/**
* endRead marks the last character in the buffer, that has been read
* from input
* endRead marks the last character in the buffer, that has been read from
* input
*/
private int zzEndRead;
@@ -2639,10 +2645,10 @@ public final class Flasm3Lexer {
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.
* 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;
@@ -2705,9 +2711,11 @@ public final class Flasm3Lexer {
*/
private static char[] zzUnpackCMap(String packed) {
char[] map = new char[0x110000];
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = 0; /* index in unpacked array */
int j = 0;
/* index in unpacked array */
while (i < 2916) {
int count = packed.charAt(i++);
@@ -2766,7 +2774,8 @@ public final class Flasm3Lexer {
if (totalRead > 0) {
zzEndRead += totalRead;
if (totalRead == requested) { /* possibly more input available */
if (totalRead == requested) {
/* possibly more input available */
if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
--zzEndRead;
@@ -2784,9 +2793,11 @@ public final class Flasm3Lexer {
* Closes the input stream.
*/
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzAtEOF = true;
/* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
zzEndRead = zzStartRead;
/* invalidate buffer */
if (zzReader != null) {
zzReader.close();
@@ -2794,12 +2805,12 @@ public final class Flasm3Lexer {
}
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
* 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
* <b>cannot</b> be reused (internal buffer is discarded and lost).
* Lexical state is set to <tt>ZZ_INITIAL</tt>.
* <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical
* state is set to <tt>ZZ_INITIAL</tt>.
*
* Internal scan buffer is resized down to its initial length, if it has
* grown.
@@ -2845,13 +2856,12 @@ public final class Flasm3Lexer {
}
/**
* Returns the character at position <tt>pos</tt> from the
* matched text.
* Returns the character at position <tt>pos</tt> 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.
* @param pos the position of the character to fetch. A value from 0 to
* yylength()-1.
*
* @return the character at position pos
*/
@@ -2869,14 +2879,13 @@ public final class Flasm3Lexer {
/**
* 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.).
* 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.
* Usual syntax/scanner level error handling should be done in error
* fallback rules.
*
* @param errorCode the code of the errormessage to display
*/
@@ -2896,8 +2905,8 @@ public final class Flasm3Lexer {
*
* 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()!
* @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()) {
@@ -2908,8 +2917,8 @@ public final class Flasm3Lexer {
}
/**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
* 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
@@ -1,6 +1,6 @@
/* The following code was generated by JFlex 1.6.0 */
/*
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -26,8 +26,7 @@ import java.util.Stack;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0
* from the specification file
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0 from the specification file
* <tt>C:/FFDec/jpexs-decompiler/libsrc/ffdec_lib/lexers/actionscript3_script.flex</tt>
*/
public final class ActionScriptLexer {
@@ -69,9 +68,8 @@ public final class ActionScriptLexer {
/**
* 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
* 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,
@@ -295,9 +293,11 @@ public final class ActionScriptLexer {
}
private static int zzUnpackAction(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -383,9 +383,11 @@ public final class ActionScriptLexer {
}
private static int zzUnpackRowMap(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -833,9 +835,11 @@ public final class ActionScriptLexer {
}
private static int zzUnpackTrans(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -894,9 +898,11 @@ public final class ActionScriptLexer {
}
private static int zzUnpackAttribute(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -925,8 +931,8 @@ public final class ActionScriptLexer {
private int zzLexicalState = YYINITIAL;
/**
* this buffer contains the current text to be matched and is
* the source of the yytext() string
* this buffer contains the current text to be matched and is the source of
* the yytext() string
*/
private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
@@ -946,8 +952,8 @@ public final class ActionScriptLexer {
private int zzStartRead;
/**
* endRead marks the last character in the buffer, that has been read
* from input
* endRead marks the last character in the buffer, that has been read from
* input
*/
private int zzEndRead;
@@ -983,10 +989,10 @@ public final class ActionScriptLexer {
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.
* 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;
@@ -1080,9 +1086,11 @@ public final class ActionScriptLexer {
*/
private static char[] zzUnpackCMap(String packed) {
char[] map = new char[0x110000];
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = 0; /* index in unpacked array */
int j = 0;
/* index in unpacked array */
while (i < 3136) {
int count = packed.charAt(i++);
@@ -1141,7 +1149,8 @@ public final class ActionScriptLexer {
if (totalRead > 0) {
zzEndRead += totalRead;
if (totalRead == requested) { /* possibly more input available */
if (totalRead == requested) {
/* possibly more input available */
if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
--zzEndRead;
@@ -1159,9 +1168,11 @@ public final class ActionScriptLexer {
* Closes the input stream.
*/
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzAtEOF = true;
/* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
zzEndRead = zzStartRead;
/* invalidate buffer */
if (zzReader != null) {
zzReader.close();
@@ -1169,12 +1180,12 @@ public final class ActionScriptLexer {
}
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
* 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
* <b>cannot</b> be reused (internal buffer is discarded and lost).
* Lexical state is set to <tt>ZZ_INITIAL</tt>.
* <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical
* state is set to <tt>ZZ_INITIAL</tt>.
*
* Internal scan buffer is resized down to its initial length, if it has
* grown.
@@ -1220,13 +1231,12 @@ public final class ActionScriptLexer {
}
/**
* Returns the character at position <tt>pos</tt> from the
* matched text.
* Returns the character at position <tt>pos</tt> 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.
* @param pos the position of the character to fetch. A value from 0 to
* yylength()-1.
*
* @return the character at position pos
*/
@@ -1244,14 +1254,13 @@ public final class ActionScriptLexer {
/**
* 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.).
* 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.
* Usual syntax/scanner level error handling should be done in error
* fallback rules.
*
* @param errorCode the code of the errormessage to display
*/
@@ -1271,8 +1280,8 @@ public final class ActionScriptLexer {
*
* 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()!
* @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()) {
@@ -1283,8 +1292,8 @@ public final class ActionScriptLexer {
}
/**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
* 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
@@ -1380,7 +1389,8 @@ public final class ActionScriptLexer {
}
case 167:
break;
case 3: { /*ignore*/
case 3: {
/*ignore*/
}
case 168:
@@ -1794,7 +1804,8 @@ public final class ActionScriptLexer {
}
case 242:
break;
case 78: { /* ignore illegal character escape */
case 78: {
/* ignore illegal character escape */
}
case 243:
@@ -220,9 +220,9 @@ public class NameAVM2Item extends AssignableAVM2Item {
return toSourceMerge(localData, generator,
ins(AVM2Instructions.GetScopeObject, slotScope),
assignedValue, !(("" + assignedValue.returnType()).equals("" + type) && (basicTypes.contains("" + type))) ? generateCoerce(localData, generator, type) : null, needsReturn
? dupSetTemp(localData, generator, ret_temp) : null, generateSetLoc(regNumber), slotNumber > -1
? ins(AVM2Instructions.SetSlot, slotNumber)
: null,
? dupSetTemp(localData, generator, ret_temp) : null, generateSetLoc(regNumber), slotNumber > -1
? ins(AVM2Instructions.SetSlot, slotNumber)
: null,
needsReturn ? getTemp(localData, generator, ret_temp) : null,
killTemp(localData, generator, Arrays.asList(ret_temp)));
} else {
@@ -180,30 +180,28 @@ public class NamespacedAVM2Item extends AssignableAVM2Item {
killTemp(localData, generator, Arrays.asList(obj_temp))
);
}
} else if (assignedValue != null) {
return toSourceMerge(localData, generator,
obj == null ? ns : null, obj == null ? NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)) : null, obj != null ? obj : ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)),
ns, NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)), assignedValue,
needsReturn ? dupSetTemp(localData, generator, ret_temp) : null,
ins(AVM2Instructions.SetProperty, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)),
needsReturn ? getTemp(localData, generator, ret_temp) : null,
killTemp(localData, generator, Arrays.asList(ns_temp, index_temp, ret_temp))
);
} else {
if (assignedValue != null) {
return toSourceMerge(localData, generator,
obj == null ? ns : null, obj == null ? NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)) : null, obj != null ? obj : ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)),
ns, NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)), assignedValue,
needsReturn ? dupSetTemp(localData, generator, ret_temp) : null,
ins(AVM2Instructions.SetProperty, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)),
needsReturn ? getTemp(localData, generator, ret_temp) : null,
killTemp(localData, generator, Arrays.asList(ns_temp, index_temp, ret_temp))
);
} else {
return toSourceMerge(localData, generator,
obj == null ? ns : null, obj == null ? NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)) : null, obj != null ? obj : ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)),
call ? dupSetTemp(localData, generator, obj_temp) : null,
ns, NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)),
construct ? callargs : null,
ins(construct ? AVM2Instructions.ConstructProp : delete ? AVM2Instructions.DeleteProperty : AVM2Instructions.GetProperty, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true), construct ? callargs.size() : null),
call ? getTemp(localData, generator, obj_temp) : null,
call ? callargs : null,
call ? ins(AVM2Instructions.Call, callargs.size()) : null,
needsReturn ? null : ins(AVM2Instructions.Pop),
killTemp(localData, generator, Arrays.asList(obj_temp))
);
}
return toSourceMerge(localData, generator,
obj == null ? ns : null, obj == null ? NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)) : null, obj != null ? obj : ins(AVM2Instructions.FindPropertyStrict, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true)),
call ? dupSetTemp(localData, generator, obj_temp) : null,
ns, NameAVM2Item.generateCoerce(localData, generator, new TypeItem(DottedChain.NAMESPACE)),
construct ? callargs : null,
ins(construct ? AVM2Instructions.ConstructProp : delete ? AVM2Instructions.DeleteProperty : AVM2Instructions.GetProperty, constants.getMultinameId(Multiname.createRTQName(attr, constants.getStringId(name, true)), true), construct ? callargs.size() : null),
call ? getTemp(localData, generator, obj_temp) : null,
call ? callargs : null,
call ? ins(AVM2Instructions.Call, callargs.size()) : null,
needsReturn ? null : ins(AVM2Instructions.Pop),
killTemp(localData, generator, Arrays.asList(obj_temp))
);
}
}
@@ -116,12 +116,12 @@ public class UnresolvedAVM2Item extends AssignableAVM2Item {
}
return -1;
}
/*
public GraphTargetItem getNs() {
return ns;
}
*/
public void appendName(String name) {
this.name = this.name.add(name);
}
@@ -1,6 +1,6 @@
/* The following code was generated by JFlex 1.6.0 */
/*
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -16,13 +16,12 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
/* Method info lexer specification */
/* Method info lexer specification */
package com.jpexs.decompiler.flash.abc.methodinfo_parser;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0
* from the specification file
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0 from the specification file
* <tt>C:/FFDec/jpexs-decompiler/libsrc/ffdec_lib/lexers/actionscript3_methodinfo.flex</tt>
*/
public final class MethodInfoLexer {
@@ -46,9 +45,8 @@ public final class MethodInfoLexer {
/**
* 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
* 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
@@ -231,9 +229,11 @@ public final class MethodInfoLexer {
}
private static int zzUnpackAction(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -279,9 +279,11 @@ public final class MethodInfoLexer {
}
private static int zzUnpackRowMap(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -466,9 +468,11 @@ public final class MethodInfoLexer {
}
private static int zzUnpackTrans(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -518,9 +522,11 @@ public final class MethodInfoLexer {
}
private static int zzUnpackAttribute(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -549,8 +555,8 @@ public final class MethodInfoLexer {
private int zzLexicalState = YYINITIAL;
/**
* this buffer contains the current text to be matched and is
* the source of the yytext() string
* this buffer contains the current text to be matched and is the source of
* the yytext() string
*/
private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
@@ -570,8 +576,8 @@ public final class MethodInfoLexer {
private int zzStartRead;
/**
* endRead marks the last character in the buffer, that has been read
* from input
* endRead marks the last character in the buffer, that has been read from
* input
*/
private int zzEndRead;
@@ -607,10 +613,10 @@ public final class MethodInfoLexer {
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.
* 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;
@@ -654,9 +660,11 @@ public final class MethodInfoLexer {
*/
private static char[] zzUnpackCMap(String packed) {
char[] map = new char[0x110000];
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = 0; /* index in unpacked array */
int j = 0;
/* index in unpacked array */
while (i < 2868) {
int count = packed.charAt(i++);
@@ -715,7 +723,8 @@ public final class MethodInfoLexer {
if (totalRead > 0) {
zzEndRead += totalRead;
if (totalRead == requested) { /* possibly more input available */
if (totalRead == requested) {
/* possibly more input available */
if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
--zzEndRead;
@@ -733,9 +742,11 @@ public final class MethodInfoLexer {
* Closes the input stream.
*/
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzAtEOF = true;
/* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
zzEndRead = zzStartRead;
/* invalidate buffer */
if (zzReader != null) {
zzReader.close();
@@ -743,12 +754,12 @@ public final class MethodInfoLexer {
}
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
* 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
* <b>cannot</b> be reused (internal buffer is discarded and lost).
* Lexical state is set to <tt>ZZ_INITIAL</tt>.
* <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical
* state is set to <tt>ZZ_INITIAL</tt>.
*
* Internal scan buffer is resized down to its initial length, if it has
* grown.
@@ -794,13 +805,12 @@ public final class MethodInfoLexer {
}
/**
* Returns the character at position <tt>pos</tt> from the
* matched text.
* Returns the character at position <tt>pos</tt> 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.
* @param pos the position of the character to fetch. A value from 0 to
* yylength()-1.
*
* @return the character at position pos
*/
@@ -818,14 +828,13 @@ public final class MethodInfoLexer {
/**
* 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.).
* 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.
* Usual syntax/scanner level error handling should be done in error
* fallback rules.
*
* @param errorCode the code of the errormessage to display
*/
@@ -845,8 +854,8 @@ public final class MethodInfoLexer {
*
* 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()!
* @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()) {
@@ -857,8 +866,8 @@ public final class MethodInfoLexer {
}
/**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
* 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
@@ -568,7 +568,7 @@ public abstract class Action implements GraphSourceItem {
writer.appendNoHilight(Helper.byteToHex(fileData[(int) (fileOffset + i)]));
}
writer.appendNoHilight(")");
}
@@ -1114,7 +1114,7 @@ public abstract class Action implements GraphSourceItem {
}
/*ActionJump && ActionIf removed*/
/*if ((action instanceof ActionEnumerate2) || (action instanceof ActionEnumerate)) {
/*if ((action instanceof ActionEnumerate2) || (action instanceof ActionEnumerate)) {
loopStart = ip + 1;
isForIn = true;
ip += 4;
@@ -308,16 +308,12 @@ public class FunctionActionItem extends ActionItem {
} else {
v.setBoxedValue(new DirectValueActionItem(new RegisterNumber(registerNames.indexOf(varName), varName)));
}
} else if (v.isDefinition()) {
v.setBoxedValue(new DefineLocalActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored));
} else if (stored != null) {
v.setBoxedValue(new SetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored));
} else {
if (v.isDefinition()) {
v.setBoxedValue(new DefineLocalActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored));
} else {
if (stored != null) {
v.setBoxedValue(new SetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName), stored));
} else {
v.setBoxedValue(new GetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName)));
}
}
v.setBoxedValue(new GetVariableActionItem(null, null, ((ActionSourceGenerator) generator).pushConstTargetItem(varName)));
}
}
@@ -1,6 +1,6 @@
/* The following code was generated by JFlex 1.6.0 */
/*
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
/* Flash assembler language lexer specification */
/* Flash assembler language lexer specification */
package com.jpexs.decompiler.flash.action.parser.pcode;
import com.jpexs.decompiler.flash.action.parser.ActionParseException;
@@ -27,8 +27,7 @@ import com.jpexs.decompiler.flash.ecma.Undefined;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0
* from the specification file
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0 from the specification file
* <tt>C:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript_pcode.flex</tt>
*/
public final class FlasmLexer {
@@ -54,9 +53,8 @@ public final class FlasmLexer {
/**
* 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
* 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
@@ -238,9 +236,11 @@ public final class FlasmLexer {
}
private static int zzUnpackAction(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -282,9 +282,11 @@ public final class FlasmLexer {
}
private static int zzUnpackRowMap(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -458,9 +460,11 @@ public final class FlasmLexer {
}
private static int zzUnpackTrans(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -510,9 +514,11 @@ public final class FlasmLexer {
}
private static int zzUnpackAttribute(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -541,8 +547,8 @@ public final class FlasmLexer {
private int zzLexicalState = YYINITIAL;
/**
* this buffer contains the current text to be matched and is
* the source of the yytext() string
* this buffer contains the current text to be matched and is the source of
* the yytext() string
*/
private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
@@ -562,8 +568,8 @@ public final class FlasmLexer {
private int zzStartRead;
/**
* endRead marks the last character in the buffer, that has been read
* from input
* endRead marks the last character in the buffer, that has been read from
* input
*/
private int zzEndRead;
@@ -599,10 +605,10 @@ public final class FlasmLexer {
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.
* 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;
@@ -642,9 +648,11 @@ public final class FlasmLexer {
*/
private static char[] zzUnpackCMap(String packed) {
char[] map = new char[0x110000];
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = 0; /* index in unpacked array */
int j = 0;
/* index in unpacked array */
while (i < 2854) {
int count = packed.charAt(i++);
@@ -703,7 +711,8 @@ public final class FlasmLexer {
if (totalRead > 0) {
zzEndRead += totalRead;
if (totalRead == requested) { /* possibly more input available */
if (totalRead == requested) {
/* possibly more input available */
if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
--zzEndRead;
@@ -721,9 +730,11 @@ public final class FlasmLexer {
* Closes the input stream.
*/
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzAtEOF = true;
/* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
zzEndRead = zzStartRead;
/* invalidate buffer */
if (zzReader != null) {
zzReader.close();
@@ -731,12 +742,12 @@ public final class FlasmLexer {
}
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
* 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
* <b>cannot</b> be reused (internal buffer is discarded and lost).
* Lexical state is set to <tt>ZZ_INITIAL</tt>.
* <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical
* state is set to <tt>ZZ_INITIAL</tt>.
*
* Internal scan buffer is resized down to its initial length, if it has
* grown.
@@ -782,13 +793,12 @@ public final class FlasmLexer {
}
/**
* Returns the character at position <tt>pos</tt> from the
* matched text.
* Returns the character at position <tt>pos</tt> 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.
* @param pos the position of the character to fetch. A value from 0 to
* yylength()-1.
*
* @return the character at position pos
*/
@@ -806,14 +816,13 @@ public final class FlasmLexer {
/**
* 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.).
* 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.
* Usual syntax/scanner level error handling should be done in error
* fallback rules.
*
* @param errorCode the code of the errormessage to display
*/
@@ -833,8 +842,8 @@ public final class FlasmLexer {
*
* 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()!
* @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()) {
@@ -845,8 +854,8 @@ public final class FlasmLexer {
}
/**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
* 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
@@ -1,6 +1,6 @@
/* The following code was generated by JFlex 1.6.0 */
/*
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -25,8 +25,7 @@ import java.util.Stack;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0
* from the specification file
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0 from the specification file
* <tt>D:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript_script.flex</tt>
*/
public final class ActionScriptLexer {
@@ -58,9 +57,8 @@ public final class ActionScriptLexer {
/**
* 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
* 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
@@ -278,9 +276,11 @@ public final class ActionScriptLexer {
}
private static int zzUnpackAction(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -395,9 +395,11 @@ public final class ActionScriptLexer {
}
private static int zzUnpackRowMap(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -1100,9 +1102,11 @@ public final class ActionScriptLexer {
}
private static int zzUnpackTrans(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -1157,9 +1161,11 @@ public final class ActionScriptLexer {
}
private static int zzUnpackAttribute(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -1188,8 +1194,8 @@ public final class ActionScriptLexer {
private int zzLexicalState = YYINITIAL;
/**
* this buffer contains the current text to be matched and is
* the source of the yytext() string
* this buffer contains the current text to be matched and is the source of
* the yytext() string
*/
private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
@@ -1209,8 +1215,8 @@ public final class ActionScriptLexer {
private int zzStartRead;
/**
* endRead marks the last character in the buffer, that has been read
* from input
* endRead marks the last character in the buffer, that has been read from
* input
*/
private int zzEndRead;
@@ -1246,10 +1252,10 @@ public final class ActionScriptLexer {
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.
* 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;
@@ -1326,9 +1332,11 @@ public final class ActionScriptLexer {
*/
private static char[] zzUnpackCMap(String packed) {
char[] map = new char[0x110000];
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = 0; /* index in unpacked array */
int j = 0;
/* index in unpacked array */
while (i < 2916) {
int count = packed.charAt(i++);
@@ -1387,7 +1395,8 @@ public final class ActionScriptLexer {
if (totalRead > 0) {
zzEndRead += totalRead;
if (totalRead == requested) { /* possibly more input available */
if (totalRead == requested) {
/* possibly more input available */
if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
--zzEndRead;
@@ -1405,9 +1414,11 @@ public final class ActionScriptLexer {
* Closes the input stream.
*/
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzAtEOF = true;
/* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
zzEndRead = zzStartRead;
/* invalidate buffer */
if (zzReader != null) {
zzReader.close();
@@ -1415,12 +1426,12 @@ public final class ActionScriptLexer {
}
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
* 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
* <b>cannot</b> be reused (internal buffer is discarded and lost).
* Lexical state is set to <tt>ZZ_INITIAL</tt>.
* <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical
* state is set to <tt>ZZ_INITIAL</tt>.
*
* Internal scan buffer is resized down to its initial length, if it has
* grown.
@@ -1466,13 +1477,12 @@ public final class ActionScriptLexer {
}
/**
* Returns the character at position <tt>pos</tt> from the
* matched text.
* Returns the character at position <tt>pos</tt> 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.
* @param pos the position of the character to fetch. A value from 0 to
* yylength()-1.
*
* @return the character at position pos
*/
@@ -1490,14 +1500,13 @@ public final class ActionScriptLexer {
/**
* 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.).
* 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.
* Usual syntax/scanner level error handling should be done in error
* fallback rules.
*
* @param errorCode the code of the errormessage to display
*/
@@ -1517,8 +1526,8 @@ public final class ActionScriptLexer {
*
* 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()!
* @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()) {
@@ -1529,8 +1538,8 @@ public final class ActionScriptLexer {
}
/**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
* 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
@@ -1626,7 +1635,8 @@ public final class ActionScriptLexer {
}
case 185:
break;
case 3: { /*ignore*/
case 3: {
/*ignore*/
}
case 186:
@@ -1963,7 +1973,8 @@ public final class ActionScriptLexer {
case 250:
break;
case 68: {
string.append('\\'); /*illegal escape sequence*/
string.append('\\');
/*illegal escape sequence*/
}
case 251:
@@ -1,152 +1,152 @@
function bind(el, evt, func) {
if (el.addEventListener){
if (el.addEventListener) {
el.addEventListener(evt, func, false);
} else if (el.attachEvent) {
el.attachEvent('on' + evt, func);
}
}
function showhide(e,show){
var cls = " "+e.className+" ";
if(show && cls.indexOf(" hidden ") > -1){
cls = cls.replace(" hidden "," ");
}else if(!show && cls.indexOf(" hidden ") == -1 ){
cls = cls + "hidden ";
}
cls = cls.trim();
e.className = cls;
}
function hideNoName(name){
var lis = document.getElementsByTagName("li");
loopi:for(var i=0;i<lis.length;i++) {
if(lis[i].className == "instruction-item"){
if ((typeof name) != "undefined" && name.trim()!="") {
var ss = lis[i].getElementsByTagName("strong");
for(var s=0;s<ss.length;s++){
if(ss[s].className=="instruction-name")
{
var insName = ss[s].innerHTML;
if(insName.toLowerCase().indexOf(name.toLowerCase())!=0){ //does not start with desired name
showhide(lis[i],false);
continue loopi;
}
}
}
}
function showhide(e, show) {
var cls = " " + e.className + " ";
if (show && cls.indexOf(" hidden ") > -1) {
cls = cls.replace(" hidden ", " ");
} else if (!show && cls.indexOf(" hidden ") == -1) {
cls = cls + "hidden ";
}
}
cls = cls.trim();
e.className = cls;
}
function showFlags(show,flagType){
function hideNoName(name) {
var lis = document.getElementsByTagName("li");
loopi:for (var i = 0; i < lis.length; i++) {
if (lis[i].className == "instruction-item") {
if ((typeof name) != "undefined" && name.trim() != "") {
var ss = lis[i].getElementsByTagName("strong");
for (var s = 0; s < ss.length; s++) {
if (ss[s].className == "instruction-name")
{
var insName = ss[s].innerHTML;
if (insName.toLowerCase().indexOf(name.toLowerCase()) != 0) { //does not start with desired name
showhide(lis[i], false);
continue loopi;
}
}
}
}
}
}
}
function showFlags(show, flagType) {
var lis = document.getElementsByTagName("div");
loopi:for(var i=0;i<lis.length;i++){
var cls = " "+lis[i].className+" ";
if ((typeof flagType) != "undefined"){
if(cls.indexOf("instruction-flag-"+flagType) == -1){
loopi:for (var i = 0; i < lis.length; i++) {
var cls = " " + lis[i].className + " ";
if ((typeof flagType) != "undefined") {
if (cls.indexOf("instruction-flag-" + flagType) == -1) {
continue;
}
}
showhide(lis[i].parentNode,show);
}
showhide(lis[i].parentNode, show);
}
}
function sortInstructions(order){
var newUl = document.createElement("ul");
newUl.className = "instruction-list";
var smallestItem = null;
var smallestVal = null;
var originalUl = null;
do {
smallestItem = null;
smallestVal = null;
var lis = document.getElementsByTagName("li");
loopi:for(var i=0;i<lis.length;i++) {
var cls = " "+lis[i].className+" ";
if(cls.indexOf(" instruction-item ") != -1) {
var ss = lis[i].getElementsByTagName(order == "code"?"span":"strong");
for(var s=0;s<ss.length;s++){
if(ss[s].className=="instruction-"+order)
function sortInstructions(order) {
var newUl = document.createElement("ul");
newUl.className = "instruction-list";
var smallestItem = null;
var smallestVal = null;
var originalUl = null;
do {
smallestItem = null;
smallestVal = null;
var lis = document.getElementsByTagName("li");
loopi:for (var i = 0; i < lis.length; i++) {
var cls = " " + lis[i].className + " ";
if (cls.indexOf(" instruction-item ") != -1) {
var ss = lis[i].getElementsByTagName(order == "code" ? "span" : "strong");
for (var s = 0; s < ss.length; s++) {
if (ss[s].className == "instruction-" + order)
{
var checkedVal = ss[s].innerHTML;
if(smallestVal == null || smallestVal > checkedVal)
if (smallestVal == null || smallestVal > checkedVal)
{
smallestItem = lis[i];
smallestVal = checkedVal;
}
break;
break;
}
}
}
}
}
}
if(smallestItem != null){
originalUl = smallestItem.parentNode;
originalUl.removeChild(smallestItem);
newUl.appendChild(smallestItem);
}
}while(smallestItem != null);
originalUl.parentNode.replaceChild(newUl,originalUl);
if (smallestItem != null) {
originalUl = smallestItem.parentNode;
originalUl.removeChild(smallestItem);
newUl.appendChild(smallestItem);
}
} while (smallestItem != null);
originalUl.parentNode.replaceChild(newUl, originalUl);
}
function applyFilter() {
var order_new = document.getElementById("filter_order").value;
if(order_set != order_new) {
order_set = order_new;
sortInstructions(order_new);
if (order_set != order_new) {
order_set = order_new;
sortInstructions(order_new);
}
showFlags(true);
hideNoName(document.getElementById("filter-byname").value);
var inputs = document.getElementsByTagName("input");
for(var i=0;i<inputs.length;i++){
if(inputs[i].type == "checkbox" && inputs[i].className == "filter" && inputs[i].hasAttribute("data-flag")){
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "checkbox" && inputs[i].className == "filter" && inputs[i].hasAttribute("data-flag")) {
var flag = inputs[i].getAttribute("data-flag");
if(inputs[i].checked){
showFlags(false,flag);
}
if (inputs[i].checked) {
showFlags(false, flag);
}
}
}
}
}
function init(){
function init() {
var js_switcher = document.getElementById("js-switcher");
if(!js_switcher){
if (!js_switcher) {
return;
}
var t = "";
t += "<div class=\"filter\">";
t += "<div class=\"filter-item\">";
t += "<label for=\"filter-byname\"><strong class=\"filter-byname-title\">"+txt_filter_byname+"</strong></label>";
t += "<label for=\"filter-byname\"><strong class=\"filter-byname-title\">" + txt_filter_byname + "</strong></label>";
t += "<input onkeydown=\"applyFilter();\" onkeyup=\"applyFilter();\" onkeypress=\"applyFilter();\" type=\"text\" id=\"filter-byname\" size=\"15\" />";
t += "</div>";
t += "<div class=\"filter-item\">";
t += "<strong class=\"filter-hide-title\">"+txt_filter_hide+"</strong><br />";
for(var flag in flags){
t += "<strong class=\"filter-hide-title\">" + txt_filter_hide + "</strong><br />";
for (var flag in flags) {
var flagDesc = flags[flag];
var flagSet = flags_set[flag];
t+= '<input class="filter" data-flag="'+flag+'" onchange="applyFilter();" type="checkbox"'+(flagSet?' checked="checked"':'')+' id="flag-'+flag+'-switch"/><label for="flag-'+flag+'-switch">'+flagDesc+'</label><br />';
t += '<input class="filter" data-flag="' + flag + '" onchange="applyFilter();" type="checkbox"' + (flagSet ? ' checked="checked"' : '') + ' id="flag-' + flag + '-switch"/><label for="flag-' + flag + '-switch">' + flagDesc + '</label><br />';
}
t += "<div class=\"filter-item\">";
t += "<label for=\"filter-order\"><strong class=\"filter-order-title\">"+txt_filter_order+"</strong></label>";
t += "<label for=\"filter-order\"><strong class=\"filter-order-title\">" + txt_filter_order + "</strong></label>";
t += "<select id=\"filter_order\" onchange=\"applyFilter();\">";
t += "<option value=\"code\""+(order_set=="code"?' selected="selected"':'')+">"+txt_filter_order_code+"</option>";
t += "<option value=\"name\""+(order_set=="name"?' selected="selected"':'')+">"+txt_filter_order_name+"</option>";
t += "<option value=\"code\"" + (order_set == "code" ? ' selected="selected"' : '') + ">" + txt_filter_order_code + "</option>";
t += "<option value=\"name\"" + (order_set == "name" ? ' selected="selected"' : '') + ">" + txt_filter_order_name + "</option>";
t += "</select>";
t += "</div>";
t += "</div>";
t += "</div>";
t += "</div>";
t += "</div>"; //.filter
js_switcher.innerHTML = t;
applyFilter();
}
bind(window,"load",init);
bind(window, "load", init);
@@ -655,7 +655,7 @@ public class EcmaFloatingDecimal {
* We keep track of powers of 2 and powers of 5.
*/
/*
/*
* Estimate decimal exponent. (If it is small-ish,
* we could double-check.)
*
@@ -973,64 +973,60 @@ public class EcmaFloatingDecimal {
if (isExceptional) {
System.arraycopy(digits, 0, result, i, nDigits);
i += nDigits;
} else {
if (decExponent > 0 && decExponent < 22) {
// print digits.digits.
int charLength = Math.min(nDigits, decExponent);
System.arraycopy(digits, 0, result, i, charLength);
} else if (decExponent > 0 && decExponent < 22) {
// print digits.digits.
int charLength = Math.min(nDigits, decExponent);
System.arraycopy(digits, 0, result, i, charLength);
i += charLength;
if (charLength < decExponent) {
charLength = decExponent - charLength;
System.arraycopy(zero, 0, result, i, charLength);
i += charLength;
if (charLength < decExponent) {
charLength = decExponent - charLength;
System.arraycopy(zero, 0, result, i, charLength);
i += charLength;
} else {
if (charLength < nDigits) {
result[i++] = '.';
int t = nDigits - charLength;
System.arraycopy(digits, charLength, result, i, t);
i += t;
}
}
} else if (decExponent <= 0 && decExponent > -5) {
result[i++] = '0';
if (digits != zero) {
result[i++] = '.';
if (decExponent != 0) {
System.arraycopy(zero, 0, result, i, -decExponent);
i -= decExponent;
}
System.arraycopy(digits, 0, result, i, nDigits);
i += nDigits;
}
} else {
result[i++] = digits[0];
} else if (charLength < nDigits) {
result[i++] = '.';
if (nDigits > 1) {
System.arraycopy(digits, 1, result, i, nDigits - 1);
i += nDigits - 1;
} else {
result[i++] = '0';
}
result[i++] = 'e';
int e;
if (decExponent <= 0) {
result[i++] = '-';
e = -decExponent + 1;
} else {
e = decExponent - 1;
}
// decExponent has 1, 2, or 3, digits
if (e <= 9) {
result[i++] = (char) (e + '0');
} else if (e <= 99) {
result[i++] = (char) (e / 10 + '0');
result[i++] = (char) (e % 10 + '0');
} else {
result[i++] = (char) (e / 100 + '0');
e %= 100;
result[i++] = (char) (e / 10 + '0');
result[i++] = (char) (e % 10 + '0');
int t = nDigits - charLength;
System.arraycopy(digits, charLength, result, i, t);
i += t;
}
} else if (decExponent <= 0 && decExponent > -5) {
result[i++] = '0';
if (digits != zero) {
result[i++] = '.';
if (decExponent != 0) {
System.arraycopy(zero, 0, result, i, -decExponent);
i -= decExponent;
}
System.arraycopy(digits, 0, result, i, nDigits);
i += nDigits;
}
} else {
result[i++] = digits[0];
result[i++] = '.';
if (nDigits > 1) {
System.arraycopy(digits, 1, result, i, nDigits - 1);
i += nDigits - 1;
} else {
result[i++] = '0';
}
result[i++] = 'e';
int e;
if (decExponent <= 0) {
result[i++] = '-';
e = -decExponent + 1;
} else {
e = decExponent - 1;
}
// decExponent has 1, 2, or 3, digits
if (e <= 9) {
result[i++] = (char) (e + '0');
} else if (e <= 99) {
result[i++] = (char) (e / 10 + '0');
result[i++] = (char) (e % 10 + '0');
} else {
result[i++] = (char) (e / 100 + '0');
e %= 100;
result[i++] = (char) (e / 10 + '0');
result[i++] = (char) (e % 10 + '0');
}
}
return i;
@@ -1185,8 +1181,8 @@ public class EcmaFloatingDecimal {
}
/**
* Extract a hexadecimal digit from position <code>position</code>
* of string <code>s</code>.
* Extract a hexadecimal digit from position <code>position</code> of string
* <code>s</code>.
*/
static int getHexDigit(String s, int position) {
int value = Character.digit(s.charAt(position), 16);
@@ -1567,8 +1563,8 @@ class FDBigInt {
} else {
return 1; // b not big, answer is obvious;
}
} else {
// a is not really big
} else // a is not really big
{
if (b < 0) {
// but b is really big
return -1;
@@ -63,7 +63,7 @@ public class ShapeExporter {
return ret;
}
File foutdir = new File(outdir);
File foutdir = new File(outdir);
Path.createDirectorySafe(foutdir);
int count = 0;
@@ -92,6 +92,7 @@ public class BMPFile extends Component {
b.save(image, image.getWidth(null), image.getHeight(null));
}
}
/*
* The saveMethod is the main method of the process. This method
* will call the convertImage method to convert the memory image to
@@ -100,7 +101,6 @@ public class BMPFile extends Component {
* information header; and writeBitmap writes the image.
*
*/
private void save(Image parImage, int parWidth, int parHeight) throws IOException {
convertImage(parImage, parWidth, parHeight);
writeBitmapFileHeader();
@@ -108,12 +108,12 @@ public class BMPFile extends Component {
writeBitmap();
}
/*
* convertImage converts the memory image to the bitmap format (BRG).
* It also computes some information for the bitmap info header.
*
*/
private boolean convertImage(Image parImage, int parWidth, int parHeight) {
int pad;
bitmap = new int[parWidth * parHeight];
@@ -133,6 +133,7 @@ public class BMPFile extends Component {
biHeight = parHeight;
return (true);
}
/*
* writeBitmap converts the image returned from the pixel grabber to
* the format required. Remember: scan lines are inverted in
@@ -140,7 +141,6 @@ public class BMPFile extends Component {
*
* Each scan line must be padded to an even 4-byte boundary.
*/
private void writeBitmap() throws IOException {
byte[] rgb = new byte[3];
int width = biWidth;
@@ -165,11 +165,11 @@ public class BMPFile extends Component {
bfSize += padCount;
biSizeImage += padCount;
}
/*
* writeBitmapFileHeader writes the bitmap file header to the file.
*
*/
private void writeBitmapFileHeader() throws IOException {
fo.write(bfType);
@@ -178,13 +178,13 @@ public class BMPFile extends Component {
fo.write(intToWord(bfReserved2));
fo.write(intToDWord(bfOffBits));
}
/*
*
* writeBitmapInfoHeader writes the bitmap information header
* to the file.
*
*/
private void writeBitmapInfoHeader() throws IOException {
fo.write(intToDWord(biSize));
@@ -200,26 +200,26 @@ public class BMPFile extends Component {
fo.write(intToDWord(biClrImportant));
}
/*
*
* intToWord converts an int to a word, where the return
* value is stored in a 2-byte array.
*
*/
private byte[] intToWord(int parValue) {
byte[] retValue = new byte[2];
retValue[0] = (byte) (parValue & 0x00FF);
retValue[1] = (byte) ((parValue >> 8) & 0x00FF);
return (retValue);
}
/*
*
* intToDWord converts an int to a double word, where the return
* value is stored in a 4-byte array.
*
*/
private byte[] intToDWord(int parValue) {
byte[] retValue = new byte[4];
retValue[0] = (byte) (parValue & 0x00FF);
@@ -243,10 +243,8 @@ public abstract class GraphTextWriter {
if (formatting.spaceBeforeParenthesesMethodCallParentheses) {
space();
}
} else {
if (formatting.spaceBeforeParenthesesMethodCallEmptyParentheses) {
space();
}
} else if (formatting.spaceBeforeParenthesesMethodCallEmptyParentheses) {
space();
}
return this;
}
@@ -103,19 +103,17 @@ public class ImageHelper {
String formatName = getImageFormatString(format).toUpperCase(Locale.ENGLISH);
if (format == ImageFormat.JPEG) {
image = fixImageIOJpegBug(image);
} else {
if (image.getType() == BufferedImage.TYPE_INT_ARGB_PRE) {
BufferedImage image2 = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB);
int[] pixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
divideAlpha(pixels);
} else if (image.getType() == BufferedImage.TYPE_INT_ARGB_PRE) {
BufferedImage image2 = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_ARGB);
int[] pixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
divideAlpha(pixels);
int[] pixels2 = ((DataBufferInt) image2.getRaster().getDataBuffer()).getData();
for (int i = 0; i < pixels.length; i++) {
pixels2[i] = pixels[i];
}
image = image2;
int[] pixels2 = ((DataBufferInt) image2.getRaster().getDataBuffer()).getData();
for (int i = 0; i < pixels.length; i++) {
pixels2[i] = pixels[i];
}
image = image2;
}
try {
@@ -60,10 +60,8 @@ public class TextImporter {
int id = Integer.parseInt(idLine.substring(3).trim());
String[] records = textArr[1].split(recordSeparator);
result.put(id, records);
} else {
if (errorHandler.handle(null)) {
return null;
}
} else if (errorHandler.handle(null)) {
return null;
}
}
return result;
@@ -142,11 +140,9 @@ public class TextImporter {
return false;
}
}
} else {
if (textTag != null) {
if (!saveText(textTag, newText, null)) {
return false;
}
} else if (textTag != null) {
if (!saveText(textTag, newText, null)) {
return false;
}
}
File diff suppressed because it is too large Load Diff
@@ -500,7 +500,7 @@ public class DefineFont2Tag extends FontTag {
pos = i;
break;
}
return false;
}
}
@@ -524,7 +524,7 @@ public class DefineFont2Tag extends FontTag {
getSwf().clearImageCache();
return true;
}
@Override
public void setAdvanceValues(Font font) {
boolean hasLayout = fontFlagsHasLayout;
@@ -485,7 +485,7 @@ public class DefineFont3Tag extends FontTag {
@Override
public boolean removeCharacter(char character) {
//Font Align Zones will be removed as removing character zones is not supported:-(
for (int i = 0; i < swf.getTags().size(); i++) {
Tag t = swf.getTags().get(i);
@@ -523,13 +523,13 @@ public class DefineFont3Tag extends FontTag {
}
shiftGlyphIndices(fontID, pos + 1, false);
checkWideParameters();
setModified(true);
getSwf().clearImageCache();
return true;
}
@Override
public void setAdvanceValues(Font font) {
boolean hasLayout = fontFlagsHasLayout;
@@ -312,7 +312,7 @@ public class DefineFontTag extends FontTag {
if (fontInfoTag == null) {
return false;
}
int code = (int) character;
int pos = -1;
List<Integer> codeTable = fontInfoTag.getCodeTable();
@@ -335,12 +335,12 @@ public class DefineFontTag extends FontTag {
fontInfoTag.removeFontCharacter(pos);
shiftGlyphIndices(fontId, pos + 1, false);
setModified(true);
getSwf().clearImageCache();
return true;
}
@Override
public void setAdvanceValues(Font font) {
throw new UnsupportedOperationException("Setting the advance values for DefineFontTag is not supported.");
@@ -72,7 +72,7 @@ public class DoABCTag extends Tag implements ABCContainerTag {
@Override
public final void readData(SWFInputStream sis, ByteArrayRange data, int level, boolean parallel, boolean skipUnusualTags, boolean lazy) throws IOException {
ABCInputStream ais = new ABCInputStream(sis.getBaseStream());
// put it to the dumpview:
sis.readByteRangeEx(sis.available(), "abcBytes");
abc = new ABC(ais, swf, this);
@@ -210,7 +210,7 @@ public final class DefineCompactedFont extends FontTag {
pos = i;
break;
}
return false;
}
}
@@ -218,7 +218,7 @@ public final class DefineCompactedFont extends FontTag {
if (pos == -1) {
return false;
}
font.glyphInfo.remove(pos);
font.glyphs.remove(pos);
shapeCache.remove(pos);
@@ -1,6 +1,6 @@
/* The following code was generated by JFlex 1.6.0 */
/*
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -20,8 +20,7 @@ package com.jpexs.decompiler.flash.tags.text;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0
* from the specification file
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0 from the specification file
* <tt>C:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/text.flex</tt>
*/
public final class TextLexer {
@@ -47,9 +46,8 @@ public final class TextLexer {
/**
* 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
* 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
@@ -88,9 +86,11 @@ public final class TextLexer {
}
private static int zzUnpackAction(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -122,9 +122,11 @@ public final class TextLexer {
}
private static int zzUnpackRowMap(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -158,9 +160,11 @@ public final class TextLexer {
}
private static int zzUnpackTrans(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -206,9 +210,11 @@ public final class TextLexer {
}
private static int zzUnpackAttribute(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -237,8 +243,8 @@ public final class TextLexer {
private int zzLexicalState = YYINITIAL;
/**
* this buffer contains the current text to be matched and is
* the source of the yytext() string
* this buffer contains the current text to be matched and is the source of
* the yytext() string
*/
private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
@@ -258,8 +264,8 @@ public final class TextLexer {
private int zzStartRead;
/**
* endRead marks the last character in the buffer, that has been read
* from input
* endRead marks the last character in the buffer, that has been read from
* input
*/
private int zzEndRead;
@@ -295,10 +301,10 @@ public final class TextLexer {
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.
* 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;
@@ -344,9 +350,11 @@ public final class TextLexer {
*/
private static char[] zzUnpackCMap(String packed) {
char[] map = new char[0x110000];
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = 0; /* index in unpacked array */
int j = 0;
/* index in unpacked array */
while (i < 114) {
int count = packed.charAt(i++);
@@ -405,7 +413,8 @@ public final class TextLexer {
if (totalRead > 0) {
zzEndRead += totalRead;
if (totalRead == requested) { /* possibly more input available */
if (totalRead == requested) {
/* possibly more input available */
if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
--zzEndRead;
@@ -423,9 +432,11 @@ public final class TextLexer {
* Closes the input stream.
*/
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzAtEOF = true;
/* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
zzEndRead = zzStartRead;
/* invalidate buffer */
if (zzReader != null) {
zzReader.close();
@@ -433,12 +444,12 @@ public final class TextLexer {
}
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
* 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
* <b>cannot</b> be reused (internal buffer is discarded and lost).
* Lexical state is set to <tt>ZZ_INITIAL</tt>.
* <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical
* state is set to <tt>ZZ_INITIAL</tt>.
*
* Internal scan buffer is resized down to its initial length, if it has
* grown.
@@ -484,13 +495,12 @@ public final class TextLexer {
}
/**
* Returns the character at position <tt>pos</tt> from the
* matched text.
* Returns the character at position <tt>pos</tt> 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.
* @param pos the position of the character to fetch. A value from 0 to
* yylength()-1.
*
* @return the character at position pos
*/
@@ -508,14 +518,13 @@ public final class TextLexer {
/**
* 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.).
* 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.
* Usual syntax/scanner level error handling should be done in error
* fallback rules.
*
* @param errorCode the code of the errormessage to display
*/
@@ -535,8 +544,8 @@ public final class TextLexer {
*
* 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()!
* @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()) {
@@ -547,8 +556,8 @@ public final class TextLexer {
}
/**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
* 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
@@ -1,6 +1,6 @@
/* The following code was generated by JFlex 1.6.0 */
/*
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -22,8 +22,7 @@ import java.util.Stack;
/**
* This class is a scanner generated by
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0
* from the specification file
* <a href="http://www.jflex.de/">JFlex</a> 1.6.0 from the specification file
* <tt>C:/FFDec/jpexs-decompiler/libsrc/ffdec_lib/lexers/tag_conditions.flex</tt>
*/
public final class ConditionLexer {
@@ -45,9 +44,8 @@ public final class ConditionLexer {
/**
* 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
* 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
@@ -84,9 +82,11 @@ public final class ConditionLexer {
}
private static int zzUnpackAction(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -116,9 +116,11 @@ public final class ConditionLexer {
}
private static int zzUnpackRowMap(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -145,9 +147,11 @@ public final class ConditionLexer {
}
private static int zzUnpackTrans(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -192,9 +196,11 @@ public final class ConditionLexer {
}
private static int zzUnpackAttribute(String packed, int offset, int[] result) {
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = offset; /* index in unpacked array */
int j = offset;
/* index in unpacked array */
int l = packed.length();
while (i < l) {
@@ -223,8 +229,8 @@ public final class ConditionLexer {
private int zzLexicalState = YYINITIAL;
/**
* this buffer contains the current text to be matched and is
* the source of the yytext() string
* this buffer contains the current text to be matched and is the source of
* the yytext() string
*/
private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
@@ -244,8 +250,8 @@ public final class ConditionLexer {
private int zzStartRead;
/**
* endRead marks the last character in the buffer, that has been read
* from input
* endRead marks the last character in the buffer, that has been read from
* input
*/
private int zzEndRead;
@@ -281,10 +287,10 @@ public final class ConditionLexer {
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.
* 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;
@@ -338,9 +344,11 @@ public final class ConditionLexer {
*/
private static char[] zzUnpackCMap(String packed) {
char[] map = new char[0x110000];
int i = 0; /* index in packed string */
int i = 0;
/* index in packed string */
int j = 0; /* index in unpacked array */
int j = 0;
/* index in unpacked array */
while (i < 96) {
int count = packed.charAt(i++);
@@ -399,7 +407,8 @@ public final class ConditionLexer {
if (totalRead > 0) {
zzEndRead += totalRead;
if (totalRead == requested) { /* possibly more input available */
if (totalRead == requested) {
/* possibly more input available */
if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
--zzEndRead;
@@ -417,9 +426,11 @@ public final class ConditionLexer {
* Closes the input stream.
*/
public final void yyclose() throws java.io.IOException {
zzAtEOF = true; /* indicate end of file */
zzAtEOF = true;
/* indicate end of file */
zzEndRead = zzStartRead; /* invalidate buffer */
zzEndRead = zzStartRead;
/* invalidate buffer */
if (zzReader != null) {
zzReader.close();
@@ -427,12 +438,12 @@ public final class ConditionLexer {
}
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
* 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
* <b>cannot</b> be reused (internal buffer is discarded and lost).
* Lexical state is set to <tt>ZZ_INITIAL</tt>.
* <b>cannot</b> be reused (internal buffer is discarded and lost). Lexical
* state is set to <tt>ZZ_INITIAL</tt>.
*
* Internal scan buffer is resized down to its initial length, if it has
* grown.
@@ -478,13 +489,12 @@ public final class ConditionLexer {
}
/**
* Returns the character at position <tt>pos</tt> from the
* matched text.
* Returns the character at position <tt>pos</tt> 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.
* @param pos the position of the character to fetch. A value from 0 to
* yylength()-1.
*
* @return the character at position pos
*/
@@ -502,14 +512,13 @@ public final class ConditionLexer {
/**
* 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.).
* 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.
* Usual syntax/scanner level error handling should be done in error
* fallback rules.
*
* @param errorCode the code of the errormessage to display
*/
@@ -529,8 +538,8 @@ public final class ConditionLexer {
*
* 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()!
* @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()) {
@@ -541,8 +550,8 @@ public final class ConditionLexer {
}
/**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
* 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
@@ -29,11 +29,11 @@ public enum FLAVersion {
CS5_5("CS5.5", "Flash CS 5.5", "2.1", 11),
CS6("CS6", "Flash CS 6", "2.2", 17),
CC("CC", "Flash CC", "2.4", Integer.MAX_VALUE) {
@Override
public int minASVersion() {
return 3; //AS 1/2 not supported anymore
}
};
@Override
public int minASVersion() {
return 3; //AS 1/2 not supported anymore
}
};
private final String xflVersion;
@@ -171,19 +171,15 @@ public class GraphPart implements Serializable {
for (GraphPart p : nextParts) {
if (p == part) {
return true;
} else {
if (p.leadsTo(localData, gr, code, part, visited, loops)) {
return true;
}
} else if (p.leadsTo(localData, gr, code, part, visited, loops)) {
return true;
}
}
for (GraphPart p : throwParts) {
if (p == part) {
return true;
} else {
if (p.leadsTo(localData, gr, code, part, visited, loops)) {
return true;
}
} else if (p.leadsTo(localData, gr, code, part, visited, loops)) {
return true;
}
}
return false;