mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-28 12:40:55 +00:00
faster syntax highlighting
This commit is contained in:
+2
-2
@@ -154,9 +154,9 @@ public class AVM2DeobfuscatorSimple implements SWFDecompilerListener {
|
||||
} else if (graphTargetItem instanceof FalseItem) {
|
||||
return makePush(Boolean.FALSE, cpool);
|
||||
} else if (graphTargetItem instanceof NullAVM2Item) {
|
||||
return makePush(new Null(), cpool);
|
||||
return makePush(Null.INSTANCE, cpool);
|
||||
} else if (graphTargetItem instanceof UndefinedAVM2Item) {
|
||||
return makePush(new Undefined(), cpool);
|
||||
return makePush(Undefined.INSTANCE, cpool);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class CoerceAVM2Item extends AVM2Item {
|
||||
return ret;
|
||||
}
|
||||
if (ret instanceof Undefined) {
|
||||
return new Null();
|
||||
return Null.INSTANCE;
|
||||
}
|
||||
return ret.toString();
|
||||
case "*":
|
||||
|
||||
@@ -49,7 +49,7 @@ public class NullAVM2Item extends AVM2Item {
|
||||
|
||||
@Override
|
||||
public Object getResult() {
|
||||
return new Null();
|
||||
return Null.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ public class UndefinedAVM2Item extends AVM2Item {
|
||||
|
||||
@Override
|
||||
public Object getResult() {
|
||||
return new Undefined();
|
||||
return Undefined.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+34
-39
@@ -24,8 +24,9 @@ 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
|
||||
* <tt>D:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript3_pcode.flex</tt>
|
||||
* <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 {
|
||||
|
||||
@@ -50,8 +51,9 @@ 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
|
||||
@@ -2579,8 +2581,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];
|
||||
|
||||
@@ -2600,8 +2602,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;
|
||||
|
||||
@@ -2637,15 +2639,15 @@ 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;
|
||||
|
||||
/* user code: */
|
||||
StringBuffer string = new StringBuffer();
|
||||
StringBuilder string = new StringBuilder();
|
||||
|
||||
boolean isMultiname = false;
|
||||
|
||||
@@ -2780,8 +2782,6 @@ public final class Flasm3Lexer {
|
||||
|
||||
/**
|
||||
* Closes the input stream.
|
||||
*
|
||||
* @throws java.io.IOException
|
||||
*/
|
||||
public final void yyclose() throws java.io.IOException {
|
||||
zzAtEOF = true; /* indicate end of file */
|
||||
@@ -2794,12 +2794,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.
|
||||
@@ -2823,8 +2823,6 @@ public final class Flasm3Lexer {
|
||||
|
||||
/**
|
||||
* Returns the current lexical state.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final int yystate() {
|
||||
return zzLexicalState;
|
||||
@@ -2841,20 +2839,19 @@ public final class Flasm3Lexer {
|
||||
|
||||
/**
|
||||
* Returns the text matched by the current regular expression.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final String yytext() {
|
||||
return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the character at position <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
|
||||
*/
|
||||
@@ -2864,8 +2861,6 @@ public final class Flasm3Lexer {
|
||||
|
||||
/**
|
||||
* Returns the length of the matched text region.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final int yylength() {
|
||||
return zzMarkedPos - zzStartRead;
|
||||
@@ -2874,13 +2869,14 @@ 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
|
||||
*/
|
||||
@@ -2900,8 +2896,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()) {
|
||||
@@ -2912,12 +2908,11 @@ 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
|
||||
* @throws com.jpexs.decompiler.flash.abc.avm2.parser.AVM2ParseException
|
||||
*/
|
||||
public ParsedSymbol yylex() throws java.io.IOException, AVM2ParseException {
|
||||
int zzInput;
|
||||
|
||||
+726
-718
File diff suppressed because it is too large
Load Diff
+34
-40
@@ -21,8 +21,9 @@ 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
|
||||
* <tt>D:/Dropbox/Programovani/JavaSE/FFDec/libsrc/ffdec_lib/lexers/actionscript3_methodinfo.flex</tt>
|
||||
* <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 {
|
||||
|
||||
@@ -45,8 +46,9 @@ 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
|
||||
@@ -547,8 +549,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];
|
||||
|
||||
@@ -568,8 +570,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;
|
||||
|
||||
@@ -605,15 +607,15 @@ 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;
|
||||
|
||||
/* user code: */
|
||||
StringBuffer string = new StringBuffer();
|
||||
StringBuilder string = new StringBuilder();
|
||||
|
||||
boolean isMultiname = false;
|
||||
|
||||
@@ -729,8 +731,6 @@ public final class MethodInfoLexer {
|
||||
|
||||
/**
|
||||
* Closes the input stream.
|
||||
*
|
||||
* @throws java.io.IOException
|
||||
*/
|
||||
public final void yyclose() throws java.io.IOException {
|
||||
zzAtEOF = true; /* indicate end of file */
|
||||
@@ -743,12 +743,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.
|
||||
@@ -772,8 +772,6 @@ public final class MethodInfoLexer {
|
||||
|
||||
/**
|
||||
* Returns the current lexical state.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final int yystate() {
|
||||
return zzLexicalState;
|
||||
@@ -790,20 +788,19 @@ public final class MethodInfoLexer {
|
||||
|
||||
/**
|
||||
* Returns the text matched by the current regular expression.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final String yytext() {
|
||||
return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the character at position <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
|
||||
*/
|
||||
@@ -813,8 +810,6 @@ public final class MethodInfoLexer {
|
||||
|
||||
/**
|
||||
* Returns the length of the matched text region.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public final int yylength() {
|
||||
return zzMarkedPos - zzStartRead;
|
||||
@@ -823,13 +818,14 @@ 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
|
||||
*/
|
||||
@@ -849,8 +845,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()) {
|
||||
@@ -861,13 +857,11 @@ 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
|
||||
* @throws
|
||||
* com.jpexs.decompiler.flash.abc.methodinfo_parser.MethodInfoParseException
|
||||
*/
|
||||
public ParsedSymbol yylex() throws java.io.IOException, MethodInfoParseException {
|
||||
int zzInput;
|
||||
|
||||
Reference in New Issue
Block a user