From e595437dc2da9dbaf7508ee55ec4ce399d8928f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sun, 2 Feb 2014 05:39:36 +0100 Subject: [PATCH] Code format & Organize imports --- trunk/src/com/jpexs/decompiler/flash/SWF.java | 23 +- .../decompiler/flash/SWFInputStream.java | 247 +- .../decompiler/flash/SWFOutputStream.java | 44 +- .../decompiler/flash/ZippedSWFBundle.java | 2 +- .../com/jpexs/decompiler/flash/abc/ABC.java | 23 +- .../decompiler/flash/abc/ABCInputStream.java | 14 +- .../decompiler/flash/abc/ABCOutputStream.java | 13 +- .../decompiler/flash/abc/avm2/AVM2Code.java | 163 +- .../flash/abc/avm2/parser/Flasm3Lexer.java | 2549 +++++++++-------- .../methodinfo_parser/MethodInfoLexer.java | 35 +- .../jpexs/decompiler/flash/action/Action.java | 10 +- .../flash/action/parser/pcode/ASMParser.java | 104 +- .../flash/action/parser/pcode/FlasmLexer.java | 35 +- .../parser/script/ActionScriptLexer.java | 35 +- .../parser/script/ActionScriptParser.java | 6 +- .../flash/configuration/Configuration.java | 11 +- .../flash/exporters/BitmapExporter.java | 9 +- .../decompiler/flash/exporters/Matrix.java | 7 +- .../decompiler/flash/exporters/PointInt.java | 3 +- .../flash/exporters/ShapeExporterBase.java | 4 +- .../decompiler/flash/gui/AboutDialog.java | 7 +- .../decompiler/flash/gui/GraphFrame.java | 9 +- .../decompiler/flash/gui/ImagePanel.java | 1 - .../com/jpexs/decompiler/flash/gui/Main.java | 17 +- .../flash/gui/MainFrameRibbonMenu.java | 1 - .../jpexs/decompiler/flash/gui/MainPanel.java | 5 +- .../gui/MyRibbonApplicationMenuButtonUI.java | 8 +- .../flash/gui/NewVersionDialog.java | 2 +- .../jpexs/decompiler/flash/gui/TagTree.java | 17 +- .../decompiler/flash/gui/TagTreeModel.java | 66 +- .../decompiler/flash/gui/TimeLinePanel.java | 18 +- .../com/jpexs/decompiler/flash/gui/View.java | 10 +- .../decompiler/flash/gui/abc/ABCPanel.java | 28 +- .../decompiler/flash/gui/abc/DetailPanel.java | 7 +- .../flash/gui/abc/IconListRenderer.java | 6 +- .../gui/abc/SlotConstTraitDetailPanel.java | 5 +- .../decompiler/flash/gui/abc/UsageFrame.java | 5 +- .../flash/gui/abc/treenodes/TreeElement.java | 6 +- .../flash/gui/proxy/ProxyFrame.java | 17 +- .../flash/tags/DefineMorphShapeTag.java | 2 +- .../decompiler/flash/tags/DefineShapeTag.java | 2 +- .../decompiler/flash/tags/ShowFrameTag.java | 2 +- .../com/jpexs/decompiler/flash/tags/Tag.java | 11 +- .../flash/tags/gfx/DefineCompactedFont.java | 1 - .../decompiler/flash/tags/text/TextLexer.java | 35 +- .../decompiler/flash/timeline/DepthState.java | 14 +- .../decompiler/flash/timeline/Frame.java | 23 +- .../decompiler/flash/timeline/TimeLine.java | 46 +- .../com/jpexs/helpers/SerializableImage.java | 19 +- .../jpexs/decompiler/flash/ABCStreamTest.java | 3 +- .../flash/ActionScript2AssemblerTest.java | 20 +- .../flash/ActionScript2DeobfuscatorTest.java | 57 +- .../decompiler/flash/ActionScript2Test.java | 6 +- .../decompiler/flash/ActionScript3Test.java | 5 +- .../jpexs/decompiler/flash/ExportTest.java | 8 +- .../jpexs/decompiler/flash/RecompileTest.java | 9 +- .../jpexs/decompiler/flash/SWFStreamTest.java | 5 +- .../flash/generators/AS2Generator.java | 15 +- .../flash/generators/AS3Generator.java | 4 +- 59 files changed, 2350 insertions(+), 1509 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/SWF.java b/trunk/src/com/jpexs/decompiler/flash/SWF.java index eca781ab6..59b91687f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWF.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWF.java @@ -52,7 +52,6 @@ import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; import com.jpexs.decompiler.flash.action.swf7.ActionDefineFunction2; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.ecma.Null; -import com.jpexs.decompiler.flash.exporters.BitmapExporter; import com.jpexs.decompiler.flash.exporters.Matrix; import com.jpexs.decompiler.flash.flv.AUDIODATA; import com.jpexs.decompiler.flash.flv.FLVOutputStream; @@ -430,7 +429,7 @@ public final class SWF implements TreeItem { showFrameTag.innerTags = innerTags; } } - + assignExportNamesToSymbols(); assignClassesToSymbols(); findFileAttributes(); @@ -991,7 +990,7 @@ public final class SWF implements TreeItem { } return ret; } - + public static void getTagsFromTreeNodes(List treeNodes, List result) { for (TreeNode treeNode : treeNodes) { TreeItem treeItem = treeNode.getItem(); @@ -1001,7 +1000,7 @@ public final class SWF implements TreeItem { getTagsFromTreeNodes(treeNode.subNodes, result); } } - + private final HashSet listeners = new HashSet<>(); public final void addEventListener(EventListener listener) { @@ -2076,7 +2075,7 @@ public final class SWF implements TreeItem { mat.getRotateSkew1Float(), mat.getScaleYFloat(), mat.translateX, mat.translateY); } - + private static Cache frameCache = Cache.getInstance(false); public static SerializableImage getFromCache(String key) { @@ -2085,11 +2084,11 @@ public final class SWF implements TreeItem { } return null; } - + public static void putToCache(String key, SerializableImage img) { frameCache.put(key, img); } - + public static void clearImageCache() { frameCache.clear(); } @@ -2165,8 +2164,8 @@ public final class SWF implements TreeItem { CharacterTag character = characters.get(layer.characterId); Matrix mat = new Matrix(layer.matrix); /*if (firstLevel) { - mat.scale(unzoom); - }*/ + mat.scale(unzoom); + }*/ mat.translate(fixX, fixY); if (character instanceof DrawableTag) { @@ -2174,9 +2173,9 @@ public final class SWF implements TreeItem { SerializableImage img = drawable.toImage(layer.ratio < 0 ? 0 : layer.ratio/*layer.duration*/, allTags, characters, visited, transformation); mat.translate(img.bounds.getMinX() * unzoom, img.bounds.getMinY() * unzoom); /*if (character instanceof BoundedTag) { - BoundedTag bounded = (BoundedTag) character; - RECT rect = bounded.getRect(characters, visited); - }*/ + BoundedTag bounded = (BoundedTag) character; + RECT rect = bounded.getRect(characters, visited); + }*/ if (layer.filters != null) { for (FILTER filter : layer.filters) { img = filter.apply(img); diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java index 96a4d70fb..274f09df1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -20,13 +20,177 @@ import com.jpexs.decompiler.flash.action.Action; import com.jpexs.decompiler.flash.action.model.ConstantPool; import com.jpexs.decompiler.flash.action.special.ActionEnd; import com.jpexs.decompiler.flash.action.special.ActionNop; -import com.jpexs.decompiler.flash.action.swf3.*; -import com.jpexs.decompiler.flash.action.swf4.*; -import com.jpexs.decompiler.flash.action.swf5.*; -import com.jpexs.decompiler.flash.action.swf6.*; -import com.jpexs.decompiler.flash.action.swf7.*; +import com.jpexs.decompiler.flash.action.swf3.ActionGetURL; +import com.jpexs.decompiler.flash.action.swf3.ActionGoToLabel; +import com.jpexs.decompiler.flash.action.swf3.ActionGotoFrame; +import com.jpexs.decompiler.flash.action.swf3.ActionNextFrame; +import com.jpexs.decompiler.flash.action.swf3.ActionPlay; +import com.jpexs.decompiler.flash.action.swf3.ActionPrevFrame; +import com.jpexs.decompiler.flash.action.swf3.ActionSetTarget; +import com.jpexs.decompiler.flash.action.swf3.ActionStop; +import com.jpexs.decompiler.flash.action.swf3.ActionStopSounds; +import com.jpexs.decompiler.flash.action.swf3.ActionToggleQuality; +import com.jpexs.decompiler.flash.action.swf3.ActionWaitForFrame; +import com.jpexs.decompiler.flash.action.swf4.ActionAdd; +import com.jpexs.decompiler.flash.action.swf4.ActionAnd; +import com.jpexs.decompiler.flash.action.swf4.ActionAsciiToChar; +import com.jpexs.decompiler.flash.action.swf4.ActionCall; +import com.jpexs.decompiler.flash.action.swf4.ActionCharToAscii; +import com.jpexs.decompiler.flash.action.swf4.ActionCloneSprite; +import com.jpexs.decompiler.flash.action.swf4.ActionDivide; +import com.jpexs.decompiler.flash.action.swf4.ActionEndDrag; +import com.jpexs.decompiler.flash.action.swf4.ActionEquals; +import com.jpexs.decompiler.flash.action.swf4.ActionGetProperty; +import com.jpexs.decompiler.flash.action.swf4.ActionGetTime; +import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; +import com.jpexs.decompiler.flash.action.swf4.ActionGetVariable; +import com.jpexs.decompiler.flash.action.swf4.ActionGotoFrame2; +import com.jpexs.decompiler.flash.action.swf4.ActionIf; +import com.jpexs.decompiler.flash.action.swf4.ActionJump; +import com.jpexs.decompiler.flash.action.swf4.ActionLess; +import com.jpexs.decompiler.flash.action.swf4.ActionMBAsciiToChar; +import com.jpexs.decompiler.flash.action.swf4.ActionMBCharToAscii; +import com.jpexs.decompiler.flash.action.swf4.ActionMBStringExtract; +import com.jpexs.decompiler.flash.action.swf4.ActionMBStringLength; +import com.jpexs.decompiler.flash.action.swf4.ActionMultiply; +import com.jpexs.decompiler.flash.action.swf4.ActionNot; +import com.jpexs.decompiler.flash.action.swf4.ActionOr; +import com.jpexs.decompiler.flash.action.swf4.ActionPop; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf4.ActionRandomNumber; +import com.jpexs.decompiler.flash.action.swf4.ActionRemoveSprite; +import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; +import com.jpexs.decompiler.flash.action.swf4.ActionSetTarget2; +import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; +import com.jpexs.decompiler.flash.action.swf4.ActionStartDrag; +import com.jpexs.decompiler.flash.action.swf4.ActionStringAdd; +import com.jpexs.decompiler.flash.action.swf4.ActionStringEquals; +import com.jpexs.decompiler.flash.action.swf4.ActionStringExtract; +import com.jpexs.decompiler.flash.action.swf4.ActionStringLength; +import com.jpexs.decompiler.flash.action.swf4.ActionStringLess; +import com.jpexs.decompiler.flash.action.swf4.ActionSubtract; +import com.jpexs.decompiler.flash.action.swf4.ActionToInteger; +import com.jpexs.decompiler.flash.action.swf4.ActionTrace; +import com.jpexs.decompiler.flash.action.swf4.ActionWaitForFrame2; +import com.jpexs.decompiler.flash.action.swf5.ActionAdd2; +import com.jpexs.decompiler.flash.action.swf5.ActionBitAnd; +import com.jpexs.decompiler.flash.action.swf5.ActionBitLShift; +import com.jpexs.decompiler.flash.action.swf5.ActionBitOr; +import com.jpexs.decompiler.flash.action.swf5.ActionBitRShift; +import com.jpexs.decompiler.flash.action.swf5.ActionBitURShift; +import com.jpexs.decompiler.flash.action.swf5.ActionBitXor; +import com.jpexs.decompiler.flash.action.swf5.ActionCallFunction; +import com.jpexs.decompiler.flash.action.swf5.ActionCallMethod; +import com.jpexs.decompiler.flash.action.swf5.ActionConstantPool; +import com.jpexs.decompiler.flash.action.swf5.ActionDecrement; +import com.jpexs.decompiler.flash.action.swf5.ActionDefineFunction; +import com.jpexs.decompiler.flash.action.swf5.ActionDefineLocal; +import com.jpexs.decompiler.flash.action.swf5.ActionDefineLocal2; +import com.jpexs.decompiler.flash.action.swf5.ActionDelete; +import com.jpexs.decompiler.flash.action.swf5.ActionDelete2; +import com.jpexs.decompiler.flash.action.swf5.ActionEnumerate; +import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; +import com.jpexs.decompiler.flash.action.swf5.ActionGetMember; +import com.jpexs.decompiler.flash.action.swf5.ActionIncrement; +import com.jpexs.decompiler.flash.action.swf5.ActionInitArray; +import com.jpexs.decompiler.flash.action.swf5.ActionInitObject; +import com.jpexs.decompiler.flash.action.swf5.ActionLess2; +import com.jpexs.decompiler.flash.action.swf5.ActionModulo; +import com.jpexs.decompiler.flash.action.swf5.ActionNewMethod; +import com.jpexs.decompiler.flash.action.swf5.ActionNewObject; +import com.jpexs.decompiler.flash.action.swf5.ActionPushDuplicate; +import com.jpexs.decompiler.flash.action.swf5.ActionReturn; +import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; +import com.jpexs.decompiler.flash.action.swf5.ActionStackSwap; +import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; +import com.jpexs.decompiler.flash.action.swf5.ActionTargetPath; +import com.jpexs.decompiler.flash.action.swf5.ActionToNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionToString; +import com.jpexs.decompiler.flash.action.swf5.ActionTypeOf; +import com.jpexs.decompiler.flash.action.swf5.ActionWith; +import com.jpexs.decompiler.flash.action.swf6.ActionEnumerate2; +import com.jpexs.decompiler.flash.action.swf6.ActionGreater; +import com.jpexs.decompiler.flash.action.swf6.ActionInstanceOf; +import com.jpexs.decompiler.flash.action.swf6.ActionStrictEquals; +import com.jpexs.decompiler.flash.action.swf6.ActionStringGreater; +import com.jpexs.decompiler.flash.action.swf7.ActionCastOp; +import com.jpexs.decompiler.flash.action.swf7.ActionDefineFunction2; +import com.jpexs.decompiler.flash.action.swf7.ActionExtends; +import com.jpexs.decompiler.flash.action.swf7.ActionImplementsOp; +import com.jpexs.decompiler.flash.action.swf7.ActionThrow; +import com.jpexs.decompiler.flash.action.swf7.ActionTry; import com.jpexs.decompiler.flash.configuration.Configuration; -import com.jpexs.decompiler.flash.tags.*; +import com.jpexs.decompiler.flash.tags.CSMTextSettingsTag; +import com.jpexs.decompiler.flash.tags.DebugIDTag; +import com.jpexs.decompiler.flash.tags.DefineBinaryDataTag; +import com.jpexs.decompiler.flash.tags.DefineBitsJPEG2Tag; +import com.jpexs.decompiler.flash.tags.DefineBitsJPEG3Tag; +import com.jpexs.decompiler.flash.tags.DefineBitsJPEG4Tag; +import com.jpexs.decompiler.flash.tags.DefineBitsLossless2Tag; +import com.jpexs.decompiler.flash.tags.DefineBitsLosslessTag; +import com.jpexs.decompiler.flash.tags.DefineBitsTag; +import com.jpexs.decompiler.flash.tags.DefineButton2Tag; +import com.jpexs.decompiler.flash.tags.DefineButtonCxformTag; +import com.jpexs.decompiler.flash.tags.DefineButtonSoundTag; +import com.jpexs.decompiler.flash.tags.DefineButtonTag; +import com.jpexs.decompiler.flash.tags.DefineEditTextTag; +import com.jpexs.decompiler.flash.tags.DefineFont2Tag; +import com.jpexs.decompiler.flash.tags.DefineFont3Tag; +import com.jpexs.decompiler.flash.tags.DefineFont4Tag; +import com.jpexs.decompiler.flash.tags.DefineFontAlignZonesTag; +import com.jpexs.decompiler.flash.tags.DefineFontInfo2Tag; +import com.jpexs.decompiler.flash.tags.DefineFontInfoTag; +import com.jpexs.decompiler.flash.tags.DefineFontNameTag; +import com.jpexs.decompiler.flash.tags.DefineFontTag; +import com.jpexs.decompiler.flash.tags.DefineMorphShape2Tag; +import com.jpexs.decompiler.flash.tags.DefineMorphShapeTag; +import com.jpexs.decompiler.flash.tags.DefineScalingGridTag; +import com.jpexs.decompiler.flash.tags.DefineSceneAndFrameLabelDataTag; +import com.jpexs.decompiler.flash.tags.DefineShape2Tag; +import com.jpexs.decompiler.flash.tags.DefineShape3Tag; +import com.jpexs.decompiler.flash.tags.DefineShape4Tag; +import com.jpexs.decompiler.flash.tags.DefineShapeTag; +import com.jpexs.decompiler.flash.tags.DefineSoundTag; +import com.jpexs.decompiler.flash.tags.DefineSpriteTag; +import com.jpexs.decompiler.flash.tags.DefineText2Tag; +import com.jpexs.decompiler.flash.tags.DefineTextTag; +import com.jpexs.decompiler.flash.tags.DefineVideoStreamTag; +import com.jpexs.decompiler.flash.tags.DoABCDefineTag; +import com.jpexs.decompiler.flash.tags.DoABCTag; +import com.jpexs.decompiler.flash.tags.DoActionTag; +import com.jpexs.decompiler.flash.tags.DoInitActionTag; +import com.jpexs.decompiler.flash.tags.EnableDebugger2Tag; +import com.jpexs.decompiler.flash.tags.EnableDebuggerTag; +import com.jpexs.decompiler.flash.tags.EnableTelemetryTag; +import com.jpexs.decompiler.flash.tags.EndTag; +import com.jpexs.decompiler.flash.tags.ExportAssetsTag; +import com.jpexs.decompiler.flash.tags.FileAttributesTag; +import com.jpexs.decompiler.flash.tags.FrameLabelTag; +import com.jpexs.decompiler.flash.tags.ImportAssets2Tag; +import com.jpexs.decompiler.flash.tags.ImportAssetsTag; +import com.jpexs.decompiler.flash.tags.JPEGTablesTag; +import com.jpexs.decompiler.flash.tags.MetadataTag; +import com.jpexs.decompiler.flash.tags.PlaceObject2Tag; +import com.jpexs.decompiler.flash.tags.PlaceObject3Tag; +import com.jpexs.decompiler.flash.tags.PlaceObject4Tag; +import com.jpexs.decompiler.flash.tags.PlaceObjectTag; +import com.jpexs.decompiler.flash.tags.ProductInfoTag; +import com.jpexs.decompiler.flash.tags.ProtectTag; +import com.jpexs.decompiler.flash.tags.RemoveObject2Tag; +import com.jpexs.decompiler.flash.tags.RemoveObjectTag; +import com.jpexs.decompiler.flash.tags.ScriptLimitsTag; +import com.jpexs.decompiler.flash.tags.SetBackgroundColorTag; +import com.jpexs.decompiler.flash.tags.SetTabIndexTag; +import com.jpexs.decompiler.flash.tags.ShowFrameTag; +import com.jpexs.decompiler.flash.tags.SoundStreamBlockTag; +import com.jpexs.decompiler.flash.tags.SoundStreamHead2Tag; +import com.jpexs.decompiler.flash.tags.SoundStreamHeadTag; +import com.jpexs.decompiler.flash.tags.StartSound2Tag; +import com.jpexs.decompiler.flash.tags.StartSoundTag; +import com.jpexs.decompiler.flash.tags.SymbolClassTag; +import com.jpexs.decompiler.flash.tags.Tag; +import com.jpexs.decompiler.flash.tags.UnknownTag; +import com.jpexs.decompiler.flash.tags.VideoFrameTag; import com.jpexs.decompiler.flash.tags.gfx.DefineCompactedFont; import com.jpexs.decompiler.flash.tags.gfx.DefineExternalGradient; import com.jpexs.decompiler.flash.tags.gfx.DefineExternalImage; @@ -37,7 +201,49 @@ import com.jpexs.decompiler.flash.tags.gfx.DefineGradientMap; import com.jpexs.decompiler.flash.tags.gfx.DefineSubImage; import com.jpexs.decompiler.flash.tags.gfx.ExporterInfoTag; import com.jpexs.decompiler.flash.tags.gfx.FontTextureInfo; -import com.jpexs.decompiler.flash.types.*; +import com.jpexs.decompiler.flash.types.ALPHABITMAPDATA; +import com.jpexs.decompiler.flash.types.ALPHACOLORMAPDATA; +import com.jpexs.decompiler.flash.types.ARGB; +import com.jpexs.decompiler.flash.types.BITMAPDATA; +import com.jpexs.decompiler.flash.types.BUTTONCONDACTION; +import com.jpexs.decompiler.flash.types.BUTTONRECORD; +import com.jpexs.decompiler.flash.types.CLIPACTIONRECORD; +import com.jpexs.decompiler.flash.types.CLIPACTIONS; +import com.jpexs.decompiler.flash.types.CLIPEVENTFLAGS; +import com.jpexs.decompiler.flash.types.COLORMAPDATA; +import com.jpexs.decompiler.flash.types.CXFORM; +import com.jpexs.decompiler.flash.types.CXFORMWITHALPHA; +import com.jpexs.decompiler.flash.types.FILLSTYLE; +import com.jpexs.decompiler.flash.types.FILLSTYLEARRAY; +import com.jpexs.decompiler.flash.types.FOCALGRADIENT; +import com.jpexs.decompiler.flash.types.GLYPHENTRY; +import com.jpexs.decompiler.flash.types.GRADIENT; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.KERNINGRECORD; +import com.jpexs.decompiler.flash.types.LANGCODE; +import com.jpexs.decompiler.flash.types.LINESTYLE; +import com.jpexs.decompiler.flash.types.LINESTYLE2; +import com.jpexs.decompiler.flash.types.LINESTYLEARRAY; +import com.jpexs.decompiler.flash.types.MATRIX; +import com.jpexs.decompiler.flash.types.MORPHFILLSTYLE; +import com.jpexs.decompiler.flash.types.MORPHFILLSTYLEARRAY; +import com.jpexs.decompiler.flash.types.MORPHGRADIENT; +import com.jpexs.decompiler.flash.types.MORPHGRADRECORD; +import com.jpexs.decompiler.flash.types.MORPHLINESTYLE; +import com.jpexs.decompiler.flash.types.MORPHLINESTYLE2; +import com.jpexs.decompiler.flash.types.MORPHLINESTYLEARRAY; +import com.jpexs.decompiler.flash.types.PIX15; +import com.jpexs.decompiler.flash.types.PIX24; +import com.jpexs.decompiler.flash.types.RECT; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; +import com.jpexs.decompiler.flash.types.SOUNDENVELOPE; +import com.jpexs.decompiler.flash.types.SOUNDINFO; +import com.jpexs.decompiler.flash.types.TEXTRECORD; +import com.jpexs.decompiler.flash.types.ZONEDATA; +import com.jpexs.decompiler.flash.types.ZONERECORD; import com.jpexs.decompiler.flash.types.filters.BEVELFILTER; import com.jpexs.decompiler.flash.types.filters.BLURFILTER; import com.jpexs.decompiler.flash.types.filters.COLORMATRIXFILTER; @@ -92,15 +298,17 @@ public class SWFInputStream extends InputStream { private ByteArrayOutputStream buffer; private List tagPositionsInFrame = new ArrayList<>(); public Map> tagPositionsInFrames = new HashMap<>(); - private List frameTagTypeIds = new ArrayList() {{ - add(PlaceObjectTag.ID); - add(PlaceObject2Tag.ID); - add(PlaceObject3Tag.ID); - add(PlaceObject4Tag.ID); - add(RemoveObjectTag.ID); - add(RemoveObject2Tag.ID); - add(FrameLabelTag.ID); - }}; + private List frameTagTypeIds = new ArrayList() { + { + add(PlaceObjectTag.ID); + add(PlaceObject2Tag.ID); + add(PlaceObject3Tag.ID); + add(PlaceObject4Tag.ID); + add(RemoveObjectTag.ID); + add(RemoveObject2Tag.ID); + add(FrameLabelTag.ID); + } + }; public int getVersion() { return version; @@ -667,15 +875,14 @@ public class SWFInputStream extends InputStream { } tag.previousTag = previousTag; previousTag = tag; - + if (frameTagTypeIds.contains(tag.getId())) { tagPositionsInFrame.add(pos); - } - else if (tag.getId() == ShowFrameTag.ID) { + } else if (tag.getId() == ShowFrameTag.ID) { tagPositionsInFrames.put(pos, tagPositionsInFrame); tagPositionsInFrame = new ArrayList<>(); } - + boolean doParse; if (!skipUnusualTags) { doParse = true; diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java index 9ccb50bc2..c1503fbc5 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFOutputStream.java @@ -18,7 +18,47 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.tags.DefineBitsLosslessTag; import com.jpexs.decompiler.flash.tags.Tag; -import com.jpexs.decompiler.flash.types.*; +import com.jpexs.decompiler.flash.types.ALPHABITMAPDATA; +import com.jpexs.decompiler.flash.types.ARGB; +import com.jpexs.decompiler.flash.types.BITMAPDATA; +import com.jpexs.decompiler.flash.types.BUTTONCONDACTION; +import com.jpexs.decompiler.flash.types.BUTTONRECORD; +import com.jpexs.decompiler.flash.types.CLIPACTIONRECORD; +import com.jpexs.decompiler.flash.types.CLIPACTIONS; +import com.jpexs.decompiler.flash.types.CLIPEVENTFLAGS; +import com.jpexs.decompiler.flash.types.CXFORM; +import com.jpexs.decompiler.flash.types.CXFORMWITHALPHA; +import com.jpexs.decompiler.flash.types.FILLSTYLE; +import com.jpexs.decompiler.flash.types.FILLSTYLEARRAY; +import com.jpexs.decompiler.flash.types.FOCALGRADIENT; +import com.jpexs.decompiler.flash.types.GLYPHENTRY; +import com.jpexs.decompiler.flash.types.GRADIENT; +import com.jpexs.decompiler.flash.types.GRADRECORD; +import com.jpexs.decompiler.flash.types.KERNINGRECORD; +import com.jpexs.decompiler.flash.types.LANGCODE; +import com.jpexs.decompiler.flash.types.LINESTYLE; +import com.jpexs.decompiler.flash.types.LINESTYLE2; +import com.jpexs.decompiler.flash.types.LINESTYLEARRAY; +import com.jpexs.decompiler.flash.types.MATRIX; +import com.jpexs.decompiler.flash.types.MORPHFILLSTYLE; +import com.jpexs.decompiler.flash.types.MORPHFILLSTYLEARRAY; +import com.jpexs.decompiler.flash.types.MORPHGRADIENT; +import com.jpexs.decompiler.flash.types.MORPHGRADRECORD; +import com.jpexs.decompiler.flash.types.MORPHLINESTYLE; +import com.jpexs.decompiler.flash.types.MORPHLINESTYLE2; +import com.jpexs.decompiler.flash.types.MORPHLINESTYLEARRAY; +import com.jpexs.decompiler.flash.types.PIX15; +import com.jpexs.decompiler.flash.types.PIX24; +import com.jpexs.decompiler.flash.types.RECT; +import com.jpexs.decompiler.flash.types.RGB; +import com.jpexs.decompiler.flash.types.RGBA; +import com.jpexs.decompiler.flash.types.SHAPE; +import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; +import com.jpexs.decompiler.flash.types.SOUNDENVELOPE; +import com.jpexs.decompiler.flash.types.SOUNDINFO; +import com.jpexs.decompiler.flash.types.TEXTRECORD; +import com.jpexs.decompiler.flash.types.ZONEDATA; +import com.jpexs.decompiler.flash.types.ZONERECORD; import com.jpexs.decompiler.flash.types.filters.BEVELFILTER; import com.jpexs.decompiler.flash.types.filters.BLURFILTER; import com.jpexs.decompiler.flash.types.filters.COLORMATRIXFILTER; @@ -358,7 +398,7 @@ public class SWFOutputStream extends OutputStream { writeSB(nBits, yMax); alignByte(); } - + private int truncateTo31Bit(int value) { if (value > 0x3fffffff) { value = 0x3fffffff; diff --git a/trunk/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java b/trunk/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java index b62fa6572..f51f868f3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java +++ b/trunk/src/com/jpexs/decompiler/flash/ZippedSWFBundle.java @@ -48,7 +48,7 @@ public class ZippedSWFBundle implements SWFBundle { try { while ((entry = zip.getNextEntry()) != null) { if (entry.getName().toLowerCase().endsWith(".swf") - || entry.getName().toLowerCase().endsWith(".gfx")) { + || entry.getName().toLowerCase().endsWith(".gfx")) { keySet.add(entry.getName()); } //streamMap.put(, is) diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java index c39e7f915..62d7f3774 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -25,14 +25,33 @@ import com.jpexs.decompiler.flash.abc.avm2.UnknownInstructionCode; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallPropertyIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushStringIns; -import com.jpexs.decompiler.flash.abc.types.*; +import com.jpexs.decompiler.flash.abc.types.ABCException; +import com.jpexs.decompiler.flash.abc.types.ClassInfo; +import com.jpexs.decompiler.flash.abc.types.InstanceInfo; +import com.jpexs.decompiler.flash.abc.types.MetadataInfo; +import com.jpexs.decompiler.flash.abc.types.MethodBody; +import com.jpexs.decompiler.flash.abc.types.MethodInfo; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.abc.types.Namespace; +import com.jpexs.decompiler.flash.abc.types.NamespaceSet; +import com.jpexs.decompiler.flash.abc.types.ScriptInfo; import com.jpexs.decompiler.flash.abc.types.traits.Trait; import com.jpexs.decompiler.flash.abc.types.traits.TraitClass; import com.jpexs.decompiler.flash.abc.types.traits.TraitFunction; import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter; import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; import com.jpexs.decompiler.flash.abc.types.traits.Traits; -import com.jpexs.decompiler.flash.abc.usages.*; +import com.jpexs.decompiler.flash.abc.usages.ClassNameMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.ConstVarNameMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.ConstVarTypeMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.ExtendsMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.ImplementsMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.MethodBodyMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.MethodNameMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.MethodParamsMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.MethodReturnTypeMultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.MultinameUsage; +import com.jpexs.decompiler.flash.abc.usages.TypeNameMultinameUsage; import com.jpexs.decompiler.flash.helpers.HilightedTextWriter; import com.jpexs.decompiler.flash.helpers.collections.MyEntry; import com.jpexs.helpers.utf8.Utf8PrintWriter; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java index f7bce6b05..37a450086 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABCInputStream.java @@ -16,8 +16,18 @@ */ package com.jpexs.decompiler.flash.abc; -import com.jpexs.decompiler.flash.abc.types.*; -import com.jpexs.decompiler.flash.abc.types.traits.*; +import com.jpexs.decompiler.flash.abc.types.Decimal; +import com.jpexs.decompiler.flash.abc.types.InstanceInfo; +import com.jpexs.decompiler.flash.abc.types.MethodInfo; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.abc.types.Namespace; +import com.jpexs.decompiler.flash.abc.types.ValueKind; +import com.jpexs.decompiler.flash.abc.types.traits.Trait; +import com.jpexs.decompiler.flash.abc.types.traits.TraitClass; +import com.jpexs.decompiler.flash.abc.types.traits.TraitFunction; +import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter; +import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; +import com.jpexs.decompiler.flash.abc.types.traits.Traits; import com.jpexs.helpers.utf8.Utf8Helper; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java b/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java index 632ff6917..a64719f8b 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/ABCOutputStream.java @@ -16,8 +16,17 @@ */ package com.jpexs.decompiler.flash.abc; -import com.jpexs.decompiler.flash.abc.types.*; -import com.jpexs.decompiler.flash.abc.types.traits.*; +import com.jpexs.decompiler.flash.abc.types.Decimal; +import com.jpexs.decompiler.flash.abc.types.InstanceInfo; +import com.jpexs.decompiler.flash.abc.types.MethodInfo; +import com.jpexs.decompiler.flash.abc.types.Multiname; +import com.jpexs.decompiler.flash.abc.types.Namespace; +import com.jpexs.decompiler.flash.abc.types.traits.Trait; +import com.jpexs.decompiler.flash.abc.types.traits.TraitClass; +import com.jpexs.decompiler.flash.abc.types.traits.TraitFunction; +import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter; +import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst; +import com.jpexs.decompiler.flash.abc.types.traits.Traits; import com.jpexs.helpers.utf8.Utf8Helper; import java.io.IOException; import java.io.OutputStream; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index 75f996106..802bc269c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -39,27 +39,166 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy.Si8Ins; import com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy.Sxi16Ins; import com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy.Sxi1Ins; import com.jpexs.decompiler.flash.abc.avm2.instructions.alchemy.Sxi8Ins; -import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.*; -import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.*; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.AddIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.AddIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.DecrementIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.DecrementIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.DivideIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.IncrementIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.IncrementIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.ModuloIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.MultiplyIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.MultiplyIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.NegateIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.NegateIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.NotIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.SubtractIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.SubtractIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitAndIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitNotIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitOrIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.BitXorIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.LShiftIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.RShiftIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise.URShiftIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.EqualsIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.GreaterEqualsIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.GreaterThanIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.LessEqualsIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.LessThanIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.comparison.StrictEqualsIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.*; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.ConstructIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.ConstructPropIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.ConstructSuperIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.NewActivationIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.NewArrayIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.NewCatchIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.NewClassIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.NewFunctionIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.construction.NewObjectIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.debug.DebugFileIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.debug.DebugIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.debug.DebugLineIns; -import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.*; -import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.*; -import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.*; -import com.jpexs.decompiler.flash.abc.avm2.instructions.other.*; -import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.*; -import com.jpexs.decompiler.flash.abc.avm2.instructions.types.*; -import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.*; -import com.jpexs.decompiler.flash.abc.avm2.model.*; -import com.jpexs.decompiler.flash.abc.avm2.model.clauses.*; +import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallMethodIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallPropLexIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallPropVoidIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallPropertyIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallStaticIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallSuperIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.executing.CallSuperVoidIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfEqIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfFalseIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfGeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfGtIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfLeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfLtIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNGeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNGtIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNLeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNLtIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfNeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictEqIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfStrictNeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.IfTrueIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.JumpIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.jumps.LookupSwitchIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.DecLocalIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.DecLocalIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal0Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal1Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal2Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocal3Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocalIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.GetLocalTypeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.IncLocalIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.IncLocalIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.KillIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal0Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal1Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal2Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocal3Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocalIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.SetLocalTypeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.DeletePropertyIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.FindDefIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.FindPropertyIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.FindPropertyStrictIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetDescendantsIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetGlobalScopeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetGlobalSlotIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetLexIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetPropertyIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetScopeObjectIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetSlotIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetSuperIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.HasNext2Ins; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.HasNextIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.InIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.InitPropertyIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.LabelIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.NextNameIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.NextValueIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.NopIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ReturnValueIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ReturnVoidIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetGlobalSlotIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetPropertyIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetSlotIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.SetSuperIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.other.ThrowIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.DupIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopScopeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushByteIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushDoubleIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushFalseIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushIntIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNamespaceIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNanIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNullIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushScopeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushShortIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushStringIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushTrueIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushUIntIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushUndefinedIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushWithIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.SwapIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.ApplyTypeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.AsTypeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.AsTypeLateIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceAIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceSIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.ConvertBIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.ConvertDIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.ConvertIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.ConvertOIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.ConvertSIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.ConvertUIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.InstanceOfIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.IsTypeIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.IsTypeLateIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.types.TypeOfIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.CheckFilterIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.DXNSIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.DXNSLateIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.EscXAttrIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.xml.EscXElemIns; +import com.jpexs.decompiler.flash.abc.avm2.model.BooleanAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.HasNextAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.InitPropertyAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.LocalRegAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.NewFunctionAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.ReturnValueAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.ReturnVoidAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.SetLocalAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.SetPropertyAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.SetSlotAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.WithAVM2Item; +import com.jpexs.decompiler.flash.abc.avm2.model.clauses.DeclarationAVM2Item; import com.jpexs.decompiler.flash.abc.avm2.parser.ASM3Parser; import com.jpexs.decompiler.flash.abc.avm2.parser.ParseException; import com.jpexs.decompiler.flash.abc.types.ABCException; diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/Flasm3Lexer.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/Flasm3Lexer.java index eb7c51556..72af5aa8a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/Flasm3Lexer.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/Flasm3Lexer.java @@ -22,335 +22,345 @@ package com.jpexs.decompiler.flash.abc.avm2.parser; import java.util.Stack; /** - * This class is a scanner generated by - * JFlex 1.4.3 - * on 2013.12.14. 19:20 from the specification file + * This class is a scanner generated by + * JFlex 1.4.3 on 2013.12.14. 19:20 from the + * specification file * D:/Dropbox/Programovani/JavaSE/FFDec/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/flasm3.flex */ public final class Flasm3Lexer { - /** This character denotes the end of file */ - public static final int YYEOF = -1; + /** + * This character denotes the end of file + */ + public static final int YYEOF = -1; - /** initial size of the lookahead buffer */ - private static final int ZZ_BUFFERSIZE = 16384; + /** + * initial size of the lookahead buffer + */ + private static final int ZZ_BUFFERSIZE = 16384; - /** lexical states */ - public static final int STRING = 2; - public static final int YYINITIAL = 0; - public static final int PARAMETERS = 4; + /** + * lexical states + */ + public static final int STRING = 2; + public static final int YYINITIAL = 0; + public static final int PARAMETERS = 4; - /** - * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l - * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l - * at the beginning of a line - * l is of the form l = 2*k, k a non negative integer - */ - private static final int ZZ_LEXSTATE[] = { - 0, 0, 1, 1, 2, 2 - }; + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l at the + * beginning of a line l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0, 1, 1, 2, 2 + }; - /** - * Translates characters to character classes - */ - private static final String ZZ_CMAP_PACKED = - "\11\12\1\4\1\2\1\0\1\4\1\1\16\12\4\0\1\53\1\0"+ - "\1\76\1\0\1\11\2\0\1\111\1\101\1\102\1\0\1\24\1\107"+ - "\1\20\1\21\1\0\1\17\3\112\4\25\1\110\1\7\1\16\1\3"+ - "\1\103\1\0\1\104\2\0\1\47\1\70\1\31\1\54\1\22\1\62"+ - "\1\56\1\74\1\37\1\11\1\72\1\64\1\5\1\43\1\41\1\33"+ - "\1\77\1\51\1\45\1\35\1\66\1\105\1\11\1\27\1\60\1\11"+ - "\1\6\1\26\1\10\1\0\1\15\1\0\1\50\1\71\1\32\1\55"+ - "\1\23\1\63\1\57\1\75\1\40\1\14\1\73\1\65\1\13\1\44"+ - "\1\42\1\34\1\100\1\52\1\46\1\36\1\67\1\106\1\14\1\30"+ - "\1\61\1\14\4\0\41\12\2\0\4\11\4\0\1\11\2\0\1\12"+ - "\7\0\1\11\4\0\1\11\5\0\27\11\1\0\37\11\1\0\u01ca\11"+ - "\4\0\14\11\16\0\5\11\7\0\1\11\1\0\1\11\21\0\160\12"+ - "\5\11\1\0\2\11\2\0\4\11\10\0\1\11\1\0\3\11\1\0"+ - "\1\11\1\0\24\11\1\0\123\11\1\0\213\11\1\0\5\12\2\0"+ - "\236\11\11\0\46\11\2\0\1\11\7\0\47\11\11\0\55\12\1\0"+ - "\1\12\1\0\2\12\1\0\2\12\1\0\1\12\10\0\33\11\5\0"+ - "\3\11\15\0\4\12\7\0\1\11\4\0\13\12\5\0\53\11\37\12"+ - "\4\0\2\11\1\12\143\11\1\0\1\11\10\12\1\0\6\12\2\11"+ - "\2\12\1\0\4\12\2\11\12\12\3\11\2\0\1\11\17\0\1\12"+ - "\1\11\1\12\36\11\33\12\2\0\131\11\13\12\1\11\16\0\12\12"+ - "\41\11\11\12\2\11\4\0\1\11\5\0\26\11\4\12\1\11\11\12"+ - "\1\11\3\12\1\11\5\12\22\0\31\11\3\12\244\0\4\12\66\11"+ - "\3\12\1\11\22\12\1\11\7\12\12\11\2\12\2\0\12\12\1\0"+ - "\7\11\1\0\7\11\1\0\3\12\1\0\10\11\2\0\2\11\2\0"+ - "\26\11\1\0\7\11\1\0\1\11\3\0\4\11\2\0\1\12\1\11"+ - "\7\12\2\0\2\12\2\0\3\12\1\11\10\0\1\12\4\0\2\11"+ - "\1\0\3\11\2\12\2\0\12\12\4\11\7\0\1\11\5\0\3\12"+ - "\1\0\6\11\4\0\2\11\2\0\26\11\1\0\7\11\1\0\2\11"+ - "\1\0\2\11\1\0\2\11\2\0\1\12\1\0\5\12\4\0\2\12"+ - "\2\0\3\12\3\0\1\12\7\0\4\11\1\0\1\11\7\0\14\12"+ - "\3\11\1\12\13\0\3\12\1\0\11\11\1\0\3\11\1\0\26\11"+ - "\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11\10\12"+ - "\1\0\3\12\1\0\3\12\2\0\1\11\17\0\2\11\2\12\2\0"+ - "\12\12\1\0\1\11\17\0\3\12\1\0\10\11\2\0\2\11\2\0"+ - "\26\11\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11"+ - "\7\12\2\0\2\12\2\0\3\12\10\0\2\12\4\0\2\11\1\0"+ - "\3\11\2\12\2\0\12\12\1\0\1\11\20\0\1\12\1\11\1\0"+ - "\6\11\3\0\3\11\1\0\4\11\3\0\2\11\1\0\1\11\1\0"+ - "\2\11\3\0\2\11\3\0\3\11\3\0\14\11\4\0\5\12\3\0"+ - "\3\12\1\0\4\12\2\0\1\11\6\0\1\12\16\0\12\12\11\0"+ - "\1\11\7\0\3\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0"+ - "\12\11\1\0\5\11\3\0\1\11\7\12\1\0\3\12\1\0\4\12"+ - "\7\0\2\12\1\0\2\11\6\0\2\11\2\12\2\0\12\12\22\0"+ - "\2\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0\12\11\1\0"+ - "\5\11\2\0\1\12\1\11\7\12\1\0\3\12\1\0\4\12\7\0"+ - "\2\12\7\0\1\11\1\0\2\11\2\12\2\0\12\12\1\0\2\11"+ - "\17\0\2\12\1\0\10\11\1\0\3\11\1\0\51\11\2\0\1\11"+ - "\7\12\1\0\3\12\1\0\4\12\1\11\10\0\1\12\10\0\2\11"+ - "\2\12\2\0\12\12\12\0\6\11\2\0\2\12\1\0\22\11\3\0"+ - "\30\11\1\0\11\11\1\0\1\11\2\0\7\11\3\0\1\12\4\0"+ - "\6\12\1\0\1\12\1\0\10\12\22\0\2\12\15\0\60\11\1\12"+ - "\2\11\7\12\4\0\10\11\10\12\1\0\12\12\47\0\2\11\1\0"+ - "\1\11\2\0\2\11\1\0\1\11\2\0\1\11\6\0\4\11\1\0"+ - "\7\11\1\0\3\11\1\0\1\11\1\0\1\11\2\0\2\11\1\0"+ - "\4\11\1\12\2\11\6\12\1\0\2\12\1\11\2\0\5\11\1\0"+ - "\1\11\1\0\6\12\2\0\12\12\2\0\2\11\42\0\1\11\27\0"+ - "\2\12\6\0\12\12\13\0\1\12\1\0\1\12\1\0\1\12\4\0"+ - "\2\12\10\11\1\0\44\11\4\0\24\12\1\0\2\12\5\11\13\12"+ - "\1\0\44\12\11\0\1\12\71\0\53\11\24\12\1\11\12\12\6\0"+ - "\6\11\4\12\4\11\3\12\1\11\3\12\2\11\7\12\3\11\4\12"+ - "\15\11\14\12\1\11\17\12\2\0\46\11\12\0\53\11\1\0\1\11"+ - "\3\0\u0149\11\1\0\4\11\2\0\7\11\1\0\1\11\1\0\4\11"+ - "\2\0\51\11\1\0\4\11\2\0\41\11\1\0\4\11\2\0\7\11"+ - "\1\0\1\11\1\0\4\11\2\0\17\11\1\0\71\11\1\0\4\11"+ - "\2\0\103\11\2\0\3\12\40\0\20\11\20\0\125\11\14\0\u026c\11"+ - "\2\0\21\11\1\0\32\11\5\0\113\11\3\0\3\11\17\0\15\11"+ - "\1\0\4\11\3\12\13\0\22\11\3\12\13\0\22\11\2\12\14\0"+ - "\15\11\1\0\3\11\1\0\2\12\14\0\64\11\40\12\3\0\1\11"+ - "\3\0\2\11\1\12\2\0\12\12\41\0\3\12\2\0\12\12\6\0"+ - "\130\11\10\0\51\11\1\12\1\11\5\0\106\11\12\0\35\11\3\0"+ - "\14\12\4\0\14\12\12\0\12\12\36\11\2\0\5\11\13\0\54\11"+ - "\4\0\21\12\7\11\2\12\6\0\12\12\46\0\27\11\5\12\4\0"+ - "\65\11\12\12\1\0\35\12\2\0\13\12\6\0\12\12\15\0\1\11"+ - "\130\0\5\12\57\11\21\12\7\11\4\0\12\12\21\0\11\12\14\0"+ - "\3\12\36\11\12\12\3\0\2\11\12\12\6\0\46\11\16\12\14\0"+ - "\44\11\24\12\10\0\12\12\3\0\3\11\12\12\44\11\122\0\3\12"+ - "\1\0\25\12\4\11\1\12\4\11\1\12\15\0\300\11\47\12\25\0"+ - "\4\12\u0116\11\2\0\6\11\2\0\46\11\2\0\6\11\2\0\10\11"+ - "\1\0\1\11\1\0\1\11\1\0\1\11\1\0\37\11\2\0\65\11"+ - "\1\0\7\11\1\0\1\11\3\0\3\11\1\0\7\11\3\0\4\11"+ - "\2\0\6\11\4\0\15\11\5\0\3\11\1\0\7\11\16\0\5\12"+ - "\32\0\5\12\20\0\2\11\23\0\1\11\13\0\5\12\5\0\6\12"+ - "\1\0\1\11\15\0\1\11\20\0\15\11\3\0\32\11\26\0\15\12"+ - "\4\0\1\12\3\0\14\12\21\0\1\11\4\0\1\11\2\0\12\11"+ - "\1\0\1\11\3\0\5\11\6\0\1\11\1\0\1\11\1\0\1\11"+ - "\1\0\4\11\1\0\13\11\2\0\4\11\5\0\5\11\4\0\1\11"+ - "\21\0\51\11\u0a77\0\57\11\1\0\57\11\1\0\205\11\6\0\4\11"+ - "\3\12\16\0\46\11\12\0\66\11\11\0\1\11\17\0\1\12\27\11"+ - "\11\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11"+ - "\1\0\7\11\1\0\7\11\1\0\7\11\1\0\40\12\57\0\1\11"+ - "\u01d5\0\3\11\31\0\11\11\6\12\1\0\5\11\2\0\5\11\4\0"+ - "\126\11\2\0\2\12\2\0\3\11\1\0\132\11\1\0\4\11\5\0"+ - "\51\11\3\0\136\11\21\0\33\11\65\0\20\11\u0200\0\u19b6\11\112\0"+ - "\u51cc\11\64\0\u048d\11\103\0\56\11\2\0\u010d\11\3\0\20\11\12\12"+ - "\2\11\24\0\57\11\1\12\14\0\2\12\1\0\31\11\10\0\120\11"+ - "\2\12\45\0\11\11\2\0\147\11\2\0\4\11\1\0\2\11\16\0"+ - "\12\11\120\0\10\11\1\12\3\11\1\12\4\11\1\12\27\11\5\12"+ - "\20\0\1\11\7\0\64\11\14\0\2\12\62\11\21\12\13\0\12\12"+ - "\6\0\22\12\6\11\3\0\1\11\4\0\12\12\34\11\10\12\2\0"+ - "\27\11\15\12\14\0\35\11\3\0\4\12\57\11\16\12\16\0\1\11"+ - "\12\12\46\0\51\11\16\12\11\0\3\11\1\12\10\11\2\12\2\0"+ - "\12\12\6\0\27\11\3\0\1\11\1\12\4\0\60\11\1\12\1\11"+ - "\3\12\2\11\2\12\5\11\2\12\1\11\1\12\1\11\30\0\3\11"+ - "\43\0\6\11\2\0\6\11\2\0\6\11\11\0\7\11\1\0\7\11"+ - "\221\0\43\11\10\12\1\0\2\12\2\0\12\12\6\0\u2ba4\11\14\0"+ - "\27\11\4\0\61\11\u2104\0\u012e\11\2\0\76\11\2\0\152\11\46\0"+ - "\7\11\14\0\5\11\5\0\1\11\1\12\12\11\1\0\15\11\1\0"+ - "\5\11\1\0\1\11\1\0\2\11\1\0\2\11\1\0\154\11\41\0"+ - "\u016b\11\22\0\100\11\2\0\66\11\50\0\15\11\3\0\20\12\20\0"+ - "\7\12\14\0\2\11\30\0\3\11\31\0\1\11\6\0\5\11\1\0"+ - "\207\11\2\0\1\12\4\0\1\11\13\0\12\12\7\0\32\11\4\0"+ - "\1\11\1\0\32\11\13\0\131\11\3\0\6\11\2\0\6\11\2\0"+ - "\6\11\2\0\3\11\3\0\2\11\3\0\2\11\22\0\3\12\4\0"; + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED + = "\11\12\1\4\1\2\1\0\1\4\1\1\16\12\4\0\1\53\1\0" + + "\1\76\1\0\1\11\2\0\1\111\1\101\1\102\1\0\1\24\1\107" + + "\1\20\1\21\1\0\1\17\3\112\4\25\1\110\1\7\1\16\1\3" + + "\1\103\1\0\1\104\2\0\1\47\1\70\1\31\1\54\1\22\1\62" + + "\1\56\1\74\1\37\1\11\1\72\1\64\1\5\1\43\1\41\1\33" + + "\1\77\1\51\1\45\1\35\1\66\1\105\1\11\1\27\1\60\1\11" + + "\1\6\1\26\1\10\1\0\1\15\1\0\1\50\1\71\1\32\1\55" + + "\1\23\1\63\1\57\1\75\1\40\1\14\1\73\1\65\1\13\1\44" + + "\1\42\1\34\1\100\1\52\1\46\1\36\1\67\1\106\1\14\1\30" + + "\1\61\1\14\4\0\41\12\2\0\4\11\4\0\1\11\2\0\1\12" + + "\7\0\1\11\4\0\1\11\5\0\27\11\1\0\37\11\1\0\u01ca\11" + + "\4\0\14\11\16\0\5\11\7\0\1\11\1\0\1\11\21\0\160\12" + + "\5\11\1\0\2\11\2\0\4\11\10\0\1\11\1\0\3\11\1\0" + + "\1\11\1\0\24\11\1\0\123\11\1\0\213\11\1\0\5\12\2\0" + + "\236\11\11\0\46\11\2\0\1\11\7\0\47\11\11\0\55\12\1\0" + + "\1\12\1\0\2\12\1\0\2\12\1\0\1\12\10\0\33\11\5\0" + + "\3\11\15\0\4\12\7\0\1\11\4\0\13\12\5\0\53\11\37\12" + + "\4\0\2\11\1\12\143\11\1\0\1\11\10\12\1\0\6\12\2\11" + + "\2\12\1\0\4\12\2\11\12\12\3\11\2\0\1\11\17\0\1\12" + + "\1\11\1\12\36\11\33\12\2\0\131\11\13\12\1\11\16\0\12\12" + + "\41\11\11\12\2\11\4\0\1\11\5\0\26\11\4\12\1\11\11\12" + + "\1\11\3\12\1\11\5\12\22\0\31\11\3\12\244\0\4\12\66\11" + + "\3\12\1\11\22\12\1\11\7\12\12\11\2\12\2\0\12\12\1\0" + + "\7\11\1\0\7\11\1\0\3\12\1\0\10\11\2\0\2\11\2\0" + + "\26\11\1\0\7\11\1\0\1\11\3\0\4\11\2\0\1\12\1\11" + + "\7\12\2\0\2\12\2\0\3\12\1\11\10\0\1\12\4\0\2\11" + + "\1\0\3\11\2\12\2\0\12\12\4\11\7\0\1\11\5\0\3\12" + + "\1\0\6\11\4\0\2\11\2\0\26\11\1\0\7\11\1\0\2\11" + + "\1\0\2\11\1\0\2\11\2\0\1\12\1\0\5\12\4\0\2\12" + + "\2\0\3\12\3\0\1\12\7\0\4\11\1\0\1\11\7\0\14\12" + + "\3\11\1\12\13\0\3\12\1\0\11\11\1\0\3\11\1\0\26\11" + + "\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11\10\12" + + "\1\0\3\12\1\0\3\12\2\0\1\11\17\0\2\11\2\12\2\0" + + "\12\12\1\0\1\11\17\0\3\12\1\0\10\11\2\0\2\11\2\0" + + "\26\11\1\0\7\11\1\0\2\11\1\0\5\11\2\0\1\12\1\11" + + "\7\12\2\0\2\12\2\0\3\12\10\0\2\12\4\0\2\11\1\0" + + "\3\11\2\12\2\0\12\12\1\0\1\11\20\0\1\12\1\11\1\0" + + "\6\11\3\0\3\11\1\0\4\11\3\0\2\11\1\0\1\11\1\0" + + "\2\11\3\0\2\11\3\0\3\11\3\0\14\11\4\0\5\12\3\0" + + "\3\12\1\0\4\12\2\0\1\11\6\0\1\12\16\0\12\12\11\0" + + "\1\11\7\0\3\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0" + + "\12\11\1\0\5\11\3\0\1\11\7\12\1\0\3\12\1\0\4\12" + + "\7\0\2\12\1\0\2\11\6\0\2\11\2\12\2\0\12\12\22\0" + + "\2\12\1\0\10\11\1\0\3\11\1\0\27\11\1\0\12\11\1\0" + + "\5\11\2\0\1\12\1\11\7\12\1\0\3\12\1\0\4\12\7\0" + + "\2\12\7\0\1\11\1\0\2\11\2\12\2\0\12\12\1\0\2\11" + + "\17\0\2\12\1\0\10\11\1\0\3\11\1\0\51\11\2\0\1\11" + + "\7\12\1\0\3\12\1\0\4\12\1\11\10\0\1\12\10\0\2\11" + + "\2\12\2\0\12\12\12\0\6\11\2\0\2\12\1\0\22\11\3\0" + + "\30\11\1\0\11\11\1\0\1\11\2\0\7\11\3\0\1\12\4\0" + + "\6\12\1\0\1\12\1\0\10\12\22\0\2\12\15\0\60\11\1\12" + + "\2\11\7\12\4\0\10\11\10\12\1\0\12\12\47\0\2\11\1\0" + + "\1\11\2\0\2\11\1\0\1\11\2\0\1\11\6\0\4\11\1\0" + + "\7\11\1\0\3\11\1\0\1\11\1\0\1\11\2\0\2\11\1\0" + + "\4\11\1\12\2\11\6\12\1\0\2\12\1\11\2\0\5\11\1\0" + + "\1\11\1\0\6\12\2\0\12\12\2\0\2\11\42\0\1\11\27\0" + + "\2\12\6\0\12\12\13\0\1\12\1\0\1\12\1\0\1\12\4\0" + + "\2\12\10\11\1\0\44\11\4\0\24\12\1\0\2\12\5\11\13\12" + + "\1\0\44\12\11\0\1\12\71\0\53\11\24\12\1\11\12\12\6\0" + + "\6\11\4\12\4\11\3\12\1\11\3\12\2\11\7\12\3\11\4\12" + + "\15\11\14\12\1\11\17\12\2\0\46\11\12\0\53\11\1\0\1\11" + + "\3\0\u0149\11\1\0\4\11\2\0\7\11\1\0\1\11\1\0\4\11" + + "\2\0\51\11\1\0\4\11\2\0\41\11\1\0\4\11\2\0\7\11" + + "\1\0\1\11\1\0\4\11\2\0\17\11\1\0\71\11\1\0\4\11" + + "\2\0\103\11\2\0\3\12\40\0\20\11\20\0\125\11\14\0\u026c\11" + + "\2\0\21\11\1\0\32\11\5\0\113\11\3\0\3\11\17\0\15\11" + + "\1\0\4\11\3\12\13\0\22\11\3\12\13\0\22\11\2\12\14\0" + + "\15\11\1\0\3\11\1\0\2\12\14\0\64\11\40\12\3\0\1\11" + + "\3\0\2\11\1\12\2\0\12\12\41\0\3\12\2\0\12\12\6\0" + + "\130\11\10\0\51\11\1\12\1\11\5\0\106\11\12\0\35\11\3\0" + + "\14\12\4\0\14\12\12\0\12\12\36\11\2\0\5\11\13\0\54\11" + + "\4\0\21\12\7\11\2\12\6\0\12\12\46\0\27\11\5\12\4\0" + + "\65\11\12\12\1\0\35\12\2\0\13\12\6\0\12\12\15\0\1\11" + + "\130\0\5\12\57\11\21\12\7\11\4\0\12\12\21\0\11\12\14\0" + + "\3\12\36\11\12\12\3\0\2\11\12\12\6\0\46\11\16\12\14\0" + + "\44\11\24\12\10\0\12\12\3\0\3\11\12\12\44\11\122\0\3\12" + + "\1\0\25\12\4\11\1\12\4\11\1\12\15\0\300\11\47\12\25\0" + + "\4\12\u0116\11\2\0\6\11\2\0\46\11\2\0\6\11\2\0\10\11" + + "\1\0\1\11\1\0\1\11\1\0\1\11\1\0\37\11\2\0\65\11" + + "\1\0\7\11\1\0\1\11\3\0\3\11\1\0\7\11\3\0\4\11" + + "\2\0\6\11\4\0\15\11\5\0\3\11\1\0\7\11\16\0\5\12" + + "\32\0\5\12\20\0\2\11\23\0\1\11\13\0\5\12\5\0\6\12" + + "\1\0\1\11\15\0\1\11\20\0\15\11\3\0\32\11\26\0\15\12" + + "\4\0\1\12\3\0\14\12\21\0\1\11\4\0\1\11\2\0\12\11" + + "\1\0\1\11\3\0\5\11\6\0\1\11\1\0\1\11\1\0\1\11" + + "\1\0\4\11\1\0\13\11\2\0\4\11\5\0\5\11\4\0\1\11" + + "\21\0\51\11\u0a77\0\57\11\1\0\57\11\1\0\205\11\6\0\4\11" + + "\3\12\16\0\46\11\12\0\66\11\11\0\1\11\17\0\1\12\27\11" + + "\11\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11" + + "\1\0\7\11\1\0\7\11\1\0\7\11\1\0\40\12\57\0\1\11" + + "\u01d5\0\3\11\31\0\11\11\6\12\1\0\5\11\2\0\5\11\4\0" + + "\126\11\2\0\2\12\2\0\3\11\1\0\132\11\1\0\4\11\5\0" + + "\51\11\3\0\136\11\21\0\33\11\65\0\20\11\u0200\0\u19b6\11\112\0" + + "\u51cc\11\64\0\u048d\11\103\0\56\11\2\0\u010d\11\3\0\20\11\12\12" + + "\2\11\24\0\57\11\1\12\14\0\2\12\1\0\31\11\10\0\120\11" + + "\2\12\45\0\11\11\2\0\147\11\2\0\4\11\1\0\2\11\16\0" + + "\12\11\120\0\10\11\1\12\3\11\1\12\4\11\1\12\27\11\5\12" + + "\20\0\1\11\7\0\64\11\14\0\2\12\62\11\21\12\13\0\12\12" + + "\6\0\22\12\6\11\3\0\1\11\4\0\12\12\34\11\10\12\2\0" + + "\27\11\15\12\14\0\35\11\3\0\4\12\57\11\16\12\16\0\1\11" + + "\12\12\46\0\51\11\16\12\11\0\3\11\1\12\10\11\2\12\2\0" + + "\12\12\6\0\27\11\3\0\1\11\1\12\4\0\60\11\1\12\1\11" + + "\3\12\2\11\2\12\5\11\2\12\1\11\1\12\1\11\30\0\3\11" + + "\43\0\6\11\2\0\6\11\2\0\6\11\11\0\7\11\1\0\7\11" + + "\221\0\43\11\10\12\1\0\2\12\2\0\12\12\6\0\u2ba4\11\14\0" + + "\27\11\4\0\61\11\u2104\0\u012e\11\2\0\76\11\2\0\152\11\46\0" + + "\7\11\14\0\5\11\5\0\1\11\1\12\12\11\1\0\15\11\1\0" + + "\5\11\1\0\1\11\1\0\2\11\1\0\2\11\1\0\154\11\41\0" + + "\u016b\11\22\0\100\11\2\0\66\11\50\0\15\11\3\0\20\12\20\0" + + "\7\12\14\0\2\11\30\0\3\11\31\0\1\11\6\0\5\11\1\0" + + "\207\11\2\0\1\12\4\0\1\11\13\0\12\12\7\0\32\11\4\0" + + "\1\11\1\0\32\11\13\0\131\11\3\0\6\11\2\0\6\11\2\0" + + "\6\11\2\0\3\11\3\0\2\11\3\0\2\11\22\0\3\12\4\0"; - /** - * Translates characters to character classes - */ - private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + /** + * Translates characters to character classes + */ + private static final char[] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); - /** - * Translates DFA states to action switch labels. - */ - private static final int [] ZZ_ACTION = zzUnpackAction(); + /** + * Translates DFA states to action switch labels. + */ + private static final int[] ZZ_ACTION = zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 = - "\3\0\4\1\2\2\1\1\1\2\1\1\1\2\1\1"+ - "\1\2\1\1\1\2\1\1\1\2\1\1\1\2\1\1"+ - "\1\2\1\1\1\2\1\1\1\2\1\1\1\2\1\1"+ - "\1\2\1\3\2\4\1\1\1\5\2\6\1\7\1\10"+ - "\1\11\1\12\1\13\1\10\1\12\2\1\16\10\1\14"+ - "\1\10\1\15\1\16\1\17\1\20\1\10\1\21\1\0"+ - "\1\22\2\0\2\2\1\0\1\2\1\0\1\2\1\0"+ - "\1\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0"+ - "\1\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0"+ - "\1\2\1\23\2\24\1\25\1\26\1\27\1\30\1\31"+ - "\1\32\1\33\1\34\1\0\2\10\1\35\1\0\1\35"+ - "\1\0\5\10\1\36\33\10\2\0\2\2\1\0\1\2"+ - "\1\0\1\2\1\0\1\2\1\0\1\37\1\2\1\37"+ - "\1\0\1\2\1\0\1\2\1\0\1\2\1\0\1\2"+ - "\1\0\1\2\1\0\1\2\1\0\1\2\1\24\1\0"+ - "\2\10\1\35\1\0\41\10\2\0\2\2\1\0\1\2"+ - "\2\40\1\0\1\2\1\0\1\2\1\0\1\2\1\0"+ - "\1\2\2\41\1\0\1\2\2\42\1\0\1\2\2\43"+ - "\1\0\12\10\1\44\1\45\4\10\1\46\1\47\3\10"+ - "\1\50\7\10\1\51\1\10\1\52\5\10\3\0\3\2"+ - "\1\0\1\2\2\53\2\54\1\0\1\2\1\0\1\2"+ - "\1\0\1\2\1\0\1\2\1\55\4\10\1\56\1\57"+ - "\23\10\1\60\1\61\5\10\1\62\1\63\1\64\2\0"+ - "\1\64\2\2\1\0\1\2\1\0\1\2\1\0\1\2"+ - "\1\0\1\2\1\0\1\2\1\0\1\2\1\10\1\64"+ - "\5\10\1\65\10\10\1\66\1\10\1\67\2\10\1\70"+ - "\1\71\1\72\5\10\1\73\2\0\2\2\1\0\1\2"+ - "\1\0\1\2\1\0\1\2\1\0\1\2\2\74\1\0"+ - "\1\2\7\10\1\75\10\10\1\76\1\77\5\10\1\0"+ - "\1\100\1\2\1\100\1\0\1\2\1\0\1\2\1\0"+ - "\1\2\2\101\1\0\1\2\1\102\1\10\1\103\4\10"+ - "\1\104\1\10\1\105\4\10\1\106\1\10\1\107\1\110"+ - "\1\111\1\112\3\10\1\0\1\2\1\0\1\2\2\113"+ - "\1\0\1\2\1\0\1\2\1\114\10\10\1\115\1\116"+ - "\1\10\1\117\1\120\2\10\1\0\1\2\3\0\3\2"+ - "\1\0\1\2\2\121\1\122\1\123\13\10\1\0\1\2"+ - "\3\0\3\2\1\0\1\2\1\124\5\10\1\125\5\10"+ - "\1\0\1\2\3\0\3\2\1\0\1\2\11\10\1\126"+ - "\2\127\3\0\2\2\1\0\1\2\11\10\4\0\2\2"+ - "\2\130\6\10\1\131\2\10\1\132\2\0\1\2\5\10"+ - "\1\133\1\10\1\134\3\0\2\10\1\135\1\136\2\10"+ - "\2\0\1\137\1\140\1\141\1\10\1\142\1\143\1\144"; + private static final String ZZ_ACTION_PACKED_0 + = "\3\0\4\1\2\2\1\1\1\2\1\1\1\2\1\1" + + "\1\2\1\1\1\2\1\1\1\2\1\1\1\2\1\1" + + "\1\2\1\1\1\2\1\1\1\2\1\1\1\2\1\1" + + "\1\2\1\3\2\4\1\1\1\5\2\6\1\7\1\10" + + "\1\11\1\12\1\13\1\10\1\12\2\1\16\10\1\14" + + "\1\10\1\15\1\16\1\17\1\20\1\10\1\21\1\0" + + "\1\22\2\0\2\2\1\0\1\2\1\0\1\2\1\0" + + "\1\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0" + + "\1\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0" + + "\1\2\1\23\2\24\1\25\1\26\1\27\1\30\1\31" + + "\1\32\1\33\1\34\1\0\2\10\1\35\1\0\1\35" + + "\1\0\5\10\1\36\33\10\2\0\2\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\0\1\37\1\2\1\37" + + "\1\0\1\2\1\0\1\2\1\0\1\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\0\1\2\1\24\1\0" + + "\2\10\1\35\1\0\41\10\2\0\2\2\1\0\1\2" + + "\2\40\1\0\1\2\1\0\1\2\1\0\1\2\1\0" + + "\1\2\2\41\1\0\1\2\2\42\1\0\1\2\2\43" + + "\1\0\12\10\1\44\1\45\4\10\1\46\1\47\3\10" + + "\1\50\7\10\1\51\1\10\1\52\5\10\3\0\3\2" + + "\1\0\1\2\2\53\2\54\1\0\1\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\55\4\10\1\56\1\57" + + "\23\10\1\60\1\61\5\10\1\62\1\63\1\64\2\0" + + "\1\64\2\2\1\0\1\2\1\0\1\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\0\1\2\1\10\1\64" + + "\5\10\1\65\10\10\1\66\1\10\1\67\2\10\1\70" + + "\1\71\1\72\5\10\1\73\2\0\2\2\1\0\1\2" + + "\1\0\1\2\1\0\1\2\1\0\1\2\2\74\1\0" + + "\1\2\7\10\1\75\10\10\1\76\1\77\5\10\1\0" + + "\1\100\1\2\1\100\1\0\1\2\1\0\1\2\1\0" + + "\1\2\2\101\1\0\1\2\1\102\1\10\1\103\4\10" + + "\1\104\1\10\1\105\4\10\1\106\1\10\1\107\1\110" + + "\1\111\1\112\3\10\1\0\1\2\1\0\1\2\2\113" + + "\1\0\1\2\1\0\1\2\1\114\10\10\1\115\1\116" + + "\1\10\1\117\1\120\2\10\1\0\1\2\3\0\3\2" + + "\1\0\1\2\2\121\1\122\1\123\13\10\1\0\1\2" + + "\3\0\3\2\1\0\1\2\1\124\5\10\1\125\5\10" + + "\1\0\1\2\3\0\3\2\1\0\1\2\11\10\1\126" + + "\2\127\3\0\2\2\1\0\1\2\11\10\4\0\2\2" + + "\2\130\6\10\1\131\2\10\1\132\2\0\1\2\5\10" + + "\1\133\1\10\1\134\3\0\2\10\1\135\1\136\2\10" + + "\2\0\1\137\1\140\1\141\1\10\1\142\1\143\1\144"; - private static int [] zzUnpackAction() { - int [] result = new int[616]; - int offset = 0; - offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAction(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); + private static int[] zzUnpackAction() { + int[] result = new int[616]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; } - return j; - } + private static int zzUnpackAction(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ - /** - * Translates a state to a row index in the transition table - */ - private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); + int j = offset; /* index in unpacked array */ - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\113\0\226\0\341\0\u012c\0\u0177\0\u01c2\0\u020d"+ - "\0\u0258\0\u02a3\0\u02ee\0\u0339\0\u0384\0\u03cf\0\u041a\0\u0465"+ - "\0\u04b0\0\u04fb\0\u0546\0\u0591\0\u05dc\0\u0627\0\u0672\0\u06bd"+ - "\0\u0708\0\u0753\0\u079e\0\u07e9\0\u0834\0\u087f\0\u08ca\0\u0915"+ - "\0\u0960\0\341\0\u09ab\0\341\0\u09f6\0\341\0\u0a41\0\u0a8c"+ - "\0\341\0\u0ad7\0\341\0\u0b22\0\u0b6d\0\u0bb8\0\u0c03\0\u0c4e"+ - "\0\u0c99\0\u0ce4\0\u0d2f\0\u0d7a\0\u0dc5\0\u0e10\0\u0e5b\0\u0ea6"+ - "\0\u0ef1\0\u0f3c\0\u0f87\0\u0fd2\0\u101d\0\341\0\u1068\0\341"+ - "\0\341\0\341\0\341\0\u10b3\0\341\0\u01c2\0\341\0\u10fe"+ - "\0\u1149\0\u1194\0\u11df\0\u122a\0\u1275\0\u12c0\0\u130b\0\u1356"+ - "\0\u13a1\0\u13ec\0\u1437\0\u1482\0\u14cd\0\u1518\0\u1563\0\u15ae"+ - "\0\u15f9\0\u1644\0\u168f\0\u16da\0\u1725\0\u1770\0\u17bb\0\u1806"+ - "\0\u1851\0\341\0\u189c\0\u18e7\0\341\0\341\0\341\0\341"+ - "\0\341\0\341\0\341\0\341\0\u1932\0\u197d\0\u19c8\0\u1a13"+ - "\0\u1a5e\0\u0b6d\0\u0c03\0\u1aa9\0\u1af4\0\u1b3f\0\u1b8a\0\u1bd5"+ - "\0\u0b22\0\u1c20\0\u1c6b\0\u1cb6\0\u1d01\0\u1d4c\0\u1d97\0\u1de2"+ - "\0\u1e2d\0\u1e78\0\u1ec3\0\u1f0e\0\u1f59\0\u1fa4\0\u1fef\0\u203a"+ - "\0\u2085\0\u20d0\0\u211b\0\u2166\0\u21b1\0\u21fc\0\u2247\0\u2292"+ - "\0\u22dd\0\u2328\0\u2373\0\u23be\0\u2409\0\u2454\0\u249f\0\u24ea"+ - "\0\u2535\0\u2580\0\u25cb\0\u2616\0\u2661\0\u26ac\0\u26f7\0\u01c2"+ - "\0\u2742\0\u0258\0\u278d\0\u27d8\0\u2823\0\u286e\0\u28b9\0\u2904"+ - "\0\u294f\0\u299a\0\u29e5\0\u2a30\0\u2a7b\0\u2ac6\0\u2b11\0\u2b5c"+ - "\0\341\0\u2ba7\0\u2bf2\0\u2c3d\0\u2c88\0\u2c88\0\u2cd3\0\u2d1e"+ - "\0\u2d69\0\u2db4\0\u2dff\0\u2e4a\0\u2e95\0\u2ee0\0\u2f2b\0\u2f76"+ - "\0\u2fc1\0\u300c\0\u3057\0\u30a2\0\u30ed\0\u3138\0\u3183\0\u31ce"+ - "\0\u3219\0\u3264\0\u32af\0\u32fa\0\u3345\0\u3390\0\u33db\0\u3426"+ - "\0\u3471\0\u34bc\0\u3507\0\u3552\0\u359d\0\u35e8\0\u3633\0\u367e"+ - "\0\u36c9\0\u3714\0\u375f\0\u37aa\0\u37f5\0\u01c2\0\u0258\0\u3840"+ - "\0\u388b\0\u38d6\0\u3921\0\u396c\0\u39b7\0\u3a02\0\u3a4d\0\u01c2"+ - "\0\u0258\0\u3a98\0\u3ae3\0\u01c2\0\u0258\0\u3b2e\0\u3b79\0\u01c2"+ - "\0\u0258\0\u3bc4\0\u3c0f\0\u3c5a\0\u3ca5\0\u3cf0\0\u3d3b\0\u3d86"+ - "\0\u3dd1\0\u3e1c\0\u3e67\0\u3eb2\0\u0b22\0\u3efd\0\u3f48\0\u3f93"+ - "\0\u3fde\0\u4029\0\u4074\0\u0b22\0\u40bf\0\u410a\0\u4155\0\u41a0"+ - "\0\u41eb\0\u4236\0\u4281\0\u42cc\0\u4317\0\u4362\0\u43ad\0\u0b22"+ - "\0\u43f8\0\u0b22\0\u4443\0\u448e\0\u44d9\0\u4524\0\u456f\0\u45ba"+ - "\0\u4605\0\u4650\0\u469b\0\u46e6\0\u4731\0\u477c\0\u47c7\0\u4812"+ - "\0\u485d\0\u01c2\0\u0258\0\u48a8\0\u48f3\0\u493e\0\u4989\0\u49d4"+ - "\0\u4a1f\0\u4a6a\0\u4ab5\0\341\0\u4b00\0\u4b4b\0\u4b96\0\u4be1"+ - "\0\u0b22\0\u0b22\0\u4c2c\0\u4c77\0\u4cc2\0\u4d0d\0\u4d58\0\u4da3"+ - "\0\u4dee\0\u4e39\0\u4e84\0\u4ecf\0\u4f1a\0\u4f65\0\u4fb0\0\u4ffb"+ - "\0\u5046\0\u5091\0\u50dc\0\u5127\0\u5172\0\u0b22\0\u0b22\0\u51bd"+ - "\0\u5208\0\u5253\0\u529e\0\u52e9\0\u5334\0\u0b22\0\u01c2\0\u537f"+ - "\0\u53ca\0\u0258\0\u5415\0\u5460\0\u54ab\0\u54f6\0\u5541\0\u558c"+ - "\0\u55d7\0\u5622\0\u566d\0\u56b8\0\u5703\0\u574e\0\u5799\0\u57e4"+ - "\0\u582f\0\u0b22\0\u587a\0\u58c5\0\u5910\0\u595b\0\u59a6\0\u0b22"+ - "\0\u59f1\0\u5a3c\0\u5a87\0\u5ad2\0\u5b1d\0\u5b68\0\u5bb3\0\u5bfe"+ - "\0\u0b22\0\u5c49\0\u0b22\0\u5c94\0\u5cdf\0\u0b22\0\u0b22\0\u0b22"+ - "\0\u5d2a\0\u5d75\0\u5dc0\0\u5e0b\0\u5e56\0\u0b22\0\u5ea1\0\u5eec"+ - "\0\u5f37\0\u5f82\0\u5fcd\0\u6018\0\u6063\0\u60ae\0\u60f9\0\u6144"+ - "\0\u618f\0\u61da\0\u01c2\0\u0258\0\u6225\0\u6270\0\u62bb\0\u6306"+ - "\0\u6351\0\u639c\0\u63e7\0\u6432\0\u647d\0\u0b22\0\u64c8\0\u6513"+ - "\0\u655e\0\u65a9\0\u65f4\0\u663f\0\u668a\0\u66d5\0\u6720\0\u0b22"+ - "\0\u676b\0\u67b6\0\u6801\0\u684c\0\u6897\0\u68e2\0\u01c2\0\u692d"+ - "\0\u0258\0\u6978\0\u69c3\0\u6a0e\0\u6a59\0\u6aa4\0\u6aef\0\u01c2"+ - "\0\u0258\0\u6b3a\0\u6b85\0\u0b22\0\u6bd0\0\u6c1b\0\u6c66\0\u6cb1"+ - "\0\u6cfc\0\u6d47\0\u0b22\0\u6d92\0\u0b22\0\u6ddd\0\u6e28\0\u6e73"+ - "\0\u6ebe\0\u0b22\0\u6f09\0\u0b22\0\u6f54\0\u0b22\0\u0b22\0\u6f9f"+ - "\0\u6fea\0\u7035\0\u7080\0\u70cb\0\u7116\0\u7161\0\u01c2\0\u0258"+ - "\0\u71ac\0\u71f7\0\u7242\0\u728d\0\u72d8\0\u7323\0\u736e\0\u73b9"+ - "\0\u7404\0\u744f\0\u749a\0\u74e5\0\u7530\0\u0b22\0\u0b22\0\u757b"+ - "\0\u0b22\0\u0b22\0\u75c6\0\u7611\0\u765c\0\u76a7\0\u76f2\0\u773d"+ - "\0\u7788\0\u77d3\0\u781e\0\u7869\0\u78b4\0\u78ff\0\u01c2\0\u0258"+ - "\0\u0b22\0\u794a\0\u7995\0\u79e0\0\u7a2b\0\u7a76\0\u7ac1\0\u7b0c"+ - "\0\u7b57\0\u7ba2\0\u7bed\0\u7c38\0\u7c83\0\u7cce\0\u7d19\0\u7d64"+ - "\0\u7daf\0\u7dfa\0\u7e45\0\u7e90\0\u7edb\0\u7f26\0\u7f71\0\u0b22"+ - "\0\u7fbc\0\u8007\0\u8052\0\u809d\0\u80e8\0\u0b22\0\u8133\0\u817e"+ - "\0\u81c9\0\u8214\0\u825f\0\u82aa\0\u82f5\0\u8340\0\u838b\0\u83d6"+ - "\0\u8421\0\u846c\0\u84b7\0\u8502\0\u854d\0\u8598\0\u85e3\0\u862e"+ - "\0\u8679\0\u86c4\0\u870f\0\u875a\0\u87a5\0\u87f0\0\u0b22\0\u01c2"+ - "\0\u0258\0\u883b\0\u8886\0\u88d1\0\u891c\0\u8967\0\u89b2\0\u89fd"+ - "\0\u8a48\0\u8a93\0\u8ade\0\u8b29\0\u8b74\0\u8bbf\0\u8c0a\0\u8c55"+ - "\0\u8ca0\0\u8ceb\0\u8d36\0\u8d81\0\u8dcc\0\u8e17\0\u8e62\0\u01c2"+ - "\0\u0258\0\u8ead\0\u8ef8\0\u8f43\0\u8f8e\0\u8fd9\0\u9024\0\u0b22"+ - "\0\u906f\0\u90ba\0\341\0\u9105\0\u9150\0\u919b\0\u91e6\0\u9231"+ - "\0\u927c\0\u92c7\0\u9312\0\u0b22\0\u935d\0\u0b22\0\u93a8\0\u93f3"+ - "\0\u943e\0\u9489\0\u94d4\0\u0b22\0\u0b22\0\u951f\0\u956a\0\u95b5"+ - "\0\u9600\0\341\0\u0b22\0\u0b22\0\u964b\0\u0b22\0\341\0\u0b22"; - - private static int [] zzUnpackRowMap() { - int [] result = new int[616]; - int offset = 0; - offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackRowMap(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int high = packed.charAt(i++) << 16; - result[j++] = high | packed.charAt(i++); + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; } - return j; - } - /** - * The transition table of the DFA - */ - private static final int [] ZZ_TRANS = zzUnpackTrans(); + /** + * Translates a state to a row index in the transition table + */ + private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - private static final String ZZ_TRANS_PACKED_0 = - "\4\4\1\5\1\6\3\4\1\7\1\4\1\10\1\11"+ + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\113\0\226\0\341\0\u012c\0\u0177\0\u01c2\0\u020d" + + "\0\u0258\0\u02a3\0\u02ee\0\u0339\0\u0384\0\u03cf\0\u041a\0\u0465" + + "\0\u04b0\0\u04fb\0\u0546\0\u0591\0\u05dc\0\u0627\0\u0672\0\u06bd" + + "\0\u0708\0\u0753\0\u079e\0\u07e9\0\u0834\0\u087f\0\u08ca\0\u0915" + + "\0\u0960\0\341\0\u09ab\0\341\0\u09f6\0\341\0\u0a41\0\u0a8c" + + "\0\341\0\u0ad7\0\341\0\u0b22\0\u0b6d\0\u0bb8\0\u0c03\0\u0c4e" + + "\0\u0c99\0\u0ce4\0\u0d2f\0\u0d7a\0\u0dc5\0\u0e10\0\u0e5b\0\u0ea6" + + "\0\u0ef1\0\u0f3c\0\u0f87\0\u0fd2\0\u101d\0\341\0\u1068\0\341" + + "\0\341\0\341\0\341\0\u10b3\0\341\0\u01c2\0\341\0\u10fe" + + "\0\u1149\0\u1194\0\u11df\0\u122a\0\u1275\0\u12c0\0\u130b\0\u1356" + + "\0\u13a1\0\u13ec\0\u1437\0\u1482\0\u14cd\0\u1518\0\u1563\0\u15ae" + + "\0\u15f9\0\u1644\0\u168f\0\u16da\0\u1725\0\u1770\0\u17bb\0\u1806" + + "\0\u1851\0\341\0\u189c\0\u18e7\0\341\0\341\0\341\0\341" + + "\0\341\0\341\0\341\0\341\0\u1932\0\u197d\0\u19c8\0\u1a13" + + "\0\u1a5e\0\u0b6d\0\u0c03\0\u1aa9\0\u1af4\0\u1b3f\0\u1b8a\0\u1bd5" + + "\0\u0b22\0\u1c20\0\u1c6b\0\u1cb6\0\u1d01\0\u1d4c\0\u1d97\0\u1de2" + + "\0\u1e2d\0\u1e78\0\u1ec3\0\u1f0e\0\u1f59\0\u1fa4\0\u1fef\0\u203a" + + "\0\u2085\0\u20d0\0\u211b\0\u2166\0\u21b1\0\u21fc\0\u2247\0\u2292" + + "\0\u22dd\0\u2328\0\u2373\0\u23be\0\u2409\0\u2454\0\u249f\0\u24ea" + + "\0\u2535\0\u2580\0\u25cb\0\u2616\0\u2661\0\u26ac\0\u26f7\0\u01c2" + + "\0\u2742\0\u0258\0\u278d\0\u27d8\0\u2823\0\u286e\0\u28b9\0\u2904" + + "\0\u294f\0\u299a\0\u29e5\0\u2a30\0\u2a7b\0\u2ac6\0\u2b11\0\u2b5c" + + "\0\341\0\u2ba7\0\u2bf2\0\u2c3d\0\u2c88\0\u2c88\0\u2cd3\0\u2d1e" + + "\0\u2d69\0\u2db4\0\u2dff\0\u2e4a\0\u2e95\0\u2ee0\0\u2f2b\0\u2f76" + + "\0\u2fc1\0\u300c\0\u3057\0\u30a2\0\u30ed\0\u3138\0\u3183\0\u31ce" + + "\0\u3219\0\u3264\0\u32af\0\u32fa\0\u3345\0\u3390\0\u33db\0\u3426" + + "\0\u3471\0\u34bc\0\u3507\0\u3552\0\u359d\0\u35e8\0\u3633\0\u367e" + + "\0\u36c9\0\u3714\0\u375f\0\u37aa\0\u37f5\0\u01c2\0\u0258\0\u3840" + + "\0\u388b\0\u38d6\0\u3921\0\u396c\0\u39b7\0\u3a02\0\u3a4d\0\u01c2" + + "\0\u0258\0\u3a98\0\u3ae3\0\u01c2\0\u0258\0\u3b2e\0\u3b79\0\u01c2" + + "\0\u0258\0\u3bc4\0\u3c0f\0\u3c5a\0\u3ca5\0\u3cf0\0\u3d3b\0\u3d86" + + "\0\u3dd1\0\u3e1c\0\u3e67\0\u3eb2\0\u0b22\0\u3efd\0\u3f48\0\u3f93" + + "\0\u3fde\0\u4029\0\u4074\0\u0b22\0\u40bf\0\u410a\0\u4155\0\u41a0" + + "\0\u41eb\0\u4236\0\u4281\0\u42cc\0\u4317\0\u4362\0\u43ad\0\u0b22" + + "\0\u43f8\0\u0b22\0\u4443\0\u448e\0\u44d9\0\u4524\0\u456f\0\u45ba" + + "\0\u4605\0\u4650\0\u469b\0\u46e6\0\u4731\0\u477c\0\u47c7\0\u4812" + + "\0\u485d\0\u01c2\0\u0258\0\u48a8\0\u48f3\0\u493e\0\u4989\0\u49d4" + + "\0\u4a1f\0\u4a6a\0\u4ab5\0\341\0\u4b00\0\u4b4b\0\u4b96\0\u4be1" + + "\0\u0b22\0\u0b22\0\u4c2c\0\u4c77\0\u4cc2\0\u4d0d\0\u4d58\0\u4da3" + + "\0\u4dee\0\u4e39\0\u4e84\0\u4ecf\0\u4f1a\0\u4f65\0\u4fb0\0\u4ffb" + + "\0\u5046\0\u5091\0\u50dc\0\u5127\0\u5172\0\u0b22\0\u0b22\0\u51bd" + + "\0\u5208\0\u5253\0\u529e\0\u52e9\0\u5334\0\u0b22\0\u01c2\0\u537f" + + "\0\u53ca\0\u0258\0\u5415\0\u5460\0\u54ab\0\u54f6\0\u5541\0\u558c" + + "\0\u55d7\0\u5622\0\u566d\0\u56b8\0\u5703\0\u574e\0\u5799\0\u57e4" + + "\0\u582f\0\u0b22\0\u587a\0\u58c5\0\u5910\0\u595b\0\u59a6\0\u0b22" + + "\0\u59f1\0\u5a3c\0\u5a87\0\u5ad2\0\u5b1d\0\u5b68\0\u5bb3\0\u5bfe" + + "\0\u0b22\0\u5c49\0\u0b22\0\u5c94\0\u5cdf\0\u0b22\0\u0b22\0\u0b22" + + "\0\u5d2a\0\u5d75\0\u5dc0\0\u5e0b\0\u5e56\0\u0b22\0\u5ea1\0\u5eec" + + "\0\u5f37\0\u5f82\0\u5fcd\0\u6018\0\u6063\0\u60ae\0\u60f9\0\u6144" + + "\0\u618f\0\u61da\0\u01c2\0\u0258\0\u6225\0\u6270\0\u62bb\0\u6306" + + "\0\u6351\0\u639c\0\u63e7\0\u6432\0\u647d\0\u0b22\0\u64c8\0\u6513" + + "\0\u655e\0\u65a9\0\u65f4\0\u663f\0\u668a\0\u66d5\0\u6720\0\u0b22" + + "\0\u676b\0\u67b6\0\u6801\0\u684c\0\u6897\0\u68e2\0\u01c2\0\u692d" + + "\0\u0258\0\u6978\0\u69c3\0\u6a0e\0\u6a59\0\u6aa4\0\u6aef\0\u01c2" + + "\0\u0258\0\u6b3a\0\u6b85\0\u0b22\0\u6bd0\0\u6c1b\0\u6c66\0\u6cb1" + + "\0\u6cfc\0\u6d47\0\u0b22\0\u6d92\0\u0b22\0\u6ddd\0\u6e28\0\u6e73" + + "\0\u6ebe\0\u0b22\0\u6f09\0\u0b22\0\u6f54\0\u0b22\0\u0b22\0\u6f9f" + + "\0\u6fea\0\u7035\0\u7080\0\u70cb\0\u7116\0\u7161\0\u01c2\0\u0258" + + "\0\u71ac\0\u71f7\0\u7242\0\u728d\0\u72d8\0\u7323\0\u736e\0\u73b9" + + "\0\u7404\0\u744f\0\u749a\0\u74e5\0\u7530\0\u0b22\0\u0b22\0\u757b" + + "\0\u0b22\0\u0b22\0\u75c6\0\u7611\0\u765c\0\u76a7\0\u76f2\0\u773d" + + "\0\u7788\0\u77d3\0\u781e\0\u7869\0\u78b4\0\u78ff\0\u01c2\0\u0258" + + "\0\u0b22\0\u794a\0\u7995\0\u79e0\0\u7a2b\0\u7a76\0\u7ac1\0\u7b0c" + + "\0\u7b57\0\u7ba2\0\u7bed\0\u7c38\0\u7c83\0\u7cce\0\u7d19\0\u7d64" + + "\0\u7daf\0\u7dfa\0\u7e45\0\u7e90\0\u7edb\0\u7f26\0\u7f71\0\u0b22" + + "\0\u7fbc\0\u8007\0\u8052\0\u809d\0\u80e8\0\u0b22\0\u8133\0\u817e" + + "\0\u81c9\0\u8214\0\u825f\0\u82aa\0\u82f5\0\u8340\0\u838b\0\u83d6" + + "\0\u8421\0\u846c\0\u84b7\0\u8502\0\u854d\0\u8598\0\u85e3\0\u862e" + + "\0\u8679\0\u86c4\0\u870f\0\u875a\0\u87a5\0\u87f0\0\u0b22\0\u01c2" + + "\0\u0258\0\u883b\0\u8886\0\u88d1\0\u891c\0\u8967\0\u89b2\0\u89fd" + + "\0\u8a48\0\u8a93\0\u8ade\0\u8b29\0\u8b74\0\u8bbf\0\u8c0a\0\u8c55" + + "\0\u8ca0\0\u8ceb\0\u8d36\0\u8d81\0\u8dcc\0\u8e17\0\u8e62\0\u01c2" + + "\0\u0258\0\u8ead\0\u8ef8\0\u8f43\0\u8f8e\0\u8fd9\0\u9024\0\u0b22" + + "\0\u906f\0\u90ba\0\341\0\u9105\0\u9150\0\u919b\0\u91e6\0\u9231" + + "\0\u927c\0\u92c7\0\u9312\0\u0b22\0\u935d\0\u0b22\0\u93a8\0\u93f3" + + "\0\u943e\0\u9489\0\u94d4\0\u0b22\0\u0b22\0\u951f\0\u956a\0\u95b5" + + "\0\u9600\0\341\0\u0b22\0\u0b22\0\u964b\0\u0b22\0\341\0\u0b22"; + + private static int[] zzUnpackRowMap() { + int[] result = new int[616]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ + + int j = offset; /* index in unpacked array */ + + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + + /** + * The transition table of the DFA + */ + private static final int[] ZZ_TRANS = zzUnpackTrans(); + + private static final String ZZ_TRANS_PACKED_0 + = "\4\4\1\5\1\6\3\4\1\7\1\4\1\10\1\11"+ "\1\7\4\4\1\12\1\13\3\4\1\7\1\11\1\14"+ "\1\15\1\16\1\17\1\20\1\21\1\22\1\23\1\24"+ "\1\25\1\26\1\27\1\7\1\11\1\7\1\11\1\30"+ @@ -2432,144 +2442,174 @@ public final class Flasm3Lexer { "\2\0\2\u0268\1\0\1\54\1\0\24\54\1\0\22\54"+ "\1\0\2\54\4\0\2\54\1\0\1\54\1\0\1\54"; - private static int [] zzUnpackTrans() { - int [] result = new int[38550]; - int offset = 0; - offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackTrans(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - value--; - do result[j++] = value; while (--count > 0); + private static int[] zzUnpackTrans() { + int[] result = new int[38550]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; } - return j; - } + private static int zzUnpackTrans(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ - /* error codes */ - private static final int ZZ_UNKNOWN_ERROR = 0; - private static final int ZZ_NO_MATCH = 1; - private static final int ZZ_PUSHBACK_2BIG = 2; + int j = offset; /* index in unpacked array */ - /* error messages for the codes above */ - private static final String ZZ_ERROR_MSG[] = { - "Unkown internal scanner error", - "Error: could not match input", - "Error: pushback value was too large" - }; - - /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state aState - */ - private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); - - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\3\0\1\11\35\1\1\11\1\1\1\11\1\1\1\11"+ - "\2\1\1\11\1\1\1\11\22\1\1\11\1\1\4\11"+ - "\1\1\1\11\1\0\1\11\2\0\2\1\1\0\1\1"+ - "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1"+ - "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1"+ - "\1\0\1\1\1\0\1\1\1\11\2\1\10\11\1\0"+ - "\3\1\1\0\1\1\1\0\41\1\2\0\2\1\1\0"+ - "\1\1\1\0\1\1\1\0\1\1\1\0\3\1\1\0"+ - "\1\1\1\0\1\1\1\0\1\1\1\0\1\1\1\0"+ - "\1\1\1\0\1\1\1\0\1\1\1\11\1\0\3\1"+ - "\1\0\41\1\2\0\2\1\1\0\3\1\1\0\1\1"+ - "\1\0\1\1\1\0\1\1\1\0\3\1\1\0\3\1"+ - "\1\0\3\1\1\0\45\1\3\0\3\1\1\0\5\1"+ - "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1"+ - "\1\11\43\1\2\0\3\1\1\0\1\1\1\0\1\1"+ - "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\37\1"+ - "\2\0\2\1\1\0\1\1\1\0\1\1\1\0\1\1"+ - "\1\0\3\1\1\0\30\1\1\0\3\1\1\0\1\1"+ - "\1\0\1\1\1\0\3\1\1\0\30\1\1\0\1\1"+ - "\1\0\3\1\1\0\1\1\1\0\21\1\1\0\1\1"+ - "\3\0\3\1\1\0\20\1\1\0\1\1\3\0\3\1"+ - "\1\0\15\1\1\0\1\1\3\0\3\1\1\0\15\1"+ - "\3\0\2\1\1\0\12\1\4\0\15\1\1\11\2\0"+ - "\11\1\3\0\6\1\2\0\1\11\4\1\1\11\1\1"; - - private static int [] zzUnpackAttribute() { - int [] result = new int[616]; - int offset = 0; - offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); - return result; - } - - private static int zzUnpackAttribute(String packed, int offset, int [] result) { - int i = 0; /* index in packed string */ - int j = offset; /* index in unpacked array */ - int l = packed.length(); - while (i < l) { - int count = packed.charAt(i++); - int value = packed.charAt(i++); - do result[j++] = value; while (--count > 0); + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do { + result[j++] = value; + } while (--count > 0); + } + return j; } - return j; - } - /** the input device */ - private java.io.Reader zzReader; - /** the current state of the DFA */ - private int zzState; + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; - /** the current lexical state */ - private int zzLexicalState = YYINITIAL; + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; - /** this buffer contains the current text to be matched and is - the source of the yytext() string */ - private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - /** the textposition at the last accepting state */ - private int zzMarkedPos; + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\3\0\1\11\35\1\1\11\1\1\1\11\1\1\1\11" + + "\2\1\1\11\1\1\1\11\22\1\1\11\1\1\4\11" + + "\1\1\1\11\1\0\1\11\2\0\2\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\11\2\1\10\11\1\0" + + "\3\1\1\0\1\1\1\0\41\1\2\0\2\1\1\0" + + "\1\1\1\0\1\1\1\0\1\1\1\0\3\1\1\0" + + "\1\1\1\0\1\1\1\0\1\1\1\0\1\1\1\0" + + "\1\1\1\0\1\1\1\0\1\1\1\11\1\0\3\1" + + "\1\0\41\1\2\0\2\1\1\0\3\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\0\3\1\1\0\3\1" + + "\1\0\3\1\1\0\45\1\3\0\3\1\1\0\5\1" + + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1" + + "\1\11\43\1\2\0\3\1\1\0\1\1\1\0\1\1" + + "\1\0\1\1\1\0\1\1\1\0\1\1\1\0\37\1" + + "\2\0\2\1\1\0\1\1\1\0\1\1\1\0\1\1" + + "\1\0\3\1\1\0\30\1\1\0\3\1\1\0\1\1" + + "\1\0\1\1\1\0\3\1\1\0\30\1\1\0\1\1" + + "\1\0\3\1\1\0\1\1\1\0\21\1\1\0\1\1" + + "\3\0\3\1\1\0\20\1\1\0\1\1\3\0\3\1" + + "\1\0\15\1\1\0\1\1\3\0\3\1\1\0\15\1" + + "\3\0\2\1\1\0\12\1\4\0\15\1\1\11\2\0" + + "\11\1\3\0\6\1\2\0\1\11\4\1\1\11\1\1"; - /** the current text position in the buffer */ - private int zzCurrentPos; + private static int[] zzUnpackAttribute() { + int[] result = new int[616]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } - /** startRead marks the beginning of the yytext() string in the buffer */ - private int zzStartRead; + private static int zzUnpackAttribute(String packed, int offset, int[] result) { + int i = 0; /* index in packed string */ - /** endRead marks the last character in the buffer, that has been read - from input */ - private int zzEndRead; + int j = offset; /* index in unpacked array */ - /** number of newlines encountered up to the start of the matched text */ - private int yyline; + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do { + result[j++] = value; + } while (--count > 0); + } + return j; + } - /** the number of characters up to the start of the matched text */ - private int yychar; + /** + * the input device + */ + private java.io.Reader zzReader; - /** - * the number of characters from the last newline up to the start of the - * matched text - */ - private int yycolumn; + /** + * the current state of the DFA + */ + private int zzState; - /** - * zzAtBOL == true <=> the scanner is currently at the beginning of a line - */ - private boolean zzAtBOL = true; + /** + * the current lexical state + */ + private int zzLexicalState = YYINITIAL; - /** zzAtEOF == true <=> the scanner is at the EOF */ - private boolean zzAtEOF; + /** + * this buffer contains the current text to be matched and is the source of + * the yytext() string + */ + private char zzBuffer[] = new char[ZZ_BUFFERSIZE]; - /** denotes if the user-EOF-code has already been executed */ - private boolean zzEOFDone; + /** + * the textposition at the last accepting state + */ + private int zzMarkedPos; - /* user code: */ + /** + * the current text position in the buffer + */ + private int zzCurrentPos; - StringBuffer string = new StringBuffer(); - boolean isMultiname=false; - long multinameId=0; + /** + * startRead marks the beginning of the yytext() string in the buffer + */ + private int zzStartRead; + /** + * endRead marks the last character in the buffer, that has been read from + * input + */ + private int zzEndRead; + + /** + * number of newlines encountered up to the start of the matched text + */ + private int yyline; + + /** + * the number of characters up to the start of the matched text + */ + private int yychar; + + /** + * the number of characters from the last newline up to the start of the + * matched text + */ + private int yycolumn; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** + * zzAtEOF == true <=> the scanner is at the EOF + */ + private boolean zzAtEOF; + + /** + * denotes if the user-EOF-code has already been executed + */ + private boolean zzEOFDone; + + /* user code: */ + StringBuffer string = new StringBuffer(); + boolean isMultiname = false; + long multinameId = 0; /** * Create an empty lexer, yyrset will be called later to reset and assign @@ -2584,812 +2624,927 @@ public final class Flasm3Lexer { } public int yyline() { - return yyline+1; + return yyline + 1; } - - - private final Stack pushedBack=new Stack<>(); - + private final Stack pushedBack = new Stack<>(); public void pushback(ParsedSymbol symb) { pushedBack.push(symb); last = null; } ParsedSymbol last; - public ParsedSymbol lex() throws java.io.IOException, ParseException{ - ParsedSymbol ret=null; - if(!pushedBack.isEmpty()){ + + public ParsedSymbol lex() throws java.io.IOException, ParseException { + ParsedSymbol ret = null; + if (!pushedBack.isEmpty()) { ret = last = pushedBack.pop(); - }else{ + } else { ret = last = yylex(); } return ret; } - - - /** - * Creates a new scanner - * There is also a java.io.InputStream version of this constructor. - * - * @param in the java.io.Reader to read input from. - */ - public Flasm3Lexer(java.io.Reader in) { - this.zzReader = in; - } - - /** - * Creates a new scanner. - * There is also java.io.Reader version of this constructor. - * - * @param in the java.io.Inputstream to read input from. - */ - public Flasm3Lexer(java.io.InputStream in) { - this(new java.io.InputStreamReader(in)); - } - - /** - * Unpacks the compressed character translation table. - * - * @param packed the packed character translation table - * @return the unpacked character translation table - */ - private static char [] zzUnpackCMap(String packed) { - char [] map = new char[0x10000]; - int i = 0; /* index in packed string */ - int j = 0; /* index in unpacked array */ - while (i < 2260) { - int count = packed.charAt(i++); - char value = packed.charAt(i++); - do map[j++] = value; while (--count > 0); - } - return map; - } - - - /** - * Refills the input buffer. - * - * @return false, iff there was new input. - * - * @exception java.io.IOException if any I/O-Error occurs - */ - private boolean zzRefill() throws java.io.IOException { - - /* first: make room (if you can) */ - if (zzStartRead > 0) { - System.arraycopy(zzBuffer, zzStartRead, - zzBuffer, 0, - zzEndRead-zzStartRead); - - /* translate stored positions */ - zzEndRead-= zzStartRead; - zzCurrentPos-= zzStartRead; - zzMarkedPos-= zzStartRead; - zzStartRead = 0; + /** + * Creates a new scanner There is also a java.io.InputStream version of this + * constructor. + * + * @param in the java.io.Reader to read input from. + */ + public Flasm3Lexer(java.io.Reader in) { + this.zzReader = in; } - /* is the buffer big enough? */ - if (zzCurrentPos >= zzBuffer.length) { - /* if not: blow it up */ - char newBuffer[] = new char[zzCurrentPos*2]; - System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); - zzBuffer = newBuffer; + /** + * Creates a new scanner. There is also java.io.Reader version of this + * constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public Flasm3Lexer(java.io.InputStream in) { + this(new java.io.InputStreamReader(in)); } - /* finally: fill the buffer with new input */ - int numRead = zzReader.read(zzBuffer, zzEndRead, - zzBuffer.length-zzEndRead); + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char[] zzUnpackCMap(String packed) { + char[] map = new char[0x10000]; + int i = 0; /* index in packed string */ - if (numRead > 0) { - zzEndRead+= numRead; - return false; + int j = 0; /* index in unpacked array */ + + while (i < 2260) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do { + map[j++] = value; + } while (--count > 0); + } + return map; } - // unlikely but not impossible: read 0 characters, but not at end of stream - if (numRead == 0) { - int c = zzReader.read(); - if (c == -1) { + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + + /* first: make room (if you can) */ + if (zzStartRead > 0) { + System.arraycopy(zzBuffer, zzStartRead, + zzBuffer, 0, + zzEndRead - zzStartRead); + + /* translate stored positions */ + zzEndRead -= zzStartRead; + zzCurrentPos -= zzStartRead; + zzMarkedPos -= zzStartRead; + zzStartRead = 0; + } + + /* is the buffer big enough? */ + if (zzCurrentPos >= zzBuffer.length) { + /* if not: blow it up */ + char newBuffer[] = new char[zzCurrentPos * 2]; + System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length); + zzBuffer = newBuffer; + } + + /* finally: fill the buffer with new input */ + int numRead = zzReader.read(zzBuffer, zzEndRead, + zzBuffer.length - zzEndRead); + + if (numRead > 0) { + zzEndRead += numRead; + return false; + } + // unlikely but not impossible: read 0 characters, but not at end of stream + if (numRead == 0) { + int c = zzReader.read(); + if (c == -1) { + return true; + } else { + zzBuffer[zzEndRead++] = (char) c; + return false; + } + } + + // numRead < 0 return true; - } else { - zzBuffer[zzEndRead++] = (char) c; - return false; - } } - // numRead < 0 - return true; - } + /** + * Closes the input stream. + */ + public final void yyclose() throws java.io.IOException { + zzAtEOF = true; /* indicate end of file */ - - /** - * Closes the input stream. - */ - public final void yyclose() throws java.io.IOException { - zzAtEOF = true; /* indicate end of file */ - zzEndRead = zzStartRead; /* invalidate buffer */ + zzEndRead = zzStartRead; /* invalidate buffer */ - if (zzReader != null) - zzReader.close(); - } - - - /** - * Resets the scanner to read from a new input stream. - * Does not close the old reader. - * - * All internal variables are reset, the old input stream - * cannot be reused (internal buffer is discarded and lost). - * Lexical state is set to ZZ_INITIAL. - * - * @param reader the new input stream - */ - public final void yyreset(java.io.Reader reader) { - zzReader = reader; - zzAtBOL = true; - zzAtEOF = false; - zzEOFDone = false; - zzEndRead = zzStartRead = 0; - zzCurrentPos = zzMarkedPos = 0; - yyline = yychar = yycolumn = 0; - zzLexicalState = YYINITIAL; - } - - - /** - * Returns the current lexical state. - */ - public final int yystate() { - return zzLexicalState; - } - - - /** - * Enters a new lexical state - * - * @param newState the new lexical state - */ - public final void yybegin(int newState) { - zzLexicalState = newState; - } - - - /** - * Returns the text matched by the current regular expression. - */ - public final String yytext() { - return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); - } - - - /** - * Returns the character at position pos from the - * matched text. - * - * It is equivalent to yytext().charAt(pos), but faster - * - * @param pos the position of the character to fetch. - * A value from 0 to yylength()-1. - * - * @return the character at position pos - */ - public final char yycharat(int pos) { - return zzBuffer[zzStartRead+pos]; - } - - - /** - * Returns the length of the matched text region. - */ - public final int yylength() { - return zzMarkedPos-zzStartRead; - } - - - /** - * Reports an error that occured while scanning. - * - * In a wellformed scanner (no or only correct usage of - * yypushback(int) and a match-all fallback rule) this method - * will only be called with things that "Can't Possibly Happen". - * If this method is called, something is seriously wrong - * (e.g. a JFlex bug producing a faulty scanner etc.). - * - * Usual syntax/scanner level error handling should be done - * in error fallback rules. - * - * @param errorCode the code of the errormessage to display - */ - private void zzScanError(int errorCode) { - String message; - try { - message = ZZ_ERROR_MSG[errorCode]; - } - catch (ArrayIndexOutOfBoundsException e) { - message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; - } - - throw new Error(message); - } - - - /** - * Pushes the specified amount of characters back into the input stream. - * - * They will be read again by then next call of the scanning method - * - * @param number the number of characters to be read again. - * This number must not be greater than yylength()! - */ - public void yypushback(int number) { - if ( number > yylength() ) - zzScanError(ZZ_PUSHBACK_2BIG); - - zzMarkedPos -= number; - } - - - /** - * Resumes scanning until the next regular expression is matched, - * the end of input is encountered or an I/O-Error occurs. - * - * @return the next token - * @exception java.io.IOException if any I/O-Error occurs - */ - public ParsedSymbol yylex() throws java.io.IOException, ParseException { - int zzInput; - int zzAction; - - // cached fields: - int zzCurrentPosL; - int zzMarkedPosL; - int zzEndReadL = zzEndRead; - char [] zzBufferL = zzBuffer; - char [] zzCMapL = ZZ_CMAP; - - int [] zzTransL = ZZ_TRANS; - int [] zzRowMapL = ZZ_ROWMAP; - int [] zzAttrL = ZZ_ATTRIBUTE; - - while (true) { - zzMarkedPosL = zzMarkedPos; - - yychar+= zzMarkedPosL-zzStartRead; - - boolean zzR = false; - for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; - zzCurrentPosL++) { - switch (zzBufferL[zzCurrentPosL]) { - case '\u000B': - case '\u000C': - case '\u0085': - case '\u2028': - case '\u2029': - yyline++; - yycolumn = 0; - zzR = false; - break; - case '\r': - yyline++; - yycolumn = 0; - zzR = true; - break; - case '\n': - if (zzR) - zzR = false; - else { - yyline++; - yycolumn = 0; - } - break; - default: - zzR = false; - yycolumn++; + if (zzReader != null) { + zzReader.close(); } - } + } - if (zzR) { - // peek one character ahead if it is \n (if we have counted one line too much) - boolean zzPeek; - if (zzMarkedPosL < zzEndReadL) - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; - else if (zzAtEOF) - zzPeek = false; - else { - boolean eof = zzRefill(); - zzEndReadL = zzEndRead; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - if (eof) - zzPeek = false; - else - zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + /** + * Resets the scanner to read from a new input stream. Does not close the + * old reader. + * + * All internal variables are reset, the old input stream + * cannot be reused (internal buffer is discarded and lost). Lexical + * state is set to ZZ_INITIAL. + * + * @param reader the new input stream + */ + public final void yyreset(java.io.Reader reader) { + zzReader = reader; + zzAtBOL = true; + zzAtEOF = false; + zzEOFDone = false; + zzEndRead = zzStartRead = 0; + zzCurrentPos = zzMarkedPos = 0; + yyline = yychar = yycolumn = 0; + zzLexicalState = YYINITIAL; + } + + /** + * Returns the current lexical state. + */ + public final int yystate() { + return zzLexicalState; + } + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + /** + * Returns the text matched by the current regular expression. + */ + public final String yytext() { + return new String(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead); + } + + /** + * Returns the character at position pos from the matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. A value from 0 to + * yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer[zzStartRead + pos]; + } + + /** + * Returns the length of the matched text region. + */ + public final int yylength() { + return zzMarkedPos - zzStartRead; + } + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of yypushback(int) and + * a match-all fallback rule) this method will only be called with things + * that "Can't Possibly Happen". If this method is called, something is + * seriously wrong (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done in error + * fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } - if (zzPeek) yyline--; - } - zzAction = -1; - zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; - - zzState = ZZ_LEXSTATE[zzLexicalState]; + throw new Error(message); + } + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. This number must + * not be greater than yylength()! + */ + public void yypushback(int number) { + if (number > yylength()) { + zzScanError(ZZ_PUSHBACK_2BIG); + } + + zzMarkedPos -= number; + } + + /** + * Resumes scanning until the next regular expression is matched, the end of + * input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + */ + public ParsedSymbol yylex() throws java.io.IOException, ParseException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + char[] zzBufferL = zzBuffer; + char[] zzCMapL = ZZ_CMAP; + + int[] zzTransL = ZZ_TRANS; + int[] zzRowMapL = ZZ_ROWMAP; + int[] zzAttrL = ZZ_ATTRIBUTE; - zzForAction: { while (true) { - - if (zzCurrentPosL < zzEndReadL) - zzInput = zzBufferL[zzCurrentPosL++]; - else if (zzAtEOF) { - zzInput = YYEOF; - break zzForAction; - } - else { - // store back cached positions - zzCurrentPos = zzCurrentPosL; - zzMarkedPos = zzMarkedPosL; - boolean eof = zzRefill(); - // get translated positions and possibly new buffer - zzCurrentPosL = zzCurrentPos; - zzMarkedPosL = zzMarkedPos; - zzBufferL = zzBuffer; - zzEndReadL = zzEndRead; - if (eof) { - zzInput = YYEOF; - break zzForAction; - } - else { - zzInput = zzBufferL[zzCurrentPosL++]; - } - } - int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; - if (zzNext == -1) break zzForAction; - zzState = zzNext; + zzMarkedPosL = zzMarkedPos; - int zzAttributes = zzAttrL[zzState]; - if ( (zzAttributes & 1) == 1 ) { - zzAction = zzState; - zzMarkedPosL = zzCurrentPosL; - if ( (zzAttributes & 8) == 8 ) break zzForAction; - } + yychar += zzMarkedPosL - zzStartRead; + boolean zzR = false; + for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; + zzCurrentPosL++) { + switch (zzBufferL[zzCurrentPosL]) { + case '\u000B': + case '\u000C': + case '\u0085': + case '\u2028': + case '\u2029': + yyline++; + yycolumn = 0; + zzR = false; + break; + case '\r': + yyline++; + yycolumn = 0; + zzR = true; + break; + case '\n': + if (zzR) { + zzR = false; + } else { + yyline++; + yycolumn = 0; + } + break; + default: + zzR = false; + yycolumn++; + } + } + + if (zzR) { + // peek one character ahead if it is \n (if we have counted one line too much) + boolean zzPeek; + if (zzMarkedPosL < zzEndReadL) { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } else if (zzAtEOF) { + zzPeek = false; + } else { + boolean eof = zzRefill(); + zzEndReadL = zzEndRead; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + if (eof) { + zzPeek = false; + } else { + zzPeek = zzBufferL[zzMarkedPosL] == '\n'; + } + } + if (zzPeek) { + yyline--; + } + } + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + zzForAction: + { + while (true) { + + if (zzCurrentPosL < zzEndReadL) { + zzInput = zzBufferL[zzCurrentPosL++]; + } else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } else { + zzInput = zzBufferL[zzCurrentPosL++]; + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput]]; + if (zzNext == -1) { + break zzForAction; + } + zzState = zzNext; + + int zzAttributes = zzAttrL[zzState]; + if ((zzAttributes & 1) == 1) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ((zzAttributes & 8) == 8) { + break zzForAction; + } + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 45: { + isMultiname = true; + String s = yytext(); + multinameId = Long.parseLong(s.substring(2, s.length() - 2)); + yybegin(STRING); + string.setLength(0); + } + case 101: + break; + case 37: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPE, yytext()); + } + case 102: + break; + case 57: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DOUBLE, yytext()); + } + case 103: + break; + case 32: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CODE, yytext()); + } + case 104: + break; + case 52: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METHOD, yytext()); + } + case 105: + break; + case 47: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CLASS, yytext()); + } + case 106: + break; + case 79: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMELA, yytext()); + } + case 107: + break; + case 74: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UINTEGER, yytext()); + } + case 108: + break; + case 59: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAMEA, yytext()); + } + case 109: + break; + case 8: { + return new ParsedSymbol(ParsedSymbol.TYPE_IDENTIFIER, yytext()); + } + case 110: + break; + case 58: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_GETTER, yytext()); + } + case 111: + break; + case 53: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TARGET, yytext()); + } + case 112: + break; + case 69: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OVERRIDE, yytext()); + } + case 113: + break; + case 93: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGENAMESPACE, yytext()); + } + case 114: + break; + case 61: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INTEGER, yytext()); + } + case 115: + break; + case 22: { + string.append('\t'); + } + case 116: + break; + case 95: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_START, Integer.parseInt(s.substring(15, s.length() - 1))); + } + case 117: + break; + case 54: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SETTER, yytext()); + } + case 118: + break; + case 15: { + return new ParsedSymbol(ParsedSymbol.TYPE_LOWERTHAN, yytext()); + } + case 119: + break; + case 19: { + throw new ParseException("Illegal escape sequence \"" + yytext() + "\"", yyline + 1); + } + case 120: + break; + case 42: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UTF8, yytext()); + } + case 121: + break; + case 96: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXPLICITNAMESPACE, yytext()); + } + case 122: + break; + case 90: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_END, Integer.parseInt(s.substring(13, s.length() - 1))); + } + case 123: + break; + case 35: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_BODY, yytext()); + } + case 124: + break; + case 34: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FLAG, yytext()); + } + case 125: + break; + case 84: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMELA, yytext()); + } + case 126: + break; + case 78: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAMESPACE, yytext()); + } + case 127: + break; + case 94: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PRIVATENAMESPACE, yytext()); + } + case 128: + break; + case 9: { + return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_OPEN, yytext()); + } + case 129: + break; + case 92: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_PARAM_NAMES, yytext()); + } + case 130: + break; + case 23: { + string.append('\n'); + } + case 131: + break; + case 64: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSTACK, yytext()); + } + case 132: + break; + case 36: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRUE, yytext()); + } + case 133: + break; + case 5: { + yybegin(PARAMETERS); + // length also includes the trailing quote + if (isMultiname) { + return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME, new Long(multinameId)); + } else { + return new ParsedSymbol(ParsedSymbol.TYPE_STRING, string.toString()); + } + } + case 134: + break; + case 44: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRAIT, yytext()); + } + case 135: + break; + case 98: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_STATICPROTECTEDNS, yytext()); + } + case 136: + break; + case 82: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEA, yytext()); + } + case 137: + break; + case 80: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UNDEFINED, yytext()); + } + case 138: + break; + case 67: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXPLICIT, yytext()); + } + case 139: + break; + case 4: { + throw new ParseException("Unterminated string at end of line", yyline + 1); + } + case 140: + break; + case 10: { + return new ParsedSymbol(ParsedSymbol.TYPE_INTEGER, new Long(Long.parseLong((yytext())))); + } + case 141: + break; + case 31: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRY, yytext()); + } + case 142: + break; + case 60: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RETURNS, yytext()); + } + case 143: + break; + case 89: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ARGUMENTS, yytext()); + } + case 144: + break; + case 43: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAM, yytext()); + } + case 145: + break; + case 99: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_TARGET, Integer.parseInt(s.substring(16, s.length() - 1))); + } + case 146: + break; + case 56: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DISPID, yytext()); + } + case 147: + break; + case 66: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METADATA, yytext()); + } + case 148: + break; + case 18: { + String s = yytext(); + return new ParsedSymbol(ParsedSymbol.TYPE_LABEL, s.substring(0, s.length() - 1)); + } + case 149: + break; + case 76: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAME, yytext()); + } + case 150: + break; + case 72: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEL, yytext()); + } + case 151: + break; + case 86: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_OPTIONAL, yytext()); + } + case 152: + break; + case 29: { + return new ParsedSymbol(ParsedSymbol.TYPE_FLOAT, new Double(Double.parseDouble((yytext())))); + } + case 153: + break; + case 30: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TO, yytext()); + } + case 154: + break; + case 46: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CONST, yytext()); + } + case 155: + break; + case 24: { + string.append('\r'); + } + case 156: + break; + case 48: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FINAL, yytext()); + } + case 157: + break; + case 63: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DECIMAL, yytext()); + } + case 158: + break; + case 26: { + string.append('\b'); + } + case 159: + break; + case 87: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSCOPEDEPTH, yytext()); + } + case 160: + break; + case 49: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FALSE, yytext()); + } + case 161: + break; + case 73: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FUNCTION, yytext()); + } + case 162: + break; + case 27: { + string.append('\"'); + } + case 163: + break; + case 70: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SET_DXNS, yytext()); + } + case 164: + break; + case 39: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NULL, yytext()); + } + case 165: + break; + case 88: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INITSCOPEDEPTH, yytext()); + } + case 166: + break; + case 41: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FROM, yytext()); + } + case 167: + break; + case 14: { + return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_CLOSE, yytext()); + } + case 168: + break; + case 2: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_INSTRUCTION_NAME, yytext()); + } + case 169: + break; + case 28: { + string.append('\''); + } + case 170: + break; + case 11: { + return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_CLOSE, yytext()); + } + case 171: + break; + case 21: { + string.append('\\'); + } + case 172: + break; + case 6: { + yybegin(YYINITIAL); + } + case 173: + break; + case 17: { + return new ParsedSymbol(ParsedSymbol.TYPE_COMMA, yytext()); + } + case 174: + break; + case 97: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGEINTERNALNS, yytext()); + } + case 175: + break; + case 16: { + return new ParsedSymbol(ParsedSymbol.TYPE_GREATERTHAN, yytext()); + } + case 176: + break; + case 77: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_REST, yytext()); + } + case 177: + break; + case 12: { + isMultiname = false; + yybegin(STRING); + string.setLength(0); + } + case 178: + break; + case 68: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPENAME, yytext()); + } + case 179: + break; + case 40: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOT, yytext()); + } + case 180: + break; + case 100: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PROTECTEDNAMESPACE, yytext()); + } + case 181: + break; + case 75: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAMNAME, yytext()); + } + case 182: + break; + case 25: { + string.append('\f'); + } + case 183: + break; + case 13: { + return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_OPEN, yytext()); + } + case 184: + break; + case 33: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME, yytext()); + } + case 185: + break; + case 91: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ACTIVATION, yytext()); + } + case 186: + break; + case 51: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_VALUE, yytext()); + } + case 187: + break; + case 55: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOTID, yytext()); + } + case 188: + break; + case 85: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_IGNORE_REST, yytext()); + } + case 189: + break; + case 50: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAME, yytext()); + } + case 190: + break; + case 3: { + string.append(yytext()); + } + case 191: + break; + case 7: { + return new ParsedSymbol(ParsedSymbol.TYPE_COMMENT, yytext().substring(1)); + } + case 192: + break; + case 81: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_LOCALCOUNT, yytext()); + } + case 193: + break; + case 71: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEA, yytext()); + } + case 194: + break; + case 65: { + yybegin(PARAMETERS); + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OPTIONAL, yytext()); + } + case 195: + break; + case 20: { + char val = (char) Integer.parseInt(yytext().substring(1), 8); + string.append(val); + } + case 196: + break; + case 38: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME, yytext()); + } + case 197: + break; + case 83: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEL, yytext()); + } + case 198: + break; + case 62: { + return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAME, yytext()); + } + case 199: + break; + case 1: { + } + case 200: + break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + { + return new ParsedSymbol(ParsedSymbol.TYPE_EOF); + } + } else { + zzScanError(ZZ_NO_MATCH); + } + } } - } - - // store back cached position - zzMarkedPos = zzMarkedPosL; - - switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 45: - { isMultiname=true; - String s=yytext(); - multinameId=Long.parseLong(s.substring(2,s.length()-2)); - yybegin(STRING); - string.setLength(0); - } - case 101: break; - case 37: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPE,yytext()); - } - case 102: break; - case 57: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DOUBLE,yytext()); - } - case 103: break; - case 32: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CODE,yytext()); - } - case 104: break; - case 52: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METHOD,yytext()); - } - case 105: break; - case 47: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CLASS,yytext()); - } - case 106: break; - case 79: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMELA,yytext()); - } - case 107: break; - case 74: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UINTEGER,yytext()); - } - case 108: break; - case 59: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAMEA,yytext()); - } - case 109: break; - case 8: - { return new ParsedSymbol(ParsedSymbol.TYPE_IDENTIFIER,yytext()); - } - case 110: break; - case 58: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_GETTER,yytext()); - } - case 111: break; - case 53: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TARGET,yytext()); - } - case 112: break; - case 69: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OVERRIDE,yytext()); - } - case 113: break; - case 93: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGENAMESPACE,yytext()); - } - case 114: break; - case 61: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INTEGER,yytext()); - } - case 115: break; - case 22: - { string.append( '\t' ); - } - case 116: break; - case 95: - { String s=yytext(); - return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_START,Integer.parseInt(s.substring(15,s.length()-1))); - } - case 117: break; - case 54: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SETTER,yytext()); - } - case 118: break; - case 15: - { return new ParsedSymbol(ParsedSymbol.TYPE_LOWERTHAN,yytext()); - } - case 119: break; - case 19: - { throw new ParseException("Illegal escape sequence \""+yytext()+"\"",yyline+1); - } - case 120: break; - case 42: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UTF8,yytext()); - } - case 121: break; - case 96: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXPLICITNAMESPACE,yytext()); - } - case 122: break; - case 90: - { String s=yytext(); - return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_END,Integer.parseInt(s.substring(13,s.length()-1))); - } - case 123: break; - case 35: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_BODY,yytext()); - } - case 124: break; - case 34: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FLAG,yytext()); - } - case 125: break; - case 84: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMELA,yytext()); - } - case 126: break; - case 78: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAMESPACE,yytext()); - } - case 127: break; - case 94: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PRIVATENAMESPACE,yytext()); - } - case 128: break; - case 9: - { return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_OPEN,yytext()); - } - case 129: break; - case 92: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_PARAM_NAMES,yytext()); - } - case 130: break; - case 23: - { string.append( '\n' ); - } - case 131: break; - case 64: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSTACK,yytext()); - } - case 132: break; - case 36: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRUE,yytext()); - } - case 133: break; - case 5: - { yybegin(PARAMETERS); - // length also includes the trailing quote - if(isMultiname){ - return new ParsedSymbol(ParsedSymbol.TYPE_MULTINAME,new Long(multinameId)); - }else{ - return new ParsedSymbol(ParsedSymbol.TYPE_STRING,string.toString()); - } - } - case 134: break; - case 44: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRAIT,yytext()); - } - case 135: break; - case 98: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_STATICPROTECTEDNS,yytext()); - } - case 136: break; - case 82: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEA,yytext()); - } - case 137: break; - case 80: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_UNDEFINED,yytext()); - } - case 138: break; - case 67: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_EXPLICIT,yytext()); - } - case 139: break; - case 4: - { throw new ParseException("Unterminated string at end of line",yyline+1); - } - case 140: break; - case 10: - { return new ParsedSymbol(ParsedSymbol.TYPE_INTEGER,new Long(Long.parseLong((yytext())))); - } - case 141: break; - case 31: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TRY,yytext()); - } - case 142: break; - case 60: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RETURNS,yytext()); - } - case 143: break; - case 89: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ARGUMENTS,yytext()); - } - case 144: break; - case 43: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAM,yytext()); - } - case 145: break; - case 99: - { String s=yytext(); - return new ParsedSymbol(ParsedSymbol.TYPE_EXCEPTION_TARGET,Integer.parseInt(s.substring(16,s.length()-1))); - } - case 146: break; - case 56: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DISPID,yytext()); - } - case 147: break; - case 66: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_METADATA,yytext()); - } - case 148: break; - case 18: - { String s=yytext(); - return new ParsedSymbol(ParsedSymbol.TYPE_LABEL,s.substring(0,s.length()-1)); - } - case 149: break; - case 76: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAME,yytext()); - } - case 150: break; - case 72: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEL,yytext()); - } - case 151: break; - case 86: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_HAS_OPTIONAL,yytext()); - } - case 152: break; - case 29: - { return new ParsedSymbol(ParsedSymbol.TYPE_FLOAT,new Double(Double.parseDouble((yytext())))); - } - case 153: break; - case 30: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TO,yytext()); - } - case 154: break; - case 46: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_CONST,yytext()); - } - case 155: break; - case 24: - { string.append( '\r' ); - } - case 156: break; - case 48: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FINAL,yytext()); - } - case 157: break; - case 63: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_DECIMAL,yytext()); - } - case 158: break; - case 26: - { string.append( '\b' ); - } - case 159: break; - case 87: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MAXSCOPEDEPTH,yytext()); - } - case 160: break; - case 49: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FALSE,yytext()); - } - case 161: break; - case 73: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FUNCTION,yytext()); - } - case 162: break; - case 27: - { string.append( '\"' ); - } - case 163: break; - case 70: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SET_DXNS,yytext()); - } - case 164: break; - case 39: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NULL,yytext()); - } - case 165: break; - case 88: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_INITSCOPEDEPTH,yytext()); - } - case 166: break; - case 41: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_FROM,yytext()); - } - case 167: break; - case 14: - { return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_CLOSE,yytext()); - } - case 168: break; - case 2: - { yybegin(PARAMETERS); - return new ParsedSymbol(ParsedSymbol.TYPE_INSTRUCTION_NAME,yytext()); - } - case 169: break; - case 28: - { string.append( '\'' ); - } - case 170: break; - case 11: - { return new ParsedSymbol(ParsedSymbol.TYPE_BRACKET_CLOSE,yytext()); - } - case 171: break; - case 21: - { string.append( '\\' ); - } - case 172: break; - case 6: - { yybegin(YYINITIAL); - } - case 173: break; - case 17: - { return new ParsedSymbol(ParsedSymbol.TYPE_COMMA,yytext()); - } - case 174: break; - case 97: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PACKAGEINTERNALNS,yytext()); - } - case 175: break; - case 16: - { return new ParsedSymbol(ParsedSymbol.TYPE_GREATERTHAN,yytext()); - } - case 176: break; - case 77: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_REST,yytext()); - } - case 177: break; - case 12: - { isMultiname=false; - yybegin(STRING); - string.setLength(0); - } - case 178: break; - case 68: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_TYPENAME,yytext()); - } - case 179: break; - case 40: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOT,yytext()); - } - case 180: break; - case 100: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PROTECTEDNAMESPACE,yytext()); - } - case 181: break; - case 75: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_PARAMNAME,yytext()); - } - case 182: break; - case 25: - { string.append( '\f' ); - } - case 183: break; - case 13: - { return new ParsedSymbol(ParsedSymbol.TYPE_PARENT_OPEN,yytext()); - } - case 184: break; - case 33: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME,yytext()); - } - case 185: break; - case 91: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NEED_ACTIVATION,yytext()); - } - case 186: break; - case 51: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_VALUE,yytext()); - } - case 187: break; - case 55: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_SLOTID,yytext()); - } - case 188: break; - case 85: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_IGNORE_REST,yytext()); - } - case 189: break; - case 50: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_QNAME,yytext()); - } - case 190: break; - case 3: - { string.append( yytext() ); - } - case 191: break; - case 7: - { return new ParsedSymbol(ParsedSymbol.TYPE_COMMENT,yytext().substring(1)); - } - case 192: break; - case 81: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_LOCALCOUNT,yytext()); - } - case 193: break; - case 71: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAMEA,yytext()); - } - case 194: break; - case 65: - { yybegin(PARAMETERS); return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_OPTIONAL,yytext()); - } - case 195: break; - case 20: - { char val = (char) Integer.parseInt(yytext().substring(1),8); - string.append( val ); - } - case 196: break; - case 38: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_NAME,yytext()); - } - case 197: break; - case 83: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_MULTINAMEL,yytext()); - } - case 198: break; - case 62: - { return new ParsedSymbol(ParsedSymbol.TYPE_KEYWORD_RTQNAME,yytext()); - } - case 199: break; - case 1: - { - } - case 200: break; - default: - if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { - zzAtEOF = true; - { - return new ParsedSymbol(ParsedSymbol.TYPE_EOF); - } - } - else { - zzScanError(ZZ_NO_MATCH); - } - } } - } - } diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java b/trunk/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java index dcc5fb421..1481f6bb4 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/methodinfo_parser/MethodInfoLexer.java @@ -47,8 +47,8 @@ public final class MethodInfoLexer { /** * Translates characters to character classes */ - private static final String ZZ_CMAP_PACKED = - "\11\5\1\3\1\2\1\0\1\3\1\1\16\5\4\0\1\3\1\0" + private static final String ZZ_CMAP_PACKED + = "\11\5\1\3\1\2\1\0\1\3\1\1\16\5\4\0\1\3\1\0" + "\1\42\1\0\1\4\2\0\1\56\2\0\1\45\1\37\1\44\1\7" + "\1\35\1\0\1\6\3\57\4\40\2\10\1\43\2\0\1\46\3\0" + "\4\4\1\36\6\4\1\31\1\4\1\25\1\4\1\17\12\4\1\12" @@ -145,8 +145,8 @@ public final class MethodInfoLexer { * Translates DFA states to action switch labels. */ private static final int[] ZZ_ACTION = zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 = - "\2\0\2\1\1\2\1\3\1\1\1\3\7\2\1\1" + private static final String ZZ_ACTION_PACKED_0 + = "\2\0\2\1\1\2\1\3\1\1\1\3\7\2\1\1" + "\1\4\1\5\1\6\1\7\1\10\2\2\1\11\2\12" + "\1\1\1\13\1\14\1\0\1\14\2\0\7\2\1\0" + "\3\2\1\15\1\16\1\17\1\20\1\21\1\22\1\16" @@ -165,7 +165,9 @@ public final class MethodInfoLexer { private static int zzUnpackAction(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -180,8 +182,8 @@ public final class MethodInfoLexer { * Translates a state to a row index in the transition table */ private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\60\0\140\0\220\0\300\0\360\0\u0120\0\u0150" + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\60\0\140\0\220\0\300\0\360\0\u0120\0\u0150" + "\0\u0180\0\u01b0\0\u01e0\0\u0210\0\u0240\0\u0270\0\u02a0\0\u02d0" + "\0\140\0\140\0\140\0\140\0\140\0\u0300\0\u0330\0\u0360" + "\0\u0390\0\140\0\u03c0\0\140\0\360\0\u03f0\0\u0420\0\u0450" @@ -208,7 +210,9 @@ public final class MethodInfoLexer { private static int zzUnpackRowMap(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; @@ -220,8 +224,8 @@ public final class MethodInfoLexer { * The transition table of the DFA */ private static final int[] ZZ_TRANS = zzUnpackTrans(); - private static final String ZZ_TRANS_PACKED_0 = - "\3\3\1\4\1\5\1\3\1\6\1\7\1\10\1\11" + private static final String ZZ_TRANS_PACKED_0 + = "\3\3\1\4\1\5\1\3\1\6\1\7\1\10\1\11" + "\2\3\1\12\1\13\1\3\2\5\1\14\1\15\1\5" + "\1\16\1\5\1\17\5\5\1\3\1\20\1\5\1\3" + "\1\10\1\3\1\21\1\22\1\23\1\24\1\25\1\26" @@ -388,7 +392,9 @@ public final class MethodInfoLexer { private static int zzUnpackTrans(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -412,12 +418,11 @@ public final class MethodInfoLexer { "Error: pushback value was too large" }; /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state - * aState + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState */ private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\2\0\1\11\15\1\5\11\4\1\1\11\1\1\1\11" + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\2\0\1\11\15\1\5\11\4\1\1\11\1\1\1\11" + "\1\1\1\0\1\1\2\0\7\1\1\0\3\1\1\11" + "\1\1\4\11\1\1\4\11\1\1\4\0\6\1\1\11" + "\4\1\1\11\2\0\12\1\1\11\1\0\10\1\1\0" @@ -433,7 +438,9 @@ public final class MethodInfoLexer { private static int zzUnpackAttribute(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -553,7 +560,9 @@ public final class MethodInfoLexer { private static char[] zzUnpackCMap(String packed) { char[] map = new char[0x10000]; int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 1768) { int count = packed.charAt(i++); char value = packed.charAt(i++); @@ -622,6 +631,7 @@ public final class MethodInfoLexer { */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ + zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) { @@ -821,7 +831,6 @@ public final class MethodInfoLexer { zzState = ZZ_LEXSTATE[zzLexicalState]; - zzForAction: { while (true) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/Action.java b/trunk/src/com/jpexs/decompiler/flash/action/Action.java index 255430127..bc29ff0df 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/Action.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/Action.java @@ -44,8 +44,14 @@ import com.jpexs.decompiler.flash.action.parser.pcode.ASMParsedSymbol; import com.jpexs.decompiler.flash.action.parser.pcode.ASMParser; import com.jpexs.decompiler.flash.action.parser.pcode.FlasmLexer; import com.jpexs.decompiler.flash.action.special.ActionEnd; -import com.jpexs.decompiler.flash.action.swf4.*; -import com.jpexs.decompiler.flash.action.swf5.*; +import com.jpexs.decompiler.flash.action.swf4.ActionEquals; +import com.jpexs.decompiler.flash.action.swf4.ActionIf; +import com.jpexs.decompiler.flash.action.swf4.ActionJump; +import com.jpexs.decompiler.flash.action.swf4.ActionNot; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionDefineFunction; +import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; import com.jpexs.decompiler.flash.action.swf7.ActionDefineFunction2; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.ecma.Null; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java index 2c24a7b88..63de6b08c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/ASMParser.java @@ -23,11 +23,105 @@ import com.jpexs.decompiler.flash.action.parser.ParseException; import com.jpexs.decompiler.flash.action.special.ActionDeobfuscatePop; import com.jpexs.decompiler.flash.action.special.ActionNop; import com.jpexs.decompiler.flash.action.special.ActionStore; -import com.jpexs.decompiler.flash.action.swf3.*; -import com.jpexs.decompiler.flash.action.swf4.*; -import com.jpexs.decompiler.flash.action.swf5.*; -import com.jpexs.decompiler.flash.action.swf6.*; -import com.jpexs.decompiler.flash.action.swf7.*; +import com.jpexs.decompiler.flash.action.swf3.ActionGetURL; +import com.jpexs.decompiler.flash.action.swf3.ActionGoToLabel; +import com.jpexs.decompiler.flash.action.swf3.ActionGotoFrame; +import com.jpexs.decompiler.flash.action.swf3.ActionNextFrame; +import com.jpexs.decompiler.flash.action.swf3.ActionPlay; +import com.jpexs.decompiler.flash.action.swf3.ActionPrevFrame; +import com.jpexs.decompiler.flash.action.swf3.ActionSetTarget; +import com.jpexs.decompiler.flash.action.swf3.ActionStop; +import com.jpexs.decompiler.flash.action.swf3.ActionStopSounds; +import com.jpexs.decompiler.flash.action.swf3.ActionToggleQuality; +import com.jpexs.decompiler.flash.action.swf3.ActionWaitForFrame; +import com.jpexs.decompiler.flash.action.swf4.ActionAdd; +import com.jpexs.decompiler.flash.action.swf4.ActionAnd; +import com.jpexs.decompiler.flash.action.swf4.ActionAsciiToChar; +import com.jpexs.decompiler.flash.action.swf4.ActionCall; +import com.jpexs.decompiler.flash.action.swf4.ActionCharToAscii; +import com.jpexs.decompiler.flash.action.swf4.ActionCloneSprite; +import com.jpexs.decompiler.flash.action.swf4.ActionDivide; +import com.jpexs.decompiler.flash.action.swf4.ActionEndDrag; +import com.jpexs.decompiler.flash.action.swf4.ActionEquals; +import com.jpexs.decompiler.flash.action.swf4.ActionGetProperty; +import com.jpexs.decompiler.flash.action.swf4.ActionGetTime; +import com.jpexs.decompiler.flash.action.swf4.ActionGetURL2; +import com.jpexs.decompiler.flash.action.swf4.ActionGetVariable; +import com.jpexs.decompiler.flash.action.swf4.ActionGotoFrame2; +import com.jpexs.decompiler.flash.action.swf4.ActionIf; +import com.jpexs.decompiler.flash.action.swf4.ActionJump; +import com.jpexs.decompiler.flash.action.swf4.ActionLess; +import com.jpexs.decompiler.flash.action.swf4.ActionMBAsciiToChar; +import com.jpexs.decompiler.flash.action.swf4.ActionMBCharToAscii; +import com.jpexs.decompiler.flash.action.swf4.ActionMBStringExtract; +import com.jpexs.decompiler.flash.action.swf4.ActionMBStringLength; +import com.jpexs.decompiler.flash.action.swf4.ActionMultiply; +import com.jpexs.decompiler.flash.action.swf4.ActionNot; +import com.jpexs.decompiler.flash.action.swf4.ActionOr; +import com.jpexs.decompiler.flash.action.swf4.ActionPop; +import com.jpexs.decompiler.flash.action.swf4.ActionPush; +import com.jpexs.decompiler.flash.action.swf4.ActionRandomNumber; +import com.jpexs.decompiler.flash.action.swf4.ActionRemoveSprite; +import com.jpexs.decompiler.flash.action.swf4.ActionSetProperty; +import com.jpexs.decompiler.flash.action.swf4.ActionSetTarget2; +import com.jpexs.decompiler.flash.action.swf4.ActionSetVariable; +import com.jpexs.decompiler.flash.action.swf4.ActionStartDrag; +import com.jpexs.decompiler.flash.action.swf4.ActionStringAdd; +import com.jpexs.decompiler.flash.action.swf4.ActionStringEquals; +import com.jpexs.decompiler.flash.action.swf4.ActionStringExtract; +import com.jpexs.decompiler.flash.action.swf4.ActionStringLength; +import com.jpexs.decompiler.flash.action.swf4.ActionStringLess; +import com.jpexs.decompiler.flash.action.swf4.ActionSubtract; +import com.jpexs.decompiler.flash.action.swf4.ActionToInteger; +import com.jpexs.decompiler.flash.action.swf4.ActionTrace; +import com.jpexs.decompiler.flash.action.swf4.ActionWaitForFrame2; +import com.jpexs.decompiler.flash.action.swf5.ActionAdd2; +import com.jpexs.decompiler.flash.action.swf5.ActionBitAnd; +import com.jpexs.decompiler.flash.action.swf5.ActionBitLShift; +import com.jpexs.decompiler.flash.action.swf5.ActionBitOr; +import com.jpexs.decompiler.flash.action.swf5.ActionBitRShift; +import com.jpexs.decompiler.flash.action.swf5.ActionBitURShift; +import com.jpexs.decompiler.flash.action.swf5.ActionBitXor; +import com.jpexs.decompiler.flash.action.swf5.ActionCallFunction; +import com.jpexs.decompiler.flash.action.swf5.ActionCallMethod; +import com.jpexs.decompiler.flash.action.swf5.ActionConstantPool; +import com.jpexs.decompiler.flash.action.swf5.ActionDecrement; +import com.jpexs.decompiler.flash.action.swf5.ActionDefineFunction; +import com.jpexs.decompiler.flash.action.swf5.ActionDefineLocal; +import com.jpexs.decompiler.flash.action.swf5.ActionDefineLocal2; +import com.jpexs.decompiler.flash.action.swf5.ActionDelete; +import com.jpexs.decompiler.flash.action.swf5.ActionDelete2; +import com.jpexs.decompiler.flash.action.swf5.ActionEnumerate; +import com.jpexs.decompiler.flash.action.swf5.ActionEquals2; +import com.jpexs.decompiler.flash.action.swf5.ActionGetMember; +import com.jpexs.decompiler.flash.action.swf5.ActionIncrement; +import com.jpexs.decompiler.flash.action.swf5.ActionInitArray; +import com.jpexs.decompiler.flash.action.swf5.ActionInitObject; +import com.jpexs.decompiler.flash.action.swf5.ActionLess2; +import com.jpexs.decompiler.flash.action.swf5.ActionModulo; +import com.jpexs.decompiler.flash.action.swf5.ActionNewMethod; +import com.jpexs.decompiler.flash.action.swf5.ActionNewObject; +import com.jpexs.decompiler.flash.action.swf5.ActionPushDuplicate; +import com.jpexs.decompiler.flash.action.swf5.ActionReturn; +import com.jpexs.decompiler.flash.action.swf5.ActionSetMember; +import com.jpexs.decompiler.flash.action.swf5.ActionStackSwap; +import com.jpexs.decompiler.flash.action.swf5.ActionStoreRegister; +import com.jpexs.decompiler.flash.action.swf5.ActionTargetPath; +import com.jpexs.decompiler.flash.action.swf5.ActionToNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionToString; +import com.jpexs.decompiler.flash.action.swf5.ActionTypeOf; +import com.jpexs.decompiler.flash.action.swf5.ActionWith; +import com.jpexs.decompiler.flash.action.swf6.ActionEnumerate2; +import com.jpexs.decompiler.flash.action.swf6.ActionGreater; +import com.jpexs.decompiler.flash.action.swf6.ActionInstanceOf; +import com.jpexs.decompiler.flash.action.swf6.ActionStrictEquals; +import com.jpexs.decompiler.flash.action.swf6.ActionStringGreater; +import com.jpexs.decompiler.flash.action.swf7.ActionCastOp; +import com.jpexs.decompiler.flash.action.swf7.ActionDefineFunction2; +import com.jpexs.decompiler.flash.action.swf7.ActionExtends; +import com.jpexs.decompiler.flash.action.swf7.ActionImplementsOp; +import com.jpexs.decompiler.flash.action.swf7.ActionThrow; +import com.jpexs.decompiler.flash.action.swf7.ActionTry; import com.jpexs.decompiler.graph.GraphSourceItemContainer; import com.jpexs.helpers.Helper; import java.io.IOException; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java index 077b73410..0d3095a44 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/pcode/FlasmLexer.java @@ -58,8 +58,8 @@ public final class FlasmLexer { /** * Translates characters to character classes */ - private static final String ZZ_CMAP_PACKED = - "\11\6\1\4\1\2\1\0\1\4\1\1\16\6\4\0\1\4\1\0" + private static final String ZZ_CMAP_PACKED + = "\11\6\1\4\1\2\1\0\1\4\1\1\16\6\4\0\1\4\1\0" + "\1\45\1\0\1\5\2\0\1\47\3\0\1\37\1\0\1\30\1\35" + "\1\0\1\33\3\50\4\40\2\11\1\12\1\3\5\0\4\7\1\36" + "\3\7\1\31\4\7\1\34\14\7\1\0\1\41\2\0\1\10\1\0" @@ -178,8 +178,8 @@ public final class FlasmLexer { * Translates DFA states to action switch labels. */ private static final int[] ZZ_ACTION = zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 = - "\3\0\3\1\1\2\1\3\1\4\2\5\1\1\1\6" + private static final String ZZ_ACTION_PACKED_0 + = "\3\0\3\1\1\2\1\3\1\4\2\5\1\1\1\6" + "\2\7\1\10\1\11\1\12\1\13\5\11\1\1\1\11" + "\1\12\1\11\1\1\1\11\1\14\1\0\1\15\1\16" + "\1\17\1\20\1\21\1\22\2\23\1\24\1\25\1\26" @@ -198,7 +198,9 @@ public final class FlasmLexer { private static int zzUnpackAction(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -213,8 +215,8 @@ public final class FlasmLexer { * Translates a state to a row index in the transition table */ private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\51\0\122\0\173\0\244\0\315\0\366\0\173" + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\51\0\122\0\173\0\244\0\315\0\366\0\173" + "\0\u011f\0\u0148\0\173\0\u0171\0\173\0\u019a\0\173\0\u01c3" + "\0\u01ec\0\u0215\0\173\0\u023e\0\u0267\0\u0290\0\u02b9\0\u02e2" + "\0\u030b\0\u0334\0\u035d\0\u0386\0\u03af\0\u03d8\0\173\0\315" @@ -237,7 +239,9 @@ public final class FlasmLexer { private static int zzUnpackRowMap(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; @@ -249,8 +253,8 @@ public final class FlasmLexer { * The transition table of the DFA */ private static final int[] ZZ_TRANS = zzUnpackTrans(); - private static final String ZZ_TRANS_PACKED_0 = - "\4\4\1\5\1\6\1\4\1\7\1\6\3\4\1\10" + private static final String ZZ_TRANS_PACKED_0 + = "\4\4\1\5\1\6\1\4\1\7\1\6\3\4\1\10" + "\13\7\1\4\2\7\1\4\1\7\1\4\1\7\3\4" + "\3\7\1\4\1\7\2\4\1\11\1\12\1\13\36\11" + "\1\14\3\11\1\15\3\11\1\4\1\16\1\17\1\20" @@ -394,7 +398,9 @@ public final class FlasmLexer { private static int zzUnpackTrans(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -418,12 +424,11 @@ public final class FlasmLexer { "Error: pushback value was too large" }; /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state - * aState + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState */ private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\3\0\1\11\3\1\1\11\2\1\1\11\1\1\1\11" + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\3\0\1\11\3\1\1\11\2\1\1\11\1\1\1\11" + "\1\1\1\11\3\1\1\11\13\1\1\11\1\0\6\11" + "\2\1\4\11\1\0\7\1\1\0\1\11\4\1\1\11" + "\1\1\1\0\5\1\1\0\10\1\1\0\5\1\1\0" @@ -439,7 +444,9 @@ public final class FlasmLexer { private static int zzUnpackAttribute(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -557,7 +564,9 @@ public final class FlasmLexer { private static char[] zzUnpackCMap(String packed) { char[] map = new char[0x10000]; int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 2206) { int count = packed.charAt(i++); char value = packed.charAt(i++); @@ -626,6 +635,7 @@ public final class FlasmLexer { */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ + zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) { @@ -825,7 +835,6 @@ public final class FlasmLexer { zzState = ZZ_LEXSTATE[zzLexicalState]; - zzForAction: { while (true) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java index 4e206c4af..b89b42090 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptLexer.java @@ -58,8 +58,8 @@ public final class ActionScriptLexer { /** * Translates characters to character classes */ - private static final String ZZ_CMAP_PACKED = - "\11\7\1\3\1\2\1\0\1\3\1\1\16\7\4\0\1\14\1\107" + private static final String ZZ_CMAP_PACKED + = "\11\7\1\3\1\2\1\0\1\3\1\1\16\7\4\0\1\14\1\107" + "\1\16\1\0\1\6\1\116\1\112\1\30\1\77\1\100\1\5\1\114" + "\1\106\1\26\1\11\1\4\1\17\3\23\4\24\2\20\1\10\1\105" + "\1\12\1\15\1\13\1\111\1\117\1\61\1\22\1\71\1\72\1\25" @@ -181,8 +181,8 @@ public final class ActionScriptLexer { * Translates DFA states to action switch labels. */ private static final int[] ZZ_ACTION = zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 = - "\5\0\1\1\2\2\1\3\1\4\1\5\1\6\1\7" + private static final String ZZ_ACTION_PACKED_0 + = "\5\0\1\1\2\2\1\3\1\4\1\5\1\6\1\7" + "\1\10\1\11\1\12\1\13\1\14\2\15\1\16\1\17" + "\26\6\1\20\1\21\1\22\1\23\1\24\1\25\1\26" + "\1\27\1\30\1\31\1\32\1\33\1\34\1\35\1\36" @@ -232,7 +232,9 @@ public final class ActionScriptLexer { private static int zzUnpackAction(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -247,8 +249,8 @@ public final class ActionScriptLexer { * Translates a state to a row index in the transition table */ private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\120\0\240\0\360\0\u0140\0\u0190\0\u01e0\0\u0190" + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\120\0\240\0\360\0\u0140\0\u0190\0\u01e0\0\u0190" + "\0\u0230\0\u0280\0\u02d0\0\u0320\0\u0370\0\u03c0\0\u0410\0\u0460" + "\0\u04b0\0\u0190\0\u0500\0\u0550\0\u05a0\0\u0190\0\u05f0\0\u0640" + "\0\u0690\0\u06e0\0\u0730\0\u0780\0\u07d0\0\u0820\0\u0870\0\u08c0" @@ -343,7 +345,9 @@ public final class ActionScriptLexer { private static int zzUnpackRowMap(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; @@ -355,8 +359,8 @@ public final class ActionScriptLexer { * The transition table of the DFA */ private static final int[] ZZ_TRANS = zzUnpackTrans(); - private static final String ZZ_TRANS_PACKED_0 = - "\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\6" + private static final String ZZ_TRANS_PACKED_0 + = "\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\6" + "\1\15\1\16\1\17\1\20\1\11\1\21\1\22\1\23" + "\1\24\2\14\2\24\1\14\1\25\1\6\1\26\1\27" + "\1\30\1\31\1\32\1\14\1\33\1\34\1\35\1\36" @@ -919,7 +923,9 @@ public final class ActionScriptLexer { private static int zzUnpackTrans(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -943,12 +949,11 @@ public final class ActionScriptLexer { "Error: pushback value was too large" }; /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state - * aState + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState */ private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\5\0\1\11\1\1\1\11\11\1\1\11\3\1\1\11" + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\5\0\1\11\1\1\1\11\11\1\1\11\3\1\1\11" + "\26\1\10\11\1\1\2\11\5\1\1\11\2\1\2\11" + "\3\1\1\11\2\1\1\11\1\1\1\11\2\1\1\0" + "\3\11\2\0\1\1\1\0\1\1\1\11\1\1\1\11" @@ -967,7 +972,9 @@ public final class ActionScriptLexer { private static int zzUnpackAttribute(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -1119,7 +1126,9 @@ public final class ActionScriptLexer { private static char[] zzUnpackCMap(String packed) { char[] map = new char[0x10000]; int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 2264) { int count = packed.charAt(i++); char value = packed.charAt(i++); @@ -1188,6 +1197,7 @@ public final class ActionScriptLexer { */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ + zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) { @@ -1333,7 +1343,6 @@ public final class ActionScriptLexer { zzState = ZZ_LEXSTATE[zzLexicalState]; - zzForAction: { while (true) { diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java index 671a4ac55..0b987068e 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java @@ -106,8 +106,10 @@ import com.jpexs.decompiler.flash.action.model.operations.StrictEqActionItem; import com.jpexs.decompiler.flash.action.model.operations.StrictNeqActionItem; import com.jpexs.decompiler.flash.action.model.operations.SubtractActionItem; import com.jpexs.decompiler.flash.action.parser.ParseException; -import com.jpexs.decompiler.flash.action.swf4.*; -import com.jpexs.decompiler.flash.action.swf5.*; +import com.jpexs.decompiler.flash.action.swf4.ActionIf; +import com.jpexs.decompiler.flash.action.swf4.ConstantIndex; +import com.jpexs.decompiler.flash.action.swf4.RegisterNumber; +import com.jpexs.decompiler.flash.action.swf5.ActionConstantPool; import com.jpexs.decompiler.flash.ecma.Null; import com.jpexs.decompiler.flash.ecma.Undefined; import com.jpexs.decompiler.flash.helpers.collections.MyEntry; diff --git a/trunk/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/trunk/src/com/jpexs/decompiler/flash/configuration/Configuration.java index 84f23141e..f5d57775c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/trunk/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -21,7 +21,16 @@ import com.jpexs.helpers.Helper; import com.jpexs.helpers.utf8.Utf8InputStreamReader; import com.jpexs.helpers.utf8.Utf8OutputStreamWriter; import com.jpexs.proxy.Replacement; -import java.io.*; +import java.io.BufferedOutputStream; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.PrintWriter; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.security.AccessController; diff --git a/trunk/src/com/jpexs/decompiler/flash/exporters/BitmapExporter.java b/trunk/src/com/jpexs/decompiler/flash/exporters/BitmapExporter.java index 9b965344a..87ee2ad85 100644 --- a/trunk/src/com/jpexs/decompiler/flash/exporters/BitmapExporter.java +++ b/trunk/src/com/jpexs/decompiler/flash/exporters/BitmapExporter.java @@ -29,7 +29,6 @@ import com.jpexs.decompiler.flash.types.RGB; import com.jpexs.decompiler.flash.types.SHAPE; import com.jpexs.decompiler.flash.types.SHAPEWITHSTYLE; import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; -import com.jpexs.helpers.Cache; import com.jpexs.helpers.SerializableImage; import java.awt.BasicStroke; import java.awt.Color; @@ -66,19 +65,19 @@ public class BitmapExporter extends ShapeExporterBase implements IShapeExporter private Color lineColor; private Stroke lineStroke; private Stroke defaultStroke; - + public static SerializableImage export(SWF swf, SHAPE shape) { BitmapExporter exporter = new BitmapExporter(swf, shape, null); exporter.export(); return exporter.getImage(); } - + public static SerializableImage export(SWF swf, SHAPE shape, Color defaultColor, boolean putToCache) { BitmapExporter exporter = new BitmapExporter(swf, shape, defaultColor); exporter.export(); return exporter.getImage(); } - + private BitmapExporter(SWF swf, SHAPE shape, Color defaultColor) { super(shape); this.swf = swf; @@ -350,7 +349,7 @@ public class BitmapExporter extends ShapeExporterBase implements IShapeExporter @Override public void curveTo(double controlX, double controlY, double anchorX, double anchorY) { - path.quadTo(controlX / SWF.unitDivisor - deltaX, controlY / SWF.unitDivisor - deltaY, + path.quadTo(controlX / SWF.unitDivisor - deltaX, controlY / SWF.unitDivisor - deltaY, anchorX / SWF.unitDivisor - deltaX, anchorY / SWF.unitDivisor - deltaY); } diff --git a/trunk/src/com/jpexs/decompiler/flash/exporters/Matrix.java b/trunk/src/com/jpexs/decompiler/flash/exporters/Matrix.java index 5c54daac1..fef0ae453 100644 --- a/trunk/src/com/jpexs/decompiler/flash/exporters/Matrix.java +++ b/trunk/src/com/jpexs/decompiler/flash/exporters/Matrix.java @@ -16,7 +16,6 @@ */ package com.jpexs.decompiler.flash.exporters; -import com.jpexs.decompiler.flash.SWF; import com.jpexs.decompiler.flash.types.MATRIX; import java.awt.geom.AffineTransform; @@ -38,7 +37,7 @@ public class Matrix { mat.scale(scale); return mat; } - + public Matrix() { scaleX = 1; scaleY = 1; @@ -76,14 +75,14 @@ public class Matrix { translateX += x; translateY += y; } - + public void scale(double factor) { scaleX *= factor; scaleY *= factor; rotateSkew0 *= factor; rotateSkew1 *= factor; } - + public AffineTransform toTransform() { AffineTransform transform = new AffineTransform(scaleX, rotateSkew0, rotateSkew1, scaleY, diff --git a/trunk/src/com/jpexs/decompiler/flash/exporters/PointInt.java b/trunk/src/com/jpexs/decompiler/flash/exporters/PointInt.java index 2cad9f7f6..d60ccb952 100644 --- a/trunk/src/com/jpexs/decompiler/flash/exporters/PointInt.java +++ b/trunk/src/com/jpexs/decompiler/flash/exporters/PointInt.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package com.jpexs.decompiler.flash.exporters; /** @@ -22,7 +21,7 @@ package com.jpexs.decompiler.flash.exporters; * @author JPEXS */ public class PointInt { - + public int x; public int y; diff --git a/trunk/src/com/jpexs/decompiler/flash/exporters/ShapeExporterBase.java b/trunk/src/com/jpexs/decompiler/flash/exporters/ShapeExporterBase.java index d353511f2..7e305b312 100644 --- a/trunk/src/com/jpexs/decompiler/flash/exporters/ShapeExporterBase.java +++ b/trunk/src/com/jpexs/decompiler/flash/exporters/ShapeExporterBase.java @@ -248,7 +248,7 @@ public abstract class ShapeExporterBase implements IShapeExporter { bounds.yMax = point.y; } } - + protected void exportFillPath(int groupIndex) { List path = createPathFromEdgeMap(fillEdgeMaps.get(groupIndex)); PointInt pos = new PointInt(Integer.MAX_VALUE, Integer.MAX_VALUE); @@ -279,7 +279,7 @@ public abstract class ShapeExporterBase implements IShapeExporter { matrix = new Matrix(fillStyle.gradientMatrix); beginGradientFill( fillStyle.fillStyleType, - fillStyle.gradient.gradientRecords, + fillStyle.gradient.gradientRecords, matrix, fillStyle.gradient.spreadMode, fillStyle.gradient.interpolationMode, diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/AboutDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/AboutDialog.java index 340c65638..d003a92da 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/AboutDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/AboutDialog.java @@ -17,7 +17,12 @@ package com.jpexs.decompiler.flash.gui; import com.jpexs.decompiler.flash.ApplicationInfo; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.BorderFactory; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java index e534da822..7d456b0c8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/GraphFrame.java @@ -18,7 +18,14 @@ package com.jpexs.decompiler.flash.gui; import com.jpexs.decompiler.graph.Graph; import com.jpexs.decompiler.graph.GraphPart; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Point; +import java.awt.Polygon; import java.awt.geom.AffineTransform; import java.awt.geom.Line2D; import java.util.HashMap; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index a6d914031..f67a5437d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -22,7 +22,6 @@ import com.jpexs.decompiler.flash.exporters.Matrix; import com.jpexs.decompiler.flash.gui.player.FlashDisplay; import com.jpexs.decompiler.flash.tags.base.CharacterTag; import com.jpexs.decompiler.flash.tags.base.DrawableTag; -import com.jpexs.helpers.Cache; import com.jpexs.helpers.SerializableImage; import java.awt.BorderLayout; import java.awt.Color; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index f8cf14146..1a0d6e216 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -37,12 +37,25 @@ import com.jpexs.helpers.ProgressListener; import com.jpexs.helpers.Stopwatch; import com.jpexs.helpers.streams.SeekableInputStream; import com.sun.jna.Platform; -import java.awt.*; +import java.awt.AWTException; +import java.awt.Frame; +import java.awt.MenuItem; +import java.awt.PopupMenu; +import java.awt.SystemTray; +import java.awt.TrayIcon; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.io.*; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; import java.lang.reflect.Field; import java.net.Socket; import java.text.SimpleDateFormat; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java index 6fd57b191..50b152654 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java @@ -356,7 +356,6 @@ public class MainFrameRibbonMenu implements MainFrameMenu, ActionListener { //JRibbonBand otherToolsBand = new JRibbonBand(translate("menu.tools.otherTools"), null); //otherToolsBand.setResizePolicies(getResizePolicies(otherToolsBand)); - return new RibbonTask(translate("menu.tools"), toolsBand, deobfuscationBand/*, otherToolsBand*/); } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 49cc782b4..3cf51a104 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -131,7 +131,6 @@ import java.awt.dnd.DropTarget; import java.awt.dnd.DropTargetDropEvent; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.ComponentListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; @@ -1620,7 +1619,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec } public void renameOneIdentifier(final SWF swf) { - if (swf.fileAttributes!=null && swf.fileAttributes.actionScript3) { + if (swf.fileAttributes != null && swf.fileAttributes.actionScript3) { final int multiName = abcPanel.decompiledTextArea.getMultinameUnderCursor(); final List abcList = swf.abcList; if (multiName > 0) { @@ -2411,7 +2410,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec } genericTagPropertiesEditorPane.setText(sb.toString()); } - + private void createAndShowTempSwf(Object tagObj) { SWF swf; try { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java b/trunk/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java index f856d09c6..59d46f2e7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MyRibbonApplicationMenuButtonUI.java @@ -16,7 +16,9 @@ */ package com.jpexs.decompiler.flash.gui; -import java.awt.*; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.awt.image.BufferedImage; import javax.swing.Icon; @@ -33,7 +35,9 @@ import org.pushingpixels.lafwidget.animation.effects.GhostingListener; import org.pushingpixels.substance.api.painter.border.SubstanceBorderPainter; import org.pushingpixels.substance.api.painter.fill.SubstanceFillPainter; import org.pushingpixels.substance.flamingo.common.ui.ActionPopupTransitionAwareUI; -import org.pushingpixels.substance.flamingo.utils.*; +import org.pushingpixels.substance.flamingo.utils.CommandButtonBackgroundDelegate; +import org.pushingpixels.substance.flamingo.utils.CommandButtonVisualStateTracker; +import org.pushingpixels.substance.flamingo.utils.RibbonApplicationMenuButtonBackgroundDelegate; import org.pushingpixels.substance.internal.animation.StateTransitionTracker; import org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java b/trunk/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java index 2cc386413..b9bc44f8c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/NewVersionDialog.java @@ -73,7 +73,7 @@ public class NewVersionDialog extends AppDialog implements ActionListener { changesStr += translate("version") + " " + v.versionName + "\r\n"; changesStr += "-----------------------\r\n"; String releaseDate = v.releaseDate; - try { + try { Date date = serverFormatter.parse(releaseDate); releaseDate = formatter.format(date); } catch (ParseException ex) { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/TagTree.java b/trunk/src/com/jpexs/decompiler/flash/gui/TagTree.java index 5a93c7dfb..3e88a026a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/TagTree.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/TagTree.java @@ -212,22 +212,21 @@ public class TagTree extends JTree { if (t instanceof SWF) { return TreeNodeType.FLASH; } - - if(t instanceof SWFList) { - SWFList slist = (SWFList)t; - if(slist.name!=null){ - if(slist.name.toLowerCase().endsWith(".zip")){ + + if (t instanceof SWFList) { + SWFList slist = (SWFList) t; + if (slist.name != null) { + if (slist.name.toLowerCase().endsWith(".zip")) { return TreeNodeType.BUNDLE_ZIP; } - if(slist.name.toLowerCase().endsWith(".swc")){ + if (slist.name.toLowerCase().endsWith(".swc")) { return TreeNodeType.BUNDLE_SWC; - } - else{ + } else { return TreeNodeType.BUNDLE_BINARY; } } } - + if (t instanceof Tag) { return TreeNodeType.OTHER_TAG; } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java b/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java index af36e7dc5..7724cc110 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java @@ -27,12 +27,6 @@ import com.jpexs.decompiler.flash.gui.treenodes.StringNode; import com.jpexs.decompiler.flash.gui.treenodes.TagTreeRoot; import com.jpexs.decompiler.flash.tags.DefineSpriteTag; import com.jpexs.decompiler.flash.tags.FrameLabelTag; -import com.jpexs.decompiler.flash.tags.PlaceObject2Tag; -import com.jpexs.decompiler.flash.tags.PlaceObject3Tag; -import com.jpexs.decompiler.flash.tags.PlaceObject4Tag; -import com.jpexs.decompiler.flash.tags.PlaceObjectTag; -import com.jpexs.decompiler.flash.tags.RemoveObject2Tag; -import com.jpexs.decompiler.flash.tags.RemoveObjectTag; import com.jpexs.decompiler.flash.tags.ShowFrameTag; import com.jpexs.decompiler.flash.tags.SoundStreamBlockTag; import com.jpexs.decompiler.flash.tags.StartSound2Tag; @@ -110,32 +104,52 @@ public class TagTreeModel implements TreeModel { List sounds = new ArrayList<>(); List binaryData = new ArrayList<>(); List others = new ArrayList<>(); - + List actionScript = SWF.createASTagList(list, null); List actionScriptTags = new ArrayList<>(); SWF.getTagsFromTreeNodes(actionScript, actionScriptTags); - + int frameCnt = 0; for (Tag t : list) { TreeNodeType ttype = TagTree.getTreeNodeType(t); switch (ttype) { - case SHOW_FRAME: + case SHOW_FRAME: ShowFrameTag showFrameTag = (ShowFrameTag) t; - frames.add(new FrameNode(new FrameNodeItem(t.getSwf(), ++frameCnt, parent, true), showFrameTag.innerTags)); + frames.add(new FrameNode(new FrameNodeItem(t.getSwf(), ++frameCnt, parent, true), showFrameTag.innerTags)); + break; + case SHAPE: + shapes.add(new TagNode(t)); + break; + case MORPH_SHAPE: + morphShapes.add(new TagNode(t)); + break; + case SPRITE: + sprites.add(new TagNode(t)); + break; + case BUTTON: + buttons.add(new TagNode(t)); + break; + case IMAGE: + images.add(new TagNode(t)); + break; + case FONT: + fonts.add(new TagNode(t)); + break; + case TEXT: + texts.add(new TagNode(t)); + break; + case MOVIE: + movies.add(new TagNode(t)); + break; + case SOUND: + sounds.add(new TagNode(t)); + break; + case BINARY_DATA: + binaryData.add(new TagNode(t)); break; - case SHAPE: shapes.add(new TagNode(t)); break; - case MORPH_SHAPE: morphShapes.add(new TagNode(t)); break; - case SPRITE: sprites.add(new TagNode(t)); break; - case BUTTON: buttons.add(new TagNode(t)); break; - case IMAGE: images.add(new TagNode(t)); break; - case FONT: fonts.add(new TagNode(t)); break; - case TEXT: texts.add(new TagNode(t)); break; - case MOVIE: movies.add(new TagNode(t)); break; - case SOUND: sounds.add(new TagNode(t)); break; - case BINARY_DATA: binaryData.add(new TagNode(t)); break; default: if (!actionScriptTags.contains(t) && !isFrameInnerTag(t)) { - others.add(new TagNode(t)); + others.add(new TagNode(t)); } break; } @@ -250,18 +264,18 @@ public class TagTreeModel implements TreeModel { List ret = new ArrayList<>(); List frames = new ArrayList<>(); List others = new ArrayList<>(); - + int frameCnt = 0; for (Tag t : list) { TreeNodeType ttype = TagTree.getTreeNodeType(t); switch (ttype) { - case SHOW_FRAME: + case SHOW_FRAME: ShowFrameTag showFrameTag = (ShowFrameTag) t; - frames.add(new FrameNode(new FrameNodeItem(t.getSwf(), ++frameCnt, parent, true), showFrameTag.innerTags)); + frames.add(new FrameNode(new FrameNodeItem(t.getSwf(), ++frameCnt, parent, true), showFrameTag.innerTags)); break; default: if (!actionScriptTags.contains(t) && !isFrameInnerTag(t)) { - others.add(new TagNode(t)); + others.add(new TagNode(t)); } break; } @@ -288,7 +302,7 @@ public class TagTreeModel implements TreeModel { || t instanceof SoundStreamBlockTag || t instanceof SoundStreamHeadTypeTag; } - + private List searchTag(TreeItem obj, TreeNode parent, List path) { List ret = null; int cnt = getChildCount(parent); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/TimeLinePanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/TimeLinePanel.java index 540abd40b..257c6538d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/TimeLinePanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/TimeLinePanel.java @@ -51,7 +51,7 @@ public class TimeLinePanel extends JPanel implements MouseListener { public TimeLinePanel(SWF swf) { this.swf = swf; this.timeLine = new TimeLine(swf); - Dimension dim = new Dimension(FRAME_WIDTH * timeLine.getFrameCount()+1, FRAME_HEIGHT * timeLine.getMaxDepth()); + Dimension dim = new Dimension(FRAME_WIDTH * timeLine.getFrameCount() + 1, FRAME_HEIGHT * timeLine.getMaxDepth()); setSize(dim); setPreferredSize(dim); addMouseListener(this); @@ -76,11 +76,11 @@ public class TimeLinePanel extends JPanel implements MouseListener { } boolean keyfound[] = new boolean[end_d - start_d + 1]; - + for (int f = start_f; f <= end_f; f++) { for (int d = start_d; d <= end_d; d++) { DepthState fl = timeLine.frames.get(f).layers.get(d); - if(fl == null){ + if (fl == null) { g.setColor(emptyFrameColor); g.fillRect(f * FRAME_WIDTH, d * FRAME_HEIGHT, FRAME_WIDTH, FRAME_HEIGHT); g.setColor(emptyBorderColor); @@ -99,7 +99,7 @@ public class TimeLinePanel extends JPanel implements MouseListener { } if (selected) { g.setColor(selectedColor); - g.fillRect(f * FRAME_WIDTH+1, d * FRAME_HEIGHT+1, FRAME_WIDTH-1, FRAME_HEIGHT-1); + g.fillRect(f * FRAME_WIDTH + 1, d * FRAME_HEIGHT + 1, FRAME_WIDTH - 1, FRAME_HEIGHT - 1); } if (fl == null) { @@ -138,12 +138,12 @@ public class TimeLinePanel extends JPanel implements MouseListener { } g.setColor(frameColor); g.fillRect(draw_f * FRAME_WIDTH, d * FRAME_HEIGHT, num_frames * FRAME_WIDTH, FRAME_HEIGHT); - + if (selected) { g.setColor(selectedColor); g.fillRect(draw_f * FRAME_WIDTH, d * FRAME_HEIGHT, FRAME_WIDTH, FRAME_HEIGHT); } - + g.setColor(borderColor); g.drawRect(draw_f * FRAME_WIDTH, d * FRAME_HEIGHT, num_frames * FRAME_WIDTH, FRAME_HEIGHT); g.setColor(keyColor); @@ -152,10 +152,10 @@ public class TimeLinePanel extends JPanel implements MouseListener { } } } - - if(cursor!=null && cursor.x>=start_f && cursor.x<=end_f){ + + if (cursor != null && cursor.x >= start_f && cursor.x <= end_f) { g.setColor(timeColor); - g.drawLine(cursor.x*FRAME_WIDTH + FRAME_WIDTH/2, 0, cursor.x*FRAME_WIDTH + FRAME_WIDTH/2, getHeight()); + g.drawLine(cursor.x * FRAME_WIDTH + FRAME_WIDTH / 2, 0, cursor.x * FRAME_WIDTH + FRAME_WIDTH / 2, getHeight()); } } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/View.java b/trunk/src/com/jpexs/decompiler/flash/gui/View.java index 9fbfa2809..1eedb87ce 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/View.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/View.java @@ -16,7 +16,15 @@ */ package com.jpexs.decompiler.flash.gui; -import java.awt.*; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; +import java.awt.Image; +import java.awt.Toolkit; +import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.WindowEvent; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index bcf143c98..492b46630 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -63,7 +63,12 @@ import java.awt.Component; import java.awt.FlowLayout; import java.awt.Font; import java.awt.Insets; -import java.awt.event.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; @@ -72,8 +77,25 @@ import java.util.concurrent.ExecutionException; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Pattern; -import javax.swing.*; -import javax.swing.table.*; +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JSplitPane; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JToggleButton; +import javax.swing.SwingConstants; +import javax.swing.SwingUtilities; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.DefaultTableColumnModel; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableCellRenderer; +import javax.swing.table.TableColumn; +import javax.swing.table.TableModel; import javax.swing.tree.TreePath; import jsyntaxpane.DefaultSyntaxKit; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java index bab5fb7d0..55204b310 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/DetailPanel.java @@ -29,7 +29,12 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.HashMap; -import javax.swing.*; +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.SwingConstants; import javax.swing.border.BevelBorder; /** diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java index 942b7db58..55ea4a62a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/IconListRenderer.java @@ -18,7 +18,11 @@ package com.jpexs.decompiler.flash.gui.abc; import com.jpexs.decompiler.flash.gui.View; import java.awt.Component; -import javax.swing.*; +import javax.swing.DefaultListCellRenderer; +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.JLabel; +import javax.swing.JList; public class IconListRenderer extends DefaultListCellRenderer { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java index a7fe59f2f..6fecb4ba2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/SlotConstTraitDetailPanel.java @@ -31,7 +31,10 @@ import java.io.StringReader; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -import javax.swing.*; +import javax.swing.JEditorPane; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; import javax.swing.event.CaretEvent; import javax.swing.event.CaretListener; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java index ad36c55f4..3d7c2b87f 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/UsageFrame.java @@ -33,7 +33,10 @@ import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.List; -import javax.swing.*; +import javax.swing.JButton; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; /** * diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/treenodes/TreeElement.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/treenodes/TreeElement.java index d9738b09d..831200cda 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/treenodes/TreeElement.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/treenodes/TreeElement.java @@ -22,7 +22,11 @@ import com.jpexs.decompiler.flash.gui.abc.TreeVisitor; import com.jpexs.decompiler.flash.treeitems.AS3PackageNodeItem; import com.jpexs.decompiler.flash.treeitems.TreeElementItem; import com.jpexs.decompiler.flash.treenodes.TreeNode; -import java.util.*; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.SortedMap; +import java.util.TreeMap; import javax.swing.tree.TreePath; public abstract class TreeElement extends TreeNode { diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java index 1edc8a1f6..29f2072d1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/proxy/ProxyFrame.java @@ -31,7 +31,12 @@ import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.Image; -import java.awt.event.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -40,7 +45,15 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.logging.Level; import java.util.logging.Logger; -import javax.swing.*; +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextField; /** * Frame with Proxy diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java index 18c267209..db50a28ae 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java @@ -207,7 +207,7 @@ public class DefineMorphShapeTag extends CharacterTag implements BoundedTag, Mor finalRecords.add(edge2); break; } - + if (edge1 instanceof CurvedEdgeRecord || edge2 instanceof CurvedEdgeRecord) { CurvedEdgeRecord cer1 = null; if (edge1 instanceof CurvedEdgeRecord) { diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java index 9b00e0c75..3b515b6c1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java @@ -90,7 +90,7 @@ public class DefineShapeTag extends CharacterTag implements BoundedTag, ShapeTag } return baos.toByteArray(); } - + @Override public int getCharacterId() { return shapeId; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java index 71f762a1e..acdf1d5e0 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/ShowFrameTag.java @@ -27,7 +27,7 @@ import java.util.List; public class ShowFrameTag extends Tag { public static final int ID = 1; - + public List innerTags; /** diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java index 2b08746d7..0ed147bb1 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/Tag.java @@ -21,7 +21,16 @@ import com.jpexs.decompiler.flash.tags.base.CharacterTag; import com.jpexs.decompiler.flash.tags.base.ContainerItem; import com.jpexs.decompiler.flash.tags.base.Exportable; import com.jpexs.decompiler.flash.tags.base.NeedsCharacters; -import com.jpexs.decompiler.flash.tags.gfx.*; +import com.jpexs.decompiler.flash.tags.gfx.DefineCompactedFont; +import com.jpexs.decompiler.flash.tags.gfx.DefineExternalGradient; +import com.jpexs.decompiler.flash.tags.gfx.DefineExternalImage; +import com.jpexs.decompiler.flash.tags.gfx.DefineExternalImage2; +import com.jpexs.decompiler.flash.tags.gfx.DefineExternalSound; +import com.jpexs.decompiler.flash.tags.gfx.DefineExternalStreamSound; +import com.jpexs.decompiler.flash.tags.gfx.DefineGradientMap; +import com.jpexs.decompiler.flash.tags.gfx.DefineSubImage; +import com.jpexs.decompiler.flash.tags.gfx.ExporterInfoTag; +import com.jpexs.decompiler.flash.tags.gfx.FontTextureInfo; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java index 4bda2b3ab..807d1e011 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/gfx/DefineCompactedFont.java @@ -40,7 +40,6 @@ import com.jpexs.decompiler.flash.types.shaperecords.CurvedEdgeRecord; import com.jpexs.decompiler.flash.types.shaperecords.SHAPERECORD; import com.jpexs.decompiler.flash.types.shaperecords.StraightEdgeRecord; import com.jpexs.decompiler.flash.types.shaperecords.StyleChangeRecord; -import com.jpexs.helpers.Cache; import com.jpexs.helpers.Helper; import com.jpexs.helpers.SerializableImage; import java.awt.Color; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java b/trunk/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java index 831f71dfd..866459854 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/text/TextLexer.java @@ -51,8 +51,8 @@ public final class TextLexer { /** * Translates characters to character classes */ - private static final String ZZ_CMAP_PACKED = - "\12\0\1\15\2\0\1\3\22\0\1\3\1\0\1\13\4\0\1\14" + private static final String ZZ_CMAP_PACKED + = "\12\0\1\15\2\0\1\3\22\0\1\3\1\0\1\13\4\0\1\14" + "\10\0\12\1\41\0\1\4\1\5\1\2\1\0\1\1\1\0\1\1" + "\1\6\3\1\1\11\7\1\1\10\3\1\1\12\1\1\1\7\6\1" + "\uff85\0"; @@ -64,8 +64,8 @@ public final class TextLexer { * Translates DFA states to action switch labels. */ private static final int[] ZZ_ACTION = zzUnpackAction(); - private static final String ZZ_ACTION_PACKED_0 = - "\3\0\1\1\1\2\1\1\1\3\1\4\1\5\1\3" + private static final String ZZ_ACTION_PACKED_0 + = "\3\0\1\1\1\2\1\1\1\3\1\4\1\5\1\3" + "\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\15" + "\1\16\1\17\1\20\1\21"; @@ -78,7 +78,9 @@ public final class TextLexer { private static int zzUnpackAction(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -93,8 +95,8 @@ public final class TextLexer { * Translates a state to a row index in the transition table */ private static final int[] ZZ_ROWMAP = zzUnpackRowMap(); - private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\16\0\34\0\52\0\52\0\70\0\52\0\106" + private static final String ZZ_ROWMAP_PACKED_0 + = "\0\0\0\16\0\34\0\52\0\52\0\70\0\52\0\106" + "\0\52\0\124\0\142\0\52\0\52\0\52\0\52\0\52" + "\0\52\0\52\0\52\0\52\0\52\0\52"; @@ -107,7 +109,9 @@ public final class TextLexer { private static int zzUnpackRowMap(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; @@ -119,8 +123,8 @@ public final class TextLexer { * The transition table of the DFA */ private static final int[] ZZ_TRANS = zzUnpackTrans(); - private static final String ZZ_TRANS_PACKED_0 = - "\4\4\1\5\1\6\7\4\2\7\1\10\1\11\1\12" + private static final String ZZ_TRANS_PACKED_0 + = "\4\4\1\5\1\6\7\4\2\7\1\10\1\11\1\12" + "\2\7\5\10\2\7\1\12\2\13\1\11\1\12\11\13" + "\1\12\16\0\2\14\1\15\1\14\1\16\1\17\1\20" + "\1\21\1\22\1\23\1\24\1\25\1\26\2\0\1\10" @@ -136,7 +140,9 @@ public final class TextLexer { private static int zzUnpackTrans(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -160,12 +166,11 @@ public final class TextLexer { "Error: pushback value was too large" }; /** - * ZZ_ATTRIBUTE[aState] contains the attributes of state - * aState + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState */ private static final int[] ZZ_ATTRIBUTE = zzUnpackAttribute(); - private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\3\0\2\11\1\1\1\11\1\1\1\11\2\1\13\11"; + private static final String ZZ_ATTRIBUTE_PACKED_0 + = "\3\0\2\11\1\1\1\11\1\1\1\11\2\1\13\11"; private static int[] zzUnpackAttribute() { int[] result = new int[22]; @@ -176,7 +181,9 @@ public final class TextLexer { private static int zzUnpackAttribute(String packed, int offset, int[] result) { int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); while (i < l) { int count = packed.charAt(i++); @@ -296,7 +303,9 @@ public final class TextLexer { private static char[] zzUnpackCMap(String packed) { char[] map = new char[0x10000]; int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 62) { int count = packed.charAt(i++); char value = packed.charAt(i++); @@ -365,6 +374,7 @@ public final class TextLexer { */ public final void yyclose() throws java.io.IOException { zzAtEOF = true; /* indicate end of file */ + zzEndRead = zzStartRead; /* invalidate buffer */ if (zzReader != null) { @@ -564,7 +574,6 @@ public final class TextLexer { zzState = ZZ_LEXSTATE[zzLexicalState]; - zzForAction: { while (true) { diff --git a/trunk/src/com/jpexs/decompiler/flash/timeline/DepthState.java b/trunk/src/com/jpexs/decompiler/flash/timeline/DepthState.java index 3323ac038..765adcbd6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/timeline/DepthState.java +++ b/trunk/src/com/jpexs/decompiler/flash/timeline/DepthState.java @@ -16,7 +16,6 @@ */ package com.jpexs.decompiler.flash.timeline; -import com.jpexs.decompiler.flash.tags.base.CharacterTag; import com.jpexs.decompiler.flash.types.CLIPACTIONS; import com.jpexs.decompiler.flash.types.CXFORM; import com.jpexs.decompiler.flash.types.CXFORMWITHALPHA; @@ -31,6 +30,7 @@ import java.util.List; * @author JPEXS */ public class DepthState { + public int characterId; public MATRIX matrix = null; public String instanceName = null; @@ -43,13 +43,13 @@ public class DepthState { public RGBA backGroundColor = null; public CLIPACTIONS clipActions = null; public int ratio; - public boolean key=false; - - public DepthState(){ - + public boolean key = false; + + public DepthState() { + } - - public DepthState(DepthState obj){ + + public DepthState(DepthState obj) { characterId = obj.characterId; matrix = obj.matrix; instanceName = obj.instanceName; diff --git a/trunk/src/com/jpexs/decompiler/flash/timeline/Frame.java b/trunk/src/com/jpexs/decompiler/flash/timeline/Frame.java index 39c7e6448..20f64d900 100644 --- a/trunk/src/com/jpexs/decompiler/flash/timeline/Frame.java +++ b/trunk/src/com/jpexs/decompiler/flash/timeline/Frame.java @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package com.jpexs.decompiler.flash.timeline; import java.util.HashMap; @@ -25,16 +24,18 @@ import java.util.Map; * @author JPEXS */ public class Frame { - public Map layers = new HashMap<>(); - - public Frame(){ - + + public Map layers = new HashMap<>(); + + public Frame() { + } - public Frame(Frame obj){ - layers = new HashMap<>(); - for(int depth:obj.layers.keySet()){ - layers.put(depth, new DepthState(obj.layers.get(depth))); - } + + public Frame(Frame obj) { + layers = new HashMap<>(); + for (int depth : obj.layers.keySet()) { + layers.put(depth, new DepthState(obj.layers.get(depth))); + } } - + } diff --git a/trunk/src/com/jpexs/decompiler/flash/timeline/TimeLine.java b/trunk/src/com/jpexs/decompiler/flash/timeline/TimeLine.java index 82cd58017..f4163177c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/timeline/TimeLine.java +++ b/trunk/src/com/jpexs/decompiler/flash/timeline/TimeLine.java @@ -34,41 +34,41 @@ import java.util.List; * @author JPEXS */ public class TimeLine { + public List frames = new ArrayList<>(); public TimeLine() { } - - public int getMaxDepth() - { - int max_depth=0; - for(Frame f:frames){ - for(int depth:f.layers.keySet()){ - if(depth>max_depth){ - max_depth = depth; - } + + public int getMaxDepth() { + int max_depth = 0; + for (Frame f : frames) { + for (int depth : f.layers.keySet()) { + if (depth > max_depth) { + max_depth = depth; + } } } return max_depth; } - public int getFrameCount(){ + public int getFrameCount() { return frames.size(); } - + public TimeLine(SWF swf) { - Frame frame=new Frame(); - for(Tag t:swf.tags){ - if(t instanceof PlaceObjectTypeTag){ - PlaceObjectTypeTag po=(PlaceObjectTypeTag)t; - int depth=po.getDepth(); - if(!frame.layers.containsKey(depth)){ + Frame frame = new Frame(); + for (Tag t : swf.tags) { + if (t instanceof PlaceObjectTypeTag) { + PlaceObjectTypeTag po = (PlaceObjectTypeTag) t; + int depth = po.getDepth(); + if (!frame.layers.containsKey(depth)) { frame.layers.put(depth, new DepthState()); } DepthState fl = frame.layers.get(depth); int characterId = po.getCharacterId(); - if(characterId!=-1){ - fl.characterId = characterId; + if (characterId != -1) { + fl.characterId = characterId; } if (po.flagMove()) { MATRIX matrix2 = po.getMatrix(); @@ -121,12 +121,12 @@ public class TimeLine { } fl.key = true; } - if(t instanceof RemoveTag){ - RemoveTag r=(RemoveTag)t; - int depth=r.getDepth(); + if (t instanceof RemoveTag) { + RemoveTag r = (RemoveTag) t; + int depth = r.getDepth(); frame.layers.remove(depth); } - if(t instanceof ShowFrameTag){ + if (t instanceof ShowFrameTag) { frames.add(frame); frame = new Frame(frame); } diff --git a/trunk/src/com/jpexs/helpers/SerializableImage.java b/trunk/src/com/jpexs/helpers/SerializableImage.java index 6ab1abcc1..a31ff6ac5 100644 --- a/trunk/src/com/jpexs/helpers/SerializableImage.java +++ b/trunk/src/com/jpexs/helpers/SerializableImage.java @@ -14,24 +14,19 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - package com.jpexs.helpers; -import com.jpexs.decompiler.flash.exporters.BitmapExporter; import java.awt.Graphics; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.IndexColorModel; import java.awt.image.WritableRaster; -import java.io.File; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.Hashtable; -import java.util.logging.Level; -import java.util.logging.Logger; import javax.imageio.ImageIO; /** @@ -55,7 +50,7 @@ public class SerializableImage implements Serializable { public SerializableImage(BufferedImage image) { this.image = image; } - + public SerializableImage(int i, int i1, int i2) { image = new BufferedImage(i, i1, i2); } @@ -70,13 +65,13 @@ public class SerializableImage implements Serializable { public BufferedImage getBufferedImage() { /*try { - ImageIO.write(image, "png", new File("c:\\10\\x\\imageid" + String.format("%03d", imageid++) + ".png")); - } catch (IOException ex) { - Logger.getLogger(BitmapExporter.class.getName()).log(Level.SEVERE, null, ex); - }*/ + ImageIO.write(image, "png", new File("c:\\10\\x\\imageid" + String.format("%03d", imageid++) + ".png")); + } catch (IOException ex) { + Logger.getLogger(BitmapExporter.class.getName()).log(Level.SEVERE, null, ex); + }*/ return image; } - + @Override protected Object clone() throws CloneNotSupportedException { SerializableImage image = new SerializableImage(); @@ -128,7 +123,7 @@ public class SerializableImage implements Serializable { public String toString() { return image.toString(); } - + private void writeObject(ObjectOutputStream out) throws IOException { ImageIO.write(image, "png", out); } diff --git a/trunk/test/com/jpexs/decompiler/flash/ABCStreamTest.java b/trunk/test/com/jpexs/decompiler/flash/ABCStreamTest.java index ff7bdeb57..5c21c3e92 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ABCStreamTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ABCStreamTest.java @@ -21,7 +21,8 @@ import com.jpexs.decompiler.flash.abc.ABCOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; -import static org.testng.Assert.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.fail; import org.testng.annotations.Test; /** diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java index 58e1f444e..7e0b4a371 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript2AssemblerTest.java @@ -27,7 +27,9 @@ import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.util.List; -import static org.testng.Assert.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -45,14 +47,14 @@ public class ActionScript2AssemblerTest extends ActionStript2TestBase { @Test public void testModifiedConstantPools() { - String actionsString = "ConstantPool \"ok\"\n" + - "Jump loc001f\n" + - "loc000d:Push \"ok\" false\n" + - "SetVariable\n" + - "Jump loc002f\n" + - "loc001f:ConstantPool \"wrong\"\n" + - "Jump loc000d\n" + - "loc002f:"; + String actionsString = "ConstantPool \"ok\"\n" + + "Jump loc001f\n" + + "loc000d:Push \"ok\" false\n" + + "SetVariable\n" + + "Jump loc002f\n" + + "loc001f:ConstantPool \"wrong\"\n" + + "Jump loc000d\n" + + "loc002f:"; try { List actions = ASMParser.parse(0, 0, true, actionsString, swf.version, false); diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java index 7cf3e83b1..ff12acd31 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript2DeobfuscatorTest.java @@ -26,7 +26,8 @@ import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.util.List; -import static org.testng.Assert.*; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -44,33 +45,33 @@ public class ActionScript2DeobfuscatorTest extends ActionStript2TestBase { @Test public void testRemoveJumpsToTheNextAction() { - String actionsString = "ConstantPool \"a\" \"b\" \"c\"\n" + - "Push false register1\n" + - "StoreRegister 2\n" + - "Pop\n" + - "Push register2\n" + - "StoreRegister 0\n" + - "Push \"a\"\n" + - "StrictEquals\n" + - "If loc005a\n" + - "Push register0 \"b\"\n" + - "StrictEquals\n" + - "If loc0068\n" + - "Jump loc0048;\n" + - "loc0048:Push register0 \"c\"\n" + - "StrictEquals\n" + - "If loc0076\n" + - "Jump loc0084\n" + - "loc005a:Push 1\n" + - "Trace\n" + - "Jump loc0084\n" + - "loc0068:Push 2\n" + - "Trace\n" + - "Jump loc0084\n" + - "loc0076:Push 3\n" + - "Trace\n" + - "Jump loc0084\n" + - "loc0084:"; + String actionsString = "ConstantPool \"a\" \"b\" \"c\"\n" + + "Push false register1\n" + + "StoreRegister 2\n" + + "Pop\n" + + "Push register2\n" + + "StoreRegister 0\n" + + "Push \"a\"\n" + + "StrictEquals\n" + + "If loc005a\n" + + "Push register0 \"b\"\n" + + "StrictEquals\n" + + "If loc0068\n" + + "Jump loc0048;\n" + + "loc0048:Push register0 \"c\"\n" + + "StrictEquals\n" + + "If loc0076\n" + + "Jump loc0084\n" + + "loc005a:Push 1\n" + + "Trace\n" + + "Jump loc0084\n" + + "loc0068:Push 2\n" + + "Trace\n" + + "Jump loc0084\n" + + "loc0076:Push 3\n" + + "Trace\n" + + "Jump loc0084\n" + + "loc0084:"; try { List actions = ASMParser.parse(0, 0, true, actionsString, swf.version, false); diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript2Test.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript2Test.java index 1aaa51e67..aa37516bb 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript2Test.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript2Test.java @@ -25,7 +25,9 @@ import com.jpexs.decompiler.flash.tags.Tag; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; -import static org.testng.Assert.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.fail; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -749,5 +751,5 @@ public class ActionScript2Test extends ActionStript2TestBase { + "unloadMovieNum(4);\r\n" + "updateAfterEvent();\r\n"); } - + } diff --git a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java index 91e46b65e..d27ab783b 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java +++ b/trunk/test/com/jpexs/decompiler/flash/ActionScript3Test.java @@ -29,7 +29,10 @@ import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Stack; -import static org.testng.Assert.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/trunk/test/com/jpexs/decompiler/flash/ExportTest.java b/trunk/test/com/jpexs/decompiler/flash/ExportTest.java index 5aa243cd0..6673e2dc5 100644 --- a/trunk/test/com/jpexs/decompiler/flash/ExportTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/ExportTest.java @@ -25,7 +25,7 @@ import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; -import static org.testng.Assert.*; +import static org.testng.Assert.fail; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -83,12 +83,12 @@ public class ExportTest { public void testDecompileAS(File f) { testDecompile(f, ExportMode.SOURCE); } - + @Test(dataProvider = "swfFiles") public void testDecompilePcode(File f) { testDecompile(f, ExportMode.PCODE); } - + public void testDecompile(File f, ExportMode exportMode) { try { SWF swf = new SWF(new FileInputStream(f), false); @@ -107,7 +107,7 @@ public class ExportTest { public AbortRetryIgnoreHandler getNewInstance() { return this; } - + }, fdir.getAbsolutePath(), exportMode, false); } catch (Exception ex) { fail(); diff --git a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java index 5394913e4..0e1c9b348 100644 --- a/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/RecompileTest.java @@ -18,8 +18,13 @@ package com.jpexs.decompiler.flash; import com.jpexs.decompiler.flash.abc.NotSameException; import com.jpexs.decompiler.flash.configuration.Configuration; -import java.io.*; -import static org.testng.Assert.*; +import java.io.BufferedInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FilenameFilter; +import java.io.IOException; +import static org.testng.Assert.fail; import org.testng.annotations.Test; /** diff --git a/trunk/test/com/jpexs/decompiler/flash/SWFStreamTest.java b/trunk/test/com/jpexs/decompiler/flash/SWFStreamTest.java index 2affdc82f..ff3ed8985 100644 --- a/trunk/test/com/jpexs/decompiler/flash/SWFStreamTest.java +++ b/trunk/test/com/jpexs/decompiler/flash/SWFStreamTest.java @@ -20,7 +20,8 @@ import com.jpexs.decompiler.flash.types.RECT; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; -import static org.testng.Assert.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; import org.testng.annotations.Test; /** @@ -156,7 +157,7 @@ public class SWFStreamTest { assertEquals(ff, sis.readFIXED8()); sis.close(); } - + @Test public void testRECT() throws IOException { RECT rect; diff --git a/trunk/test/com/jpexs/decompiler/flash/generators/AS2Generator.java b/trunk/test/com/jpexs/decompiler/flash/generators/AS2Generator.java index a3d09e648..bf08d7214 100644 --- a/trunk/test/com/jpexs/decompiler/flash/generators/AS2Generator.java +++ b/trunk/test/com/jpexs/decompiler/flash/generators/AS2Generator.java @@ -60,23 +60,22 @@ public class AS2Generator { doa = null; continue; } - String[] srcs = src.split("[\r\n]+"); - String testName="frame"+frame+"_Test"; - String pref="trace(\""; - for(String p:srcs){ - if(p.trim().matches("trace\\(\"(.*)Test\"\\);")){ - testName="frame"+frame+"_"+p.substring(pref.length(),p.length()-3/* "); */); + String testName = "frame" + frame + "_Test"; + String pref = "trace(\""; + for (String p : srcs) { + if (p.trim().matches("trace\\(\"(.*)Test\"\\);")) { + testName = "frame" + frame + "_" + p.substring(pref.length(), p.length() - 3/* "); */); } } - + s.append("@Test\r\npublic void "); s.append(testName); s.append("(){\r\ncompareSrc("); s.append(frame); s.append(","); - + for (int i = 0; i < srcs.length; i++) { String ss = srcs[i]; s.append("\""); diff --git a/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java b/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java index a8065cf5b..1b0fe3815 100644 --- a/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java +++ b/trunk/test/com/jpexs/decompiler/flash/generators/AS3Generator.java @@ -42,7 +42,7 @@ public class AS3Generator { public static void main(String[] args) throws Exception { Configuration.autoDeobfuscate.set(false); - SWF swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as3/as3.swf")),false); + SWF swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as3/as3.swf")), false); DoABCDefineTag tag = null; for (Tag t : swf.tags) { if (t instanceof DoABCDefineTag) { @@ -63,7 +63,7 @@ public class AS3Generator { s.append(name); s.append("\", "); HilightedTextWriter src = new HilightedTextWriter(false); - abc.findBody(((TraitMethodGetterSetter) t).method_info).toString("", ExportMode.SOURCE, false, -1/*FIX?*/, classId, abc, null,abc.constants, abc.method_info, new Stack(), false, src, new ArrayList(), abc.instance_info[classId].instance_traits); + abc.findBody(((TraitMethodGetterSetter) t).method_info).toString("", ExportMode.SOURCE, false, -1/*FIX?*/, classId, abc, null, abc.constants, abc.method_info, new Stack(), false, src, new ArrayList(), abc.instance_info[classId].instance_traits); String[] srcs = src.toString().split("[\r\n]+"); for (int i = 0; i < srcs.length; i++) { String ss = srcs[i];