From 880f226c89e1858884514162da8b7cf7fd61853f Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Sun, 30 Nov 2014 00:26:33 +0100 Subject: [PATCH] code format fixes in lexerslexer fixes --- .../flash/abc/avm2/parser/pcode/Flasm3Lexer.java | 7 ++++++- .../decompiler/flash/abc/avm2/parser/pcode/flasm3.flex | 2 +- .../flash/abc/avm2/parser/script/ActionScriptLexer.java | 5 +++++ .../flash/abc/methodinfo_parser/MethodInfoLexer.java | 9 +++++++-- .../flash/abc/methodinfo_parser/methodinfo.flex | 4 ++-- .../decompiler/flash/action/parser/pcode/FlasmLexer.java | 5 +++++ .../flash/action/parser/script/ActionScriptLexer.java | 5 +++++ .../com/jpexs/decompiler/flash/tags/text/TextLexer.java | 5 +++++ .../flash/types/annotations/parser/ConditionLexer.java | 5 +++++ 9 files changed, 41 insertions(+), 6 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java index 2e03119c7..dc4d19dfe 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/Flasm3Lexer.java @@ -2901,6 +2901,7 @@ 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 */ @@ -2942,6 +2943,7 @@ public final class Flasm3Lexer { /** * Returns the current lexical state. + * @return */ public final int yystate() { return zzLexicalState; @@ -2958,6 +2960,7 @@ 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); @@ -2979,6 +2982,7 @@ public final class Flasm3Lexer { /** * Returns the length of the matched text region. + * @return */ public final int yylength() { return zzMarkedPos - zzStartRead; @@ -3030,6 +3034,7 @@ public final class Flasm3Lexer { * * @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; @@ -3196,7 +3201,7 @@ public final class Flasm3Lexer { yybegin(PARAMETERS); // length also includes the trailing quote if (isMultiname) { - return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, new Long(multinameId)); + return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, multinameId); } else { return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/flasm3.flex b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/flasm3.flex index 09fcc4659..06a89cc9d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/flasm3.flex +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/pcode/flasm3.flex @@ -267,7 +267,7 @@ ExceptionTarget = "exceptiontarget "{PositiveNumberLiteral}":" yybegin(PARAMETERS); // length also includes the trailing quote if (isMultiname){ - return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, new Long(multinameId)); + return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, multinameId); } else { return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java index 5556b3053..c00700646 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptLexer.java @@ -1169,6 +1169,7 @@ public final class ActionScriptLexer { /** * Closes the input stream. + * @throws java.io.IOException */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ @@ -1210,6 +1211,7 @@ public final class ActionScriptLexer { /** * Returns the current lexical state. + * @return */ public final int yystate() { return zzLexicalState; @@ -1226,6 +1228,7 @@ public final class ActionScriptLexer { /** * Returns the text matched by the current regular expression. + * @return */ public final String yytext() { return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); @@ -1247,6 +1250,7 @@ public final class ActionScriptLexer { /** * Returns the length of the matched text region. + * @return */ public final int yylength() { return zzMarkedPos - zzStartRead; @@ -1298,6 +1302,7 @@ public final class ActionScriptLexer { * * @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; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java index 4086a4e75..3596e0517 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java @@ -741,6 +741,7 @@ 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 */ @@ -782,6 +783,7 @@ public final class MethodInfoLexer { /** * Returns the current lexical state. + * @return */ public final int yystate() { return zzLexicalState; @@ -798,6 +800,7 @@ 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); @@ -819,6 +822,7 @@ public final class MethodInfoLexer { /** * Returns the length of the matched text region. + * @return */ public final int yylength() { return zzMarkedPos - zzStartRead; @@ -870,6 +874,7 @@ public final class MethodInfoLexer { * * @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; @@ -1067,7 +1072,7 @@ public final class MethodInfoLexer { yybegin(YYINITIAL); // length also includes the trailing quote if (isMultiname) { - return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, new Long(multinameId)); + return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, multinameId); } else { return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); } @@ -1203,7 +1208,7 @@ public final class MethodInfoLexer { case 36: { String s = yytext(); long ns = Long.parseLong(s.substring(3, s.length() - 2)); - return new ParsedSymbol(ParsedSymbol.TYPE_NAMESPACE, new Long(ns)); + return new ParsedSymbol(ParsedSymbol.TYPE_NAMESPACE, ns); } case 72: break; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex index c2d453a4b..ddda925c9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/methodinfo.flex @@ -129,7 +129,7 @@ StringCharacter = [^\r\n\"\\] {Namespace} { String s = yytext(); long ns = Long.parseLong(s.substring(3, s.length() - 2)); - return new ParsedSymbol(ParsedSymbol.TYPE_NAMESPACE, new Long(ns)); + return new ParsedSymbol(ParsedSymbol.TYPE_NAMESPACE, ns); } true {return new ParsedSymbol(ParsedSymbol.TYPE_TRUE);} false {return new ParsedSymbol(ParsedSymbol.TYPE_FALSE);} @@ -144,7 +144,7 @@ StringCharacter = [^\r\n\"\\] yybegin(YYINITIAL); // length also includes the trailing quote if (isMultiname){ - return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, new Long(multinameId)); + return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, multinameId); } else { return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java index ea6368db2..c0864d1c0 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java @@ -717,6 +717,7 @@ public final class FlasmLexer { /** * Closes the input stream. + * @throws java.io.IOException */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ @@ -758,6 +759,7 @@ public final class FlasmLexer { /** * Returns the current lexical state. + * @return */ public final int yystate() { return zzLexicalState; @@ -774,6 +776,7 @@ public final class FlasmLexer { /** * Returns the text matched by the current regular expression. + * @return */ public final String yytext() { return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); @@ -795,6 +798,7 @@ public final class FlasmLexer { /** * Returns the length of the matched text region. + * @return */ public final int yylength() { return zzMarkedPos - zzStartRead; @@ -846,6 +850,7 @@ public final class FlasmLexer { * * @return the next token * @exception java.io.IOException if any I/O-Error occurs + * @throws com.jpexs.decompiler.flash.action.parser.ActionParseException */ public ASMParsedSymbol yylex() throws java.io.IOException, ActionParseException { int zzInput; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java index 3509c9a8c..7b08eedd5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java @@ -1396,6 +1396,7 @@ public final class ActionScriptLexer { /** * Closes the input stream. + * @throws java.io.IOException */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ @@ -1437,6 +1438,7 @@ public final class ActionScriptLexer { /** * Returns the current lexical state. + * @return */ public final int yystate() { return zzLexicalState; @@ -1453,6 +1455,7 @@ public final class ActionScriptLexer { /** * Returns the text matched by the current regular expression. + * @return */ public final String yytext() { return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); @@ -1474,6 +1477,7 @@ public final class ActionScriptLexer { /** * Returns the length of the matched text region. + * @return */ public final int yylength() { return zzMarkedPos - zzStartRead; @@ -1525,6 +1529,7 @@ public final class ActionScriptLexer { * * @return the next token * @exception java.io.IOException if any I/O-Error occurs + * @throws com.jpexs.decompiler.flash.action.parser.ActionParseException */ public ParsedSymbol yylex() throws java.io.IOException, ActionParseException { int zzInput; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java index 87a0537ad..420c1e0af 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java @@ -411,6 +411,7 @@ public final class TextLexer { /** * Closes the input stream. + * @throws java.io.IOException */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ @@ -452,6 +453,7 @@ public final class TextLexer { /** * Returns the current lexical state. + * @return */ public final int yystate() { return zzLexicalState; @@ -468,6 +470,7 @@ public final class TextLexer { /** * Returns the text matched by the current regular expression. + * @return */ public final String yytext() { return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); @@ -489,6 +492,7 @@ public final class TextLexer { /** * Returns the length of the matched text region. + * @return */ public final int yylength() { return zzMarkedPos - zzStartRead; @@ -540,6 +544,7 @@ public final class TextLexer { * * @return the next token * @exception java.io.IOException if any I/O-Error occurs + * @throws com.jpexs.decompiler.flash.tags.text.TextParseException */ public ParsedSymbol yylex() throws java.io.IOException, TextParseException { int zzInput; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java index a144fa890..033425d12 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/annotations/parser/ConditionLexer.java @@ -411,6 +411,7 @@ public final class ConditionLexer { /** * Closes the input stream. + * @throws java.io.IOException */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ @@ -452,6 +453,7 @@ public final class ConditionLexer { /** * Returns the current lexical state. + * @return */ public final int yystate() { return zzLexicalState; @@ -468,6 +470,7 @@ public final class ConditionLexer { /** * Returns the text matched by the current regular expression. + * @return */ public final String yytext() { return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); @@ -489,6 +492,7 @@ public final class ConditionLexer { /** * Returns the length of the matched text region. + * @return */ public final int yylength() { return zzMarkedPos - zzStartRead; @@ -540,6 +544,7 @@ public final class ConditionLexer { * * @return the next token * @exception java.io.IOException if any I/O-Error occurs + * @throws com.jpexs.decompiler.flash.types.annotations.parser.AnnotationParseException */ public ConditionToken yylex() throws java.io.IOException, AnnotationParseException { int zzInput;